A Blockchain Intelligent Parking Management Method Based on Private Information Retrieval
By building an alliance chain network and private information retrieval protocol, using elliptic curve encryption and near-field communication, the problem of insufficient supervision of parking space query information in the existing intelligent parking system is solved, and the privacy protection of parking users and the transparency and reliability of transaction processes are achieved.
Patent Information
- Application Number
- CN202411233350.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing blockchain-based intelligent parking system has insufficient supervision of parking space query information before parking users perform parking transactions, and the backend system may over-analyze the user's parking space query information, resulting in privacy leakage and system instability.
The blockchain intelligent parking management method based on private information retrieval is adopted. By building an alliance chain network, the elliptic curve encryption algorithm is used to generate public and private key pairs, and combined with near-field communication and Internet of Things equipment, parking users' parking space information query protection is realized, and the backend system avoids excessive analysis of parking space query information.
It effectively protects the privacy and security of parking users, ensures the reliability and integrity of parking space information, prevents the backend system from over-analyzing the parking space query information, and realizes openness, transparency and tamper-proof of parking transactions.
Smart Images

Figure CN119250238B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information security, and particularly relates to a blockchain intelligent parking management method based on private information retrieval. Background Art
[0002] With the rapid development of China's economy, the number of private cars has increased rapidly. The lagging construction of parking facilities behind the growth of the vehicle ownership, unclear ownership of parking facilities, insufficient registration systems related to ownership, and lack of effective management have caused the problem of "difficult parking" in some cities. Building an intelligent parking lot system based on the wireless sensing and information transmission technology of Internet of Things devices is the main technical solution at present. Zhu Jiajie et al. published an article "Design of an Intelligent Parking System Based on the Internet of Things" in the Journal of Huanghe S&T University, Vol. 22, No. 8, 2020. This research proposed a design scheme of an intelligent parking system based on Internet of Things technology in view of the deficiencies existing in the current traditional underground parking lot management system. This system consists of multiple functional modules such as parking space navigation, reverse car finding, and vehicle positioning, and can provide comprehensive services and management, thus significantly improving the parking efficiency. Patent application CN113744557A discloses an intelligent parking system based on Internet of Things technology, which includes a vehicle recording terminal, a central processing module, and a service terminal, and can effectively generate the position path planning information from the service terminal to the parking space, helping to improve the intelligent management level of large-scale underground parking lots. However, both of these two types of systems have common problems: relying on centralized data storage and having potential security hazards of single point of failure.
[0003] At present, due to the characteristics of blockchain systems such as distributed storage, cryptographic authentication, open and transparent review, and anti-tampering mechanisms, a secure and intelligent parking lot system based on blockchain technology can be constructed to avoid single-point failures and ensure the reliability and integrity of parking information. Li Jiping designed and developed a decentralized storage and multi-party alliance mutual supervision intelligent parking system based on consortium blockchain in the paper "Design and Development of an Intelligent Parking System Based on Blockchain", providing a basic solution to the data security problems caused by centralized storage and open platforms. Wu Yinghua et al. published the article "Research on Shared Parking Mode and System Based on Blockchain Smart Contract" in the 5th issue of "Data Communication" in 2023. This article proposed a shared parking mode based on blockchain smart contract and designed the corresponding system architecture to solve problems such as resource conflict, revenue distribution conflict, and tripartite non-repudiation in shared parking, providing an effective solution. Patent application CN117834154A discloses an intelligent parking authentication method based on blockchain, which uses cryptographic technology to allow drivers to make reservation signatures using pseudonyms and generate certificates anonymously, thus enhancing the anonymity of driver identities. However, for the above three blockchain-based intelligent parking systems, the supervision of the parking space query information before parking users execute parking transactions is not sufficient; the parking background system will dynamically adjust the parking space price based on information such as the retrieval frequency of parking users' parking space information, causing problems such as so-called "big data killing" that maliciously disrupt the system stability. Summary of the Invention
[0004] To solve the above technical problems, the present invention provides a blockchain intelligent parking management method based on private information retrieval. Based on the ledger management method of multiple data copies of the blockchain system, information-theoretic private information retrieval technology is used to realize the protection of parking users' query of parking space information, so as to avoid excessive analysis of parking users' parking space query information by the background system.
[0005] The blockchain intelligent parking management method based on private information retrieval described in the present invention includes the following steps:
[0006] Step 1: Use M parking lot server nodes as blockchain network nodes to construct a parking lot blockchain network, and initialize the parking lot blockchain network to generate a genesis block;
[0007] Step 2: Construct a private information retrieval protocol, and parking users retrieve parking space information based on the private information retrieval protocol;
[0008] Step 3: Based on the parking space information retrieval result, the parking user makes a reservation for a parking space, completes the parking action, and updates the parking information.
[0009] Further, in Step 1, the network initialization is specifically as follows:
[0010] Step 1-1: The parking lot administrator registers. The blockchain network generates a public and private key pair for each registered parking lot administrator. The formula is as follows:
[0011]
[0012] where ECC is the elliptic curve cryptography algorithm, a and b are curve parameters, p is a prime number, and d is a random number. are the generated public and private keys of the parking lot administrator respectively; the public key is stored in the blockchain system, and the private key is saved by the parking lot administrator and the parking lot server node;
[0013] Step 1-2: The parking lot server node conducts information transmission with the Internet of Things sensing devices on the parking spaces based on near-field communication to obtain the parking lot space information, and broadcasts the space information in the blockchain network.
[0014] The parking space information format is:
[0015] ParSp = <<Ps, Pl>, <state>>
[0016] Among them, Ps is the index number of the parking lot; Pl is the index number of the parking space within the parking lot; state is the state of Pl, and its values are: -1, 0, 1, representing the reserved, occupied, and idle states of the parking space Pl respectively;
[0017] Step 1-3: The blockchain network collects the parking space information broadcast by all parking lot server nodes, and sorts the parking lot space information according to the order in which the parking lot administrators corresponding to the parking lot server nodes are registered in the system to obtain the parking space information set ParSps, and its information format is:
[0018] ParSps = <ParSp1, ParSp2, …, ParSp n >
[0019] Among them, ParSp1, ParSp2, …, ParSp n represent the 1st, 2nd, …, nth parking space information in the parking space information set respectively;
[0020] The blockchain network sorts out the public keys of all parking lot server nodes to obtain the public key set KPus, and its information format is:
[0021]
[0022] Among them, represent the public keys of parking lot administrators A1, A2, …, A M respectively;
[0023] The blockchain network packages ParSps and KPus to generate the genesis block GensBlock, and its information format is:
[0024] GensBlock = <KPus, ParSps>
[0025] In the network initialization stage, the state value of all parking spaces in ParSps is 1, that is, all parking spaces are in the idle state.
[0026] Furthermore, step 2 is specifically as follows:
[0027] Step 2-1: The parking user registers in the blockchain network, and the blockchain network generates a public and private key pair for each registered parking user, and its formula is:
[0028]
[0029] Among them, ECC is the elliptic curve encryption algorithm, a′, b′ are the curve parameters, p′ is a prime number, and d′ is a random number. They are the generated public and private keys of the parking user, which are stored by the parking user;
[0030] Step 2-2: The parking user selects K from M parking lot server nodes in the blockchain network and generates a set of private protocol requests for parking space status query, ParPIs;
[0031] Step 2-3: Based on the set PoS consensus algorithm, the blockchain network selects a verification node V to verify ParPIs;
[0032] Step 2-4: The parking lot server node receives the verified set of private protocol requests for parking space status query, ParPIsVs, decrypts the elements in ParPIsVs one by one, and queries the parking space information set ParSps in the blockchain based on the decryption results to generate a response message;
[0033] Step 2-5: The parking user receives the signed and encrypted response messages broadcast by all parking lot server nodes, performs decryption operations and set exclusive OR operations to obtain the status information of the parking spaces it wants to query.
[0034] Further, Step 2-2 is specifically as follows:
[0035] Step 2-2-1: Randomly generate K-1 random bit strings RanBits1, RanBits2, …, RanBits K-1 , and their information format is:
[0036] RanBits i =<RanBit1, RanBit2, …, RanBit n >, 1≤i≤K-1
[0037] where RanBit1, RanBit2, …, RanBit n correspond to n parking spaces in ParSps = <ParSp1, ParSp2, …, ParSp n > respectively and have corresponding permutation orders; RanBit j ={0, 1}, 1≤j≤n, that is, any bit in the random bit string, RanBit j randomly takes the value 0 or 1;
[0038] Step 2-2-2: Generate a real bit string containing the real value of the parking space queried by the parking user, and its information format is:
[0039] RelBits = <RelBit1, RelBit2, …, …, RelBit n >
[0040] Among them, RelBit1, RelBit2, …, RelBit n respectively correspond to n parking spaces in ParSps = <ParSp1, ParSp2, …, ParSp n >; r represents the number of the parking space queried by the parking user, and RelBit j represents the j-th bit in the true bit string, which is 1 only when it corresponds to the number of the parking space queried by the parking user, and 0 otherwise;
[0041] Step 2-2-3: Recursively perform bitwise exclusive OR operations on the random bit strings RanBits1, RanBits2, …, RanBits K-1 and the true bit string RelBits to obtain the K-th bit string Synts, whose information format is:
[0042] Synts = <SyntBit1, SyntBit2, …, SyntBit n >
[0043] where,
[0044]
[0045] …
[0046]
[0047] represents the exclusive OR operation;
[0048] Step 2-2-4: The parking user shuffles RanBits i and Synts in sequence to generate the parking space retrieval request bit string ParPIBits j , whose information format is:
[0049] ParPIBits j = {RanBits i , Synts}, 1 ≤ j ≤ K,
[0050] The parking user encrypts ParPIBits j based on its public and private keys and the public keys of K parking lot server nodes to obtain EncParPIBits j , whose information format is:
[0051]
[0052] where, are respectively the public and private keys of the parking user, is the public key of the j-th parking lot server node, where 1 ≤ j ≤ K, and Enc() is an encryption operation function;
[0053] Step 2-2-5: The parking user generates a set of private protocol requests for parking space status queries, ParPIs, based on EncParPIBits j and broadcasts them in the blockchain system. The information format of ParPIs is as follows:
[0054] ParPIs = <ParPI1, ParPI2, …, ParPI j , …, ParPI K >
[0055] where ParPI j = EncParPIBits j , 1 ≤ j ≤ K, and ParPI j represents the j-th encrypted query request.
[0056] Furthermore, Step 2-3 is specifically as follows:
[0057] Step 2-3-1: For
[0058]
[0059] in ParPIs, use the public key of the parking user to perform a decryption operation on . The specific formula is as follows:
[0060]
[0061] If all decryption operations are successful, it indicates that the verification is passed;
[0062] Step 2-3-2: The verification node V uses its private key to encrypt to generate verification information ParPIsV j , and its information format is as follows:
[0063]
[0064] where are the public and private keys of the verification node V;
[0065] Step 2-3-3: Use the verification information set ParPIsVs generated by the verification node V as the verified parking space status query request and broadcast it in the blockchain system. The information format of ParPIsVs is as follows:
[0066] ParPIsVs = <ParPIsV1, ParPIsV2, …, ParPIsV K >.
[0067] Further, step 2-4 is specifically as follows:
[0068] Step 2-4-1: The parking lot server node uses ParPIsV j , where j = 1 in to decrypt and verify ParPIsV j in . The specific formula is:
[0069]
[0070] If the decryption is successful, execute step 2-4-2;
[0071] Step 2-4-2: The parking lot server node uses its private key to perform a decryption operation on . The specific formula is:
[0072]
[0073] If the decryption is successful, execute step 2-4-3; otherwise, execute j++, and determine whether 1 ≤ j ≤ K is satisfied, and repeat steps 2-4-1 and 2-4-2;
[0074] Step 2-4-3: Based on the decryption result ParPIBits j = <ParPIBit1, ParPIBit2, …, ParPIBit j , …, ParPIBit n (>, the parking lot server node queries the set of parking space information ParSps = <ParSp1, ParSp2, …, ParSp n (> stored in its local blockchain, and generates a response message ParPIq j . The specific formula is:
[0075] ParPIq j = <ParSp m |1 ≤ m ≤ n, ParPIBit m = 1>;
[0076] Step 2-4-4: The parking lot server node signs ParPIq using its private key j and encrypts it using the public key of the parking user . The specific formula is:
[0077]
[0078] Where, They are respectively the private key of the parking lot server node and the public key of the parking user;
[0079] Step 2-4-5: The parking lot server node broadcasts the signed and encrypted response message EncParPIq j in the blockchain network.
[0080] Further, step 2-5 is specifically as follows:
[0081] Step 2-5-1: The parking user uses its private key to perform a decryption operation on the response message EncParPIq j The specific calculation formula is:
[0082]
[0083] Step 2-5-2: The parking user uses the public key of the parking lot server node to perform a decryption operation on the encrypted The specific calculation formula is:
[0084]
[0085] Step 2-5-3: The parking user recursively performs a set exclusive OR operation on all ParPIq j to obtain the query target parking space information. The specific calculation formula is:
[0086] ParPIq r = ParPIq1 Δ ParPIq2 Δ,…,Δ ParPIq K
[0087] where Δ represents the set exclusive OR operation, and the set ParPIq r obtained after K set exclusive OR operations only contains the target parking space information, that is:
[0088] ParPIq r = <ParSp r >;
[0089] Step 2-5-4: The parking user queries ParPIq r = <<Ps,Pl>, <state>Obtain the state value in > to get the status of the queried parking space r, and its values are: -1, 0, and 1 represent that the parking space is reserved, occupied, and free respectively; if state = 1, then execute step 3, otherwise repeat steps 2-1 to 2-4.
[0090] Further, step 3 is specifically as follows:
[0091] Step 3-1: The parking user reserves a parking space based on the retrieval result, and the blockchain network updates and uploads the information after the parking space reservation.
[0092] Step 3-2: After the parking user arrives at the parking lot, match the parking space based on the private information retrieval protocol for parking, and the blockchain network updates and uploads the parking space information.
[0093] Step 3-3: After the parking user finishes parking, pay and drive out of the parking lot, and the blockchain network updates and uploads the parking space information.
[0094] Further, step 3-1 is specifically as follows:
[0095] Step 3-1-1: The parking user is based on the query result ParPIq r = <<Ps, Pl>, <state>>Send a request ParRes for reserving parking space Pl to the parking lot server node Ps, and the specific information format is:
[0096]
[0097] Among them, represents the public and private keys of the parking user, the public key of the parking lot server node Ps;
[0098] Step 3-1-2: The parking lot server node Ps receives the request ParRes and performs a decryption operation. The specific calculation formula is:
[0099]
[0100] Among them, is the private key of the parking lot server node Ps;
[0101] Step 3-1-3: The parking lot server node Ps performs a verification operation on the decryption result. The specific calculation formula is:
[0102]
[0103] Step 3-1-4: The parking lot server node Ps depends on ParPIq r = <<Ps,Pl>, <state>><Ps, Pl> in >, obtain the latest stored ParSps of its local blockchain ParSps = <ParSp1, ParSp2, …, ParSp n >> the corresponding ParSp in r = <<Ps, Pl>, <state>>, that is, satisfying the condition:
[0104] (ParSp r ∈ParSps)∧(ParSp r ·<Ps,Pl> = ParPIq r ·<Ps,Pl>)
[0105] Judge whether ParSp r ·state = 1. If it holds, it means that it can be reserved. Let ParPIq r ·state = -1, that is, modify the parking space status to the reserved status. Otherwise, it means that it cannot be reserved;
[0106] Step 3-1-5: The parking lot server node Ps performs encryption authentication on the parking space information ParPIq r and generates a response ParRep to the reserved parking space request. Its information format is:
[0107]
[0108] Among them, flag = {0, 1}. flag = 0 means that the parking space cannot be reserved, and flag = 1 means that the parking space can be reserved; are the public and private keys of the parking lot server node Ps, is the public key of the parking user, and timestamp is the timestamp for responding to the reserved parking space request; The parking lot server node broadcasts ParRep in the blockchain network;
[0109] Step 3-1-6: The parking user receives the response to the reserved parking space request and performs a decryption operation. The specific calculation formula is:
[0110]
[0111] If flag = 1 is satisfied, then execute Step 3-1-7; otherwise, the parking space reservation is terminated, and the repeated operation of Step 2 is started;
[0112] Step 3-1-7: The parking user uses to perform a decryption operation on The specific calculation formula is:
[0113]
[0114] If the difference between the current time CurTime of the parking user D and timestamp does not exceed the set time threshold maxT, that is:
[0115] (CurTime D -timestamp) ≤ maxT
[0116] Then the parking user confirms the response message ParRep and encrypts it. The specific calculation formula is:
[0117]
[0118] The parking user broadcasts ParResC in the blockchain system;
[0119] Step 3-1-8: The parking lot server node Ps receives the response confirmation message ParResC and decrypts and verifies it. The specific calculation formula is:
[0120]
[0121] If the decryption operation is successful, it means verification is passed;
[0122] The parking lot server node Ps signs ParResC. The specific calculation formula is:
[0123]
[0124] Finally, the parking lot server node Ps broadcasts ParResCA in the blockchain system;
[0125] Step 3-1-9: The blockchain network selects a bookkeeping node based on the set PoS consensus algorithm to create a QR code for ParResCA. The specific calculation formula is:
[0126] QRcode(ParResCA) = ParPIq r = <<Ps,Pl>, <state>>
[0127] Among them, QRcode() performs a series of decryption operations on ParResCA to obtain the original predetermined parking space information ParPIq r ;
[0128] Step 3-1-10. The accounting node is based on ParPIq r = <<Ps,Pl>, <state>> the <Ps, Pl> to find the latest stored ParSps = <ParSp1, ParSp2, …, ParSp in the blockchain system n > the corresponding element ParSp in r , and also satisfies the condition:
[0129] ParSp r ·<Ps, Pl> = ParPIq r ·<Ps, Pl>
[0130] Update the status of ParSp r , that is: ParSp r ·state = ParPIq r ·state>;
[0131] Step 3-1-11. The accounting node packages ParResCA and ParSps to create a block, and the information format of the block is:
[0132] ParResBlock = <ParSps, ParResCA>
[0133] Step 3-1-12. The accounting node encrypts QRcode(ParResCA) using the public key of the parking user and the public key of the parking lot server node respectively, and the specific calculation formula is:
[0134]
[0135] The accounting node broadcasts ParResBlock, ParResQRCode D , ParResQRCode Ps in the system;
[0136] Step 3-1-13. The parking user receives the ParResQRCode D message, decrypts it using the private key to obtain the QR code and saves it locally. The specific calculation formula is:
[0137]
[0138] Step 3-1-14. The parking lot server node Ps receives the ParResQRCode Ps message, decrypts it using the private key and saves it locally. The specific calculation formula is:
[0139]
[0140] Step 3-1-15: All parking lot server nodes in the blockchain system receive the ParResBlock and update and store it locally, thus ensuring the consistency of the blockchain state across the network.
[0141] Further, Step 3-2 is specifically as follows:
[0142] Step 3-2-1: After the parking user drives to the parking lot, the parking lot server node Ps matches the QR code it stores with the QR code of the parking lot server node Ps; after successful matching, the parking user follows QRcode(ParResCA)=ParPIq r = <<Ps,Pl>, <state>>Include the parking space information Pl and park at the designated parking space;
[0143] Step 3-2-2: The Internet of Things sensing device on the parking space Pl senses the entry of the vehicle and sends a parking space status update message to the parking lot server node Ps using near-field communication;
[0144] Step 3-2-3: After receiving the message, the parking lot server node Ps updates the status of the parking space information Pl to occupied, that is: ParPIq r ·state = 0;
[0145] Step 3-2-4: The parking lot server node is based on ParPIq r = <<Ps, Pl>, <state>> in <Ps,Pl> to find the latest stored ParSps = <ParSp1, ParSp2, …, ParSp in the blockchain network n > the corresponding element ParSp in r , that is, satisfying the condition:
[0146] ParSp r ·<Ps,Pl> = ParPIq r ·<Ps,Pl>
[0147] Execute ParSp r ·state = ParPIq r ·state, and broadcast ParSps in the blockchain network;
[0148] Step 3-2-5: The blockchain network selects a bookkeeping node based on the set PoS consensus algorithm. The bookkeeping node packages ParSps to create a parking space occupancy block ParOccBlock, and its information format is:
[0149] ParOccBlock = <parsps>
[0150] The accounting node broadcasts the ParOccBlock in the network, and all parking lot server nodes in the blockchain network update the ParOccBlock in their local storage, thus ensuring the consistency of the blockchain state across the network.
[0151] Further, step 3-3 is specifically as follows:
[0152] Step 3-3-1: After the parking time of the parking user expires, the user drives away. The Internet of Things sensing device on the parking space Pl senses the departure of the vehicle and sends the parking space status update information to the parking lot server node Ps using near-field communication (such as Bluetooth, WiFi, etc.).
[0153] Step 3-3-2: After receiving the message and confirming that the parking user has paid the corresponding parking fee, the parking lot server node Ps updates the status of the parking space information Pl to idle, that is: ParPIq r ·state = 1;
[0154] Step 3-3-3: The parking lot server node is based on ParPIq r = <<Ps,Pl>, <state>> in <Ps, Pl> to find ParSps = <ParSp1, ParSp2, …, ParSp n > the corresponding element ParSp in r , that is, satisfying the condition:
[0155] ParSp r · <Ps, Pl> = ParPIq r · <Ps, Pl>
[0156] Execute ParSp r · state = ParPIq r · state>, and broadcast ParSps in the blockchain network;
[0157] Step 3-3-4: The blockchain network selects a bookkeeping node based on the set PoS consensus algorithm. The bookkeeping node packages ParSps to create a block ParRelBlock, and its information format is:
[0158] ParRelBlock = <parsps>
[0159] The accounting node broadcasts the ParRelBlock in the network, and all parking lot server nodes in the blockchain network update the ParRelBlock block in their local storage, so as to ensure the consistency of the blockchain state of the whole network.
[0160] The beneficial effects of the present invention are as follows: the method of the present invention can effectively ensure the privacy and security of parking users when retrieving parking space information; by adopting the private information retrieval method to retrieve parking space information on the blockchain node, the effective protection of the privacy of parking users retrieving parking space information is realized, and the over-analysis of the background system for parking space query information is avoided; the parking space information stored in the present invention is more reliable and complete; through the "blockchain" management of the transaction information during the parking process, the openness, transparency and anti-tampering of the parking transaction process are realized, and the reliability and integrity of the parking lot system information are guaranteed. Brief Description of the Drawings
[0161] Figure 1 is the blockchain network architecture based on the consortium chain of the present invention;
[0162] Figure 2 is the blockchain data structure of the present invention;
[0163] Figure 3 is the query of the parking space status information based on the private information retrieval protocol of the present invention;
[0164] Figure 4 is the information of the whole process of parking transactions on the blockchain of the present invention;
[0165] Figure 5 is the overall flowchart of the method used in the present invention. Detailed Embodiment
[0166] In order to make the content of the present invention easier to be clearly understood, the present invention will be further described in detail below according to specific embodiments and in conjunction with the accompanying drawings.
[0167] As Figure 5 shown, a blockchain intelligent parking management method based on private information retrieval according to the present invention includes the following steps:
[0168] Step 1: Use M parking lot server nodes as blockchain network nodes to construct a parking lot blockchain network, and initialize the parking lot blockchain network to generate a genesis block;
[0169] Step 2: Construct a private information retrieval protocol, and parking users retrieve parking space information based on the private information retrieval protocol;
[0170] Step 3: Based on the parking space information retrieval result, the parking user makes a reservation for a parking space, completes the parking action, and updates the parking information.
[0171] Blockchains are divided into three types: public blockchains, consortium blockchains, and private blockchains according to their different membership joining methods. Consortium blockchains are partially decentralized blockchains. The blockchain intelligent parking system based on private information retrieval adopts a membership-based management method. Therefore, the present invention constructs a blockchain network based on a consortium blockchain, as Figure 1 shown.
[0172] Figure 1 The blockchain network users in include a parking lot administrator (Administrator) and a parking user (Driver). The parking lot administrator is responsible for the initial uploading of parking space information to the blockchain and the updating and uploading of business information such as parking space reservation, parking, payment collection, and leaving the lot. The parking user interacts with the blockchain network using a smart terminal device, retrieves the parking spaces of interest, and generates business request information such as parking space information reservation, parking, payment, and leaving the lot. Figure 1 The blockchain network nodes in are parking lot server nodes, which are divided into request nodes, verification nodes, and accounting nodes according to their functional types. The request nodes are responsible for generating blocks for the business requests of the parking lot administrator, and the verification nodes authorize the evaluation and verification of the upload requests sent by the request nodes. The accounting nodes are responsible for packing transaction messages into the current block. The verification nodes and accounting nodes are generally not set up separately and are selected from all the nodes in the blockchain network based on a consensus algorithm.
[0173] The network initialization is specifically as follows:
[0174] Step 1-1: Registration of the parking lot administrator: The network generates a public and private key pair for each registered parking lot administrator, and the formula is:
[0175]
[0176] where ECC is the elliptic curve cryptography algorithm, a and b are curve parameters, p is a prime number, d is a random number, are the generated public and private keys of the parking lot administrator respectively; the public key is stored in the blockchain system, and the private key is saved by the parking lot administrator and the parking lot server node;
[0177] Step 1-2: The parking lot server node collects the parking lot space information: The parking lot server node performs information transmission with the Internet of Things sensing devices on the parking spaces based on near-field communication (such as Bluetooth, WiFi, etc.) to obtain the parking lot space information, and broadcasts the space information in the blockchain system;
[0178] The parking space information format is:
[0179] ParSp = <<Ps, Pl>, <state>>
[0180] Among them, Ps is the index number of the parking lot; Pl is the index number of the parking space in the parking lot; state is the state of Pl, and its values are: -1, 0, 1, representing the reserved, occupied, and idle states of the parking space Pl respectively;
[0181] Step 1-3: Generate the genesis block: The blockchain system collects the parking space information broadcast by all parking lot server nodes, and sorts the parking lot space information according to the order in which the corresponding parking lot administrators of the parking lot server nodes are registered in the system to obtain the parking space information set ParSps, and its information format is:
[0182] ParSps = <ParSp1, ParSp2, …, ParSp n >
[0183] Among them, ParSp1, ParSp2, …, ParSp n represent the 1st, 2nd, …, nth parking space information in the parking space information set respectively.
[0184] The blockchain system sorts out the public keys of all parking lot server nodes to obtain the public key set KPus, and its information format is:
[0185]
[0186] Among them, represent the public keys of administrators A1, A2, …, A M respectively.
[0187] The blockchain system packages ParSps and KPus to generate the genesis block GensBlock, and its information format is:
[0188] GensBlock = <KPus, ParSps>
[0189] In the network initialization stage, the state value of all parking spaces in ParSps is 1, that is, all parking spaces are in the idle state. Figure 2 In (a) is the basic structure of the genesis block created by the parking lot blockchain system.
[0190] In step 2, the parking space information set ParSps is stored in the distributed ledger of the blockchain. The parking user submits a parking space query request to the blockchain network. The server nodes in the blockchain network execute the retrieval and return the response result. The parking user calculates the status information of the queried parking space based on the response result. The basic process is as Figure 3 shown. Specifically:
[0191] Step 2-1: The parking user registers in the system, and the system generates a public and private key pair for each registered parking user. The formula is as follows:
[0192]
[0193] where ECC is the elliptic curve cryptography algorithm, a′, b′ are curve parameters, p′ is a prime number, d′ is a random number, are the generated public and private keys respectively, which are stored by the parking user.
[0194] Step 2-2: Construct a query request message: The parking user selects K out of M parking lot server nodes in the blockchain system to generate a parking space status query request message. In this example, M = 10, K = 5, n = 7. The specific process of constructing the query request message includes:
[0195] (1) The 4 randomly generated bit strings are: RanBits1 = <1,0,1,1,0,0,0>, RanBits2 = <0,1,1,1,0,1,0>, RanBits3 = <0,0,1,1,0,0,1>, RanBits4 = <0,1,1,0,1,1,0>;
[0196] (2) Generate a bit string containing the true value of the parking space queried by the parking user: RelBits5 = <0,0,0,0,0,1,0>, where the 6th bit is the number of the parking space status queried by the parking user;
[0197] (3) Recursively perform bitwise XOR operations on RanBits1 to RanBits4 and RelBits5 to obtain the 5th bit string Synts = <1,0,0,1,1,1,1>;
[0198] (4) Based on its public and private keys and the public keys of 5 parking lot server nodes, the parking user shuffles the request bit strings: RanBits1 to RanBits4 and Synts in order and performs encryption processing to obtain:
[0199]
[0200] (5) The parking user generates a private protocol request for the parking space status query based on the request bit strings EncParPIBits1 to EncParPIBits5 as:
[0201] ParPIp = <ParPIs1,ParPIs2,ParPIs3,ParPIs4,ParPIs5>.
[0202] Step 2-3, Verify the request message: The blockchain system selects a verification node V to verify ParPIp based on the set PoS (Proof of Stake) consensus algorithm;
[0203] In this example, the specific process for the system to verify the request message includes:
[0204] (1) The verification node uses the public key of the parking user to decrypt the 5 request messages. The specific information is:
[0205]
[0206]
[0207] (2) The verification node V uses its private key, to encrypt the decryption result to generate verification information. The specific information is:
[0208]
[0209] (3) Based on ParPIsV1~ParPIsV5, generate the verified parking space status query private protocol request set ParPIpVs. Its information format is:
[0210] ParPIpVs = <ParPIsV1, ParPIsV2, ParPIsV3, ParPIsV4, ParPIsV5>.
[0211] Step 2-4, Construct the query response message: The parking lot server node receives the verified parking space status query private protocol request set ParPIsVs, decrypts the elements in ParPIsVs in sequence, and queries the parking space information set ParSps in the blockchain based on the decryption result to generate a response message.
[0212] In this example, the specific process for constructing the query response message includes:
[0213] (1) The parking lot server node uses the public key of the verification node to decrypt and verify ParPIsV1~ParPIsV5, that is:
[0214]
[0215]
[0216] (2) The parking lot server node uses its private key to decrypt and calculate in sequence, that is:
[0217]
[0218] If the decryption is successful, execute step (3); otherwise, execute j++, and determine whether 1≤j≤5 is satisfied. If so, repeat steps (1)-(2).
[0219] (3) The parking lot server node queries the parking space information set ParSps = <ParSp1, ParSp2, …, ParSp7> in its local blockchain based on the decryption result ParPIBits j = <ParPIBits1, ParPIBits2, ParPIBits3, ParPIBits4, ParPIBits5>, and generates response messages ParPIq1~ParPIq5, that is:
[0220] ParPIq1 = <ParSp2, ParSp3, ParSp5, ParSp6>,
[0221] ParPIq2 = <ParSp2, ParSp3, ParSp4, ParSp6>,
[0222] ParPIq3 = <ParSp3, ParSp4, ParSp7>,
[0223] ParPIq4 = <ParSp1, ParSp4, ParSp5, ParSp6, ParSp7>,
[0224] ParPIq5 = <ParSp1, ParSp3, ParSp4>.
[0225] (4) The parking lot server node signs ParPIq1~ParPIq5 based on its private key and encrypts them using the public key of the parking user The specific information is as follows:
[0226] ...
[0228]
[0229] (5) The parking lot server node broadcasts the signed and encrypted response messages
[0230] EncParPIq1~EncParPIq5 in the blockchain system.
[0231] Step 2-5, reconstruct the target parking space information: The parking user receives the signed and encrypted response messages broadcast by all parking lot server nodes, performs decryption operations and set exclusive OR operations to obtain the status information of the parking space it queries.
[0232] In this example, the specific process of reconstructing the target parking space information includes:
[0233] (1) The parking user uses their private key to perform a decryption operation on the response messages EncParPIq1 to EncParPIq5. The specific information is as follows:
[0234] ...
[0236]
[0237] (2) The parking user uses the public key of the parking lot server node to perform a decryption operation on the encrypted The specific information is as follows:
[0238]
[0239] (3) The parking user recursively performs a set exclusive OR operation on all of ParPIq1 to ParPIq5 to obtain the query target parking space information. The specific information is: ParSp6
[0240] (5) The parking user queries ParSp6 = <<Ps,Pl>, <state>The state value in > is used to obtain the status of querying ParSp6, and the value of 1 indicates that the parking space is in the idle state.
[0241] Step 3 specifically includes the following steps:
[0242] Step 3-1: Chain the parking space reservation and transaction information;
[0243] (1) The parking user is based on the query result ParPIq r = <<Ps,Pl>, <state>>Send a request for the reserved parking space Pl to the parking lot server node Ps, and the specific information format is as follows:
[0244]
[0245] Among them, represents the public and private keys of the parking user, the public key of the parking lot server node Ps.
[0246] (2) The parking lot server node Ps receives the request ParRes and performs a decryption operation. The specific calculation formula is:
[0247]
[0248] Among them, is the private key of the parking lot server node Ps.
[0249] (3) The parking lot server node Ps performs a verification operation on the decryption result. The specific calculation formula is:
[0250]
[0251] (4) The parking lot server node Ps relies on ParPIq r = <<Ps, Pl>, <state>><Ps, Pl> in it, obtain the latest stored ParSps of its local blockchain ParSps = <ParSp1, ParSp2, …, ParSp n > the corresponding ParSp in r = <<Ps, Pl>, <state>>, that is, satisfying the condition:
[0252] (ParSp r ∈ParSps)∧(ParSp r ·<Ps,Pl> = ParPIq r ·<Ps,Pl>)
[0253] Further, judge ParSp r ·state = 1. If it holds, it means it can be reserved. Let ParPIq r ·state = -1, that is, modify the parking space status to the reserved status. Otherwise, it means it cannot be reserved.
[0254] (5) The parking lot server node Ps performs encryption authentication on the parking space information ParPIq r to generate a response ParRep to the reserved parking space request. Its information format is:
[0255]
[0256] where flag = {0, 1}. flag = 0 means the parking space cannot be reserved, and flag = 1 means the parking space can be reserved; are the public and private keys of the parking lot server node Ps, is the public key of the parking user, and timestamp is the timestamp for responding to the reserved parking space request.
[0257] Further, the parking lot server node broadcasts ParRep in the blockchain system.
[0258] (6) The parking user receives the response to the reserved parking space request and performs a decryption operation. The specific calculation formula is:
[0259]
[0260] If flag = 1 is satisfied, then step (7) is executed. Otherwise, the parking space reservation is terminated, and the repeated operation of step 2 is started.
[0261] (7) The parking user uses to perform a decryption operation on The specific calculation formula is:
[0262]
[0263] If the difference between the current time CurTime of the parking user D and timestamp does not exceed the set time threshold maxT, that is:
[0264] (CurTime D -timestamp) ≤ maxT
[0265] Then the parking user confirms the response message ParRep and encrypts it. The specific calculation formula is:
[0266]
[0267] Furthermore, the parking user broadcasts ParResC in the blockchain system.
[0268] (8) The parking lot server node Ps receives the response confirmation message ParResC, decrypts and verifies it. The specific calculation formula is:
[0269]
[0270] If the decryption operation is successful, it means verification is passed.
[0271] Furthermore, the parking lot server node Ps signs ParResC. The specific calculation formula is:
[0272]
[0273] Finally, the parking lot server node Ps broadcasts ParResCA in the blockchain system.
[0274] (9) The blockchain system selects an accounting node based on the set PoS (Proof of Stake) consensus algorithm to create a QR code for ParResCA. The specific calculation formula is:
[0275] QRcode(ParResCA) = ParPIq r = <<Ps,Pl>, <state>>
[0276] Among them, QRcode() performs a series of decryption operations on ParResCA to obtain the original predetermined parking space information ParPIq r 。
[0277] (10) The accounting node is based on ParPIq r =<<Ps,Pl>, <state>> The <Ps, Pl> in it looks up the latest stored ParSps in the blockchain system, where ParSps = <ParSp1, ParSp2, …, ParSp n > The corresponding element ParSp in r , also satisfies the condition:
[0278] ParSp r · <Ps, Pl> = ParPIq r · <Ps, Pl>
[0279] Furthermore, update the state of ParSp r , that is: ParSp r · state = ParPIq r · state>
[0280] (11) The accounting node packs ParResCA and ParSps to create a block, and the information format of the block is:
[0281] ParResBlock = <ParSps, ParResCA>
[0282] (12) The accounting node encrypts QRcode(ParResCA) using the public key of the parking user and the public key of the parking lot server node respectively. The specific calculation formula is:
[0283]
[0284] Furthermore, the accounting node broadcasts ParResBlock, ParResQRCode D , ParResQRCode Ps in the system.
[0285] (13) The parking user receives the ParResQRCode D message, decrypts it using the private key to obtain the QR code and saves it locally. The specific calculation formula is:
[0286]
[0287] (14) The parking lot server node Ps receives the ParResQRCode Ps message, decrypts it using the private key and saves it locally. The specific calculation formula is:
[0288]
[0289] All parking lot server nodes in the blockchain system receive the ParResBlock and update and store it locally to ensure the consistency of the blockchain state across the network. The block information after the parking space reservation update is as shown in Figure 2 (b) of
[0290] Step 3-2: The parking process and transaction information are uploaded to the blockchain;
[0291] (1) After the parking user drives to the parking lot, the parking lot server node Ps matches the QR code it stores with the QR code of the parking lot server node Ps. After successful matching, the parking user follows QRcode(ParResCA) = ParPIq r = <<Ps, Pl>, <state>>Include the parking space information Pl and park at the designated parking space.
[0292] (2) The Internet of Things sensing device on the parking space Pl senses the entry of the vehicle and sends the parking space status update information to the parking lot server node Ps using near-field communication (e.g., Bluetooth, WiFi, etc.).
[0293] (3) After receiving the message, the parking lot server node Ps updates the status of the parking space information Pl to "occupied", that is: ParPIq r ·state = 0.
[0294] (4) The parking lot server node is based on ParPIq r = <<Ps, Pl>, <state>> in the <Ps, Pl> to find the latest stored ParSps = <ParSp1, ParSp2, …, ParSp in the blockchain system n > the corresponding element ParSp in r , that is, satisfying the condition:
[0295] ParSp r · <Ps, Pl> = ParPIq r · <Ps, Pl>
[0296] Execute ParSp r · state = ParPIq r · state, and broadcast ParSps in the blockchain system.
[0297] (5) The blockchain system selects a bookkeeping node based on the set PoS (Proof of Stake) consensus algorithm. The bookkeeping node packages ParSps to create a parking space occupancy block ParOccBlock, and its information format is:
[0298] ParOccBlock = <parsps>
[0299] The accounting node broadcasts the ParOccBlock in the system, and all parking lot server nodes in the blockchain system update the ParOccBlock in their local storage, thus ensuring the consistency of the blockchain state across the network. The updated block information during the parking process is as shown in Figure 2 (c) of
[0300] Step 3-3: The parking user pays and drives out of the parking lot, and the transaction information is uploaded to the blockchain;
[0301] (1) After the parking time of the parking user expires, the vehicle drives away. The Internet of Things sensing device on the parking space Pl senses the departure of the vehicle and uses near-field communication (such as Bluetooth, WiFi, etc.) to send the parking space status update information to the parking lot server node Ps;
[0302] (2) After receiving the message and confirming that the parking user has paid the corresponding parking fee, the parking lot server node Ps updates the status of the parking space information Pl to "idle", that is: ParPIq r ·state = 1;
[0303] (3) The parking lot server node is based on ParPIq r = <<Ps,Pl>, <state>> in <Ps,Pl> find ParSps = <ParSp1,ParSp2,…,ParSp n > in the corresponding element ParSp r , that is, satisfying the condition:
[0304] ParSp r ·<Ps,Pl> = ParPIq r ·<Ps,Pl>
[0305] Execute ParSp r ·state = ParPIq r ·state>, and broadcast ParSps in the blockchain system;
[0306] (4) The blockchain system selects a bookkeeping node based on the set PoS (Proof of Stake) consensus algorithm. The bookkeeping node packages ParSps to create a block ParRelBlock, and its information format is:
[0307] ParRelBlock = <parsps>
[0308] (5) The accounting node broadcasts the ParRelBlock in the system, and all parking lot server nodes in the blockchain system update the ParRelBlock block in their local storage, so as to ensure the consistency of the blockchain state across the network. The updated block information of the parking user when paying and leaving the parking lot is as Figure 2 shown in (d) of
[0309] Thus, the whole process of parking space information retrieval, parking space reservation, parking, paying and leaving is completed. Steps 2 and 3 of the present invention are a process that is carried out simultaneously and continuously cycles. The process of the transaction information on the chain during the parking process is as Figure 4 shown.
[0310] The above is only the preferred solution of the present invention, and is not used as a further limitation of the present invention. All equivalent changes made by using the content of the specification and drawings of the present invention are within the protection scope of the present invention.< / parsps> < / state> < / parsps> < / state> < / state> < / state> < / state> < / state> < / state> < / state> < / state> < / state> < / parsps> < / state> < / parsps> < / state> < / state> < / state> < / state> < / state> < / state> < / state> < / state> < / state>
Claims
1. A blockchain intelligent parking management method based on private information retrieval, characterized in that, It includes the following steps: Step 1: Use M parking lot server nodes as blockchain network nodes to construct a parking lot blockchain network, and initialize the parking lot blockchain network to generate a genesis block; Step 2: Construct a private information retrieval protocol, and parking users retrieve parking space information based on the private information retrieval protocol; specifically: Step 2-1: Parking users register in the blockchain network, and the blockchain network generates public and private key pairs for each registered parking user. The formula is: Among them, ECC is the elliptic curve cryptography algorithm, a′, b′ are curve parameters, p′ is a prime number, and d′ is a random number, which are the generated public and private keys of the parking user respectively, and are stored by the parking user; Step 2-2: Parking users select K from the M parking lot server nodes in the blockchain network to generate a set of private protocol requests for querying parking space status ParPIs; specifically: Step 2-2-1: Randomly generate K-1 random bit strings RanBits1, RanBits2, …, RanBits K-1 , and their information format is: RanBits i =<RanBit1, RanBit2, …, RanBit n , 1≤i≤K - 1 Among them, RanBit1, RanBit2, …, RanBit n correspond to n parking spaces in ParSps = <ParSp1, ParSp2, …, ParSp n >, respectively, and have corresponding arrangement orders; RanBit j = {0, 1}, 1 ≤ j ≤ n, that is, any bit in the random bit string, RanBit j randomly takes values of 0 or 1; ParSps is a set of parking space information, and ParSp n is the parking space information; Step 2-2-2: Generate a real bit string containing the true value of the parking space queried by the parking user. Its information format is: RelBits = <RelBit1, RelBit2, …, …, RelBit n > Among them, RelBit1, RelBit2, …, RelBit n correspond to n parking spaces in ParSps = <ParSp1, ParSp2, …, ParSp n >, respectively; r represents the number of the parking space queried by the parking user, and RelBit j represents the j-th bit in the true bit string, which is 1 only when it corresponds to the number of the parking space queried by the parking user, and 0 otherwise; Step 2-2-3: Recursively perform bitwise exclusive OR operations on the random bit strings RanBits1, RanBits2, …, RanBits K-1 and the true bit string RelBits to obtain the Kth bit string Synts, whose information format is: Synts = <SyntBit1, SyntBit2, …, SyntBit n > Among them, Indicates an exclusive OR operation; Step 2-2-4. The parking user shuffles RanBits i and Synts in sequence to generate a parking space retrieval request bit string ParPIBits t , and its information format is as follows: ParPIBits t = {RanBits i , Synts}, 1 ≤ t ≤ K, The parking user encrypts ParPIBits based on their public and private keys and the public keys of K parking lot server nodes t to obtain EncParPIBits t , and its information format is: wherein, are the public and private keys of the parking user respectively, is the public key of the t-th parking lot server node, 1 ≤ t ≤ K, and Enc() is an encryption operation function; Step 2-2-5. The parking user generates a set of private protocol requests for parking space status query ParPIs based on EncParPIBits t and broadcasts them in the blockchain system. The information format of ParPIs is as follows: ParPIs = <ParPI1, ParPI2, …, ParPI t , …, ParPI K > Among them, ParPI t = EncParPIBits t , 1 ≤ t ≤ K, ParPI t represents the t-th encrypted query request; Step 2-3: Based on the set PoS consensus algorithm, the blockchain network selects a verification node V to verify ParPIs; Step 2-4: The parking lot server node receives the verified set of private protocol requests for querying parking space status ParPIsVs, decrypts the elements in ParPIsVs in sequence, and queries the parking space information set ParSps in the blockchain based on the decryption result to generate a response message; Step 2-5: The parking user receives the signed and encrypted response messages broadcast by all parking lot server nodes, performs decryption operations and set exclusive OR operations to obtain the status information of the parking space it wants to query; Step 3: Based on the parking space information retrieval result, the parking user makes a reservation for a parking space, completes the parking action and updates the parking information.
2. The blockchain intelligent parking management method based on private information retrieval according to claim 1, characterized in that, In Step 1, the network initialization is specifically: Step 1-1: The parking lot administrator registers, and the blockchain network generates public and private key pairs for each registered parking lot administrator. The formula is: Among them, ECC is the elliptic curve cryptography algorithm, a and b are curve parameters, p is a prime number, and d is a random number. They are respectively the public and private keys of the generated parking lot administrator; the public key is stored in the blockchain system, and the private key is saved by the parking lot administrator and the parking lot server node. Step 1-2: The parking lot server node performs information transmission with the Internet of Things sensing devices on the parking spaces based on near-field communication to obtain parking lot parking space information, and broadcasts the parking space information in the blockchain network; The parking space information format is: ParSp = <<Ps, Pl>, <state> >< / state> Among them, Ps is the index number of the parking lot; Pl is the index number of the parking space in the parking lot; state is the state of Pl, and its value is: -1, 0, 1, indicating the reserved, occupied, and idle states of the parking space Pl respectively; Step 1-3: The blockchain network collects the parking space information broadcast by all parking lot server nodes, and sorts the parking lot parking space information according to the order of the parking lot administrators corresponding to the parking lot server nodes registered in the system to obtain a parking space information set ParSps. Its information format is: ParSps = <ParSp1, ParSp2, …, ParSp n > Among them, ParSp1, ParSp2, …, ParSp n respectively represent the 1st, 2nd, …, nth parking space information in the parking space information set; The blockchain network sorts out the public keys of all parking lot server nodes to obtain a public key set KPus. Its information format is: Among them, respectively represent the public keys of parking lot administrators A1, A2,..., A M ; The blockchain network packages ParSps and KPus to generate a genesis block GensBlock. Its information format is: GensBlock = <KPus, ParSps> In the network initialization stage, the state value of all parking spaces in ParSps is 1, that is, all parking spaces are in the idle state.
3. The blockchain intelligent parking management method based on private information retrieval according to claim 2, characterized in that, Step 2-3 is specifically: Step 2-3-1: For Using the public key of the parking user Perform Decryption operation, and the specific formula is: If all decryptions are successful, it indicates verification is passed; Step 2-3-2. The verification node V uses its private key to encrypt it to generate the verification information ParPIsV t , and its information format is: Among them, are the public and private keys for verifying node V; Step 2-3-3: Use the verification information set ParPIsVs generated by the verification node V as the verified parking space status query request and broadcast it in the blockchain system. The information format of ParPIsVs is: ParPIsVs = <ParPIsV1, ParPIsV2, …, ParPIsV K >。 4. The blockchain intelligent parking management method based on private information retrieval according to claim 3, wherein, Step 2-4 is specifically as follows: Step 2-4-1: The parking lot server node uses ParPIsV t , where t = 1 in to decrypt and verify ParPIsV t in , and the specific formula is: If decryption is successful, execute Step 2-4-2; Step 2-4-2: The parking lot server node uses the private key of its corresponding parking station administrator to perform a decryption operation. The specific formula is as follows: If decryption is successful, execute Step 2-4-3; otherwise, execute t++, and determine if 1 ≤ t ≤ K is satisfied. Repeat Step 2-4-1 and Step 2-4-2. Step 2-4-3: The parking lot server node, based on the decryption result ParPIBits t = <ParPIBit1, ParPIBit2, …, ParPIBit j , …, ParPIBit n >>, queries the set of parking space information ParSps = <ParSp1, ParSp2, …, ParSp n >> stored in its local blockchain, and generates a response message ParPIq t . The specific formula is as follows: ParPIq t =<ParSp j |1 ≤ j ≤ n, ParPIBit j = 1>; Step 2-4-4: The parking lot server node signs ParPIq based on the private key of its corresponding parking station administrator and encrypts it using the public key of the parking user t . The specific formula is as follows: Among them, are respectively the public key and private key corresponding to the parking lot server node for the parking station administrator, is the public key of the parking user; Step 2-4-5, the parking lot server node broadcasts the signed and encrypted response message EncParPIq t in the blockchain network.
5. The blockchain intelligent parking management method based on private information retrieval according to claim 4, wherein Step 2-5 is specifically as follows: Step 2-5-1. The parking user uses his private key to perform a decryption operation on the response message EncParPIq t The specific calculation formula is as follows: Step 2-5-2: The parking user uses the public key of the administrator corresponding to the parking lot server node to perform decryption operations on the encrypted The specific calculation formula is as follows: Step 2-5-3, the parking user performs XOR operations on all ParPIq t recursively to obtain the query target parking space information, and the specific calculation formula is: ParPIq r = ParPIq1 Δ ParPIq2 Δ,…, Δ ParPIq K where Δ represents the set exclusive OR operation, and the set ParP I q is obtained after K set exclusive OR operations r contains only the target parking space information, that is: ParPIq r = <ParSp r >; Step 2-5-4, the parking user queries ParPIq r = <<Ps,Pl>, <state>Obtain the state value in > to get the status of the queried parking space r. Its values are: -1, 0, 1 represent that the parking space is reserved, occupied, and free respectively. If state = 1, execute Step 3; otherwise, repeat Step 2-1 to Step 2-4. < / state> 6. The blockchain intelligent parking management method based on private information retrieval according to claim 5, characterized in that Step 3 is specifically as follows: Step 3-1: The parking user reserves a parking space based on the retrieval result, and the blockchain network updates the information after the parking space reservation on the chain; Step 3-2: After the parking user arrives at the parking lot, match the parking space based on the private information retrieval protocol for parking, and the blockchain network updates the parking space information on the chain; Step 3-3: After the parking user finishes parking, pays and drives away from the parking lot, and the blockchain network updates the parking space information on the chain.
7. A blockchain intelligent parking management method based on private information retrieval according to claim 6, characterized in that, Step 3-1 is specifically as follows: Step 3-1-1. The parking user based on the query result ParPIq r = <<Ps,Pl>, <state>Send a request ParRes for reserving parking space Pl to the parking lot server node Ps. The specific information format is: < / state> Among them, represent the public and private keys of the parking user, the public key of the parking lot server node Ps; Step 3-1-2: The parking lot server node Ps receives the request ParRes and performs a decryption operation. The specific calculation formula is: Among them, is the private key of the parking lot server node Ps; Step 3-1-3: The parking lot server node Ps performs a verification operation on the decryption result. The specific calculation formula is: Step 3-1-4: The parking lot server node Ps determines according to ParPIq r = <<Ps, Pl>, <state>><Ps, Pl> in it, obtain the latest stored ParSps of its local blockchain ParSps = <ParSp1, ParSp2, …, ParSp n > corresponding ParSp in r = <<Ps, Pl>, <state>>, that is, satisfying the condition: < / state> < / state> (ParSp r ∈ParSps)Λ(ParSp r ·<Ps,Pl> = ParPIq r ·<Ps,Pl>) Judge ParSp r ·state = 1. If it holds, it means reservation is possible, and set ParPIq r ·state = -1, that is, modify the parking space status to the reserved status; otherwise, it means reservation is not possible. Step 3-1-5, the parking lot server node Ps performs encryption authentication on the parking space information ParPIq r and generates a response ParRep for the reserved parking space request, and its information format is: Among them, flag = {0, 1}, flag = 0 indicates that the parking space cannot be reserved, and flag = 1 indicates that the parking space can be reserved; are the public and private keys of the parking lot server node Ps, is the public key of the parking user, and timestamp is the timestamp for responding to the request for reserving a parking space; the parking lot server node broadcasts ParRep in the blockchain network; Step 3-1-6: The parking user receives the response to the reserved parking space request and performs a decryption operation. The specific calculation formula is: If flag = 1 is satisfied, execute Step 3-1-7; otherwise, the parking space reservation terminates, and start repeating the operations in Step 2; Step 3-1-7. The parking user uses to perform a decryption operation. The specific calculation formula is: If the current time CurTime of the parking user D has a difference from the timestamp that does not exceed the set time threshold maxT, that is: (CurTime D - timestamp) ≤ maxT Then the parking user confirms the response message ParRep and encrypts it. The specific calculation formula is: The parking user broadcasts ParResC in the blockchain system; Step 3-1-8: The parking lot server node Ps receives the response confirmation message ParResC and decrypts and verifies it. The specific calculation formula is: If the decryption operation is successful, it indicates verification is passed; The parking lot server node Ps signs ParResC. The specific calculation formula is: Finally, the parking lot server node Ps broadcasts ParResCA in the blockchain system; Step 3-1-9: The blockchain network selects a bookkeeping node based on the set PoS consensus algorithm to create a QR code for ParResCA. The specific calculation formula is: QRcode(ParResCA) = ParPIq r = <<Ps,Pl>, <state> >< / state> Among them, QRcode() performs a series of decryption operations on ParResCA to obtain the original predetermined parking space information ParPIq r ; Step 3-1-10, the accounting node is based on ParPIq r = <<Ps,Pl>, <state>> in the <Ps, Pl> to find the latest stored ParSps in the blockchain system = <ParSp1, ParSp2, …, ParSp n > the corresponding element ParSp in r , also satisfies the condition:< / state> ParSp r · <Ps, Pl> = ParPIq r · <Ps, Pl> Update ParSp r 's status, i.e.: ParSp r ·state = <ParPIq r ·state>; Step 3-1-11: The bookkeeping node packs ParResCA and ParSps to create a block. The information format of the block is: ParResBlock = <ParSps, ParResCA> Step 3-1-12: The accounting node encrypts the QRcode(ParResCA) using the public key of the parking user and the public key of the parking lot server node respectively. The specific calculation formula is as follows: The accounting node broadcasts ParResBlock and ParResQRCode D and ParResQRCode Ps in the system; Step 3-1-13, the parking user receives the ParResQRCode D message, and uses the private key to decrypt it, obtain the QR code and save it locally. The specific calculation formula is as follows: Step 3-1-14: The parking lot server node Ps receives the ParResQRCode Ps message, decrypts it using the private key and saves it locally. The specific calculation formula is as follows: Step 3-1-15: All parking lot server nodes in the blockchain system receive ParResBlock and update and store it locally, so as to ensure the consistency of the blockchain state across the network.
8. The blockchain intelligent parking management method based on private information retrieval according to claim 7, wherein, Step 3-2 is specifically as follows: Step 3-2-1: After the parking user drives to the destination, the parking lot server node Ps matches the QR code it stores with the QR code of the parking lot server node Ps; after successful matching, the parking user follows QRcode(ParResCA) = ParPIq r = <<Ps, Pl>, <state>> Containing the parking space information Pl, drive to the designated parking space to park. < / state> Step 3-2-2: The Internet of Things sensing device on the parking space Pl senses the entry of the vehicle and uses near-field communication to send the parking space status update information to the parking lot server node Ps. Step 3-2-3: After the parking lot server node Ps receives the message, it updates the status of the parking space information Pl to occupied, that is: ParPIq r ·state = 0; Step 3-2-4, the parking lot server node is based on ParPIq r = <<Ps,Pl>, <state>> in the <Ps, Pl> to find the latest stored ParSps in the blockchain network, ParSps = <ParSp1, ParSp2, …, ParSp n > the corresponding element ParSp in r , that is, satisfying the condition:< / state> ParSp r · <Ps, Pl> = ParPIq r · <Ps, Pl> Execute ParSp r ·state = ParPIq r ·state, and broadcast ParSps in the blockchain network; Step 3-2-5: The blockchain network selects an accounting node based on the set PoS consensus algorithm. The accounting node packages ParSps to create a parking space occupancy block ParOccBlock, and its information format is: ParOccBlock = <parsps>< / parsps> The accounting node broadcasts ParOccBlock in the network. All parking lot server nodes in the blockchain network update the ParOccBlock block in their local storage, so as to ensure the consistency of the blockchain state across the network.
9. The blockchain intelligent parking management method based on private information retrieval according to claim 8, characterized in that, Step 3-3 is specifically as follows: Step 3-3-1: After the parking time of the parking user is full, drive away. The Internet of Things sensing device on the parking space Pl senses the departure of the vehicle and uses near-field communication to send the parking space status update information to the parking lot server node Ps. Step 3-3-2: After the parking lot server node Ps receives the message and confirms that the parking user has paid the corresponding parking fee, it updates the status of the parking space information Pl to idle, that is: ParPIq r ·state = 1; Step 3-3-3, the parking lot server node is based on ParPIq r = <<Ps,Pl>, <state>> in <Ps, Pl> to find ParSps = <ParSp1, ParSp2, …, ParSp n > in the corresponding element ParSp r , that is, satisfying the condition:< / state> ParSp r · <Ps, Pl> = ParPIq r · <Ps, Pl> Execute ParSp r ·state = <ParPIq r ·state>, and broadcast ParSps in the blockchain network; Step 3-3-4: The blockchain network selects an accounting node based on the set PoS consensus algorithm. The accounting node packages ParSps to create a block ParRelBlock, and its information format is: ParRelBlock = <parsps>< / parsps> The accounting node broadcasts ParRelBlock in the network. All parking lot server nodes in the blockchain network update the ParRelBlock block in their local storage, so as to ensure the consistency of the blockchain state across the network.
Citation Information
Patent Citations
Intelligent parking system based on Internet of Things technology
CN113744557A
Intelligent parking authentication method based on block chain
CN117834154A