CN103310255B - A kind of coding method of color character and its coding/decoding method - Google Patents
A kind of coding method of color character and its coding/decoding method Download PDFInfo
- Publication number
- CN103310255B CN103310255B CN201310212552.4A CN201310212552A CN103310255B CN 103310255 B CN103310255 B CN 103310255B CN 201310212552 A CN201310212552 A CN 201310212552A CN 103310255 B CN103310255 B CN 103310255B
- Authority
- CN
- China
- Prior art keywords
- color
- system code
- character
- code
- converted
- 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.)
- Expired - Fee Related
Links
Landscapes
- Document Processing Apparatus (AREA)
Abstract
The invention discloses a kind of coding method of color character and its coding/decoding method, it is not high and influence product appearance effect to solve the problems, such as that security code technology has security.The coding method of the color character includes:(1)Select the different color of N kinds;(2)Formulate N system code storehouse and by its radix and the color-match selected;(3)Source information is inputted, and is converted into M system code;(4)M system code is converted into N system code and obtains corresponding data;(5)The data are replaced using the color to match with N system code storehouse radix and are arranged to form color character;(6)Color character is exported.The coding/decoding method of the color character includes:(1)Color character is identified using terminal device and is replaced with M system code;(2)M system code is converted into UNICODE or ASCII codings;(3)UNICODE or ASCII code conversions are source information and exported by terminal device.The security code production method of the present invention is novel, safe.
Description
Technical field
The present invention relates to a kind of coding method of color character and its coding/decoding method.
Background technology
With the progressively development of social economy, requirement more and more higher of the people to physical product, but it follows that more
Also begin to be full of into market come more fake products, criminal's therefrom substantial amounts of interests of grab, this not only shadow
The reputation of Xiang Liao manufacturers, and make consumer feel greatly alarmed.
Based on this, many manufacturers start to add security code in its product, can be with discrimination by verifying security code
Go out the true and false of product.However, existing security code technology, including Quick Response Code, bar code, colour barcode and cromogram shape code, its
The technological means of use is individually to be superimposed upon security code in the packaging of product, is examined from product packaging profile and aesthetic
Consider, the design and packaging of product should reduce the influence of non-product element as far as possible, and existing security code is required in product bag
Load onto and take independent space, therefore this have impact on the appearance of product packaging to a certain extent.Also, what is be individually superimposed is anti-
Pseudo-code is also easy to be penetrated and carried out by criminal counterfeit, and therefore, existing security code technology is not only in terms of antifalse effect
It is unsatisfactory, and it also causes no small influence to the appearance of product packaging.
The content of the invention
It is an object of the invention to provide a kind of coding method of color character and its coding/decoding method, mainly solves existing
The problem of not high security and influence product appearance effect be present in security code technology.
To achieve these goals, the technical solution adopted by the present invention is as follows:
A kind of coding method of color character, comprises the following steps:
(1) the different color of N kinds is selected from RGB color table, N is the natural number more than or equal to 2;
(2) N system code storehouse is formulated according to the N kinds color selected, and by the N kinds color selected and the N system code storehouse
Radix match one by one;
(3) source information is inputted in server system input, and converts thereof into M system code, M is more than or equal to 2
Natural number;
(4) M system code is converted into N system code, obtains corresponding data;
(5) data according to obtained by step (4), the color to be matched using the radix with N system code storehouse is to the data
It is replaced and is arranged to form color character;
(6) color character is output in product.
Further, the source information is numeral, English alphabet or character string.
To further ensure that the safety of source information, before source information is converted into M system code, also in superposition letter thereon
Single AES or One-way encryption algorithm.
Or before source information is converted into M system code, simple encryption algorithm and unidirectional is also sequentially overlapped thereon
AES.
Specifically, " corresponding N system code storehouse is formulated according to the N kinds color selected, selected in the step (2)
Color matched one by one with the radix in the N system code storehouse " refer to server system according to the kind number N for the color selected establish with
System transformation rule is observed in the equal scale coding storehouse of its numerical value, i.e. N system code storehouse, the N system code storehouse, its radix is 0,
1st, 2 ... (N-1), the color N selected with season0、N1、N2……Nn-1Respectively with the radix in the N system code storehouse one by one
Match somebody with somebody, i.e. N0=0, N1=1, N2=2 ... Nn-1=N-1.
Specifically, in the step (5) " color to be matched using the radix with N system code storehouse is to the data
It is replaced and is arranged to form color character " refer to N system numbers according to conversion gained, it is utilized respectively the color of matching
N0、N1、N2……Nn-2Or Nn-1The value 0,1,2 ... (N-2) or (N-1) of each numerical digit on the N system numbers are replaced, makes the N
System number turns into the color character being arranged to form by the color accordingly matched according to the number bit sequence of the N system numbers.
On the basis of the above, present invention also offers the coding/decoding method of the color character, comprise the following steps:
(1) identify the color character containing N kind colors in product using terminal device and be replaced with M system code, N
It is the natural number more than or equal to 2 with M;
(2) M system code is converted into UNICODE or ASCII to encode;
(3) UNICODE or ASCII code conversions are source information and output it by terminal device.
Specifically, the step (1) comprises the following steps:
(1a) is established with server system using terminal device and communicated, and is identified comprising color character in the product;
Matched rule between color and N system code storehouse radix that (1b) terminal device is established according to server system,
The N kind colors N that color character is contained0、N1、N2……Nn-1Respectively with the N system code storehouse radix 0 to match with it, 1,
2 ... (N-1) are replaced, and carry out rearranging N system code according to putting in order for color character color;
The N system code is converted to M system code by (1c).
Further, after M system code to be converted to UNICODE or ASCII codings, also using simple decipherment algorithm
Or it is decrypted unidirectional decipherment algorithm.
Or after M system code to be converted to UNICODE or ASCII codings, unidirectional decipherment algorithm is also used successively
It is decrypted with simple decipherment algorithm.
Compared with prior art, the invention has the advantages that:
(1) present inventive concept is ingenious, and principle is simple, and it is convenient to realize.
(2) present invention utilizes the mode of code conversion, different colors is carried out into permutation and combination, and use it for representing defeated
The source information entered, then the color after certain output assembled arrangement in the product, such user are set by corresponding terminal
The standby source information that can be identified expressed by the color combined at this, so as to verify the true and false of product, the present invention uses false proof
Technological means need not utilize character individually take the packaging space of product, but the appearance color permutation and combination table for passing through product
Security code is shown as, therefore it does not interfere with the attractive in appearance of product and layout, and because the security code of the present invention can be hidden in
On any position of product (such as product description, producer identify), therefore criminal is difficult to find and penetrate to be arranged on production
Security code in product, security code production method of the invention is quite novel, its color character exported, is independent false proof
Code, it is the part for forming product appearance packaging color again, disguised very good, security is at a relatively high, and therefore, the present invention breaks through
The limitations of prior art means, realizes very big innovation, and greatly improves security code technology, and the present invention solves existing
The insoluble problem of technology, be truly realized security code and product integration, complied with the trend of development in science and technology, its with it is existing
Technology is compared, and has prominent substantive distinguishing features and significant progress.
(3) present invention has also been superimposed AES before source information is exported to it, it is achieved thereby that the encryption of information,
The present invention can be superimposed multiple encryption algorithms by two kinds of different cipher modes, if terminal device without correct decipherment algorithm,
It will be unable to obtain correct source information, therefore, the present invention dexterously gets up Color Scheme and information encrypted combination, not only enters one
Step enhances the anti-counterfeiting of information, it is ensured that the safety of information, and also increased greatly by the way of character adding AES
The strong practicality of the present invention.
(4) present invention is studied and designed by being engaged in the senior engineer of security code technical work for many years, and it has specific aim
By force, safe, the characteristics of flow is succinct, the incomparable advantage of prior art and market development space are possessed, and can
To ensure the reputation of manufacturer, therefore, the present invention is suitable to popularization and application.
Brief description of the drawings
Fig. 1 is the coding schematic flow sheet of the present invention-embodiment 1.
Fig. 2 is the decoding process schematic diagram of the present invention-embodiment 1.
Fig. 3 is the coding schematic flow sheet of the present invention-embodiment 2.
Fig. 4 is the decoding process schematic diagram of the present invention-embodiment 2.
Fig. 5 is the coding schematic flow sheet of the present invention-embodiment 3.
Fig. 6 is the decoding process schematic diagram of the present invention-embodiment 3.
Fig. 7 is the coding schematic flow sheet of the present invention-embodiment 4.
Fig. 8 is the decoding process schematic diagram of the present invention-embodiment 4.
Embodiment
The invention will be further described with reference to the accompanying drawings and examples, and embodiments of the present invention include but is not limited to
The following example.
Embodiment 1
The present invention is that security code is combined to output with color and decoded to obtain a kind of technical scheme of security code, such as Fig. 1
Shown, the flow that it is encoded is as follows:
(1) the different color of N kinds is selected from RGB color table, N is the natural number more than or equal to 2, for ease of identifying,
Here N kinds color can preferentially select the larger color of contrast, such as black and white;
(2) N system code storehouse is formulated according to the N kinds color selected, and by the N kinds color selected and the N system code storehouse
Radix match one by one, specifically refer to here server system established according to the kind number N for the color selected it is equal with its numerical value
System transformation rule is observed in scale coding storehouse, i.e. N system code storehouse, the N system code storehouse, and its radix is 0,1,2 ... (N-
1) the color N, selected with season0、N1、N2……Nn-1Matched one by one with the radix in the N system code storehouse respectively, i.e. N0=0,
N1=1, N2=2 ... Nn-1=N-1, such as three kinds of colors are picked out, and N0For black, N1For red, N2For indigo plant, then establish three and enter
Code database processed, because ternary radix is 0,1,2, therefore, the radix of the ternary code database is just 0,1,2, then corresponding
Ground, N0=0, N1=1, N2=2, i.e., black=0, red=1, blue=2;
(3) source information is inputted in server system input, and converts thereof into M system code, M is more than or equal to 2
Natural number, i.e. source information can be converted into binary coding, ternary coding, quaternary coding ... etc., the present embodiment
In, the source information of input is numeral, English alphabet or character string;
(4) M system code is converted into N system code, obtains corresponding data;
(5) data according to obtained by step (4), the color to be matched using the radix with N system code storehouse is to the data
It is replaced and is arranged to form color character, specifically refers to the N system numbers according to conversion gained here, be utilized respectively matching
Color N0、N1、N2……Nn-2Or Nn-1Replace the value 0,1,2 ... (N-2) or (N- of each numerical digit on the N system numbers
1) the N systems number, is made to turn into the colored word being arranged to form by the color accordingly matched according to the number bit sequence of the N system numbers
Accord with, such as we still select black, red, blue three-color, then establish ternary code database, it is assumed that the source information of input is ten
Binary digits 19, and M=2, then it is just 10011 that the ten's digit 19, which is converted into after binary system, converts thereof into ternary
Just it is 201 after number, blueness, black, red, three face is then replaced with according to the color of matching, the can of trit 201
Color has been arranged to make up required color character in the way of 201;
(6) color character is output in product, in the present embodiment, the way of output of color character can be printing, spray
Paint, print or scribble etc. any one.
After security code is added into product, subscriber terminal equipment needs just to can recognize that the colour in product by decoding
Character, as shown in Fig. 2 the decoding process of the present invention is:
(1) identify the color character containing N kind colors in product using terminal device and be replaced with M system code;
Specifically, the step comprises the following steps:
(1a) is established with server system using terminal device and communicated, and is identified comprising color character in the product;
Matched rule between color and N system code storehouse radix that (1b) terminal device is established according to server system,
The N kind colors N that color character is contained0、N1、N2……Nn-1Respectively with the N system code storehouse radix 0 to match with it, 1,
2 ... (N-1) are replaced, and carry out rearranging N system code according to putting in order for color character color, such as colored
The color alignment of character is blueness, black, red, then according to matched rule when coding, the color of the color character
Can is substituted for ternary radix 2,0,1, then forms trit according to the color disposal order can of color character
201;
The N system code is converted to M system code by (1c);
(2) M system code is converted into UNICODE or ASCII to encode;
(3) UNICODE or ASCII code conversions are source information and to output it by terminal device, due to terminal device with
Server system establishes communication, therefore after M system code to be converted to UNICODE or ASCII codings, the terminal device is just
Source information can be converted into according to the information that server system stores.
For convenience of understanding technical scheme, the implementation process of the present embodiment is explained with several examples below
State.
By taking binary system and ternary conversion as an example, even N=3, M=2, and the M system code in the present embodiment is 8
Bit code form.First, black, red, blue three-color is picked out from RGB color table, then formulates one according to the color selected
Code database, due to N=3, therefore the code database is ternary code database, by the radix in the color selected and ternary code database
Matched, even:Black=0, red=1, blue=2.
Assuming that four characters of selection are needed to be used to colour composition color character security code in the packaging of product, then according to
Selected color and numerical value definition and standard code provide that can represents ten's digit 0-80 after this four rendering characters,
81 numbers altogether.Further, if the source information content of input is ten's digit 29, mistake mentioned above, in the present embodiment
M system code be 8 bit code forms, therefore the data being converted into after M system code (i.e. binary coding) are just
00011101, N systems number (i.e. trit) is then reconverted into, due to have selected four characters, therefore the trit is 4
Position ternary form, the data after changing are just into 1002, and according to matched rule, color sequences corresponding to four characters are just distinguished
For red, black, black, blueness, the color character being output to finally by output equipment on product is by this four characters
Corresponding color alignment combination is formed, i.e., the color disposal order of the color character is red, black, black, blueness.
Similarly, if the source information content of input be ten's digit 57, be converted to after binary number as 00111001, then
Be converted into after trit being 2010, then accordingly, color sequences corresponding to four characters be respectively just blueness, black, red,
Black, the color character being finally output on product are to be combined to form by the color alignment corresponding to this four characters, i.e., should
The color disposal order of color character is blueness, black, red, black.
The decoding process of above-mentioned two example is completely the same, and terminal device is according to the color selected and ternary code database
Color in color character is put in order replace with trit one by one by matched rule according to it, such as color character color row
The order of row is red, black, black, blueness, then replace with as 1002 after trit, then by this change after three
System number is converted to binary number 00011101, UNICODE or ASCII codings is then converted thereof into again, finally according to service
UNICODE the or ASCII code conversions can be obtained source information content 29 by the information of device system, other the like.
Embodiment 2
As shown in Figure 3,4, the difference from embodiment 1 is, coding and output of the embodiment 1 for non-encrypted source information,
The present embodiment is then before source information is converted into M system code, and also being superimposed One-way encryption algorithm thereon, (such as MD5 is mono-
To AES or secondary MD5 One-way encryption algorithm), and decoding when, by M system code be converted to UNICODE or
After ASCII codings, also it is decrypted using unidirectional decipherment algorithm, then reconvert obtains source information, whole source information
Coding and the output state that is in encrypting and decrypts.The present embodiment illustrates this reality by taking secondary MD5 One-way encryption algorithm as an example
Apply encryption and the decrypting process of example:
By taking binary system and ternary conversion as an example, even M=2, N=3, black, red, blue three-color, Ran Houjian are selected
Vertical ternary code database, and make:Black=0, red=1, blue=2.
Assuming that the source information for needing to encode is hexadecimal string 20130522, and prescribed product packs a upper word
Include four colors in symbol, after the source information is inputted, according to the rule of secondary MD5 One-way encryption algorithm first by its turn
Change secondary ciphertext 408B6B4A376A688A into, while a corresponding source document-ciphertext contrast relationship is established in server system
Table, so that the later stage can decrypt to obtain source information.After character string is converted to secondary ciphertext, then the secondary ciphertext is converted to two and entered
Number processed:001101000011000000111000010000100011011001000010001101000100000100110011
00110111001101100100000100110110001110000011100001000001, then again by the binary data
Trit is converted to, the trit after conversion is:1221121020022110200021101221210212202001200
021022000200220022102, due to including four colors, therefore the colour finally exported on product in a character
Character is made up of 16 endianness orders, and the combination of its color puts in order as red blue red, red blue red-black, blue-black
It is black it is blue, it is blue it is red it is black, blue-black is black, it is blue it is red it is black, it is red it is blue it is red, blue red and black is blue, it is red it is blue it is black, blue-black is dark red, blue-black is black,
Blue red and black is red, blue-black is black, black blue, black blue, the blue red-black indigo plant of blue-black of blue-black.
The present embodiment when coding due to being superimposed One-way encryption algorithm, therefore, in terminal device and server system
When communicating and being decoded, it needs to first pass through corresponding decipherment algorithm, and the data after conversion are decrypted, and then could obtain
To correct source information content, what is otherwise obtained after terminal device decoding will be a pile mess code, rather than correct security code.This
In decoding, terminal device is same first one by one will embodiment according to the color selected and the matched rule of ternary code database radix
Color in color character replaces with trit according to putting in order, i.e., by red blue red, the red blue red-black, blue-black of color alignment
It is black it is blue, it is blue it is red it is black, blue-black is black, it is blue it is red it is black, it is red it is blue it is red, blue red and black is blue, it is red it is blue it is black, blue-black is dark red, blue-black is black,
Blue red and black is red, blue-black is black, black blue, black blue, the blue red-black indigo plant of blue-black of blue-black replaces with trit:
12211210200221102000211012212102122020012000210220002002 20022102, then again by its turn
Change binary number into, the binary number is just:001101000011000000111000010000100011011001000010001
10100010000010011001100110111001101100100000100110110001110000011100001000001
, then the binary number is entered one by one using unidirectional decipherment algorithm source document-ciphertext contrast relationship table that high in the clouds is established before
Row decryption, obtains secondary ciphertext 408B6B4A376A688A, is then converted into UNICODE or ASCII codings again, you can
It is similar with the additive process of the present embodiment to source information content 20130522, the additive process of other kinds of AES.By
Source document-ciphertext contrast relationship table in the present embodiment is randomly generated with the generation of secondary ciphertext, therefore it has
Uniqueness, it can not decrypt to obtain secondary ciphertext 408B6B4A376A688A at all according to other source documents-ciphertext contrast relationship table,
And then also can not just decode to obtain source information 20130522, therefore its confidentiality is very high.
Embodiment 3
As shown in Figure 5,6, the difference from embodiment 1 is, coding and output of the embodiment 1 for non-encrypted source information,
The present embodiment is then before source information is converted into M system code, and also being superimposed simple encryption algorithm thereon, (such as dictionary turns
Change AES, N system displacements AES, N system bit maps AES, character offset AES, logic or conversion
AES, logical AND transposition encryption algorithm, logic XOR transposition encryption algorithm or four fundamental rules hybrid operation transposition encryption algorithm),
And in decoding, after M system code to be converted to UNICODE or ASCII codings, also using simple decipherment algorithm to it
It is decrypted.The present embodiment illustrates the encryption and decrypting process of the present embodiment by taking character offset AES as an example:
By taking binary system and ternary conversion as an example, M=2, N=3, black, red, blue three-color is selected, then establishes three
Scale coding storehouse, and make:Black=0, red=1, blue=2.
Assuming that the source information for needing to encode is hexadecimal string 20130522, and prescribed product packs a upper word
Symbol is built-in with four colors, first to its overlaying character displacement AES before source information is converted into binary coding.
The displacement mode for the character offset AES that the present embodiment uses is mobile 1 character from left to right, is obtained after character offset
Ciphertext be 22013052, the ciphertext is converted into binary number:
00110010001100100011000000110001001100110011000000110101 00110010, then again by the group
Binary number is converted to trit, and the trit after conversion is:12121212121012111220121012221212, by
In including four colors in a character, therefore the color character finally exported on product is arranged by eight character sequences
Row composition, the combination of its color put in order for red blue, the red indigo plant of red indigo plant it is red it is blue, red indigo plant is red-black, red indigo plant is red, red blue black, red
Blue red-black, red blue blue, the red red indigo plant of indigo plant.
The present embodiment when coding due to being superimposed AES, therefore, is communicated in terminal device and server system
And when being decoded, it needs to first pass through corresponding decipherment algorithm, and the data after conversion are decrypted, and then can just obtain just
True source information content, what is otherwise obtained after terminal device decoding will be a pile mess code, rather than correct security code.This implementation
Example is in decoding, using the mode of inversely decoding, i.e., first according to the color selected and the matching of ternary code database radix
Rule, by the color alignment of the color character on product:Red blue, the red indigo plant of red indigo plant it is red it is blue, red indigo plant is red-black, red indigo plant is red, red blue
Black, red indigo plant is red-black, red blue blue, the red red indigo plant of indigo plant replaces with trit 12121212121012111220121012221212,
Then binary number is converted into again, and the binary number of conversion is:
00110010001100100011000000110001001100110011000000110101 00110010, then it is reconverted into
UNICODE or ASCII codings, are then converted to obtain character string 22013052, finally utilize character offset decipherment algorithm again
Shifted, you can obtain source information content 20130522, the additive process of other kinds of AES and the present embodiment
It is similar.If counterfeiter wants to crack the source information of the present embodiment, he must know that the present embodiment is calculated using which kind of encryption first
Method, secondly, even if he understands the present embodiment using character offset AES, he must also know that the character offset adds
Close algorithm is to employ which kind of character offset mode, and counterfeiter could be by source after must knowing above two mode and regulation simultaneously
The information content cracks, and its difficulty is very big, therefore the confidentiality of source information is also very high in the present embodiment.
Embodiment 4
The present embodiment is the combination of embodiment 2 and embodiment 3, i.e., can be in sequence in the encryption link of the present invention
It is superimposed One-way encryption algorithm and simple encryption algorithm.The present embodiment is mono- to be sequentially overlapped character offset AES and secondary MD5
To exemplified by AES, the implementation of the present embodiment is illustrated, as shown in fig. 7, color, color that the present embodiment is selected
Kind number and matched rule it is identical with above-mentioned several embodiments, the source information of input is hexadecimal string 01305222,
It is overlaying character displacement AES first, character offset mode is mobile 1 character from left to right, is after displacement
20130522.Followed by secondary MD5 One-way encryption algorithm is superimposed, it is converted according to the rule of secondary MD5 One-way encryption algorithm
Into secondary ciphertext, the secondary ciphertext that this is changed establishes one accordingly into 408B6B4A376A688A in server system
Source document-ciphertext contrast relationship table.After character is converted to ciphertext, then binary number is converted into, is:
00110100001100000011100001000010001101100100001000110100010000010011001100110
111001101100100000100110110001110000011100001000001, then the binary number is converted to again
Trit, the trit after conversion are just:12211210200221102000211012212102122020012000210
22000200220022102, accordingly, the color composition arrangement order of the color character finally exported on product is just red indigo plant
Lan Hong, red blue red-black, blue-black it is black it is blue, it is blue it is red it is black, blue-black is black, it is blue it is red it is black, it is red it is blue it is red, blue red and black is blue, it is red it is blue it is black,
Blue-black is dark red, blue-black is black, blue red and black is red, blue-black is black, black blue, black blue, the blue red-black indigo plant of blue-black of blue-black.
As shown in figure 8, in decoding, first according to the matched rule of the color selected and ternary code database radix by color
Trit is replaced with, the trit that the replacement obtains is:1221121020022110200021101221210212202
001200021022000200220022102, binary coding is then converted into, the binary number after the conversion is
00110100001100000011100001000010001101100100001000110100010000010011001100110
111001101100100000100110110001110000011100001000001, according to the unidirectional decipherment algorithms of secondary MD5
Rule converts thereof into secondary ciphertext 408B6B4A376A688A, the source document-ciphertext contrast relationship table then established before
Character string 20130522 is converted thereof into, finally recycles character offset decipherment algorithm to be decrypted, you can decoding obtains source letter
Cease content 01305222.The additive process of other kinds of multiple encryption algorithms is similar with the present embodiment.
The encryption and decryption processes of source information in the present invention are overlapped according to actual conditions, above-mentioned several embodiments
AES is overlapped before source information is converted into binary coding, and the AES being superimposed in fact can also
To be overlapped again after source information to be converted into binary coding, for example, by source information be converted into binary coding it
Afterwards, it is superimposed simple encryption algorithm (such as dictionary conversion AES, N system displacements AES, N system bit maps add
Close algorithm, character offset AES, logic or transposition encryption algorithm, logical AND transposition encryption algorithm, the conversion of logic XOR add
Close algorithm or four fundamental rules hybrid operation transposition encryption algorithm), or symmetric encipherment algorithm (such as des encryption algorithm,
TripleDES AESs, RC2 AESs, RC4 AESs, RC5 AESs or Blowfish AESs), or
It is that (such as RSA cryptographic algorithms, Elgamal AESs, knapsack algorithm, Rabin AESs, D-H add rivest, shamir, adelman
Close algorithm or ECC elliptic curve encryption algorithm), or compression algorithm (such as dictionary algorithm, regular length algorithm, LZ77 are calculated
Method, lzw algorithm, Huffman encoding algorithm, Arithmetic Coding algorithm or Golomb coding algorithms), the opportunity of superposition is according to encryption
The encryption rule of algorithm in itself determines.And in decoding, M system code is being converted into UNICODE or ASCII encodes it
Before, it is solved using corresponding simple decipherment algorithm, symmetrical decipherment algorithm, asymmetric decipherment algorithm or compression decipherment algorithm
Close i.e. decodable code obtains source information.The present invention, which is no longer discussed in detail, to be converted into source information to be superimposed encryption calculation after binary coding
The process of method, its decoding process is also not described in detail.
According to above-described embodiment, the present invention can be realized well.It is what deserves to be explained is selected in embodiments of the invention
The example taken is only intended merely to illustrate the implementation process of the present invention, on the premise of based on above-mentioned design, to solve equally
Technical problem or dependence body design thought of the present invention carry out the change or polishing of small range, are still used on its general form
The design concept of the present invention, and the essence of used technical scheme is still consistent with the present invention, it should also in the present invention
Protection domain in.
Claims (2)
1. a kind of coding method of color character, it is characterised in that comprise the following steps:
(1) the different color of N kinds is selected from RGB color table, N is the natural number more than or equal to 2;
(2) N system code storehouse is formulated according to the N kinds color selected, and the N kinds color selected and the color is compiled with the N systems
The radix in code storehouse matches one by one;In the step, " corresponding N system code storehouse, the face selected are formulated according to the N kinds color selected
Color matches one by one with the radix in the N system code storehouse " refer to that server system counts according to the kind number N for the color selected foundation with it
It is worth equal scale coding storehouse, i.e. N system code storehouse, transformation rule is observed in the N system code storehouse, and its radix is 0,1,2 ...
(N-1) the color N, selected with season0、N1、N2……Nn-1Matched one by one with the radix in the N system code storehouse respectively, i.e. N0
=0, N1=1, N2=2 ... Nn-1=N-1;
(3) in the source information of server system input, and M system code is converted thereof into, M is the nature more than or equal to 2
Number;The source information is numeral, English alphabet or character string;Also, before source information is converted into M system code, also exist
Simple encryption algorithm or One-way encryption algorithm are superimposed thereon;Or before source information is converted into M system code, also at it
On be sequentially overlapped simple close algorithm and One-way encryption algorithm;
(4) M system code is converted into N system code, obtains corresponding data;
(5) data according to obtained by step (4), the data are carried out using the color that the radix with N system code storehouse matches
Replace and be arranged to form color character;In the step, " color to be matched using the radix with N system code storehouse is to this
Data are replaced and are arranged to form color character " refer to N system numbers according to conversion gained, it is utilized respectively the face of matching
Color N0、N1、N2……Nn-2Or Nn-1Each place value 0,1,2 ... (N-2) or (N-1) on the N system numbers are replaced, enters the N
Number processed turns into the color character being arranged to form by the color accordingly matched according to the number bit sequence of the N system numbers;
(6) color character is output in product, as a part for product appearance packaging color, realizes the hidden of color character
Hide.
2. coding/decoding method corresponding to the coding method of the color character described in claim 1, it is characterised in that including following step
Suddenly:
(1) identify the color character containing N kind colors in product using terminal device and be replaced with M system code, N and M
It is the natural number more than or equal to 2;The step includes following:
(1a) is established with server system using terminal device and communicated, and is identified comprising color character in the product;
Matched rule between color and N system code storehouse radix that (1b) terminal device is established according to server system, by coloured silk
The N kind colors N that color character contains0、N1、N2……Nn-1Respectively with the N system code storehouse radix 0,1,2 ... to match with it
(N-1) it is replaced, and composition N system code is carried out according to putting in order for color character color;
The N system code is converted to M system code by (1c);
(2) M system code is converted into UNICODE or ASCII to encode, and uses simple decipherment algorithm or unidirectional decipherment algorithm pair
It is decrypted, or it is decrypted using unidirectional decipherment algorithm and simple decipherment algorithm successively;
(3) UNICODE or ASCII code conversions are source information and output it by terminal device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310212552.4A CN103310255B (en) | 2013-05-31 | 2013-05-31 | A kind of coding method of color character and its coding/decoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310212552.4A CN103310255B (en) | 2013-05-31 | 2013-05-31 | A kind of coding method of color character and its coding/decoding method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103310255A CN103310255A (en) | 2013-09-18 |
CN103310255B true CN103310255B (en) | 2017-12-22 |
Family
ID=49135445
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310212552.4A Expired - Fee Related CN103310255B (en) | 2013-05-31 | 2013-05-31 | A kind of coding method of color character and its coding/decoding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103310255B (en) |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105913515B (en) * | 2013-10-26 | 2017-12-26 | 新昌县华明轴承有限公司 | A kind of coding lock system unlocked with warning function mobile phone light |
DE112015005883T5 (en) | 2015-01-30 | 2017-09-28 | Hewlett-Packard Development Company, L.P. | M-EARS CYCLIC CODING |
CN105354717B (en) * | 2015-11-30 | 2019-02-22 | 南通大学 | A kind of colour commodity counterfeit prevention code generating method |
US11328503B2 (en) | 2016-07-14 | 2022-05-10 | Hewlett-Packard Development Company, L.P. | Wireless data communication of binary data as image data |
CN108108267B (en) * | 2016-11-25 | 2021-06-22 | 北京国双科技有限公司 | Data recovery method and device |
CN107463542B (en) * | 2017-08-08 | 2023-10-20 | 郭铮铮 | Method for representing binary number by using ASCII (ASCII) to print characters |
CN107294844B (en) * | 2017-08-21 | 2020-08-04 | 武汉斗鱼网络科技有限公司 | Message display method and device |
CN108416405B (en) * | 2018-03-12 | 2021-07-13 | 北京知道创宇信息技术股份有限公司 | Two-dimensional code verification method and system |
CN108629391B (en) * | 2018-05-10 | 2021-09-03 | 品冠物联科技(惠州市)有限公司 | Color code encoding and decoding method, system and equipment |
CN108985128A (en) * | 2018-07-06 | 2018-12-11 | 刘崇森 | The methods, devices and systems of color code identification |
CN109446488A (en) * | 2018-08-21 | 2019-03-08 | 深圳市华力特电气有限公司 | A kind of data processing method and device |
CN111357027A (en) * | 2018-10-26 | 2020-06-30 | 合刃科技(深圳)有限公司 | Spectrum anti-counterfeiting identification system and spectrum anti-counterfeiting code coding and decoding method |
CN110348554B (en) * | 2019-07-17 | 2023-10-27 | 北京迈格威科技有限公司 | Digital information encoding and decoding method and device, electronic equipment and storage medium |
CN110609985A (en) * | 2019-09-24 | 2019-12-24 | 南京环印防伪科技有限公司 | Character sequence-based coding method |
CN111382820B (en) * | 2020-02-25 | 2021-10-12 | 南通大学 | Four-lattice pure-color commodity anti-counterfeiting code generation method |
CN111638978B (en) * | 2020-05-20 | 2023-11-14 | 北京达佳互联信息技术有限公司 | Content sharing method and device |
CN115994773B (en) * | 2023-02-27 | 2023-06-02 | 山东丰茂源认证服务有限公司 | Pharmaceutical product anti-counterfeiting and traceability management system based on blockchain |
CN117315808B (en) * | 2023-11-28 | 2024-02-13 | 成都博瑞科传科技有限公司 | Portable water quality inspection instrument based on data integrity verification and acquisition method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102117419A (en) * | 2011-02-23 | 2011-07-06 | 深圳市融创天下科技发展有限公司 | Method, device, system and terminal equipment for generating and recognizing two-dimension code |
CN102646187A (en) * | 2011-02-20 | 2012-08-22 | 深圳市心艺来文化有限公司 | Color graphics coding and identifying method |
CN103020686A (en) * | 2012-12-14 | 2013-04-03 | 苏州阔地网络科技有限公司 | Method and system for coding two-dimensional code colors |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1302040A (en) * | 1999-12-30 | 2001-07-04 | 孙卫平 | Technology for producing digital anti-fake mark with unique colour image and product |
US7185816B1 (en) * | 2000-05-04 | 2007-03-06 | Symbol Technologies, Inc. | Bar code and method of forming a bar code having color for encoding supplemental information |
-
2013
- 2013-05-31 CN CN201310212552.4A patent/CN103310255B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102646187A (en) * | 2011-02-20 | 2012-08-22 | 深圳市心艺来文化有限公司 | Color graphics coding and identifying method |
CN102117419A (en) * | 2011-02-23 | 2011-07-06 | 深圳市融创天下科技发展有限公司 | Method, device, system and terminal equipment for generating and recognizing two-dimension code |
CN103020686A (en) * | 2012-12-14 | 2013-04-03 | 苏州阔地网络科技有限公司 | Method and system for coding two-dimensional code colors |
Also Published As
Publication number | Publication date |
---|---|
CN103310255A (en) | 2013-09-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103310255B (en) | A kind of coding method of color character and its coding/decoding method | |
CN105976004B (en) | A kind of color 2 D code multidimensional information coding, coding/decoding method and device | |
CN105681025B (en) | A kind of safe whitepack implementation method and device of country password standard algorithm SM4 | |
CN101447870B (en) | Safe storage method of private key based on technology of distributed password | |
CN104468090B (en) | Character cipher coding method based on image pixel coordinates | |
CN103778590B (en) | Using digital picture storage and the method and apparatus of transmission information | |
CN104486073B (en) | A kind of encryption and decryption method of character type data | |
CN109525386A (en) | A method of based on the privately owned intersection of Paillier homomorphic cryptography and | |
CN104333446B (en) | A kind of novel ultra-light magnitude QTL block cipher implementation method | |
CN105099712A (en) | Data encryption method based on double-code verification | |
CN104821942B (en) | Face identification method and system | |
CA2754268A1 (en) | Split key secure access system | |
CN101895390B (en) | Method, device and system for encryption and decryption | |
CN101814985B (en) | Block cipher system using multi-chaotic mapping multi-dynamic S-box | |
CN105550570A (en) | Encryption and decryption method and device applied to programmable device | |
CN107798708A (en) | A kind of out of order codings of DNA and the image encryption and decryption method of chaotic maps | |
CN104348625A (en) | Encryption and decryption device and encryption and decryption method thereof | |
CN102761418A (en) | Character compression encrypting method | |
CN105354717A (en) | Colorful commodity anti-counterfeiting code generating method | |
CN104243147B (en) | Symmetric key generation and the secrecy Enhancement Method of distribution based on radio channel characteristic | |
Kumar et al. | A novel approach of symmetric key cryptography | |
CN109218013A (en) | Cover the binary data communication encryption method on plaintext symbol boundary | |
CN109150505A (en) | A kind of information transferring method and device for SAP system | |
Kumar et al. | Image encryption using simplified data encryption standard (S-DES) | |
Tang et al. | A one-time pad encryption algorithm based on one-way hash and conventional block cipher |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171222 Termination date: 20190531 |
|
CF01 | Termination of patent right due to non-payment of annual fee |