CN111428838A - Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium - Google Patents

Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium Download PDF

Info

Publication number
CN111428838A
CN111428838A CN202010174702.7A CN202010174702A CN111428838A CN 111428838 A CN111428838 A CN 111428838A CN 202010174702 A CN202010174702 A CN 202010174702A CN 111428838 A CN111428838 A CN 111428838A
Authority
CN
China
Prior art keywords
code
encrypted
artistic
art
data
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
CN202010174702.7A
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.)
Zhengzhou University
Original Assignee
Zhengzhou University
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 Zhengzhou University filed Critical Zhengzhou University
Priority to CN202010174702.7A priority Critical patent/CN111428838A/en
Publication of CN111428838A publication Critical patent/CN111428838A/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the technical field of art QR codes, in particular to a method and a device for generating art QR codes, electronic equipment and a storage medium, wherein in the generating method, two-dimensional code data are encrypted to obtain encrypted two-dimensional code data; encoding the encrypted two-dimensional code data by utilizing an art QR code generation algorithm to generate an encrypted art QR code; storing the encrypted artistic QR code on a block chain; and issuing the encrypted artistic QR code. According to the method for generating the artistic QR code, provided by the embodiment of the invention, the homomorphic encryption algorithm is adopted for data protection, the characteristic that homomorphic encryption can directly process the ciphertext is utilized, the initial plaintext information is converted into the ciphertext for operation, the safety of the original data information is effectively protected, and the technical problem that the artistic QR code information is easy to tamper is solved by combining the technical characteristic that a block chain cannot be tampered.

Description

Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of artistic QR codes, in particular to a method and a device for generating an artistic QR code, electronic equipment and a storage medium.
Background
The two-dimensional code is also called as a two-dimensional bar code, the two-dimensional code is greatly convenient for the life of people, and the economic benefit is improved. The two-dimensional code is a pattern which is distributed on a plane according to a certain rule by using a certain specific geometric figure, is black and white and is used for recording data symbol information.
The artistic QR code belongs to one of two-dimensional codes, and the artistic QR code is a special two-dimensional code which is formed by fusing a two-dimensional code into a background picture. The two-dimensional code is obviously different from the common two-dimensional code in appearance, the black and white square lattices are not seen any more, and instead, a complete background picture is used, circular or square covering objects are hidden and visible on the background picture, and three positioning point squares are also arranged on the common two-dimensional code. The method specifically introduces the generation process of the art QR code in a Master thesis 'scanning robust art QR code generation' published by Zheng Zhou university in 2017 by an author Liqingfeng, and firstly generates a binary art QR code according to a corresponding feature extraction algorithm; then fusing the QR code module with image details according to a corresponding algorithm to generate a grayed artistic QR code; and finally, generating a color art QR code according to a brightness adjustment algorithm.
In practice, the inventors found that the above prior art has the following disadvantages:
the safety of the two-dimensional code is enhanced to a certain extent by the artistic QR code, but the risk of tampering of the built-in information is still faced.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a method and an apparatus for generating an artistic QR code, an electronic device, and a storage medium, wherein the technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for generating an artistic QR code, where the method includes the following steps:
encrypting the two-dimensional code data to obtain encrypted two-dimensional code data;
encoding the encrypted two-dimensional code data by utilizing an art QR code generation algorithm to generate an encrypted art QR code;
storing the encrypted artistic QR code on a block chain;
and issuing the encrypted artistic QR code.
In a second aspect, an embodiment of the present invention provides an apparatus for generating an artistic QR code, where the apparatus includes:
the encryption module is used for encrypting the two-dimensional code data to obtain encrypted two-dimensional code data;
the encoding module is used for encoding the encrypted two-dimensional code data by utilizing an art QR code generation algorithm to generate an encrypted art QR code;
the uplink storage module is used for storing the encrypted artistic QR code on a block chain; and
and the issuing module is used for issuing the encrypted artistic QR code.
In a third aspect, an embodiment of the present invention provides an electronic device for generating an artistic QR code, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the method for generating the artistic QR code is implemented.
In a fourth aspect, the embodiment of the present invention provides a storage medium, in which computer-readable program instructions are stored, and when the program instructions are executed by a processor, the method for generating an artistic QR code is implemented.
The invention has the following beneficial effects:
according to the method for generating the artistic QR code, provided by the embodiment of the invention, the homomorphic encryption algorithm is adopted for data protection, the characteristic that the homomorphic encryption can directly process the ciphertext is utilized, the initial plaintext information is converted into the ciphertext for operation, and the safety of the original data information is effectively protected; and the technical problem that the artistic QR code information is easy to be tampered is further solved by combining the technical characteristic that the block chain cannot be tampered.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for generating an artistic QR code according to an embodiment of the present invention;
fig. 2 is a diagram illustrating a result of encrypting two-dimensional code data according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an encrypted artistic QR code generated according to one embodiment of the present invention;
FIG. 4 is a block chain memory structure according to an embodiment of the present invention;
fig. 5 is a block diagram of an apparatus for generating an artistic QR code according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined object, the following detailed description is provided with reference to the accompanying drawings and preferred embodiments for a method, an apparatus, an electronic device and a storage medium for generating an artistic QR code according to the present invention, and the detailed implementation, structure, features and effects thereof are described below. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The specific schemes of the method and the device for generating the artistic QR code, the electronic device and the storage medium provided by the invention are specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for generating an artistic QR code according to an embodiment of the present invention is shown, in order to solve the technical problem of tampering a two-dimensional code, the embodiment of the present invention prevents the two-dimensional code from being tampered by using a multi-node storage characteristic of a block chain, encrypts initial plaintext information before encoding the two-dimensional code data for reinforcement and defense measures, and combines block chain storage and encryption before encoding to achieve a hierarchical layer-by-layer defense to prevent the two-dimensional code data from being tampered. Specifically, the artistic QR code generation method comprises the following steps:
and S001, encrypting the two-dimensional code data to obtain encrypted two-dimensional code data.
The two-dimensional code data comprises text data and background image data, wherein the text data can be text information such as a website, an email address, a contact way or WIFI configuration.
And encrypting the two-dimensional code data by adopting a homomorphic encryption algorithm. Specifically, a public key and a private key used by an encryption function generated by KeyGen are adopted, and then an Encrypt function is utilized to perform homomorphic encryption on input website data to obtain encrypted data.
And S002, encoding the encrypted two-dimensional code data generated in the step 001 by using an art QR code generation algorithm to generate an encrypted art QR code.
It should be noted that the artistic QR code generation algorithm is a general generation algorithm, and the artistic QR code generation algorithm is not the invention of the present application, and the generation algorithm capable of generating the artistic QR code by encoding can be applied to this scheme, and the specific generation algorithm to be used is a routine choice performed by those skilled in the art as needed.
And step S003, storing the encrypted artistic QR code on the block chain.
And (4) storing the encrypted artistic QR code generated in the step 002 into the block chain by using a Hash algorithm.
Preferably, when the encrypted artistic QR code is stored in the block chain, a block identification code is first assigned to the encrypted artistic QR code, and then the encrypted artistic QR code is stored in a block corresponding to the block identification code. Wherein each block has a unique block ID as a block ID.
It should be noted that the encrypted artistic QR code is stored in the block chain through the non-intelligent contract, and flexible data storage can be realized by storing data through the non-intelligent contract, so that the two-dimensional code data can be prevented from being tampered to a certain extent.
And step S004, issuing the encrypted artistic QR code.
And releasing the encrypted artistic QR codes stored in the block chain to the outside so as to be identified by scanning codes by a user.
In summary, the embodiment of the present invention provides a method for generating an art QR code, where the method encrypts and encodes original two-dimensional code data to generate a corresponding encrypted art QR code, and stores and issues the encrypted art QR code on a block chain. Because the block chain has the encryption algorithm, and the block chain encryption algorithm is different from the encryption algorithm of the original two-dimensional code data, the tampering difficulty of the two-dimensional code is increased, and the artistic QR code is prevented from being tampered.
To further illustrate the scheme of the present invention, the official website of zheng zhou university is taken as an example below, and the official website of zheng zhou university is: www.zzu.edu.cn, taking the website data as original two-dimensional code data needing to be stored in the artistic QR code, and selecting an image as a background image of the artistic QR code according to the requirement, wherein the artistic QR code generating method comprises the following steps:
step 101, encrypting the website data to obtain encrypted two-dimensional code data, wherein the encrypted two-dimensional code data is shown in fig. 2.
And 102, encoding the encrypted two-dimensional code data generated in the step 101 by using an art QR code generation algorithm, and generating an encrypted art QR code by fusing a background image, wherein the encrypted art QR code is shown in figure 3.
Step 103, using the block chain storage technology to store the encrypted artistic QR code shown in fig. 3 into the corresponding block in the block chain. As a result, fig. 4 is a schematic diagram of a blockchain storage structure, which includes information such as a block data value, a previous block hash value, a block number, and a date.
And 104, issuing the encrypted artistic QR code.
In summary, according to the method for generating the artistic QR code provided by the above embodiment, in the generation process, a homomorphic encryption algorithm is adopted for data protection; the characteristics of block chain decentralization and distributed data storage are utilized to store the QR code data information on the block chain, and due to the fact that the block chain has a synchronization mechanism, the correctness of corresponding artistic QR codes stored by other nodes cannot be influenced even if the artistic QR code of a certain node is tampered, if the information of most nodes is correct, the information tampering is invalid, the purpose of self-checking and error correction is achieved, and the problem that the artistic QR code information is easily tampered is solved.
Based on the same inventive concept as the method for generating the artistic QR code, the embodiment of the invention also provides a device for generating the artistic QR code.
Referring to fig. 5, another embodiment of the present invention provides an apparatus for generating an artistic QR code, which includes an encryption module 701, an encoding module 702, a uplink storage module 703 and a publishing module 704.
Specifically, the encryption module 701 is configured to encrypt the two-dimensional code data to obtain encrypted two-dimensional code data; the encoding module 702 is used for encoding the encrypted two-dimensional code data by using an art QR code generation algorithm to generate an encrypted art QR code; the uplink storage module 703 is used for storing the encrypted artistic QR code on the block chain; the issuing module 704 is used for issuing the encrypted artistic QR code.
Preferably, the uplink module further comprises an assignment identification code module and a storage module. The distribution identification code module is used for distributing block identification codes to the encrypted art QR codes; the storage module is used for storing the encrypted artistic QR code into the block corresponding to the block identification code.
An embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores a program code, and the program code is loaded and executed by the processor to implement the method for generating an artistic QR code as provided in the above method embodiment.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory.
The electronic device may be a server, and embodiments of the present invention further provide a schematic structural diagram of a server, please refer to fig. 6, for implementing the artistic QR code generation method provided in the above embodiments, the server 1200 may have relatively large differences due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1210 and memories 1240, and one or more storage media 1230 storing application programs 1233 or data 1232, wherein the memories 1240 and the storage media 1230 may be transient or persistent storage, the programs stored in the storage media 1230 may include one or more modules, each of which may include a series of instructions for the server, and further, the central processing Units 1210 may be configured to communicate with the storage media 1230 to execute the series of instructions in the storage media 1230 on the server 1200, the server 1200 may further include one or more power supplies 1220, one or more wired or wireless network interfaces 1250, one or more input and output interfaces 1260, and/or one or more Windows freex machines, Windows (tm) unix machines (tm) Windows (tm) machines) L, etc.
Embodiments of the present invention also provide a storage medium that can be disposed in a server to store computer program code related to implementing the artistic QR code generation method of the method embodiments, the program code being loaded and executed by the processor to implement the artistic QR code generation method provided by the above-described method embodiments.
Alternatively, in this embodiment, the storage medium may be located in at least one network server of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
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, as for the device and server embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A method for generating an artistic QR code is characterized by comprising the following steps:
encrypting the two-dimensional code data to obtain encrypted two-dimensional code data;
encoding the encrypted two-dimensional code data by utilizing an art QR code generation algorithm to generate an encrypted art QR code;
storing the encrypted artistic QR code on a block chain;
and issuing the encrypted artistic QR code.
2. The method for generating an artistic QR code according to claim 1, wherein the step of storing the encrypted artistic QR code on a block chain further comprises the steps of:
distributing a block identification code to the encrypted art QR code;
and storing the encrypted artistic QR code into the block corresponding to the block identification code.
3. An artistic QR code generation device, comprising:
the encryption module is used for encrypting the two-dimensional code data to obtain encrypted two-dimensional code data;
the encoding module is used for encoding the encrypted two-dimensional code data by utilizing an art QR code generation algorithm to generate an encrypted art QR code;
the uplink storage module is used for storing the encrypted artistic QR code on a block chain; and
and the issuing module is used for issuing the encrypted artistic QR code.
4. The apparatus of claim 3, wherein the winding module further comprises:
the distribution identification code module is used for distributing block identification codes to the encrypted art QR codes;
and the storage module is used for storing the encrypted artistic QR code into the block corresponding to the block identification code.
5. An electronic device for generating an artistic QR code, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method of any one of claims 1-2.
6. A storage medium having computer-readable program instructions stored therein, which when executed by a processor implement the method of any one of claims 1-2.
CN202010174702.7A 2020-03-13 2020-03-13 Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium Pending CN111428838A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010174702.7A CN111428838A (en) 2020-03-13 2020-03-13 Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010174702.7A CN111428838A (en) 2020-03-13 2020-03-13 Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111428838A true CN111428838A (en) 2020-07-17

Family

ID=71546564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010174702.7A Pending CN111428838A (en) 2020-03-13 2020-03-13 Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111428838A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108615193A (en) * 2018-04-28 2018-10-02 比飞力(深圳)科技有限公司 A kind of method and device of digital cash terminal transaction, digital cash and franc transaction
CN108876366A (en) * 2018-05-20 2018-11-23 智车优行科技(北京)有限公司 Processing method, system and the device of two dimensional code, vehicle, electronic equipment, program and medium
CN109150513A (en) * 2018-08-27 2019-01-04 深圳前海益链网络科技有限公司 Private key storage method, computer equipment and storage medium based on block chain
CN109242383A (en) * 2018-08-27 2019-01-18 合肥工业大学 Goods transportation method and system
CN109492366A (en) * 2018-10-16 2019-03-19 珠海横琴现联盛科技发展有限公司 Scenic spot coupon verification method based on anti-tamper Encryption Algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108615193A (en) * 2018-04-28 2018-10-02 比飞力(深圳)科技有限公司 A kind of method and device of digital cash terminal transaction, digital cash and franc transaction
CN108876366A (en) * 2018-05-20 2018-11-23 智车优行科技(北京)有限公司 Processing method, system and the device of two dimensional code, vehicle, electronic equipment, program and medium
CN109150513A (en) * 2018-08-27 2019-01-04 深圳前海益链网络科技有限公司 Private key storage method, computer equipment and storage medium based on block chain
CN109242383A (en) * 2018-08-27 2019-01-18 合肥工业大学 Goods transportation method and system
CN109492366A (en) * 2018-10-16 2019-03-19 珠海横琴现联盛科技发展有限公司 Scenic spot coupon verification method based on anti-tamper Encryption Algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李青锋: "扫描健壮的艺术QR码生成", 《中国优秀硕士学位论文全文数据库 (信息科技辑) 》 *

Similar Documents

Publication Publication Date Title
US10796011B1 (en) Data element tokenization management
CN110881063B (en) Storage method, device, equipment and medium of private data
CN111565107B (en) Key processing method and device based on cloud service platform and computer equipment
US20060181397A1 (en) Method and apparatus for associating randomized identifiers with tagged assets
EP3984161B1 (en) Cryptographic key generation using external entropy generation
CN104992119B (en) A kind of safe transmission method and system of sensitive information Anti-theft
CA2540720A1 (en) System and method for generating reproducible session keys
CN109658078A (en) Block chain private key generation method, device and medium based on biological characteristic
CN112035827B (en) Cipher data processing method, device, equipment and readable storage medium
CN105721156A (en) General Encoding Functions For Modular Exponentiation Encryption Schemes
CN111262852B (en) Business card signing and issuing method and system based on block chain
CN109787754A (en) A kind of data encryption/decryption method, computer readable storage medium and server
EP2913973A1 (en) Trusted NFC smart poster tag
CN114266033A (en) Verification code generation method and device, verification code login system and electronic equipment
CN105184115A (en) Method For Including An Implicit Integrity Or Authenticity Check Into A White-box Implementation
CN104753870B (en) a kind of data transmission method and system
CN104994095A (en) Equipment authentication method, clients, server and system
CN110100413A (en) Robust for certification calculates Fuzzy extractor and method
CA2913571A1 (en) Multi-platform user authentication device with double and multilaterally blind on-the-fly key generation
CN105281893A (en) Method for introducing dependence of white-box implementation on a set of strings
CN111428838A (en) Method and device for generating artistic QR (quick response) code, electronic equipment and storage medium
CN116132065A (en) Key determination method, device, computer equipment and storage medium
CN112597521A (en) Business data storage method and computer readable storage medium
CN109756646B (en) Block chain-based vector chapter management method and system
CN116722983B (en) Information security method and system for Internet of things terminal in urban planning field

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200717