CN104424497B - A kind of method and device that dynamic two-dimension code generates - Google Patents

A kind of method and device that dynamic two-dimension code generates Download PDF

Info

Publication number
CN104424497B
CN104424497B CN201310408127.2A CN201310408127A CN104424497B CN 104424497 B CN104424497 B CN 104424497B CN 201310408127 A CN201310408127 A CN 201310408127A CN 104424497 B CN104424497 B CN 104424497B
Authority
CN
China
Prior art keywords
content
code
segmentation
encoded
dimensional code
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.)
Expired - Fee Related
Application number
CN201310408127.2A
Other languages
Chinese (zh)
Other versions
CN104424497A (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.)
Beijing Inspiry Technology Co Ltd
Original Assignee
王越
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 王越 filed Critical 王越
Priority to CN201310408127.2A priority Critical patent/CN104424497B/en
Publication of CN104424497A publication Critical patent/CN104424497A/en
Application granted granted Critical
Publication of CN104424497B publication Critical patent/CN104424497B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses the method and devices that a kind of dynamic two-dimension code generates, which comprises obtains QR code content;Current time stamp head is added before the QR code content of the acquisition generates encoded content;The encoded content is encoded;Content after being encoded carries out N equal part, and the segmentation array sum number group size N after obtaining equal part, wherein N is the quantity of final two dimensional code in dynamic two-dimension code;Traversing operation is carried out to the segmentation array;Two dimensional code array will have been obtained after traversal to show according to the display rule of setting.The technical solution through the invention due to presenting dynamic two-dimension code on electronic curtain by the way of the adjustable output of brush screen frame number, rather than uses the way of output of picture file, so thoroughly solving the problems, such as the anti-copying of electronic two-dimensional code.

Description

A kind of method and device that dynamic two-dimension code generates
Technical field
The present invention relates to the method and devices that mobile communication technology field more particularly to a kind of dynamic two-dimension code generate.
Background technique
Two dimensional code be with specific geometric figure, according to certain rule plane distribution chequered with black and white rectangle square matrix skill The barcode technology of new generation of art data symbol information, has been widely used for the every field of society, and two dimensional code holds with information The advantages that amount is big, and error correcting capability is strong, and recognition speed is fast and comprehensive recognition.With the arrival of the internet of things era, on a large amount of lines The form of information under line the more carrier shows, and two dimensional code is cheap with its, the characteristic that multichip carrier is presented, when nothing Ashamed becomes on the internet of things era line and under line, multichip carrier, the information entry of multimedia platform.
But with the extensive use of two dimensional code, common solid size, which encrypts, to be generated, the mode of solid size recognition parsing, not Be able to satisfy in society it is safer to two dimensional code, more for timeliness, the more complicated environment used.
Summary of the invention
It is involved in the problems, such as above-mentioned background technique, a kind of method and dress generated the present invention provides dynamic two-dimension code It sets.
The present invention provides a kind of method that dynamic two-dimension code generates, and includes the following steps;
Obtain QR code content;
Current time stamp head is added before the QR code content of the acquisition generates encoded content;
The encoded content is encoded;
Content after being encoded carries out N equal part, and the segmentation array sum number group size N after obtaining equal part, wherein N is The quantity of final two dimensional code in state two dimensional code;
Traversing operation is carried out to the segmentation array;
Two dimensional code array will have been obtained after traversal to show according to the display rule of setting.
Further, described to encode the encoded content, specific use includes:
The encoded content is subjected to Base64 coding.
Preferably, it is described the encoded content is encoded after, further includes:
Content after Base64 is encoded carries out cutting according to the version for the two dimensional code to be shown.
Further, described that traversing operation is carried out to the segmentation array, specifically includes the following steps:
The content for being segmented array is done into a public key encryption algorithm rsa encryption and obtains segmentation ciphertext;
Using dynamic two-dimension code version number, the serial number of segmentation and total segmentation two dimensional code quantity as head and segmentation ciphertext composition It is segmented QR code content;Wherein, for the serial number information of the segmentation from original setting, the serial number information includes serial number quantity And serial number ordering rule;
The segmentation QR code content is generated into two dimensional code.
The present invention also provides the device that a kind of dynamic two-dimension code generates, described device includes:
Acquiring unit, for obtaining QR code content;
Timestamp adding unit generates coding for adding current time stamp head before the QR code content of the acquisition Content;
Coding unit, for encoding the encoded content;
Cutting unit carries out N equal part for the content after being encoded, and the segmentation array sum number group after obtaining equal part is big Small N, wherein N is the quantity of final two dimensional code in dynamic two-dimension code;
Traversal Unit, for carrying out traversing operation to the segmentation array;
Display unit is produced, is shown for two dimensional code array will to have been obtained after traversal according to the display rule of setting Show.
Further, the coding unit, is specifically used for;
The encoded content is subjected to Base64 coding.
Preferably, the cutting unit, further includes:
Content after Base64 is encoded carries out cutting according to the version for the two dimensional code to be shown.
Further, the Traversal Unit, specifically includes;
Encrypting module obtains segmentation ciphertext for the content for being segmented array to be done a public key encryption algorithm rsa encryption;
Composite module, for using the serial number of dynamic two-dimension code version number, segmentation and total segmentation two dimensional code quantity as head With segmentation ciphertext composition segmentation QR code content;Wherein, the serial number information of the segmentation is from original setting, the serial number letter Breath includes serial number quantity and serial number ordering rule;
Module is produced, for the segmentation QR code content to be generated two dimensional code.
The present invention has the beneficial effect that:
The embodiment of the invention provides the method and device that a kind of dynamic two-dimension code generates, establish it is a kind of by the time, The multi-code two dimensional code that serial number, function generate means generates reading method, and the information editable having using two dimensional code itself is special Property, temporal information when by raw code or verification, and the different serial numbers in coding mode multi-code obtained are linked by structure, In conjunction with corresponding function, the incidental input information of two dimensional code itself in addition, integration generate it is multiple in groups and associated two dimension Code.It is shown in a planar form using dynamic or non-dynamic form.After distinguishing end acquisition dynamic or non-dynamic image, at After function distinguishes multi-code information, corresponding serial number and temporal information are obtained according to the inverse operation of function, while by this information and distinguishing After the pre-set serial number feature of the local institute in end and local clock information do logic comparison, successfully parse attached in multi-code Original two dimensional code information.The two dimensional code that the present invention generates can provide broader practice with universal for two dimensional code use.
Detailed description of the invention
Fig. 1 is that the flow diagram of the method for dynamic two-dimension code generation is provided in the embodiment of the present invention one;
Fig. 2 is the flow diagram of the traversal method provided in the embodiment of the present invention;
Fig. 3 is apparatus structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Embodiments of the present invention is further illustrated with reference to the accompanying drawings of the specification, but the present invention is not limited to following reality Apply example.
Embodiment one:
As shown in Figure 1, the method flow schematic diagram that a kind of dynamic two-dimension code to provide in the embodiment of the present invention one generates, It the described method comprises the following steps:
Step 101: obtaining QR code content;
Step 102: adding current time stamp head before the QR code content of the acquisition and generate encoded content;
Step 103: the encoded content is encoded;
Step 104: the content progress N equal part after being encoded, the segmentation array sum number group size N after obtaining equal part, Wherein N is the quantity of final two dimensional code in dynamic two-dimension code;
Step 105: traversing operation is carried out to the segmentation array;
Step 106: two dimensional code array will have been obtained after traversal and shown according to the display rule of setting.
Two dimensional code generation=f (raw information+key), wherein f is customized function, and variable is raw information and close The combination of key.
Key part=f (timestamp+serial number information), temporal information when timestamp is the life code defined or verification, Its time information content is derived from the system clock of raw code system or recognition system, can also be derived from the clothes of raw code or recognition system It is engaged in the clock at device end, when the clock of the life code system of individual and recognition system is inconsistent to be had differences, temporal information can also be with Be thought of as include its values of disparity variable time range.
Serial number information is from original setting comprising serial number quantity and serial number ordering rule, and raw code and recognition two End needs unified to serial number Rule Information or serial number rule information function is unified (to can be one group of special sequence side Formula is also possible to the sortord that multiple groups meet unified function).
Step 102 in embodiments of the present invention: in obtaining encoding plus current time stamp head before QR code content Hold as shown below:
Timestamp Space QR code content
Wherein step 103 specifically carries out Base64 coding using by the encoded content.
It is described the encoded content is encoded after, comprising: content after being encoded carries out N equal part, obtains Segmentation array sum number group size N after equal part, wherein N is the quantity of final two dimensional code in dynamic two-dimension code;Or it can incite somebody to action Content after Base64 coding carries out cutting according to the version for the two dimensional code to be shown.
Execute step 105 specifically includes the following steps:
Step 201: the content for being segmented array being done into a public key encryption algorithm rsa encryption and obtains segmentation ciphertext;
Step 202: using dynamic two-dimension code version number, the serial number of segmentation and total segmentation two dimensional code quantity as head and segmentation Ciphertext composition segmentation QR code content;Wherein, the serial number information of the segmentation includes from original setting, the serial number information Serial number quantity and serial number ordering rule;
Step 203: the segmentation QR code content is generated into two dimensional code.
Shown in figure specific as follows:
Edition code Space Serial number Space Total segments Space Ciphertext
As shown in figure 3, being a kind of device provided in an embodiment of the present invention, described device is with text editor and to lead to The device of function is talked about, such as mobile phone or smart phone, tablet computer pad with text editor and call function, this hair Bright embodiment is not limited in any way this.
A kind of device that dynamic two-dimension code generates, described device include:
Acquiring unit 301, for obtaining QR code content;
Timestamp adding unit 302 is generated for adding current time stamp head before the QR code content of the acquisition Encoded content;
Coding unit 303, for encoding the encoded content;
Cutting unit 304 carries out N equal part for the content after being encoded, the segmentation array sum number after obtaining equal part Group size N, wherein N is the quantity of final two dimensional code in dynamic two-dimension code;
Traversal Unit 305, for carrying out traversing operation to the segmentation array;
Produce display unit 306, for will traverse after obtained two dimensional code array according to setting display rule into Row display.
Coding unit 303 is wherein stated, is specifically used for:
The encoded content is subjected to Base64 coding.
Further, the cutting unit 304, further includes:
Content after Base64 is encoded carries out cutting according to the version for the two dimensional code to be shown.
Wherein, the Traversal Unit 305, specifically includes:
Encrypting module obtains segmentation ciphertext for the content for being segmented array to be done a public key encryption algorithm rsa encryption;
Composite module, for using the serial number of dynamic two-dimension code version number, segmentation and total segmentation two dimensional code quantity as head With segmentation ciphertext composition segmentation QR code content;Wherein, the serial number information of the segmentation is from original setting, the serial number letter Breath includes serial number quantity and serial number ordering rule;
Module is produced, for the segmentation QR code content to be generated two dimensional code.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (4)

1. a kind of method that dynamic two-dimension code generates, which comprises the following steps:
Obtain QR code content;
Current time stamp head is added before the QR code content of the acquisition generates encoded content;
The encoded content is encoded, wherein described to encode the encoded content, specific use includes: by institute It states encoded content and carries out Base64 coding;
Content after being encoded carries out N equal part, and the segmentation array sum number group size N after obtaining equal part, wherein N is dynamic two Tie up the quantity of final two dimensional code in code;
To the segmentation array carry out traversing operation, wherein it is described to the segmentation array progress traversing operation, specifically include with Lower step: the content for being segmented array is done into a public key encryption algorithm rsa encryption and obtains segmentation ciphertext;By dynamic two-dimension code version Number, the serial number of segmentation and total segmentation two dimensional code quantity as head and segmentation ciphertext composition be segmented QR code content;Wherein, described For the serial number information of segmentation from original setting, the serial number information includes serial number quantity and serial number ordering rule;It will be described It is segmented QR code content and generates two dimensional code;
Two dimensional code array has been obtained after traversing successfully to show according to the display rule of setting.
2. the method that dynamic two-dimension code as described in claim 1 generates, which is characterized in that described to carry out the encoded content After coding, further includes:
Content after Base64 is encoded carries out cutting according to the version for the two dimensional code to be shown.
3. the device that a kind of dynamic two-dimension code generates, which is characterized in that described device includes:
Acquiring unit, for obtaining QR code content;
Timestamp adding unit generates in coding for adding current time stamp head before the QR code content of the acquisition Hold;
Coding unit, for encoding the encoded content, wherein the coding unit is specifically used for the coding Content carries out Base64 coding;
Cutting unit carries out N equal part for the content after being encoded, the segmentation array sum number group size N after obtaining equal part, Wherein N is the quantity of final two dimensional code in dynamic two-dimension code;
Traversal Unit, for carrying out traversing operation to the segmentation array, wherein the Traversal Unit specifically includes: encryption mould Block obtains segmentation ciphertext for the content for being segmented array to be done a public key encryption algorithm rsa encryption;Composite module, being used for will Dynamic two-dimension code version number, the serial number of segmentation and total segmentation two dimensional code quantity are as head and segmentation ciphertext composition segmentation two dimensional code Content;Wherein, for the serial number information of the segmentation from original setting, the serial number information includes serial number quantity and serial number row Sequence rule;Module is produced, for the segmentation QR code content to be generated two dimensional code;
Display unit is produced, is shown for having obtained two dimensional code array after traversing successfully according to the display rule of setting.
4. device as claimed in claim 3, which is characterized in that the cutting unit, further includes: in after encoding Base64 Hold and cutting is carried out according to the version for the two dimensional code to be shown.
CN201310408127.2A 2013-09-10 2013-09-10 A kind of method and device that dynamic two-dimension code generates Expired - Fee Related CN104424497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310408127.2A CN104424497B (en) 2013-09-10 2013-09-10 A kind of method and device that dynamic two-dimension code generates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310408127.2A CN104424497B (en) 2013-09-10 2013-09-10 A kind of method and device that dynamic two-dimension code generates

Publications (2)

Publication Number Publication Date
CN104424497A CN104424497A (en) 2015-03-18
CN104424497B true CN104424497B (en) 2019-05-28

Family

ID=52973405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310408127.2A Expired - Fee Related CN104424497B (en) 2013-09-10 2013-09-10 A kind of method and device that dynamic two-dimension code generates

Country Status (1)

Country Link
CN (1) CN104424497B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339741A (en) * 2016-08-31 2017-01-18 陈凌云 Dynamic two-dimensional code generation method, device, identification method and device
CN106981012A (en) * 2017-03-21 2017-07-25 上海动联信息技术股份有限公司 A kind of dynamic two-dimension code order generation method and equipment
CN109948763A (en) * 2017-12-21 2019-06-28 武汉矽感科技有限公司 A kind of method and device generating dynamic two-dimension code
CN108449184A (en) * 2018-03-22 2018-08-24 顾家豪 A kind of dynamic two-dimension code generates and identifying system
CN109840576A (en) * 2019-01-18 2019-06-04 深圳大学 The generation method and coding/decoding method of anti-copying two dimensional code based on segmentation insertion
CN110718004B (en) * 2019-09-29 2021-07-20 深圳深岚视觉科技有限公司 Unlocking method and device and storage medium
CN113344161A (en) * 2021-06-29 2021-09-03 平安普惠企业管理有限公司 Dynamic QR code generation method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710929A (en) * 2005-07-11 2005-12-21 北京中星微电子有限公司 Data communication system and method of hand-held apparatus
JP2008269550A (en) * 2007-03-27 2008-11-06 Masayuki Taguchi Recognition system for dynamically displayed two-dimensional code
CN101593279A (en) * 2008-05-28 2009-12-02 中华电信股份有限公司 Dynamic bar codes shows and authentication method
CN102760242A (en) * 2012-05-16 2012-10-31 孟智平 Encoding and decoding method for three-dimensional codes and using method
CN102831163A (en) * 2012-07-20 2012-12-19 江苏缨思贝睿物联网科技有限公司 Data transfer method and data transfer system
KR20130033516A (en) * 2011-09-16 2013-04-04 강석영 Method for providing information using 2-dimensional code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130011791A (en) * 2011-07-22 2013-01-30 한국전자통신연구원 Apparatus and method for dynamic multi-dimensional codes with time and visual recognition information

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710929A (en) * 2005-07-11 2005-12-21 北京中星微电子有限公司 Data communication system and method of hand-held apparatus
JP2008269550A (en) * 2007-03-27 2008-11-06 Masayuki Taguchi Recognition system for dynamically displayed two-dimensional code
CN101593279A (en) * 2008-05-28 2009-12-02 中华电信股份有限公司 Dynamic bar codes shows and authentication method
KR20130033516A (en) * 2011-09-16 2013-04-04 강석영 Method for providing information using 2-dimensional code
CN102760242A (en) * 2012-05-16 2012-10-31 孟智平 Encoding and decoding method for three-dimensional codes and using method
CN102831163A (en) * 2012-07-20 2012-12-19 江苏缨思贝睿物联网科技有限公司 Data transfer method and data transfer system

Also Published As

Publication number Publication date
CN104424497A (en) 2015-03-18

Similar Documents

Publication Publication Date Title
CN104424497B (en) A kind of method and device that dynamic two-dimension code generates
CN104424498B (en) A kind of method and device of high speed transformation two dimensional code coding
CN103870861B (en) A kind of method and apparatus generating Quick Response Code
CN111510752B (en) Data transmission method, device, server and storage medium
CN108269062B (en) Electronic contract making method, device, equipment and medium based on H5
CN110321675B (en) Webpage watermark-based generation and tracing method and device
CN109831302A (en) PDF electronic signature method and system based on national secret algorithm
CN105763762B (en) A kind of image encryption and the method and apparatus of decryption
CN104602238A (en) Wireless network connecting method, device and system
CN104394022A (en) Network equipment identification method and device
CN105005568B (en) Web page front end processing device and method based on template
CN105117759A (en) Dynamic two-dimensional code generating method, reading method, generating apparatuses and reading apparatuses
CN106156654A (en) File encryption apparatus and method
CN110704854B (en) Stream type encryption method aiming at text data reserved format
CN104038761A (en) Encrypted domain H.264/AVC video data hiding method based on CABAC binary string mapping
CN104038767A (en) Encryption domain H.264/AVC (Advanced Video Coding) video data hiding method compatible with CABAC (Context-based Adaptive Binary Arithmetic Coding)
CN105025102A (en) Network storage and calling method and storage system of 3D printing model file
CN104680215A (en) Making method and decoding method for two-dimensional code graph
CN111242259B (en) Intelligent anti-counterfeiting code encoding and decoding method and system
CN103745252B (en) Coding row, two-dimentional code encoding method and Quick Response Code coding/decoding method
CN110990846B (en) Information storage method, device and computer readable storage medium
CN111260532B (en) Privacy image encryption method, device, electronic equipment and computer readable storage medium
CN103873245B (en) Dummy machine system data ciphering method and equipment
CN113298687B (en) Watermark image adding method and device
CN108985109A (en) A kind of date storage method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190710

Address after: 100094 4th Floor 412-1, Building 5, East Yard, No. 10 Wangdong Road, Northwest Haidian District, Beijing

Patentee after: Yirui Xinchuang Science & Technology Co., Ltd., Beijing

Address before: 150000 room 1405, unit 1, West three road 28, Daoli District, Harbin, Heilongjiang.

Patentee before: Wang Yue

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190528

Termination date: 20200910

CF01 Termination of patent right due to non-payment of annual fee