CN105989390A - Generation method of two-dimensional code and apparatus thereof - Google Patents

Generation method of two-dimensional code and apparatus thereof Download PDF

Info

Publication number
CN105989390A
CN105989390A CN201510073170.7A CN201510073170A CN105989390A CN 105989390 A CN105989390 A CN 105989390A CN 201510073170 A CN201510073170 A CN 201510073170A CN 105989390 A CN105989390 A CN 105989390A
Authority
CN
China
Prior art keywords
quick response
code
code word
response code
error
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
CN201510073170.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.)
Beijing D9ing Information Engineering Research Institute Co Ltd
Original Assignee
Beijing D9ing Information Engineering Research Institute 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 Beijing D9ing Information Engineering Research Institute Co Ltd filed Critical Beijing D9ing Information Engineering Research Institute Co Ltd
Priority to CN201510073170.7A priority Critical patent/CN105989390A/en
Publication of CN105989390A publication Critical patent/CN105989390A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a generation method of a two-dimensional code and an apparatus thereof. The method comprises the following steps of receiving input data and determining a coding mode of the input data, and according to the coding mode, coding the input data into a data code word; determining an error correction grade, and according to the error correction grade and the data code word, determining a row number and a column number of the two-dimensional code; according to the error correction grade, carrying out error correction coding on the data code word so as to acquire an error correction code word; according to the data code word, the error correction code word, the error correction grade, the row number and the column number of the two-dimensional code and an inherent graph, forming the two-dimensional code. The two-dimensional code generated according to the method is suitable for various shapes of network spaces which are reserved so as to be filled with the two-dimensional code, a non-network space and a composite space area of the two. The two-dimensional code possesses high anti-distortion and fouling-resistance performance and is suitable for being decoded through using shooting, and an application field is wide.

Description

A kind of generation method and device of Quick Response Code
Technical field
The present invention relates to information record and identification field, particularly relate to the generation method and device of a kind of Quick Response Code.
Background technology
One-dimension code carrys out expressing information by the bar arranged in the horizontal direction, sky, and in the vertical direction is not expressed Information, its capacity is extremely limited.Quick Response Code can in the horizontal direction with simultaneously expressing information on vertical direction, therefore Compare one-dimension code, more information can be expressed in less area.Meanwhile, entangle by applying on Quick Response Code Miscount method, also make the reliability of Quick Response Code be greatly increased.Quick Response Code can be divided into layer row's formula Quick Response Code and matrix form Quick Response Code two class.
Layer row's formula Quick Response Code can be regarded as being piled up by multirow one-dimension code forming, and common are the PDF417 of the U.S. Layer row's formula Quick Response Code.Matrix two-dimensional code is by matrix respective element position, with point (such as side's point, Round dot or other shapes) appearance represent binary one, point occur without expression binary " 0 ".Point Permutation and combination determine the meaning representated by matrix two-dimensional code, common are Japan QR code.Arrange with layer Formula Quick Response Code is compared, and matrix two-dimensional code typically has higher density of encoding (i.e. codified under same homalographic More data).
In existing Quick Response Code, there are the following problems, on the one hand, quick response matrix code, grid matrix code etc. two Dimension code all uses square structure, and the region being used for printing Quick Response Code that in actual application, article etc. are reserved may It is rectangle, as used foursquare Quick Response Code can significantly waste reserved coding region, causes under code capacity Fall.On the other hand, close matrix code uses rectangle structure, but close matrix code is simply possible to use in contact type scanning Recognition, is not suitable for using the mode of decoding of taking pictures, and needs special recognizing apparatus and recognition speed low, limits It range of application.
To sum up, a kind of new method is needed badly for generating dimensional structure scalable and being easy to the Quick Response Code of recognition to solve Certainly the problems referred to above.
Summary of the invention
One of the technical problem to be solved is to need to provide a kind of new method for generating size knot Structure scalable and be easy to recognition Quick Response Code.
In order to solve above-mentioned technical problem, embodiments herein provide firstly the generation side of a kind of Quick Response Code Method, it is characterised in that the method includes: receive input data;Determine the coding mode of described input data, And be code word data according to described coding mode by input data encoding;Determine error-correction level, and entangle according to described Wrong grade and described code word data determine line number and the columns of described Quick Response Code;According to described error-correction level to institute State code word data and carry out Error Correction of Coding, obtain error correction code word;According to described code word data, error correction code word, error correction Grade and the line number of described Quick Response Code, columns and intrinsic figure form described Quick Response Code.
Preferably, intrinsic figure containing the frame matched with columns with the line number of described Quick Response Code and is distributed in Correcting pattern in the rectangular area that described frame surrounds;Wherein, described code word data, error correction code word, error correction Grade and the line number of described Quick Response Code and columns are distributed in described frame with not blocking described correcting pattern and surround Rectangular area in.
Preferably, in correcting pattern is uniformly arranged on the rectangular area that described frame surrounds.
Preferably, correcting pattern includes symmetrical pattern.
Preferably, correcting pattern includes " ten " herringbone pattern.
Preferably, format information is generated, by described according to error-correction level and the line number of described Quick Response Code and columns Format information redundancy is formed in described Quick Response Code.
Preferably, including four described format informations in Quick Response Code, four described format informations are respectively arranged at At four drift angles of the rectangular area that described frame surrounds.
Preferably, the line number of Quick Response Code is not more than columns.
On the other hand, embodiments herein additionally provides the generating means of a kind of Quick Response Code, and this device includes: Receive unit, be set to receive input data;Code word data coding unit, is set to determine described input data Coding mode, and be code word data according to described coding mode by described input data encoding;Format information is true Cell, is set to determine error-correction level, and determines according to described error-correction level and described code word data described The line number of Quick Response Code and columns;Error correction code word coding unit, is set to according to described error-correction level described data Code word carries out Error Correction of Coding, obtains error correction code word;Quick Response Code formed unit, be set to according to described code word data, Error correction code word, error-correction level and the line number of described Quick Response Code, columns and intrinsic figure form described Quick Response Code.
Preferably, intrinsic figure containing the frame matched with columns with the line number of described Quick Response Code and is distributed in Correcting pattern in the rectangular area that described frame surrounds;Described Quick Response Code forms unit and is arranged to described number Described correcting pattern is not blocked according to code word, error correction code word, error-correction level and the line number of described Quick Response Code and columns Be distributed in the rectangular area that frame surrounds.
Compared with prior art, the one or more embodiments in such scheme can have the advantage that or useful Effect:
The Quick Response Code that method according to the embodiment of the present application generates is applicable to the reserved of various shape and doses Quick Response Code Cyberspace, non-network space and both composite space regions, and there is stronger anti-distortion and fouling resistance Performance, applicable utilization takes pictures and is decoded, and application is wide.
Other features and advantages of the present invention will illustrate in the following description, and, partly from description In become apparent, or by implement technical scheme and understand.The purpose of the present invention and other Advantage can be come real by structure specifically noted in description, claims and accompanying drawing and/or flow process Now and obtain.
Accompanying drawing explanation
Accompanying drawing is used for providing being further appreciated by of the technical scheme to the application or prior art, and constitutes explanation A part for book.Wherein, the accompanying drawing expressing the embodiment of the present application is used for explaining this together with embodiments herein The technical scheme of application, but it is not intended that the restriction to technical scheme.
Fig. 1 is the schematic flow sheet of the two-dimensional code generation method of the embodiment of the present application;
The structural representation of the Quick Response Code that Fig. 2 is generated by utilizing the method for the embodiment of the present application;
Fig. 3 is the data bit stream schematic diagram of the segmentation of the embodiment of the present application;
Fig. 4 (a)-(c) is the Quick Response Code arrangement process schematic of the embodiment of the present application;
Fig. 5 is the structural representation of the correcting pattern of the embodiment of the present application;
Fig. 6 is the structural representation in the format information district of the embodiment of the present application;
Fig. 7 is the organigram of the Quick Response Code generating means of the embodiment of the present application.
Detailed description of the invention
Embodiments of the present invention are described in detail, whereby to the present invention how below with reference to drawings and Examples Application technology means solve technical problem, and the process that realizes reaching technique effect can fully understand and real according to this Execute.As long as it should be noted that do not constitute conflict, in each embodiment in the present invention and each embodiment Each feature can be combined with each other, and the technical scheme formed is all within protection scope of the present invention.
Fig. 1 is the schematic flow sheet of the two-dimensional code generation method of the embodiment of the present application, and Fig. 2 is for utilizing the application real Execute the structural representation of the Quick Response Code that the method for example is generated, illustrate that the application implements below in conjunction with Fig. 1 and Fig. 2 The detailed process of the generation method of the Quick Response Code of example.
The two-dimensional code generation method of the embodiment of the present application comprises the following steps: step S110, reception input data, Determine the coding mode of input data, and be code word data according to described coding mode by input data encoding;Step Rapid S120, determine error-correction level for code word data, and be that described code word data determines two according to described error-correction level The line number of dimension code and columns;Error-correction level determined by step S130, basis, uses the error correction algorithm pair preset Code word data carries out Error Correction of Coding, obtains error correction code word;Step S140, according to code word data, error correction code word, Error-correction level and the line number of Quick Response Code, columns and intrinsic figure, form Quick Response Code.
Wherein, code word data and error correction code word are distributed in data encoding district, error-correction level and the row of Quick Response Code Number and columns are distributed in format information district, and, data encoding district recorded data code word and error correction code word, And the error-correction level that recorded of format information district and the line number of Quick Response Code and columns, mutually not overlapping with intrinsic figure Folded.Further, intrinsic figure contains frame and the distribution that the line number with described Quick Response Code matches with columns Correcting pattern in the rectangular area that described frame surrounds.
Two-dimensional code generation method in the embodiment of the present application also includes, in step S140, according to user Personal settings require to generate personalized figure and/or character.
Utilize two-dimension code structure schematic diagram that said method generates as in figure 2 it is shown, data encoding district 21, form letter Breath district 22, correcting pattern 23, frame 20 and the figure of personalization and/or character 24.Generally, at frame 10 peripheries are also surrounded with and are left white district 25.
Before data are encoded, first the data of input are analyzed, determine according to the type of data The coding mode of data.In embodiments herein, different coding moulds is used for different data types Formula.Specifically include figure pattern, digital alphabet mixed model, Chinese mode and byte mode etc., every kind of volume Pattern all respective specified coding rule.For example, every three characters of input are used by digital coding pattern Ten binary representations.Table 1 illustrates several coding modes conventional in the embodiment of the present application and corresponding pattern thereof Designator.
Coding mode commonly used by table 1
MODE name Mode indicators Explanation
Figure pattern (001)BIN Every 3 characters encode with 10 binary systems.
Digital alphabet mixed model (010)BIN Each character encodes with 6 binary systems.
Chinese mode (011)BIN Each character encodes with 13 binary systems.
Byte mode (100)BIN Each character encodes with 8 binary systems.
Full stop (000)BIN Terminate for presentation code
When using figure pattern to encode, first it is divided into one group by inputting every three of data, then will be every Group data are all converted to the form of the binary number of ten.When being grouped the situation that end occurs less than three, will One-bit digital less than three is converted to tetrad, and the binary digit less than three is converted to seven two System number.The each group binary number obtained by coding couples together formation data bit stream.Data bit stream is by three Full stop terminates, and wherein full stop is binary zero 00.When needing the input packet of coding containing polytype Time, first according to different types, input data are carried out segment processing, then to each segment data respectively according to above-mentioned Coding rule encodes.Every segment data bit stream is made up of three parts, refers to including mode indicators, data length Show symbol and the specifying information of data bit stream, as shown in Figure 3.In embodiments of the invention, the volume finally given Code data are formed by connecting by polytype multiple segment data bit stream.Data bit stream is carried out point according to every eight one group Group just obtains code word data, and code word data is the ultimate unit that arrangement generates data encoding district.
After completing the coding to input data, it is thus necessary to determine that the format information of Quick Response Code.Format information includes The composition line number of Quick Response Code, columns and error-correction level etc..The Quick Response Code that the embodiment of the present application is generated is a kind of The Quick Response Code of the adjustable rectangular shape of length-width ratio.Owing in reality, the trough of Quick Response Code (includes reserved dosing The cyberspace of Quick Response Code, non-network space and both composite spaces) be typically various length-width ratios rectangle, By regulating the length-width ratio of Quick Response Code, Quick Response Code can be made to can adapt to the different reserved nets dosing Quick Response Code Network space, non-network space and the requirement of both composite spaces, and maximally utilise reserved area raising The capacity of the information of Quick Response Code storage.
Further, Quick Response Code line number can be believed according to the data of required record by user with the determination of columns The size of breath and reserved dose the cyberspace of Quick Response Code, non-network space and both composite space regions Shapes and sizes, be determined within the limits prescribed, therefore can be to the confidentiality of Quick Response Code and generation The many factors such as the cost with recognition consider, and have bigger motility, two so made Dimension code can also be optimized in performance.The range of choice typically, for line number and columns is not construed as limiting. Preferably, by rectangular area minimum determined by ranks number not less than 24 × 24 modules, maximum is less than 180 × 180 modules.The ranks number of different size is carried out really in the way of four modules are increased or decreased every time Fixed.
The specific rules that error-correction level is used for indicating Error Correction of Coding.Table 2 gives embodiments of the invention Error-correction level and error correction code word account for the corresponding relation of total code word percentage ratio, and user can be carried out according to the demand of oneself Select corresponding error-correction level.
Table 2 error-correction level
Error-correction level 1 2 3 4
Error correction code word accounts for total code word percentage ratio (to round down) 20% 30% 40% 50%
Error correction code word can correct two kinds of mistake, reads including refusing under the position known cases of mistake code word Replacement mistake under the Location-Unknown situation of mistake and mistake code word.
After error-correction level determines, determined by foundation, the specific requirement of error-correction level, uses certain error correction algorithm, Code word data is carried out Error Correction of Coding and obtains error correction code word.Error correction code word is redundancy important in Quick Response Code. The Reed-Solomon error correction algorithm currently mainly used, comprises part original in its error correcting code exported Input data, a length of 8 of a Reed-Solomon code word, say, that Reed-Solomon entangles Error code word is up to 255 kinds of forms, so when the sum of code word data and error correction code word is more than 255, will Code word data carries out piecemeal, every block codewords generates error correction code word respectively, and adds error correction code word to same After code word data.
After completing the coding of code word data and error correction code word, just can be formed according to the format information arrangement determined The concrete structure of Quick Response Code.Arrangement forms the detailed process of Quick Response Code and includes: step 1, intrinsic figure of arranging District;Step 2, arrangement format information district;Step 3, arrangement data encoding district.The most intrinsic graph area is used for Record intrinsic figure.Intrinsic figure mainly includes including the frame that the line number with Quick Response Code matches with columns, And it is distributed in the correcting pattern in the rectangular area that frame is surrounded.The rectangle that correcting pattern is surrounded at frame Position in region, mainly determines with columns according to the line number of Quick Response Code.
It should be noted that in other preferred embodiments, after intrinsic figure has been arranged, it is also possible to Personal settings according to user require to generate personalized figure and/or character.Personalized figure and/or Character is made up of several modules, utilizes the pattern of dark module and light module composition to represent the individual character of user Change information.
When arranging format information district and data coding region, code word data, error correction code word, error-correction level and institute Line number and the columns etc. of stating Quick Response Code do not block the correcting pattern in the rectangular area that frame is surrounded.
Arrange intrinsic graph area time, the line number first finally determined according to user forms matrix district with columns arrangement Territory, specifically determines principle as previously described, shown in the matrix area of formation such as Fig. 4 (a).Determining matrix After region, the closing frame formed by the dark module that module is wide surrounds above-mentioned matrix area, forms two dimension The frame of code, as shown in Fig. 4 (b).In other embodiments, the live width of frame can also be multiple quantity Dark module.Dark border can limit position and the scope of Quick Response Code significantly, and user is played instruction Effect, its matrix area surrounded is played the effect of protection simultaneously.It should be noted that dark border is also May be used for the location during two dimension code reading.
Correcting pattern is for the structure being corrected data coding region in Quick Response Code.School to data coding region Just it is being primarily directed to distortion or geometric correction that is damaged and that carry out.Breakage refers to what Quick Response Code produced when being subject to destroy Information is imperfect or the situation such as loss, distortion then mainly when arranging the uneven surface of Quick Response Code, and two The sampled images that the out-of-flatness of the sampling image lens of the recognizing apparatus of dimension code or curvature cause there occurs to draw to be stretched.Preferably Ground, carries out evenly distributed, as shown in Fig. 4 (c) during arrangement correcting pattern.
Correcting pattern is uniformly distributed in frame, it is ensured that apply the Quick Response Code in article outer package in article Transport, use during the situation such as parts against wear, loss and imperfect time, still can be by means of being retained in thing Incomplete part in product outer package can be identified, and the member-retaining portion of Quick Response Code can be utilized whereby to obtain two Dimension information described in code, improves the anti-distortion of Quick Response Code, fouling resistance ability.
In one embodiment of the invention, correcting pattern 4 is " ten " font, as shown in Figure 5." ten " font Correcting pattern be the length of side be the square of 5 modules, the center line of its horizontal direction and vertical direction totally nine be used for The dark module of record control information, residue module is the light module for recording control information, forms " ten " Font correcting pattern.It should be noted that for increasing contrast effect, for illustrating each of embodiments of the invention Accompanying drawing, illustrates dark module with black, illustrates light module with white.
Certainly, in other embodiments of the present invention, the correcting pattern of " ten " font can also be by the mould of other quantity Block forms composition, the square being such as made up of 3 × 3 modules, the square being made up of 7 × 7 modules or The square that person is made up of 9 × 9 modules, etc..It practice, the square being made up of odd number module, all Can be used to realize the correcting pattern of " ten " font in embodiments of the invention.The length of side is by odd number module composition Square, there is central point that center module constitutes (such as the intersection point of horizontal line and vertical line of " ten " word figure), And in hgher efficiency for positioning action of central point, foursquare correction module can also save space.
And, deform as one, in the rectangle being made up of m × n module, it is also possible to realize " ten " The correcting pattern of font, wherein m with n is unequal, and both at the integer more than or equal to 3.In this feelings Under condition, the center line of rectangular horizontal direction is unequal with the length of the center line of vertical direction.And horizontal direction On the line segment that is linked to be of dark module, may be located at the center line of horizontal direction, it is also possible to be parallel to level side To center line and do not overlap with the center line of parallel direction.Similarly, the dark module in vertical direction is linked to be Line segment, may be located at the center line of vertical direction, it is also possible to be parallel to vertical direction center line and not with Vertical Square To center line overlap.
Such as, for the rectangle being made up of 3 × 6 modules, the length of side of horizontal direction is the length of 3 modules, The length of side of vertical direction is the length of 6 modules.Dark module in horizontal direction is positioned at the center line of horizontal direction, Namely in this rectangle horizontal direction on the second row;Dark module in vertical direction be positioned at this rectangular 3rd On row.Certainly, for the rectangle being made up of 3 × 6 modules, the dark module in vertical direction is positioned at On these rectangular second, the 4th or the 5th row, it is the most all feasible.
By means of the example above, it will be apparent to those skilled in the art that in the label of the present invention, " ten " font Correcting pattern can be to be formed more than or equal to any rectangle of length of 3 modules by the length of side, if this square The two lines section energy square crossing that dark module in shape is formed is the most feasible.
More preferably, correcting pattern is uniformly distributed in frame, it is ensured that apply the label on article in article Transport, use during the situation such as parts against wear, loss and imperfect time, still can retain by means of label On article, incomplete part can be identified, and the member-retaining portion of label can be utilized whereby to obtain label and remembered The information carried.
In the application, correcting pattern is used the shape of frame to be corrected, especially when with Quick Response Code Label is used on the uneven surface of article, or sends out when being carried out and taken pictures by two dimension code reading equipment and read Correct in the case of raw distortion.When the Quick Response Code on label is polluted or is destroyed, the school on label Positive pattern ensures that the information not having destroyed part to be recorded on label still can effectively be distinguished.
Correcting pattern can also is that various symmetrical pattern, and the number of modules of composition correcting pattern by user according to tool Body demand is determined.For example, it is contemplated that correcting pattern needs easy to identify relative to Quick Response Code global pattern, So correcting pattern can not be the least, it is contemplated that for storing the problem of the utilization rate of the matrix area of coded data, Correcting pattern can not select the biggest.The quantity of correcting pattern can not be too many.
Fig. 6 is the structural representation in the format information district of the embodiment of the present application.Form of being arranged to by format information is believed Breath Qu Zhongshi, firstly generates the content of the format information being stored in format information district.The lattice of the embodiment of the present application Formula information is carried out record by the binary number of 12, including columns, line number and the error correction etc. of Quick Response Code The information such as level.The binary system books of 12 are divided into three code words according to the form of every four group, for this The code word of three record format messages, utilizes predetermined error correction algorithm to generate six error correction code words, by three records The code word of format information and six error correction code words couple together and form the data including nine code words, namely aforementioned Format information, 36 altogether.
In embodiments of the invention, a Quick Response Code can include multiple format information district, each format information The format information stored in district is the most identical, and in each format information district, storage is complete format information (can be such as aforesaid 36 bit data), as shown in Figure 2.Thus can ensure that when in Quick Response Code During the breakage of the division format information area, as long as also a format information district remains intact, it is possible to read two dimension The complete format information of code.
Preferably, format information district is distributed at four drift angles of the frame according to rectangle by embodiments of the invention. Specifically, the part on mutually perpendicular two limits with a drift angle of frame, as the two of format information district Bar frame, the limit formed by dark module being respectively perpendicular using the limit of two other Yu this drift angle is as format information The two other frame in district, surrounds square area jointly.Four that format information district is arranged in rectangular shaped rim At individual drift angle, be conducive to when Quick Response Code is identified, reduce the complexity of searching algorithm, and then improve knowledge Other speed and accuracy, improve recognition efficiency.
Embodiments of the invention, can be according to different error-correction level to not when filling in the format information of 36 The same format information in format information district carries out different arrangement storages.Jin Shi format information district shown in Fig. 6 One example of arrangement, it can be seen that the arrangement of information is the most irregular, further ensures the encryption of Quick Response Code Energy.Meanwhile, this format information district 12 with specific configuration form can also be in the recognition process of Quick Response Code In the Quick Response Code rotated is positioned because when Quick Response Code rotates, just cannot obtain form The correct arrangement mode of the information area, i.e. cannot obtain effective format information.
It should be noted that Fig. 2 and illustrated in fig. 6 be only preferred arrangement, in other embodiment In, the size in format information district, shape, position and the arrangement mode of internal form information, all can by with Family is set.
Behind the good intrinsic graph area of arrangement and format information district, it is possible to number of arranging in remaining position of matrix area According to code word and error correction code word, the region of arrangement code word data and error correction code word is data encoding district.Data encoding District arranges according to generic principles of the prior art, places in units of code word, is usually and first places Code word data, then place error correction code word.The placement of code word is followed from right to left, from bottom to up with hand over from top to bottom The serpentine arrangement replaced.If code word by piecemeal, then obtain after each block codewords being staggered one single Streams of code words, then by streams of code words according to above-mentioned from right to left, principle from bottom to up, from top to bottom is aligned to matrix In region, complete coding.
Although it should be noted that the matrix area of the embodiment of the present application adjustable rectangle that is length-width ratio, but During arrangement, the line number that matrix is preferably placed as the form of horizontal rectangle, i.e. matrix area is not more than its row Number.Normal to arrangement format information district and data encoding district with this laterally disposed matrix as Quick Response Code. Advantage of this is that the recognition of beneficially Quick Response Code.When determining line number and the columns of Quick Response Code it must also be noted that make row Number is not more than columns.
After above-mentioned coding with arrangement operation, generate the structure of Quick Response Code as shown in Figure 2, this two dimension Code compact conformation, makes full use of finite region and realizes several functions.Simultaneously by the reasonable cloth to difference in functionality district Put, while simplifying recognition algorithm, improve recognition speed.
The generation method of the Quick Response Code that the embodiment of the present application is provided has provided the user the space of more more options, can To meet the many demands of user, either consider or from considering in appearance from performance, can set Count out the product of richer individual character.
Fig. 7 is the organigram of the generating means of the Quick Response Code of the embodiment of the present application.For Fig. 7 The each several part composition of the Quick Response Code generating means of bright the embodiment of the present application.
As it is shown in fig. 7, the generating means of the Quick Response Code of embodiments herein, mainly include receiving unit 710, Code word data coding unit 720, format information determine unit 730, error correction code word coding unit 740 and two Dimension code forms unit 750.
Receive unit 710, be set to receive input data.
Code word data coding unit 720, is connected with receiving unit 710, is set to determine the coding of input data Pattern, and be code word data according to coding mode by input data encoding.
Format information determines unit 730, is connected with code word data coding unit 720, is set to determine error correction etc. Level, and line number and the columns of Quick Response Code is determined according to error-correction level and code word data.
Error correction code word coding unit 740, with code word data coding unit 720 and form information determination unit 730 It is connected, is set to, according to error-correction level, code word data is carried out Error Correction of Coding, obtains error correction code word.
Quick Response Code formed unit 750, with code word data coding unit 720, format information determine unit 730 with And error correction code word coding unit 740 is connected, be set to according to code word data, error correction code word, error-correction level and The line number of Quick Response Code, columns and intrinsic figure form Quick Response Code.
Wherein, intrinsic figure containing the frame matched with columns with the line number of Quick Response Code and is distributed in frame and encloses Correcting pattern in the rectangular area become.Correcting pattern distributing position in the rectangular area that frame is surrounded, Mainly determine with columns according to the line number of Quick Response Code.Quick Response Code formed unit 750 be arranged to by code word data, The line number of error correction code word, error-correction level and Quick Response Code and columns are distributed in frame with not blocking correcting pattern and surround Rectangular area in.
Those skilled in the art should be understood that each module of the above-mentioned present invention or each step can be with general Calculating device to realize, they can concentrate on single calculating device, or is distributed in multiple calculating device On the network formed, alternatively, they can realize with calculating the executable program code of device, thus, Can be stored in storing in device and be performed by calculating device, or they are fabricated to respectively each collection Become circuit module, or the multiple modules in them or step are fabricated to single integrated circuit module realize. So, the present invention is not restricted to the combination of any specific hardware and software.
While it is disclosed that embodiment as above, but described content is only to facilitate understand the present invention And the embodiment used, it is not limited to the present invention.Technology people in any the technical field of the invention Member, on the premise of without departing from spirit and scope disclosed in this invention, can be in the formal and details implemented On make any amendment and change, but the scope of patent protection of the present invention, still must be with appending claims institute Define in the range of standard.

Claims (10)

1. the generation method of a Quick Response Code, it is characterised in that the method includes:
Receive input data;
Determine the coding mode of described input data, and be data according to described coding mode by input data encoding Code word;
Determine error-correction level, and determine the row of described Quick Response Code according to described error-correction level and described code word data Number and columns;
According to described error-correction level, described code word data is carried out Error Correction of Coding, obtain error correction code word;
According to described code word data, error correction code word, error-correction level and the line number of described Quick Response Code, columns and solid Figure is had to form described Quick Response Code.
Method the most according to claim 1, it is characterised in that described intrinsic figure is containing with described two The frame that matches with columns of line number of dimension code and be distributed in the correction in the rectangular area that described frame surrounds Pattern;Wherein, described code word data, error correction code word, error-correction level and the line number of described Quick Response Code and columns It is not distributed in the rectangular area that described frame surrounds with not blocking described correcting pattern.
Method the most according to claim 2, it is characterised in that described correcting pattern is uniformly arranged on In the rectangular area that described frame surrounds.
Method the most according to claim 2, it is characterised in that described correcting pattern includes symmetrical pattern.
Method the most according to claim 2, it is characterised in that described correcting pattern includes " ten " word Shape pattern.
Method the most according to claim 2, it is characterised in that the method includes: according to described error correction Grade and the line number of described Quick Response Code and columns generate format information, and described format information redundancy is formed at institute State in Quick Response Code.
Method the most according to claim 6, it is characterised in that include four institutes in described Quick Response Code Stating format information, four described format informations are respectively arranged at four drift angles of the rectangular area that described frame surrounds Place.
Method the most according to claim 1, it is characterised in that the line number of described Quick Response Code is not more than row Number.
9. the generating means of a Quick Response Code, it is characterised in that this device includes:
Receive unit, be set to receive input data;
Code word data coding unit, is set to determine the coding mode of described input data, and according to described coding Described input data encoding is code word data by pattern;
Format information determines unit, is set to determine error-correction level, and according to described error-correction level and described number Line number and the columns of described Quick Response Code is determined according to code word;
Error correction code word coding unit, is set to, according to described error-correction level, described code word data is carried out error correction volume Code, obtains error correction code word;
Quick Response Code forms unit, is set to according to described code word data, error correction code word, error-correction level and described The line number of Quick Response Code, columns and intrinsic figure form described Quick Response Code.
Device the most according to claim 9, it is characterised in that described intrinsic figure is containing with described two The frame that matches with columns of line number of dimension code and be distributed in the correction in the rectangular area that described frame surrounds Pattern;Described Quick Response Code formed unit be arranged to by described code word data, error correction code word, error-correction level and The line number of described Quick Response Code and columns are not distributed in the rectangular area that frame surrounds with not blocking described correcting pattern.
CN201510073170.7A 2015-02-11 2015-02-11 Generation method of two-dimensional code and apparatus thereof Pending CN105989390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510073170.7A CN105989390A (en) 2015-02-11 2015-02-11 Generation method of two-dimensional code and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510073170.7A CN105989390A (en) 2015-02-11 2015-02-11 Generation method of two-dimensional code and apparatus thereof

Publications (1)

Publication Number Publication Date
CN105989390A true CN105989390A (en) 2016-10-05

Family

ID=57041901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510073170.7A Pending CN105989390A (en) 2015-02-11 2015-02-11 Generation method of two-dimensional code and apparatus thereof

Country Status (1)

Country Link
CN (1) CN105989390A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112561016A (en) * 2020-12-23 2021-03-26 杭州天谷信息科技有限公司 Two-dimensional code generation method and system and document anti-counterfeiting method and system
CN117094349A (en) * 2023-10-19 2023-11-21 中国物品编码中心 Two-dimensional code graph generation method, device, equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101430768A (en) * 2007-11-07 2009-05-13 刘涛 Two-dimension bar code system and its positioning method
CN101477638A (en) * 2006-11-16 2009-07-08 深圳市天朗时代科技有限公司 Two-dimensional code, printed publication applying the two-dimensional code and decoding process
CN102081747A (en) * 2011-01-24 2011-06-01 广州宽度信息技术有限公司 Two-dimensional bar code
CN102142077A (en) * 2010-02-03 2011-08-03 索尼公司 Data reader, data reading method and data recorder
CN102999772A (en) * 2012-11-14 2013-03-27 韩偲铭 Novel array-type two-dimension code encoding and decoding methods
CN103049729A (en) * 2012-12-30 2013-04-17 成都理想境界科技有限公司 Method, system and terminal for augmenting reality based on two-dimension code
CN103295044A (en) * 2013-06-05 2013-09-11 徐宁 Two-dimensional computer code pattern generation method and device
CN103632122A (en) * 2013-11-11 2014-03-12 澳柯玛股份有限公司 Intelligent management system and intelligent management method
CN103763178A (en) * 2014-01-03 2014-04-30 腾讯科技(深圳)有限公司 Information pushing method, server, user terminal and system
CN104143109A (en) * 2014-01-28 2014-11-12 深圳市雁联计算系统有限公司 Two-dimensional code coding method, two-dimensional code decoding method and two-dimensional code print

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477638A (en) * 2006-11-16 2009-07-08 深圳市天朗时代科技有限公司 Two-dimensional code, printed publication applying the two-dimensional code and decoding process
CN101430768A (en) * 2007-11-07 2009-05-13 刘涛 Two-dimension bar code system and its positioning method
CN102142077A (en) * 2010-02-03 2011-08-03 索尼公司 Data reader, data reading method and data recorder
CN102081747A (en) * 2011-01-24 2011-06-01 广州宽度信息技术有限公司 Two-dimensional bar code
CN102999772A (en) * 2012-11-14 2013-03-27 韩偲铭 Novel array-type two-dimension code encoding and decoding methods
CN103049729A (en) * 2012-12-30 2013-04-17 成都理想境界科技有限公司 Method, system and terminal for augmenting reality based on two-dimension code
CN103295044A (en) * 2013-06-05 2013-09-11 徐宁 Two-dimensional computer code pattern generation method and device
CN103632122A (en) * 2013-11-11 2014-03-12 澳柯玛股份有限公司 Intelligent management system and intelligent management method
CN103763178A (en) * 2014-01-03 2014-04-30 腾讯科技(深圳)有限公司 Information pushing method, server, user terminal and system
CN104143109A (en) * 2014-01-28 2014-11-12 深圳市雁联计算系统有限公司 Two-dimensional code coding method, two-dimensional code decoding method and two-dimensional code print

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112561016A (en) * 2020-12-23 2021-03-26 杭州天谷信息科技有限公司 Two-dimensional code generation method and system and document anti-counterfeiting method and system
CN117094349A (en) * 2023-10-19 2023-11-21 中国物品编码中心 Two-dimensional code graph generation method, device, equipment and medium
CN117094349B (en) * 2023-10-19 2024-01-09 中国物品编码中心 Two-dimensional code graph generation method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN105989389A (en) Two-dimensional code
CN104143109B (en) A kind of coding and decoding methods and its printed article of Quick Response Code
CN106529633B (en) Generation method, coding/decoding method and the device of two dimensional code
CN101859397B (en) Two-dimensional array code
CN105760919A (en) Dot matrix two-dimensional code coding and recognition method
KR100414524B1 (en) Two-dimensional Code having superior decoding property which is possible to control the level of error correcting codes, and method for encoding and decoding the same
JP4975109B2 (en) Two-dimensional code, decoding method thereof, and printed publication to which the two-dimensional code is applied
CN104657768B (en) A kind of color three dimension code generator and color three dimension code reading method
CN107545289A (en) The coding method of matrix two-dimensional code and coding/decoding method
CN105894067A (en) Dot matrix two-dimensional code coding and reading method
CN112926715B (en) Two-dimensional code generation and decoding method, device and equipment
CN105989317A (en) Identification method of two-dimensional code and apparatus thereof
CN103168289A (en) Transposition operation apparatus, integrated circuit therefor, and transposition processing method
CN107563475A (en) A kind of coding method of Quick Response Code and device
CN103997406B (en) Identity identifying method and device based on two dimensional code
CN105989390A (en) Generation method of two-dimensional code and apparatus thereof
CN107563477A (en) Quick Response Code and its generation method and device
CN106845593A (en) A kind of rectangle fixes dot matrix information encoding-decoding method
CN105894070A (en) Two-dimensional code encoding method and device
TWI463410B (en) Barcode structure and encoding method thereof
US20080179406A1 (en) Method for the dual coding of information on physical media and in a comptuerized format (DOTEM)
US20240086670A1 (en) Methods for constructing, generating, and reading dot-matrix code, dot-matrix code generating and reading terminals, and dot-matrix code system
CN103778453B (en) Writable two-dimensional bar code based on fault-tolerant mechanism and generating method thereof
CN101159028B (en) Multiple graphics matrix type two-dimension bar code implementing method and device
CN108734048A (en) Various dimensions Quick Response Code based on proprietary code generates and interpretation method

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

Application publication date: 20161005

RJ01 Rejection of invention patent application after publication