CN113850356A - Two-dimensional code generation method and device and electronic equipment - Google Patents

Two-dimensional code generation method and device and electronic equipment Download PDF

Info

Publication number
CN113850356A
CN113850356A CN202111122392.5A CN202111122392A CN113850356A CN 113850356 A CN113850356 A CN 113850356A CN 202111122392 A CN202111122392 A CN 202111122392A CN 113850356 A CN113850356 A CN 113850356A
Authority
CN
China
Prior art keywords
dimensional code
digital information
final
digital
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111122392.5A
Other languages
Chinese (zh)
Inventor
冯志远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd, Ant Blockchain Technology Shanghai Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202111122392.5A priority Critical patent/CN113850356A/en
Publication of CN113850356A publication Critical patent/CN113850356A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • G06K19/06093Constructional details the marking being constructed out of a plurality of similar markings, e.g. a plurality of barcodes randomly oriented on an object

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the specification provides a two-dimensional code generation method and device and electronic equipment. The method comprises the following steps: dividing digital information for generating a two-dimensional code into a first digital information segment and a second digital information segment serving as verification information of the two-dimensional code; generating a first two-dimensional code based on the first digital information segment and a second two-dimensional code based on the second digital information segment; and performing two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code.

Description

Two-dimensional code generation method and device and electronic equipment
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a two-dimensional code generation method and device and electronic equipment.
Background
The two-dimensional Code is also called a two-dimensional barcode, and a common two-dimensional Code includes a QR Code (Quick Response Code). Two-dimensional codes are the most widely used coding method at present, because they can store more information and represent more data types than traditional Bar codes (Bar codes).
Take the two-dimensional code as an anti-counterfeit code as an example. The two-dimensional code anti-counterfeiting system is used for binding the genuine products with the unique two-dimensional code (namely the anti-counterfeiting code) in a one-to-one manner. When the user verifies the product is true or false, the system can automatically match the anti-counterfeiting code database and the query times, and if the anti-counterfeiting code exists in the database and is queried for the first time, the system can generally verify the product to be correct. If the anti-counterfeiting code is not available in the system, the system will generally indicate that the anti-counterfeiting code is not available. The two-dimensional code can store abundant product information, is not easy to copy and steal through encryption, and realizes the anti-counterfeiting high efficiency of the product information.
However, the anti-counterfeit code adhered to the product in the circulation process may be replaced by a person or a lawless person in the middle link. Therefore, when a plurality of products are pasted with the two-dimensional codes, verification information, namely a plurality of letters or numbers, can be attached, and anti-counterfeiting verification can be performed after code scanning identification and inputting of the verification information. The verification information is typically obscured by the coating. The information checking mode shielded by the coating enhances the anti-counterfeiting capability to a certain extent. But the customer experience is also reduced, and the customer needs to manually input the verification information for anti-counterfeiting verification.
Disclosure of Invention
The embodiment of the specification provides a two-dimensional code generation method and device and electronic equipment.
According to a first aspect of embodiments of the present specification, there is provided a two-dimensional code generation method, including:
dividing digital information for generating a two-dimensional code into a first digital information segment and a second digital information segment serving as verification information of the two-dimensional code;
generating a first two-dimensional code based on the first digital information segment and a second two-dimensional code based on the second digital information segment;
and performing two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code.
According to a second aspect of embodiments herein, there is provided a two-dimensional code generation apparatus, the apparatus including:
the device comprises a dividing unit, a judging unit and a judging unit, wherein the dividing unit is used for dividing digital information used for generating a two-dimensional code into a first digital information segment and a second digital information segment which is verification information of the two-dimensional code;
a generating unit that generates a first two-dimensional code based on the first digital information piece and a second two-dimensional code based on the second digital information piece;
and the fusion unit is used for carrying out two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code.
According to a third aspect of embodiments herein, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured as any one of the two-dimensional code generation methods.
The embodiment of the specification provides a two-dimensional code generation scheme, and the two-dimensional code and the verification information are fused, so that a user does not need to manually input the verification information, and the user experience is improved. Specifically, the check information is independently generated into a second two-dimensional code and is fused with the original first two-dimensional code into a final two-dimensional code. The URL address corresponding to the first two-dimensional code and the verification information corresponding to the second two-dimensional code can be obtained through one-time code scanning, and therefore verification can be automatically carried out based on the verification information when a page corresponding to the URL address is visited.
Drawings
Fig. 1 is a schematic diagram of a coding lattice of a two-dimensional code provided in an embodiment of the present specification;
fig. 2 is a schematic diagram of a filling manner of a two-dimensional code provided in an embodiment of the present specification;
fig. 3 is a schematic diagram of a filling manner of a two-dimensional code encoding of a hidden encoding lattice according to an embodiment of the present specification;
fig. 4 is a schematic diagram of a conventional two-dimensional code including verification information according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a two-dimensional code generation method provided in an embodiment of the present specification;
fig. 6 is a schematic diagram of a process of fusing a first two-dimensional code and a second two-dimensional code provided in an embodiment of the present specification;
fig. 7 is a schematic diagram illustrating an effect of a generated final two-dimensional code provided in an embodiment of the present specification;
fig. 8 is a hardware configuration diagram of a two-dimensional code generation apparatus according to an embodiment of the present specification;
fig. 9 is a block diagram of a two-dimensional code generation apparatus according to an embodiment of the present specification.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The two-dimensional code is a pattern recording data coincidence information which is distributed on a plane according to a certain rule by using a specific set pattern.
Fig. 1 is a schematic diagram of a coding lattice of a two-dimensional code provided in this specification. In fig. 1, an image of a two-dimensional code may be divided into several encoding lattices on a plane. The white grids are data areas, the black grids form non-data areas, the data areas are used for filling digital information, and the non-data areas cannot be filled with the digital information.
Fig. 2 is a schematic diagram illustrating a filling manner of a two-dimensional code provided in this specification. In fig. 1, the digital information may be filled in the passing coding lattice starting from the lower left corner along a polyline, which bypasses or skips non-filling if a non-data area is encountered. Usually, the digital information is filled into the coding trellis in the form of bits (bits), for example, the digital information is coded into a binary bit stream (bit values are divided into 0 and 1).
Fig. 3 is a schematic diagram illustrating a filling manner of a hidden coding lattice. The two-dimensional code making technology skillfully utilizes the concepts of '0' and '1' bit streams forming the internal logic basis of a computer, and uses a plurality of geometric shapes corresponding to binary systems to represent literal numerical information.
As described above, in order to enhance the anti-counterfeit capability, the two-dimensional code may be accompanied by verification information. Many products are attached with two-dimensional codes and simultaneously are attached with verification information, namely, a few letters or numbers, and the verification information is usually shielded by a coating.
Please refer to fig. 4, which is a schematic diagram of a conventional two-dimensional code including verification information. The two-dimensional code on the left side of fig. 4 is a two-dimensional code on the upper part, and verification information shielded by a black coating on the lower part. When the anti-counterfeiting verification is performed, as shown in the schematic diagram of the two-dimensional code on the right side of fig. 4, the coating can be scraped to view the verification information (i.e., "123456" shown in fig. 4), and after the two-dimensional code is scanned, the verification information "123456" can be further entered to perform the anti-counterfeiting verification.
The information checking mode shielded by the coating enhances the anti-counterfeiting capability to a certain extent. But the customer experience is also reduced, and the customer needs to manually input the verification information for anti-counterfeiting verification.
Therefore, the two-dimensional code and the verification information are fused, and the user does not need to manually input the verification information, so that the user experience is improved. Specifically, the check information is independently generated into a second two-dimensional code and is fused with the original first two-dimensional code into a final two-dimensional code. The URL address corresponding to the first two-dimensional code and the verification information corresponding to the second two-dimensional code can be obtained through one-time code scanning, and therefore verification can be automatically carried out based on the verification information when a page corresponding to the URL address is visited.
An embodiment of a method for generating a two-dimensional code provided in an exemplary embodiment of the present specification is described below with reference to fig. 5, where the method includes:
step 210: the digital information used for generating the two-dimensional code is divided into a first digital information segment and a second digital information segment which is verification information of the two-dimensional code.
Wherein the digital information is used for generating a bit stream of the aforementioned binary values and is written into the encoding lattice of the two-dimensional code as shown in fig. 2 based on the two-dimensional code encoding technique.
In an exemplary embodiment, the digital information includes a URL address; the first piece of digital information includes an address portion of the URL address; the second piece of digital information includes a parameter portion of the URL address. Wherein, the parameter part of the URL address comprises a parameter field and a parameter value.
For example, assume that some digital information is: "XXXcipher ═ YYY"; where XXX and YYY are non-specific information content after desensitization. The first piece of digital information is XXX, which represents the address part of the URL address (e.g. http:// … …); the second piece of digital information is cipher, YYY, which indicates the parameter part of the URL address. Both of which are represented by the character "? Is "spaced, located"? "preceded by a first digital message, located at"? Followed by the second digital information. Further, the parameter field of the parameter part is nepher, and the parameter value of the parameter part is YYY. And the parameter value YYY represents the verification information (e.g., 123456).
The first digital information segment is used for accessing a page corresponding to the URL address, and the second digital information segment is used for verifying the verification information in the page corresponding to the URL address.
In this specification, the dividing of the digital information for generating the two-dimensional code into the first digital information piece and the second digital information piece as the verification information with the two-dimensional code may include:
and carrying out information segmentation on the digital information used for generating the two-dimensional code to obtain a first digital information segment and a second digital information segment which is verification information corresponding to the two-dimensional code.
This example is the division of the digital information into two parts, one part being a second piece of digital information cut out from the digital information for use as verification information, and the other part being the remaining first piece of digital information that does not contain verification information.
For example, for the digital information "XXXcipher ═ YYY", the verification information "YYY" in the digital information may be intercepted; two parts of information can thus be formed: a first part being a first piece of digital information "XXX" that does not contain the check information, and a second part being a second piece of digital information "that is the check information? cirher ═ 000 ". Note that the character? The chopper is also truncated.
In this specification, the dividing of the digital information for generating the two-dimensional code into the first digital information piece and the second digital information piece as the verification information with the two-dimensional code may include:
and extracting a second digital information segment serving as check information corresponding to the two-dimensional code from digital information used for generating the two-dimensional code, and shielding the second digital information segment contained in the digital information to obtain the first array information segment.
In this example, the check information in the digital information is removed by means of masking, i.e. the first digital information segment and the second digital information segment can be divided, and the first digital information segment can be kept as a complete digital information.
In an embodiment, the masking the second piece of digital information included in the digital information may include:
and replacing the characters corresponding to the second digital information segment contained in the digital information with preset nonsense characters.
For example, for the digital information "XXXcipher ═ YYY", each character of the verification information "YYY" may be replaced with a meaningless character, for example, YYY is replaced with 000, thereby forming a first digital information fragment "XXXcipher ═ 000" that does not contain verification information, and a second digital information fragment extracted as verification information is "YYY".
Step 220: a first two-dimensional code is generated based on the first piece of digital information, and a second two-dimensional code is generated based on the second piece of digital information.
After dividing the digital information for generating the two-dimensional code into a first digital information piece and a second digital information piece as check information with the two-dimensional code, a first two-dimensional code may be generated based on the first digital information piece and a second two-dimensional code may be generated based on the second digital information piece, respectively.
For example, for the digital information "XXXcipher ═ YYY", a corresponding first two-dimensional code is generated based on a first digital information fragment "XXX" (the first "split" implementation described above) or "XXXcipher ═ 000" (the second "mask" implementation described above) that does not contain the verification information, and a corresponding second two-dimensional code is generated based on a second digital information fragment "YYY" that is the verification information.
Step 230: and performing two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code.
After the first two-dimensional code and the second two-dimensional code are generated, they need to be fused into a final two-dimensional code.
In an embodiment, the performing two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code includes:
and carrying out two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code after shielding treatment to obtain a final two-dimensional code.
And shielding the generated second two-dimensional code to hide the verification information corresponding to the second two-dimensional code.
In an exemplary embodiment, the occlusion processing includes: adding a scratch-off coating to the second two-dimensional code. The coating is used for covering the two-dimensional code image of the second two-dimensional code.
If the final two-dimensional code is a digital two-dimensional code displayed in the electronic equipment, the coating comprises a digital coating for covering the second two-dimensional code;
if the final two-dimensional code is a solid two-dimensional code used under line, the coating comprises a physical coating for covering the second two-dimensional code.
In an exemplary embodiment, a blank area is left in the generated first two-dimensional code;
the two-dimensional code fusion of the first two-dimensional code and the second two-dimensional code comprises:
adding the second two-dimensional code to a blank area in the first two-dimensional code.
Fig. 6 is a schematic diagram of a process of fusing a first two-dimensional code and a second two-dimensional code. The two-dimensional code corresponding to the digital information containing the verification information 11 shown in fig. 6 is modified; firstly, the check information 11 is divided from the digital information or replaced by meaningless characters 12;
then, a first two-dimensional code is generated based on the digital information (i.e., the first digital segment) not containing the verification information, and a second two-dimensional code is generated based on the verification information (i.e., the second digital information segment). Wherein, a blank area 13 is reserved in the first two-dimensional code. As shown in fig. 6, the blank area 13 is located in the central area of the first two-dimensional code.
For digital information not containing check information, when it is written into the coding grid, it needs to skip the blank area 13 for writing, and its improved filling mode is shown as area 14. And the blank area 13 is filled with the verification information as shown in area 15. Therefore, the first two-dimension code and the second two-dimension code can be fused into a final two-dimension code.
The effect diagram of the generated final two-dimensional code is shown in fig. 7. A user can scan the combined two-dimensional code, and if the second two-dimensional code is shielded (such as the covering coating shown on the left side in fig. 7), the scanning can only read the address part of the URL address corresponding to the first two-dimensional code; only when the second two-dimensional code is not shielded (the coating is scraped off as shown in the right side of fig. 7), the address part of the URL address corresponding to the first two-dimensional code and the parameter part of the URL address corresponding to the second two-dimensional code as the verification information can be read by one scanning.
The generated final two-dimensional code can comprise a two-dimensional code for anti-counterfeiting; and the second digital information fragment is used for performing anti-counterfeiting verification on the two-dimensional code.
In the following, by taking a pseudo two-dimensional code as an example, the digital information at least consists of address information and verification information; the access address information is used for accessing the anti-counterfeiting verification system, and the verification information is used for performing anti-counterfeiting verification.
When the anti-counterfeiting system is accessed, the anti-counterfeiting page is not displayed, and the anti-counterfeiting result is only displayed to the user. Thereby simplifying the anti-counterfeiting display process and improving the user experience.
Through the embodiment, the check information is independently generated into the second two-dimensional code and combined with the original first two-dimensional code. After the second two-dimensional code coating is scraped, the access address corresponding to the first two-dimensional code can be obtained through one-time code scanning, and the verification information corresponding to the second two-dimensional code can be obtained, so that the anti-counterfeiting verification can be automatically carried out based on the verification information when the anti-counterfeiting page is accessed, the verification information does not need to be manually input by a user, and the user experience is improved.
The generated final two-dimension code comprises a two-dimension code used for tracing; the second digital information fragment is used for tracing and checking the two-dimensional code.
Taking a tracing two-dimensional code as an example, the digital information at least consists of address information and verification information; the access address information is used for accessing a traceability system, and the check information is used for performing traceability query.
When the tracing system is accessed, the tracing page is not displayed, and the tracing result is only displayed to the user. Therefore, the tracing display process is simplified, and the user experience is improved.
Through the embodiment, the check information is independently generated into the second two-dimensional code and combined with the original first two-dimensional code. After the second two-dimensional code coating is scraped, the access address corresponding to the first two-dimensional code can be obtained through one-time code scanning, and the verification information corresponding to the second two-dimensional code can be obtained, so that the source tracing can be automatically carried out based on the verification information when the source tracing system is accessed, the verification information does not need to be manually input by a user, and the user experience is improved.
Corresponding to the foregoing two-dimensional code generation method embodiment, the present specification also provides an embodiment of a two-dimensional code generation apparatus. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer business program instructions in the nonvolatile memory into the memory for operation through the processor of the device in which the device is located. In terms of hardware, as shown in fig. 8, the two-dimensional code generating apparatus in this specification is a hardware structure diagram of a device in which the two-dimensional code generating apparatus is located, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 8, the device in which the apparatus is located in the embodiment generally generates an actual function according to the two-dimensional code, and may include other hardware, which is not described again.
Referring to fig. 9, a block diagram of a two-dimensional code generating apparatus according to an embodiment of the present disclosure is shown, where the apparatus corresponds to the embodiment shown in fig. 5, and the apparatus includes:
a dividing unit 310 that divides digital information for generating a two-dimensional code into a first digital information piece and a second digital information piece that is check information with the two-dimensional code;
a generating unit 320 that generates a first two-dimensional code based on the first digital information piece and a second two-dimensional code based on the second digital information piece;
and the fusion unit 330 is configured to perform two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code.
Optionally, the dividing unit 310 includes:
the device comprises a dividing subunit, a verification subunit and a processing subunit, wherein the dividing subunit is used for carrying out information division on digital information used for generating a two-dimensional code to obtain a first digital information segment and a second digital information segment which is used as verification information corresponding to the two-dimensional code; alternatively, the first and second electrodes may be,
and the shielding subunit extracts a second digital information segment serving as check information corresponding to the two-dimensional code from the digital information used for generating the two-dimensional code, and performs shielding processing on the second digital information segment contained in the digital information to obtain the first array information segment.
Optionally, in the shielding subunit, the shielding processing on the second digital information fragment included in the digital information includes:
and replacing the characters corresponding to the second digital information segment contained in the digital information with preset nonsense characters.
Optionally, the fusing unit 330 includes:
and carrying out two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code after shielding treatment to obtain a final two-dimensional code.
Optionally, the occlusion processing includes: adding a scratch-off coating to the second two-dimensional code.
Optionally, if the final two-dimensional code is a digital two-dimensional code displayed in the electronic device, the coating includes a digital coating for covering the second two-dimensional code;
if the final two-dimensional code is a solid two-dimensional code used under line, the coating comprises a physical coating for covering the second two-dimensional code.
Optionally, the fusing unit 330 includes:
adding the second two-dimensional code to a blank area in the first two-dimensional code.
Optionally, the blank region is located in a central region of the first two-dimensional code.
Optionally, the digital information includes a URL address; the first piece of digital information includes an address portion of the URL address; the second piece of digital information includes a parameter portion of the URL address.
Optionally, the final two-dimensional code comprises a two-dimensional code for anti-counterfeiting; and the second digital information fragment is used for performing anti-counterfeiting verification on the two-dimensional code.
Optionally, the final two-dimensional code includes a two-dimensional code for tracing; the second digital information fragment is used for tracing and checking the two-dimensional code.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The internal function module and the structural schematic of the execution device for generating the two-dimensional code are described above, and the substantial execution main body of the execution device may be an electronic device, including:
a processor;
a memory for storing processor-executable instructions;
wherein, the processor is configured to be the two-dimensional code generation or use method shown in any of the above embodiments.
In the above embodiments of the electronic device, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiment of the electronic device, since it is substantially similar to the embodiment of the method, the description is simple, and for the relevant points, reference may be made to part of the description of the embodiment of the method.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

Claims (23)

1. A two-dimensional code generation method, the method comprising:
dividing digital information for generating a two-dimensional code into a first digital information segment and a second digital information segment serving as verification information of the two-dimensional code;
generating a first two-dimensional code based on the first digital information segment and a second two-dimensional code based on the second digital information segment;
and performing two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code.
2. The method of claim 1, wherein the dividing of the digital information for generating the two-dimensional code into a first digital information segment and a second digital information segment as verification information with the two-dimensional code comprises:
carrying out information segmentation on digital information used for generating the two-dimensional code to obtain a first digital information segment and a second digital information segment which is used as verification information corresponding to the two-dimensional code; alternatively, the first and second electrodes may be,
and extracting a second digital information segment serving as check information corresponding to the two-dimensional code from digital information used for generating the two-dimensional code, and shielding the second digital information segment contained in the digital information to obtain the first array information segment.
3. The method of claim 2, wherein said masking said second piece of digital information contained in said digital information comprises:
and replacing the characters corresponding to the second digital information segment contained in the digital information with preset nonsense characters.
4. The method of claim 1, wherein the two-dimensional code fusion of the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code comprises:
and carrying out two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code after shielding treatment to obtain a final two-dimensional code.
5. The method of claim 4, the occlusion processing comprising: adding a scratch-off coating to the second two-dimensional code.
6. The method of claim 5, wherein if the final two-dimensional code is a digital two-dimensional code presented in an electronic device, the coating comprises a digital coating for covering the second two-dimensional code;
if the final two-dimensional code is a solid two-dimensional code used under line, the coating comprises a physical coating for covering the second two-dimensional code.
7. The method of claim 1, the two-dimensional code fusing the first two-dimensional code with the second two-dimensional code, comprising:
adding the second two-dimensional code to a blank area in the first two-dimensional code.
8. The method of claim 7, the blank region being located in a central region in the first two-dimensional code.
9. The method of claim 2, the digital information comprising a URL address; the first piece of digital information includes an address portion of the URL address; the second piece of digital information includes a parameter portion of the URL address.
10. The method of claim 1, the final two-dimensional code comprising a two-dimensional code for anti-counterfeiting; and the second digital information fragment is used for performing anti-counterfeiting verification on the two-dimensional code.
11. The method of claim 1, the final two-dimensional code comprising a two-dimensional code for tracing; the second digital information fragment is used for tracing and checking the two-dimensional code.
12. A two-dimensional code generation apparatus, the apparatus comprising:
the device comprises a dividing unit, a judging unit and a judging unit, wherein the dividing unit is used for dividing digital information used for generating a two-dimensional code into a first digital information segment and a second digital information segment which is verification information of the two-dimensional code;
a generating unit that generates a first two-dimensional code based on the first digital information piece and a second two-dimensional code based on the second digital information piece;
and the fusion unit is used for carrying out two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code to obtain a final two-dimensional code.
13. The apparatus of claim 12, the partition unit, comprising:
the device comprises a dividing subunit, a verification subunit and a processing subunit, wherein the dividing subunit is used for carrying out information division on digital information used for generating a two-dimensional code to obtain a first digital information segment and a second digital information segment which is used as verification information corresponding to the two-dimensional code; alternatively, the first and second electrodes may be,
and the shielding subunit extracts a second digital information segment serving as check information corresponding to the two-dimensional code from the digital information used for generating the two-dimensional code, and performs shielding processing on the second digital information segment contained in the digital information to obtain the first array information segment.
14. The apparatus according to claim 13, wherein said masking subunit performs a masking process on the second piece of digital information included in the digital information, and includes:
and replacing the characters corresponding to the second digital information segment contained in the digital information with preset nonsense characters.
15. The apparatus of claim 12, the fusion unit, comprising:
and carrying out two-dimensional code fusion on the first two-dimensional code and the second two-dimensional code after shielding treatment to obtain a final two-dimensional code.
16. The apparatus of claim 15, the occlusion processing comprising: adding a scratch-off coating to the second two-dimensional code.
17. The apparatus of claim 16, the coating comprising a digital coating for overlaying the second two-dimensional code if the final two-dimensional code is a digital two-dimensional code presented in an electronic device;
if the final two-dimensional code is a solid two-dimensional code used under line, the coating comprises a physical coating for covering the second two-dimensional code.
18. The apparatus of claim 12, the fusion unit, comprising:
adding the second two-dimensional code to a blank area in the first two-dimensional code.
19. The apparatus of claim 18, the blank region is located in a central region in the first two-dimensional code.
20. The apparatus of claim 13, the digital information comprising a URL address; the first piece of digital information includes an address portion of the URL address; the second piece of digital information includes a parameter portion of the URL address.
21. The apparatus of claim 12, the final two-dimensional code comprising a two-dimensional code for anti-counterfeiting; and the second digital information fragment is used for performing anti-counterfeiting verification on the two-dimensional code.
22. The apparatus of claim 12, the final two-dimensional code comprising a two-dimensional code for tracing; the second digital information fragment is used for tracing and checking the two-dimensional code.
23. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any of the preceding claims 1-11.
CN202111122392.5A 2021-09-24 2021-09-24 Two-dimensional code generation method and device and electronic equipment Pending CN113850356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111122392.5A CN113850356A (en) 2021-09-24 2021-09-24 Two-dimensional code generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111122392.5A CN113850356A (en) 2021-09-24 2021-09-24 Two-dimensional code generation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113850356A true CN113850356A (en) 2021-12-28

Family

ID=78979273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111122392.5A Pending CN113850356A (en) 2021-09-24 2021-09-24 Two-dimensional code generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113850356A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104835046A (en) * 2015-04-20 2015-08-12 信码互通(北京)科技有限公司 Data identification method for two-dimension code safety verification
CN106899609A (en) * 2017-03-22 2017-06-27 上海中商网络股份有限公司 Code and its generation, verification method and device in a kind of code
CN107358284A (en) * 2017-07-11 2017-11-17 北京捷润科技有限公司 Generation method, read method, generating means and the reading device of Quick Response Code
CN107895275A (en) * 2017-11-28 2018-04-10 北京信用达互联网信息技术有限公司 The product preventing counterfeiting means of proof
CN110428033A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 A kind of method of calibration, identification end and user terminal
CN110445805A (en) * 2019-08-22 2019-11-12 北京中科锐链科技有限公司 A kind of false-proof authentication system and method for two dimensional code

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104835046A (en) * 2015-04-20 2015-08-12 信码互通(北京)科技有限公司 Data identification method for two-dimension code safety verification
CN106899609A (en) * 2017-03-22 2017-06-27 上海中商网络股份有限公司 Code and its generation, verification method and device in a kind of code
CN107358284A (en) * 2017-07-11 2017-11-17 北京捷润科技有限公司 Generation method, read method, generating means and the reading device of Quick Response Code
CN107895275A (en) * 2017-11-28 2018-04-10 北京信用达互联网信息技术有限公司 The product preventing counterfeiting means of proof
CN110428033A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 A kind of method of calibration, identification end and user terminal
CN110445805A (en) * 2019-08-22 2019-11-12 北京中科锐链科技有限公司 A kind of false-proof authentication system and method for two dimensional code

Similar Documents

Publication Publication Date Title
WO2021169502A1 (en) A pixel image as well as its processing method and application system
CN107025480B (en) Image generation method and apparatus thereof
CN111767565B (en) Data desensitization processing method, processing device and storage medium
CN106599964A (en) Two-dimensional code generation and verification method and device
CN111159697B (en) Key detection method and device and electronic equipment
CN107451643B (en) Generation, recognition methods and the device of dynamic two-dimension code
CN114818000B (en) Privacy protection set confusion intersection method, system and related equipment
CN109558723A (en) Password dictionary generation method, device and computer equipment
CN103559221A (en) Multi-media data processing method and device and browser
CN111951026A (en) Commodity anti-counterfeiting verification method, device, equipment and system based on two-dimensional code
CN110472967B (en) Verification method, identification end and user end
CN106250755B (en) Method and device for generating verification code
CN108829882B (en) Information collection method, device, terminal and medium
TW201131417A (en) CAPTCHA (completely automated public test to tell computers and humans apart) data generation methods and related data management systems and computer program products thereof
CN111737304B (en) Processing method, device and equipment of block chain data
CN112947911A (en) Interface script generation method, device, equipment and storage medium
CN112434506A (en) Electronic protocol signing processing method, device, computer equipment and medium
CN113850356A (en) Two-dimensional code generation method and device and electronic equipment
CN110008714A (en) The method, apparatus and electronic equipment of data encryption based on confrontation neural network
CN115578736A (en) Certificate information extraction method, device, storage medium and equipment
CN110428033B (en) Verification method, identification end and user end
CN113902456A (en) Product anti-counterfeiting method and device
CN114707180A (en) Log desensitization method and device
CN114329030A (en) Information processing method and device, computer equipment and storage medium
CN112199731A (en) Data processing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination