A blockchain-based express delivery context location privacy protection method
By adopting blockchain and smart contract technology in same-city distribution, combined with all homomorphic encryption algorithms, on-time delivery and user privacy protection in complex traffic situations are achieved, and the problem of complex road traffic and mutual distrust between entities in same-city distribution is solved.
Patent Information
- Application Number
- CN202111398742.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2041-11-22
AI Technical Summary
In the same-city distribution, due to the complex road traffic and the mutual distrust between entities, it is difficult to achieve on-time delivery and protect user privacy.
The blockchain-based express context location privacy protection method is adopted to dynamically generate the shortest path in real time through smart contracts and fully homomorphic encryption algorithms to ensure that the vehicle can only obtain the next hop site information after arriving at the correct site at the right time, and to protect information privacy using the context encryption algorithm.
It realizes rapid response and on-time delivery in complex road traffic situations, while protecting user privacy, avoiding information leakage, and enhancing the system's resistance and attack capabilities.
Smart Images

Figure CN114201764B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security, and in particular relates to a blockchain-based express delivery context location privacy protection method. Background Art
[0002] From the perspective of the development of the same-city delivery industry, one-time planning of express routes is difficult to adapt to the complex road traffic conditions in same-city delivery. In addition, conflicts caused by lack of trust between vehicles, stations, and customers are also increasing day by day, making it difficult to meet the current requirements of the same-city delivery industry for on-time delivery, agile response, and timely information.
[0003] From the perspective of the development of the express delivery industry, the real-name system can significantly reduce the delay rate and loss rate of express delivery, and can even effectively deter criminals who use express delivery to engage in dangerous activities. However, while ensuring the safety of express delivery, the real-name display of express delivery also contains a large amount of user-related information (such as name, specific address, telephone number, etc.), which can easily leak user privacy and cause losses to users. It will also affect the good reputation of the express delivery industry and restrict the development of the express delivery industry chain.
[0004] To this end, people have proposed some solutions, such as:
[0005] The patent of Sichuan University, "A method for implementing privacy protection of express delivery in the logistics process" (authorization announcement number: CN106453268 B), discloses a method of applying a key set from a cloud server to re-encrypt the customer's delivery information and privacy information in a hierarchical manner when sending and receiving express mail, and granting different decryption permissions to different decryption requester identities. Although this method can avoid the direct display of express information on the package to a certain extent and prevent logistics-related personnel from taking advantage of their positions to obtain customers' privacy information, its shortcomings are that the entire route is planned in advance, the response agility is low, and it is too dependent on the central server, resulting in serious performance loss. Summary of the invention
[0006] In order to solve the practical problems of on-time delivery and customer privacy leakage in same-city distribution, the present invention provides a blockchain-based express delivery context location privacy protection method. The method selects the next hop site of the express delivery through a smart contract according to a fully homomorphic encryption algorithm based on the blockchain, and uses a context encryption algorithm to ensure that the vehicle arrives at the designated location to obtain relevant information and delivers the express delivery according to the established route. A shortest path that can protect privacy is generated in real time. The entire path is composed of successive choices made by each node based on a distributed computing method. The method is suitable for solving the complex situations caused by road traffic in same-city distribution, and at the same time solves the problem of mutual distrust between entities in same-city distribution.
[0007] To achieve the above object, the present invention provides the following technical methods:
[0008] A method for express delivery and privacy protection based on context encryption, comprising the following steps:
[0009] Step 1: System initialization. The process is as follows:
[0010] 1.1 There are three types of entities that need to be registered, namely Station, Customer and Vehicle. Customers are divided into senders and recipients;
[0011] 1.2 When an entity submits a registration request to the blockchain, the blockchain first generates a public-private key pair {pk, sk} and uses pk as the entity's ID. Then the block checks whether the ID already exists in the ID pool. If so, the registration fails. If not, the block adds the ID to the ID pool and sends the public-private key pair to the corresponding entity, and the entity is successfully registered.
[0012] 1.3 After successful registration, each entity has its own public and private key pair. In addition, after successful registration, the station can know its neighboring stations;
[0013] 1.4 The public and private key pairs of each entity will be updated regularly and sent to the corresponding entity in a timely manner;
[0014] Step 2: Release the delivery task. The process is as follows:
[0015] 2.1 The client terminal requests the order IDorder from the blockchain, and the blockchain generates a unique order IDorder and returns it to the client terminal;
[0016] 2.2 After the sender completes filling in the private information Info (sender's name, shipping address, sender's phone number, recipient's name, recipient's address, recipient's phone number) required for the order, the order information Info is encrypted using the recipient's public key pkRec to obtain the encrypted order information CInfo and upload it to the blockchain;
[0017] 2.3 The client terminal uses a homomorphic encryption function to encrypt the recipient address D to obtain FH(D), and publishes FH(D) to the block node of the starting site;
[0018] 2.4 The client terminal encrypts the fully homomorphic private key skFH with the public key pkblock of each block to obtain Enc(skFH);
[0019] 2.5 The client terminal sends the encrypted private key Enc(skFH) to each block;
[0020] 2.6 The site publishes task T to the blockchain<t1, t2,...,tm> , the format of the task is ti<L, IDorder,Time> , where L represents the location of the starting site, IDorder represents the order number, and Time represents the latest time allowed for transportation;
[0021] 2.7 Vehicle publishes preferred work area R to blockchain<o, r> , o represents the center of the preferred work area, r represents the radius of the work area. In order to prevent the leakage of vehicle context location information, the vehicle can customize the preferred work area near the station instead of selecting its actual location. After the vehicle publishes the preferred work area R, the vehicle pkvehicle joins the work pool poolw;
[0022] 2.8 The blockchain sets a reward W for the task, and allocates high rewards to tasks with less coverage or even marginal tasks that are not covered to increase the acceptance rate. In addition, the longer the transportation distance, the more rewards the task will receive. Tasks that have not been accepted by vehicles for a long time are marked as isolated tasks.
[0023] 2.9 The vehicle selection task that is already in the work pool poolw, after selection, the vehicle public key vehicle pkvehicle and order number IDorder are bound and uploaded to the chain. The vehicle has a high probability of selecting tasks with shorter distances and higher rewards, and a low probability of selecting tasks with longer distances and lower rewards. If the distance to the task exceeds the maximum working distance of the vehicle, it will not be selected even if the reward is very high, except for isolated tasks;
[0024] Step 3, transfer the express, the process is as follows:
[0025] 3.1 The vehicle arrives at station Si and is received by the sensor at station Si used to detect whether a vehicle has arrived. At this time, the vehicle sends a request Re1 (timestamp, IDorder, Location, pkvehicle) to station Si, triggering the smart contract; the parameters represent the current timestamp (timestamp), order number (IDorder), location (Location), and vehicle public key (pkvehicle).
[0026] 3.2 If it is detected that the vehicle has arrived at the right location at the right time, and the vehicle's public key pkvehicle order number IDorder matches, then the smart contract No. 1 is triggered to execute the following steps:
[0027] (1) Si broadcasts FH(D) to each of Si’s neighbor nodes;
[0028] (2) Si and each neighbor node of Si encrypt their own positions with the original homomorphic encryption public key to obtain the ciphertext FH(Si, each neighbor node of Si), calculate the distance between the recipient address ciphertext FH(D) and FH(Si, each neighbor node of Si), obtain the fully homomorphic encrypted distance FH(distance), and send it to the block;
[0029] 3.3 If the vehicle does not arrive at Si at the correct time, the smart contract No. 2 is triggered to solve the abnormal problem;
[0030] 3.4 After the courier enters the site, smart contract No. 3 is triggered: the block uses its own private key skblock to decrypt Enc(skFH) to obtain the fully homomorphic encrypted private key skFH, and then uses the fully homomorphic encrypted private key skFH to decrypt FH(distance) to obtain distance, compare and find the site corresponding to the minimum value as the next hop site;
[0031] 3.5 If the next hop is the current site Si, the receiving phase will begin at site Si;
[0032] 3.6 If the next hop is not site Si, take site Si+1 corresponding to the minimum value as an example and continue to perform the following steps;
[0033] 3.7 If the next hop is determined to be site S1, smart contract No. 4 is triggered: the next hop site is encrypted based on the context and the encrypted next hop site is sent to the appropriate vehicle;
[0034] 3.8 Site Si hands the express to be delivered to the vehicle, and the vehicle decrypts the context to obtain site Si+1;
[0035] 3.9 In the following delivery process, the courier still uses the method described above: a method of calculating the next hop site based on a fully homomorphic encryption algorithm through a smart contract, and encrypting and decrypting the transmission based on the context; until the smart contract determines that the current site is the next hop site and enters the acceptance stage;
[0036] 3.10 The vehicles that have completed the task will re-publish their preferred areas, the stations will re-publish new tasks, and the blockchain will recalculate the reward amount;
[0037] Step 4, the receiving phase, the process is as follows:
[0038] After the express delivery arrives at the final destination, the recipient uses the private key skRec to decrypt the order information and check whether the information is correct. If so, the recipient will refuse to accept the package. If correct, the recipient will sign for the package. The client terminal will then feed back the processing results to the blockchain.
[0039] In step 3, "a method for calculating the next hop site based on a fully homomorphic encryption algorithm through a smart contract, and encrypting and decrypting the transmission based on the context", taking the current site Si and the next hop site Si+1 as an example, the method includes the following steps:
[0040] In the first step, the vehicle leaves station Si-1 and sends the estimated arrival time and order number to station Si;
[0041] In the second step, the vehicle arrives at station Si and is received by the sensor used by the station to detect whether a vehicle has arrived. At this time, the vehicle sends a request Rei (timestamp, IDorder, Location, pkvehicle) to station Si, triggering the smart contract. The parameters represent the current timestamp (timestamp), order number (IDorder), location (Location), and vehicle public key (pkvehicle). Next, it is determined whether the vehicle has arrived at the correct location at the correct time; if the vehicle does not arrive at station Si at the correct time, smart contract No. 2 is triggered, and the block sends an abnormal alarm to the server. The server inquires about the status of the vehicle and generates a corresponding solution based on the status:
[0042] (1) If the vehicle is in an abnormal condition and cannot continue to drive, the server will re-dispatch the vehicle from station Si to the abnormal location to take over the original vehicle's mission;
[0043] (2) If the vehicle deviates from the route or cannot arrive on time for some reason, the vehicle submits a new arrival time to the next hop station;
[0044] (3) If the destination node of the task needs to be changed, the customer repeats the entire process of publishing the delivery task;
[0045] If the vehicle arrives at station Si at the correct time, the next step is executed;
[0046] The third step is as follows:
[0047] 3.1 First trigger smart contract No. 1 and execute the following steps:
[0048] (1) Si broadcasts FH(D) to each of Si’s neighbor nodes;
[0049] (2) Si and each of Si's neighbor nodes encrypt their own positions with the original homomorphic encryption public key to obtain the ciphertext FH(Si, each of Si's neighbor nodes), calculate the distance between the recipient address ciphertext FH(D) and FH(Si, each of Si's neighbor nodes), obtain the fully homomorphically encrypted distance FH(distance), and send it to the block;
[0050] 3.2 The vehicle arrives at the correct station Si at the correct time, and then the block is triggered to automatically execute smart contract No. 3. The specific steps of smart contract No. 3 are as follows:
[0051] (1) The block uses its own private key skblock to decrypt Enc(skFH) and obtain the fully homomorphic encryption private key skFH;
[0052] (2) Decrypt FH(distance) using the fully homomorphic encryption private key skFH to obtain distance, compare and find the site corresponding to the minimum value as the next hop site;
[0053] 3.3 If the next hop is the current site Si, then enter the receiving phase;
[0054] 3.4 If the next hop site is not the current site Si, then trigger smart contract No. 4: encrypt the next hop site Si+1 based on the context, and send the encrypted next hop site to the appropriate vehicle; the specific steps of smart contract No. 4 are as follows:
[0055] (1) The block uses its own private key skblock to decrypt Enc(skFH) to obtain the fully homomorphic encrypted private key skFH, and then uses the fully homomorphic encrypted private key skFH to decrypt FH(distance) to obtain distance, compare and find the minimum value as the next site Si+1;
[0056] (2) Request the server to dispatch a vehicle; the server dispatches a suitable vehicle based on the status of the vehicle at station Si, and then sends the selected vehicle information to the block;
[0057] (3) Generate a random symmetric key K, use K to symmetric encrypt Si+1, and obtain CSi+1;
[0058] (4) XOR the randomly generated K and the vehicle's context attributes (timestamp, IDorder, Location) to generate the symmetric key Kv;
[0059] (5) Use the vehicle public key pkvehicle to encrypt Kv to obtain the context-based encryption key CK, and send the encrypted next-hop site CSi+1 and the context-based encryption key CK to the vehicle, and the smart contract ends;
[0060] In the fourth step, the vehicle decrypts the next hop site Si+1 based on the context. The specific process is as follows:
[0061] 4.1 Use the vehicle private key skvehicle to decrypt and obtain Kv;
[0062] 4.2 XOR Kv with the current vehicle context attributes (timestamp, IDorder, Location) to obtain the symmetric key K;
[0063] 4.3 Use K to symmetric-decrypt the encrypted next-hop site CSi+1 to obtain the next-hop site Si+1;
[0064] Compared with the prior art, the present invention has the following advantages:
[0065] (1) The present invention designs a method for dynamically generating express delivery routes in real time using distributed computing and fully homomorphic encryption, which ensures the timeliness of the method. Only when a transport vehicle that has traveled the correct trajectory arrives at the correct station at the correct time can it obtain the information of the next hop station. The method can change the delivery address at any time without incurring additional costs to recalculate and encrypt the entire route.
[0066] (2) The present invention introduces blockchain to replace the traditional centralized administrator method. By utilizing the decentralized characteristics of blockchain, no block, station, or vehicle can obtain global path and order information. By utilizing the Merkle tree to verify data integrity, the smart contract deployed on the blockchain automatically executes various operations, ensuring the tamper-proof nature of information, solving the problem of mutual distrust between entities, and having stronger resistance to conspiracy and attack.
[0067] (3) The present invention has designed a complete information leakage verifiable mechanism. Even if the vehicle is captured, the malicious impostor does not have the correct context environment parameters to decrypt the next-hop site, nor does he have the ability to modify the order information or directly obtain the delivery address information, thus ensuring that the express delivery cannot be falsely claimed and the vehicle cannot be impersonated. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0069] Figure 1 is a flow chart of the system of the present invention;
[0070] Figure 2 It is a flow chart of obtaining the next hop site of the present invention;
[0071] Figure 3 It is a flowchart of the context-based encryption and decryption of the present invention. DETAILED DESCRIPTION
[0072] The following will describe the implementation methods of the present invention in detail with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0073] like Figure 1 As shown:
[0074] The first step is to register sites, vehicles, and customers during the initialization phase;
[0075] 1.1 There are three types of entities that need to be registered, namely Station, Customer and Vehicle. Customers are divided into senders and recipients;
[0076] 1.2 When an entity submits a registration request to the blockchain, the blockchain first generates a public-private key pair {pk, sk} and uses pk as the entity's ID. Then the block checks whether the ID already exists in the ID pool. If so, the registration fails. If not, the block adds the ID to the ID pool and sends the public-private key pair to the corresponding entity, and the entity is successfully registered.
[0077] 1.3 After successful registration, each entity has its own public and private key pair. In addition, after successful registration, the station can know its neighboring stations;
[0078] 1.4 The public and private key pairs of each entity will be updated regularly and sent to the corresponding entity in a timely manner;
[0079] The second step is to publish the delivery task stage. The specific steps are as follows:
[0080] 2.1 The client terminal requests the order IDorder from the blockchain, and the blockchain generates a unique order IDorder and returns it to the client terminal;
[0081] 2.2 The client terminal uses the RSA algorithm to encrypt the private information Info (sender's name, shipping address, sender's phone number, recipient's name, recipient's address, recipient's phone number) required for the order through the recipient's public key pkRec, obtains the encrypted order information CInfo, and uploads it to the blockchain;
[0082] 2.3 The client terminal uses a homomorphic encryption function to encrypt the recipient address D to obtain FH(D), and publishes FH(D) to the block node of the starting site;
[0083] 2.4 The client terminal encrypts the fully homomorphic private key skFH with the public key pkblock of each block to obtain Enc(SKFH); the client terminal sends the encrypted private key Enc(skFH) to each block;
[0084] 2.5 The site publishes task T to the blockchain<t1, t2,...,tm> , the format of the task is ti<L, IDorder,Time> , where L represents the location of the starting site, IDorder represents the order number, and Time represents the latest time allowed for transportation;
[0085] 2.6 Vehicle publishes preferred work area R to blockchain<o, r> , o represents the center of the preferred work area, r represents the radius of the work area. In order to prevent the leakage of vehicle context location information, the vehicle can customize the preferred work area near the station instead of selecting its actual location. After the vehicle publishes the preferred work area R, the vehicle pkvehicle joins the work pool poolw;
[0086] 2.7 The blockchain sets a reward W for the task, and allocates high rewards to tasks with less coverage or even marginal tasks that are not covered to increase the acceptance rate. In addition, the longer the transportation distance, the more rewards the task will receive. Tasks that have not been accepted by vehicles for a long time are marked as isolated tasks.
[0087] 2.9 The vehicle that is already in the work pool poolw selects the task. After the selection, the vehicle public key vehicle pkvehicle and the order number IDorder are bound and uploaded to the chain. The vehicle has a high probability of selecting the task with a shorter distance and higher reward, and a low probability of selecting the task with a longer distance and lower reward. If the distance to the task exceeds the maximum working distance of the vehicle, it will not be selected even if the reward is very high, except for isolated tasks;
[0088] The third step is the transfer phase: the vehicle sends the estimated arrival time to the station. When the vehicle arrives at the station, it sends an entry request. The station verifies whether the vehicle arrives at the specified station at the specified time based on the request, and verifies whether the vehicle's public key pkvehicle matches the order number IDorder. If not, it triggers smart contract No. 2; if yes, it triggers smart contract No. 1; after the express enters the station, it triggers smart contract No. 3; after determining the next hop station, if the current station is the next hop station, it enters the receiving phase; if the current station is not the next hop station, it triggers smart contract No. 4, and then the vehicle decrypts the next hop station based on the context and delivers to the next hop station; the vehicle that completes the task re-publishes the preferred area, the station re-publishes the new task, and the blockchain recalculates the reward amount;
[0089] Step 4, receiving stage: After the express delivery arrives at the receiving address, the recipient uses his own private key skRec to decrypt the order information and check whether the information is correct. If so, he will refuse to accept it. If correct, he will sign for it. The client terminal will feedback the processing results to the blockchain.
[0090] like Figure 2 As shown, the process of obtaining the next hop site is as follows:
[0091] In the first step, the vehicle leaves station Si-1 and sends the estimated arrival time and order number to station Si;
[0092] In the second step, the vehicle arrives at the station Si and is received by the sensor used by the station to detect whether there is a vehicle arriving. At this time, the vehicle sends a request Rei (timestamp, IDorder, Location, pkvehicle) to the station Si, triggering the smart contract. The parameters represent the current timestamp (timestamp), order number (IDorder), location (Location), and vehicle public key (pkvehicle).
[0093] 2.1 Determine whether the vehicle has arrived at the correct location at the correct time, and whether the vehicle's public key pkvehicle matches the order number IDorder; if the vehicle does not arrive at the station Si at the correct time, the smart contract No. 2 is triggered, and the block sends an abnormal alarm to the server. The server inquires about the status of the vehicle and generates a corresponding solution based on the status:
[0094] (1) If the vehicle is in an abnormal condition and cannot continue to drive, the server will re-dispatch the vehicle from station Si to the abnormal location to take over the original vehicle's mission;
[0095] (2) If the vehicle deviates from the route or cannot arrive on time for some reason, the vehicle submits a new arrival time to the next hop station;
[0096] (3) If the destination node of the task needs to be changed, the customer repeats the entire process of publishing the delivery task;
[0097] If the vehicle arrives at station Si at the correct time, smart contract 1 is triggered and the following steps are performed:
[0098] (1) Si broadcasts FH(D) to each of Si’s neighbor nodes;
[0099] (2) Si and each of Si's neighbor nodes encrypt their own positions with the original homomorphic encryption public key to obtain the ciphertext FH(Si, each of Si's neighbor nodes), calculate the distance between the recipient address ciphertext FH(D) and FH(Si, each of Si's neighbor nodes), obtain the fully homomorphically encrypted distance FH(distance), and send it to the block;
[0100] 2.2 After the vehicle enters station Si, smart contract No. 3 is triggered. The execution process of smart contract No. 3 is as follows:
[0101] (1) The block uses its own private key skblock to decrypt Enc(skFH) and obtain the fully homomorphic encryption private key skFH;
[0102] (2) Use the fully homomorphic encryption private key skFH to decrypt FH(distance) to obtain distance, compare and find the site corresponding to the minimum value as the next hop site.
[0103] 2.3 If the next hop is the current site Si, the express enters the receiving stage;
[0104] 2.4 If the next hop site is not the current site Si, trigger smart contract No. 4: encrypt the next hop site Si+1 based on the context, and send the encrypted next hop site to the appropriate vehicle;
[0105] In the third step, the vehicle decrypts the ciphertext of the next-hop site based on the context; if the decryption is successful, the next-hop site is obtained; if the decryption is unsuccessful, the exception is reported to the server.
[0106] like Figure 3 As shown, the process of encrypting and decrypting the next hop site based on the context is as follows:
[0107] The first step is context-based encryption by smart contract No. 4, and the process is as follows:
[0108] (1) The block uses its own private key skblock to decrypt Enc(skFH) to obtain the fully homomorphic encrypted private key skFH, and then uses the fully homomorphic encrypted private key skFH to decrypt FH(distance) to obtain distance, compare and find the minimum value as the next site Si+1;
[0109] (2) Request the server to dispatch a vehicle; the server dispatches a suitable vehicle based on the status of the vehicle at station Si, and then sends the selected vehicle information to the block;
[0110] (3) Generate a random symmetric key K, use K to symmetric encrypt Si+1, and obtain CSi+1;
[0111] (4) XOR the randomly generated K and the vehicle's context attributes (timestamp, IDorder, Location) to generate the symmetric key Kv;
[0112] (5) Use the vehicle public key pkvehicle to encrypt Kv to obtain the context-based encryption key CK, and send the encrypted next-hop site CSi+1 and the context-based encryption key CK to the vehicle, and the smart contract ends;
[0113] The second step is context-based decryption by the vehicle, and the process is as follows:
[0114] (1) Use the vehicle private key skvehicle to decrypt and obtain Kv;
[0115] (2) XOR Kv with the current vehicle context attributes (timestamp, IDorder, Location) to obtain the symmetric key K;
[0116] (3) Use K to symmetric-decrypt the encrypted next-hop site CSi+1 and obtain the next-hop Si+1.
[0117] The above description shows and describes several preferred embodiments of the present invention, but as mentioned above, it should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the invention concept described herein through the above teachings or the technology or knowledge of the relevant field. Changes and variations made by those skilled in the art do not depart from the spirit and scope of the present invention, and should be within the scope of protection of the claims attached to the present invention.
Claims
1. A blockchain-based express delivery context location privacy protection method, characterized by comprising the following steps / stages: The first stage, initialization stage 1.1 There are three types of entities that need to be registered, namely Station, Customer and Vehicle. Customers are divided into senders and recipients; 1.2 When an entity submits a registration request to the blockchain, the blockchain first generates a public-private key pair {pk, sk} and uses pk as the entity's ID. Then the block checks whether the ID already exists in the ID pool. If so, the registration fails. ; If it does not exist, the block adds the ID to the ID pool and sends the public and private key pair to the corresponding entity, and the entity is successfully registered; 1.3 After successful registration, each entity has its own public and private key pair. In addition, after successful registration, the station can know its neighboring stations; 1.4 The public and private key pairs of each entity will be updated regularly and sent to the corresponding entity in a timely manner; The second stage is to publish the delivery task 2.1 The client terminal requests the order IDorder from the blockchain, and the blockchain generates a unique order IDorder and returns it to the client terminal; 2.2 After the sender completes filling in the private information Info required for the order, he / she uses the recipient's public key pkRec to encrypt the order information Info, obtain the encrypted order information CInfo and upload it to the blockchain. The private information Info required for the order includes the sender's name, shipping address, sender's phone number, recipient's name, receiving address, and recipient's phone number; 2.3 The client terminal uses a homomorphic encryption function to encrypt the recipient address D to obtain FH(D), and publishes FH(D) to the block node of the starting site; 2.4 The client terminal encrypts the fully homomorphic private key skFH with the public key pkblock of each block to obtain Enc(skFH); 2.5 The client terminal sends the encrypted private key Enc(skFH) to each block; 2.6 The site publishes task T to the blockchain<t1, t2,...,tm> , the format of the task is ti<L, IDorder, Time> , where L represents the location of the starting site, IDorder represents the order number, and Time represents the latest time allowed for transportation; 2.7 Vehicle publishes preferred work area R to blockchain<o, r> , o represents the center of the preferred work area, r represents the radius of the work area. In order to prevent the leakage of vehicle context location information, the vehicle can customize the preferred work area near the station instead of selecting its actual location. After the vehicle publishes the preferred work area R, the vehicle pkvehicle joins the work pool poolw; 2.8 The blockchain sets a reward W for the task, and allocates high rewards to tasks with less coverage or even marginal tasks that are not covered to increase the acceptance rate. In addition, the longer the transportation distance, the more rewards the task will receive. Tasks that have not been accepted by vehicles for a long time are marked as isolated tasks. 2.9 The vehicle that is already in the work pool poolw selects the task. After the selection, the vehicle public key vehicle pkvehicle and the order number IDorder are bound and uploaded to the chain. The vehicle has a high probability of selecting the task with a shorter distance and higher reward, and a low probability of selecting the task with a longer distance and lower reward. If the distance to the task exceeds the maximum working distance of the vehicle, it will not be selected even if the reward is very high, except for isolated tasks; The third stage, the transfer stage 3.1 The vehicle arrives at station Si according to the task requirements and is received by the sensor at station Si used to detect whether a vehicle has arrived. At this time, the vehicle sends a request Re1 (timestamp, IDorder, Location, pkvehicle) to station Si, triggering the smart contract; the parameters represent the current timestamp timestamp, order number IDorder, location Location, and vehicle public key pkvehicle respectively; 3.2 If it is detected that the vehicle has arrived at the right location at the right time, and the vehicle's public key pkvehicle order number IDorder matches, then the smart contract No. 1 is triggered to execute the following steps: (1) Si broadcasts FH(D) to each of Si’s neighbor nodes; (2) Si and each of Si's neighbor nodes encrypt their own positions with the original homomorphic public key to obtain the ciphertext FH(SA, each neighbor node of Si), calculate the distance between the recipient address ciphertext FH(D) and FH(Si, each neighbor node of Si), obtain the fully homomorphic encrypted distance FH(distance), and send it to the block; 3.3 If the vehicle does not arrive at Si at the correct time, the smart contract No. 2 is triggered to resolve the abnormal situation; 3.4 After the courier enters station Si, the trigger block automatically executes smart contract No. 3: decrypt FH (distance) and select the next hop station through comparison; 3.5 If the next hop is the current site Si, the courier enters the receiving stage; 3.6 If the next hop is not site Si, continue to perform the following steps taking site S1 corresponding to the minimum value as an example; 3.7 If the next hop is determined to be site Si+1, smart contract No. 4 is triggered: the next hop site is encrypted based on the context and the encrypted next hop site is sent to the appropriate vehicle; 3.8 Site Si hands the express to be delivered to the vehicle, and the vehicle decrypts the context to obtain the next hop site Si+1; 3.9 In the subsequent delivery process, the courier uses a method to calculate the next hop site based on a fully homomorphic encryption algorithm through a smart contract, and encrypts and decrypts the transmission based on the context; until the smart contract determines that the current site is the next hop site and enters the receiving stage; 3.10 The vehicles that have completed the task will re-publish their preferred areas, the stations will re-publish new tasks, and the blockchain will recalculate the reward amount; Phase 4, Receiving Phase 4.1 After the express arrives at the final destination, the recipient uses the private key skRec to decrypt the order information and check whether the information is correct. If so, the recipient will refuse to accept the package. If correct, the recipient will sign for the package. The client terminal will feed back the processing results to the blockchain.
2. According to the blockchain-based express delivery context location privacy protection method of claim 1, wherein "a method for calculating the next hop site based on a fully homomorphic encryption algorithm through a smart contract and transmitting based on context encryption and decryption" is characterized by comprising the following steps: In the first step, the vehicle leaves station Si-1 and sends the estimated arrival time and order number to station Si; In the second step, the vehicle arrives at the station Si and is received by the sensor used by the station to detect whether there is a vehicle arriving. At this time, the vehicle sends a request Rei (timestamp, IDorder, Location, pkvehicle) to the station Si, triggering the smart contract. The parameters represent the current timestamp, order number IDorder, location Location, and vehicle public key pkvehicle. Next, it is determined whether the vehicle has arrived at the correct location at the correct time. If the vehicle does not arrive at the station Si at the correct time, the smart contract No. 2 is triggered to resolve the abnormal situation. If the vehicle arrives at the station Si at the correct time, the next step is executed. The third step is as follows: 3.1 First trigger smart contract No. 1 and execute the following steps: (1) Si broadcasts FH(D) to each of Si’s neighbor nodes; (2) Si and each of Si's neighbor nodes encrypt their own positions with the original homomorphic encryption public key to obtain the ciphertext FH(Si, each of Si's neighbor nodes), calculate the distance between the recipient address ciphertext FH(D) and FH(Si, each of Si's neighbor nodes), obtain the fully homomorphically encrypted distance FH(distance), and send it to the block; 3.2 After the courier enters the station Si, the smart contract No. 3 is triggered: decrypt FH (distance), compare and find the station corresponding to the minimum value as the next hop station; 3.3 If the next hop is the current site Si, the courier enters the receiving stage; 3.4 If the next hop site is not the current site Si, trigger smart contract No. 4: encrypt the next hop site Si+1 based on the context, and send the encrypted next hop site to the appropriate vehicle; In the fourth step, courier Si hands over all the parcels that need to be delivered to the vehicle, and the vehicle decrypts the next hop site Si+1 based on the context.
3. The blockchain-based express delivery context location privacy protection method according to claim 1, wherein the triggered smart contract No. 2, It is characterized in that The following steps are involved: The block sends an abnormal alarm to the server, which inquires about the vehicle's status and generates a corresponding solution based on the status: Case 1: The vehicle is in an abnormal condition and cannot continue to drive. The server will re-dispatch the vehicle from station Si to the abnormal location to take over the original vehicle's mission; Case 2: If the vehicle deviates from the route or cannot arrive on time for some reason, the vehicle submits a new arrival time to the next hop station; Case 3: If the destination node of the task needs to be changed, the customer repeats the entire process of publishing the task.
4. The blockchain-based express delivery context location privacy protection method according to claim 1, wherein the triggered smart contract No. 3, It is characterized in that The following steps are involved: In the first step, the block uses its own private key skblock to decrypt Enc(skFH) to obtain the fully homomorphic encryption private key skFH; In the second step, use the fully homomorphic encryption private key skFH to decrypt FH(distance) to obtain distance, compare and find the site corresponding to the minimum value as the next hop site.
5. The blockchain-based express delivery context location privacy protection method according to claim 1, wherein the triggered smart contract No. 4, It is characterized in that The following steps are involved: The first step is to request the server to dispatch a vehicle; The server dispatches a suitable vehicle based on the status of the vehicle at station Si, and then sends the selected vehicle information to the block; The second step is to generate a random symmetric key K, and use K to symmetric encrypt Si+1 to obtain CSi+1; The third step is to XOR the randomly generated K with the vehicle's context attributes, including timestamp, IDorder, and Location, to generate the symmetric key Kv; The fourth step is to use the vehicle public key pkvehicle to encrypt Kv, obtain the context-based encryption key CK, and send the encrypted next-hop site CSi+1 and the context-based encryption key CK to the vehicle, and the smart contract ends.
6. The blockchain-based express delivery context location privacy protection method according to claim 1, wherein the "vehicle decrypts the next hop site based on the context", It is characterized in that The following steps are involved: The first step is to use the vehicle private key skvehicle to decrypt and obtain Kv; The second step is to XOR Kv with the current vehicle context attributes, including timestamp, IDorder, and Location, to obtain the symmetric key K. Step 3: Use K to symmetric-decrypt the encrypted next-hop site CSi+1 to obtain the next-hop site Si+1. In the fourth step, the vehicle sends the estimated arrival time and order number to station Si+1.
Citation Information
Patent Citations
A method for protecting express delivery privacy during the logistics process
CN106453268B
Method for realizing express privacy protection in the logistics process
CN106453268A
Express delivery information protection method
CN110610096A