CN109635905A - Two-dimensional code generation method, apparatus and system - Google Patents

Two-dimensional code generation method, apparatus and system Download PDF

Info

Publication number
CN109635905A
CN109635905A CN201811492167.9A CN201811492167A CN109635905A CN 109635905 A CN109635905 A CN 109635905A CN 201811492167 A CN201811492167 A CN 201811492167A CN 109635905 A CN109635905 A CN 109635905A
Authority
CN
China
Prior art keywords
dimensional code
data
encrypted
datas
classified
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.)
Granted
Application number
CN201811492167.9A
Other languages
Chinese (zh)
Other versions
CN109635905B (en
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.)
Nanjing Zhongfu Information Technology Co Ltd
Original Assignee
Nanjing Zhongfu Information Technology 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 Nanjing Zhongfu Information Technology Co Ltd filed Critical Nanjing Zhongfu Information Technology Co Ltd
Priority to CN201811492167.9A priority Critical patent/CN109635905B/en
Publication of CN109635905A publication Critical patent/CN109635905A/en
Application granted granted Critical
Publication of CN109635905B publication Critical patent/CN109635905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • H04L63/205Network architectures or network communication protocols for network security for managing network security; network security policies in general involving negotiation or determination of the one or more network security mechanisms to be used, e.g. by negotiation between the client and the server or between peers or by selection according to the capabilities of the entities involved

Abstract

The present invention provides a kind of two-dimensional code generation methods, apparatus and system, first acquisition be-encrypted data;According to preset level of confidentiality division rule, level of confidentiality division is carried out to the be-encrypted data, obtains multiple classified datas;Then multiple classified datas are passed through corresponding public key to encrypt respectively, obtains corresponding multiple encrypted datas;By preset two dimensional code generating algorithm, the corresponding two dimensional code of multiple encrypted datas is generated.The present invention divides level of confidentiality encryption to generate two dimensional code classified data by public key, in the scene for needing information carrying out level of confidentiality differentiation, improves the practicability of two dimensional code, while being conducive to two dimensional code and storing more data.

Description

Two-dimensional code generation method, apparatus and system
Technical field
The present invention relates to two dimensional code encryption technology fields, more particularly, to a kind of two-dimensional code generation method, device and its are System.
Background technique
Existing planar bar code technology substantially belongs to wildcard type, i.e., all users belong to the same level of confidentiality, it can be seen that Same data information, such scene can be applicable in some public arenas, but need information carrying out level of confidentiality some The scene of differentiation is just less practical, such as supermarket, customer with Supermarket management person be to the permission that merchandise news is known it is different, The price of commodity, the place of production, date of manufacture are seen desired by customer, and administrator then wishes to inventory and the sale feelings of commodity Condition.Therefore, in the scene for needing information carrying out level of confidentiality differentiation, the practicability is poor for existing planar bar code technology.
Summary of the invention
In view of this, the purpose of the present invention is to provide two-dimensional code generation method, apparatus and system, it is raw to improve two dimensional code At the practicability of technology.
In a first aspect, the embodiment of the invention provides a kind of two-dimensional code generation methods, this method comprises: obtaining number to be encrypted According to;According to preset level of confidentiality division rule, level of confidentiality division is carried out to be-encrypted data, obtains multiple classified datas;It will be multiple close Grade data pass through corresponding public key respectively and are encrypted, and obtain corresponding multiple encrypted datas;Pass through preset two dimensional code Generating algorithm generates the corresponding two dimensional code of multiple encrypted datas.
With reference to first aspect, the embodiment of the invention provides the first possible embodiments of first aspect, wherein raw After the corresponding two dimensional code of multiple encrypted datas, this method further include: scan the two-dimensional code, obtained by two dimensional code analytical algorithm To multiple encrypted datas;Multiple encrypted datas are passed through corresponding private key to be decrypted respectively, are obtained corresponding multiple Classified data.
With reference to first aspect, the embodiment of the invention provides second of possible embodiments of first aspect, wherein on It states and multiple classified datas is passed through into the step of corresponding public key encrypts, obtains corresponding multiple encrypted datas respectively, It include: that the corresponding public key of each classified data is obtained according to RSA Algorithm;According to corresponding public key, each classified data is carried out Encryption, to obtain multiple encrypted datas.
With reference to first aspect, the embodiment of the invention provides the third possible embodiments of first aspect, wherein on The step of stating through preset two dimensional code generating algorithm, generating multiple encrypted datas corresponding two dimensional code, comprising: to multiple plus Data carry out outer layer encryption after close, obtain two-dimensional code data;Numeric data code word and error correcting code word are carried out to two-dimensional code data, entangled Two-dimensional code data after just;Internal layer encryption is carried out to two-dimensional code data after correction, generates two dimensional code.
With reference to first aspect, the embodiment of the invention provides the 4th kind of possible embodiments of first aspect, wherein on Stating two dimensional code includes two-dimensional bar code and matrix two-dimensional code.
With reference to first aspect, the embodiment of the invention provides the 5th kind of possible embodiments of first aspect, wherein on It states and multiple encrypted datas is passed through into the step of corresponding private key is decrypted, obtains corresponding multiple classified datas respectively, It include: that the corresponding private key of each encrypted data is obtained according to RSA Algorithm;According to opposite private key, to each encrypted data It is decrypted, to obtain multiple classified datas.
Second aspect, the embodiment of the present invention also provide a kind of two dimensional code generating means, which includes: data acquisition mould Block, for obtaining be-encrypted data;Level of confidentiality division module, for according to preset level of confidentiality division rule, to be-encrypted data into Row level of confidentiality divides, and obtains multiple classified datas;Data encryption module, for multiple classified datas to be passed through corresponding public key respectively It is encrypted, obtains corresponding multiple encrypted datas;Two-dimensional code generation module is calculated for being generated by preset two dimensional code Method generates the corresponding two dimensional code of multiple encrypted datas.
In conjunction with second aspect, the embodiment of the invention provides the first possible embodiments of second aspect, wherein should Device further include: Response Code scan module counts after obtaining multiple encryptions by two dimensional code analytical algorithm for scanning the two-dimensional code According to;Data decryption module is decrypted for multiple encrypted datas to be passed through corresponding private key respectively, obtains corresponding more A classified data.
In conjunction with second aspect, the embodiment of the invention provides second of possible embodiments of second aspect, wherein on Data encryption module is stated, is also used to: according to RSA Algorithm, obtaining the corresponding public key of each classified data;According to corresponding public key, Each classified data is encrypted, to obtain multiple encrypted datas.
The third aspect, the embodiment of the present invention also provide a kind of two dimensional code generation system, which includes the two dimensional code manufacturing side End is used with two dimensional code;The two dimensional code manufacturing side is encrypted be-encrypted data by public key, and generates two dimensional code;Two dimensional code makes It is scanned the two-dimensional code with end, and encrypted data is decrypted, obtain corresponding classified data.
The embodiment of the present invention bring it is following the utility model has the advantages that
The present invention provides a kind of two-dimensional code generation methods, apparatus and system, first acquisition be-encrypted data;According to default Level of confidentiality division rule, to the be-encrypted data carry out level of confidentiality division, obtain multiple classified datas;Then by multiple classified datas It is encrypted respectively by corresponding public key, obtains corresponding multiple encrypted datas;It is generated and is calculated by preset two dimensional code Method generates the corresponding two dimensional code of multiple encrypted datas.The present invention divides level of confidentiality encryption to generate two dimension classified data by public key Code improves the practicability of two dimensional code in the scene for needing information carrying out level of confidentiality differentiation, while being conducive to two dimensional code storage More data.
Other features and advantages of the present invention will illustrate in the following description, alternatively, Partial Feature and advantage can be with Deduce from specification or unambiguously determine, or by implementing above-mentioned technology of the invention it can be learnt that.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, better embodiment is cited below particularly, and match Appended attached drawing is closed, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of two-dimensional code generation method provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the two-dimensional code generation method of two classified datas provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another two-dimensional code generation method provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram that two dimensional code provided in an embodiment of the present invention generates;
Fig. 5 is a kind of flow chart of two dimensional code decryption method provided in an embodiment of the present invention;
Fig. 6 is a kind of flow chart of two-dimensional code scanning verification method provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of two dimensional code generating means provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Existing planar bar code technology substantially belongs to wildcard type, i.e., all users belong to same level of confidentiality, it can be seen that same Data information, needing by information carry out level of confidentiality differentiation scene in, the practicability is poor for existing planar bar code technology, be based on this, A kind of two-dimensional code generation method provided in an embodiment of the present invention, apparatus and system, the technology can be applied to supermarket, market and its He needs to carry out information in the scene of level of confidentiality differentiation.
For convenient for understanding the present embodiment, first to a kind of two-dimensional code generation method disclosed in the embodiment of the present invention It describes in detail.
A kind of flow chart of two-dimensional code generation method shown in Figure 1, the specific steps of this method, comprising:
Step S102 obtains be-encrypted data.
Above-mentioned be-encrypted data is usually the information data in the scene for need to carry out information data level of confidentiality differentiation, the letter Breath data can be divided into different classified datas according to the difference of level of confidentiality, and therefore, the user for possessing different security level is available The data that can be obtained in oneself permission.
Step S104 carries out level of confidentiality division to be-encrypted data, obtains multiple levels of confidentiality according to preset level of confidentiality division rule Data.
Above-mentioned preset level of confidentiality division rule, which can be, carries out level of confidentiality division, example for be-encrypted data according to user type Such as, it is difference in the merchandise news that supermarket, customer and Supermarket management person wish to, therefore, merchandise news can be divided into two A classified data, a classified data include price, the place of production and the date of manufacture etc. that customer wishes to, another classified data The inventory of the commodity wished to including Supermarket management person and sales situation etc..
Multiple classified datas are passed through corresponding public key respectively and encrypted by step S106, obtain it is corresponding it is multiple plus Data after close.
The band encryption data of acquisition is subjected to graded encryption, wherein each classified data is added using different public keys It is close, for example, being respectively Low Security Level data and High Security Level data there are two classified data, Low Security Level data are carried out using public key 1 Encryption, obtains encrypted data 1;Highly dense data are encrypted using public key 2, obtain encrypted data 2, wherein encryption RSA Algorithm can be used in algorithm.
Above-mentioned RSA Algorithm can be described as asymmetric algorithm for encryption technology, which (is equivalent to using public-key cryptography Above-mentioned public key), and decruption key is maintained secrecy using private key, the encryption-decryption algorithm of RSA Algorithm be it is disclosed, i.e., added by public key Close content can with and can only be decrypted by private key, and by the content of private key encryption can with and can only be carried out by public key Decryption, that is to say, that this pair of of public key, the private key of RSA Algorithm may serve to encrypt and decrypt, and the content of side encryption Can by and can only be decrypted by other side.
Step S108 generates the corresponding two dimensional code of multiple encrypted datas by preset two dimensional code generating algorithm.
Above-mentioned preset two dimensional code generating algorithm generate two dimensional code the step of are as follows: outer layer is carried out to multiple encrypted datas Encryption, obtains two-dimensional code data;Numeric data code word and error correcting code word, two-dimensional code data after being corrected are carried out to two-dimensional code data; Internal layer encryption is carried out to two-dimensional code data after correction, generates two dimensional code.
By multiple encrypted datas by two dimensional code generating algorithm, corresponding two dimensional code is generated, for example, by above-mentioned Low Security Level Data and the corresponding encrypted data 1 of High Security Level data and encrypted data 2, obtain two dimensional code by two dimensional code generating algorithm, It is illustrated in figure 2 the flow chart of the two-dimensional code generation method of two classified datas.
Two dimensional code user scans the two-dimensional code the above-mentioned two dimensional code that authenticating party obtains, and after scan data is put into oneself Platform, finally by the level of confidentiality permission of oneself obtain corresponding private key from two dimensional code authenticating party, by private key to two dimensional code carry out Data deciphering, to obtain the data that can be obtained in oneself level of confidentiality permission.
The embodiment of the invention provides a kind of two-dimensional code generation methods, first acquisition be-encrypted data;According to preset close Grade division rule carries out level of confidentiality division to the be-encrypted data, obtains multiple classified datas;Then multiple classified datas are distinguished It is encrypted by corresponding public key, obtains corresponding multiple encrypted datas;It is raw by preset two dimensional code generating algorithm At the corresponding two dimensional code of multiple encrypted datas.The present invention divides level of confidentiality encryption to generate two dimensional code classified data by public key, In the scene for needing to carry out information level of confidentiality differentiation, the practicability of two dimensional code is improved, while it is more to be conducive to two dimensional code storage Data.
The embodiment of the invention also provides another two-dimensional code generation method, on the basis of this method method shown in Fig. 1 It realizes;The flow chart of another two-dimensional code generation method shown in Figure 3, the specific steps of this method, comprising:
Step S302 obtains be-encrypted data.
Step S304 carries out level of confidentiality division to be-encrypted data, obtains multiple levels of confidentiality according to preset level of confidentiality division rule Data.
Step S306 obtains the corresponding public key of each classified data according to RSA Algorithm.
Above-mentioned RSA Algorithm is a kind of public key encryption algorithm, and it is true which is based on a foolproof number theory: by two It is very easy that Big prime is multiplied, but wants extremely difficult to its product progress factorization.Therefore product can be disclosed to work For encryption key, i.e. public key, and two Big primes are combined into private key;Public key can be issued for anyone use, and private key is then Oneself is all, is used for decryption.
Using RSA Algorithm, determines the corresponding public key of each classified data, encrypted with the data to each level of confidentiality.
Step S308 encrypts each classified data according to corresponding public key, to obtain multiple encrypted datas.
Each classified data corresponds to different public keys, and each classified data is directed to its corresponding public key and is added It is close, obtain the corresponding encrypted data of all classified datas.
Step S310 carries out outer layer encryption to multiple encrypted datas, obtains two-dimensional code data.
Step S312 carries out numeric data code word and error correcting code word, two-dimensional code data after being corrected to two-dimensional code data.
Step S314 carries out internal layer encryption to two-dimensional code data after correction, generates two dimensional code.
It is illustrated in figure 4 the schematic diagram of two dimensional code generation, first by text (being equivalent to above-mentioned encrypted data) or figure Piece carries out outer layer encryption, obtains two-dimensional code data, and two-dimensional code data is then carried out numeric data code word, is equivalent to two-dimensional code data It is encoded, then error correction (being equivalent to error correcting code word) is carried out to the data after coding, the two-dimensional code data after being corrected;Then Internal layer encryption is carried out to the two-dimensional code data after correction, ultimately produces two dimensional code.The two dimensional code mass two-dimensional bar code (PDF417 Code) and matrix two-dimensional code (QR).
The present embodiment is by distinguishing encryption to two-dimensional code data, to achieve the effect that divide level of confidentiality;Meanwhile from data Encryption direction improves existing planar bar code technology, although the data of existing two dimensional code storage are few, by changing for algorithm Into the data of two dimensional code storage from now on have the growth of the order of magnitude, and therefore, the encryption of two-dimensional code data is just particularly important.
Corresponding to above-mentioned two-dimensional code generation method embodiment, a kind of process of two dimensional code decryption method shown in Figure 5 Figure;This method is applied to after generating the corresponding two dimensional code of multiple encrypted datas, the specific steps of this method, comprising:
Step S502, scans the two-dimensional code, and obtains multiple encrypted datas by two dimensional code analytical algorithm.
The image of two-dimensional barcode information is determined by positioning pattern on two dimensional code and separator first;Positioning pattern determines two The coordinate for tieing up module in code sign, the module in two dimensional code are fixed, including correction graph, version information, data and are entangled Error code;Separator can separate figure and two-dimensional barcode information image;Then gray processing two-dimensional barcode information pixel, then remove two dimension The noise of code information pixels;Then binaryzation two-dimensional barcode information pixel;Two dimensional code decoding and error correction are finally carried out, is obtained corresponding Encrypted data.
Multiple encrypted datas are passed through corresponding private key respectively and are decrypted by step S504, are obtained corresponding multiple Classified data.
Above-mentioned steps further include: according to RSA Algorithm, obtain the corresponding private key of each encrypted data;According to corresponding private Each encrypted data is decrypted in key, to obtain multiple classified datas.
For example, participating in a kind of flow chart of two-dimensional code scanning verification method shown in fig. 6, scans the two-dimensional code, pass through two dimension Code analytical algorithm obtains two-dimensional code data, includes two encrypted datas in two-dimensional code data, respectively encryption 1 He of rear class data Encrypted data 2;Encrypted data 1 is decrypted using private key 1 can be obtained Low Security Level data, and encrypted data 2 uses private key 2 It is decrypted and High Security Level data can be obtained, wherein RSA Algorithm can be used in decipherment algorithm.
The above-mentioned two dimensional code of scanning input, then user passes through the level of confidentiality permission of oneself, that is, level of confidentiality obtained by user The corresponding encrypted data in two dimensional code is decrypted in the corresponding private key of data, and it is corresponding to obtain oneself level of confidentiality permission Classified data.
Two dimensional code decipherment algorithm is present embodiments provided, the data of different security level can be solved respectively by RSA Algorithm It is close, in some scenes for needing information carrying out level of confidentiality differentiation, there is preferable practicability, while being also beneficial to planar bar code technology Development.
Corresponding to above method embodiment, a kind of structural schematic diagram of two dimensional code generating means shown in Figure 7, the dress It sets and includes:
Data acquisition module 70, for obtaining be-encrypted data;
Level of confidentiality division module 71, for carrying out level of confidentiality division to be-encrypted data, obtaining according to preset level of confidentiality division rule To multiple classified datas;
Data encryption module 72 is encrypted for multiple classified datas to be passed through corresponding public key respectively, is obtained opposite The multiple encrypted datas answered;
Two-dimensional code generation module 73, for it is corresponding to generate multiple encrypted datas by preset two dimensional code generating algorithm Two dimensional code.
Further, device further include: Response Code scan module is parsed by two dimensional code and calculated for scanning the two-dimensional code Method obtains multiple encrypted datas;Data decryption module is carried out for multiple encrypted datas to be passed through corresponding private key respectively Decryption, obtains corresponding multiple classified datas.
Further, above-mentioned data encryption module, is also used to: according to RSA Algorithm, obtaining the corresponding public affairs of each classified data Key;According to corresponding public key, each classified data is encrypted, to obtain multiple encrypted datas.
Two dimensional code generating means provided in an embodiment of the present invention, have with two-dimensional code generation method provided by the above embodiment Identical technical characteristic reaches identical technical effect so also can solve identical technical problem.
The present embodiment additionally provides a kind of a kind of two dimensional code generation system corresponding to the above method embodiment, the system End is used including the two dimensional code manufacturing side and two dimensional code;The two dimensional code manufacturing side is encrypted be-encrypted data by public key, and raw At two dimensional code;Two dimensional code is scanned the two-dimensional code using end, and encrypted data is decrypted, and obtains corresponding classified data.
The computer program product of two-dimensional code generation method, apparatus and system provided by the embodiment of the present invention, including deposit The computer readable storage medium of program code is stored up, the instruction that said program code includes can be used for executing previous methods implementation Method described in example, specific implementation can be found in embodiment of the method, and details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description And/or the specific work process of device, it can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of two-dimensional code generation method, which is characterized in that the described method includes:
Obtain be-encrypted data;
According to preset level of confidentiality division rule, level of confidentiality division is carried out to the be-encrypted data, obtains multiple classified datas;
Multiple classified datas are passed through corresponding public key to encrypt respectively, obtain corresponding multiple encrypted datas;
By preset two dimensional code generating algorithm, the corresponding two dimensional code of multiple encrypted datas is generated.
2. the method according to claim 1, wherein generate the corresponding two dimensional code of multiple encrypted datas it Afterwards, the method also includes:
The two dimensional code is scanned, multiple encrypted datas are obtained by two dimensional code analytical algorithm;
Multiple encrypted datas are passed through corresponding private key to be decrypted respectively, obtain corresponding multiple level of confidentiality numbers According to.
3. the method according to claim 1, wherein it is described multiple classified datas are passed through respectively it is corresponding The step of public key is encrypted, and corresponding multiple encrypted datas are obtained, comprising:
According to RSA Algorithm, the corresponding public key of each classified data is obtained;
According to the corresponding public key, each classified data is encrypted, to obtain multiple encrypted datas.
4. generation is more the method according to claim 1, wherein described by preset two dimensional code generating algorithm The step of a encrypted data corresponding two dimensional code, comprising:
Outer layer encryption is carried out to multiple encrypted datas, obtains two-dimensional code data;
Numeric data code word and error correcting code word, two-dimensional code data after being corrected are carried out to two-dimensional code data;
Internal layer encryption is carried out to two-dimensional code data after the correction, generates the two dimensional code.
5. according to the method described in claim 4, it is characterized in that, the two dimensional code includes two-dimensional bar code and matrix two-dimensional code.
6. according to the method described in claim 2, it is characterized in that, described pass through correspondence for multiple encrypted datas respectively Private key the step of being decrypted, obtaining corresponding multiple classified datas, comprising:
According to RSA Algorithm, the corresponding private key of each encrypted data is obtained;
According to the corresponding private key, each encrypted data is decrypted, to obtain multiple classified datas.
7. a kind of two dimensional code generating means, which is characterized in that described device includes:
Data acquisition module, for obtaining be-encrypted data;
Level of confidentiality division module, for carrying out level of confidentiality division to the be-encrypted data, obtaining according to preset level of confidentiality division rule Multiple classified datas;
Data encryption module is encrypted for multiple classified datas to be passed through corresponding public key respectively, is obtained corresponding Multiple encrypted datas;
Two-dimensional code generation module, for it is corresponding to generate multiple encrypted datas by preset two dimensional code generating algorithm Two dimensional code.
8. device according to claim 7, which is characterized in that described device further include:
Response Code scan module counts after obtaining multiple encryptions by two dimensional code analytical algorithm for scanning the two dimensional code According to;
Data decryption module is decrypted for multiple encrypted datas to be passed through corresponding private key respectively, obtains opposite The multiple classified datas answered.
9. device according to claim 7, which is characterized in that the data encryption module is also used to:
According to RSA Algorithm, the corresponding public key of each classified data is obtained;
According to the corresponding public key, each classified data is encrypted, to obtain multiple encrypted datas.
10. a kind of two dimensional code generates system, which is characterized in that the system comprises the two dimensional code manufacturing sides and two dimensional code to use end; The two dimensional code manufacturing side is encrypted be-encrypted data by public key, and generates two dimensional code;The two dimensional code is swept using end The two dimensional code is retouched, and encrypted data is decrypted, obtains corresponding classified data.
CN201811492167.9A 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system Active CN109635905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811492167.9A CN109635905B (en) 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811492167.9A CN109635905B (en) 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system

Publications (2)

Publication Number Publication Date
CN109635905A true CN109635905A (en) 2019-04-16
CN109635905B CN109635905B (en) 2022-09-02

Family

ID=66071683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811492167.9A Active CN109635905B (en) 2018-12-06 2018-12-06 Two-dimensional code generation method, device and system

Country Status (1)

Country Link
CN (1) CN109635905B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266683A (en) * 2019-06-18 2019-09-20 北京阿尔山区块链联盟科技有限公司 Digital asset sharing method, device and electronic equipment
CN112100206A (en) * 2020-11-13 2020-12-18 支付宝(杭州)信息技术有限公司 Digital label generation method, device, equipment and readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938497A (en) * 2010-09-26 2011-01-05 深圳大学 Multistage security file structure as well as file access control and secret key management user terminal, service terminal, system and method thereof
CN104268610A (en) * 2014-09-11 2015-01-07 重庆大学 Method for generating and reading graded QR code
CN106022196A (en) * 2016-06-30 2016-10-12 维沃移动通信有限公司 Information sharing method and intelligent terminal
CN106027460A (en) * 2015-03-16 2016-10-12 布谷鸟知识产权有限责任公司 Electronic communication method and method for accessing data of third-party database system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938497A (en) * 2010-09-26 2011-01-05 深圳大学 Multistage security file structure as well as file access control and secret key management user terminal, service terminal, system and method thereof
CN104268610A (en) * 2014-09-11 2015-01-07 重庆大学 Method for generating and reading graded QR code
CN106027460A (en) * 2015-03-16 2016-10-12 布谷鸟知识产权有限责任公司 Electronic communication method and method for accessing data of third-party database system
CN106022196A (en) * 2016-06-30 2016-10-12 维沃移动通信有限公司 Information sharing method and intelligent terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266683A (en) * 2019-06-18 2019-09-20 北京阿尔山区块链联盟科技有限公司 Digital asset sharing method, device and electronic equipment
CN112100206A (en) * 2020-11-13 2020-12-18 支付宝(杭州)信息技术有限公司 Digital label generation method, device, equipment and readable medium

Also Published As

Publication number Publication date
CN109635905B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
Shankar et al. Optimal key based homomorphic encryption for color image security aid of ant lion optimization algorithm
Panah et al. On the properties of non-media digital watermarking: a review of state of the art techniques
Kang et al. Color image encryption using pixel scrambling operator and reality-preserving MPFRHT
CN109767375A (en) The method and system of image watermark insertion and retrospect
CN109902494A (en) Data encryption storage method, device and document storage system
CN103618729A (en) Multi-mechanism hierarchical attribute-based encryption method applied to cloud storage
Shifa et al. Joint crypto-stego scheme for enhanced image protection with nearest-centroid clustering
CN107005408A (en) Public key encryption system
Arshad et al. An efficient image privacy scheme based on nonlinear chaotic system and linear canonical transformation
Abd El-Wahed et al. Efficiency and security of some image encryption algorithms
JP2012008816A (en) Authentication card, card authentication terminal, card authentication server and card authentication system
Cao et al. Secure QR code scheme based on visual cryptography
Alzubi et al. A novel chaotic map encryption methodology for image cryptography and secret communication with steganography
CN109635905A (en) Two-dimensional code generation method, apparatus and system
CN109495244A (en) Anti- quantum calculation cryptographic key negotiation method based on pool of symmetric keys
Ahmad et al. A secure network communication protocol based on text to barcode encryption algorithm
Punithavathi et al. Visual cryptography: A brief survey
CN109005196A (en) Data transmission method, data decryption method, device and electronic equipment
Wang et al. Image encryption algorithm based on bit-level permutation and dynamic overlap diffusion
CN111988144A (en) DNA one-time pad image encryption method based on multiple keys
Zhou A quantum image encryption method based on DNACNot
CN108540486A (en) The generation of cloud key and application method
Mandal Reversible steganography and authentication via transform encoding
CN113364590A (en) Block chain encryption method for production process data of multiple types of enterprises
Sharma et al. Multi-image steganography and authentication using crypto-stego techniques

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
GR01 Patent grant
GR01 Patent grant