CN104281865B - A kind of method and apparatus for generating Quick Response Code - Google Patents

A kind of method and apparatus for generating Quick Response Code Download PDF

Info

Publication number
CN104281865B
CN104281865B CN201310279958.4A CN201310279958A CN104281865B CN 104281865 B CN104281865 B CN 104281865B CN 201310279958 A CN201310279958 A CN 201310279958A CN 104281865 B CN104281865 B CN 104281865B
Authority
CN
China
Prior art keywords
information
original
dimensional code
code
primitive
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.)
Active
Application number
CN201310279958.4A
Other languages
Chinese (zh)
Other versions
CN104281865A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201310279958.4A priority Critical patent/CN104281865B/en
Publication of CN104281865A publication Critical patent/CN104281865A/en
Application granted granted Critical
Publication of CN104281865B publication Critical patent/CN104281865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The object of the present invention is to provide a kind of method and apparatus for generating Quick Response Code.Compared with prior art, the present invention by obtain pending original two-dimensional code and with the corresponding multiple primitive style informations of original two-dimensional code, according at least one in the multiple primitive style information, and the original two-dimensional code, generate multiple middle Quick Response Codes corresponding to the original two-dimensional code, and the order dependent information of the primitive style information according to corresponding to the middle Quick Response Code, merge the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code;So that the original two-dimensional code has the pattern of dynamically changeable, help to improve the source of screen utilization rate of information carrying capacity and screen constrained terminal device, and, add the rich of two-dimentional digital content, diversity and interest, so that the Quick Response Code is more personalized, improve the appearance UI effects of Quick Response Code so that Quick Response Code is readily discernible, improves the efficiency that user obtains information.

Description

A kind of method and apparatus for generating Quick Response Code
Technical field
The present invention relates to planar bar code technology field, more particularly to a kind of technology for generating Quick Response Code.
Background technology
With the continuous development of mobile Internet, the application scenario of Quick Response Code is more and more, becomes a kind of effective wide Accuse publicity and entertainment interactive medium.However, current two-dimension only with pure color or black and white with formed as the alternate formula of traditional dichromatism, Black and white alternating expression.
This kind of pattern in 2 D code style is more dull, and content does not protrude, and Quick Response Code identification is relatively low.
The content of the invention
The object of the present invention is to provide a kind of method and apparatus for generating Quick Response Code.
According to an aspect of the invention, there is provided a kind of method for generating Quick Response Code, wherein, this method includes following step Suddenly:
A obtains pending original two-dimensional code;
B is obtained and the corresponding multiple primitive style informations of the original two-dimensional code;
C is according at least one in the multiple primitive style information, and the original two-dimensional code, generation described initial two Tie up multiple middle Quick Response Codes corresponding to code;
The order dependent information of primitive style informations of the d according to corresponding to the middle Quick Response Code, during merging is the multiple Between Quick Response Code, to obtain corresponding dynamic two-dimension code.
According to another aspect of the present invention, a kind of generation equipment for generating Quick Response Code is additionally provided, wherein, the equipment bag Include:
Acquisition device, for obtaining pending original two-dimensional code;
Style devices, for obtaining and the corresponding multiple primitive style informations of the original two-dimensional code;
Generating means, for according at least one in the multiple primitive style information, and the original two-dimensional code, it is raw Into multiple middle Quick Response Codes corresponding to the original two-dimensional code;
Merge device, for the order dependent information of the primitive style information according to corresponding to the middle Quick Response Code, close And the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
Compared with prior art, the present invention is by obtaining pending original two-dimensional code, and opposite with original two-dimensional code The multiple primitive style informations answered, according at least one in the multiple primitive style information, and the original two-dimensional code, it is raw Into multiple middle Quick Response Codes corresponding to the original two-dimensional code, and the primitive pattern letter according to corresponding to the middle Quick Response Code The order dependent information of breath, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code;It is so that described first Beginning Quick Response Code has a pattern of dynamically changeable, such as variable pattern or color etc., help to improve information carrying capacity and The source of screen utilization rate of screen constrained terminal device, also, add the rich of two-dimentional digital content, diversity and entertaining Property so that the Quick Response Code is more personalized, improves the appearance UI effects of Quick Response Code so that Quick Response Code is readily discernible, improves User obtains the efficiency of information.
Moreover, the present invention can also determine the color lump distribution matrix corresponding to the original two-dimensional code, and by according to institute State it is at least one in multiple primitive style informations be replaced processing to color lump in the color lump distribution matrix, generate described initial Multiple middle Quick Response Codes corresponding to Quick Response Code;Further, can also be according to predetermined color lump Substitution Rules, by according to institute State it is at least one in multiple primitive style informations be replaced processing to color lump in the color lump distribution matrix, generate described initial Multiple middle Quick Response Codes corresponding to Quick Response Code;So as to more accurate generation and the corresponding centre two of the original two-dimensional code Code is tieed up, so that the original two-dimensional code has the pattern of dynamically changeable, such as variable pattern or color etc., helps to carry The source of screen utilization rate of high information carrying capacity and screen constrained terminal device, also, add two-dimentional digital content Rich, diversity and interest so that the Quick Response Code is more personalized, improves the appearance UI effects of Quick Response Code so that Quick Response Code is readily discernible, improves the efficiency that user obtains information.
Moreover, the present invention can also verify the primitive style information, according to the multiple base by verification It is at least one in first style information, and the original two-dimensional code, generate multiple centres two corresponding to the original two-dimensional code Tie up code;So as to ensure that the legitimacy of the primitive style information, the generation of middle Quick Response Code ensure that.
Moreover, the present invention can also determine the primitive pattern sequence corresponding to the multiple primitive style information, according to institute Order dependent information of the primitive style information in the primitive pattern sequence corresponding to middle Quick Response Code is stated, is merged described more A middle Quick Response Code, to obtain corresponding dynamic two-dimension code;It is highly preferred that can also be according to the applied field of the original two-dimensional code Scape information, determines the primitive pattern sequence corresponding to the multiple primitive style information;So as to according to the primitive pattern sequence Combination producing dynamic two-dimension code so that the original two-dimensional code has the pattern of dynamically changeable, such as variable pattern or color Deng, and make it that primitive pattern sequence more meets the application scenarios of the original two-dimensional code, help to improve information carrying capacity with And the source of screen utilization rate of screen constrained terminal device, also, add the rich of two-dimentional digital content, diversity and interest Taste so that the Quick Response Code is more personalized, improves the appearance UI effects of Quick Response Code so that Quick Response Code is readily discernible, carries High user obtains the efficiency of information.
Moreover, the present invention can also be according to the code relevant information of the original two-dimensional code, such as application scenarios information, color matching The many aspects such as characteristic information, information to be presented obtain and the corresponding multiple primitive style informations of the original two-dimensional code;From And cause the original two-dimensional code that there is the pattern of dynamically changeable suitable for reading that is being more suitable for the original two-dimensional code, example Such as variable pattern or color, help to improve the source of screen profit of information carrying capacity and screen constrained terminal device With rate, also, add the rich of two-dimentional digital content, diversity and interest so that the Quick Response Code is more personalized, carries The appearance UI effects of Quick Response Code are risen so that Quick Response Code is readily discernible, improves the efficiency that user obtains information.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, of the invention is other Feature, objects and advantages will become more apparent upon:
Fig. 1 shows a kind of generation equipment schematic diagram of generation Quick Response Code of one side according to the present invention;
Fig. 2 shows a kind of generation equipment schematic diagram of generation Quick Response Code in accordance with a preferred embodiment of the present invention;
Fig. 3 shows a kind of generation equipment schematic diagram of generation Quick Response Code of another preferred embodiment according to the present invention;
Fig. 4 shows a kind of method flow diagram of generation Quick Response Code according to a further aspect of the present invention;
Fig. 5 shows a kind of method flow diagram of generation Quick Response Code in accordance with a preferred embodiment of the present invention;
Fig. 6 shows a kind of method flow diagram of generation Quick Response Code of another preferred embodiment according to the present invention;
Fig. 7 shows a kind of schematic diagram of middle Quick Response Code according to a preferred embodiment of the present invention;
Fig. 8 shows a kind of schematic diagram for being used to determine color lump distribution matrix according to a preferred embodiment of the present invention;
Fig. 9 shows a kind of schematic diagram of primitive pattern schematic diagram according to a preferred embodiment of the present invention.
The same or similar reference numeral represents the same or similar component in attached drawing.
Embodiment
The present invention is described in further detail below in conjunction with the accompanying drawings.
Fig. 1 shows a kind of generation equipment schematic diagram of generation Quick Response Code of one side according to the present invention;Wherein, the life Forming apparatus includes acquisition device 1, style devices 2, generating means 3, merging device 4.Specifically, acquisition device 1 obtains pending Original two-dimensional code;Style devices 2 obtain and the corresponding multiple primitive style informations of the original two-dimensional code;Generating means 3 According at least one in the multiple primitive style information, and the original two-dimensional code, it is right to generate the original two-dimensional code institute The multiple middle Quick Response Codes answered;Merge the order dependent of primitive style information of the device 4 according to corresponding to the middle Quick Response Code Information, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
Here, the generation equipment includes but not limited to the network equipment, user equipment or the network equipment and user equipment leads to Cross network and be integrated formed equipment.Wherein, the network equipment include it is a kind of can be according to the finger for being previously set or storing Order, the automatic electronic equipment for carrying out numerical computations and information processing, its hardware include but not limited to microprocessor, special integrated electricity Road (ASIC), programmable gate array(FPGA), digital processing unit(DSP), embedded device etc..The network equipment it include but It is not limited to the cloud that computer, network host, single network server, multiple webserver collection or multiple servers are formed; This, cloud is by based on cloud computing(Cloud Computing)A large amount of computers or the webserver form, wherein, cloud computing is One kind of Distributed Calculation, a virtual supercomputer being made of the computer collection of a group loose couplings.The user sets Standby its, which includes but not limited to any type, to carry out human-computer interaction by keyboard, remote controler, touch pad or voice-operated device with user Electronic product, such as computer, smart mobile phone, PDA, game machine or IPTV etc..The network includes but not limited to interconnect Net, wide area network, Metropolitan Area Network (MAN), LAN, VPN network, wireless self-organization network(Ad Hoc networks)Deng.Those skilled in the art should It is understood that, others generation equipment are equally applicable to the present invention, should also be included within the scope of the present invention, and herein to draw It is incorporated herein with mode.
Constantly work between above-mentioned each device, here, it will be understood by those skilled in the art that " lasting " refers to State each device respectively in real time, or the operating mode requirement according to setting or real-time adjustment, carry out pending initial two The acquisition of code, the acquisition of primitive style information, the generation of centre Quick Response Code, acquisition of dynamic two-dimension code etc. are tieed up, until the life Forming apparatus stops obtaining pending original two-dimensional code.
Acquisition device 1 obtains pending original two-dimensional code.
Specifically, the acquisition device 1 is by various communication protocols, by Various types of data coffret, with storing or carrying Interact for the one or more databases or other third party devices of the original two-dimensional code, to obtain pending initial two Tie up code;Alternatively, the acquisition device 1 is with other equipment by interacting, or by interacting with user, receive the user By clicking on, touching, one or more content informations that mode submitted such as inputting, and the content information is based on Quick Response Code Generating principle and/or interdependent parameter etc., to generate pending original two-dimensional code.
Wherein, the original two-dimensional code including but not limited to only express the text message, with pure color or black and white What is generated is embedded in such as the Quick Response Code of the alternate formula of traditional dichromatism, black and white alternating expression and dichromatism gradual change type, or at Quick Response Code center Quick Response Code of small picture etc..
Style devices 2 obtain and the corresponding multiple primitive style informations of the original two-dimensional code.
Specifically, the style devices 2 are by various communication protocols, by Various types of data coffret, with storing or carrying Interact for the one or more databases or other third party devices of the primitive style information, to obtain multiple primitives Style information, then establishes mapping relations by the primitive style information and the original two-dimensional code, as with described initial two Tie up the corresponding multiple primitive style informations of code;Or the extraction element 2 receives the user and leads to by interacting with user It is selected submitting with the corresponding multiple primitive style informations of the original two-dimensional code to cross the modes such as click, touch, input;Or Extraction element 2 described in person is according to the original two-dimensional code, based on predetermined selection criteria(As according to the original two-dimensional code institute it is right Information answered etc.), select and the corresponding multiple primitive style informations of the original two-dimensional code.
Wherein, block of pixels or shape of the multiple primitive style information including but not limited to color changeable are variable The one or more of figure.For example, as shown in figure 9, Fig. 9 is shown with multiple primitive style informations of different shapes, and Primitive style information with different colours.
Generating means 3 are according at least one in the multiple primitive style information, and the original two-dimensional code, generate institute State multiple middle Quick Response Codes corresponding to original two-dimensional code.
Specifically, the generating means 3 are corresponding with the original two-dimensional code according to acquired in the style devices 2 Multiple primitive style informations, and the original two-dimensional code acquired in the acquisition device 1, such as utilize the primitive style information In one, the respective pixel in the original two-dimensional code is replaced, with generate it is corresponding with the primitive style information One among Quick Response Code, and then utilize multiple primitive style informations, respectively to the correspondence picture in the original two-dimensional code Element is replaced, i.e., using primitive style information two or more described, to generate multiple middle Quick Response Codes.
Here, those skilled in the art will be understood that the replacement process while suitable for dark block and light block, it is described Dark block need to be replaced by the primitive style information of dark color, and the light color block need to be replaced by the primitive style information of light color, with Ensure that the Quick Response Code can be scanned identifying.Primitive style information with same shape can also be at the same time with dark base First style information and light primitive style information.
For example, in such as " the primitive pattern example of color change " of Fig. 9, the color " black, dark blue, red, purple, dark green " is all Belong to dark primitive style information, can be used for replacing dark block.
For example, as shown in fig. 7, Fig. 7 shows that one kind is handled the original two-dimensional code using primitive style information The schematic diagram of the middle Quick Response Code generated afterwards.Specifically, the original two-dimensional code is generated to be common using black and white strip Quick Response Code with background patterns, the primitive style information humanoid pattern as shown in Fig. 7 lower right corner, the style devices 2 obtain One of the primitive style information of the humanoid pattern as the original two-dimensional code is taken, generating means 3 are by the original two-dimensional Black and white strip in code is divided into multiple squares, and utilizes the primitive style information, and the square of black is utilized to the people of black Shape pattern is replaced, and the square of white is replaced using the humanoid pattern of white, so as to generate centre as shown in Figure 7 Quick Response Code.The generating means 3 can according to the difference of the primitive style information, according to the multiple primitive style information with And the original two-dimensional code, generate multiple middle Quick Response Codes.
Merge the order dependent information of primitive style information of the device 4 according to corresponding to the middle Quick Response Code, merge institute Multiple middle Quick Response Codes are stated, to obtain corresponding dynamic two-dimension code.
Specifically, primitive style information of the merging device 4 according to corresponding to the middle Quick Response Code is order dependent Information, for example, by the multiple middle Quick Response Code configuration frame chained list, by the way that the middle Quick Response Code of the frame chained list is closed And generate dynamically such as the picture of gif forms, that is, obtain corresponding dynamic two-dimension code.Wherein, due to the primitive style information Be it is multiple and different, therefore, after being merged according to the order dependent information of the primitive style information, the dynamic two-dimension code It is movable.
Wherein, the order dependent information can be according to the primitive style information that the style devices 2 are provided Order information determines, can also be determined according to the specified order of user setting or for the parameter of genesis sequence, can also basis The relevant information of the original two-dimensional code(Content information as corresponding to the original two-dimensional code etc.)And determine, so that by right The primitive style information carries out the modes such as permutation and combination, obtains the order dependent information corresponding to it.For example, the pattern dress It is A, B, C to put the 2 primitive style informations provided, then the order dependent information corresponding to the primitive style information can be ABC, or can also be ABCABC(It can repeat), can also be either AABBCC or can also be AABCABC etc. appoint Meaning combination.Different orderings finally determines the dynamic effect of the dynamic two-dimension code.
Here, since the original two-dimensional code that the middle Quick Response Code is included is identical, and the primitive sample corresponding to it Formula information is different, therefore the dynamic two-dimension code after merging has movable effect, and due to the dynamic two-dimension code Each frame is all to have the code shape identical with the original two-dimensional code, therefore the content scanned is identical.
Preferably, the generation equipment further includes verification device(It is not shown), wherein, the verification device is to the primitive Style information is verified;The generating means 3 according at least one in the multiple primitive style information by verification, with And the original two-dimensional code, generate multiple middle Quick Response Codes corresponding to the original two-dimensional code.
Specifically, the verification device verifies the legitimacy of the primitive style information, for example, checking the primitive pattern Whether information belongs to predetermined primitive pattern set, or whether meet the regulation of primitive pattern etc..For example, work as the optional base When first style set is combined into { a, b, c, d }, if the primitive style information is not belonging to the set, then it is assumed that the primitive style information is not It is legal, it is on the contrary then pass through verification;Alternatively, for example, the form of the primitive style information is verified, the primitive as described in definition Style information is the square picture of 15 pixel x15 pixels, if the primitive style information does not meet the pixel request, then it is assumed that The primitive style information is illegal, on the contrary then pass through verification.
The generating means 3 obtain the verification multiple primitive style informations of the device by verification, are verified according to passing through The multiple primitive style information at least one, and the original two-dimensional code, generate corresponding to the original two-dimensional code Middle Quick Response Code, and then according to multiple primitive style informations, to obtain multiple middle Quick Response Codes.Here, the generating means 3 Obtain multiple middle Quick Response Codes mode and Fig. 1 described in generating means 3 acquisition pattern it is same or similar, it is therefore no longer superfluous herein State, and be incorporated herein by reference.
Preferably, the style devices 2 can obtain and described initial according to the code relevant information of the original two-dimensional code The corresponding multiple primitive style informations of Quick Response Code.
Specifically, the style devices 2 can according to the code relevant information of the original two-dimensional code, such as according to it is described just Background patterns corresponding to the application scenarios information of the affiliated application message of beginning Quick Response Code, the original two-dimensional code are believed with color characteristic Breath or Quick Response Code information to be presented etc., by based on predetermined selection rule, as specific with being selected if color characteristic The modes such as predetermined primitive style information are selected, are obtained and the corresponding multiple primitive style informations of the original two-dimensional code.
It is highly preferred that when the code relevant information includes the application scenarios information of the original two-dimensional code, the pattern Device 2 can obtain corresponding using corresponding multiple images according to the application scenarios information of the original two-dimensional code;Obtain with The corresponding multiple style informations of described multiple images, to believe as with the corresponding multiple primitive patterns of the original two-dimensional code Breath.
Specifically, the code relevant information includes the application scenarios information of the original two-dimensional code, wherein, the applied field Scape information includes but not limited to the subject information of the application, the presentation information of application, video preview information etc.;The pattern dress 2 are put according to the application scenarios information, for example, the subject information of the application is amusement park, then by humanoid figure as, amusement park For the thumbnail or simple picture of each facility as with the corresponding image information of the application, the subject information of application as described in is food Thing, then using the thumbnail of each food or simple picture as with the corresponding image information of the application;Or based on predetermined every Second frame number is set, corresponding to generate by the way that the presentation information of the application or video preview information are carried out continuous capturing Multiple images(Such as color is different or variform multiple sectional drawings);The style devices 2 to described multiple images at Reason, as extracted the main part in image so that image can be clear and legible as style information, or the face in extraction image Color part so that the multiple style informations with different colours of generation, and will be with the corresponding multiple patterns of described multiple images Information, using as with the corresponding multiple primitive style informations of the original two-dimensional code.
It is highly preferred that when the code relevant information includes believing with color characteristic for background patterns corresponding to the original two-dimensional code During breath, the style devices 2 can according to corresponding to the original two-dimensional code background patterns color matching characteristic information, from multiple times The candidate motif style information for selecting in primitive style information selection to match with the color matching characteristic information, using as with it is described just The corresponding multiple primitive style informations of beginning Quick Response Code.
Specifically, the code relevant information includes the color matching characteristic information of background patterns corresponding to the original two-dimensional code, Wherein, the color matching characteristic information includes but not limited to the colouring information of the original two-dimensional code background patterns, color change letter Breath etc.;The style devices 2 are according to the color matching characteristic information, and from multiple candidate motif style informations, selection is matched somebody with somebody with described The candidate motif style information of color characteristic information match, and using the candidate motif style information as with the original two-dimensional The corresponding primitive style information of code.
For example, selection with the original two-dimensional code corresponding to the colors of background patterns differ larger candidate motif sample Formula information, as with the corresponding primitive style information of the original two-dimensional code, so as in the dynamic two-dimension code of generation Clearly read the code shape information of background patterns and original two-dimensional code.
Wherein, the style devices 2 can by various communication protocols, by Various types of data coffret, with storage or The one or more databases or other third party devices for providing the candidate motif style information interact, to obtain multiple institutes State candidate motif style information;Or the extraction element 2 receives the user by clicking on, touching by interacting with user The selected multiple candidate motif style informations submitted of mode such as touch, input;Or the extraction element 2 is according to described initial two Code is tieed up, based on predetermined selection criteria(Information as corresponding to according to the original two-dimensional code etc.), selection and described initial two Tie up the corresponding multiple candidate motif style informations of code.
It is highly preferred that when the code relevant information include the original two-dimensional code corresponding to information to be presented when, it is described Style devices 2 can be according to the information to be presented, selection and the information match to be presented from multiple candidate images Multiple preferred images;Obtain with the corresponding multiple style informations of the multiple preferred image, using as with the original two-dimensional The corresponding multiple primitive style informations of code.
Specifically, the code relevant information includes the information to be presented corresponding to the original two-dimensional code, wherein, it is described to treat It is text information, link information corresponding to the original two-dimensional code after original two-dimensional code is scanned that information, which is presented, Or other relevant informations.
The style devices 2 are according to the information to be presented, such as the content letter according to corresponding to the information to be presented Breath, from the preferred image that selection matches with the content from multiple candidate images, such as information to be presented is The broadcasting link of " sea thief king " is drawn, then candidate image of the selection with " sea thief king " title, or have and believe with " sea thief king " content The candidate image of breath, or with " sea thief king " other relevant candidate images, as multiple with the information match to be presented Preferred image.
Alternatively, the style devices 2 are according to the information to be presented, such as the text envelope according to the information to be presented Breath, from the candidate image that selection matches with the content from multiple candidate images, for example, the information to be presented is " blue sky ", then candidate image of the selection with blue sky content, as multiple preferred images with the information match to be presented.
The style devices 2 handle the multiple preferred image, such as extract preferred figure according to the preferred image Main part as in so that the preferred image can be clear and legible as style information, or in extraction preferred image Color part so that the multiple style informations with different colours of generation, and will be corresponding more with the multiple preferred image A style information, using as with the corresponding multiple primitive style informations of the original two-dimensional code.
Fig. 2 shows a kind of generation equipment schematic diagram of generation Quick Response Code in accordance with a preferred embodiment of the present invention;Wherein, The generation equipment includes acquisition device 1 ', style devices 2 ', generating means 3 ', merging device 4 ', wherein, the generating means 3 ' include color lump determination unit 31 ', replacement unit 32 '.Specifically, acquisition device 1 ' obtains pending original two-dimensional code;Sample Formula device 2 ' obtains and the corresponding multiple primitive style informations of the original two-dimensional code;Color lump determination unit 31 ' determines described Color lump distribution matrix corresponding to original two-dimensional code;Replacement unit 32 ' by according in the multiple primitive style information at least One is replaced processing to color lump in the color lump distribution matrix, generates multiple centres two corresponding to the original two-dimensional code Tie up code;Merge the order dependent information of primitive style information of the device 4 ' according to corresponding to the middle Quick Response Code, described in merging Multiple middle Quick Response Codes, to obtain corresponding dynamic two-dimension code.Wherein, the acquisition device 1 ', style devices 2 ', merging device 4 ' is identical or essentially identical with corresponding intrument shown in Fig. 1, therefore details are not described herein again, and is incorporated herein by reference.
Constantly work between above-mentioned each device, here, it will be understood by those skilled in the art that " lasting " refers to State each device respectively in real time, or the operating mode requirement according to setting or real-time adjustment, carry out pending initial two Tie up the acquisition of code, the acquisition of primitive style information, definite, centre Quick Response Code the generation of color lump distribution matrix, dynamic two-dimension code Acquisition etc., until the generation equipment stops obtaining pending original two-dimensional code.
Color lump determination unit 31 ' determines the color lump distribution matrix corresponding to the original two-dimensional code.
Specifically, the color lump determination unit 31 ' to each basic blocks of the original two-dimensional code by carrying out gray scale Value analysis, obtains the color lump distribution map of the dark block and light block of the original two-dimensional code(As shown in Figure 8 shown in left side, by institute State the color lump distribution map that original two-dimensional code is converted into being labelled with dark block and light block);The color lump determination unit 31 ' is according to institute Color lump distribution map is stated, is determined and the corresponding color lump distribution matrix of color lump distribution map institute(Color lump point shown on the right side of Fig. 8 Cloth matrix, here, dark color block respective value 1 in the color lump distribution matrix, the light color block is in the color lump moment of distribution Respective value 0 in battle array), the color lump distribution matrix is corresponding with the original two-dimensional code.
Preferably, the color lump determination unit 31 ' can also by each basic blocks to the original two-dimensional code into Row gray value is analyzed, and obtains the original two-dimensional code being divided into the color lump distribution map of 3 classes or 3 class above color lump gray scales, for example, Light block, middle color lump, dark block three classes or more class etc.;So as to which the color lump determination unit 31 ' is distributed according to the color lump Figure, determine with the corresponding color lump distribution matrix of color lump distribution map institute, for example, the color lump distribution matrix is by using 0, 1,2 three kind of value, to correspond to light block, middle color lump, dark block respectively, the color lump distribution matrix, and with the original two-dimensional Code is corresponding.
Here, those skilled in the art will be understood that the color lump determination unit 31 ' can be to the original two-dimensional code institute Corresponding whole background frame is handled, to obtain the color lump distribution matrix of whole picture corresponding to the original two-dimensional code;Also Can be only pair with the corresponding whole picture of the original two-dimensional code, being carried out with original two-dimensional code institute corresponding region Processing, to obtain the region(Only obtain the original two-dimensional code)Corresponding color lump distribution matrix.
For example, the color lump determination unit 31 ' passes through the position according to the original two-dimensional code among the background patterns Put coordinate(x,y)And the bar code area length of side L of the original two-dimensional code, the original two-dimensional code is determined in the background patterns Corresponding target area;
According to the basic blocks length of side s of the original two-dimensional code and original two-dimensional code length of side L(Wherein, L is the integral multiple of s), The target area is divided into n*n(n=L/s)A basic blocks;
Gray value analysis is carried out to n*n basic blocks successively, corresponding n ranks distribution matrix M is obtained, if wherein the i-th row jth Row basic blocks gray scale is more than a certain critical value H(As dark block), then M (i, j)=1, otherwise M (i, j)=0;
The distribution matrix M is the color lump distribution matrix.
Replacement unit 32 ' passes through according at least one in the color lump distribution matrix in the multiple primitive style information Color lump is replaced processing, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code.
Specifically, the replacement unit 32 ' is opposite with the original two-dimensional code according to acquired in the style devices 2 ' The multiple primitive style informations answered, and color lump distribution matrix determined by the color lump determination unit 31 ', according to the color lump Numerical value in distribution matrix, is replaced primary colors block using at least one in primitive style information corresponding thereto, such as Dark block in primitive style information is replaced into the color lump that numerical value in the color lump distribution matrix is 1, by primitive style information Light block to replace numerical value in the color lump distribution matrix be 0 color lump etc., it is corresponding with the original two-dimensional code to generate Middle Quick Response Code;And then multiple primitive style informations are utilized, it is replaced respectively according to the color lump distribution matrix, with life Into multiple middle Quick Response Codes.
For example, in such as " the primitive pattern example of color change " of Fig. 9, the color " black, dark blue, red, purple, dark green " is all Belong to dark primitive style information, can be used for replacing the color lump that numerical value in the color lump distribution matrix is 1.
Preferably, the replacement unit 32 ' can be according to predetermined color lump Substitution Rules, by according to the multiple primitive It is at least one in style information that processing is replaced to color lump in the color lump distribution matrix, it is right to generate the original two-dimensional code institute The multiple middle Quick Response Codes answered.Wherein, the color lump Substitution Rules include but not limited to:Dark block in primitive style information replaces The correspondence that the light block in corresponding dark block, primitive style information in colour changing block distribution matrix is replaced in color lump distribution matrix is shallow Color lump or its combination.
Fig. 3 shows a kind of generation equipment schematic diagram of generation Quick Response Code of another preferred embodiment according to the present invention;Its In, the generation equipment includes acquisition device 1 ", style devices 2 ", generating means 3 ", merging device 4 ", Sequence Determination Means 5”.Specifically, acquisition device 1 " obtains pending original two-dimensional code;Style devices 2 " obtain opposite with the original two-dimensional code The multiple primitive style informations answered;Generating means 3 " are according at least one in the multiple primitive style information and described first Beginning Quick Response Code, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code;Sequence Determination Means 5 " determine the multiple Primitive pattern sequence corresponding to primitive style information;Merge primitive pattern of the device 4 " according to corresponding to the middle Quick Response Code Order dependent information of the information in the primitive pattern sequence, merges the multiple middle Quick Response Code, corresponding dynamic to obtain State Quick Response Code.Wherein, the acquisition device 1 ", style devices 2 ", generating means 3 " are identical or basic with corresponding intrument shown in Fig. 1 It is identical, therefore details are not described herein again, and be incorporated herein by reference.
Constantly work between above-mentioned each device, here, it will be understood by those skilled in the art that " lasting " refers to State each device respectively in real time, or the operating mode requirement according to setting or real-time adjustment, carry out pending initial two Tie up the acquisition of code, the acquisition of primitive style information, the generation of centre Quick Response Code, primitive pattern sequence fixed and moving state Quick Response Code really Acquisition etc., until the generation equipment stops obtaining pending original two-dimensional code.
Sequence Determination Means 5 " determine the primitive pattern sequence corresponding to the multiple primitive style information.
Specifically, the Sequence Determination Means 5 " are according to the multiple primitive style information, by based on predetermined primitive Pattern sequence determines rule, or the operation information according to user(Customizable sequence complicated, variation is personalized)Deng side Formula, by the primitive style information set synthesis unit pattern sequence, wherein, in the primitive pattern sequence, the primitive sample Formula information repeats.
Wherein, the primitive pattern sequence determines rule such as according to the color change of the primitive style information(Such as color Gradual change type or color change formula etc.)Or change in pattern, carry out determining for primitive pattern sequence;For example, the change according to shade Change, be converted into dark-brown from black and be changed to Dark grey again;According to change in pattern, it is converted into octagon from square and is converted into again Circle etc..
For example, the primitive style information that the style devices 2 " are provided is A, B, C, then the primitive style information institute is right The primitive pattern sequence answered can be ABC, or can also be ABCABC(It can repeat), or can also be AABBCC, Or can also be any combination such as AABCABC.
Here, different primitive pattern sequences finally determines the dynamic effect of the dynamic two-dimension code.So as to different Primitive pattern sequence can produce different visual effects, and such as variform primitive pattern sequence can produce Quick Response Code cell shapes The effect of change, the different primitive pattern of color can produce the effect of Quick Response Code color change(Including gradual change and mutation and It is combined).
For example, here, the essential characteristic that color gradient formula pattern sequence (S [1], S [2] ..., S [n]) has is:
Color formula S [i] .color from light to dark<=S[i+1].color
Color formula S [i] .color from depth to shallow>=S[i+1].color
The essential characteristic that color change formula sequence (S [1], S [2] ..., S [n]) has is:
S[i-1].color>>S[i].color<<S[i+1].color
Merge primitive style information of the device 4 " according to corresponding to the middle Quick Response Code in the primitive pattern sequence Order dependent information, merge the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
Specifically, the primitive style information for merging device 4 " according to corresponding to the middle Quick Response Code is in the primitive Order dependent information in pattern sequence, for example, by the multiple middle Quick Response Code according to the order of the primitive pattern sequence Configuration frame chained list, by the way that the middle Quick Response Code of the frame chained list is merged, the picture of the dynamic such as gif forms of generation, i.e., Obtain corresponding dynamic two-dimension code.Wherein, due to the primitive style information be it is multiple and different, according to the primitive After the order dependent information of style information merges, the dynamic two-dimension code is movable.
Preferably, the Sequence Determination Means 5 " can determine institute according to the application scenarios information of the original two-dimensional code State the primitive pattern sequence corresponding to multiple primitive style informations.
Specifically, the Sequence Determination Means 5 " can select suitable according to the application scenarios information of the original two-dimensional code In the primitive pattern sequence of the application scenarios.For example, when the application scenarios information is type of sports, then modal shift is selected More significant primitive pattern sequence, when the application scenarios information is the landscape ornamental types releived, then selects modal shift More slow primitive pattern sequence.Here, the application scenarios information includes but not limited to the subject information of the application, answers Presentation information, video preview information etc..
Fig. 4 shows a kind of method flow diagram of generation Quick Response Code according to a further aspect of the present invention.Specifically, in step In s1, the generation equipment obtains pending original two-dimensional code;In step s2, the generation equipment obtain with it is described initial The corresponding multiple primitive style informations of Quick Response Code;In step s3, the generation equipment is believed according to the multiple primitive pattern It is at least one in breath, and the original two-dimensional code, generate multiple middle Quick Response Codes corresponding to the original two-dimensional code;In step In rapid s4, the order dependent information of primitive style information of the generation equipment according to corresponding to the middle Quick Response Code, merges The multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
Constantly work between above steps, here, it will be understood by those skilled in the art that " lasting " refers to State each step respectively in real time, or the operating mode requirement according to setting or real-time adjustment, carry out pending initial two The acquisition of code, the acquisition of primitive style information, the generation of centre Quick Response Code, acquisition of dynamic two-dimension code etc. are tieed up, until the life Forming apparatus stops obtaining pending original two-dimensional code.
In step s1, the generation equipment obtains pending original two-dimensional code.
Specifically, in step s1, the generation equipment is by various communication protocols, by Various types of data coffret, Interact with the one or more databases or other third party devices for storing or providing the original two-dimensional code, wait to locate to obtain The original two-dimensional code of reason;Alternatively, in step s1, the generation equipment by interacting with other equipment, or by with Family interacts, and receives the user by clicking on, touching, one or more content informations that mode submitted such as inputting, and will The content information is based on Quick Response Code generating principle and/or interdependent parameter etc., to generate pending original two-dimensional code.
Wherein, the original two-dimensional code including but not limited to only express the text message, with pure color or black and white What is generated is embedded in such as the Quick Response Code of the alternate formula of traditional dichromatism, black and white alternating expression and dichromatism gradual change type, or at Quick Response Code center Quick Response Code of small picture etc..
In step s2, the generation equipment obtains and the corresponding multiple primitive style informations of the original two-dimensional code.
Specifically, in step s2, the generation equipment is by various communication protocols, by Various types of data coffret, Interact with the one or more databases or other third party devices for storing or providing the primitive style information, it is more to obtain A primitive style information, then establishes mapping relations by the primitive style information and the original two-dimensional code, as with The corresponding multiple primitive style informations of original two-dimensional code;Or in step s2, it is described generation equipment by with user Interact, receive the user by click on, touch, input etc. submitted selected by mode it is corresponding with the original two-dimensional code Multiple primitive style informations;Or in step s2, the generation equipment is according to the original two-dimensional code, based on predetermined choosing Select standard(Information as corresponding to according to the original two-dimensional code etc.), select and the corresponding multiple bases of the original two-dimensional code First style information.
Wherein, block of pixels or shape of the multiple primitive style information including but not limited to color changeable are variable The one or more of figure.For example, as shown in figure 9, Fig. 9 is shown with multiple primitive style informations of different shapes, and Primitive style information with different colours.
In step s3, the generation equipment is according at least one in the multiple primitive style information and described first Beginning Quick Response Code, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code.
Specifically, in step s3, it is described generation equipment according to acquired in the step s2 with the original two-dimensional code Corresponding multiple primitive style informations, and the original two-dimensional code acquired in the step s1, such as utilize the primitive sample One in formula information, the respective pixel in the original two-dimensional code is replaced, with generation and the primitive style information Quick Response Code among corresponding one, and then utilize multiple primitive style informations, that is, utilize primitive two or more described Style information, is respectively replaced the respective pixel in the original two-dimensional code, to generate multiple middle Quick Response Codes.
Here, those skilled in the art will be understood that the replacement process while suitable for dark block and light block, it is described Dark block need to be replaced by the primitive style information of dark color, and the light color block need to be replaced by the primitive style information of light color, with Ensure that the Quick Response Code can be scanned identifying.Primitive style information with same shape can also be at the same time with dark base First style information and light primitive style information.
For example, in such as " the primitive pattern example of color change " of Fig. 9, the color " black, dark blue, red, purple, dark green " is all Belong to dark primitive style information, can be used for replacing dark block.
For example, as shown in fig. 7, Fig. 7 shows that one kind is handled the original two-dimensional code using primitive style information The schematic diagram of the middle Quick Response Code generated afterwards.Specifically, the original two-dimensional code is generated to be common using black and white strip Quick Response Code with background patterns, the primitive style information humanoid pattern as shown in Fig. 7 lower right corner are described in step s2 Generation equipment obtains one of the primitive style information of the humanoid pattern as the original two-dimensional code, in step s3, institute State generation equipment and the black and white strip in the original two-dimensional code be divided into multiple squares, and utilize the primitive style information, The square of black is replaced using the humanoid pattern of black, the square of white is replaced using the humanoid pattern of white Change, so as to generate middle Quick Response Code as shown in Figure 7.In step s3, the generation equipment can be according to the primitive pattern The difference of information, according to the multiple primitive style information and the original two-dimensional code, generates multiple middle Quick Response Codes.
In step s4, the order phase of primitive style information of the generation equipment according to corresponding to the middle Quick Response Code Information is closed, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
Specifically, in step s4, primitive style information of the generation equipment according to corresponding to the middle Quick Response Code Order dependent information, for example, by the multiple middle Quick Response Code configuration frame chained list, by will the frame chained list among two dimension Code merges, and generation dynamically such as the picture of gif forms, that is, obtains corresponding dynamic two-dimension code.Wherein, due to the primitive Style information be it is multiple and different, it is therefore, described dynamic after being merged according to the order dependent information of the primitive style information State Quick Response Code is movable.
Wherein, the order dependent information can be according to the suitable of the primitive style information provided in the step s2 Sequence information determines, can also be determined according to the specified order of user setting or for the parameter of genesis sequence, can also be according to institute State the relevant information of original two-dimensional code(Content information as corresponding to the original two-dimensional code etc.)And determine, so that by institute State primitive style information and carry out the modes such as permutation and combination, obtain the order dependent information corresponding to it.For example, in the step s2 The primitive style information provided is A, B, C, then the order dependent information corresponding to the primitive style information can be ABC, Or can also be ABCABC(It can repeat), can also be either AABBCC or can also be any group of AABCABC etc. Close.Different orderings finally determines the dynamic effect of the dynamic two-dimension code.
Here, since the original two-dimensional code that the middle Quick Response Code is included is identical, and the primitive sample corresponding to it Formula information is different, therefore the dynamic two-dimension code after merging has movable effect, and due to the dynamic two-dimension code Each frame is all to have the code shape identical with the original two-dimensional code, therefore the content scanned is identical.
Preferably, the generation equipment further includes step s6(It is not shown), wherein, in step s6, the generation equipment The primitive style information is verified;In step s3, the generation equipment is according to the multiple primitive by verification It is at least one in style information, and the original two-dimensional code, generate multiple middle two dimensions corresponding to the original two-dimensional code Code.
Specifically, in step s6, the legitimacy of primitive style information described in the generation device authentication, for example, checking Whether the primitive style information belongs to predetermined primitive pattern set, or whether meet the regulation of primitive pattern etc..For example, When the optional primitive style set is combined into { a, b, c, d }, if the primitive style information is not belonging to the set, then it is assumed that the base First style information is illegal, on the contrary then pass through verification;Alternatively, for example, the form of the primitive style information is verified, such as The square picture that the primitive style information is 15 pixel x15 pixels is defined, if the primitive style information does not meet the picture Element requires, then it is assumed that the primitive style information is illegal, on the contrary then pass through verification.
In step s3, the generation equipment is obtained in the step s6 by multiple primitive style informations of verification, root According at least one in the multiple primitive style information by verification, and the original two-dimensional code, generation described initial two The middle Quick Response Code corresponding to code is tieed up, and then according to multiple primitive style informations, to obtain multiple middle Quick Response Codes.Here, In step s3, the mode that the generation equipment obtains multiple middle Quick Response Codes is identical with the acquisition pattern of step s3 described in Fig. 4 Or it is similar, therefore details are not described herein, and be incorporated herein by reference.
Preferably, in step s2, the generation equipment can be obtained according to the code relevant information of the original two-dimensional code With the corresponding multiple primitive style informations of the original two-dimensional code.
Specifically, in step s2, it is described generation equipment can according to the code relevant information of the original two-dimensional code, such as According to background patterns corresponding to the application scenarios information of the affiliated application message of the original two-dimensional code, the original two-dimensional code Match colors characteristic information or Quick Response Code information to be presented etc., by based on predetermined selection rule, such as specifically matching somebody with somebody Color characteristic then selects the modes such as predetermined primitive style information, obtains and the corresponding multiple primitive patterns of the original two-dimensional code Information.
It is highly preferred that when the code relevant information includes the application scenarios information of the original two-dimensional code, in step s2 In, the generation equipment can obtain corresponding multiple of corresponding application according to the application scenarios information of the original two-dimensional code Image;Obtain with the corresponding multiple style informations of described multiple images, using as corresponding more with the original two-dimensional code A primitive style information.
Specifically, the code relevant information includes the application scenarios information of the original two-dimensional code, wherein, the applied field Scape information includes but not limited to the subject information of the application, the presentation information of application, video preview information etc.;In step s2 In, the generation equipment is according to the application scenarios information, for example, the subject information of the application is amusement park, then will be humanoid Image, amusement park each facility thumbnail or simple picture as with the corresponding image information of the application, such as described application Subject information be food, then using the thumbnail of each food or simple picture as with the corresponding image information of the application;Or Person is set based on predetermined number of pictures per second, by the way that the presentation information of the application or video preview information are carried out continuous capturing, To generate corresponding multiple images(Such as color is different or variform multiple sectional drawings);In step s2, the generation Equipment handles described multiple images, as extracted the main part in image so that image can be clear as style information It is clear distinguishable, or the color part in extraction image so that the multiple style informations with different colours of generation, and will with it is described The corresponding multiple style informations of multiple images, using as with the corresponding multiple primitive style informations of the original two-dimensional code.
It is highly preferred that when the code relevant information includes believing with color characteristic for background patterns corresponding to the original two-dimensional code During breath, in step s2, it is described generation equipment can according to corresponding to the original two-dimensional code background patterns with color characteristic believe Breath, the candidate motif style information that selection matches with the color matching characteristic information from multiple candidate motif style informations, with As with the corresponding multiple primitive style informations of the original two-dimensional code.
Specifically, the code relevant information includes the color matching characteristic information of background patterns corresponding to the original two-dimensional code, Wherein, the color matching characteristic information includes but not limited to the colouring information of the original two-dimensional code background patterns, color change letter Breath etc.;In step s2, the generation equipment is according to the color matching characteristic information, from multiple candidate motif style informations, choosing Select with the candidate motif style information that matches of color matching characteristic information, and using the candidate motif style information as with institute State the corresponding primitive style information of original two-dimensional code.
For example, selection with the original two-dimensional code corresponding to the colors of background patterns differ larger candidate motif sample Formula information, as with the corresponding primitive style information of the original two-dimensional code, so as in the dynamic two-dimension code of generation Clearly read the code shape information of background patterns and original two-dimensional code.
Wherein, in step s2, the generation equipment can be connect by various communication protocols by Various types of data transmission Mouthful, interact with the one or more databases or other third party devices for storing or providing the candidate motif style information, To obtain multiple candidate motif style informations;Or in step s2, the generation equipment is connect by interacting with user The user is received by clicking on, touching, the multiple candidate motif style informations submitted selected by mode such as inputting;Or in step In s2, the generation equipment is according to the original two-dimensional code, based on predetermined selection criteria(As according to the original two-dimensional code institute Corresponding information etc.), select and the corresponding multiple candidate motif style informations of the original two-dimensional code.
It is highly preferred that when the code relevant information include the original two-dimensional code corresponding to information to be presented when, in step In rapid s2, the generation equipment can be according to the information to be presented, selection and the letter to be presented from multiple candidate images The matched multiple preferred images of manner of breathing;Obtain with the corresponding multiple style informations of the multiple preferred image, using as with institute State the corresponding multiple primitive style informations of original two-dimensional code.
Specifically, the code relevant information includes the information to be presented corresponding to the original two-dimensional code, wherein, it is described to treat It is text information, link information corresponding to the original two-dimensional code after original two-dimensional code is scanned that information, which is presented, Or other relevant informations.
In step s2, the generation equipment is right according to the information to be presented, such as according to the information institute to be presented The content information answered, from the preferred image that selection matches with the content from multiple candidate images, such as it is described wait be in Existing information is the broadcasting link of animation " sea thief king ", then candidate image of the selection with " sea thief king " title, or is had and " sea thief The candidate image of king " content information, or with " sea thief king " other relevant candidate images, as with the information phase to be presented The multiple preferred images matched somebody with somebody.
Alternatively, in step s2, the generation equipment is according to the information to be presented, such as according to the information to be presented Text message, from the candidate image that selection matches with the content from multiple candidate images, for example, it is described wait be in Existing information is " blue sky ", then candidate image of the selection with blue sky content, as multiple with the information match to be presented Preferred image.
In step s2, the generation equipment is handled the multiple preferred image, such as according to the preferred image Extract the main part in preferred image so that the preferred image can be clear and legible as style information, or extraction is excellent Select the color part in image so that the multiple style informations with different colours of generation, and will be with the multiple preferred image Corresponding multiple style informations, using as with the corresponding multiple primitive style informations of the original two-dimensional code.
Fig. 5 shows a kind of method flow diagram of generation Quick Response Code in accordance with a preferred embodiment of the present invention.Specifically, exist In step s1 ', the generation equipment obtains pending original two-dimensional code;In step s2 ', the generation equipment obtains and institute State the corresponding multiple primitive style informations of original two-dimensional code;In step s31 ', the generation equipment determines described initial two Tie up the color lump distribution matrix corresponding to code;In step s32 ', the generation equipment according to the multiple primitive pattern by believing It is at least one in breath that processing is replaced to color lump in the color lump distribution matrix, generate more corresponding to the original two-dimensional code A middle Quick Response Code;In step s4 ', primitive style information of the generation equipment according to corresponding to the middle Quick Response Code Order dependent information, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.Wherein, the step 1 ', step Rapid 2 ', step 4 ' with that step is corresponded to shown in Fig. 4 is identical or essentially identical, therefore details are not described herein again, and wraps by reference It is contained in this.
Constantly work between above steps, here, it will be understood by those skilled in the art that " lasting " refers to State each step respectively in real time, or the operating mode requirement according to setting or real-time adjustment, carry out pending initial two Tie up the acquisition of code, the acquisition of primitive style information, definite, centre Quick Response Code the generation of color lump distribution matrix, dynamic two-dimension code Acquisition etc., until the generation equipment stops obtaining pending original two-dimensional code.
In step s31 ', the generation equipment determines the color lump distribution matrix corresponding to the original two-dimensional code.
Specifically, in step s31 ', it is described generation equipment by each basic blocks to the original two-dimensional code into Row gray value is analyzed, and obtains the color lump distribution map of the dark block and light block of the original two-dimensional code(Left side institute as shown in Figure 8 Show, the original two-dimensional code is converted into being labelled with to the color lump distribution map of dark block and light block);It is described in step s31 ' Equipment is generated according to the color lump distribution map, is determined and the corresponding color lump distribution matrix of color lump distribution map institute(As Fig. 8 is right Color lump distribution matrix shown in side, here, dark color block respective value 1 in the color lump distribution matrix, the light color block exists Respective value 0 in the color lump distribution matrix), the color lump distribution matrix is corresponding with the original two-dimensional code.
Preferably, in step s31 ', the generation equipment can also pass through each base to the original two-dimensional code Plinth block carries out gray value analysis, and the color lump for obtaining the original two-dimensional code being divided into 3 classes or 3 class above color lump gray scales is distributed Figure, for example, light block, middle color lump, dark block three classes or more class etc.;So that in step s31 ', the generation equipment root According to the color lump distribution map, the corresponding color lump distribution matrix of definite and color lump distribution map institute, for example, the color lump is distributed Matrix is by using 0,1,2 three kind of value, to correspond to light block, middle color lump, dark block respectively, the color lump distribution matrix, and It is corresponding with the original two-dimensional code.
Here, those skilled in the art will be understood that in step s31 ', the generation equipment can be to described initial two Whole background frame corresponding to dimension code is handled, to obtain the color lump moment of distribution of whole picture corresponding to the original two-dimensional code Battle array;Can also only pair with the corresponding whole picture of the original two-dimensional code, with corresponding area of original two-dimensional code institute Domain is handled, to obtain the region(Only obtain the original two-dimensional code)Corresponding color lump distribution matrix.
For example, in step s31 ', the generation equipment by according to the original two-dimensional code the background patterns it In position coordinates(x,y)And the bar code area length of side L of the original two-dimensional code, determined in the background patterns described initial Target area corresponding to Quick Response Code;
According to the basic blocks length of side s of the original two-dimensional code and original two-dimensional code length of side L(Wherein, L is the integral multiple of s), The target area is divided into n*n(n=L/s)A basic blocks;
Gray value analysis is carried out to n*n basic blocks successively, corresponding n ranks distribution matrix M is obtained, if wherein the i-th row jth Row basic blocks gray scale is more than a certain critical value H(As dark block), then M (i, j)=1, otherwise M (i, j)=0;
The distribution matrix M is the color lump distribution matrix.
In step s32 ', the generation equipment passes through according at least one to described in the multiple primitive style information Color lump is replaced processing in color lump distribution matrix, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code.
Specifically, in step s32 ', the generation equipment is according to acquired with described initial two in the step s2 ' The corresponding multiple primitive style informations of code, and identified color lump distribution matrix in the step s31 ' are tieed up, according to described Numerical value in color lump distribution matrix, is replaced primary colors block using at least one in primitive style information corresponding thereto, Such as the dark block in primitive style information is replaced into the color lump that numerical value in the color lump distribution matrix is 1, primitive pattern is believed It is 0 color lump etc. that light block in breath, which replaces numerical value in the color lump distribution matrix, opposite with the original two-dimensional code to generate The middle Quick Response Code answered;And then multiple primitive style informations are utilized, it is replaced respectively according to the color lump distribution matrix, To generate multiple middle Quick Response Codes.
For example, in such as " the primitive pattern example of color change " of Fig. 9, the color " black, dark blue, red, purple, dark green " is all Belong to dark primitive style information, can be used for replacing the color lump that numerical value in the color lump distribution matrix is 1.
Preferably, in step s32 ', the generation equipment can be according to predetermined color lump Substitution Rules, by according to institute State it is at least one in multiple primitive style informations be replaced processing to color lump in the color lump distribution matrix, generate described initial Multiple middle Quick Response Codes corresponding to Quick Response Code.Wherein, the color lump Substitution Rules include but not limited to:In primitive style information Dark block replace the corresponding dark block in color lump distribution matrix, the light block in primitive style information replaces color lump distribution matrix In corresponding light block or its combination.
Fig. 6 shows a kind of method flow diagram of generation Quick Response Code of another preferred embodiment according to the present invention.Specifically, In step s1 ", the generation equipment obtains pending original two-dimensional code;In step s2 ", it is described generation equipment obtain with The corresponding multiple primitive style informations of original two-dimensional code;In step s3 ", the generation equipment is according to the multiple base It is at least one in first style information, and the original two-dimensional code, generate multiple centres two corresponding to the original two-dimensional code Tie up code;In step s5 ", the generation equipment determines the primitive pattern sequence corresponding to the multiple primitive style information; In step s4 ", primitive style information of the generation equipment according to corresponding to the middle Quick Response Code is in the primitive pattern sequence Order dependent information in row, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.Wherein, the step Rapid 1 ", step 2 ", step 3 " is identical or essentially identical with corresponding to step shown in Fig. 4, therefore details are not described herein again, and passes through reference Mode is incorporated herein.
Constantly work between above steps, here, it will be understood by those skilled in the art that " lasting " refers to State each step respectively in real time, or the operating mode requirement according to setting or real-time adjustment, carry out pending initial two Tie up the acquisition of code, the acquisition of primitive style information, the generation of centre Quick Response Code, primitive pattern sequence fixed and moving state Quick Response Code really Acquisition etc., until the generation equipment stops obtaining pending original two-dimensional code.
In step s5 ", the generation equipment determines the primitive pattern sequence corresponding to the multiple primitive style information.
Specifically, in step s5 ", the generation equipment is according to the multiple primitive style information, by based on predetermined Primitive pattern sequence determine rule, or the operation information according to user(Customizable sequence complicated, variation is personalized Row)Etc. mode, by the primitive style information set synthesis unit pattern sequence, wherein, it is described in the primitive pattern sequence Primitive style information repeats.
Wherein, the primitive pattern sequence determines rule such as according to the color change of the primitive style information(Such as color Gradual change type or color change formula etc.)Or change in pattern, carry out determining for primitive pattern sequence;For example, the change according to shade Change, be converted into dark-brown from black and be changed to Dark grey again;According to change in pattern, it is converted into octagon from square and is converted into again Circle etc..
For example, in step s2 ", primitive style information that the generation equipment is provided is A, B, C, then the primitive sample Primitive pattern sequence corresponding to formula information can be ABC, or can also be ABCABC(It can repeat), or can also It is AABBCC, or can also is any combination such as AABCABC.
Here, different primitive pattern sequences finally determines the dynamic effect of the dynamic two-dimension code.So as to different Primitive pattern sequence can produce different visual effects, and such as variform primitive pattern sequence can produce Quick Response Code cell shapes The effect of change, the different primitive pattern of color can produce the effect of Quick Response Code color change(Including gradual change and mutation and It is combined).
For example, here, the essential characteristic that color gradient formula pattern sequence (S [1], S [2] ..., S [n]) has is:
Color formula S [i] .color from light to dark<=S[i+1].color
Color formula S [i] .color from depth to shallow>=S[i+1].color
The essential characteristic that color change formula sequence (S [1], S [2] ..., S [n]) has is:
S[i-1].color>>S[i].color<<S[i+1].color
In step s4 ", primitive style information of the generation equipment according to corresponding to the middle Quick Response Code is described Order dependent information in primitive pattern sequence, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
Specifically, in step s4 ", primitive style information of the generation equipment according to corresponding to the middle Quick Response Code Order dependent information in the primitive pattern sequence, for example, by the multiple middle Quick Response Code according to the primitive pattern The order configuration frame chained list of sequence, by the way that the middle Quick Response Code of the frame chained list is merged, generation is dynamically such as gif forms Picture, that is, obtain corresponding dynamic two-dimension code.Wherein, due to the primitive style information be it is multiple and different, according to After the order dependent information of the primitive style information merges, the dynamic two-dimension code is movable.
Preferably, in step s5 ", it is described generation equipment can according to the application scenarios information of the original two-dimensional code, Determine the primitive pattern sequence corresponding to the multiple primitive style information.
Specifically, in step s5 ", it is described generation equipment can according to the application scenarios information of the original two-dimensional code, Selection is suitable for the primitive pattern sequence of the application scenarios.For example, when the application scenarios information is type of sports, then sample is selected Formula changes more significant primitive pattern sequence, when the application scenarios information is the landscape ornamental types releived, then selects sample Formula changes more slow primitive pattern sequence.Here, the application scenarios information includes but not limited to the theme of the application Information, the presentation information of application, video preview information etc..
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, Er Qie In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Profit requires rather than described above limits, it is intended that all in the implication and scope of the equivalency of claim by falling Change is included in the present invention.Any reference numeral in claim should not be considered as to the involved claim of limitation.This Outside, it is clear that one word of " comprising " is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in device claim is multiple Unit or device can also be realized by a unit or device by software or hardware.The first, the second grade word is used for table Show title, and be not offered as any specific order.

Claims (20)

1. a kind of method for generating Quick Response Code, wherein, this method comprises the following steps:
A obtains pending original two-dimensional code;
B is obtained and the corresponding multiple primitive style informations of the original two-dimensional code, wherein, the primitive style information includes tool There are the block of pixels of color changeable or the one or more of the variable figure of shape;
C is according at least one in the multiple primitive style information, and the original two-dimensional code, generates the original two-dimensional code Corresponding multiple middle Quick Response Codes;
The order dependent information of primitive style informations of the d according to corresponding to the middle Quick Response Code, merges the multiple centre two Code is tieed up, to obtain corresponding dynamic two-dimension code.
2. according to the method described in claim 1, wherein, the step c includes:
- determine color lump distribution matrix corresponding to the original two-dimensional code;
C2 is by being replaced color lump in the color lump distribution matrix according at least one in the multiple primitive style information Processing, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code.
3. according to the method described in claim 2, wherein, the step c2 includes:
- according to predetermined color lump Substitution Rules, by according at least one to the color lump in the multiple primitive style information Color lump is replaced processing in distribution matrix, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code.
4. according to the method in any one of claims 1 to 3, wherein, this method further includes:
- the primitive style information is verified;
Wherein, the step c includes:
- according to by least one in the multiple primitive style information of verification, and the original two-dimensional code, described in generation Multiple middle Quick Response Codes corresponding to original two-dimensional code.
5. according to the method in any one of claims 1 to 3, wherein, this method further includes:
X determines the primitive pattern sequence corresponding to the multiple primitive style information;
Wherein, the step d includes:
The order dependent letter of-primitive style information according to corresponding to the middle Quick Response Code in the primitive pattern sequence Breath, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
6. according to the method described in claim 5, wherein, the step x includes:
- according to the application scenarios information of the original two-dimensional code, determine the primitive sample corresponding to the multiple primitive style information Formula sequence.
7. according to the method in any one of claims 1 to 3, wherein, the step b includes:
- according to the code relevant information of the original two-dimensional code, obtain and the corresponding multiple primitive patterns of the original two-dimensional code Information;
Wherein, the code relevant information includes following at least any one:
The application scenarios information of-original two-dimensional code;
The color matching characteristic information of background patterns corresponding to the-original two-dimensional code;
Information to be presented corresponding to the-original two-dimensional code.
8. according to the method described in claim 7, wherein, the code relevant information includes the application scenarios of the original two-dimensional code Information;
Wherein, the step b includes:
- according to the application scenarios information of the original two-dimensional code, obtain corresponding using corresponding multiple images;
- obtain with the corresponding multiple style informations of described multiple images, using as corresponding more with the original two-dimensional code A primitive style information.
9. according to the method described in claim 7, wherein, the code relevant information includes background corresponding to the original two-dimensional code The color matching characteristic information of pattern;
Wherein, the step b includes:
- according to corresponding to the original two-dimensional code background patterns color matching characteristic information, from multiple candidate motif style informations Selection and the candidate motif style information that matches of color matching characteristic information, using as corresponding with the original two-dimensional code Multiple primitive style informations.
10. according to the method described in claim 7, wherein, the code relevant information is included corresponding to the original two-dimensional code Information to be presented;
Wherein, the step b includes:
- according to the information to be presented, selected from multiple candidate images multiple preferred with the information match to be presented Image;
- obtain with the corresponding multiple style informations of the multiple preferred image, using as corresponding with the original two-dimensional code Multiple primitive style informations.
11. a kind of generation equipment for generating Quick Response Code, wherein, which includes:
Acquisition device, for obtaining pending original two-dimensional code;
Style devices, for acquisition and the corresponding multiple primitive style informations of the original two-dimensional code, wherein, the primitive sample Formula information includes the one or more of the variable figure of the block of pixels with color changeable or shape;
Generating means, for according at least one in the multiple primitive style information, and the original two-dimensional code, generate institute State multiple middle Quick Response Codes corresponding to original two-dimensional code;
Merge device, for the order dependent information of the primitive style information according to corresponding to the middle Quick Response Code, merge institute Multiple middle Quick Response Codes are stated, to obtain corresponding dynamic two-dimension code.
12. generation equipment according to claim 11, wherein, the generating means include:
Color lump determination unit, for determining the color lump distribution matrix corresponding to the original two-dimensional code;
Replacement unit, for by according at least one to color in the color lump distribution matrix in the multiple primitive style information Block is replaced processing, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code.
13. generation equipment according to claim 12, wherein, the replacement unit includes:
- according to predetermined color lump Substitution Rules, by according at least one to the color lump in the multiple primitive style information Color lump is replaced processing in distribution matrix, generates multiple middle Quick Response Codes corresponding to the original two-dimensional code.
14. the generation equipment according to any one of claim 11 to 13, wherein, which further includes:
Device is verified, for being verified to the primitive style information;
Wherein, the generating means are used for:
- according to by least one in the multiple primitive style information of verification, and the original two-dimensional code, described in generation Multiple middle Quick Response Codes corresponding to original two-dimensional code.
15. the generation equipment according to any one of claim 11 to 13, wherein, which further includes:
Sequence Determination Means, for determining the primitive pattern sequence corresponding to the multiple primitive style information;
Wherein, the merging device is used for:
The order dependent letter of-primitive style information according to corresponding to the middle Quick Response Code in the primitive pattern sequence Breath, merges the multiple middle Quick Response Code, to obtain corresponding dynamic two-dimension code.
16. generation equipment according to claim 15, wherein, the Sequence Determination Means are used for:
- according to the application scenarios information of the original two-dimensional code, determine the primitive sample corresponding to the multiple primitive style information Formula sequence.
17. the generation equipment according to any one of claim 11 to 13, wherein, the style devices are used for:
- according to the code relevant information of the original two-dimensional code, obtain and the corresponding multiple primitive patterns of the original two-dimensional code Information;
Wherein, the code relevant information includes following at least any one:
The application scenarios information of-original two-dimensional code;
The color matching characteristic information of background patterns corresponding to the-original two-dimensional code;
Information to be presented corresponding to the-original two-dimensional code.
18. generation equipment according to claim 17, wherein, the code relevant information includes answering for the original two-dimensional code Use scene information;
Wherein, the style devices are used for:
- according to the application scenarios information of the original two-dimensional code, obtain corresponding using corresponding multiple images;
- obtain with the corresponding multiple style informations of described multiple images, using as corresponding more with the original two-dimensional code A primitive style information.
19. generation equipment according to claim 17, wherein, it is right that the code relevant information includes original two-dimensional code institute Answer the color matching characteristic information of background patterns;
Wherein, the style devices are used for:
- according to corresponding to the original two-dimensional code background patterns color matching characteristic information, from multiple candidate motif style informations Selection and the candidate motif style information that matches of color matching characteristic information, using as corresponding with the original two-dimensional code Multiple primitive style informations.
20. generation equipment according to claim 17, wherein, it is right that the code relevant information includes original two-dimensional code institute The information to be presented answered;
Wherein, the style devices are used for:
- according to the information to be presented, selected from multiple candidate images multiple preferred with the information match to be presented Image;
- obtain with the corresponding multiple style informations of the multiple preferred image, using as corresponding with the original two-dimensional code Multiple primitive style informations.
CN201310279958.4A 2013-07-04 2013-07-04 A kind of method and apparatus for generating Quick Response Code Active CN104281865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310279958.4A CN104281865B (en) 2013-07-04 2013-07-04 A kind of method and apparatus for generating Quick Response Code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310279958.4A CN104281865B (en) 2013-07-04 2013-07-04 A kind of method and apparatus for generating Quick Response Code

Publications (2)

Publication Number Publication Date
CN104281865A CN104281865A (en) 2015-01-14
CN104281865B true CN104281865B (en) 2018-05-01

Family

ID=52256725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310279958.4A Active CN104281865B (en) 2013-07-04 2013-07-04 A kind of method and apparatus for generating Quick Response Code

Country Status (1)

Country Link
CN (1) CN104281865B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989470A (en) * 2015-02-17 2016-10-05 顾泽苍 Composition method of optical payment system of mobile phone credit card and deposit card
CN106022424B (en) * 2016-05-10 2019-04-26 腾讯科技(深圳)有限公司 Generate the method and device with the two-dimension code image of dynamic effect
CN107704911A (en) * 2017-10-17 2018-02-16 北京小米移动软件有限公司 Generation, read method and the device of Quick Response Code
CN111626390A (en) * 2019-02-27 2020-09-04 北京京东尚科信息技术有限公司 Method and device for dynamically displaying two-dimensional code
CN112070195A (en) * 2020-09-22 2020-12-11 澳新银行营运服务(成都)有限公司 Two-dimensional code identification and generation method and device, electronic equipment and storage medium
CN112651475B (en) * 2021-01-06 2022-09-23 北京字节跳动网络技术有限公司 Two-dimensional code display method, device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010026665A (en) * 2008-07-16 2010-02-04 S Code Relations:Kk Two-dimensional code
JP2010182336A (en) * 2010-05-10 2010-08-19 Digital Information Technologies Kk Code pattern image data generation device and medium with code pattern
CN101908155A (en) * 2010-06-08 2010-12-08 真心彩网络科技(上海)有限公司 The coded system of two-dimension code and method, decode system and method
JP2011081832A (en) * 2010-12-13 2011-04-21 Denso Wave Inc Two-dimensional code division display method, two-dimensional code reading method and two-dimensional code reader
CN102334133A (en) * 2009-02-27 2012-01-25 At信息股份有限公司 Two dimensional code display device, two dimensional code display method, and program
CN102622628A (en) * 2012-02-24 2012-08-01 南京大学 Method for generating quick response (QR) codes in rendering mode
CN102750564A (en) * 2012-05-14 2012-10-24 王安然 Dynamic two-dimension code and decoding method thereof
CN102999770A (en) * 2011-09-14 2013-03-27 尤星 Dynamic two-dimensional code system and dynamic two-dimensional code method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9152903B2 (en) * 2011-11-04 2015-10-06 Ebay Inc. Automated generation of QR codes with embedded images

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010026665A (en) * 2008-07-16 2010-02-04 S Code Relations:Kk Two-dimensional code
CN102334133A (en) * 2009-02-27 2012-01-25 At信息股份有限公司 Two dimensional code display device, two dimensional code display method, and program
JP2010182336A (en) * 2010-05-10 2010-08-19 Digital Information Technologies Kk Code pattern image data generation device and medium with code pattern
CN101908155A (en) * 2010-06-08 2010-12-08 真心彩网络科技(上海)有限公司 The coded system of two-dimension code and method, decode system and method
JP2011081832A (en) * 2010-12-13 2011-04-21 Denso Wave Inc Two-dimensional code division display method, two-dimensional code reading method and two-dimensional code reader
CN102999770A (en) * 2011-09-14 2013-03-27 尤星 Dynamic two-dimensional code system and dynamic two-dimensional code method
CN102622628A (en) * 2012-02-24 2012-08-01 南京大学 Method for generating quick response (QR) codes in rendering mode
CN102750564A (en) * 2012-05-14 2012-10-24 王安然 Dynamic two-dimension code and decoding method thereof

Also Published As

Publication number Publication date
CN104281865A (en) 2015-01-14

Similar Documents

Publication Publication Date Title
CN104281865B (en) A kind of method and apparatus for generating Quick Response Code
CN104281864B (en) A kind of method and apparatus for generating Quick Response Code
CN106355153A (en) Virtual object display method, device and system based on augmented reality
CN106816077A (en) Interactive sandbox methods of exhibiting based on Quick Response Code and augmented reality
CN105556574A (en) Rendering apparatus, rendering method thereof, program and recording medium
KR20110070056A (en) Method and apparatus for easy and intuitive generation of user-customized 3d avatar with high-quality
CN102385512A (en) Apparatus and method for providing augmented reality (AR) using a marker
CN109325990A (en) Image processing method and image processing apparatus, storage medium
CN114067041B (en) Material generation method and device of three-dimensional model, computer equipment and storage medium
CN104103091B (en) 3D intelligent modeling method and system and 3D model flexible manufacturing system
CN103617219A (en) Method and device for acquiring stereoscopic thermodynamic diagrams
CN106982240A (en) The display methods and device of information
CN104580883B (en) Image processing apparatus, image processing method and recording medium
CN107638690A (en) Method, device, server and medium for realizing augmented reality
CN110276816A (en) Regional color filling method and device, electronic equipment and computer readable storage medium
Barros et al. Balanced civilization map generation based on open data
CN107077746A (en) System, method and computer program product for network transmission and the Automatic Optimal of the 3D texture models of real-time rendering
CN103886352B (en) The method and apparatus that a kind of Quick Response Code is processed
CN107748908A (en) A kind of individual two-dimensional code constructing method
CN109685593A (en) Data object information providing method, device and electronic equipment
US20180025547A1 (en) 2d graphical coding to create a 3d image
GB2584753A (en) All-around spherical light field rendering method
US10960301B2 (en) Rendering method
CN111640190A (en) AR effect presentation method and apparatus, electronic device and storage medium
Barszcz et al. 3D scanning digital models for virtual museums

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