Graphic code generation method, device and computer readable storage medium

By generating graphic codes based on iterative rules and self-similar set graphic generation rules, and adding verification codes to the graphic codes, the security risks of QR codes being easily imitated are solved, and the security and difficulty of forgery of information are improved.

CN111723891BActive Publication Date: 2025-01-14BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910202662.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-18
Publication Date
2025-01-14
Estimated Expiration
2039-03-18

AI Technical Summary

Technical Problem

QR codes are easily imitated by attackers during information dissemination, resulting in security risks, and it is difficult for existing technology to effectively improve their security.

Method used

Graphic code is generated based on predetermined iteration rules and self-similar set graphic generation rules. The data is converted into graphic code through the number of iteration processing times and self-similar set graphic generation rules, and the verification code is drawn in the graphic code to improve the security of information and Difficult to forge.

Benefits of technology

Effectively avoid directly identifying the information to be carried from the graphics code, which improves the security of the information, reduces the risk of forging harmful information when cracking the graphic generation rules, and enhances security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111723891B_ABST
    Figure CN111723891B_ABST
Patent Text Reader

Abstract

The present disclosure proposes a graphic code generation method, device and computer-readable storage medium, which relate to the field of identification code technology. The present disclosure provides a graphic code generation method, including: obtaining a target number of iterations based on a predetermined iteration rule according to the data to be carried; generating a graphic code of the data to be carried according to a predetermined self-similar set graphic generation rule and the target number of iterations. Through such a method, the data to be carried can be converted into the number of iterative processing of the self-similar set graphic, and the graphic code of the data can be generated according to the predetermined self-similar set graphic generation rule, thereby avoiding directly identifying the information to be carried from the graphic code, and improving the security of the information carried; and even if the graphic generation rule is cracked, it is difficult to forge a graphic code carrying hazardous information, reducing security risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of identification codes, and in particular to a method and device for generating a graphic code, and a computer-readable storage medium. Background Art

[0002] With the development of mobile Internet and the widespread popularity of smart phones, many applications use QR codes as a carrier for information dissemination. From social networking to mobile payments, QR codes are everywhere. Since QR codes are universal, it is easy to identify the specific content of information when disseminating it. Attackers can easily use the rules to imitate QR codes to steal assets or phishing, causing security risks. Summary of the invention

[0003] One purpose of the present disclosure is to provide a graphic code generation solution to improve the security of the information carried.

[0004] According to one aspect of some embodiments of the present disclosure, a method for generating a graphic code is proposed, comprising: obtaining a target number of iterations based on a predetermined iteration rule according to data to be carried; and generating a graphic code of the data to be carried according to a predetermined self-similar set graphic generation rule and the target number of iterations.

[0005] In some embodiments, the graphic code generation method also includes: sequentially cutting the data to be carried into multiple parts not exceeding a predetermined length; obtaining a target number of iterations based on a predetermined iteration rule: obtaining a target number of iterations based on each piece of data based on the predetermined iteration rule; generating a graphic code for the data to be carried according to a predetermined self-similar set graphic generation rule and the target number of iterations includes: generating a graphic code for a single piece of data according to a predetermined self-similar set graphic generation rule and the target number of iterations corresponding to each piece of data; combining the graphic codes of a single piece of data according to a predetermined arrangement rule and data order to obtain a graphic code for the data to be carried.

[0006] In some embodiments, the graphic code generation method further includes: obtaining a verification code based on a predetermined algorithm according to a target number of iterations; and drawing the verification code in the graphic code.

[0007] In some embodiments, the graphic code generation method further includes: concatenating the target number of iterations in data order, and obtaining a check code based on a predetermined algorithm; and drawing the check code at a predetermined position in the graphic code, or using a predetermined color.

[0008] In some embodiments, the predetermined iteration rule comprises a predetermined function.

[0009] In some embodiments, the predetermined self-similar set graph generation rule includes the Cantor three-point set rule.

[0010] In some embodiments, the predetermined arrangement rule is a circular arrangement from inside to outside or from outside to inside.

[0011] Through such a method, the data to be carried can be converted into the number of iterative processing of the self-similar set graphics, and the graphic code of the data can be generated according to the predetermined self-similar set graphics generation rules, thereby avoiding directly identifying the information to be carried from the graphic code, thereby improving the security of the carried information; and even if the graphic generation rules are cracked, it is difficult to forge a graphic code carrying harmful information, thereby reducing security risks.

[0012] According to one aspect of some other embodiments of the present disclosure, a graphic code generating device is proposed, comprising: an iteration number obtaining unit, configured to obtain a target iteration number based on a predetermined iteration rule according to data to be carried; and a graphic drawing unit, configured to generate a graphic code of the data to be carried according to a predetermined self-similar set graphic generation rule and the target iteration number.

[0013] In some embodiments, the graphic code generating device also includes: a data segmentation unit, configured to sequentially cut the data to be carried into multiple parts not exceeding a predetermined length; an iteration number acquisition unit is configured to obtain a target iteration number based on a predetermined iteration rule for each piece of data; a graphic drawing unit is configured to: generate a graphic code for a single piece of data according to a predetermined self-similar set graphic generation rule and a target iteration number corresponding to each piece of data; combine the graphic codes of a single piece of data according to a predetermined arrangement rule and data sequence to obtain a graphic code for the data to be carried.

[0014] In some embodiments, the graphic code generating device further includes: a verification code acquiring unit configured to acquire a verification code based on a predetermined algorithm according to a target number of iterations; and the graphic drawing unit is further configured to draw the verification code in the graphic code.

[0015] In some embodiments, the graphic code generating device further includes: a verification code acquiring unit configured to concatenate the target number of iterations in data order and acquire the verification code based on a predetermined algorithm; the graphic drawing unit is further configured to draw the verification code at a predetermined position in the graphic code or using a predetermined color.

[0016] According to one aspect of some other embodiments of the present disclosure, a graphic code generating device is proposed, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the above graphic code generating methods based on instructions stored in the memory.

[0017] Such a graphic code generating device can convert the data to be carried into the iterative processing times of the self-similar set graphics, and generate the graphic code of the data according to the predetermined self-similar set graphics generation rules, thereby avoiding directly identifying the information to be carried from the graphic code, thereby improving the security of the information carried; and even if the graphic generation rules are cracked, it is difficult to forge a graphic code carrying harmful information, thereby reducing security risks.

[0018] According to one aspect of some further embodiments of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the steps of any one of the above graphic code generation methods are implemented.

[0019] By executing instructions stored on such a computer-readable storage medium, the data to be carried can be converted into the iterative processing times of the self-similar set graphics, and the graphic code of the data can be generated according to the predetermined self-similar set graphics generation rules, thereby avoiding directly identifying the information to be carried from the graphic code, thereby improving the security of the carried information; and even if the graphic generation rules are cracked, it is difficult to forge a graphic code carrying harmful information, thereby reducing safety risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0021] Figure 1 The flowcharts are of some embodiments of the method for generating a graphic code according to the present disclosure.

[0022] Figure 2 Schematic diagram of the construction process of Cantor's three-point set.

[0023] Figure 3 Flow charts of other embodiments of the method for generating a graphic code according to the present disclosure.

[0024] Figure 4 Flowcharts of some further embodiments of the method for generating a graphic code according to the present disclosure.

[0025] Figure 5 A schematic diagram of an embodiment of a graphic code disclosed herein.

[0026] Figure 6 It is a schematic diagram of an embodiment of a graphic code generating device disclosed in the present invention.

[0027] Figure 7 It is a schematic diagram of another embodiment of the graphic code generating device disclosed in the present invention.

[0028] Figure 8 It is a schematic diagram of another embodiment of the graphic code generating device disclosed in the present invention. DETAILED DESCRIPTION

[0029] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments.

[0030] The flowcharts of some embodiments of the graphic code generation method disclosed in the present invention are as follows: Figure 1shown.

[0031] In step 101, the target number of iterations is obtained based on the predetermined iteration rule according to the data to be carried. In some embodiments, the predetermined iteration rule can be a function with the data to be carried as an unknown number, for example, the formula f(x)=ax+b is used as the predetermined iteration rule, where x is the data to be carried, and a and b are constants; or, f(z)=z 2 +c is used as a predetermined iteration rule, where z is the data to be carried and c is a constant.

[0032] In step 102, a graphic code of the data to be carried is generated according to a predetermined self-similar set graphic generation rule and a target number of iterations. In some embodiments, the predetermined self-similar set graphic generation rule may be a rule based on fractal theory, such as the Cantor three-point set rule.

[0033] The schematic diagram of the construction process of Cantor's three-point set is as follows Figure 2 As shown in the figure, the closed interval [0, 1] is divided into three equal parts, and the middle 1 / 3 part is removed, leaving only two closed intervals [0, 1 / 3] and [2 / 3, 1]; then the remaining two closed intervals are divided into three equal parts, and the middle interval is removed, and then four closed intervals are left: [0, 1 / 9], [2 / 9, 1 / 3], [2 / 3, 7 / 9] and [8 / 9, 1]; repeatedly delete the middle 1 / 3 of each small interval. Continue to divide in this way, and the remaining small intervals will form a three-part Cantor set.

[0034] Since the generation rules based on the self-similar set graphics do not carry any information, the reading end cannot obtain the carried data by deciphering the rules, thereby improving the security of the carried information. Similarly, even if the graphics generation rules are cracked, it is difficult to generate a graphic code in this embodiment that can be read based on harmful information (such as property infringement or phishing), thereby reducing security risks.

[0035] Since the rules of fractal theory break away from the traditional barriers of one-dimensional lines, two-dimensional surfaces, three-dimensional solids and even four-dimensional space-time, and propose the concept of decimal dimensions, it is closer to the description of the real properties and states of complex systems, and is more in line with the diversity and complexity of objective things. Therefore, it can help to carry richer decimal dimension information in the space of integer dimensions, and achieve effective application of graphic code space.

[0036] In some embodiments, the predetermined iteration rule needs to ensure that the number of iterations obtained based on any feasible data to be carried is an integer. In other embodiments, to avoid uncertainty in the data obtained based on the number of iterations, the number of graphic processing iterations of the predetermined iteration rule has a one-to-one relationship with the data to be carried, thereby reducing the difficulty of data analysis and improving the accuracy of data analysis.

[0037] In some embodiments, a predetermined iteration rule matching the graphic code generation end is stored at the legal reading end, so that after obtaining the number of iterations based on the predetermined self-similar set graphic generation rule based on the graphic code, the carried data can be parsed based on the predetermined iteration rule to complete the data reading.

[0038] Flow charts of other embodiments of the method for generating a graphic code disclosed in the present invention are as follows: Figure 3 shown.

[0039] In step 301, the data to be carried is sequentially cut into multiple copies not exceeding a predetermined length. For example, the data can be processed according to a predetermined base, with each bit or several bits as one copy of the data.

[0040] In step 302, a target number of iterations is obtained based on each piece of data based on a predetermined iteration rule. In some embodiments, the data may be brought into a predetermined function with the data to be carried as an unknown number to obtain the iteration number information.

[0041] In step 303, a graphic code of a single piece of data is generated according to a predetermined self-similar set graphic generation rule and a target number of iterations corresponding to each piece of data. If the Cantor three-point set rule is used and the number of iterations is 3, then Figure 2 The graphic in the 4th row shown in is the graphic code of the single data.

[0042] In step 304, the graphic codes of the single data are combined according to the predetermined arrangement rule and data order to obtain the graphic codes of the data to be carried. In some embodiments, the order of combination can be from top to bottom, from left to right, from inside to outside or from outside to inside, or any predetermined combination rule. In some embodiments, the reading end uses the graphic data splicing order that matches the generating end to complete the splicing of the data carried by the graphic codes of multiple single data, ensuring that the data is correctly spliced ​​and restored.

[0043] Through this method, longer data can be grouped to form graphic codes, avoiding difficulties in graphic drawing or small color blocks caused by too many iterations, ensuring image clarity, and increasing the amount of data that the graphic code can carry within the readable range of the image, which is conducive to expanding applications.

[0044] Flow charts of some other embodiments of the graphic code generation method disclosed in the present invention are as follows: Figure 4 shown.

[0045] In step 401, the data to be carried is sequentially cut into multiple parts not exceeding a predetermined length.

[0046] In step 402, a target number of iterations is obtained based on a predetermined iteration rule for each piece of data.

[0047] In step 403, the target iteration number is concatenated in the data sequence, and a check code is obtained based on a predetermined algorithm. In some embodiments, the check code can be obtained by performing a predetermined encryption operation, such as a hash operation, on the target iteration number in the data interception sequence.

[0048] In step 404, a graphic code of a single piece of data is generated according to a predetermined self-similar set graphic generation rule and a target number of iterations corresponding to each piece of data.

[0049] In step 405, the graphic codes of the single data are combined according to a predetermined arrangement rule and data sequence to obtain the graphic code of the data to be carried.

[0050] In step 406, the check code is drawn at a predetermined position in the graphic code, or in a predetermined color, such as drawing the check code at the outermost or innermost layer of the graphic, or drawing the check code in a different color in the graphic code, so that the check code can be distinguished from the graphic code at the reader. The final drawn graphic can be as follows Figure 5 As shown, in this figure, the check code is set at the outermost layer, and the graphic code of a single piece of data is drawn in layers in a ring shape.

[0051] By this method, a check code can be added to the graphic code, and the reading section can use the check code to check the information of other parts of the obtained graphic code. When the check is successful, it is determined that the graphic code is scanned successfully to avoid misreading of information.

[0052] A schematic diagram of an embodiment of the graphic code generating device disclosed in the present invention is shown in FIG. Figure 6 The iteration number acquisition unit 601 can acquire the target iteration number based on the data to be carried and the predetermined iteration rule. In some embodiments, the predetermined iteration rule can be a function with the data to be carried as an unknown number.

[0053] The graphic drawing unit 602 can generate a graphic code of the data to be carried according to a predetermined self-similar set graphic generation rule and a target number of iterations. In some embodiments, the predetermined self-similar set graphic generation rule can be a rule based on fractal theory, such as the Cantor three-point set rule.

[0054] Such a graphic code generating device can convert the data to be carried into the number of iterative processing of the self-similar set graphic, and generate the graphic code of the data according to the predetermined self-similar set graphic generation rule, thereby avoiding directly identifying the information to be carried from the graphic code, and improving the security of the carried information.

[0055] In some embodiments, Figure 6 As shown, the graphic code generating device may further include a data segmentation unit 603 capable of sequentially truncating the data to be carried into multiple copies not exceeding a predetermined length. For example, the data may be processed according to a predetermined base, with each bit or several bits as a piece of data. The iteration number acquisition unit 601 may acquire a target iteration number based on a predetermined iteration rule for each piece of data. The graphic drawing unit 602 may acquire a target iteration number based on a predetermined iteration rule for each piece of data, and combine the graphic code of a single piece of data according to a predetermined arrangement rule and data sequence to acquire a graphic code of the data to be carried.

[0056] Such a graphic code generating device can group longer data into groups to form graphic codes respectively, avoiding difficulties in graphic drawing or small color blocks caused by too many iterations, ensuring image clarity, and increasing the amount of data that the graphic code can carry within the readable range, which is conducive to expanding applications.

[0057] In some embodiments, Figure 6 As shown, the graphic code generating device may further include a check code obtaining unit 604, which can concatenate the target iteration number according to the data sequence and obtain the check code based on a predetermined algorithm. In some embodiments, the check code may be a check code obtained by performing a predetermined encryption operation, such as a hash operation, after concatenating the target iteration number according to the data interception sequence. The graphic drawing unit 602 can draw the check code at a predetermined position in the graphic code or in a predetermined color based on the graphic code formed based on the target iteration number.

[0058] Such a graphic code generating device can add a check code to the graphic code, and the reading section can use the check code to check the information of other parts of the obtained graphic code. When the check is successful, it is determined that the graphic code is scanned successfully to avoid misreading of information.

[0059] The structural diagram of an embodiment of the graphic code generating device disclosed in the present invention is as follows Figure 7As shown. The graphic code generating device includes a memory 701 and a processor 702. Among them: the memory 701 can be a disk, a flash memory or any other non-volatile storage medium. The memory is used to store the instructions in the corresponding embodiment of the graphic code generating method mentioned above. The processor 702 is coupled to the memory 701 and can be implemented as one or more integrated circuits, such as a microprocessor or a microcontroller. The processor 702 is used to execute the instructions stored in the memory, which can avoid directly identifying the information to be carried from the graphic code, improve the security of the carried information, and reduce the safety risks of scanning the graphic code.

[0060] In one embodiment, it is also possible to Figure 8 As shown, the graphic code generating device 800 includes a memory 801 and a processor 802. The processor 802 is coupled to the memory 801 via a BUS bus 803. The graphic code generating device 800 can also be connected to an external storage device 805 via a storage interface 804 to call external data, and can also be connected to a network or another computer system (not shown) via a network interface 806. No further detailed description will be given here.

[0061] In this embodiment, by storing data instructions in a memory and then processing the instructions through a processor, it is possible to avoid directly identifying the information to be carried from the graphic code, thereby improving the security of the carried information and reducing the safety risks of scanning the graphic code.

[0062] In another embodiment, a computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the method in the corresponding embodiment of the graphic code generation method. It should be understood by those skilled in the art that the embodiments of the present disclosure can be provided as methods, devices, or computer program products. Therefore, the present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0063] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0064] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0065] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0066] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0067] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present disclosure rather than to limit it. Although the present disclosure has been described in detail with reference to the preferred embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present disclosure can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present disclosure, which should be included in the scope of the technical solution for protection of the present disclosure.

Claims

1. A method for generating a graphic code, comprising: Sequentially truncate the data to be carried into multiple copies not exceeding a predetermined length; According to the data to be carried, obtaining a target number of iterations based on a predetermined iteration rule includes: obtaining a target number of iterations based on each piece of data based on a predetermined iteration rule; Generate a graphic code of the data to be carried according to a predetermined self-similar set graphic generation rule and the target number of iterations, including: generating a graphic code of a single piece of data according to a predetermined self-similar set graphic generation rule and the target number of iterations corresponding to each piece of data; combining the graphic code of the single piece of data according to a predetermined arrangement rule and data sequence to obtain the graphic code of the data to be carried, Among them, after the legal reading end obtains the number of iterations based on the predetermined self-similar set graphic generation rule based on the graphic code, it parses and obtains the carried data based on the predetermined iteration rule matching the graphic code generation end.

2. The method according to claim 1, further comprising: According to the target number of iterations, obtaining a check code based on a predetermined algorithm; The verification code is drawn in the graphic code.

3. The method according to claim 1, further comprising: Concatenate the target number of iterations in order of data, and obtain a check code based on a predetermined algorithm; The verification code is drawn at a predetermined position in the graphic code or in a predetermined color.

4. The method according to claim 1, wherein: The predetermined iteration rule comprises a predetermined function; and / or, The predetermined self-similar set graph generation rule includes the Cantor three-point set rule.

5. The method according to claim 1, wherein: The predetermined arrangement rule is to arrange from top to bottom, from left to right, from inside to outside or from outside to inside, or to arrange in a circular shape from inside to outside or from outside to inside.

6. A graphic code generating device, comprising: A data segmentation unit, configured to sequentially segment the data to be carried into a plurality of portions not exceeding a predetermined length; The iteration number acquisition unit is configured to acquire a target iteration number based on the data to be carried and based on a predetermined iteration rule, including: acquiring the target iteration number based on each piece of data and based on the predetermined iteration rule; The graphic drawing unit is configured to generate a graphic code of the data to be carried according to a predetermined self-similar set graphic generation rule and the target number of iterations, including: generating a graphic code of a single piece of data according to the predetermined self-similar set graphic generation rule and the target number of iterations corresponding to each piece of data; combining the graphic code of the single piece of data according to a predetermined arrangement rule and a data sequence to obtain the graphic code of the data to be carried, Among them, after the legal reading end obtains the number of iterations based on the predetermined self-similar set graphic generation rule based on the graphic code, it parses and obtains the carried data based on the predetermined iteration rule matching the graphic code generation end.

7. The apparatus according to claim 6, further comprising: A check code acquisition unit is configured to acquire a check code based on a predetermined algorithm according to the target number of iterations; The graphic drawing unit is further configured to draw the verification code in the graphic code.

8. The apparatus according to claim 6, further comprising: A check code acquisition unit is configured to concatenate the target number of iterations in data order and acquire a check code based on a predetermined algorithm; The graphic drawing unit is further configured to draw the verification code at a predetermined position in the graphic code or in a predetermined color.

9. A graphic code generating device, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the method according to any one of claims 1 to 5 based on instructions stored in the memory.

10. A computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 5.