Logistics privacy protection method based on encrypted two-dimensional code

Through encrypted QR codes based on separable steganography technology, an improved pixel prediction binary image reversible data hiding algorithm is used to divide the QR code into uniform blocks and non-uniform blocks, the embedded location is randomized and multiple keys are used to encrypt it, which solves the problem of internal and external leakage of express delivery orders, realizes permission separation and information protection, and reduces the risk of sensitive information leakage.

CN120509810AActive Publication Date: 2025-08-19XIAN UNIV OF POSTS & TELECOMM
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510392737.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-08-19
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

When facing internal and external leakage problems, the existing express delivery order privacy protection scheme is not thorough and cannot effectively prevent the leakage and abuse of sensitive information.

Method used

Using an encrypted QR code based on separable steganography technology, the QR code is divided into uniform blocks and non-uniform blocks through improved pixel prediction binary image reversible data hiding algorithm, the QR code is divided into uniform blocks and non-uniform blocks, the embedded location is randomized and multiple keys are used for encryption, realizing permission separation and information protection.

Benefits of technology

The separation of permissions between the sender, pickup and courier is achieved, minimizing the risk of leakage of sensitive information, ensuring that information can still be extracted in harsh environments, and improving the security of logistics privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509810A_ABST
    Figure CN120509810A_ABST
Patent Text Reader

Abstract

The invention provides a logistics privacy protection method based on an encrypted two-dimensional code, and relates to the field of logistics privacy protection, the two-dimensional code is divided into a uniform block and a non-uniform block, the characteristic of high embedding capacity of a binary image reversible data hiding algorithm based on pixel prediction is utilized, an image recovery and data extraction separable technology is utilized, and the two-dimensional code is divided into uniform blocks and non-uniform blocks. And the encrypted two-dimensional code cannot be decoded, so that access control of permissions of all parties in logistics privacy protection is completed. On the basis, a plurality of secret keys are introduced to further improve the security of the embedded data. Not only is the problem of internal and external privacy leakage in the current express logistics process solved, but also the anti-fouling capability of the express two-dimensional code in a severe environment can be realized by means of the high error correction capability of the two-dimensional code and the reversibility of the binary image hiding algorithm. According to the method, a separable technology and a stream cipher encryption technology are combined, and logistics privacy protection for preventing internal and external leakage of privacy information is realized mainly based on an improved pixel prediction encrypted binary image reversible data hiding algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of logistics privacy protection, and in particular to a logistics privacy protection method based on encrypted QR codes. Background Art

[0002] With the rise of e-commerce and the increase in global trade, the scale of the express delivery market is also expanding. Compared with offline shopping, the demand for online shopping has increased significantly. Express delivery services provide convenient delivery of goods and documents, greatly facilitating people's lives and work.

[0003] While my country's express delivery market is developing positively, the issue of personal privacy leaks on delivery slips persists. The information stored on delivery slips primarily consists of the consumer's name, phone number, and address. If accessed by unauthorized individuals, these information can lead to significant losses for consumers. For example, unauthorized individuals can recover a user's personal information and access various platforms associated with the user through their phone number. This phenomenon not only exposes users to malicious advertising, harassment, and phone fraud, but also has serious social consequences.

[0004] At present, the research on protecting the privacy of express delivery mainly focuses on two aspects: one is external privacy leakage, including (1) the sender mistakenly fills in sensitive information when filling out the express delivery order; (2) the recipient does not properly handle the express delivery order after receiving the express delivery package, and the information on the express delivery order may be maliciously stolen; (3) the courier is negligent when transporting the express delivery, and the express delivery package information is maliciously stolen by others; the other is internal privacy leakage, including (4) there are malicious couriers who take advantage of their position to deliberately leak express delivery information; (5) the express delivery service company leaks express delivery information due to its own defects or infiltration by hackers, or the express delivery service company itself has such malicious leakage behavior.

[0005] To address these issues, a growing number of logistics privacy protection solutions have emerged in recent years. To address the issue of external privacy leaks involving express parcels, express delivery companies have implemented additional permission requirements for the processing of private information. Only those with the appropriate permissions can access package information, and sensitive information is replaced with an asterisk (*). To address internal privacy leaks, some solutions control the encryption and decryption modules on the user side, while others implement multi-level encryption to prevent internal privacy leaks. However, these solutions lack sufficient protection against both internal and external leaks. Therefore, a logistics privacy protection solution that can address both internal and external leaks is needed.

[0006] Patent number: CN107545390A discloses a method for fusing a binary QR code image with a grayscale image using texture enhancement technology to create a new grayscale image that retains the QR code's functionality. However, the patent does not provide a specific embedding method, but rather proposes a model or solution for applying information hiding to QR codes.

[0007] Patent No.: CN119402601A only discloses a binary image reversible information hiding algorithm. This algorithm is not suitable for processing QR codes and cannot be used in the field of logistics information privacy protection.

[0008] The two aforementioned patents disclose reversible information hiding algorithms for binary images and binary images, but neither mentions the content of embedding and related technologies. Patent No. WO2014075469A1 discloses embedding by inverting multiple low-significant bits of pixels within a segmented image block to generate pixel fluctuations. However, this patent only proposes an idea that can be embedded, and does not specify which technology to use for implementation, how to embed, and the content and method of embedding. This remains a problem that needs to be solved for those skilled in the art. Summary of the Invention

[0009] The present invention aims to provide a logistics privacy protection method based on encrypted QR codes. By introducing encrypted QR codes based on separable steganography, a privacy-preserving waybill is generated, improving the privacy protection mechanism for express delivery orders, ensuring the security of users' personal information, and effectively preventing information leakage and abuse. Furthermore, even in the case of partial damage, user information can still be extracted.

[0010] To achieve the above objectives, the present invention provides a logistics privacy protection method based on encrypted QR codes, comprising the following steps:

[0011] The sender fills in the sender and recipient information on the shipping page to place an order. After receiving the shipping label submitted by the user, the server uses all the information m in the shipping label to generate a QR code Q. The server then extracts the non-sensitive information m0 necessary for the courier to deliver the package from the information m. This information m0 is then embedded into the QR code Q using an improved binary image reversible data hiding algorithm based on pixel prediction to generate a private waybill Q′. The courier is then responsible for posting the private waybill on the package for delivery.

[0012] The generation of the private waybill Q′ involves rearranging and encrypting the middle portion of the QR code using an improved reversible data hiding algorithm for QR codes based on predicted pixels to generate an encrypted QR code. The encrypted QR code consists of a normal portion and an encrypted portion. The improved reversible data hiding algorithm for QR codes based on predicted pixels features improvements such as randomized embedding positions and encrypted images.

[0013] During the transportation and delivery process, a specific program is used to scan the encrypted QR code. The program will identify the encrypted part in the middle of the QR code, use the decryption and extraction algorithm to decrypt the image, and extract the secret information at the same time. If a delivery error occurs at any stage or the user needs to return the item directly, it can be directly traced back to the upper layer information.

[0014] If the encrypted part is partially damaged and the user information cannot be directly extracted, the program restores the original state of the uniform block of the image to restore the entire encrypted QR code, and finally scans the restored QR code to extract the user information;

[0015] After the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code Q r Make a pickup.

[0016] Preferably, the embedding position is randomized, specifically

[0017] Introducing key k a , which determines the predicted pixel position in the uniform block, k a Generate a random sequence r from 0 to 1 and divide r into groups of two, as shown in formula (1):

[0018] r=r1r2r3...r n (1);

[0019] where r i is a two-digit binary number, convert it to decimal, then r i The value range is 0-3, and the predicted pixel position of the i-th uniform block is defined as r i +1, the value of this position remains unchanged to achieve the recovery of the uniform block, and the remaining positions are used to embed information; the first S blocks in the uniform block are selected to embed the Tag value, and the key k is used to restore the image a Determine the predicted pixel bits of the S blocks before the uniform block, and extract the remaining bit information in sequence to obtain the Tag value;

[0020] When restoring the image, first pass k a Determine the predicted pixel position, extract the information of the remaining positions to obtain the type image, restore the original image based on the predicted pixel, and then rearrange the pixel blocks based on the type image to restore the original image;

[0021] In order to improve the security of data, the key k is used d Encrypt data;

[0022] When embedding data in uniform blocks, k a Determine the block prediction pixel position, and embed the encrypted data in the remaining positions in sequence. When extracting data, use k a Determine the block prediction pixel position, extract data from the remaining positions in sequence, and then use the key k dDecrypt the data and finally a Determine the predicted pixel bits and restore the remaining pixel values.

[0023] Preferably, the encrypted image is

[0024] The non-uniform blocks and the whole image are encrypted separately before embedding data in the uniform blocks;

[0025] For non-uniform blocks, the π scrambling algorithm is used to perform block-based permutation, using π -1 Restore the image, where π and π -1 They are inverse substitutions of each other;

[0026] For the whole image, use k i The generated random sequence is encrypted with the processed whole image by stream cipher bitwise XOR to obtain the encrypted image; when restoring the image, use k i The generated random sequence is bitwise XORed with the encrypted image again to obtain the original image.

[0027] Preferably, the specific process of generating a private waybill is as follows: first, extract an image Q0 in the middle of Q for embedding, rearrange Q0 to obtain Q1, and generate a Tag value. Randomly select a π scrambling algorithm to encrypt the non-uniform block in Q1 to obtain Q′1, and then randomly select a key k i Q′1 is encrypted by stream cipher to obtain Q2. Next, a data encryption key k is randomly selected. d Encrypt the information m0 to get m1, and then randomly select a random embedding position key k a , the Tag value and encrypted information m1 are converted according to k a The generated embedding position is used to embed data and obtain the private waybill Q′. The multiple keys generated in the process of generating the private waybill are stored in the server and distributed by the server to the sender user, the recipient user and the courier with corresponding permissions.

[0028] Preferably, the courier uses a specific scanning program to extract the logistics delivery information, the process is as follows:

[0029] The program first obtains the key of the corresponding authority (k a ,k d ), using key k a Extract the encrypted information m′1, and then use the key k d Decrypt m′1 to obtain m′0, which should be consistent with m0. The program displays the logistics information m′0 on the courier's specific scanning machine.

[0030] Preferably, after the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code QR code to rThe specific process for pickup is as follows:

[0031] After the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code Q r Pick up, Q r The key of the corresponding authority (k a ,k i ,π) generates, the specific machine at the pickup point scans the private waybill Q′ on the courier and the pickup QR code Q provided by the pickup user r , the program first starts from Q r Extract three keys respectively, use k a Extract the Tag value from Q′ and then use k i Perform bitwise XOR decryption on Q′, and then use k a , π restores uniform blocks and non-uniform blocks, completes the recovery of the QR code according to the Tag value, and finally the program decodes the recovered QR code and compares the obtained information to complete the retrieval.

[0032] Preferably, the information and keys obtained by the recipient user and the courier during the express delivery, delivery and pickup process are different, specifically

[0033] Through the separable steganography technology, the QR code image recovery and information extraction are separated, and the QR code image recovery key (k a ,k i ,π), assign information extraction key (k a ,k d ); During the logistics transportation process, the courier only has (k a ,k d ), but does not have k i and π, so it is impossible to extract sensitive information by recovering the QR code.

[0034] Therefore, the present invention adopts the above-mentioned logistics privacy protection method based on encrypted QR code, and the technical effects are as follows:

[0035] The use of detachable technology to embed the QR code realizes the separation of permissions between senders, recipients and couriers, minimizes the exposure of sensitive information to couriers, and reduces the risk of sensitive information leakage.

[0036] Use encryption technology to encrypt the QR code to prevent third parties from obtaining any information and minimize the leakage of sensitive information.

[0037] The introduction of keys improves the security of the privacy protection scheme and further reduces the risk of privacy information leakage after malicious attacks.

[0038] The logistics information is generated into a QR code image, and an improved encrypted binary image reversible data hiding algorithm based on pixel prediction is used to divide the QR code into uniform blocks and non-uniform blocks. The uniform blocks are used as embedded data, and the non-uniform blocks are scrambled and encrypted as a whole, thereby achieving the separation of the identities of the sender, the recipient, and the courier, as well as the third party, thereby protecting the privacy information of users in logistics transportation. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is the process of generating type images; Figure 1 (a) is the original image; Figure 1 (b) is the original image block diagram; Figure 1 (c) is Tag; Figure 1 (d) is the type image;

[0040] Figure 2 For embedded type image process; Figure 2 (a) is the rearranged image; Figure 2 (b) is the image after self-embedding; Figure 2 (c) is an embedded type image bit stream;

[0041] Figure 3 Provides an overall framework for privacy protection solutions for logistics systems;

[0042] Figure 4 The image of the encrypted part of the encrypted QR code generated by this solution;

[0043] Figure 5 To extract information process;

[0044] Figure 6 Deface the encrypted portion of the QR code with 20×20 pixels; Figure 6 (a) is the stain at position (8,8); Figure 6 (b) is the stain at position (8,36); Figure 6 (c) is the stain at position (8,64); Figure 6 (d) is the stain at position (8,92); Figure 6 (e) is the stain at position (36,8); Figure 6 (f) is the stain at position (36,36); Figure 6 (g) is the stain at position (36,64); Figure 6 (h) is the stain at position (36,92); Figure 6 (i) is the stain at position (64,8); Figure 6 (j) is the stain at position (64,36); Figure 6 (k) is the stain at position (64,64); Figure 6 (l) is the stain at position (64,92); Figure 6 (m) is the stain at position (92,8); Figure 6 (n) is the stain at position (92,36); Figure 6 (o) is the stain at position (92,64); Figure 6 (p) is the stain at position (92,92);

[0045] Figure 7 The encrypted portion of the QR code is defaced incrementally, row by row, by 120×6 pixels. Figure 7 (a) One line of defacement; Figure 7 (b) 2 lines of defacement; Figure 7 (c) 3 lines of defacement; Figure 7 (d) 4 lines of defacement; Figure 7 (e) 5 lines of defacement; Figure 7 (f) 6 lines of defacement; Figure 7 (g) 7 lines of defacement; Figure 7 (h) is 8 lines of defacement; Figure 7 (i) 9 lines of defacement; Figure 7 (j) 10 lines of defacement; Figure 7 (k) is 11 lines of defacement; Figure 7 (l) 12 lines of defacement; Figure 7 (m) is defaced with 13 lines; Figure 7 (n) is 14 lines of defacement; Figure 7 (o) is 15 lines of defacement; Figure 7 (p) is 16 lines of defacement. DETAILED DESCRIPTION

[0046] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0047] Unless otherwise defined, technical or scientific terms used in the present invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.

[0048] Example 1

[0049] A logistics privacy protection method based on encrypted QR codes includes the following steps:

[0050] The sender user fills in the sender and recipient information on the shipping page to place an order. After the server receives the shipping label submitted by the user, it uses all the information m in the shipping label to generate a QR code Q, extracts the non-sensitive information m0 necessary for the courier to deliver the package from the information m, and uses an improved binary image reversible data hiding algorithm based on pixel prediction to embed the information m0 into the QR code Q to generate a private waybill Q′. The courier is responsible for posting the private waybill on the courier for express delivery.

[0051] The generation of the private waybill Q′ involves rearranging and encrypting the middle portion of the QR code using an improved reversible data hiding algorithm for QR codes based on predicted pixels to generate an encrypted QR code. The encrypted QR code consists of a normal portion and an encrypted portion. The improved reversible data hiding algorithm for QR codes based on predicted pixels features improvements such as randomized embedding positions and encrypted images.

[0052] The embedding position is randomized, specifically

[0053] Introducing key k a , which determines the predicted pixel position in the uniform block, k a Generate a random sequence r from 0 to 1 and divide r into groups of two, as shown in formula (1):

[0054] r=r1r2r3...r n (1);

[0055] where r i is a two-digit binary number, convert it to decimal, then r i The value range is 0-3, and the predicted pixel position of the i-th uniform block is defined as r i +1, the value of this position remains unchanged to achieve the recovery of the uniform block, and the remaining positions are used to embed information; the first S blocks in the uniform block are selected to embed the Tag value, and the key k can be used to restore the image a Determine the predicted pixel bits of the S blocks before the uniform block, and extract the remaining bit information in sequence to obtain the Tag value;

[0056] When restoring the image, first pass k a Determine the predicted pixel position, extract the information of the remaining positions to obtain the type image, restore the original image based on the predicted pixel, and then rearrange the pixel blocks based on the type image to restore the original image;

[0057] In order to improve the security of data, the key k is used d Encrypt data;

[0058] When embedding data in uniform blocks, k a Determine the block prediction pixel position, and embed the encrypted data in the remaining positions in sequence. When extracting data, use k a Determine the block prediction pixel position, extract data from the remaining positions in sequence, and then use the key k d Decrypt the data and finally a Determine the predicted pixel bits and restore the remaining pixel values.

[0059] Encrypted image, specifically

[0060] The non-uniform blocks and the whole image are encrypted separately before embedding data in the uniform blocks;

[0061] For non-uniform blocks, the π scrambling algorithm is used to perform block-based permutation, using π -1 Restore the image, where π and π -1 They are inverse substitutions of each other;

[0062] For the whole image, use k i The generated random sequence is encrypted with the processed whole image by stream cipher bitwise XOR to obtain the encrypted image; when restoring the image, use k i The generated random sequence is bitwise XORed with the encrypted image again to obtain the original image.

[0063] The specific process of generating a private waybill is as follows: first, extract an image Q0 from the middle of Q for embedding, rearrange Q0 to obtain Q1, and generate a tag value. Randomly select a π scrambling algorithm to encrypt the non-uniform block in Q1 to obtain Q′1, and then randomly select a key k i Q′1 is encrypted by stream cipher to obtain Q2. Next, a data encryption key k is randomly selected. d Encrypt the information m0 to get m1, and then randomly select a random embedding position key k a , the Tag value and encrypted information m1 are converted according to k a The generated embedding position is used to embed data and obtain the private waybill Q′. The multiple keys generated in the process of generating the private waybill are stored in the server and distributed by the server to the sender user, the recipient user and the courier with corresponding permissions.

[0064] During the transportation and delivery process, a specific program is used to scan the encrypted QR code. The program will identify the encrypted part in the middle of the QR code, use the decryption and extraction algorithm to decrypt the image, and extract the secret information at the same time. If a delivery error occurs at any stage or the user needs to return the item directly, it can be directly traced back to the upper layer information.

[0065] The courier uses a specific scanning program to extract logistics delivery information. The process is as follows:

[0066] The program first obtains the key of the corresponding authority (k a ,k d ), using key k a Extract the encrypted information m′1, and then use the key k d Decrypt m′1 to obtain m′0, which should be consistent with m0. The program displays the logistics information m′0 on the courier's specific scanning machine.

[0067] If the encrypted part is partially damaged and the user information cannot be directly extracted, the program restores the original state of the image uniform block, thereby restoring the entire encrypted QR code, and finally scans the restored QR code to extract the user information.

[0068] During the express delivery, delivery and pickup process, the information and keys obtained by the recipient and the courier are different.

[0069] Through the separable steganography technology, the QR code image recovery and information extraction are separated, and the QR code image recovery key (k a ,k i ,π), assign information extraction key (k a ,k d ); During the logistics transportation process, the courier only has (k a ,k d ), but does not have k i and π, so it is impossible to extract sensitive information by recovering the QR code.

[0070] After the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code Q r The specific process for pickup is as follows:

[0071] After the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code Q r Pick up, Q r The key of the corresponding authority (k a ,k i ,π) generates, the specific machine at the pickup point scans the private waybill Q′ on the courier and the pickup QR code Q provided by the pickup user r , the program first starts from Q r Extract three keys respectively, use k a Extract the Tag value from Q′ and then use k i Perform bitwise XOR decryption on Q′, and then use k a , π restores uniform blocks and non-uniform blocks, completes the recovery of the QR code according to the Tag value, and finally the program decodes the recovered QR code and compares the obtained information to complete the retrieval.

[0072] Example 2

[0073] This example uses 50 different express delivery label information to generate corresponding 50 QR codes, all in version 12, with high error correction capabilities. The size is 365×365 pixels, with the encrypted portion being 120×120 pixels. This solution primarily demonstrates the physical robustness of the encrypted QR code by examining three aspects: small-scale defacement of the encrypted QR code, large-scale defacement of the encrypted QR code, and a comparison between the encrypted QR code and the original QR code under large-scale defacement.

[0074] (1) Extracting information from small-scale defacement

[0075] Figure 6The image shows 16 locations where the encrypted part is slightly defaced, with the defacement unit being 20×20 pixels.

[0076] The number of information that can be directly extracted from each position in the 50 images is recorded as dn1, and the proportion is recorded as pdn1. The number of information that can be extracted from the QR code is recorded as in1, and the proportion is recorded as pin1. The results are shown in Table 1.

[0077] Table 1 shows that while information cannot be directly extracted from positions 5, 6, 7, and 8, it can be extracted from the QR code by restoring the image. While information cannot be extracted from the QR code by restoring the image at positions 1, 2, 3, and 4, it can be directly extracted from the encrypted portion. Therefore, even with minor defacement, the private waybill can fully extract user information.

[0078] Table 1 Small area defacement extraction information

[0079] Location dn1 pdn1 in1 pin1 1 50 100% 25 50% 2 50 100% 19 38% 3 50 100% 14 28% 4 50 100% 24 48% 5 0 0% 50 100% 6 0 0% 50 100% 7 0 0% 50 100% 8 0 0% 50 100% 9 50 100% 50 100% 10 50 100% 50 100% 11 50 100% 50 100% 12 50 100% 50 100% 13 50 100% 50 100% 14 50 100% 50 100% 15 50 100% 50 100% 16 50 100% 50 100%

[0080] (2) Extracting information from large-scale defacement

[0081] Figure 7 The image shows what happens if a large area of defacement occurs on the encrypted part, with 16 different locations of defacement increasing row by row, each 120×6 pixels long, from bottom to top.

[0082] The number of information that can be directly extracted from each position in the 50 images is recorded as dn2, and the proportion is recorded as pdn2. The number of information that can be extracted from the QR code is recorded as in2, and the proportion is recorded as pin2, as shown in Table 2.

[0083] As can be seen from Table 2, when the defacement increases to 10 lines, although it is impossible to directly obtain information from the encrypted part, it is possible to extract information from the QR code by restoring the image. Only when the defacement is very severe will part of the image information be unable to be extracted.

[0084] (3) Comparison between the encrypted QR code and the original QR code under extensive defacement

[0085] To further demonstrate the physical robustness of the encrypted QR code proposed in this scheme, the original QR code was subjected to the same small and large-scale defacement operations. Because QR codes have inherent error correction capabilities, the robustness difference between the original and encrypted QR codes under small-scale defacement is negligible and is therefore not considered. Table 3 compares the scan results of the restored images of the original and encrypted QR codes under large-scale defacement.

[0086] As can be seen from Table 3, when the defacement increases to 10 lines, image information cannot be extracted. When the defacement increases to 11 to 14 lines, the ability to extract image information from the encrypted QR code is significantly better than that of the original QR code, indicating that this scheme can provide higher damage resistance in harsh environments.

[0087] Table 2 Large-scale defacement extraction information

[0088]

[0089]

[0090] Table 3 Comparison of image information extraction between large-scale defaced encrypted QR codes and original QR codes

[0091] Location Image restoration Original lossless 1 50 50 2 50 50 3 50 50 4 50 50 5 50 50 6 50 50 7 50 50 8 50 50 9 50 50 10 50 43 11 48 25 12 28 16 13 22 0 14 4 0 15 1 0 16 1 0

[0092] Therefore, the present invention adopts the above-mentioned logistics privacy protection method based on encrypted QR code, generates QR code image from logistics information, uses improved encrypted binary image reversible data hiding algorithm based on pixel prediction, divides the QR code into uniform blocks and non-uniform blocks, uses uniform blocks as embedded data, scrambles non-uniform blocks, and encrypts the whole, thereby realizing the identity separation of sender, recipient, courier and third party, thereby protecting the privacy information of users in logistics transportation.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A logistics privacy protection method based on encrypted QR code, characterized in that: The following steps are involved: The sender fills in the sender and recipient information on the shipping page to place an order. After receiving the shipping label submitted by the user, the server uses all the information m in the shipping label to generate a QR code Q. The server then extracts the non-sensitive information m0 necessary for the courier to deliver the package from the information m. This information m0 is then embedded into the QR code Q using an improved binary image reversible data hiding algorithm based on pixel prediction to generate a private waybill Q′. The courier is then responsible for posting the private waybill on the package for delivery. The generation of the private waybill Q′ involves rearranging and encrypting the middle part of the QR code using an improved reversible data hiding algorithm for QR codes based on predicted pixels to generate an encrypted QR code. The encrypted QR code consists of a normal part and an encrypted part. The improvements of the improved reversible data hiding algorithm for QR codes based on predicted pixels include randomization of embedding positions and encrypted images; During the transportation and delivery process, a specific program is used to scan the encrypted QR code. The program will identify the encrypted part in the middle of the QR code, use the decryption and extraction algorithm to decrypt the image, and extract the secret information at the same time. If a delivery error occurs at any stage or the user needs to return the item directly, it can be directly traced back to the upper layer information. If the encrypted part is partially damaged and the user information cannot be directly extracted, the program restores the original state of the uniform block of the image to restore the entire encrypted QR code, and finally scans the restored QR code to extract the user information; After the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code Q r Make a pickup.

2. A logistics privacy protection method based on encrypted QR code according to claim 1, characterized in that: The embedding position is randomized, specifically: Introducing key k a , which determines the predicted pixel position in the uniform block, k a Generate a random sequence r from 0 to 1 and divide r into groups of two, as shown in formula (1): r=r1r2r3...r n (1); where r i is a two-digit binary number, convert it to decimal, then r i The value range is 0-3, and the predicted pixel position of the i-th uniform block is defined as r i +1, the value of this position remains unchanged to achieve the recovery of the uniform block, and the remaining positions are used to embed information; the first S blocks in the uniform block are selected to embed the Tag value, and the key k is used to restore the image a Determine the predicted pixel bits of the S blocks before the uniform block, and extract the remaining bit information in sequence to obtain the Tag value; When restoring the image, first pass k a Determine the predicted pixel position, extract the information of the remaining positions to obtain the type image, restore the original image based on the predicted pixel, and then rearrange the pixel blocks based on the type image to restore the original image; In order to improve the security of data, the key k is used d Encrypt data; When embedding data in uniform blocks, k a Determine the block prediction pixel position, and embed the encrypted data in the remaining positions in sequence. When extracting data, use k a Determine the block prediction pixel position, extract data from the remaining positions in sequence, and then use the key k d Decrypt the data and finally a Determine the predicted pixel bits and restore the remaining pixel values.

3. The logistics privacy protection method based on encrypted QR code according to claim 1 is characterized in that: Encrypted image, specifically: The non-uniform blocks and the whole image are encrypted separately before embedding data in the uniform blocks; For non-uniform blocks, the π scrambling algorithm is used to perform block-based permutation, using π -1 Recover the image, where π and π -1 They are inverse substitutions of each other; For the whole image, use k i The generated random sequence is encrypted with the processed whole image by stream cipher bitwise XOR to obtain the encrypted image; when restoring the image, use k i The generated random sequence is bitwise XORed with the encrypted image again to obtain the original image.

4. The logistics privacy protection method based on encrypted QR code according to claim 1 is characterized in that: The specific process of generating a private waybill is as follows: first, extract an image Q0 from the middle of Q for embedding, rearrange Q0 to get Q1, generate a tag value, randomly select a π scrambling algorithm to encrypt the non-uniform block in Q1 to get Q′1, and then randomly select a key k i Encrypt Q′1 with a stream cipher to obtain Q2; then, randomly select a data encryption key k d Encrypt the information m0 to get m1, and then randomly select a random embedding position key k a , the Tag value and encrypted information m1 are converted according to k a The generated embedding position is used to embed data and obtain the private waybill Q′. The multiple keys generated in the process of generating the private waybill are stored in the server and distributed by the server to the sender user, the recipient user and the courier with corresponding permissions.

5. The logistics privacy protection method based on encrypted QR code according to claim 1 is characterized in that: The courier uses a specific scanning program to extract logistics delivery information. The process is as follows: The program first obtains the key of the corresponding authority (k a ,k d ), using the key k a Extract the encrypted information m′1, and then use the key k d Decrypt m′1 to obtain m′0, which should be consistent with m0. The program displays the logistics information m′0 on the courier's specific scanning machine.

6. The logistics privacy protection method based on encrypted QR code according to claim 1 is characterized in that: After the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code Q r The specific process for pickup is as follows: After the express arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code Q r Pick up, Q r The key of the corresponding authority (k a ,k i ,π) generates, the specific machine at the pickup point scans the private waybill Q′ on the courier and the pickup QR code Q provided by the pickup user r , the program first starts from Q r Extract three keys respectively, use k a Extract the Tag value from Q′ and then use k i Perform bitwise XOR decryption on Q′, and then use k a , π restores uniform blocks and non-uniform blocks, completes the recovery of the QR code according to the Tag value, and finally the program decodes the recovered QR code and compares the obtained information to complete the retrieval.

7. The logistics privacy protection method based on encrypted QR code according to claim 1 is characterized in that: During the express delivery, delivery and pickup process, the information and keys obtained by the recipient and the courier are different. Through the separable steganography technology, the QR code image recovery and information extraction are separated, and the QR code image recovery key (k a ,k i ,π), assign information extraction key (k a ,k d ); During the logistics transportation process, the courier only has (k a ,k d ), but does not have k i and π, so it is impossible to extract sensitive information by recovering the QR code.

Citation Information

Patent Citations

  • Information hiding method and device and logistics realization method, device and system

    CN107545390A

  • Method and device for information hiding

    WO2014075469A1

  • Logistics personal information privacy protection system based on multilayer-encrypted two-dimensional code

    CN104933371A

  • Privacy protection express delivery and pickup system and method based on intelligent contract

    CN111080185A

  • Reversible data hiding method for binary image

    CN119402601A