CN108416405A - 2 D code verification method and system - Google Patents

2 D code verification method and system Download PDF

Info

Publication number
CN108416405A
CN108416405A CN201810198980.9A CN201810198980A CN108416405A CN 108416405 A CN108416405 A CN 108416405A CN 201810198980 A CN201810198980 A CN 201810198980A CN 108416405 A CN108416405 A CN 108416405A
Authority
CN
China
Prior art keywords
code
counterfeiting information
color
colored spots
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810198980.9A
Other languages
Chinese (zh)
Other versions
CN108416405B (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 Knownsec Information Technology Co Ltd
Original Assignee
Beijing Knownsec Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Knownsec Information Technology Co Ltd filed Critical Beijing Knownsec Information Technology Co Ltd
Priority to CN201810198980.9A priority Critical patent/CN108416405B/en
Publication of CN108416405A publication Critical patent/CN108416405A/en
Application granted granted Critical
Publication of CN108416405B publication Critical patent/CN108416405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Credit Cards Or The Like (AREA)

Abstract

A kind of 2 D code verification method of present invention offer and system, are related to planar bar code technology field.This method includes:First electronic equipment obtains the color 2 D code for carrying unique objects anti-counterfeiting information being generated in advance;First electronic equipment extracts quantity, position distribution and the rgb value of color point in color 2 D code, and the current anti-counterfeiting information of color 2 D code is determined according to quantity, position distribution and rgb value;Server obtains current anti-counterfeiting information from the first electronic equipment, and judges whether current authentication is first time certification;When to be, current anti-counterfeiting information is compared server with target anti-counterfeiting information;If current anti-counterfeiting information is identical as target anti-counterfeiting information, just determination is verified.This programme to the color 2 D code for carrying target anti-counterfeiting information by being identified certification, it can be achieved that anti-fake certificate helps to improve the safety of anti-counterfeiting information in addition, using the color 2 D code.

Description

2 D code verification method and system
Technical field
The present invention relates to planar bar code technology fields, in particular to a kind of 2 D code verification method and system.
Background technology
Traditional Quick Response Code is distributed at plane (on two-dimensional directional) according to certain rules with certain specific geometric figure Chequered with black and white figure records the bar code of data symbol information.Quick Response Code is carrier and information collection, the propagation of information Important method and means can play the role of carrying efficient in every field.Popularization with intelligent terminal and mobile network It is quick universal so that Quick Response Code becomes the window in Future Data epoch.Planar bar code technology is quick in mobile e-business, word The fields such as typing, food safety management are widely used.In the prior art, although there is color 2 D code, two dimension The information that code carries is single, does not encrypt, 2 D code information can be read by Quick Response Code identifier by its terminal, is unfavorable for Anti-fake certificate is carried out using Quick Response Code.Therefore, a kind of scheme to solve the above problems how is provided, it has also become art technology The a great problem of personnel.
Invention content
In order to overcome above-mentioned deficiency in the prior art, a kind of 2 D code verification method of present invention offer and system, pass through Color 2 D code to carrying anti-counterfeiting information is authenticated, and helps to realize anti-fake certificate, and then solve the above problems.
To achieve the goals above, the technical solution that present pre-ferred embodiments are provided is as follows:
Present pre-ferred embodiments provide a kind of 2 D code verification method, are applied to Quick Response Code and verify system, the two dimension Code verification system includes server and the first electronic equipment for being connect with the server communication, the method includes:
First electronic equipment obtains the color 2 D code for carrying unique objects anti-counterfeiting information being generated in advance;
First electronic equipment extracts quantity, position distribution and the rgb value of color point in the color 2 D code, and root The current anti-counterfeiting information of the color 2 D code is determined according to the quantity, the position distribution and the rgb value;
The server obtains the current anti-counterfeiting information from first electronic equipment, and judge current authentication whether be First time certification;
When to be, the current anti-counterfeiting information is compared the server with the target anti-counterfeiting information;
When the current anti-counterfeiting information is identical as the target anti-counterfeiting information, determination is verified.
Optionally, above-mentioned first electronic equipment be previously stored with associated first security code of the quantity, with institute's rheme Set distribution and associated second security code of the rgb value;First electronic equipment is additionally operable to:
According to quantity determination and associated first security code of the quantity, and according to the position distribution and institute Rgb value is stated to determine and the position distribution and associated second security code of the rgb value;
First security code, second security code are combined according to default combined strategy, and will be after combination First security code and second security code are as the current anti-counterfeiting information.
Optionally, if current authentication is not first time certification, the method includes:
The server sends the authentication result of characterization non-first time certification to first electronic equipment.
Optionally, the first electronic equipment described above obtains the colour for carrying unique objects anti-counterfeiting information being generated in advance Before the step of Quick Response Code, the method further includes:
The server is encrypted according to default anti-counterfeiting information generates M the first random numbers of position and the second random number of the positions N, and by institute Default anti-counterfeiting information is stated as the target anti-counterfeiting information;
The server determines the quantity and colored spots of the colored spots of pre-generatmg Quick Response Code according to the first random number of the positions M Position distribution, wherein M is positive integer more than 1;
The server is chosen and the quantity of the colored spots according to default selection strategy from the second random number of the positions N Second random number of corresponding group number, wherein every group of second random number includes P second random numbers, and P is just more than 1 Integer, N are the positive integer more than P;
The server determines the rgb value of each colored spots according to P second random numbers;
The RGB of quantity of the server based on the colored spots, the position distribution of the colored spots and the colored spots Value generates color 2 D code.
Optionally, above-mentioned server is previously stored with color 2 D code mask, and the color 2 D code mask includes in pre- If Q precolor point of distribution of shapes, wherein the preset shape includes one kind in square array distribution, annular array, Q For positive integer;
The quantity of the colored spots that pre-generatmg Quick Response Code is determined according to the first random number of the positions M and the position of colored spots The step of distribution, including:
The quantity of the colored spots is determined according to the numerical value of the first random number of the positions M, and the quantity of the colored spots is small In equal to Q;
The precolor point with the quantity same number of the colored spots is chosen from the Q precolor point, and will be chosen Precolor point position distribution of the position distribution as the colored spots.
Optionally, above-mentioned server is previously stored with the numerical value and the one-to-one incidence relation of rgb value of random number, described The step of rgb value of each colored spots being determined according to P second random numbers, including:
Based on the incidence relation, RGB corresponding with the numerical value is determined according to the numerical value of P second random numbers Value, and using the rgb value as the rgb value of the colored spots.
Optionally, above-mentioned first random number is random binary number and/or second random number is random binary Number.
Present pre-ferred embodiments also provide a kind of Quick Response Code verification system, and the Quick Response Code verification system includes server And the first electronic equipment being connect with the server communication;
First electronic equipment is for obtaining the color 2 D code for carrying unique objects anti-counterfeiting information being generated in advance; Quantity, position distribution and the rgb value of color point in the color 2 D code are extracted, and according to the quantity, the position distribution And the rgb value determines the current anti-counterfeiting information of the color 2 D code;
The server is used to obtain the current anti-counterfeiting information from first electronic equipment, and judges that current authentication is No is first time certification;When to be, the server compares the current anti-counterfeiting information and the target anti-counterfeiting information It is right;When the current anti-counterfeiting information is identical as the target anti-counterfeiting information, determination is verified.
Optionally, above-mentioned first electronic equipment be previously stored with associated first security code of the quantity, with institute's rheme Set distribution and associated second security code of the rgb value;First electronic equipment is additionally operable to:
According to quantity determination and associated first security code of the quantity, and according to the position distribution and institute Rgb value is stated to determine and the position distribution and associated second security code of the rgb value;
First security code, second security code are combined according to default combined strategy, and will be after combination First security code and second security code are as the current anti-counterfeiting information.
Optionally, the first electronic equipment described above obtains the colour for carrying unique objects anti-counterfeiting information being generated in advance Before the step of Quick Response Code, the server is used for:
It is encrypted according to default anti-counterfeiting information and generates M the first random numbers of position and the second random number of the positions N, and will be described default anti-fake Information is as the target anti-counterfeiting information;
The quantity of the colored spots of pre-generatmg Quick Response Code and the position point of colored spots are determined according to the first random number of the positions M Cloth, wherein M is the positive integer more than 1;
Corresponding with the quantity of the colored spots group of number is chosen from the second random number of the positions N according to default selection strategy Second random number, wherein every group of second random number includes P second random numbers, and P is the positive integer more than 1, and N is big In the positive integer of P;
The rgb value of each colored spots is determined according to P second random numbers;
The position distribution of quantity, the colored spots based on the colored spots and the rgb value of the colored spots generate colored Quick Response Code.
In terms of existing technologies, 2 D code verification method provided by the invention and system at least have below beneficial to effect Fruit:Method provided by the invention includes:First electronic equipment obtains the coloured silk for carrying unique objects anti-counterfeiting information being generated in advance Color Quick Response Code;First electronic equipment extract color 2 D code in color point quantity, position distribution and rgb value, and according to quantity, Position distribution and rgb value determine the current anti-counterfeiting information of color 2 D code;Server obtains current anti-fake from the first electronic equipment Information, and judge whether current authentication is first time certification;When to be, server is by current anti-counterfeiting information and the anti-fake letter of target Breath is compared;If current anti-counterfeiting information is identical as target anti-counterfeiting information, just determination is verified.This programme passes through to carrying Certification is identified for the color 2 D code of target anti-counterfeiting information, it can be achieved that anti-fake certificate is had in addition, using the color 2 D code Help improve the safety of anti-counterfeiting information.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, present pre-ferred embodiments cited below particularly, And coordinate appended attached drawing, it is described in detail below.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described.It should be appreciated that the following drawings illustrates only certain embodiments of the present invention, therefore it is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the block diagram for the electronic equipment that present pre-ferred embodiments provide.
Fig. 2 is one of the flow diagram of 2 D code verification method that present pre-ferred embodiments provide.
Fig. 3 is the schematic diagram for the color 2 D code mask that present pre-ferred embodiments provide.
Fig. 4 is the schematic diagram for the color 2 D code that present pre-ferred embodiments provide.
Fig. 5 is the two of the flow diagram for the 2 D code verification method that present pre-ferred embodiments provide.
Icon:10- Quick Response Codes verify system;The first electronic equipments of 100-;200- servers;The second electronic equipments of 300-.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes.Obviously, described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.It is logical The component for the embodiment of the present invention being often described and illustrated herein in the accompanying drawings can be arranged and be designed with a variety of different configurations.
Therefore, below the detailed description of the embodiment of the present invention to providing in the accompanying drawings be not intended to limit it is claimed The scope of the present invention, but be merely representative of the present invention selected embodiment.Based on the embodiment of the present invention, people in the art The every other embodiment that member is obtained without making creative work, shall fall within the protection scope of the present invention.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.In addition, term " the One ", " second " etc. is only used for distinguishing description, is not understood to indicate or imply relative importance.
Below in conjunction with the accompanying drawings, it elaborates to some embodiments of the present invention.In the absence of conflict, following Feature in embodiment and embodiment can be combined with each other.
Fig. 1 is please referred to, one of the block diagram of electronic equipment provided for present pre-ferred embodiments.The present invention is implemented The Quick Response Code verification system 10 that example provides can be used for executing 2 D code verification method, by carrying target anti-counterfeiting information Color 2 D code is authenticated, and helps to realize antiforge function, and uses the color 2 D code, and the safety of anti-counterfeiting information can be improved Property.
In the present embodiment, Quick Response Code verification system 10 may include server 200 and at least one first electronic equipment 100, wherein at least one first electronic equipment 100 and server 200 are established by network and communicated to connect, with into line number According to interaction.First electronic equipment 100 is for being read out color 2 D code, to parse the anti-fake letter of color 2 D code carrying Breath, and it is uploaded to server 200.Server 200 to anti-counterfeiting information for being identified certification.
In the present embodiment, server 200 can be also used for generating the color 2 D code for carrying anti-counterfeiting information.
Further, Quick Response Code verification system 10 can also include the second electronic equipment communicated to connect with server 200 300.Second electronic equipment 300 is for generating the color 2 D code for carrying anti-counterfeiting information.It is, the second electronic equipment 300 It is substituted for server 200 and executes the operating procedure for generating Quick Response Code, it then will be with the associated anti-fake letter of color 2 D code Breath is sent to the storage of server 200, using as target anti-counterfeiting information.
Optionally, the first electronic equipment 100 may be, but not limited to, smart mobile phone, PC (personal Computer, PC), tablet computer, personal digital assistant (personal digital assistant, PDA), mobile Internet access set Standby (mobile Internet device, MID) etc..Second electronic equipment 300 can be with the first electronic equipment 100 it is identical or Similar equipment.The server 200 may be, but not limited to, cluster server, distributed server, Cloud Server.It is described Network may be, but not limited to, finite element network, wireless network.
It is worth noting that the first electronic equipment 100 and the second electronic equipment 300 can be same equipment, or Different equipment.For example, the first electronic equipment 100 and the second electronic equipment 300 can be same smart mobile phone.
In the present embodiment, the server 200 may include that processing unit, storage unit and two dimension generate card dress It sets, the processing unit, storage unit and two dimension are directly or indirectly electrically connected between generating each element of card device, with Realize the transmission or interaction of data.For example, these elements between each other can be real by one or more communication bus or signal wire Now it is electrically connected.
The processing unit can be processor.For example, the processor can be central processing unit (Central Processing Unit, CPU), graphics processor (Graphics Processing Unit, GPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (DSP), application-specific integrated circuit (ASIC), scene Programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware group Part.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.
The storage unit may be, but not limited to, random access memory, read-only memory, may be programmed read-only storage Device, Erasable Programmable Read Only Memory EPROM, electrically erasable programmable read-only memory etc..In the present embodiment, the storage is single Member can be used for storage color two dimension code mask and random number.Certainly, the storage unit can be also used for storage program, described Processing unit executes the program after receiving and executing instruction.
Further, it is described two dimension generate card device include it is at least one can be in the form of software or firmware (firmware) It is stored in the storage unit or is solidificated in and is in 200 operating system of the server (operating system, OS) soft Part function module.The processing unit is for executing executable module stored in the storage unit, such as two dimension generation card Software function module and computer program included by device etc..
Further, the first electronic equipment 100 and the second electronic equipment 300 can have similar with server 200 Operating system and hardware configuration are stored with the executable module for executing 2 D code verification method in corresponding operating system.
Fig. 2 is please referred to, for the flow diagram for the 2 D code verification method that present pre-ferred embodiments provide.The present invention carries The 2 D code verification method of confession can apply to above-mentioned Quick Response Code verification system 10, and two are executed by Quick Response Code verification system 10 Code verification method is tieed up, by the way that certification is identified to the color 2 D code for carrying target anti-counterfeiting information, anti-fake is recognized to realize Card.
Each step of 2 D code verification method shown in Fig. 2 will be described in detail below, the present embodiment provides 2 D code verification method may comprise steps of:
Step S400, the first electronic equipment 100 obtain the colour two for carrying unique objects anti-counterfeiting information being generated in advance Tie up code;
In the present embodiment, color 2 D code can be by server 200 according to color 2 D code mask, based on default anti-fake letter Breath generates.Its color 2 D code mask can refer to Fig. 3, and color 2 D code can refer to Fig. 4.It is color during carrying out anti-fake certificate Color Quick Response Code may be provided in target to be certified, which includes but not limited to Retail commodity, product component, outer It sells, express delivery object etc..
Step S410, first electronic equipment 100 extract quantity, the position distribution of color point in the color 2 D code And rgb value, and determine according to the quantity, the position distribution and the rgb value the current anti-fake letter of the color 2 D code Breath;
In the present embodiment, the first electronic equipment 100 can be previously stored with associated first security code of the quantity, With the position distribution and associated second security code of the rgb value.Step S410 can be:According to quantity determination and institute State associated first security code of quantity, and according to the position distribution and the rgb value determine with the position distribution and Associated second security code of rgb value;By first security code, second security code according to default combined strategy Be combined, and using after combination first security code and second security code as the current anti-counterfeiting information.This is pre- If combined strategy can be, the first security code and the second security code are spliced, wherein the first security code can be located at second Before security code, it can also be located at after the second security code.
Step S420, server 200 obtain the current anti-counterfeiting information from first electronic equipment 100, and judge to work as Whether preceding certification is first time certification;
Step S430, when to be, the server 200 by the current anti-counterfeiting information and the target anti-counterfeiting information into Row compares;
Step S440, when the current anti-counterfeiting information is identical as the target anti-counterfeiting information, determination is verified.
Understandably, if the color 2 D code is to be authenticated for the first time, and current anti-counterfeiting information and the anti-fake letter of the target Manner of breathing is same, and server 200 just determines that certification passes through.In addition, the result being verified can also be sent to first by server 200 Electronic equipment 100, so that user knows that the corresponding target to be certified of the color 2 D code is certified products, not fake product.
Optionally, if current authentication is not first time certification, the method may include:The server 200 is to described First electronic equipment 100 sends the authentication result of characterization non-first time certification.User is based on the authentication result, can infer and wait recognizing Card target is in the presence of the suspicion for being fakement.
Fig. 5 is please referred to, is the two of the flow diagram for the 2 D code verification method that present pre-ferred embodiments provide.It is optional Ground, before step S400, this method can also include step S450 to step S490, and step S450 to step S490 can be by Server 200 or the second electronic equipment 300 execute, for generating the color 2 D code with anti-counterfeiting information.
Step S450, server 200 is encrypted according to default anti-counterfeiting information generates M the first random numbers of position and the positions N second at random Number, and using the default anti-counterfeiting information as the target anti-counterfeiting information;
In the present embodiment, default anti-counterfeiting information can be the hyperlink with security code.The security code can be number String or character string or combinations thereof.Default anti-counterfeiting information M the first random numbers of position can be generated by Encryption Algorithm and the positions N second are random Number, Encryption Algorithm can be selected according to actual conditions, be not specifically addressed here.
Optionally, the first random number and the second random number can be the random number of same type, or different type Random number.For example, first random number can be random binary number, second random number can be random binary Several or random decimal number.Certainly, the first random number may be random decimal number.Here to the first random number, second The type of random number is not especially limited.Wherein M, N are positive integer, and numerical value may be the same or different.For example, right 4 random binary numbers can be used as in binary number " 1001 ".
Step S460, the server 200 determine the colored spots of pre-generatmg Quick Response Code according to the first random number of the positions M The position distribution of quantity and colored spots, wherein M is the positive integer more than 1;
Intelligible, pre-generatmg Quick Response Code is the color 2 D code for needing to generate according to anti-counterfeiting information is preset.In this reality It applies in example, the electronic equipment can be previously stored with color 2 D code mask, and the color 2 D code mask includes in default Q precolor point of distribution of shapes, wherein the preset shape includes one kind in square array distribution, annular array, and Q is Positive integer.
Fig. 3 is please referred to, for the schematic diagram for the color 2 D code mask that present pre-ferred embodiments provide.Box line in Fig. 3 The interior pattern is the schematic diagram of color 2 D code mask.Multiple small circles in box are what circular array was distributed The great circle of precolor point, box centre can play advertisement, publicity for the textures of user setting label, textures The effects that.
Optionally, step S460 can be:The number of the colored spots is determined according to the numerical value of the first random number of the positions M Amount, and the quantity of the colored spots is less than or equal to Q;It is chosen from the Q precolor point identical as the quantity of the colored spots The precolor point of number, and using the position distribution of the precolor of selection point as the position distribution of the colored spots.
Using random algorithm, randomly selected from the Q precolor point and the quantity same number of the colored spots Precolor point.Wherein, which can be selected according to actual conditions, be not specifically addressed here.
Step S470, the server 200 chosen from the second random number of the positions N according to default selection strategy with it is described The quantity of colored spots corresponds to the second random number of group number, wherein every group of second random number includes P second random numbers, and P For the positive integer more than 1, N is the positive integer more than P;
The default selection strategy includes:Chosen successively from the second random number of the positions N according to preset direction P it is adjacent The second random number.Wherein, if preset direction is it is to be understood that the second random number of the positions N is transversely arranged, preset direction can be with For direction from left to right or direction from right to left.
Step S480, the server 200 determine the rgb value of each colored spots according to P second random numbers;
In the present embodiment, the electronic equipment can be previously stored with the numerical value of random number and be closed correspondingly with rgb value Connection relationship.Understandably, a kind of color corresponds to a numerical value, in order to obtain color by numerical value, and different numerical value Obtain different colors.
Optionally, step S480 can be:Based on the incidence relation, the numerical value according to P second random numbers is true Fixed rgb value corresponding with the numerical value, and using the rgb value as the rgb value of the colored spots.
Step S490, quantity of the server 200 based on the colored spots, the position distribution of the colored spots and described The rgb value of colored spots generates color 2 D code.
In order to keep the solution of the present invention more specific, specifically said program will be illustrated below.
For example, the first random number and the second random number can be random binary number.Step S450 can be:Based on pre- It sets up defences fake information, passes through random number generator and generate 256 bits.First 64 can be chosen from 256 bits Binary number is as the first random number, and 192 bits are as the second random number by after.
Step S460 can be:Quantity and the position point of the colored spots of pre-generatmg Quick Response Code are determined according to 64 bits Cloth.For example, determining the quantity of the colored spots of pre-generatmg Quick Response Code according to the numerical value of 64 bits.Then from advance building Precolor point identical with the colored spots quantity determined is chosen in color 2 D code mask, by the position minute of the precolor point of selection Cloth is distributed as the colored spots of pre-generatmg Quick Response Code.Wherein it is determined that colored spots quantity be less than or equal to color 2 D code mould The quantity of precolor point in plate.
Step S470 can be:From 192 bits choose with determination identical group of number of colored spots quantity two into Number processed, every group of binary number be can be 3 bits.192 bits are not enough to be formed identical as colored spots quantity The binary number of group number can then lead in 192 bits and carry out repeating selection.
Server 200 is previously stored with binary numeral and the one-to-one incidence relation of rgb value.Step S480 can be with For:The numerical value for 3 bits chosen corresponds to rgb value (understandably, the rgb value as characterization colored spots of a colored spots Color value), the different color value of different numerical representation methods.It can determine and be somebody's turn to do according to the numerical value of 3 bits of selection The rgb value of the corresponding colored spots of binary number.
Step S490 can be:The position distribution and the colored spots of quantity, the colored spots based on the colored spots Rgb value, painted to its colored spots to generate colored Quick Response Code.
Based on above-mentioned design, is controlled by double random numbers and generate color 2 D code, help so that the Quick Response Code of generation Uniqueness is stronger.In addition, the equipment for reading color 2 D code is decrypted to color 2 D code in reading process, need The information entrained by color 2 D code can be just got after being proved to be successful so that the antiforge function of color 2 D code is carried It rises.This programme helps to improve antifalse effect by the way that certification is identified to the above-mentioned color 2 D code for carrying anti-counterfeiting information.
Fig. 4 is please referred to, for the schematic diagram for the color 2 D code that present pre-ferred embodiments provide.Understandably, shown in Fig. 4 It is the gray-scale map of color 2 D code, that is, the pattern in Fig. 4 in box is to be based on a kind of two dimension obtained by the above method The schematic diagram of code.Grey dot shown in Fig. 4 is colored spots, and the colored spots of different gray scales correspond to the coloured silk actually generated The different colours of color Quick Response Code.In addition, multiple colored spots in Fig. 4 are distributed for circular array, it can in Quick Response Code central area It is actually needed according to user and corresponding icon is set.
It is worth noting that being based on the above method, the different Quick Response Codes with shape described in Fig. 3 can also be generated, for example, can Think the color 2 D code of the colored spots composition for the array arrangement that is square.
Referring once again to Fig. 1, Quick Response Code provided by the invention verification system 10 may include server 200 and with the clothes The first electronic equipment 100 that business device 200 communicates to connect.
First electronic equipment 100 is for obtaining the color 2 D for carrying unique objects anti-counterfeiting information being generated in advance Code;Quantity, position distribution and the rgb value of color point in the color 2 D code are extracted, and according to the quantity, the position point Cloth and the rgb value determine the current anti-counterfeiting information of the color 2 D code.Specifically, the first electronic equipment 100 can be used for Step S400 as shown in Figure 2 and step S410 is executed, the operation content specifically executed can refer to step S400 and step The detailed description of S410.
The server 200 is used to obtain the current anti-counterfeiting information from first electronic equipment 100, and judges current Whether certification is first time certification;When to be, the server 200 is by the current anti-counterfeiting information and the anti-fake letter of the target Breath is compared;When the current anti-counterfeiting information is identical as the target anti-counterfeiting information, determination is verified.Specifically, it takes Business device 200 can be used for executing step S420 as shown in Figure 2 to step S440, and the operation content specifically executed can refer to pair The detailed description of step S420 to step S440.
Optionally, first electronic equipment 100 be previously stored with associated first security code of the quantity, and it is described Position distribution and associated second security code of the rgb value.First electronic equipment 100 is additionally operable to:It is true according to the quantity Fixed and associated first security code of the quantity, and determined and the position according to the position distribution and the rgb value Distribution and associated second security code of the rgb value;By first security code, second security code according to preset group Strategy is closed to be combined, and using after combination first security code and second security code as the current anti-fake letter Breath.
Optionally, first electronic equipment 100 obtains the colour for carrying unique objects anti-counterfeiting information being generated in advance Before the step of Quick Response Code, the server 200 can be used for executing step S450 shown in Fig. 5 and be held to step S490 Capable concrete operations content can refer to the detailed description to step S490 to step S450.
In conclusion a kind of 2 D code verification method of present invention offer and system.This method includes:First electronic equipment obtains Take the color 2 D code for carrying unique objects anti-counterfeiting information being generated in advance;First electronic equipment extraction color 2 D code is prized Quantity, position distribution and the rgb value of color dot, and the current anti-fake of color 2 D code is determined according to quantity, position distribution and rgb value Information;Server obtains current anti-counterfeiting information from the first electronic equipment, and judges whether current authentication is first time certification;For When being, current anti-counterfeiting information is compared server with target anti-counterfeiting information;If current anti-counterfeiting information and target anti-counterfeiting information Identical, just determination is verified.This programme, can by the way that certification is identified to the color 2 D code for carrying target anti-counterfeiting information Realize that anti-fake certificate helps to improve the safety of anti-counterfeiting information in addition, using the color 2 D code.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, any made by repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of 2 D code verification method is applied to Quick Response Code and verifies system, which is characterized in that the Quick Response Code verifies system packet The first electronic equipment for including server and being connect with the server communication, the method includes:
First electronic equipment obtains the color 2 D code for carrying unique objects anti-counterfeiting information being generated in advance;
First electronic equipment extracts quantity, position distribution and the rgb value of color point in the color 2 D code, and according to institute State the current anti-counterfeiting information that quantity, the position distribution and the rgb value determine the color 2 D code;
The server obtains the current anti-counterfeiting information from first electronic equipment, and judges whether current authentication is first Secondary certification;
When to be, the current anti-counterfeiting information is compared the server with the target anti-counterfeiting information;
When the current anti-counterfeiting information is identical as the target anti-counterfeiting information, determination is verified.
2. according to the method described in claim 1, it is characterized in that, first electronic equipment is previously stored with and the quantity Associated first security code, with the position distribution and associated second security code of the rgb value;First electronic equipment is also For:
According to the quantity determine with associated first security code of the quantity, and according to the position distribution and described Rgb value determines and the position distribution and associated second security code of the rgb value;
First security code, second security code are combined according to default combined strategy, and will be described in after combination First security code and second security code are as the current anti-counterfeiting information.
3. according to the method described in claim 1, it is characterized in that, if current authentication is not first time certification, the method packet It includes:
The server sends the authentication result of characterization non-first time certification to first electronic equipment.
4. according to the method described in claim 1, it is characterized in that, first electronic equipment obtain be generated in advance carry Before the step of color 2 D code of unique objects anti-counterfeiting information, the method further includes:
The server is encrypted according to default anti-counterfeiting information and generates M the first random numbers of position and the second random number of the positions N, and will be described pre- Fake information set up defences as the target anti-counterfeiting information;
The server determines the quantity of the colored spots of pre-generatmg Quick Response Code and the position of colored spots according to the first random number of the positions M Set distribution, wherein M is the positive integer more than 1;
The server is chosen according to default selection strategy from the second random number of the positions N corresponding with the quantity of the colored spots Second random number of group number, wherein every group of second random number includes P second random numbers, and P is the positive integer more than 1, N is the positive integer more than P;
The server determines the rgb value of each colored spots according to P second random numbers;
The rgb value of quantity of the server based on the colored spots, the position distribution of the colored spots and the colored spots, it is raw At color 2 D code.
5. according to the method described in claim 4, it is characterized in that, the server is previously stored with color 2 D code mask, The color 2 D code mask includes the Q precolor point in preset shape distribution, wherein the preset shape includes rectangular battle array One kind in column distribution, annular array, Q are positive integer;
The quantity of the colored spots that pre-generatmg Quick Response Code is determined according to the first random number of the positions M and the position distribution of colored spots The step of, including:
Determine the quantity of the colored spots according to the numerical value of the first random number of the positions M, and the quantity of the colored spots is less than etc. In Q;
Choose the precolor point with the quantity same numbers of the colored spots from the Q precolor point, and by the pre- of selection Position distribution of the position distribution of colored spots as the colored spots.
6. according to the method described in claim 4, it is characterized in that, the server be previously stored with the numerical value of random number with The one-to-one incidence relation of rgb value, the rgb value that each colored spots are determined according to P second random numbers Step, including:
Based on the incidence relation, rgb value corresponding with the numerical value is determined according to the numerical value of P second random numbers, and Using the rgb value as the rgb value of the colored spots.
7. according to the method described in any one of claim 4-6, which is characterized in that first random number be random two into Number processed and/or second random number are random binary number.
8. a kind of Quick Response Code verifies system, which is characterized in that the Quick Response Code verification system include server and with the service First electronic equipment of device communication connection;
First electronic equipment is for obtaining the color 2 D code for carrying unique objects anti-counterfeiting information being generated in advance;Extraction Quantity, position distribution and the rgb value of color point in the color 2 D code, and according to the quantity, the position distribution and institute State the current anti-counterfeiting information that rgb value determines the color 2 D code;
The server is used to obtain the current anti-counterfeiting information from first electronic equipment, and judge current authentication whether be First time certification;When to be, the current anti-counterfeiting information is compared the server with the target anti-counterfeiting information;When When the current anti-counterfeiting information is identical as the target anti-counterfeiting information, determination is verified.
9. Quick Response Code according to claim 8 verifies system, which is characterized in that first electronic equipment is previously stored with With associated first security code of the quantity, with the position distribution and associated second security code of the rgb value;Described first Electronic equipment is additionally operable to:
According to the quantity determine with associated first security code of the quantity, and according to the position distribution and described Rgb value determines and the position distribution and associated second security code of the rgb value;
First security code, second security code are combined according to default combined strategy, and will be described in after combination First security code and second security code are as the current anti-counterfeiting information.
10. Quick Response Code according to claim 8 or claim 9 verifies system, which is characterized in that first electronic equipment obtains pre- Before the step of what is first generated carries the color 2 D code of unique objects anti-counterfeiting information, the server is used for:
It is encrypted according to default anti-counterfeiting information and generates M the first random numbers of position and the second random number of the positions N, and by the default anti-counterfeiting information As the target anti-counterfeiting information;
The quantity of the colored spots of pre-generatmg Quick Response Code and the position distribution of colored spots are determined according to the first random number of the positions M, In, M is the positive integer more than 1;
The second of corresponding with the quantity of the colored spots group of number is chosen from the second random number of the positions N according to default selection strategy Random number, wherein every group of second random number includes P second random numbers, and P is the positive integer more than 1, and N is more than P's Positive integer;
The rgb value of each colored spots is determined according to P second random numbers;
The position distribution of quantity, the colored spots based on the colored spots and the rgb value of the colored spots generate color 2 D Code.
CN201810198980.9A 2018-03-12 2018-03-12 Two-dimensional code verification method and system Active CN108416405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810198980.9A CN108416405B (en) 2018-03-12 2018-03-12 Two-dimensional code verification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810198980.9A CN108416405B (en) 2018-03-12 2018-03-12 Two-dimensional code verification method and system

Publications (2)

Publication Number Publication Date
CN108416405A true CN108416405A (en) 2018-08-17
CN108416405B CN108416405B (en) 2021-07-13

Family

ID=63131006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810198980.9A Active CN108416405B (en) 2018-03-12 2018-03-12 Two-dimensional code verification method and system

Country Status (1)

Country Link
CN (1) CN108416405B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060282500A1 (en) * 2005-06-13 2006-12-14 Yutaka Kiuchi Information management method using a managing symbol and information management server
US8430329B2 (en) * 2008-03-14 2013-04-30 Yutaka Kiuchi Two-dimensional code publishing program and two-dimensional code decoding program
CN103310255A (en) * 2013-05-31 2013-09-18 曾芝渝 Color character encoding method and decoding method
CN103489026A (en) * 2013-09-24 2014-01-01 深圳市中选科技有限公司 Colorful two-dimension code, generating method and generating system thereof and printed article
CN104616049A (en) * 2015-03-10 2015-05-13 上海中商网络股份有限公司 Colored anti-counterfeiting label and method for realizing product anti-counterfeiting
CN104657698A (en) * 2015-02-10 2015-05-27 浙江科技学院 Method for encoding and decoding colored two-dimensional code capable of bearing multiple black and white two-dimensional codes
CN105117758A (en) * 2015-08-31 2015-12-02 武汉大学 Colored two-dimensional code based mobile platform security communication method
CN105976004A (en) * 2016-04-25 2016-09-28 华南农业大学 Color two-dimensional code multi-dimensional information encoding and decoding methods and devices
CN107392270A (en) * 2017-07-23 2017-11-24 宁波亿诺维信息技术有限公司 A kind of two-dimensional code generation method
CN107443922A (en) * 2017-07-23 2017-12-08 宁波亿诺维信息技术有限公司 A kind of Quick Response Code generates system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060282500A1 (en) * 2005-06-13 2006-12-14 Yutaka Kiuchi Information management method using a managing symbol and information management server
US8430329B2 (en) * 2008-03-14 2013-04-30 Yutaka Kiuchi Two-dimensional code publishing program and two-dimensional code decoding program
CN103310255A (en) * 2013-05-31 2013-09-18 曾芝渝 Color character encoding method and decoding method
CN103489026A (en) * 2013-09-24 2014-01-01 深圳市中选科技有限公司 Colorful two-dimension code, generating method and generating system thereof and printed article
CN104657698A (en) * 2015-02-10 2015-05-27 浙江科技学院 Method for encoding and decoding colored two-dimensional code capable of bearing multiple black and white two-dimensional codes
CN104616049A (en) * 2015-03-10 2015-05-13 上海中商网络股份有限公司 Colored anti-counterfeiting label and method for realizing product anti-counterfeiting
CN105117758A (en) * 2015-08-31 2015-12-02 武汉大学 Colored two-dimensional code based mobile platform security communication method
CN105976004A (en) * 2016-04-25 2016-09-28 华南农业大学 Color two-dimensional code multi-dimensional information encoding and decoding methods and devices
CN107392270A (en) * 2017-07-23 2017-11-24 宁波亿诺维信息技术有限公司 A kind of two-dimensional code generation method
CN107443922A (en) * 2017-07-23 2017-12-08 宁波亿诺维信息技术有限公司 A kind of Quick Response Code generates system

Also Published As

Publication number Publication date
CN108416405B (en) 2021-07-13

Similar Documents

Publication Publication Date Title
CN101601222B (en) Online data encryption and decryption
CN104200150B (en) Method and device for processing verification codes
WO2020108118A1 (en) Methods and devices for providing and authenticating two-dimensional code
CN103077467B (en) A kind of method and system verifying authenticity of products
CN108009825A (en) A kind of identity management system and method based on block chain technology
US11354396B2 (en) Authentication systems using sequences of tile selections from a grid
CN105354481A (en) Network verification method and network verification server
CN106100850A (en) Intelligent and safe chip signing messages transmission method based on Quick Response Code and system
CN108447154A (en) Safe unlocking method and device, encryption and decryption method and device, lock and server
CN106204182A (en) Digital transaction method and device
CN104424579A (en) Security traceability management system
CN108848057A (en) A kind of method and device of remote secure access
CN107918873A (en) Item authentication plateform system and item authentication management system
CN113988242A (en) Multi-region-based anti-counterfeiting code generation and verification method, system, equipment and medium
EP4115583A1 (en) Identifying trusted service set identifiers for wireless networks t
CN104616049B (en) Colored anti-fake label and the method for realizing product false proof
CN111143812B (en) Login authentication method based on graphics
CN110365626A (en) The user in anticollision library logs in safety certifying method, terminal device and storage medium
CN103765449B (en) Generate increment information object
CN108898405A (en) A kind of novel changable logo dimension code anti-counterfeit method and system
CN108416405A (en) 2 D code verification method and system
CN108959898B (en) Graph unlocking password authentication method based on graph addition algorithm
CN115511030A (en) Anti-counterfeiting verification method and device and electronic equipment
CN104156859B (en) A kind of internet trading system and method based on dynamic password
CN104240098A (en) Method and system for certificating authenticity of identity certifications of commodities on basis of encrypted two-dimensional codes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 311501, Unit 1, Building 5, Courtyard 1, Futong East Street, Chaoyang District, Beijing

Applicant after: Beijing Zhichuangyu Information Technology Co., Ltd.

Address before: Room 311501, Unit 1, Building 5, Courtyard 1, Futong East Street, Chaoyang District, Beijing

Applicant before: Beijing Knows Chuangyu Information Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant