CN103414695A - Compressing and encrypting method for QR codes - Google Patents

Compressing and encrypting method for QR codes Download PDF

Info

Publication number
CN103414695A
CN103414695A CN2013103054846A CN201310305484A CN103414695A CN 103414695 A CN103414695 A CN 103414695A CN 2013103054846 A CN2013103054846 A CN 2013103054846A CN 201310305484 A CN201310305484 A CN 201310305484A CN 103414695 A CN103414695 A CN 103414695A
Authority
CN
China
Prior art keywords
code
information
original information
original
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
CN2013103054846A
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.)
TIANJIN AIDIER SOFTWARE DEVELOPMENT Co Ltd
Original Assignee
TIANJIN AIDIER SOFTWARE DEVELOPMENT 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 TIANJIN AIDIER SOFTWARE DEVELOPMENT Co Ltd filed Critical TIANJIN AIDIER SOFTWARE DEVELOPMENT Co Ltd
Priority to CN2013103054846A priority Critical patent/CN103414695A/en
Publication of CN103414695A publication Critical patent/CN103414695A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention provides a compressing and encrypting method for QR codes. The method comprises the steps that original QR codes are read to be binary information; bit shifting is conducted on the original information, and data are encapsulated; the space which exists after bit shifting is conducted on the original information is filled with identifiers with indicated compressed formats; the original information is sequentially stored into the space which exists after bit shifting is conducted on the next bit; the spaces of the extended last eight bits with the original information stored are supplemented to be zero, and the spaces of the last eight bits after next extension are filled with stop characters; the data operated in the above steps generate the QR code again. By means of the technical scheme, information stored in the QR code can be fast and conveniently compressed, and the corresponding encryption effect is achieved objectively.

Description

The compression of QR code and encryption method
Technical field
The invention belongs to the Graphic Information in Computer field, especially relate to a kind of compression and encryption method of QR code.
Background technology
As everyone knows, the bar code of one dimension is through the development of more than ten years, its application is from the merchandise control that supermarket, convenience store are representative, the effective input information means of every profession and trade have been become, yet along with informationalized development rapidly, some new demands display: take in more information, be printed in less space.
High speed development along with network, outwardly, information exchange between enterprise and shared-required network infrastructure of electronic data interchange are set up, but in fact due to Internet protocol and security problems, also can't carry out exchanges data with the Internet in a short time, therefore need to use Quick Response Code to carry out the action of electronic data interchange on paper.
Quick Response Code is developed in order to adapt to such demand just, and the QR code has the characteristics such as high density, large capacity, error correcting capability are strong, has widened application.The application of Quick Response Code is more and more extensive now, its application and cell phone network are except being used for scanned business card, manage outside individual talk-back ability, can also bring shopping at network, realize automatic online, the processing of the data in the time of can also realizing settling accounts of mobile phone, or be to replace admission ticket etc. with the QR code.
The extensive use of two-dimensional bar code will bring new demand and the new problem of Bar Code.Such as needs in the IMAQ distortion, the two-dimensional bar code of can also well identifying and decode in the situation such as image background is more complicated, and anamorphose is serious.This numerous scientific research personnel to the study two-dimensional barcode technology be challenge be also power.
Bar codes technique is the integrated technology that integrates the technology such as bar code theory, photoelectric technology, computer technology, the communication technology, originates from the forties in 20th century.It has the characteristics such as high input speed, reliability is high, the Information Monitoring amount is large, cost is low, and development in recent years is very rapid, is widely used in the world the every field such as commodity circulation, logistic storage, information service, has greatly improved production efficiency.
In recent years, another field that extensively obtains popularizing was exactly mobile phone.Since the beginning of the nineties, wireless mobile technology and market application obtain develop rapidly and success.From beep-pager appearing on the market of 3G mobile up till now, Chinese have been accustomed to the cell phone in the hand and have ceaselessly changed.The focus of Mobile Communication Development, by the growth of number of users, transfers the growth of traffic carrying capacity and new business to; By technology, drive and transfer business-driven to.In fierce market competition, more and more ripe cellphone subscriber not only focuses on the outward appearance of mobile phone hardware, more focuses on the power that mobile phone is given.A new demand has been expedited the emergence of in above two universal fields: be about to Quick Response Code and mobile phone and combine, utilize mobile phone as fetch equipment, realize bar-code identification.With Quick Response Code, carried out in the last few years the existing corresponding research of mode of information exchange between mobile phone, the method that employing Quick Response Code as disclosed as Chinese patent 201210484060.6 carries out multi-platform mass data transmission.But conventional two-dimensional code institute energy canned data amount is limited, becomes the bottleneck that QR code transmission information is adopted in restriction.
Summary of the invention
The problem to be solved in the present invention is to provide a kind of compression and encryption method of QR code, is particularly suitable for adopting the QR code to carry out the scene of mass data transmission.
For solving the problems of the technologies described above, the technical solution used in the present invention is: a kind of compression of QR code and encryption method, and described method comprises:
1) original QR code is read as to binary information;
2) original information is carried out to displacement operation (bitshifting) encapsulation of data;
The indications that 3) will show compressed format is inserted the space after original information carries out displacement operation (bit shifting) operation;
4) original information is deposited in successively original information shared everybody carry out the space after displacement operation (bit shifting) operation
5) original information being stored into to last 8 bit spaces after expansion mend is 0.
6) last 8 bit spaces after next expansion are filled full stop;
7) data after aforesaid operations are regenerated to the QR code.
Owing to adopting technique scheme, can to Quick Response Code institute canned data, compress fast and easily, objectively also played corresponding encryption effect.Also facilitate the much information compression is merged in same QR code simultaneously, make the QR code can store more information.
The accompanying drawing explanation
Fig. 1 is the QR code schematic diagram in an example of the present invention
Fig. 2 is the QR code schematic diagram in another example of the present invention
Fig. 3 is the QR code schematic diagram that in the present invention, the first two QR code code Information Compression generates after merging
Embodiment
As shown in Figure 1, the corresponding information that can read out of the Quick Response Code in Fig. 1 is
" http://www.iitdev.com ", in for its generative process, according to the create-rule of QR code, change its corresponding letter, and add identification code and full stop according to rule according to following table, finally generate QR code as shown in Figure 1.In figure, carry out the black and white block in the QR code in representative graph 1 with 0 and 1,0 represents white block, and 1 represents the black block.This QR code can be used by 0 and 1 data that form and combine to mean, as 1111110100001000100000 ... ..
Figure 2013103054846100002DEST_PATH_IMAGE002
What Fig. 2 meaned is the QR code that 7954 these Serial No.s generate, and its generative process is identical with the described example of above-mentioned Fig. 1, is not described in detail at this.
In this array 0 and 1 is numeral, and in general its actual storage condition is as follows:
A byte (8)
1 1 1 1 1 1 0 1
At first, by displacement operation (bit shifting) is carried out in the shared position of legacy data, legacy data step-by-step and original order all are encapsulated in 8 positions that each byte comprises, and the first byte (first 8) is set to 1,111 1111 form, show that this content is the data to store by compress mode.
At this moment the unified encapsulation of above-mentioned field can be deposited in this byte, and 0 result of replacing after Reseal also of formerly having vacant position is as follows:
1 1 1 1 1 1 0 1
By said method, can, by the script array all being encapsulated in a byte with 8 to 1 ratio, to reach the saving memory space, also reach the function that legacy data can be encrypted simultaneously.
After legacy data is filled, in the end on an extension bits (8), may leave space, form following situation.
1 0 1 ? ? ? ? ?
At this moment need position more than the last extension bits that storage is used all to be filled to 0, become following storage condition.
1 0 1 0 0 0 0 0
Finally, insert full stop on next extension bits, front four bit-identifies of full stop are 0, and latter four are used for being illustrated on last expansion position and have several to be filled to be 0.The full stop of this example is as follows:
0 0 0 0 0 1 0 1
Show that all data have been compressed storage complete.Conveniently in follow-up decompression process, extract corresponding information.
Adopt this method also can carry out overlap-add procedure to two QR code information, the information unification of two QR codes is stored in to the purpose of same QR code.
What Fig. 2 was represented is the QR code that 7954 these Serial No.s generate, and its generative process is identical with the described example of above-mentioned Fig. 1, is not described in detail at this.
At first two width QR code figure are read to it accordingly by 0 and 1 information of carrying out the black and white block in the QR code in representative graph 1.According to the method for a upper example, the Information encapsulation in first QR code figure, in one or several byte, and is added to corresponding full stop according to above-mentioned form.Information encapsulation in second QR code figure, in other one or more bytes (comprise in the QR code data volume determine), and is added to corresponding full stop.All information is changed into to corresponding QR code, generate QR code as shown in Figure 3.
For the QR code of compressed rear generation, can adopt the above-mentioned method of compressing storage to carry out contrary the processing, at this, do not do more descriptions.
Above one embodiment of the present of invention are had been described in detail, but described content is only preferred embodiment of the present invention, can not be considered to be used to limiting practical range of the present invention.All equalizations of doing according to the present patent application scope change and improve etc., within all should still belonging to patent covering scope of the present invention.

Claims (1)

1. the compression of a QR code and encryption method, it is characterized in that: described method comprises:
1) original QR code is read as to binary information;
2) original information is carried out to displacement operation (bit shifting) encapsulation of data;
The indications that 3) will show compressed format is inserted the space after original information carries out displacement operation (bit shifting) operation;
4) original information is deposited in successively original information shared everybody carry out the space after displacement operation (bit shifting) operation;
5) original information being stored into to last 8 bit spaces after expansion mend is 0.
6) last 8 bit spaces after next expansion are filled full stop;
7) data after aforesaid operations are regenerated to the QR code.
CN2013103054846A 2013-07-18 2013-07-18 Compressing and encrypting method for QR codes Pending CN103414695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103054846A CN103414695A (en) 2013-07-18 2013-07-18 Compressing and encrypting method for QR codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103054846A CN103414695A (en) 2013-07-18 2013-07-18 Compressing and encrypting method for QR codes

Publications (1)

Publication Number Publication Date
CN103414695A true CN103414695A (en) 2013-11-27

Family

ID=49607681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103054846A Pending CN103414695A (en) 2013-07-18 2013-07-18 Compressing and encrypting method for QR codes

Country Status (1)

Country Link
CN (1) CN103414695A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102034127A (en) * 2009-09-28 2011-04-27 上海易悠通信息科技有限公司 Novel high-capacity two-dimensional barcode and system, encoding and decoding methods and applications thereof
CN102622630A (en) * 2012-02-24 2012-08-01 南京大学 Method for storing private data by aid of quick response (QR) codes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102034127A (en) * 2009-09-28 2011-04-27 上海易悠通信息科技有限公司 Novel high-capacity two-dimensional barcode and system, encoding and decoding methods and applications thereof
CN102622630A (en) * 2012-02-24 2012-08-01 南京大学 Method for storing private data by aid of quick response (QR) codes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘彦伟等: "QR码信息加密的研究与实现", 《铁路计算机应用》 *

Similar Documents

Publication Publication Date Title
US10635957B2 (en) System and method for collecting and analyzing multi-fields two-dimensional code
CN105450232A (en) Encoding method, decoding method, encoding device and decoding device
CN105321272A (en) Method and device of printing dynamic two-dimensional codes according to cashier's machine transaction data
SG175104A1 (en) Two-dimensional array code
CN104113390A (en) Serialization method of mobile network data
CN103037032A (en) Method using field programmable gate array (FPGA) to achieve 32-bit-addressing of SV data
CN106919882A (en) A kind of method that two-dimentional digital content switchs to pure digi-tal symbolic coding
JP5476346B2 (en) Method for encoding and decoding data in matrix code symbols
CN104517136B (en) Data label carrier information is applied and processing system and method
JP5551660B2 (en) Computer-implemented method for encoding text into matrix code symbols, computer-implemented method for decoding matrix code symbols, encoder for encoding text into matrix code symbols, and decoder for decoding matrix code symbols
TW201719506A (en) Encoding method and decoding method for two-dimensional barcode, and electronic device
CN103455479A (en) Method and terminal for creating contacts
CN104052774A (en) Data transmission method and system
CN102567771B (en) Method and system for operating smart card, smart card and terminal
CN102316428A (en) Method for communication between mobile application client and intelligent card and device
CN103414695A (en) Compressing and encrypting method for QR codes
CN106874979B (en) Bar code processing, displaying and reading method and device
CN103716445A (en) Dynamic barcode-based data exchange method
CN102254204B (en) Coding method for graphemic code
Singh et al. A novel approach for encoding and decoding of high storage capacity color QR code
CN101304565A (en) Method and unit for recognizing mobile terminal as well as method and system for providing increment service
CN113806782A (en) Ciphertext judgment method, system and equipment based on transfer matrix
CN106533450A (en) PMS coding compression method and device
CN202632314U (en) Two-dimensional-code-recognition-based tablet computer dedicated for customer information processing
CN202711312U (en) Data management system based on two-dimension code

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20131127