CN108629391A - Color code decoding method, system and equipment - Google Patents
Color code decoding method, system and equipment Download PDFInfo
- Publication number
- CN108629391A CN108629391A CN201810441767.6A CN201810441767A CN108629391A CN 108629391 A CN108629391 A CN 108629391A CN 201810441767 A CN201810441767 A CN 201810441767A CN 108629391 A CN108629391 A CN 108629391A
- Authority
- CN
- China
- Prior art keywords
- characteristic value
- information
- data
- color
- preset
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record 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/06009—Record 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/06037—Record 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record 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/06009—Record 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/06046—Constructional details
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Electromagnetism (AREA)
- General Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of color code decoding method, system and equipment, wherein color code encoding method includes the following steps:Read raw information, be stored in preset at least one tables of data, obtain the tables of data for mark the raw information characteristic value;After the characteristic value is mapped by hash function, N system conversions are carried out, coded data is obtained;The N is the natural number more than or equal to 3;According to the correspondence of preset N kinds color and N system numbers, the corresponding color of each digit of coded data is loaded on into the corresponding described information block in described information region by preset order, generates color code image.Processing through the invention improves the safety of color code, improves its information capacity, brings the good usage experience of user, has also expanded its application range.
Description
Technical field
The present invention relates to colored identification code technical fields, specifically, the present invention relates to a kind of color code decoding method with
And corresponding system and equipment.
Background technology
With internet, e-commerce, mobile e-business, the development of 3G network, Internet of Things, identification code technology obtains
It is widely used.From the initial bar code for only include commodity simple information, develop to include compared with the Quick Response Code of multi information (including
Upgrade improved two-dimensional color bar code, Microsoft's exploitation in 2008);Bar code identification simultaneously is also transformed into from special barcode scanner
Mobile phone with camera, using being also increasingly simpler.
And the development in epoch, scientific and technological progress, similarly so that Quick Response Code is faced with lot of challenges.2 D code information amount compared with
It is small, it far can not also access the demand of client.Black and white segment is very poor to the sense organ of client, meanwhile, the safety of Quick Response Code
Also challenge is just being received, is just becoming the stumbling-block on the universal road of Quick Response Code with Malware and virus.
Since Quick Response Code still has problems in information capacity and safety etc. so that it is in mobile electron quotient
The further application and development of the scenes such as business, Internet of Things are restricted.
Invention content
It is an object of the invention to insufficient for at least one aspect present on, provide a kind of color code decoding method with
And corresponding system and equipment, solve the problems, such as that information of identification code capacity is small low with safety.
To achieve the goals above, the present invention takes the technical solution of following several aspects:
In a first aspect, providing a kind of color code encoding method in the embodiment of the present invention, the coloured silk code includes information area, institute
State the information block that information area includes multiple ordered arrangements;The coloured silk code encoding method includes the following steps:
Raw information is read, is stored in preset at least one tables of data, obtains the tables of data for identifying
The raw information characteristic value;
After the characteristic value is mapped by hash function, N system conversions are carried out, coded data is obtained;The N be more than
Natural number equal to 3;
According to the correspondence of preset N kinds color and N system numbers, each digit of coded data is corresponded to by preset order
Color load on the corresponding described information block in described information region, generate color code image.
Second aspect provides a kind of color code coding/decoding method in the embodiment of the present invention, and the coloured silk code includes information area, institute
State the information block that information area includes multiple ordered arrangements;The coloured silk code coding/decoding method includes the following steps:
Color code image is obtained, is believed by the corresponding color of each described information block in preset order reading described information region
Breath obtains coded data according to the correspondence of preset N kinds color and N system numbers;The N is the natural number more than or equal to 3;
After the coded data is converted with the corresponding system of hash function, the corresponding hash of the hash function is inquired
Table obtains characteristic value of the preset data table for identifying raw information;
At least one tables of data is inquired according to the characteristic value, reads the corresponding raw information of the characteristic value.
The third aspect provides a kind of color code coded system in the embodiment of the present invention, and the coloured silk code includes information area, institute
State the information block that information area includes multiple ordered arrangements;It is described coloured silk code coded system include:
Reading unit is stored in preset at least one tables of data for reading raw information, obtains the number
Characteristic value according to table for the raw information of mark;
Coding unit carries out N system conversions, obtains coded number after mapping the characteristic value by hash function
According to;The N is the natural number more than or equal to 3;
Generation unit, for according to the correspondence of preset N kinds color and N system numbers, by preset order by coded number
The corresponding described information block in described information region is loaded on according to the corresponding color of each digit, generates color code image.
Fourth aspect provides a kind of color code decoding system in the embodiment of the present invention, and the coloured silk code includes information area, institute
State the information block that information area includes multiple ordered arrangements;The coloured silk code decodes system and includes:
Acquiring unit reads each described information area in described information region for obtaining color code image by preset order
The corresponding colouring information of block obtains coded data according to the correspondence of preset N kinds color and N system numbers;The N be more than
Natural number equal to 3;
Decoding unit inquires the hash letter after by the coded data with the corresponding system conversion of hash function
The corresponding hash table of number obtains characteristic value of the preset data table for identifying raw information;
Query unit reads the characteristic value and corresponds to for inquiring at least one tables of data according to the characteristic value
Raw information.
In terms of 5th, a kind of color code encoding device is provided in the embodiment of the present invention, including:
Memory, for storing the program for supporting that color code coded system executes above-mentioned color code encoding method;
Communication interface, for above-mentioned color code coded system and other equipment or communication;
One or more processors, for executing the program stored in the memory;
One or more application program, wherein one or more of application programs are stored in the memory and quilt
It is configured to be executed by one or more of processors, one or more of application programs are configurable for executing first party
Method described in face.
In terms of 6th, a kind of color code decoding device is provided in the embodiment of the present invention, including:
Memory, for storing the program for supporting that color code decoding system executes above-mentioned color code coding/decoding method;
Communication interface, for above-mentioned color code decoding system and other equipment or communication;
One or more processors, for executing the program stored in the memory;
One or more application program, wherein one or more of application programs are stored in the memory and quilt
It is configured to be executed by one or more of processors, one or more of application programs are configurable for executing second party
Method described in face.
Compared with prior art, technical solution provided by the invention at least has the following advantages that:
In this application, by the way that the raw information of reading to be stored in tables of data, the tables of data is obtained for identifying
The raw information characteristic value so that color code can as a kind of identification code of online service its own can without appoint
What particular content, but containing the characteristic value information of similar database " pointer ", corresponding information is in the service on backstage
It is stored on device, the content and foreground coloured silk code " pointer " are corresponding, it is made to possess very high data volume.In turn, by the characteristic value
After being mapped by hash function, N system conversions are carried out, coded data is obtained;The N is the natural number more than or equal to 3.Thus will
Coding pattern features are coded data corresponding with the color of color code or information block arrangement, make characteristic value that can be levied by color code table,
Improve recognition efficiency and the safety of color code.In addition, according to the correspondence of preset N kinds color and N system numbers, by default
The corresponding color of each digit of coded data is loaded on the corresponding described information block in described information region by sequence, is generated color
Code image.Coded data can be presented in the form of color code, bring the good usage experience of user, also expanded it and applied model
It encloses.
However, I have much more to say than I can write in this letter, the additional aspect of the present invention and advantage will be set forth in part in the description, these will be from
Become more straightforward in following description, or practice through the invention is recognized.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is that embodiment is prized the structural schematic diagram of code in the present invention;
Fig. 2 is the flow diagram of one embodiment of code encoding method of the invention of prizing;
Fig. 3 is the flow diagram of one embodiment of yard coding/decoding method of the invention of prizing;
Fig. 4 is the structural schematic diagram of one embodiment of yard coded system of the invention of prizing;
Fig. 5 is the structural schematic diagram of one embodiment that code of the invention of prizing decodes system;
Fig. 6 is the structure principle chart of one embodiment of yard encoding device of the invention of prizing;
Fig. 7 is the structure principle chart of one embodiment of yard decoding device of the invention of prizing;
Specific implementation mode
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.
In some flows of description in description and claims of this specification and above-mentioned attached drawing, contain according to
Multiple operations that particular order occurs, but it should be clearly understood that these operations can not be what appears in this article suitable according to its
Sequence is executed or is executed parallel, and serial number such as S10, S11 of operation etc. be only used for distinguishing each different operation, serial number
It itself does not represent and any executes sequence.In addition, these flows may include more or fewer operations, and these operations can
To execute or execute parallel in order.
It will appreciated by the skilled person that unless otherwise defined, all terms used herein (including technology art
Language and scientific terminology), there is meaning identical with the general understanding of the those of ordinary skill in fields of the present invention.Should also
Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art
The consistent meaning of meaning, and unless by specific definitions as here, the meaning of idealization or too formal otherwise will not be used
To explain.
It will appreciated by the skilled person that " color code encoding device " used herein above, " color code decoding device "
Both the equipment for having included wireless signal receiver, only has the equipment of the wireless signal receiver of non-emissive ability, and includes connecing
The equipment for receiving and emitting hardware has the reception that on bidirectional communication link, can carry out two-way communication and emits hardware
Equipment.This equipment may include:Honeycomb or other communication equipments with single line display or multi-line display or do not have
There are the honeycomb or other communication equipments of multi-line display;(Personal Communications Service, individual are logical by PCS
Letter system), it can be with combine voice, data processing, fax and/or communication ability;PDA(Personal Digital
Assistant, personal digital assistant), may include radio frequency receiver, the Internet/intranet access, web browser, note
Thing sheet and/or GPS (Global Positioning System, global positioning system) receiver;Conventional laptop and/or the palm
Laptop computer or other equipment, have and/or the conventional laptop including radio frequency receiver and/or palmtop computer or
Other equipment." color code encoding device " used herein above, " color code decoding device " can be portable, can transport, be mounted on
In the vehicles (aviation, sea-freight and/or land), or it is suitable for and/or is configured in local runtime, and/or with distribution
Form operates in any other position operation in the earth and/or space." intelligent terminal " used herein above can also be communication
Terminal, access terminals, music/video playback terminal, such as can be smartwatch, PDA, POS (Point of Sales, pin
Sell terminal), MID (Mobile Internet Device, mobile internet device) and/or have music/video playing function
Mobile phone, can also be the equipment such as smart television, set-top box.
The method of the invention is primarily adapted for use in intelligent mobile phone terminal, tablet computer, smartwatch or terminal
Deng with communication function intelligent terminal, be not limited to the type of its operating system, can be Linux, Window, Mac,
The operating systems such as Android, IOS.
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, and in which the same or similar labels are throughly indicated same or similar element or has same or like function
Element.Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this
Embodiment in invention, the every other implementation that those skilled in the art are obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
The schematic diagram for the color code that Fig. 1 is provided by some embodiments of the invention.Color code includes that the color code includes
Information area 30, described information region 30 include the information block 301 of multiple ordered arrangements.It should be understood that institute of the embodiment of the present invention
N kinds can be filled or be filled primarily with to the color code of offer by single respectively in multiple information blocks 301 in information area 30
The larger color of correlation, for example, it is red, blue, green, yellow, white, black etc. carry out representation manners, typically, N be more than or equal to 3 from
So number.Specifically, the information area 30 of color code image is made of the block matrices figure of a n × n, and n × n block is respectively by upper
The solid color filling in N kind colors is stated, or is filled based on one of N kind colors, these blocks can be information block
301.The ornamental value and plasticity for improving identification code, can promote user experience, and expand the scope of application of identification code and answer
Use scene.It can be separated with white line between multiple information blocks 301 in information area 30, improve the identification of information block 301
Efficiency.The outline border of information area 30 can be closed by black lines, distortion correction when in favor of color code image recognition and to letter
Cease the positioning in region 30.It will be based on the coloured silk code structure below, introduce color code decoding method, system and equipment respectively.
Referring to Fig. 2, a kind of color code encoding method of the present invention, the coloured silk code includes information area 30, described information area
Domain 30 includes the information block 301 of multiple ordered arrangements, and the coloured silk code encoding method includes the following steps S11-S13:
Step S11 reads raw information, is stored in preset at least one tables of data, obtains the tables of data
The characteristic value of the raw information for mark.
It should be understood that raw information here can be character string and/or picture etc., including network address, hyperlink, word, regard
Frequency even stream medium data etc..After color code encoding device reads the raw information of user or other equipment input, by the original letter
Breath is stored in one or more tables of data of local profile or far-end server, to obtain the tables of data for marking
The characteristic value for the raw information known.These tables of data can be associated by one or more databases.Initial data is upper
Stating in tables of data can be identified by least one characteristic value, and the effect of this feature value is similar to pointer so that color code has quite big
Information capacity.For example, characteristic value can the position number of initial data be stored in tables of data, or correspondence is original
The major key of data.
Step S12 after mapping the characteristic value by hash function, carries out N system conversions, obtains coded data;Institute
It is the natural number more than or equal to 3 to state N.
After color code encoding device obtains the characteristic value of initial data, due to the corresponding characteristic value of different size of initial data
There may be differences for length and quantity, therefore characteristic value can carry out operation by hash function (Hash Function), be grown
The hashed value of degree and uniform format, characteristic value is stored in corresponding to hashed value in hash table at this time, also, those skilled in the art
It can be by the way that different at least one of hash function, such as MD4 functions, MD5 functions and SHA-1 functions be arranged, to obtain
Need the hashed value of format.In turn, hashed value is carried out by N system conversions according to default correspondence, obtains coded data.Preferably
Ground, N can correspond to the quantity of color code color simultaneously, for the natural number more than or equal to 3 so that the information capacity bigger of color code.
For example, in a possible embodiment, N=6, the hashed value obtained after the characteristic value is mapped by hash function is 16 systems
1b2f55e8af3c97de, by 6 systems convert after obtain coded data 225143523311020204421344.When
So, for confidentiality and programmed readability, some embodiments can also map to obtain by the characteristic value by hash function
After hashed value, convert each character of the hashed value to ten's digit by default mapping relations respectively, then carry out N into
System conversion, obtains coded data, at this point, the default mapping relations are in addition to that can also be that other will hash for system transformational relation
The value of each and the ten's digit of value preset mapping table correspondingly.
In view of the individual information block 301 in the color code information area 30 of the present invention is in addition to being used to characterize coded data,
It may also include the positioning for framing and the verification for information checking, in some possible embodiments, the coding
The digit of data is less than or equal to the number of described information block 301, for example, block matrices of the information area 30 by one 6 × 6
Figure is constituted, then the digit of corresponding encoded data should be less than or be equal to 36.
It is worth noting that, in order to further increase the safety of color code, it, can also be to hashed value in above-mentioned cataloged procedure
Or coded data is encrypted.For example, before carrying out N systems conversion, the methods of some embodiments further includes will be described
It after characteristic value is mapped by hash function, is encrypted using asymmetric arithmetic, and stores the private key of the asymmetric arithmetic.It is non-right
Claim the type of algorithm compared with horn of plenty, can be effectively increased using asymmetric arithmetic encryption and crack difficulty.
Step S13, it is by preset order that coded data is each according to the correspondence of preset N kinds color and N system numbers
The corresponding color of digit loads on the corresponding described information block in described information region, generates color code image.
It should be noted that N kinds color and the correspondence of N system numbers can be adjusted according to displaying or identification demand
It is whole, for example, N=6,0,1,2,3,4, the 5 of red, blue, green, yellow, white, black 6 system numbers corresponding respectively of 6 kinds of colors, so, it is possible to build
Found the correspondence of the color and coded data of multiple information blocks 301.For example, the information area 30 of color code image is by one
301 matrix diagram of information block of a n × n is constituted, and described information block 301 is by preset order (such as from left to right, from top to bottom)
Arrangement, correspondingly, the corresponding color of each digit of coded data is loaded on the letter by color code encoding device by this preset order
The corresponding described information block in region is ceased, when loading color, multiple information blocks 301 are respectively by the list in above-mentioned 6 kinds of colors
One color filling, or be filled based on one of 6 kinds of colors, to generate color code image.Improve the ornamental value of identification code
And plasticity, user experience can be promoted, and expand the scope of application and application scenarios of identification code.
Referring to Fig. 3, corresponding to above-mentioned color code encoding method, the present invention provides a kind of color code coding/decoding method, the coloured silks
Code includes information area, and described information region includes the information block of multiple ordered arrangements;The coloured silk code coding/decoding method includes such as
Lower step S21-S23:
Step S21 obtains color code image, and reading each described information block in described information region by preset order corresponds to
Colouring information, coded data is obtained according to the correspondence of preset N kinds color and N system numbers;The N is more than or equal to 3
Natural number.
When reading the colouring information of color code image, the solid color or primary color filled according to multiple information blocks 301
Determine the colouring information of each information block 301.It should be noted that the correspondence of N kinds color and N system numbers can basis
Displaying or identification demand are adjusted, for example, N=6,6 kinds of colors are red, it is blue, green, yellow, white, black correspond to respectively 6 system numbers 0,
1,2,3,4,5, it so, it is possible the correspondence for determining the color and coded data of multiple information blocks 301.For example, color
The information area 30 of code image is made of 301 matrix diagram of information block of a n × n, and described information block 301 presses preset order
(such as from left to right, from top to bottom) arrangement.Therefore, color code decoding device reads each institute in described information region by preset order
After stating the corresponding colouring information of information block, coded data can be obtained according to the correspondence.So as to improve identification
The ornamental value and plasticity of code, can promote user experience, and expand the scope of application and application scenarios of identification code.
Step S22 after being converted the coded data with the corresponding system of hash function, is inquired the hash function and corresponded to
Hash table, obtain preset data table for identifying the characteristic value of raw information.
Since coded data is into N systems are made as, in order to obtain the characteristic value for identifying raw information, it is contemplated that feature
Value is by after hash function operation, having obtained the hashed value of length and uniform format, and characteristic value is stored corresponding to hashed value at this time
In hash table, also, those skilled in the art can by being arranged different hash function, such as MD4 functions, MD5 functions and
At least one of SHA-1 functions, the corresponding hashed value for obtaining required format.Therefore, it needs first by the coded data to hash
The corresponding system conversion of function is to obtain hashed value, for example, coded data is 225143523311020204421344, hashed value
For 16 systems, then transformed hashed value is 1b2f55e8af3c97de.In turn, using the hashed value by inquiring hash function
Corresponding hash table can accordingly obtain characteristic value of the preset data table for identifying raw information.In addition, it is contemplated that confidentiality and
Programmed readability, some embodiments inquire the hash after by the coded data with the corresponding system conversion of hash function
The corresponding hash table of function obtains characteristic value of the preset data table for identifying raw information, including:The coded data is turned
It is changed to the decimal system, by each character and the preset mapping relations of ten's digit of hashed value, obtains hashed value;The hash
Value is for identifying the characteristic value in hash table, at this point, the default mapping relations are in addition to that can also be other for system transformational relation
By the value of each of hashed value and ten's digit preset mapping table correspondingly.Then, it is looked into based on the hashed value
The corresponding hash table of the hash function is ask, characteristic value of the preset data table for identifying raw information is obtained.
In view of the individual information block 301 in the color code information area 30 of the present invention is in addition to being used to characterize coded data,
It may also include the positioning for framing and the verification for information checking, in some possible embodiments, the coding
The digit of data is less than or equal to the number of described information block 301, for example, block matrices of the information area 30 by one 6 × 6
Figure is constituted, then the digit of corresponding encoded data should be less than or be equal to 36.
It is worth noting that, some possible embodiments are to further increase the safety of color code, in cataloged procedure pair
Hashed value or coded data are encrypted.Therefore, correspondingly, color code decoding device inquires the corresponding hash table of the hash function
Before, further include being carried out using the private key of asymmetric arithmetic after by the coded data with the corresponding system conversion of hash function
Decryption.The type of asymmetric arithmetic can be effectively increased the difficulty that malice cracks compared with horn of plenty, using asymmetric arithmetic encryption, carry
High security.
Step S23 inquires at least one tables of data according to the characteristic value, it is corresponding original to read the characteristic value
Information.
It should be understood that these tables of data can be associated by one or more databases.Here raw information can be word
Symbol string and/or picture etc., including network address, hyperlink, word, video even stream medium data etc..Initial data is in above-mentioned data
It is identified by least one characteristic value in table, the effect of this feature value is similar to pointer so that color code holds with sizable information
Amount, for example, characteristic value can the position number of initial data be stored in tables of data, or correspond to the master of initial data
Key.Color code decoding device inquires one or more data of local profile or far-end server according to obtained characteristic value
Table completes decoding to obtain the raw information that characteristic value is identified.The good usage experience of user is brought, is also expanded
The application range of identification code.
According to modularized design thinking, the present invention is on the basis of above-mentioned color code encoding method, it is further proposed that a kind of coloured silk
Code coded system.
Referring to Fig. 4, the coloured silk code includes information area 30, described information region includes the information area of multiple ordered arrangements
Block 301;It is described coloured silk code coded system include:Reading unit 11, coding unit 12 and generation unit 13, the wherein function of each unit
It is described below:
Reading unit 11 is stored in preset at least one tables of data, for reading raw information described in acquisition
Characteristic value of the tables of data for the raw information of mark.
It should be understood that raw information here can be character string and/or picture etc., including network address, hyperlink, word, regard
Frequency even stream medium data etc..After color code coded system reads the raw information of user or other equipment input, by the original letter
Breath is stored in one or more tables of data of local profile or far-end server, to obtain the tables of data for marking
The characteristic value for the raw information known.These tables of data can be associated by one or more databases.Initial data is upper
Stating in tables of data can be identified by least one characteristic value, and the effect of this feature value is similar to pointer so that color code has quite big
Information capacity.For example, characteristic value can the position number of initial data be stored in tables of data, or correspondence is original
The major key of data.
Coding unit 12 carries out N system conversions, is encoded after mapping the characteristic value by hash function
Data;The N is the natural number more than or equal to 3.
After color code coded system obtains the characteristic value of initial data, due to the corresponding characteristic value of different size of initial data
There may be differences for length and quantity, therefore characteristic value can carry out operation by hash function (Hash Function), be grown
The hashed value of degree and uniform format, characteristic value is stored in corresponding to hashed value in hash table at this time, also, those skilled in the art
It can be by the way that different at least one of hash function, such as MD4 functions, MD5 functions and SHA-1 functions be arranged, to obtain
Need the hashed value of format.In turn, hashed value is carried out by N system conversions according to default correspondence, obtains coded data.Preferably
Ground, N can correspond to the quantity of color code color simultaneously, for the natural number more than or equal to 3 so that the information capacity bigger of color code.
For example, in a possible embodiment, N=6, the hashed value obtained after the characteristic value is mapped by hash function is 16 systems
1b2f55e8af3c97de, by 6 systems convert after obtain coded data 225143523311020204421344.When
So, for confidentiality and programmed readability, some embodiments can also map to obtain by the characteristic value by hash function
After hashed value, convert each character of the hashed value to ten's digit by default mapping relations respectively, then carry out N into
System conversion, obtains coded data, at this point, the default mapping relations are in addition to that can also be that other will hash for system transformational relation
The value of each and the ten's digit of value preset mapping table correspondingly.
In view of the individual information block 301 in the color code information area 30 of the present invention is in addition to being used to characterize coded data,
It may also include the positioning for framing and the verification for information checking, in some possible embodiments, the coding
The digit of data is less than or equal to the number of described information block 301, for example, block matrices of the information area 30 by one 6 × 6
Figure is constituted, then the digit of corresponding encoded data should be less than or be equal to 36.
It is worth noting that, in order to further increase the safety of color code, it, can also be to hashed value in above-mentioned cataloged procedure
Or coded data is encrypted.For example, before carrying out N systems conversion, the methods of some embodiments further includes will be described
It after characteristic value is mapped by hash function, is encrypted using asymmetric arithmetic, and stores the private key of the asymmetric arithmetic.It is non-right
Claim the type of algorithm compared with horn of plenty, can be effectively increased using asymmetric arithmetic encryption and crack difficulty.
Generation unit 13 will be encoded for the correspondence according to preset N kinds color and N system numbers by preset order
The corresponding color of each digit of data loads on the corresponding described information block in described information region, generates color code image.
It should be noted that N kinds color and the correspondence of N system numbers can be adjusted according to displaying or identification demand
It is whole, for example, N=6,0,1,2,3,4, the 5 of red, blue, green, yellow, white, black 6 system numbers corresponding respectively of 6 kinds of colors, so, it is possible to build
Found the correspondence of the color and coded data of multiple information blocks 301.For example, the information area 30 of color code image is by one
301 matrix diagram of information block of a n × n is constituted, and described information block 301 is by preset order (such as from left to right, from top to bottom)
Arrangement, correspondingly, the corresponding color of each digit of coded data is loaded on the letter by color code coded system by this preset order
The corresponding described information block in region is ceased, when loading color, multiple information blocks 301 are respectively by the list in above-mentioned 6 kinds of colors
One color filling, or be filled based on one of 6 kinds of colors, to generate color code image.Improve the ornamental value of identification code
And plasticity, user experience can be promoted, and expand the scope of application and application scenarios of identification code.
According to modularized design thinking, the present invention is on the basis of above-mentioned color code coding/decoding method, it is further proposed that a kind of coloured silk
Code decoding system.
Referring to Fig. 5, the coloured silk code includes information area 30, described information region includes the information area of multiple ordered arrangements
Block 301;The coloured silk code decodes system and includes:Acquiring unit 21, decoding unit 22 and query unit 23, the wherein function of each unit
It is described below:
Acquiring unit 21 reads each described information in described information region for obtaining color code image by preset order
The corresponding colouring information of block obtains coded data according to the correspondence of preset N kinds color and N system numbers;The N is big
In the natural number equal to 3.
When reading the colouring information of color code image, the solid color or primary color filled according to multiple information blocks 301
Determine the colouring information of each information block 301.It should be noted that the correspondence of N kinds color and N system numbers can basis
Displaying or identification demand are adjusted, for example, N=6,6 kinds of colors are red, it is blue, green, yellow, white, black correspond to respectively 6 system numbers 0,
1,2,3,4,5, it so, it is possible the correspondence for determining the color and coded data of multiple information blocks 301.For example, color
The information area 30 of code image is made of 301 matrix diagram of information block of a n × n, and described information block 301 presses preset order
(such as from left to right, from top to bottom) arrangement.Therefore, color code decoding system reads each institute in described information region by preset order
After stating the corresponding colouring information of information block, coded data can be obtained according to the correspondence.So as to improve identification
The ornamental value and plasticity of code, can promote user experience, and expand the scope of application and application scenarios of identification code.
Decoding unit 22 inquires the hash after by the coded data with the corresponding system conversion of hash function
The corresponding hash table of function obtains characteristic value of the preset data table for identifying raw information.
Since coded data is into N systems are made as, in order to obtain the characteristic value for identifying raw information, it is contemplated that feature
Value is by after hash function operation, having obtained the hashed value of length and uniform format, and characteristic value is stored corresponding to hashed value at this time
In hash table, also, those skilled in the art can by being arranged different hash function, such as MD4 functions, MD5 functions and
At least one of SHA-1 functions, the corresponding hashed value for obtaining required format.Therefore, it needs first by the coded data to hash
The corresponding system conversion of function is to obtain hashed value, for example, coded data is 225143523311020204421344, hashed value
For 16 systems, then transformed hashed value is 1b2f55e8af3c97de.In turn, using the hashed value by inquiring hash function
Corresponding hash table can accordingly obtain characteristic value of the preset data table for identifying raw information.In addition, it is contemplated that confidentiality and
Programmed readability, some embodiments inquire the hash after by the coded data with the corresponding system conversion of hash function
The corresponding hash table of function obtains characteristic value of the preset data table for identifying raw information, including:The coded data is turned
It is changed to the decimal system, by each character and the preset mapping relations of ten's digit of hashed value, obtains hashed value;The hash
Value is for identifying the characteristic value in hash table, at this point, the default mapping relations are in addition to that can also be other for system transformational relation
By the value of each of hashed value and ten's digit preset mapping table correspondingly.Then, it is looked into based on the hashed value
The corresponding hash table of the hash function is ask, characteristic value of the preset data table for identifying raw information is obtained.
In view of the individual information block 301 in the color code information area 30 of the present invention is in addition to being used to characterize coded data,
It may also include the positioning for framing and the verification for information checking, in some possible embodiments, the coding
The digit of data is less than or equal to the number of described information block 301, for example, block matrices of the information area 30 by one 6 × 6
Figure is constituted, then the digit of corresponding encoded data should be less than or be equal to 36.
It is worth noting that, some possible embodiments are to further increase the safety of color code, in cataloged procedure pair
Hashed value or coded data are encrypted.Therefore, correspondingly, the corresponding hash table of hash function described in color code decoding system queries
Before, further include being carried out using the private key of asymmetric arithmetic after by the coded data with the corresponding system conversion of hash function
Decryption.The type of asymmetric arithmetic can be effectively increased the difficulty that malice cracks compared with horn of plenty, using asymmetric arithmetic encryption, carry
High security.
Query unit 23 reads the characteristic value pair for inquiring at least one tables of data according to the characteristic value
The raw information answered.
It should be understood that these tables of data can be associated by one or more databases.Here raw information can be word
Symbol string and/or picture etc., including network address, hyperlink, word, video even stream medium data etc..Initial data is in above-mentioned data
It is identified by least one characteristic value in table, the effect of this feature value is similar to pointer so that color code holds with sizable information
Amount, for example, characteristic value can the position number of initial data be stored in tables of data, or correspond to the master of initial data
Key.Color code decoding system inquires one or more data of local profile or far-end server according to obtained characteristic value
Table completes decoding to obtain the raw information that characteristic value is identified.The good usage experience of user is brought, is also expanded
The application range of identification code.
Referring to Fig. 6, a kind of color code encoding device is further provided in another embodiment of the present invention, including:
Memory 702, for storing the program for supporting that color code coded system executes above-mentioned color code encoding method;
Communication interface 703, for above-mentioned color code coded system and other equipment or communication;
One or more processors 705, for executing the program stored in the memory;
One or more application program, wherein one or more of application programs 705 are stored in the memory 702
In and be configured as being executed by one or more of processors 704, one or more of application programs 705 are configured as using
In the above-mentioned color code encoding method of execution.
Referring to Fig. 7, a kind of color code decoding device is further provided in yet another embodiment of the invention, including:
Memory 702, for storing the program for supporting that color code decoding system executes above-mentioned color code coding/decoding method;
Communication interface 703, for above-mentioned color code decoding system and other equipment or communication;
One or more processors 704, for executing the program stored in the memory;
One or more application program 705, wherein one or more of application programs 705 are stored in the memory
It in 702 and is configured as being executed by one or more of processors 704, one or more of application programs 705 are configured
To be used to execute above-mentioned color code coding/decoding method.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect
Shield the present invention claims the more features of feature than being expressly recited in each claim.Therefore, it then follows specific implementation
Thus claims of mode are expressly incorporated in the specific implementation mode, wherein each claim itself is as the present invention
Separate embodiments.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of arbitrary
It mode can use in any combination.
A kind of color code decoding method provided by the present invention and corresponding system and equipment have been carried out in detail above
It introduces, for those of ordinary skill in the art, without departing from the principle of the present invention, in specific implementation mode and application
There will be changes in range, in conclusion the content of the present specification should not be construed as limiting the invention.
Claims (10)
1. a kind of coloured silk code encoding method, which is characterized in that the coloured silk code includes information area, and described information region includes multiple having
The information block of sequence arrangement;The coloured silk code encoding method includes the following steps:
Read raw information, be stored in preset at least one tables of data, obtain the tables of data for mark institute
State the characteristic value of raw information;
After the characteristic value is mapped by hash function, N system conversions are carried out, coded data is obtained;The N be more than or equal to
3 natural number;
According to the correspondence of preset N kinds color and N system numbers, by preset order by the corresponding face of each digit of coded data
Color loads on the corresponding described information block in described information region, generates color code image.
2. coloured silk code encoding method according to claim 1, which is characterized in that before carrying out the N systems conversion, further include
It after mapping the characteristic value by hash function, is encrypted using asymmetric arithmetic, and stores the asymmetric arithmetic
Private key.
3. coloured silk code encoding method according to claim 2, which is characterized in that described that the characteristic value is passed through hash function
After mapping, N system conversions are carried out, coded data is obtained, including:
The characteristic value is mapped by hash function after obtaining hashed value, is respectively passed through each character of the hashed value pre-
If mapping relations are converted into ten's digit, then carry out N system conversions, coded data is obtained.
4. a kind of coloured silk code coding/decoding method, which is characterized in that the coloured silk code includes information area, and described information region includes multiple having
The information block of sequence arrangement;The coloured silk code coding/decoding method includes the following steps:
Color code image is obtained, by the corresponding colouring information of each described information block in preset order reading described information region,
Coded data is obtained according to the correspondence of preset N kinds color and N system numbers;The N is the natural number more than or equal to 3;
After the coded data is converted with the corresponding system of hash function, the corresponding hash table of the hash function is inquired, is obtained
It is used to identify the characteristic value of raw information to preset data table;
At least one tables of data is inquired according to the characteristic value, reads the corresponding raw information of the characteristic value.
5. coloured silk code coding/decoding method according to claim 4, which is characterized in that inquiring the corresponding hash of the hash function
Before table, further include after by the coded data with hash function corresponding system conversion, using asymmetric arithmetic private key into
Row decryption.
6. coloured silk code coding/decoding method according to claim 5, which is characterized in that it is described by the coded data with hash function
After corresponding system conversion, the corresponding hash table of the hash function is inquired, obtains preset data table for identifying raw information
Characteristic value, including:
The coded data is converted into the decimal system, is closed by the preset mapping of each character and ten's digit of hashed value
System, obtains hashed value;The hashed value is used to identify the characteristic value in hash table;
The corresponding hash table of the hash function is inquired based on the hashed value, obtains preset data table for identifying raw information
Characteristic value.
7. a kind of coloured silk code coded system, which is characterized in that the coloured silk code includes information area, and described information region includes multiple having
The information block of sequence arrangement;It is described coloured silk code coded system include:
Reading unit is stored in preset at least one tables of data for reading raw information, obtains the tables of data
The characteristic value of the raw information for mark;
Coding unit carries out N system conversions, obtains coded data after mapping the characteristic value by hash function;Institute
It is the natural number more than or equal to 3 to state N;
Generation unit, it is by preset order that coded data is every for the correspondence according to preset N kinds color and N system numbers
The corresponding color of one digit number loads on the corresponding described information block in described information region, generates color code image.
8. a kind of coloured silk code decodes system, which is characterized in that the coloured silk code includes information area, and described information region includes multiple having
The information block of sequence arrangement;The coloured silk code decodes system and includes:
Acquiring unit reads each described information block pair in described information region for obtaining color code image by preset order
The colouring information answered obtains coded data according to the correspondence of preset N kinds color and N system numbers;The N be more than or equal to
3 natural number;
Decoding unit inquires the hash function pair after by the coded data with the corresponding system conversion of hash function
The hash table answered obtains characteristic value of the preset data table for identifying raw information;
Query unit reads the corresponding original of the characteristic value for inquiring at least one tables of data according to the characteristic value
Beginning information.
9. a kind of coloured silk code encoding device, which is characterized in that including:
Memory, for storing the program for supporting that color code coded system executes above-mentioned color code encoding method;
Communication interface, for above-mentioned color code coded system and other equipment or communication;
One or more processors, for executing the program stored in the memory;
One or more application program, wherein one or more of application programs are stored in the memory and are configured
To be executed by one or more of processors, one or more of application programs are configurable for executing and be wanted according to right
Seek 1 to 5 any one of them method.
10. a kind of coloured silk code decoding device, which is characterized in that including:
Memory, for storing the program for supporting that color code decoding system executes above-mentioned color code coding/decoding method;
Communication interface, for above-mentioned color code decoding system and other equipment or communication;
One or more processors, for executing the program stored in the memory;
One or more application program, wherein one or more of application programs are stored in the memory and are configured
To be executed by one or more of processors, one or more of application programs are configurable for executing and be wanted according to right
Seek 6 to 10 any one of them methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810441767.6A CN108629391B (en) | 2018-05-10 | 2018-05-10 | Color code encoding and decoding method, system and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810441767.6A CN108629391B (en) | 2018-05-10 | 2018-05-10 | Color code encoding and decoding method, system and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108629391A true CN108629391A (en) | 2018-10-09 |
CN108629391B CN108629391B (en) | 2021-09-03 |
Family
ID=63692538
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810441767.6A Active CN108629391B (en) | 2018-05-10 | 2018-05-10 | Color code encoding and decoding method, system and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108629391B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111147854A (en) * | 2019-12-25 | 2020-05-12 | 江苏提米智能科技有限公司 | Color-based large-capacity data image coding and decoding method |
CN111988297A (en) * | 2020-08-13 | 2020-11-24 | 北京诚志重科海图科技有限公司 | Text communication secret transmission plain secret conversion system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101281607A (en) * | 2008-05-20 | 2008-10-08 | 北京方正国际软件系统有限公司 | Two-dimension bar code and system with large information capacity |
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 |
CN104424496A (en) * | 2013-08-19 | 2015-03-18 | 深圳市腾讯计算机系统有限公司 | Two-dimension code generation, identification and information providing method, device and system |
CN107545289A (en) * | 2017-09-19 | 2018-01-05 | 闫河 | The coding method of matrix two-dimensional code and coding/decoding method |
-
2018
- 2018-05-10 CN CN201810441767.6A patent/CN108629391B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101281607A (en) * | 2008-05-20 | 2008-10-08 | 北京方正国际软件系统有限公司 | Two-dimension bar code and system with large information capacity |
CN103310255A (en) * | 2013-05-31 | 2013-09-18 | 曾芝渝 | Color character encoding method and decoding method |
CN104424496A (en) * | 2013-08-19 | 2015-03-18 | 深圳市腾讯计算机系统有限公司 | Two-dimension code generation, identification and information providing method, device and system |
CN103489026A (en) * | 2013-09-24 | 2014-01-01 | 深圳市中选科技有限公司 | Colorful two-dimension code, generating method and generating system thereof and printed article |
CN107545289A (en) * | 2017-09-19 | 2018-01-05 | 闫河 | The coding method of matrix two-dimensional code and coding/decoding method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111147854A (en) * | 2019-12-25 | 2020-05-12 | 江苏提米智能科技有限公司 | Color-based large-capacity data image coding and decoding method |
CN111988297A (en) * | 2020-08-13 | 2020-11-24 | 北京诚志重科海图科技有限公司 | Text communication secret transmission plain secret conversion system |
CN111988297B (en) * | 2020-08-13 | 2022-09-13 | 北京诚志重科海图科技有限公司 | Text communication secret transmission plain secret conversion system |
Also Published As
Publication number | Publication date |
---|---|
CN108629391B (en) | 2021-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102984151B (en) | Method and the server of image data are provided to computing terminal | |
JP4557866B2 (en) | Mixed code, mixed code generation method and apparatus, and recording medium | |
CN103646455B (en) | The compound method of a kind of Intelligent lock device and using method thereof, electron key | |
CN105447546A (en) | Two-dimensional code capable of being embedded with large-ratio graph as well as coding and decoding method and device therefor | |
US20190286680A1 (en) | Interactive barcodes | |
CN103942585B (en) | Method for converting information into two-dimensional codes | |
WO2006049430A1 (en) | Mixed code, and method and apparatus for generating the same, and method and appratus for decoding the same | |
US11727524B2 (en) | System and method for encoding and authenticating a digital image | |
CN108629391A (en) | Color code decoding method, system and equipment | |
CN106803032A (en) | Realize method, device and client device that website fingerprint is logged in | |
US8130267B2 (en) | Data input device, data input system, data input method, printing device, and printed matter | |
CN114006743B (en) | Method for extracting and querying land use state in real time based on big data | |
CN116881881B (en) | Data export method, device, electronic equipment and computer readable medium | |
CN105160378A (en) | Color invisible image code generating method | |
KR20190028046A (en) | Historical studies method and system using augmented reality | |
CN107392833A (en) | A kind of adding method and adding set of the picture watermark based on smart machine | |
US20160189015A1 (en) | Data exchange methods, systems and apparatus using color images | |
CN104168362A (en) | Terminal, two-dimensional management apparatus, and electronic card management method | |
WO2022143417A1 (en) | Qr code generation method and related device | |
KR100371895B1 (en) | Multimedia information service method using code image and apparatus thereof | |
JP5688729B2 (en) | Address color system, address color creation method based on camera image, encoding method and decoding method using color photographic image | |
CN105095938A (en) | Method for generating color multi-order invisible image code | |
JP5813869B2 (en) | Design code pattern including information deciphered by digital equipment and its operating system | |
KR101538491B1 (en) | Method and apparatus for using image as a means of storing and moving supplementary data | |
JP2005024654A (en) | Color transformation system and color transforming method |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210816 Address after: 516000 southwest side of 2nd floor, CD building, Huinan science and technology innovation center, No. 2, Huatai Road, Huinan hi tech Industrial Park, huiao Avenue, Huizhou City, Guangdong Province Applicant after: Pinguan Wulian Technology (Huizhou) Co.,Ltd. Address before: 528000 unit 301-9, block E5, Gesha Industrial Zone, Chancheng District, Foshan City, Guangdong Province Applicant before: FOSHAN BOZHI DUNSHI TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |