A method for using a QR code for multiple purposes
By dividing the QR code into substrings A and B and recording the intersection for blocking, the problems of easy leakage of the QR code and the inconvenience of information addition caused by scratch-off blocking are solved. Information verification and entry in different application scenarios are realized, simplifying the system complexity.
Patent Information
- Application Number
- CN202510563428.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-04-30
AI Technical Summary
In the prior art, the plain code of a QR code is easily leaked, and the scratch-off silver shielding is not conducive to adding information, which increases the complexity of the system.
The data encoding and check code encoding method is used to divide the QR code into two substrings A and B. The intersection part is recorded during the encoding process, and the blocked part is recorded when drawing the QR code graphic. The output scratch-off silver blocked part is smaller than the part that needs to be blocked, and the non-blocked part information is parsed by combining the code scanning recognition method.
It realizes the multi-purpose use of one code without changing the QR coding specifications. It is widely used in product anti-counterfeiting and anti-channeling, logistics and sales promotion, ensuring that information is not leaked and facilitating information entry, thereby improving the simplicity of the system.
Smart Images

Figure CN120430331B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of two-dimensional code applications, and in particular to a method for using a QR two-dimensional code for multiple purposes. Background Art
[0002] The QR code is a matrix-based QR code invented in 1994 by Denso Wave, a subsidiary of Toyota. With the rapid adoption of smart devices, the application of QR codes has flourished across many industries and fields. Examples include company QR code logos, personal QR code business cards, product identification, product anti-counterfeiting and anti-channeling, and product marketing.
[0003] QR codes have many applications in the commodity market. They serve as product identifiers, carry anti-counterfeiting and anti-channeling information, and are often used as unique identifiers for marketing purposes. In practice, these codes are typically used in two ways: plain code and scratch-off silver masking. Plain code leaves the QR code's information completely exposed, without any covering. Scratch-off silver masking completely or partially obscures the QR code. Plain code data is completely unprotected, allowing the data contained within the QR code to be easily copied. Scratch-off silver masking effectively protects the QR code's information, but it has limitations in terms of adding information to the QR code. For example, scratch-off silver masking is used for product anti-counterfeiting. Manufacturers cover the QR code on the product, but without destroying the scratch-off silver, downstream distributors cannot use this QR code to enter inventory information into relevant systems. This requires additional identification for information entry. Existing technologies use both a one-dimensional barcode and a scratch-off silver masking QR code, or a plain code and a scratch-off silver masking QR code simultaneously for product identification and anti-counterfeiting. This requires that the identification code and the scratch-off silver shield have a relevant correspondence, which increases the complexity of the system.
[0004] There is an urgent need for a new coding method that can solve the above problems. Summary of the Invention
[0005] The present invention proposes a method for using a QR code for multiple purposes, which solves the problem in the prior art that the plain code of a QR code is easily leaked and the scratching silver is blocked, which is not conducive to adding information.
[0006] The present invention discloses a method for using a QR code for multiple purposes, including a coding method for determining an obscured portion of a QR code; and a code scanning and recognition method for identifying a QR code with an obscured portion.
[0007] The coding method includes: (1) data coding: setting a string S, dividing it into two substrings A and substring B; and performing data coding on the string S, first coding the substring A part and storing it as Ae, when the coding of A is completed, coding the substring B and storing it as Be, if the coding results of A and B intersect during the coding process, the intersection is stored in Ae; (2) check code coding: in the process of (1) data coding, the check code coding is performed at the same time; the check code coding of substring A is stored as Ai, and the check code coding of substring B is stored as Bi; if the encoding results of A and B intersect during the encoding process, the intersection is stored in Ai; (3) Draw the QR code graphic: the data of the string S is drawn in the QR code graphic. When drawing the Be part, the graphic area of the Be part is recorded as Pbe; when drawing the Bi part, the graphic area of the Bi part is recorded as Pbi; (4) Output the QR code graphic: while outputting the QR code graphic, output two scratch-off silver shielding parts; the scratch-off silver shielding part is smaller than the part that needs to be shielded; the part that needs to be shielded includes anti-counterfeiting and anti-channeling information and lottery information.
[0008] A further technical solution is provided, wherein the code scanning and recognition method: (a) inputs a QR code image with an obscured portion; the QR code image with an obscured portion is generated by the code scanning and recognition method for a QR code with an obscured portion; (b) a conventional algorithm parses the QR code image: conventional parsing is performed according to the format of the QR code: a data encoding portion and a check code portion are obtained; the data encoding portion and the check code portion are decoded and parsed to obtain a character string, and characters that cannot be parsed are skipped until the parsing is completed, and a character string that can be parsed is output, i.e., information on the non-scratch-off silver obscured portion; (c) a terminal scans the QR code: according to the purpose, the complete QR code character string is parsed by installing a scanning gun, scanner, or smart phone with a code scanning algorithm.
[0009] A further technical solution is that the QR code image is an anti-counterfeiting and anti-channeling QR code; the anti-counterfeiting and anti-channeling QR code includes domain name information, unique code information, and unique code secret code information; the unique code information and unique code secret code information are scratch-off silver covering parts.
[0010] A further technical solution is that the anti-counterfeiting and anti-channelling QR code is associated with the product, the product QR code is generated by a coding method, and the QR code data of the non-scratch-off silver-shielded part is generated; the anti-counterfeiting and anti-channelling information of the associated product is entered as the part that needs to be blocked, and the manufacturer and distributor enter the information in sequence as the unique identification of the product, and the entered information is recorded in a remote database; the entered information is the association information of the domain name information and the unique code information; consumers obtain the anti-counterfeiting and anti-channelling data through the anti-counterfeiting and anti-channelling QR code.
[0011] Another technical solution is that the QR code image is a lottery promotion QR code; the lottery promotion QR code includes domain name information, unique code information, and associated information of unique code and secret code information; the associated information of the unique code and secret code information is a scratch-off silver covering part.
[0012] A further technical solution is that the lottery promotion QR code is associated with the product, the product QR code is generated by a coding method, and the QR code data of the non-scratch-off part is generated; the lottery promotion information of the associated product is entered as the part that needs to be blocked, and the associated information of the information entered by the promoter is used as the unique identifier of the product; the entered information is the unique secret code information; the consumer obtains the lottery promotion number information through the lottery promotion QR code.
[0013] Beneficial effects of the present invention:
[0014] 1. This invention addresses the issues of traditional QR codes being easily leaked and obstructed by scratches, which hinder information addition. By covering part of the data area and checksum area of the QR code image, partial data is hidden; an algorithm is used to decode the uncovered portion. This achieves multiple uses for one code without changing the QR code specification, and has a wide range of applications, with important application value in areas such as product anti-counterfeiting and anti-channeling, logistics, and sales promotion.
[0015] 2. By using a partially masked QR code, information verification and entry can be completed in different application scenarios while ensuring that the QR code information is not leaked;
[0016] 3. The data encoding of the present invention is used to store the specific information carried by the QR code; the check code data is used to detect whether there are errors in the generation, transmission or reading process of the QR code to ensure the accuracy of the data; BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 : QR code schematic diagram;
[0019] Figure 2 : Schematic diagram of QR code scratch-off silver covering;
[0020] Figure 3 : A QR code anti-counterfeiting and anti-channeling application system diagram;
[0021] Figure 4 : A diagram of a QR code promotion lottery application system. DETAILED DESCRIPTION
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0023] Combine Figure 1 and Figure 2 It can be seen that a QR code with multiple uses is used to assign a code, and the blocked part in the QR code is determined. The coding method includes: (1) data encoding: set a string S, which is divided into two substrings A and B; and perform data encoding on the string S, first encode the substring A part and save it as Ae, when the encoding of A is completed, encode the substring B and save it as Be, if the encoding results of A and B intersect during the encoding process, the intersection is stored in Ae; (2) check code encoding: in the process of (1) data encoding, the check code encoding is performed at the same time; the check code encoding of substring A is stored as Ai, and the check code encoding of substring B is stored as Bi; if the encoding results of A and B intersect during the encoding process, the intersection is stored in Ai; (3) drawing the QR code graphic: the data of the string S is drawn in the QR code graphic, when drawing the Be part, the graphic area of the Be part is recorded as Pbe; when drawing the Bi part, the graphic area of the Bi part is recorded as Pbi; the graphic area corresponding to Pbe and the graphic area corresponding to Pbi are the blocked parts; such as Figure 1 As shown in the QR code diagram, the drawing of the QR code graphics follows the drawing principle of the QR code. The content part follows the principle of drawing the data encoding part first, and then drawing the check code part, and drawing from the lower right to the top. When the graphics of this part are drawn, according to the string sequence and the corresponding check code, the part that needs to be blocked and the part that does not need to be blocked can be output; (4) Outputting the QR code graphics: When outputting the QR code graphics, two scratch-off silver blocking parts are output; the scratch-off silver blocking part is smaller than the part that needs to be blocked; the part that needs to be blocked includes anti-counterfeiting and anti-channeling information and lottery information.
[0024] The code scanning and recognition method includes the following steps: (a) Inputting a QR code image with an obscured portion; the QR code image with an obscured portion is generated by the code scanning and recognition method for QR codes with obscured portions; (b) Parsing the QR code image using a conventional algorithm: Conventional parsing is performed according to the QR code format to obtain a data encoding portion and a checksum portion; decoding the data encoding portion and the checksum portion to parse out a character string, skipping unparseable characters until parsing is complete, and outputting a character string that can be parsed, i.e., the information about the non-scratch-off obscured portion; For the obscured portion, the recognition dot matrix is non-blank filled (typically black in a QR code); during decoding, this portion will have a parsing error. Since the data encoding portion and checksum portion of the non-obscured portion are intact, they can be correctly and completely recognized. In other words, the obscured QR code is recognized as an overall error, but the non-obscured portion of the QR code can be obtained; (c) Scanning the QR code with a terminal: Depending on the application, the complete QR code string can be parsed using a scanner, scanner, or smartphone equipped with a code scanning algorithm. Specific implementation method 1
[0026] From the diagram, we can see that the QR code image is an anti-counterfeiting and anti-channeling QR code, including domain name information, unique code information, and unique code password information; the unique code information and unique code information are the scratch-off silver covered parts; for example: the QR code string is: http: / / www.jixiangma.net / 123456 / abcdef; among them, http: / / www.jixiangma.net is the domain name part, 123456 is the unique code, and abcdef is the unique code password.
[0027] The anti-counterfeiting and anti-channelling QR code is associated with the product, and the product QR code is generated through the coding method, and the non-scratch-off blocking part of the QR code data is generated; the anti-counterfeiting and anti-channelling information of the associated product is entered as the part that needs to be blocked. Specifically, the string of the product QR code is divided into two parts, A and B: Part A is the non-blocked part, and Part B is the blocked part; the input information is entered into the server, and the A string is used as the index to enter the related information such as the manufacturer or distributor; the A+B string is used as the index to enter its related information; the process of retrieving information is: the A string retrieves the data corresponding to A from the server; the A+B string retrieves the data corresponding to A+B from the server.
[0028] The manufacturer, distributor and other information are sequentially entered into the server, and this information serves as the unique identifier of the product; the manufacturer, distributor and other information entered are domain name information and unique code information; consumers obtain anti-counterfeiting and anti-channeling data through the anti-counterfeiting and anti-channeling QR code;
[0029] The process of entering and verifying anti-counterfeiting and anti-channeling information is as follows: after purchasing the product, the consumer scratches off the covered part of the QR code and uses the complete QR code to obtain the product's anti-counterfeiting and anti-channeling information.
[0030] In batch QR code generation, the string length is the same, the substring segmentation is the same, the pattern size is the same as the QR code generation algorithm, so the occluded part is consistent. In large-scale generation and printing, the area of the occluded part only needs to be determined once.
[0031] For example, during the coding process for a cosmetic product, the information carried in the QR code is split into multiple parts: The QR code contains a fixed link to the brand's official website; variable product details such as the batch, production date, expiration date, and ingredient list, forming substring A, such as "http: / / www.beautybrand.com." Two scratch-off silver masking sections are generated, containing the manufacturer and distributor information entered as substring B, along with a corresponding verification code. The manufacturer scans the cosmetic's anti-counterfeiting and anti-tampering QR code image, verifies the QR code identifier, and then enters the cosmetic's shipping location and production anti-counterfeiting information as the masked sections, masking them with a scratch-off silver mask. Upon receiving the cosmetic product, the distributor also scans the anti-counterfeiting and anti-tampering QR code image, verifies the QR code identifier, and enters the distributor's information as the masked sections. Substring B and its verification code are then masked with a scratch-off silver mask.
[0032] When consumers first scan the QR code, they only receive a link to the brand's official website. Upon entering the website, they can browse the brand's story, its various products, and complete product details, making it easier to understand the specific attributes of the product. After scratching the scratch-off card, consumers can scan it again to obtain complete manufacturer and distributor information, completing the anti-counterfeiting and traceability of the cosmetics.
[0033] When suppliers assign a code to each product during the production process, they record production information, such as the source of raw materials, production process, and workshop, and associate this information with the A substring of the QR code. If a product quality issue arises, by scanning the QR code, suppliers can quickly trace the product's production source, identify the problem, and take timely corrective measures to ensure product quality and safety.
[0034] Suppliers can also scan QR codes to obtain information about the flow of goods through each link of the supply chain, including transportation tracks and inventory status. For example, if a supplier learns that a certain batch of goods in a certain store is running out of stock, they can prepare to replenish the stock in advance, improving supply chain collaboration efficiency, reducing inventory costs, and ensuring a stable supply of goods.
[0035] During daily inventory and restocking, store staff use a scanner to scan product QR codes. Even without scratching off the card, they can still obtain basic product information, such as the product code and category. By connecting to the backend inventory management system, the system automatically records information such as the product's inventory quantity and in / out time, enabling real-time inventory monitoring and facilitating timely restocking to prevent stockouts.
[0036] Merchants can analyze sales data by collecting data on consumer QR code scanning behavior, such as scan time, number of scans, and participation in marketing campaigns. For example, they can analyze the scanning popularity of different products during different time periods to understand consumer purchasing preferences and demand trends, providing data support for product display adjustments and promotional planning. If a particular cosmetic product is found to have a high number of scans between 7 and 9 p.m. and a high conversion rate for participating in promotional campaigns, merchants can increase promotional efforts for that product during that time or offer exclusive discounts. Specific implementation method 2
[0038] Combine Figure 4 Another technical solution involves a QR code image that is a promotional lottery QR code. The QR code includes domain information, unique code information, and unique code secret information; the unique secret information is the scratch-off silver covered portion. The promotional lottery QR code is associated with a product, and a coding method is used to generate a product QR code, along with QR code data for the non-scratch-off silver covered portion. The promotional lottery information for the associated product is entered as the covered portion, and the promoter enters information as the product's unique identifier. The entered information is the unique secret information; consumers access the promotional lottery QR code to obtain the promotional lottery number information.
[0039] The raffle promotion QR code is associated with the promotional product, and the product QR code is generated through the coding method, and the non-scratch-off silver-shielded part is generated as the A string and the corresponding verification code part; the promoter enters the promoter management system and enters the raffle promotion number information as the B string and the corresponding verification code part by scanning.
[0040] Consumers scan the QR code for the first time to obtain basic information about the product; after scratching the scratch-off card, they can scan it again to obtain relevant information about the lottery promotion and complete the confirmation of the lottery promotion information.
[0041] By partially covering the QR code, the event becomes more mysterious and interesting, stimulating consumers' curiosity and desire to participate. In the process of scratching off the coating, consumers can gain a unique interactive experience, making them more willing to participate in the event.
[0042] By offering prizes of varying values and types, we can meet the needs and preferences of different consumers. High-value first prizes and limited second prizes can attract active consumer participation, while unlimited coupons encourage repeat purchases, boosting product sales.
[0043] Consumers scan the QR code and instantly learn the winning results. This instant feedback mechanism ensures consumers feel the fairness and authenticity of the event, enhancing their sense of participation and satisfaction. Winners receive their rewards quickly, while non-winners can gain additional participation opportunities by sharing the event, which increases consumer enthusiasm.
[0044] Using QR code masking to implement promotional sweepstakes is an effective marketing method that can bring significant sales growth and enhance brand influence.
[0045] Of course, without departing from the spirit and essence of the present invention, technicians familiar with the field should be able to make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for using a QR code for multiple purposes, including a coding method, characterized in that: The coding method is used to determine the obscured portion of a QR code; and also includes a code scanning and recognition method for identifying a QR code with an obscured portion; The coding method includes: (1) Data encoding: Set a string S and divide it into two substrings A and B; then perform data encoding on the string S. First, encode the substring A and save it as Ae. When the encoding of A is completed, encode the substring B and save it as Be. If the encoding results of A and B intersect during the encoding process, the intersection is stored in Ae. (2) Check code encoding: During the data encoding process (1), check code encoding is performed simultaneously; the check code encoding of substring A is stored as Ai, and the check code encoding of substring B is stored as Bi; if the encoding results of A and B intersect during the encoding process, the intersection is stored in Ai; (3) Drawing the QR code graphic: The data of the string S is drawn in the QR code graphic. When drawing the Be part, the graphic area of the Be part is recorded as Pbe; when drawing the Bi part, the graphic area of the Bi part is recorded as Pbi; (4) Outputting a QR code graphic: while outputting the QR code graphic, outputting two silver scratch-off shielding parts; the shielding part of the silver scratch-off is smaller than the part to be shielded; the part to be shielded includes anti-counterfeiting and anti-channeling information and lottery information.
2. The method for using a QR code for multiple purposes according to claim 1, wherein: The code scanning and recognition method: (a) inputting a QR code image with an occluded portion; the QR code image with the occluded portion is generated by a QR code scanning and recognition method with an occluded portion; (b) Parsing the QR code image using a conventional algorithm: Perform conventional parsing based on the QR code format to obtain the data encoding portion and the check code portion; decode the data encoding portion and the check code portion to parse the string, skipping characters that cannot be parsed until the parsing is complete, and outputting the string that can be parsed, i.e., the information of the non-scratch silver obscured portion; (c) Terminal scanning of QR code: Depending on the purpose, the complete QR code string can be parsed by installing a scanning gun, scanner, or smartphone with a scanning algorithm.
3. The method for using a QR code for multiple purposes according to claim 2, wherein: The QR code image is an anti-counterfeiting and anti-channeling QR code; the anti-counterfeiting and anti-channeling QR code includes domain name information, unique code information, and unique code secret code information; The unique code information and the unique secret code information are scratched off the silver covered part.
4. The method for using a QR code for multiple purposes according to claim 3, wherein: The anti-counterfeiting and anti-channelling QR code is associated with the product, and the product QR code is generated by a coding method, and the non-scratch-off silver-shielded part QR code data is generated; the anti-counterfeiting and anti-channelling information of the associated product is entered as the part that needs to be blocked, and the manufacturer and distributor sequentially enter the information as the unique identification of the product, and the entered information is recorded in a remote database; the entered information is the association information of the domain name information and the unique code information; consumers obtain the anti-counterfeiting and anti-channelling data through the anti-counterfeiting and anti-channelling QR code.
5. The method for using a QR code for multiple purposes according to claim 2, wherein: The QR code image is a lucky draw promotion QR code; the lucky draw promotion QR code includes domain name information, unique code information, and associated information of the unique code secret code information; The associated information of the unique secret code information is the scratched silver covered part.
6. The method for using a QR code for multiple purposes according to claim 5, characterized in that: The lottery promotion QR code is associated with the product, and the product QR code is generated through a coding method, and the non-scratch-off silver-shielded part QR code data is generated; the lottery promotion information of the associated product is entered as the part that needs to be blocked, and the associated information of the promoter enters the information as the unique identifier of the product; the entered information is the only secret code information; consumers obtain anti-counterfeiting and anti-channeling data through the anti-counterfeiting and anti-channeling QR code. Consumers obtain lottery promotion number information through the lottery promotion QR code.
Citation Information
Patent Citations
Anti-counterfeiting method through comparison identification with encryption patterns by use of two-dimensional codes
CN104992208A
One-code multi-effect digit authentication method
CN107481013A