Dynamic red envelope grouping and packaging method based on object code positioning
By introducing a dynamic grouping and packaging method using a first-order grouping code, a last-order grouping code, and a positioning code into the red envelope packaging system, the problems of printing errors and manual sorting mismatches in traditional red envelope packaging are solved. This enables real-time grouping and accurate loading of red envelope codes, improving production efficiency and product integrity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional red envelope packaging systems suffer from high printing error rates, low efficiency, and manual sorting mismatches, leading to the scrapping and mixing of entire batches of products. Furthermore, pre-generated red envelope groups are prone to omissions and incorrect packaging.
A dynamic red envelope grouping and packaging method based on object code positioning is adopted. By setting the first and last group codes on the outside of the large packaging bag and the positioning code on the outside of the small packaging bag, the grouping and assembly can be realized in real time using barcode scanning equipment. The back-end system establishes the correspondence between the positioning code and the red envelope code, thus optimizing the production process.
This effectively avoids the scrapping of entire product sets due to printing errors and human error, ensures accurate grouping and loading of red envelope codes, reduces the risk of batch scrapping, and improves production efficiency and accuracy.
Smart Images

Figure CN121639271A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of QR code encapsulation technology, and in particular to a dynamic red envelope grouping and encapsulation method based on object code positioning. Background Technology
[0002] Traditional red envelope packaging systems require pre-generating red envelope codes in batches and printing them inside small packaging bags. However, the process of placing the red envelope codes into the small packaging bags often relies on manual packaging, which can easily cause the following problems: 1) High printing error rate: If the red envelope code is printed incorrectly (such as blurry characters or misaligned positions), the entire batch of packaging must be scrapped, resulting in high costs.
[0003] 2) Inefficient: In large-scale sorting scenarios, manual sorting is time-consuming and prone to mismatch due to fatigue, resulting in the mixing of red envelope codes in the original fixed batches, causing multiple sets of red envelopes to be scrapped.
[0004] During the process of packing and sealing small packages into large packages, workers are prone to making mistakes and confusing red envelopes from different groups because the red envelopes are pre-generated (the amount of the red envelope is fixed and the group it belongs to is fixed). Summary of the Invention
[0005] The purpose of this invention is to provide a dynamic red envelope grouping and packaging method based on object code positioning. By triggering real-time packaging through scanning the code, it avoids waste caused by printing errors before packaging and eliminates pre-generation dependencies. By triggering real-time packaging through scanning the code, it avoids mismatches in the grouping and assembly of QR codes by humans and the problem of missing items in packaging, and increases the fault tolerance mechanism.
[0006] To achieve the above objectives, this invention provides a dynamic red envelope grouping and encapsulation method based on object code positioning, comprising the following steps: S1. Generate several paired ordinary codes, which are defined as red envelope codes and location codes respectively; S2. Generate two paired special codes, which are defined as the first block code and the last block code, respectively. S3. When packaging products, place the first and last group codes on the front and back of the large packaging bag respectively, and place the red envelope code and the product inside the small packaging bag and the positioning code on the outside of the small packaging bag. S4. When staff use a barcode scanner to scan the first group code affixed to the large packaging bag, the back-end system enters group mode; during the scanning process, the system back-end displays the filling progress; S5. The back-end system enters group mode. Staff use a barcode scanner to scan any number of positioning codes affixed to the outside of small packaging bags and place these small packaging bags into the large packaging bag in sequence. S6. After scanning and bagging are completed, scan the final grouping code affixed to the outside of the large packaging bag. The background system will group the large packaging bag and the "agreed number" of small packaging bags inside it into a group and exit the grouping mode. S7. After receiving the packaged product, the user can only see the first and last group codes. After scanning the codes with a mobile phone, the user will receive a message that there is a red envelope inside. S8. When the user opens the outer packaging bag, they can see a “pre-agreed number” of small packaging bags with a location code attached. After scanning the code, they will receive a message that “the red envelope is in the inner bag”. S9. When the packaging attached to the location code is torn open, the product is in use. At this time, the packaged product can be used, and a red envelope reward can be obtained by scanning the red envelope code inside with a mobile phone. S10. In the location code generation stage, the background securely establishes the correspondence between the outer packaging location code and the inner bag red envelope code through a key, while optimizing performance issues in mass production. S11. In the scanning and bagging process, the back-end system guides the operator to use a single barcode scanner to perform alternating scanning in a logical cycle of "scanning the first group code once - continuously scanning the positioning codes on all small packaging bags in the large box - scanning the last group code".
[0007] Preferably, in S1 and S2, the ordinary code and the special code are unique within the same type of product, and the first and last group codes on the large packaging bag, as well as the red envelope code inside the small packaging bag and the positioning code on the outside of the small packaging bag, are strings and the corresponding QR codes.
[0008] Preferably, in S1 and S2, the ordinary code and the special code are represented in the data background as strings combining numbers, letters and symbols.
[0009] Preferably, in S4, the scanning device includes a scanning platform and a barcode scanner, which are devices that need to be connected to a backend system and have continuous and rapid scanning capabilities.
[0010] Preferably, in S4, the grouping mode is that the system backend locates the grouped red envelope codes by scanning the code sequence relationship with the group code as the beginning and end, and regroups the generated red envelope codes, location codes and group codes.
[0011] Preferably, in S6, the "agreed number" is the number of red envelopes per product determined by the manufacturer according to the needs of the marketing activity.
[0012] Preferably, in S4, the grouping is a process of rearranging and combining these generated red envelope codes, location codes, and group codes according to the operation order of the staff.
[0013] Preferably, in S10, the key is a technique to prevent unrelated personnel from deducing the red envelope ID through the location code.
[0014] Preferably, in S10, the correspondence is a strict one-to-one correspondence and strict matching between the external positioning code and the internal red envelope code.
[0015] Compared with existing technologies, this invention has the following advantages and technical effects: By setting a first group code and a last group code on the outside of the large packaging bag, real-time grouping of products can be achieved during the production and packaging process, effectively avoiding the problem of scrapping the entire group of products due to printing errors or manual packaging mistakes; a strict correspondence is established between the positioning code on the outside of the small packaging bag and the internal red envelope code, forming a systematic constraint on the packaging process and eliminating the situation of missing items when pre-generated red envelope codes are put into the products; the linkage between the group code and the positioning code simplifies the process of grouping red envelope codes into bags, avoiding the inability of traditional pre-generated red envelope codes to be grouped in real time, reducing the risk of batch scrapping caused by printing errors and manual operation errors; the background establishes a connection between the positioning code and the red envelope code through a security key, preventing unauthorized personnel from deducing the red envelope code through the positioning code.
[0016] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the operations performed by staff during the implementation of an embodiment of the present invention. Figure 2 This is an overall flowchart of an embodiment of the present invention; Figure 3 This is a front view of the large packaging bag according to an embodiment of the present invention, where 1 represents the first group code; Figure 4 This is a schematic diagram of the back of the large packaging bag according to an embodiment of the present invention; 2 represents the closing group code. Figure 5 This is a schematic diagram of a small packaging bag according to an embodiment of the present invention, wherein a is a cross-sectional view of the small packaging bag after it is torn open, b is a view of the cover of the small packaging bag; 3 is the red envelope code, and 4 is the positioning code. Detailed Implementation
[0018] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0019] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0020] Example 1 This invention provides a dynamic red envelope grouping and encapsulation method based on object code positioning, the process of which is as follows: Figure 2 As shown, Figure 1 This is a flowchart of the operation process for staff implementing this invention. Taking 28 red envelope codes as a group as an example, when staff are packaging on the assembly line, they are equipped with a barcode scanner / barcode gun and a desktop computer that needs to log in to the backend management system using a dedicated factory account. The process includes the following steps: S1. Generate several paired ordinary codes, defined as a red envelope code and a location code respectively; the location code is affixed to the outside of the small packaging bag, and the red envelope code is affixed to the inside of the small packaging bag, such as... Figure 5 As shown.
[0021] This embodiment generates a UUID based on a random algorithm as the unique identifier for the red envelope, and uses it as a parameter to construct the mini-program URL, and then generates a QR code. The QR code records the red envelope information and can be scanned by WeChat to open and jump to the mini-program.
[0022] S2. Generate two paired special codes, defined as the first block code (e.g., ...). Figure 3 (as shown) and the closing block code (such as) Figure 4(As shown). This embodiment generates a UUID as a unique identifier for the package based on a random algorithm. It then calls a core encryption algorithm to perform protocol-level compression encoding on the batch identity identifier and function indicator, generating a byte array that can identify the original package. Using the AES-GCM encryption mechanism, encryption is performed based on a 12-byte true random initialization vector (IV) and a 128-bit authentication tag. The IV is prepended to the ciphertext to form the authentication message body. An improved Z85 encoder performs 85-ary character conversion on the message body, ultimately generating the function ciphertext string. This process is repeated twice, and then QR code encoding is used to generate a first and last block code. These two block codes record the package identifier and are confidential; only those with the key can decode them to obtain the package UUID they point to.
[0023] In S1 and S2, the ordinary code and the special code are unique within the same type of product. The first and last group codes on the large packaging bag, as well as the red envelope code inside the small packaging bag and the positioning code on the outside of the small packaging bag, are strings and the corresponding QR codes. The ordinary code and the special code are represented by strings combining numbers, letters and symbols in the data background.
[0024] S3. When packaging products, place the first and last group codes on the front and back of the large packaging bag respectively, and place the red envelope code and the product inside the small packaging bag and the positioning code on the outside of the small packaging bag. S4. When staff use a barcode scanner to scan the first group code affixed to the large packaging bag, the backend system enters grouping mode. The scanning device includes a scanning platform and a barcode scanner, both of which need to be connected to the backend system and have continuous, rapid scanning capabilities. In grouping mode, the system backend locates the grouped red envelope codes based on the scanning sequence, starting with the group code and ending with it. It then regroups the generated red envelope codes, location codes, and group codes. Grouping is the process of rearranging and combining these generated red envelope codes, location codes, and group codes according to the staff's operating sequence. During the scanning process, the system backend displays the filling progress.
[0025] S5. The back-end system enters group mode. Staff use a barcode scanner to scan any number of positioning codes affixed to the outside of the small packaging bags and place these small packaging bags into the large packaging bag in sequence until the filling progress is 28 / 28.
[0026] S6. After scanning and bagging, scan the final grouping code affixed to the outside of the large packaging bag. The back-end system will group the large packaging bag and the "agreed number" of small packaging bags inside it into one group and exit the grouping mode. The "agreed number" is the number of red envelopes per product set by the manufacturer according to the marketing activity requirements.
[0027] S7. After receiving the packaged product, the user can only see the first and last group codes. After scanning the codes with a mobile phone, the user will receive a message that there is a red envelope inside. S8. When the user opens the outer packaging bag, they can see a “pre-agreed number” of small packaging bags with a location code attached. After scanning the code, they will receive a message that “the red envelope is in the inner bag”. S9. When the packaging attached to the location code is torn open, the product is in use. At this time, the packaged product can be used, and a red envelope reward can be obtained by scanning the red envelope code inside with a mobile phone. S10. In the location code generation stage, the backend securely establishes the correspondence between the outer packaging location code and the inner bag red envelope code using a key, while optimizing performance issues in mass production. The key is a technology to prevent unauthorized personnel from deducing the red envelope ID from the location code. The correspondence is a strict one-to-one matching between the external location code and the internal red envelope code.
[0028] S11. In the scanning and bagging process, the back-end system guides the operator to use a single barcode scanner to perform alternating scanning in a logical cycle of "scanning the first group code once - continuously scanning the positioning codes on all small packaging bags in the large box - scanning the last group code".
[0029] Therefore, this invention adopts the above-mentioned dynamic red envelope grouping and packaging method based on object code positioning. By setting the first and last grouping codes on the outside of the large packaging bag, real-time grouping of products can be achieved during the production and packaging process, effectively avoiding the problem of scrapping the entire group of products due to printing errors or manual packaging mistakes. The positioning code on the outside of the small packaging bag establishes a strict correspondence with the internal red envelope code, forming a systematic constraint on the packaging process and eliminating the situation of missing pre-generated red envelope codes when they are put into the product. The linkage between the grouping code and the positioning code simplifies the process of grouping red envelope codes into bags, avoiding the inability of traditional pre-generated red envelope codes to be grouped in real time, reducing the risk of batch scrapping caused by printing errors and manual operation errors. The background establishes a connection between the positioning code and the red envelope code through a security key, preventing unauthorized personnel from deducing the red envelope code through the positioning code.
[0030] 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 dynamic red packet grouping and packaging method based on object positioning, characterized in that: The method comprises the following steps: S1, generating several paired common codes, which are defined as red envelope codes and positioning codes respectively; S2, generating two paired special codes, which are defined as the first grouping code and the last grouping code respectively; S3, when packaging the product, the first grouping code and the last grouping code are respectively placed on the front and back of the large packaging bag, the red envelope code is placed in the small packaging bag, and the positioning code is placed outside the small packaging bag; S4, when the staff scans the first grouping code attached to the large packaging bag using the code scanning device, the background system enters the grouping mode; during the scanning process, the system background displays the filling progress; S5, the background system enters the grouping mode, the staff scans any number of positioning codes attached to the small packaging bag outside using the code scanning device, and then puts the small packaging bags into the large packaging bag in sequence; S6, after the scanning and bagging are completed, the last grouping code attached to the large packaging bag outside is scanned, and the background system groups the large packaging bag and the "agreed number" of small packaging bags in it as a group and exits the grouping mode; S7, after the user gets the packaged product, only the first grouping code and the last grouping code can be seen, and the mobile phone will give a prompt of "there is a red envelope inside" after scanning the code; S8, after the user opens the outer packaging bag, the "agreed number" of small packaging bags with the positioning code attached outside can be seen, and a prompt of "the red envelope is in the inner bag" will be given after scanning the code; S9, when the packaging attached with the positioning code is torn open, the product is in a used state, at this time, the packaged product can be used, and a red envelope reward can be obtained by scanning the red envelope code inside the mobile phone; S10, in the positioning code generation link, the background system securely establishes the corresponding relationship between the outer packaging positioning code and the inner bag red envelope code through the key, and optimizes the performance in mass production; S11, in the scanning and bagging link, the background system guides the operator to use a single code scanning gun to scan in a logical cycle of "scanning the first grouping code once - continuously scanning the positioning codes on all small packaging bags in the large box - scanning the last grouping code".
2. The dynamic red packet grouping and packaging method based on object positioning according to claim 1, characterized in that, In S1 and S2, the common codes and special codes have uniqueness in the same type of product, the first grouping code and the last grouping code on the large packaging bag and the red envelope code inside the small packaging bag and the positioning code outside the small packaging bag are strings, and the strings correspond to two-dimensional codes.
3. The dynamic red packet grouping and packaging method based on object positioning according to claim 2, characterized in that, In S1 and S2, the common codes and special codes are represented by strings of numbers, letters and symbols in combination in the data background.
4. The dynamic red packet grouping and packaging method based on object positioning according to claim 1, characterized in that, In S4, the code scanning device includes a code scanning platform and a code scanning gun, and other devices with continuous and fast code scanning function that need to be connected to the background system.
5. The dynamic red packet grouping and packaging method based on object positioning according to claim 1, characterized in that, In S4, the grouping mode is that the system background groups the red envelope codes by taking the grouping codes as the beginning and end through the time sequence relationship of the scanning, and re-groups the generated red envelope codes, positioning codes and grouping codes.
6. The dynamic red packet grouping and packaging method based on object positioning according to claim 1, characterized in that, In S6, the "agreed number" is the number of red envelopes under each product according to the marketing activity demand of the manufacturer.
7. The dynamic red packet grouping and packaging method based on object positioning according to claim 1, characterized in that, In S4, the grouping is a process of rearranging and combining the generated red envelope codes, positioning codes and grouping codes according to the operation sequence of the staff.
8. The dynamic red packet grouping and packaging method based on object positioning according to claim 1, characterized in that, In S10, the key is a technology to prevent non-related personnel from deducing the red envelope ID through the positioning code. In S11, the single code scanning gun is a device that can be connected to the background system and can continuously and quickly scan the code.
9. The dynamic red packet grouping and packaging method based on object positioning according to claim 1, characterized in that, In S10, the correspondence is a strict one-to-one correspondence between the external positioning code and the internal red envelope code.