A logistics privacy protection method based on encrypted two-dimensional code

By embedding and encrypting express delivery slip information using encrypted QR codes based on separable steganography technology, the problem of express delivery slip information leakage is solved, access control and information security are achieved, and the risk of sensitive information leakage is reduced.

CN120509810BActive Publication Date: 2026-02-03XIAN UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies have problems with internal and external leakage in protecting the privacy information of express delivery slips. Existing solutions are not thorough enough in protecting against internal and external leakage and cannot effectively prevent information leakage and misuse.

Method used

An encrypted QR code based on separable steganography technology is used. By using an improved pixel-predictive reversible data hiding algorithm for QR codes, non-sensitive information is embedded in the QR code to generate an encrypted QR code. Encryption and decryption are performed using a key, thereby achieving separation of permissions and ensuring the security of information during transportation.

Benefits of technology

It separates the permissions of senders, recipients, and couriers, minimizing the risk of sensitive information leakage, improving information security and resistance to damage, and preventing third parties from obtaining information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509810B_ABST
    Figure CN120509810B_ABST
Patent Text Reader

Abstract

The application provides a logistics privacy protection method based on encrypted two-dimensional codes, relates to the field of logistics privacy protection, divides two-dimensional codes into uniform blocks and non-uniform blocks, utilizes the characteristics of high embedding capacity of a binary image reversible data hiding algorithm based on pixel prediction, image recovery and data extraction separable technology, and the non-decodable of encrypted two-dimensional codes, and completes access control of the access rights of each party in logistics privacy protection. On this basis, multiple keys are further introduced to improve the security of embedded data. Not only the internal and external privacy leakage problems existing in the current express logistics process are solved, but also the anti-pollution ability of express two-dimensional codes in harsh environments is realized by virtue of the high error correction ability of two-dimensional codes and the reversibility of binary image hiding algorithm. The application combines separable technology and stream cipher encryption technology, is mainly based on an improved pixel prediction encrypted binary image reversible data hiding algorithm, and realizes logistics privacy protection for preventing internal and external leakage of privacy information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[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] Although my country's express delivery market is developing in a positive direction, the problem of leaked personal privacy information on delivery slips persists. The information stored on delivery slips mostly includes consumers' names, phone numbers, and addresses. If this information falls into the wrong hands, it can cause losses to consumers. For example, unauthorized individuals can recover a user's personal information and access various platforms linked to the user's phone number. This phenomenon not only leads to users receiving malicious advertising, harassment, and telephone fraud, but also has very serious social consequences.

[0004] Currently, research on protecting the privacy of express delivery companies mainly focuses on two aspects: First, external privacy leaks, including (1) senders accidentally filling in sensitive information when filling out express delivery orders; (2) recipients not properly handling express delivery orders after receiving the packages, and the information on the express delivery orders may be maliciously stolen; (3) express delivery personnel being negligent in transporting packages, and the information on the packages being maliciously stolen by others; Second, internal privacy leaks, including (4) malicious express delivery personnel deliberately leaking express delivery information by taking advantage of their positions; (5) express delivery companies leaking express delivery information due to their own defects or being penetrated by hackers, or the express delivery companies themselves engaging in such malicious leaking behavior.

[0005] In response to the aforementioned issues, an increasing number of solutions for protecting logistics privacy have emerged in recent years. Faced with the problem of external privacy leaks in express delivery packages, courier service companies have imposed additional access requirements on the privacy information displayed on packages. Only those with the appropriate permissions can access the package information, and sensitive information is marked with "..." "Instead of..." Regarding the issue of internal privacy leaks, some solutions control the encryption / decryption module on the user end, while others employ multi-level encryption to prevent such leaks. However, these solutions are not sufficiently robust in protecting against both internal and external leaks. Therefore, a logistics privacy protection solution capable of addressing both internal and external leaks is needed.

[0006] Patent number CN107545390A discloses a method for fusing a binary image QR code and a grayscale image using texture enhancement technology to obtain a new grayscale image that retains the QR code function. However, this patent does not provide a specific embedding method; it mainly proposes a mode or scheme 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 QR code processing and therefore cannot be used in the field of logistics information privacy protection.

[0008] The two patents mentioned above disclose binary images and reversible information hiding algorithms for binary images, but neither mentions the embedding content or related technologies. Patent No.: WO2014075469A1 discloses embedding by inverting multiple least significant bits of pixels within a segmented image block to generate pixel fluctuations. However, this patent only proposes an idea for embedding, without specifying which technology to use, how to embed, or the content and method of embedding. This remains a problem for those skilled in the art to solve. Summary of the Invention

[0009] The purpose of this invention is to provide a logistics privacy protection method based on encrypted QR codes. By introducing encrypted QR code technology based on separable steganography, a privacy-protecting waybill is generated, improving the privacy protection mechanism of the waybill, ensuring the security of users' personal information, and effectively preventing information leakage and misuse. Furthermore, user information can still be extracted even in cases of partial damage.

[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 places an order by filling in the sender and recipient information on the shipping page. After receiving the shipping label submitted by the user, the server uses all the information in the shipping label. Generate QR code From information Extracting non-sensitive information necessary for courier delivery. An improved pixel-prediction-based reversible data hiding algorithm for QR codes is used to hide non-sensitive information. Embedded into QR code Generate privacy shipping labels The courier is responsible for delivering the privacy-protected waybill. It is affixed to the courier service for delivery;

[0012] Privacy shipping label The generation includes generating QR codes. The middle part uses an improved pixel-based reversible data hiding algorithm for QR codes to rearrange and encrypt, generating an encrypted QR code. The encrypted QR code includes a normal part and an encrypted part. The improvements of the improved pixel-based reversible data hiding algorithm for QR codes include randomization of the embedding position and encryption of the image.

[0013] During transportation and delivery, 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 decryption and extraction algorithms to decrypt the image, and extract the secret information. If a delivery error occurs at any stage or the user needs to return the item directly, the information can be traced back to the upper level.

[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 blocks of the image, thereby restoring the entire encrypted QR code. Finally, the restored QR code is scanned to extract the user information.

[0015] After the package arrives at the nearest pickup point to the recipient's address, the recipient can use the pickup QR code. Pick up the item.

[0016] Preferably, the embedding position is randomized, specifically as follows:

[0017] Introducing a key This determines the predicted pixel position within the uniform block. Generate a random sequence of 0-1 ,Will Divide into groups of two, as shown in formula (1):

[0018] (1);

[0019] in If it is a two-digit binary number, convert it to decimal. The value of is in the range of 0-3, and the predicted pixel position of the i-th uniform block is defined as . This position value remains unchanged to achieve the recovery of the uniform block, while the remaining positions are used to embed information; select the first position in the uniform block. S Each block embeds a Tag value, which is used to recover the image via a key. Before determining the uniform block S The predicted pixel bits of each block are extracted sequentially to obtain the Tag value. Then, the pixel blocks are restored based on the predicted pixel bits of each block. Finally, the pixel blocks are rearranged according to the image type to restore the original image.

[0020] To improve data security, a key is used. For non-sensitive information Encrypt;

[0021] Embedding non-sensitive information in uniform blocks At that time, through The predicted pixel position of the block is determined, and encrypted data is embedded sequentially at the remaining positions to extract non-sensitive information. Time through The predicted pixel position of the block is determined, and the encrypted data is extracted sequentially from the remaining positions, then the key is used. Decrypt the encrypted data, and finally... Determine the predicted pixel values ​​of the block to recover the values ​​of the remaining pixels.

[0022] Preferably, the encrypted image is as follows:

[0023] Encrypt the non-uniform blocks and the overall image separately before embedding data into the uniform blocks;

[0024] For non-uniform blocks, use The scrambling algorithm performs permutations on a block-by-block basis, using... Restore the image, where and They are inverse permutations;

[0025] For the overall image, use The generated random sequence is XORed with the processed overall image using a stream cipher to obtain an encrypted image; when recovering the image, use... The generated random sequence is XORed with the encrypted image again to obtain the original image.

[0026] Preferably, generate privacy waybills. The specific process is as follows: First, extract the QR code. Image of the middle region Used as an embedding for images Image rearrangement is performed to obtain Generate a Tag value. Randomly select one. Scrambling algorithm pairs Encrypting non-uniform blocks in the data to obtain Then a key is randomly selected. right Stream cipher encryption is performed to obtain Next, a data encryption key is randomly selected. For non-sensitive information Encryption obtained Then randomly select a random embedding location key. , tag value and encrypted information according to Non-sensitive information generated from the embedded location Embedded, obtaining private waybills Generate privacy shipping label The multiple keys generated during the process are stored on the server and distributed by the server to sender users, recipient users, and couriers with the corresponding permissions.

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

[0028] The program first obtains the key for the corresponding permissions from the server. , ), using a key Extract encrypted information Then use the key right Decryption ,at this time echo Consistent, the program will transfer logistics information It is displayed on the courier's specific scanning machine.

[0029] Preferably, after the package arrives at the pickup point closest to the recipient's address, the recipient can use the pickup QR code. The specific process for picking up the package is as follows:

[0030] After the package arrives at the nearest pickup point to the recipient's address, the recipient can use the pickup QR code. Pick up the package. By the key with the corresponding permissions ( , , Generates a private waybill on the package by scanning it with a specific machine at the pickup point. The pickup QR code provided by the pickup user The program first starts from Extract three keys from each, and use them. from Extract the Tag value from it, and then use it. right Perform bitwise XOR decryption, then use... , The program recovers both uniform and non-uniform blocks, restores the QR code based on the tag value, decodes the restored QR code, and compares the obtained information to complete the item retrieval.

[0031] Preferably, the information and keys obtained by the recipient and the courier are different during the express delivery, delivery, and pickup processes. Specifically:

[0032] By using separable steganography, the QR code image recovery and information extraction are separated, and a QR code image recovery key is assigned to the recipient. , , ), assign information retrieval keys to delivery personnel ( , During the logistics and transportation process, the courier only possesses ( , ), but not owned and Therefore, it is impossible to extract sensitive information by restoring the QR code.

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

[0034] By embedding QR codes using separable technology, the permissions of senders, recipients, and couriers are separated, minimizing the exposure of sensitive information to couriers and reducing the risk of sensitive information leakage.

[0035] Encryption technology is used to encrypt the QR code, preventing third parties from obtaining any information and minimizing the leakage of sensitive information.

[0036] Introducing keys enhances the security of privacy protection schemes and further reduces the risk of privacy information leakage after malicious attacks.

[0037] Logistics information is generated into a QR code image. An improved pixel-prediction-based encrypted binary image reversible data hiding algorithm is used to segment the QR code into uniform and non-uniform blocks. The uniform blocks are used to embed data, the non-uniform blocks are scrambled, and the whole code is encrypted. This achieves the separation of the identities of the sender, recipient, courier, and third party, thereby protecting the privacy information of users in logistics transportation. Attached Figure Description

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

[0039] Figure 2 For embedding type image processes; Figure 2 (a) is the rearranged image; Figure 2 (b) is the self-embedded image; Figure 2 (c) is an embedded type image bitstream;

[0040] Figure 3 This outlines the overall framework for a privacy protection solution for logistics systems.

[0041] Figure 4 The image of the encrypted portion of the encrypted QR code generated by this scheme;

[0042] Figure 5 For the process of extracting information;

[0043] Figure 6 The 20×20 pixel section of the encrypted part of the QR code is obscured. Figure 6 (a) shows the soiling at position (8,8); Figure 6 (b) shows the soiling at location (8,36); Figure 6 (c) indicates soiling at location (8,64); Figure 6 (d) indicates soiling at location (8,92); Figure 6 (e) indicates soiling at location (36,8); Figure 6 (f) indicates soiling at position (36,36); Figure 6 (g) represents the contamination at location (36, 64); Figure 6 (h) represents the soiling at position (36, 92); Figure 6 (i) indicates soiling at location (64,8); Figure 6 (j) represents the soiling at position (64,36); Figure 6 (k) represents the contamination at position (64,64); Figure 6 (l) indicates soiling at location (64, 92); Figure 6 (m) represents the soiling at position (92,8); Figure 6 (n) represents the soiling at position (92, 36); Figure 6 (o) indicates soiling at position (92, 64); Figure 6 (p) represents the soiling at position (92,92);

[0044] Figure 7 The 120×6 pixel encrypted portion of the QR code is progressively smudged line by line; Figure 7 (a) is one line of dirt; Figure 7 (b) Two rows of soiling; Figure 7 (c) represents 3 lines of soiling; Figure 7 (d) represents 4 lines of soiling; Figure 7 (e) represents 5 lines of soiling; Figure 7 (f) represents 6 lines of soiling; Figure 7 (g) represents 7 lines of soiling; Figure 7 (h) represents 8 lines of soiling; Figure 7 (i) 9 rows are soiled; Figure 7 (j) represents 10 lines of soiling; Figure 7 (k) represents 11 rows of soiling; Figure 7 (l) represents 12 lines of soiling; Figure 7 (m) represents 13 rows of soiling; Figure 7 (n) represents 14 lines of soiling; Figure 7 (o) indicates 15 lines of soiling; Figure 7 (p) represents 16 lines of contamination. Detailed Implementation

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

[0046] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0047] Example 1

[0048] like Figure 3 As shown, a logistics privacy protection method based on encrypted QR codes includes the following steps:

[0049] The sender places an order by filling in the sender and recipient information on the shipping page. After receiving the shipping label submitted by the user, the server uses all the information in the shipping label. Generate QR code From information Extracting non-sensitive information necessary for courier delivery. An improved pixel-prediction-based reversible data hiding algorithm for QR codes is used to hide non-sensitive information. Embedded into QR code Generate privacy shipping labels The courier is responsible for delivering the privacy-protected waybill. It is posted on the courier for delivery.

[0050] Privacy shipping label The generation includes generating QR codes. The middle part uses an improved pixel-based reversible data hiding algorithm to rearrange and encrypt the QR code, generating an encrypted QR code. The encrypted QR code includes a normal part and an encrypted part, such as... Figure 4 As shown; the improvements of the improved QR code reversible data hiding algorithm based on predicted pixels include embedding position randomization and image encryption;

[0051] Embedding position randomization, specifically

[0052] Introducing a key This determines the predicted pixel position within the uniform block. Generate a random sequence of 0-1 ,Will Divide into groups of two, as shown in formula (1):

[0053] (1);

[0054] in If it is a two-digit binary number, convert it to decimal. The value range of is 0-3, and the first is defined as . iThe predicted pixel position of each uniform block is This position value remains unchanged to achieve the recovery of the uniform block, while the remaining positions are used to embed information; select the first position in the uniform block. S Each block embeds a Tag value, which can be used to recover the image via a key. Before determining the uniform block S The predicted pixel bits of each block are extracted sequentially to obtain the Tag value. Then, the pixel blocks are restored based on the predicted pixel bits of each block, and the pixel blocks are rearranged based on the Tag value to restore the original image.

[0055] To improve data security, a key is used. For non-sensitive information Encrypt;

[0056] Embedding non-sensitive information in uniform blocks At that time, through The predicted pixel position of the block is determined, and encrypted data is embedded sequentially at the remaining positions to extract non-sensitive information. Time through The predicted pixel position of the block is determined, and the encrypted data is extracted sequentially from the remaining positions, then the key is used. Decrypt the encrypted data, and finally... Determine the predicted pixel values ​​of the block to recover the values ​​of the remaining pixels.

[0057] Encrypted images, specifically

[0058] Encrypt the non-uniform blocks and the overall image separately before embedding data into the uniform blocks;

[0059] For non-uniform blocks, use The scrambling algorithm performs permutations on a block-by-block basis, using... Restore the image, where and They are inverse permutations;

[0060] For the overall image, use The generated random sequence is XORed with the processed overall image using a stream cipher to obtain an encrypted image; when recovering the image, use... The generated random sequence is XORed with the encrypted image again to obtain the original image.

[0061] Generate privacy shipping label The specific process is as follows: First, extract the QR code. Image of the middle region Used as an embedding for images Image rearrangement is performed to obtain Generate Tag values, such as Figure 1 As shown. Randomly select one. Scrambling algorithm pairs Encrypting non-uniform blocks in the data to obtain Then a key is randomly selected. right Stream cipher encryption is performed to obtain Next, a non-sensitive piece of information is randomly selected. Encryption Key For non-sensitive information Encryption obtained Then randomly select a random embedding location key. , tag value and encrypted information according to Data is embedded at the generated embedding locations, such as... Figure 2 As shown, a privacy shipping label was obtained. Generate privacy shipping label The multiple keys generated during the process are stored on the server and distributed by the server to sender users, recipient users, and couriers with the corresponding permissions.

[0062] During transportation and delivery, 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 decryption and extraction algorithms to decrypt the image, and extract the secret information. If a delivery error occurs at any stage or the user needs to return the item directly, the information can be traced back to the upper level.

[0063] The courier uses a specific scanning program to extract logistics delivery information, as follows:

[0064] The program first obtains the key for the corresponding permissions from the server. , ), using a key Extract encrypted information Then use the key right Decryption ,at this time echo Consistent, the program will transfer logistics information It is displayed on the courier's specific scanning machine.

[0065] If the encrypted part is partially damaged and the user information cannot be directly extracted, the program restores the original state of the uniformly distributed image blocks, thereby restoring the entire encrypted QR code. Finally, the restored QR code is scanned to extract the user information.

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

[0067] By using separable steganography, the QR code image recovery and information extraction are separated, and a QR code image recovery key is assigned to the recipient. , , ), assign information retrieval keys to delivery personnel ( , During the logistics and transportation process, the courier only possesses ( , ), but not owned and Therefore, it is impossible to extract sensitive information by restoring the QR code.

[0068] After the package arrives at the nearest pickup point to the recipient's address, the recipient can use the pickup QR code. The specific process for picking up the package is as follows:

[0069] like Figure 5 As shown, after the package arrives at the nearest pickup point to the recipient's address, the recipient can use the pickup QR code. Pick up the package. By the key with the corresponding permissions ( , , Generates a private waybill on the package by scanning it with a specific machine at the pickup point. The pickup QR code provided by the pickup user The program first starts from Extract three keys from each, and use them. from Extract the Tag value from it, and then use it. right Perform bitwise XOR decryption, then use... , The program recovers both uniform and non-uniform blocks, restores the QR code based on the tag value, decodes the restored QR code, and compares the obtained information to complete the item retrieval.

[0070] Example 2

[0071] This embodiment uses 50 different express delivery waybill information entries to generate 50 corresponding QR codes, all of which are version 12 and have high error correction capabilities. The size is 365×365 pixels, with the central encrypted portion being 120×120 pixels. This solution mainly demonstrates the physical robustness of the encrypted QR code from three aspects: small-area damage, large-area damage, and a comparison between the encrypted QR code and the original QR code under large-area damage.

[0072] (1) Extracting information from small-scale soiling

[0073] Figure 6It shows 16 locations where the encrypted part is slightly smudged, with the smudge unit being 20×20 pixels.

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

[0075] As shown in Table 1, although 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 from parts of the image at positions 1, 2, 3, and 4, information can be directly extracted from the encrypted portion. Therefore, even with minor damage, user information can be fully extracted from the privacy-protected waybill.

[0076] Table 1 Information on Small-Scale Soil Removal

[0077]

[0078] (2) Extracting information from large-scale soiling

[0079] Figure 7 It demonstrates 16 possible locations where, if a large area of ​​the encrypted part is damaged, the damage increases by 120×6 pixels row by row from bottom to top.

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

[0081] As shown in Table 2, when the damage increases to 10 rows, although information cannot be directly obtained from the encrypted part, it can be extracted from the QR code by restoring the image. Only when the damage is very severe will some image information be unable to be extracted.

[0082] (3) Comparison of encrypted QR codes and original QR codes under extensive damage

[0083] 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-scale and large-scale defacement operations. Since QR codes have built-in error correction capabilities, the robustness difference between the original and encrypted QR codes under small-scale defacement is negligible and is not considered. Table 3 compares the image recovery results of the original and encrypted QR codes under large-scale defacement.

[0084] As shown in Table 3, when the damage increased to 10 rows, the image information could not be extracted. For damage rows 11 to 14, the encrypted QR code image information extraction capability was significantly better than the original QR code, indicating that this solution can provide higher resistance to damage in harsh environments.

[0085] Table 2. Information Extracted from Large-Scale Contamination

[0086]

[0087] Table 3 Comparison of image information extraction between heavily soiled encrypted QR codes and original QR codes.

[0088]

[0089] Therefore, the present invention adopts the above-mentioned logistics privacy protection method based on encrypted QR codes, generates a QR code image from logistics information, and uses an improved encrypted binary image reversible data hiding algorithm based on pixel prediction to divide the QR code into uniform blocks and non-uniform blocks. The uniform blocks are used as embedded data, the non-uniform blocks are scrambled, and the whole is encrypted, thereby realizing the separation of the identities of senders, recipients, couriers and third parties, thus protecting the privacy information of users in logistics transportation.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions 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 codes, characterized in that, Includes the following steps: The sender places an order by filling in the sender and recipient information on the shipping page. After receiving the shipping label submitted by the user, the server uses all the information in the shipping label. Generate QR code From information Extracting non-sensitive information necessary for courier delivery. An improved pixel-prediction-based reversible data hiding algorithm for QR codes is used to hide non-sensitive information. Embedded into QR code Generate privacy shipping labels The courier is responsible for delivering the privacy-protected waybill. It is affixed to the courier service for delivery; Privacy shipping label The generation includes generating QR codes. The middle part uses an improved pixel-based reversible data hiding algorithm for QR codes to rearrange and encrypt to generate an encrypted QR code, which includes a normal part and an encrypted part. The improvements of the improved pixel-based reversible data hiding algorithm for QR codes include randomization of the embedding position and encryption of the image. Embedding position randomization, specifically: Introducing a key This determines the predicted pixel position within the uniform block. Generate a random sequence of 0-1 ,Will Divide into groups of two, as shown in formula (1): (1); in If it is a two-digit binary number, convert it to decimal. The value range of is 0-3, and the first is defined as . i The predicted pixel position of each uniform block is This position value remains unchanged to achieve the recovery of the uniform block, while the remaining positions are used to embed information; select the first position in the uniform block. S Each block embeds a Tag value, which is used to recover the image via a key. Before determining the uniform block S The predicted pixel bits of each block are extracted sequentially to obtain the Tag value. Then, the original image is restored based on the predicted pixels. Finally, the pixel blocks are rearranged based on the Tag value to restore the original image. In a binary image, a pixel value is either black or white. If the size of the original image is... Divide the original image into segments of size 1. The pixels are then divided into blocks, and these blocks are marked. If a pixel block has all black or all white pixels, it is called a uniform block. Marked as 1; if a pixel block has both black and white pixel values, it is called a non-uniform block. Marked as 0; To improve data security, a key is used. For non-sensitive information Encrypt; Embedding non-sensitive information in uniform blocks At that time, through The predicted pixel position of the block is determined, and encrypted data is embedded sequentially at the remaining positions to extract non-sensitive information. Time through The predicted pixel position of the block is determined, and non-sensitive information is extracted from the remaining positions in sequence. Then use the key For non-sensitive information Decryption is performed, and finally based on Determine the predicted pixel values ​​of the block to recover the values ​​of the remaining pixels; Generate privacy shipping label The specific process is as follows: First, extract the QR code. Image of the middle region Used as an embedding for images Image rearrangement is performed to obtain Generate a Tag value and randomly select one. Scrambling algorithm pairs Encrypting the non-uniform blocks in the middle to obtain Then a key is randomly selected. right Stream cipher encryption is performed to obtain Next, randomly select a non-sensitive piece of information. Encryption Key For non-sensitive information Encryption obtained Then randomly select a random embedding location key. , tag value and encrypted information according to Non-sensitive information generated from the embedded location Embedded, obtaining private waybills Generate privacy shipping label The multiple keys generated during the process are stored on the server and distributed by the server to sender users, recipient users, and couriers with the corresponding permissions; During transportation and delivery, 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 decryption and extraction algorithms to decrypt the image, and extract the secret information. If a delivery error occurs at any stage or the user needs to return the item directly, the information can be traced back to the upper level. If the encrypted portion is partially damaged and user information cannot be directly extracted, the program restores the original state of the uniformly distributed image blocks, thereby recovering the entire encrypted QR code. Finally, the recovered QR code is scanned. Extract user information; After the package arrives at the nearest pickup point to the recipient's address, the recipient can use the pickup QR code. Pick up the item.

2. The logistics privacy protection method based on encrypted QR codes according to claim 1, characterized in that, Encrypted images, specifically: Encrypt the non-uniform blocks and the overall image separately before embedding data into the uniform blocks; For non-uniform blocks, use The scrambling algorithm performs permutations on a block-by-block basis, using... Restore the image, where and They are inverse permutations; For the overall image, use The generated random sequence is XORed with the processed overall image using a stream cipher to obtain an encrypted image; when recovering the image, use... The generated random sequence is XORed with the encrypted image again to obtain the original image.

3. The logistics privacy protection method based on encrypted QR codes according to claim 1, characterized in that, The courier uses a specific scanning program to extract logistics delivery information, as follows: The program first obtains the key for the corresponding permissions from the server. , ), using a key Extract encrypted information Then use the key right Decryption ,at this time echo Consistent, the program will transfer logistics information It is displayed on the courier's specific scanning machine.

4. The logistics privacy protection method based on encrypted QR codes according to claim 1, characterized in that, After the package arrives at the nearest pickup point to the recipient's address, the recipient can use the pickup QR code. The specific process for picking up the package is as follows: After the package arrives at the nearest pickup point to the recipient's address, the recipient can use the pickup QR code. Pick up the package. By the key with the corresponding permissions ( , , Generates a private waybill on the package by scanning it with a specific machine at the pickup point. The pickup QR code provided by the pickup user The program first starts from Extract three keys from each, and use them. from Extract the Tag value from it, and then use it. right Perform bitwise XOR decryption, then use... , Restore uniform and non-uniform blocks, and complete the QR code based on the tag value. The recovery process involves the program decoding the recovered QR code. The obtained information is compared to complete the pickup.

5. A logistics privacy protection method based on encrypted QR codes according to claim 1, characterized in that, During the express delivery, delivery, and pickup processes, the information and keys obtained by the recipient and the courier are different, specifically: By using separable steganography, the QR code image recovery and information extraction are separated, and a QR code image recovery key is assigned to the recipient. , , ), assign information retrieval keys to delivery personnel ( , During the logistics and transportation process, the courier only possesses ( , ), but not owned and Therefore, it is impossible to recover the QR code. Extract sensitive information.

Citation Information

Patent Citations

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

    CN107545390A

  • Reversible data hiding method for binary image

    CN119402601A

  • Method and device for information hiding

    WO2014075469A1