CN103310255A - Color character encoding method and decoding method - Google Patents
Color character encoding method and decoding method Download PDFInfo
- Publication number
- CN103310255A CN103310255A CN2013102125524A CN201310212552A CN103310255A CN 103310255 A CN103310255 A CN 103310255A CN 2013102125524 A CN2013102125524 A CN 2013102125524A CN 201310212552 A CN201310212552 A CN 201310212552A CN 103310255 A CN103310255 A CN 103310255A
- Authority
- CN
- China
- Prior art keywords
- color
- coding
- scale
- character
- color character
- 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
Images
Abstract
The invention discloses a color character encoding method and a decoding method which solve the problems of an anti-counterfeiting code technology that the security is low and the appearance effect of a product is affected. The color character encoding method comprises the following steps that (1) N different colors are selected; (2) an N system encoding library is set up and the base of the encoding library is matched with the selected colors; (3) source information is input and converted into an M system code; (4) the M system code is converted into an N system code to obtain corresponding data; (5) the data is substituted through the colors which are matched with the base of the N system encoding library, lined and combined into a color character; and (6) the color character is output. The color character decoding method comprises the following steps that (1) the color character is identified and substituted into the M system code by terminal equipment; (2) the M system code is converted into a Unicode or an ASCII code; and (3) the terminal equipment converts the Unicode or ASCII code into source information and outputs the same. According to the color character encoding method and the decoding method, an anti-counterfeiting code manufacturing method is novel and the security is high.
Description
Technical field
The present invention relates to a kind of coding method and coding/decoding method thereof of color character.
Background technology
Along with socioeconomic progressively development, people are more and more higher to the requirement of physical product, but the thing followed is, increasing fake products also begins to be full of in market, the lawless person therefrom grab a large amount of interests, this has not only affected the reputation of manufacturer, and makes the consumer feel greatly alarmed.
Based on this, many manufacturers begin to add security code in its product, by the checking security code, just can pick out the true and false of product.Yet, existing security code technology, comprise two-dimension code, bar code, colour barcode and cromogram shape code, its technological means that adopts all is that security code is superimposed upon separately on the packing of product, consider from packing of product profile and aesthetic, the design of product and packing should reduce the impact of non-product element as far as possible, and existing security code all need to take independent space in the packing of product, so this has affected the appearance effect of the packing of product to a certain extent.And separately the security code of stack also is easy to be penetrated by the lawless person and carries out counterfeitly, and therefore, existing security code technology is not only unsatisfactory aspect antifalse effect, and it has also caused no small impact to the appearance effect of the packing of product.
Summary of the invention
The object of the present invention is to provide a kind of coding method and coding/decoding method thereof of color character, mainly solve existing security code technology and do not exist security high and affect the problem of product appearance effect.
To achieve these goals, the technical solution used in the present invention is as follows:
A kind of coding method of color character may further comprise the steps:
(1) select the different color of N kind from the RGB color table, N is the natural number more than or equal to 2;
(2) formulate N scale coding storehouse according to the N kind color selected, and the N kind color selected and the radix in this N scale coding storehouse are mated one by one;
(3) in server system input end input source information, and convert thereof into the M scale coding, M is the natural number more than or equal to 2;
(4) the M scale coding is converted to the N scale coding, obtains corresponding data;
(5) according to the data of step (4) gained, color character is replaced and be arranged to form to the color that the radix in utilization and N scale coding storehouse is complementary to these data;
(6) color character is outputed in the product.
Further, described source information is numeral, English alphabet or character string.
For further guaranteeing the safety of source information, before converting source information to the M scale coding, simple encryption algorithm or One-way encryption algorithm thereon also superpose.
Perhaps, before converting source information to the M scale coding, simple encryption algorithm and One-way encryption algorithm thereon successively also superpose.
Specifically, " formulating corresponding N scale coding storehouse according to the N kind color of selecting; the color of selecting is mated one by one with the radix in this N scale coding storehouse " in the described step (2) refers to that server system counts N according to the kind of the color selected and set up the scale coding storehouse that equates with its numerical value, it is N scale coding storehouse, the system transformation rule is observed in this N scale coding storehouse, its radix is 0,1,2 ... (N-1), the color N that selects with season
0, N
1, N
2N
N-1Radix with this N scale coding storehouse mates one by one respectively, i.e. N
0=0, N
1=1, N
2=2 ... N
N-1=N-1.
Specifically, " color character is replaced and be arranged to form to the color that the radix in utilization and N scale coding storehouse is complementary to these data " in the described step (5) refers to the N system number according to the conversion gained, utilizes respectively the color N of coupling
0, N
1, N
2N
N-2Or N
N-1Replace the value 0,1,2 of each numerical digit on this N system number ... (N-2) or (N-1), make this N system number become the color character that is arranged to form according to the number bit sequence of this N system number by the color of corresponding coupling.
On the basis of the above, the present invention also provides the coding/decoding method of this color character, may further comprise the steps:
(1) utilize terminal device to identify in the product and contain the color character of N kind color and it is replaced with the M scale coding, N and M are the natural number more than or equal to 2;
(2) the M scale coding is converted to UNICODE or ASCII coding;
(3) terminal device is source information and with its output with UNICODE or ASCII code conversion.
Specifically, described step (1) may further comprise the steps:
(1a) utilize terminal device and server system to set up communication, and identify the color character that is included in the product;
(1b) color set up according to server system of terminal device and the matched rule between the radix of N scale coding storehouse, the N kind color N that color character is contained
0, N
1, N
2N
N-1Use respectively the N scale coding storehouse radix 0,1,2 that is complementary with it ... (N-1) replace, and rearrange the N scale coding according to putting in order of color character color;
(1c) this N scale coding is converted to the M scale coding.
Further, after the M scale coding being converted to UNICODE or ASCII coding, also adopt simple decipherment algorithm or unidirectional decipherment algorithm that it is decrypted.
Perhaps, after the M scale coding being converted to UNICODE or ASCII coding, also adopt successively unidirectional decipherment algorithm and simple decipherment algorithm that it is decrypted.
Compared with prior art, the present invention has following beneficial effect:
(1) the present invention is skillfully constructed, and principle is simple, and it is convenient to realize.
(2) the present invention utilizes the mode of code conversion, different colors is carried out permutation and combination, and use it for the source information of expression input, then the color after certain in product output assembled arrangement, the user just can identify the expressed source information of color of this place's combination by corresponding terminal device like this, thereby the true and false of checking product, the anti-counterfeiting technology means that the present invention adopts do not need to utilize character to take separately the packaging space of product, but be expressed as security code by the appearance color permutation and combination of product, therefore it can not have influence on the attractive in appearance and layout of product, and because security code of the present invention can be hidden on any position of product (such as product description, producer's sign etc.), therefore the lawless person is difficult to find and penetrate the security code that is arranged in the product, security code production method of the present invention is quite novel, the color character of its output, it namely is security code independently, it is again a part that consists of product appearance packing color, disguise is very good, security is quite high, therefore, the present invention has broken through the restriction of prior art means, realized very large innovation, and significantly improved the security code technology, the invention solves the insoluble problem of prior art, accomplished that really security code and product are integrated, complied with the trend of development in science and technology, it compared with prior art has outstanding substantive distinguishing features and significant progressive.
(3) the present invention is before with source information output, also to its cryptographic algorithm that superposeed, thereby realized the encryption of information, the present invention is by two kinds of different cipher modes, multiple encryption algorithms can superpose, if terminal device is without correct decipherment algorithm, can't obtain correct source information, therefore, the present invention combines Color Scheme and information encryption dexterously, not only further strengthen the anti-counterfeiting of information, guaranteed the safety of information, and adopted the mode of character stack cryptographic algorithm also greatly to strengthen practicality of the present invention.
(4) the present invention is by being engaged in security code technical work senior engineer's research and design for many years, its pointed strong, safe, characteristics that flow process is succinct, having the incomparable advantage of prior art and market development space, and can guarantee the reputation of manufacturer, therefore, the present invention is suitable for applying.
Description of 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 below in conjunction with drawings and Examples, and embodiments of the present invention include but not limited to the following example.
Embodiment 1
The present invention is combined security code to export and decode to obtain a kind of technical scheme of security code with color, as shown in Figure 1, the flow process of its coding is as follows:
(1) select the different color of N kind from the RGB color table, N is the natural number more than or equal to 2, and for ease of identification, the N kind color here can preferentially be selected the larger color of contrast, for example black and white;
(2) formulate N scale coding storehouse according to the N kind color of selecting, and the N kind color selected and the radix in this N scale coding storehouse mated one by one, here the kind that specifically refers to the color that the server system basis is selected is counted the scale coding storehouse that N foundation equates with its numerical value, it is N scale coding storehouse, the system transformation rule is observed in this N scale coding storehouse, its radix is 0,1,2 ... (N-1), the color N that selects with season
0, N
1, N
2N
N-1Radix with this N scale coding storehouse mates one by one respectively, i.e. N
0=0, N
1=1, N
2=2 ... N
N-1=N-1 for example picks out three kinds of colors, and N
0Be black, N
1Be red, N
2Be indigo plant, then set up the three-shift code database, because ternary radix is 0,1,2, therefore, the radix of this three-shift code database just is 0,1,2, so accordingly, and N
0=0, N
1=1, N
2=2, namely deceive=0, red=1, blue=2;
(3) in server system input end input source information, and convert thereof into the M scale coding, M is the natural number more than or equal to 2, be that source information can convert binary coding, three-shift coding, quaternary coding to ... etc., in the present embodiment, the source information of input is numeral, English alphabet or character string;
(4) the M scale coding is converted to the N scale coding, obtains corresponding data;
(5) according to the data of step (4) gained, color character is replaced and be arranged to form to the color that the radix in utilization and N scale coding storehouse is complementary to these data, specifically refers to the N system number according to the conversion gained here, utilizes respectively the color N of coupling
0, N
1, N
2N
N-2Or N
N-1Replace the value 0 of each numerical digit on this N system number, 1,2 ... (N-2) or (N-1), make this N system number become the color character that is arranged to form according to the number bit sequence of this N system number by the color of corresponding coupling, for example we still select black, red, blue three-color, then set up the three-shift code database, the source information of supposing input is tens digit 19, and M=2, then this tens digit 19 just is 10011 after converting scale-of-two to, converting thereof into after the trit just is 201, then according to the color of mating, this trit 201 just can replace with blueness, black, redness, three colors are arranged according to 201 mode and have been consisted of required color character;
(6) color character is outputed in the product, in the present embodiment, the way of output of color character can be for printing, air brushing, print or scribble etc. any one.
After security code was joined product, subscriber terminal equipment need to just can identify by decoding the color character in the product, and as shown in Figure 2, decoding process of the present invention is:
(1) utilizing terminal device to identify in the product contains the color character of N kind color and it is replaced with the M scale coding;
Specifically, this step may further comprise the steps:
(1a) utilize terminal device and server system to set up communication, and identify the color character that is included in the product;
(1b) color set up according to server system of terminal device and the matched rule between the radix of N scale coding storehouse, the N kind color N that color character is contained
0, N
1, N
2N
N-1Use respectively the N scale coding storehouse radix 0,1,2 that is complementary with it ... (N-1) replace, and rearrange the N scale coding according to putting in order of color character color, for example the color alignment of color character is blueness, black, redness, matched rule in the time of so according to coding, the color relation of this color character can replace to three-shift radix 2,0,1, and then the color alignment order according to color character just can form trit 201;
(1c) this N scale coding is converted to the M scale coding;
(2) the M scale coding is converted to UNICODE or ASCII coding;
(3) terminal device is source information and with its output with UNICODE or ASCII code conversion, because terminal device and server system have been set up communication, therefore after the M scale coding being converted to UNICODE or ASCII coding, this terminal device just can be converted into source information according to the server system canned data.
Be convenient understanding technical scheme of the present invention, the below comes the implementation procedure of the present embodiment is set forth with several examples.
With scale-of-two and the ternary example that is converted to, even N=3, M=2, and the M scale coding in the present embodiment is 8 bit code forms.At first, from the RGB color table, pick out black, red, blue three-color, then formulate a code database according to the color of selecting, because N=3, so this code database is the three-shift code database, and the color selected and the radix in the three-shift code database are mated, even: deceive=0, red=1, blue=2.
Supposing needs to select four characters to be used for painted composition color character security code in the packing of product, according to selected color and numerical value definition and standard code regulation, just can represent tens digit 0-80 after these four characters are painted so, amounts to 81 numbers.Further, if the source information content of input is tens digit 29, above-mentioned mentioning, M scale coding in the present embodiment is 8 bit code forms, so the data that are converted into behind the M scale coding (being binary coding) just are 00011101, then be converted to again N system number (being trit), owing to having selected four characters, therefore this trit is 4 three-shift forms, data after the conversion just are 1002, according to matched rule, it is red that the color sequences that these four characters are corresponding just is respectively, black, black, blue, the color character that outputs on the product by output device at last is to be constituted by these four corresponding color alignment of character, and namely the color alignment of this color character sequentially is red, black, black, blue.
In like manner, if the source information content of input is tens digit 57, then being converted to behind the binary number is 00111001, converting to after the trit is 2010 again, then accordingly, four color sequences corresponding to character just are respectively blueness, black, redness, black, and the color character that outputs at last on the product is to be constituted by these four corresponding color alignment of character, and namely the color alignment of this color character sequentially is blueness, black, redness, black.
The decode procedure of above-mentioned two examples is in full accord, the color that the terminal device basis is selected and the matched rule of three-shift code database put in order the color in the color character one by one and replace with trit according to it, order such as the color character color alignment is red, black, black, blue, be 1002 after replacing with so trit, then the trit after will changing is converted to binary number 00011101, and then convert thereof into UNICODE or ASCII coding, information according to server system can obtain source information content 29 with this UNICODE or ASCII code conversion at last, other the like.
Embodiment 2
Shown in Fig. 3,4, be with the difference of embodiment 1, embodiment 1 is coding and the output of non-encrypted source information, the present embodiment then is before converting source information to the M scale coding, One-way encryption algorithm (for example MD5 One-way encryption algorithm or secondary MD5 One-way encryption algorithm) thereon also superposes, and when decoding, after the M scale coding being converted to UNICODE or ASCII coding, also adopt unidirectional decipherment algorithm that it is decrypted, and then being converted to source information, the coding of whole source information and output all are in the state of encryption and decryption.The present embodiment is set forth encryption and the decrypting process of the present embodiment take secondary MD5 One-way encryption algorithm as example:
With scale-of-two and the ternary example that is converted to, even M=2, N=3 selects black, red, blue three-color, then sets up the three-shift code database, and order: deceive=0, red=1, blue=2.
Suppose that needing the source information of coding is hexadecimal string 20130522, and prescribed product is packed and is included four colors in the character, after with this source information input, rule according to secondary MD5 One-way encryption algorithm at first converts thereof into secondary ciphertext 408B6B4A376A688A, simultaneously set up a corresponding source document-ciphertext contrast relationship table at server system, obtain source information so that the later stage can decipher.After character string is converted to the secondary ciphertext, again this secondary ciphertext is converted to binary number: 00,110,100,001,100,000,011,100,001,000,010,001,101,100,100,001,000,110,100 01,000,001,001,100,110,011,011,100,110,110,010,000,010,011,011,000,111,000 0011100001000001, then again this binary data is converted to trit, trit after the conversion is: 12,211,210,200,221,102,000,211,012,212,102,122,020,012,000,210,220,002,002 20022102, owing to including four colors in a character, therefore at last the color character of exporting at product is to be rearranged by 16 character sequences, the putting in order as red blue red of its color combination, red blue red-black, blue-black is black blue, blue red black, blue-black is black, blue red black, red blue red, blue red-black blue, red blue black, blue-black is dark red, blue-black is black, blue red-black red, blue-black is black, blue-black is black blue, blue-black is black blue, blue red-black blue.
The present embodiment is One-way encryption algorithm because coding time has superposeed, therefore, in terminal device and server system communication and when decoding, it needs by corresponding decipherment algorithm the data after changing to be decrypted first, then just can obtain correct source information content, otherwise what obtain after the terminal device decoding will be a pile mess code, rather than correct security code.The present embodiment is when decoding, terminal device is same to replace with trit with the color in the color character one by one according to the color of selecting and the matched rule of three-shift code database radix first according to putting in order, be about to color alignment red blue red, red blue red-black, blue-black is black blue, blue red black, blue-black is black, blue red black, red blue red, blue red-black blue, red blue black, blue-black is dark red, blue-black is black, blue red-black red, blue-black is black, blue-black is black blue, blue-black is black blue, blue red-black indigo plant replaces with trit: 12,211,210,200,221,102,000,211,012,212,102,122,020,012,000,210,220,002,002 20022102, then convert thereof into again dyadic number, this binary number just is: 00,110,100,001,100,000,011,100,001,000,010,001,101,100,100,001,000,110,100 01,000,001,001,100,110,011,011,100,110,110,010,000,010,011,011,000,111,000 0011100001000001, then utilize unidirectional decipherment algorithm according to before the source document set up of high in the clouds-ciphertext contrast relationship table one by one this binary number is decrypted, obtain secondary ciphertext 408B6B4A376A688A, and then be converted into UNICODE or ASCII coding, can obtain source information content 20130522, the additive process of the cryptographic algorithm of other types and the additive process of the present embodiment are similar.Because the source document in the present embodiment-ciphertext contrast relationship table is random the generation along with the generation of secondary ciphertext, therefore it has uniqueness, source document-ciphertext contrast relationship table according to other can't be deciphered at all and obtain secondary ciphertext 408B6B4A376A688A, and then also just can't decode and obtain source information 20130522, so its confidentiality is very high.
Embodiment 3
Such as Fig. 5, shown in 6, be with the difference of embodiment 1, embodiment 1 is coding and the output of non-encrypted source information, the present embodiment then is before converting source information to the M scale coding, also superposeing thereon, (for example dictionary is changed cryptographic algorithm to the simple encryption algorithm, N system displacement cryptographic algorithm, N system bit map cryptographic algorithm, the character offset cryptographic algorithm, logical OR transposition encryption algorithm, logical and transposition encryption algorithm, logic XOR transposition encryption algorithm or four fundamental rules hybrid operation transposition encryption algorithm), and when decoding, after the M scale coding being converted to UNICODE or ASCII coding, also adopt simple decipherment algorithm that it is decrypted.The present embodiment is set forth encryption and the decrypting process of the present embodiment take the character offset cryptographic algorithm as example:
With scale-of-two and the ternary example that is converted to, M=2, N=3 selects black, red, blue three-color, then sets up the three-shift code database, and order: deceive=0, red=1, blue=2.
Suppose that needing the source information of coding is hexadecimal string 20130522, and prescribed product packs a character and is built-in with four colors, before converting source information to binary coding at first to its overlaying character displacement cryptographic algorithm.The displacement mode of the character offset cryptographic algorithm that the present embodiment adopts is to move from left to right 1 character, the ciphertext that obtains behind the character offset is 22013052, convert this ciphertext to binary number: 00,110,010,001,100,100,011,000,000,110,001,001,100,110,011,000,000,110,101 00110010, then should organize binary number is converted to trit again, trit after the conversion is: 12121212121012111220121012221212, owing to including four colors in a character, therefore the color character of exporting at product at last is to be rearranged by eight character sequences, and putting in order of its color combination is the red indigo plant of red indigo plant, the red indigo plant of red indigo plant, red blue red-black, red indigo plant is red, red blue black, red blue red-black, red blue indigo plant, the red indigo plant of red indigo plant.
The present embodiment is cryptographic algorithm because coding time has superposeed, therefore, in terminal device and server system communication and when decoding, it needs by corresponding decipherment algorithm the data after changing to be decrypted first, then just can obtain correct source information content, otherwise what obtain after the terminal device decoding will be a pile mess code, rather than correct security code.The present embodiment is when decoding, what adopt is the mode of oppositely decoding, namely first according to the color of selecting and the matched rule of three-shift code database radix, color alignment with the color character on the product: the red indigo plant of red indigo plant, the red indigo plant of red indigo plant, red blue red-black, red indigo plant is red, red blue black, red blue red-black, red blue indigo plant, the red indigo plant of red indigo plant replaces with trit 12121212121012111220121012221212, then be converted into again binary number, the binary number of conversion is: 00,110,010,001,100,100,011,000,000,110,001,001,100,110,011,000,000,110,101 00110010, and then be converted to UNICODE or ASCII coding, then again it is converted to character string 22013052, utilize at last the character offset decipherment algorithm that it is shifted, can obtain source information content 20130522, the additive process of the cryptographic algorithm of other types and the present embodiment similar.If the counterfeiter wants to crack the source information of the present embodiment, which kind of cryptographic algorithm what at first he must know the present embodiment employing is, secondly, even if what he understood the present embodiment employing is the character offset cryptographic algorithm, he also must know this character offset cryptographic algorithm is to have adopted which kind of character offset mode, the counterfeiter could crack the source information content after must knowing simultaneously above-mentioned dual mode and regulation, and its difficulty is very large, so the confidentiality of source information also is very high in the present embodiment.
Embodiment 4
The present embodiment is the combination of embodiment 2 and embodiment 3, and namely in encryption link of the present invention, One-way encryption algorithm and simple encryption algorithm in order can superpose.The present embodiment is take successively overlaying character displacement cryptographic algorithm and secondary MD5 One-way encryption algorithm as example, implementation to the present embodiment is set forth, as shown in Figure 7, the kind number of the color that the present embodiment is selected, color is all identical with above-mentioned several embodiment with matched rule, the source information of input is hexadecimal string 01305222, at first be overlaying character displacement cryptographic algorithm, the character offset mode is to move from left to right 1 character, is 20130522 after the displacement.It then is stack secondary MD5 One-way encryption algorithm, rule according to secondary MD5 One-way encryption algorithm converts thereof into the secondary ciphertext, the secondary ciphertext of this conversion is 408B6B4A376A688A, sets up a corresponding source document-ciphertext contrast relationship table at server system simultaneously.After character conversion is ciphertext, be converted into again binary number, be: 00,110,100,001,100,000,011,100,001,000,010,001,101,100,100,001,000,110,100 01,000,001,001,100,110,011,011,100,110,110,010,000,010,011,011,000,111,000 0011100001000001, then again this binary number is converted to trit, trit after the conversion just is: 12,211,210,200,221,102,000,211,012,212,102,122,020,012,000,210,220,002,002 20022102, the color combination of the color character of exporting at product at last accordingly, puts in order just for red blue red, red blue red-black, blue-black is black blue, blue red black, blue-black is black, blue red black, red blue red, blue red-black blue, red blue black, blue-black is dark red, blue-black is black, blue red-black red, blue-black is black, blue-black is black blue, blue-black is black blue, blue red-black blue.
As shown in Figure 8, when decoding, according to the color of selecting and the matched rule of three-shift code database radix color is replaced with trit first, the trit that this replacement obtains is: 12,211,210,200,221,102,000,211,012,212,102,122,020,012,000,210,220,002,002 20022102, then be converted into binary coding, binary number after this conversion is 00,110,100,001,100,000,011,100,001,000,010,001,101,100,100,001,000,110,100 01,000,001,001,100,110,011,011,100,110,110,010,000,010,011,011,000,111,000 0011100001000001, rule according to the unidirectional decipherment algorithm of secondary MD5 converts thereof into secondary ciphertext 408B6B4A376A688A, then convert thereof into character string 20130522 according to the source document of setting up before-ciphertext contrast relationship table, recycle at last the character offset decipherment algorithm it is deciphered, namely decodable code obtains source information content 01305222.Additive process and the present embodiment of the multiple encryption algorithms of other types are similar.
The encryption and decryption process of the source information among the present invention superposes according to actual conditions, the cryptographic algorithm of above-mentioned several embodiment all is to superpose before converting source information to binary coding, the cryptographic algorithm that in fact superposes also can be to superpose after converting source information to binary coding again, such as after converting source information to binary coding, (for example dictionary is changed cryptographic algorithm to its stack simple encryption algorithm, N system displacement cryptographic algorithm, N system bit map cryptographic algorithm, the character offset cryptographic algorithm, logical OR transposition encryption algorithm, logical and transposition encryption algorithm, logic XOR transposition encryption algorithm or four fundamental rules hybrid operation transposition encryption algorithm), or symmetric encipherment algorithm (des encryption algorithm for example, the TripleDES cryptographic algorithm, the RC2 cryptographic algorithm, the RC4 cryptographic algorithm, RC5 cryptographic algorithm or Blowfish cryptographic algorithm), or rivest, shamir, adelman (RSA cryptographic algorithms for example, the Elgamal cryptographic algorithm, knapsack algorithm, the Rabin cryptographic algorithm, D-H cryptographic algorithm or ECC elliptic curve encryption algorithm), or compression algorithm (dictionary algorithm for example, the regular length algorithm, the LZ77 algorithm, lzw algorithm, the Huffman encoding algorithm, arithmetic coding algorithm or Golomb coding algorithm), determine according to the encryption rule of cryptographic algorithm itself opportunity of stack.And when decoding, before the M scale coding being converted to UNICODE or ASCII coding, adopting corresponding simple decipherment algorithm, symmetrical decipherment algorithm, asymmetric decipherment algorithm or compression decipherment algorithm that it is decrypted is that decodable code obtains source information.The present invention introduces the process that source information is converted to the cryptographic algorithm that superposes after the binary coding no longer in detail, does not also introduce in detail its decode procedure.
According to above-described embodiment, just can realize well the present invention.What deserves to be explained is; example selected in the embodiments of the invention is only just in order to set forth implementation process of the present invention; under the prerequisite based on above-mentioned design; for solving same technical matters or relying on body design thought of the present invention to carry out among a small circle change or polishing; it still adopts design concept of the present invention substantially in form; and the essence of the technical scheme that adopts is still consistent with the present invention, also should be in protection scope of the present invention.
Claims (10)
1. the coding method of a color character is characterized in that, may further comprise the steps:
(1) select the different color of N kind from the RGB color table, N is the natural number more than or equal to 2;
(2) formulate N scale coding storehouse according to the N kind color selected, and the N kind color selected and the radix in this N scale coding storehouse are mated one by one;
(3) in server system input end input source information, and convert thereof into the M scale coding, M is the natural number more than or equal to 2;
(4) the M scale coding is converted to the N scale coding, obtains corresponding data;
(5) according to the data of step (4) gained, color character is replaced and be arranged to form to the color that the radix in utilization and N scale coding storehouse is complementary to these data;
(6) color character is outputed in the product.
2. the coding method of a kind of color character according to claim 1 is characterized in that, described source information is numeral, English alphabet or character string.
3. the coding method of a kind of color character according to claim 2 is characterized in that, before converting source information to the M scale coding, simple encryption algorithm or One-way encryption algorithm thereon also superpose.
4. the coding method of a kind of color character according to claim 2 is characterized in that, before converting source information to the M scale coding, simple encryption algorithm and One-way encryption algorithm thereon successively also superpose.
5. according to claim 2~4 coding method of each described a kind of color character, it is characterized in that, " formulating corresponding N scale coding storehouse according to the N kind color of selecting; the color of selecting is mated one by one with the radix in this N scale coding storehouse " in the described step (2) refers to that server system counts N according to the kind of the color selected and set up the scale coding storehouse that equates with its numerical value, it is N scale coding storehouse, the system transformation rule is observed in this N scale coding storehouse, its radix is 0,1,2 ... (N-1), the color N that selects with season
0, N
1, N
2N
N-1Radix with this N scale coding storehouse mates one by one respectively, i.e. N
0=0, N
1=1, N
2=2 ... N
N-1=N-1.
6. the coding method of a kind of color character according to claim 5, it is characterized in that, " color character is replaced and be arranged to form to the color that the radix in utilization and N scale coding storehouse is complementary to these data " in the described step (5) refers to the N system number according to the conversion gained, utilizes respectively the color N of coupling
0, N
1, N
2N
N-2Or N
N-1Replace the value 0,1,2 of each numerical digit on this N system number ... (N-2) or (N-1), make this N system number become the color character that is arranged to form according to the number bit sequence of this N system number by the color of corresponding coupling.
7. the coding/decoding method of a color character is characterized in that, may further comprise the steps:
(1) utilize terminal device to identify in the product and contain the color character of N kind color and it is replaced with the M scale coding, N and M are the natural number more than or equal to 2;
(2) the M scale coding is converted to UNICODE or ASCII coding;
(3) terminal device is source information and with its output with UNICODE or ASCII code conversion.
8. the coding/decoding method of a kind of color character according to claim 7 is characterized in that, described step (1) may further comprise the steps:
(1a) utilize terminal device and server system to set up communication, and identify the color character that is included in the product;
(1b) color set up according to server system of terminal device and the matched rule between the radix of N scale coding storehouse, the N kind color N that color character is contained
0, N
1, N
2N
N-1Use respectively the N scale coding storehouse radix 0,1,2 that is complementary with it ... (N-1) replace, and rearrange the N scale coding according to putting in order of color character color;
(1c) this N scale coding is converted to the M scale coding.
9. the coding/decoding method of a kind of color character according to claim 8 is characterized in that, after the M scale coding being converted to UNICODE or ASCII coding, also adopts simple decipherment algorithm or unidirectional decipherment algorithm that it is decrypted.
10. the coding/decoding method of a kind of color character according to claim 8 is characterized in that, after the M scale coding being converted to UNICODE or ASCII coding, also adopts successively unidirectional decipherment algorithm and simple decipherment algorithm that it is decrypted.
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 true CN103310255A (en) | 2013-09-18 |
CN103310255B 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) |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103778693A (en) * | 2013-10-26 | 2014-05-07 | 沈孔辉 | Coded lock system capable of being unlocked by mobile phone light |
CN105354717A (en) * | 2015-11-30 | 2016-02-24 | 南通大学 | Colorful commodity anti-counterfeiting code generating method |
CN107294844A (en) * | 2017-08-21 | 2017-10-24 | 武汉斗鱼网络科技有限公司 | Message display method and device |
CN107463542A (en) * | 2017-08-08 | 2017-12-12 | 郭铮铮 | A kind of method that binary number is represented using ASCII printable characters |
WO2018011815A1 (en) * | 2016-07-14 | 2018-01-18 | Hewlett-Packard Development Company, L.P. | Wireless data communication |
CN108108267A (en) * | 2016-11-25 | 2018-06-01 | 北京国双科技有限公司 | The restoration methods and device of data |
CN108416405A (en) * | 2018-03-12 | 2018-08-17 | 北京知道创宇信息技术有限公司 | 2 D code verification method and system |
CN108629391A (en) * | 2018-05-10 | 2018-10-09 | 佛山市博知盾识科技有限公司 | Color code 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 |
CN110348554A (en) * | 2019-07-17 | 2019-10-18 | 北京迈格威科技有限公司 | Digital information decoding method, device, electronic equipment and storage medium |
CN110609985A (en) * | 2019-09-24 | 2019-12-24 | 南京环印防伪科技有限公司 | Character sequence-based coding method |
US10621688B2 (en) | 2015-01-30 | 2020-04-14 | Hewlett-Packard Development Company, L.P. | M-ary cyclic coding |
WO2020082384A1 (en) * | 2018-10-26 | 2020-04-30 | 合刃科技(深圳)有限公司 | Spectral anti-counterfeiting identification system, and methods for preparing and decoding spectral anti-counterfeiting code |
CN111382820A (en) * | 2020-02-25 | 2020-07-07 | 南通大学 | Four-lattice pure-color commodity anti-counterfeiting code generation method |
CN111638978A (en) * | 2020-05-20 | 2020-09-08 | 北京达佳互联信息技术有限公司 | Content sharing method and device |
CN115994773A (en) * | 2023-02-27 | 2023-04-21 | 山东丰茂源认证服务有限公司 | Pharmaceutical product anti-counterfeiting and traceability management system based on blockchain |
CN117315808A (en) * | 2023-11-28 | 2023-12-29 | 成都博瑞科传科技有限公司 | Portable water quality inspection instrument based on data integrity verification and acquisition method |
Citations (5)
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 |
US20070125861A1 (en) * | 2000-05-04 | 2007-06-07 | Telxon Corporation | Three dimensional barcode |
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 |
-
2013
- 2013-05-31 CN CN201310212552.4A patent/CN103310255B/en not_active Expired - Fee Related
Patent Citations (5)
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 |
US20070125861A1 (en) * | 2000-05-04 | 2007-06-07 | Telxon Corporation | Three dimensional barcode |
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 |
Cited By (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103778693B (en) * | 2013-10-26 | 2016-06-08 | 杭州追猎科技有限公司 | The coding lock system that a kind of mobile phone light is unblanked |
CN105913515A (en) * | 2013-10-26 | 2016-08-31 | 沈孔辉 | Mobile phone light unlocking cipher lock system with alarm function |
CN105913515B (en) * | 2013-10-26 | 2017-12-26 | 新昌县华明轴承有限公司 | A kind of coding lock system unlocked with warning function mobile phone light |
CN103778693A (en) * | 2013-10-26 | 2014-05-07 | 沈孔辉 | Coded lock system capable of being unlocked by mobile phone light |
US10891704B2 (en) | 2015-01-30 | 2021-01-12 | Hewlett-Packard Development Company, L.P. | M-ary cyclic coding |
US10621688B2 (en) | 2015-01-30 | 2020-04-14 | Hewlett-Packard Development Company, L.P. | M-ary cyclic coding |
CN105354717B (en) * | 2015-11-30 | 2019-02-22 | 南通大学 | A kind of colour commodity counterfeit prevention code generating method |
CN105354717A (en) * | 2015-11-30 | 2016-02-24 | 南通大学 | Colorful commodity anti-counterfeiting 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 |
WO2018011815A1 (en) * | 2016-07-14 | 2018-01-18 | Hewlett-Packard Development Company, L.P. | Wireless data communication |
CN108108267A (en) * | 2016-11-25 | 2018-06-01 | 北京国双科技有限公司 | The restoration methods and device of 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 |
CN107463542A (en) * | 2017-08-08 | 2017-12-12 | 郭铮铮 | A kind of method that binary number is represented using ASCII printable characters |
CN107294844B (en) * | 2017-08-21 | 2020-08-04 | 武汉斗鱼网络科技有限公司 | Message display method and device |
CN107294844A (en) * | 2017-08-21 | 2017-10-24 | 武汉斗鱼网络科技有限公司 | Message display method and device |
CN108416405A (en) * | 2018-03-12 | 2018-08-17 | 北京知道创宇信息技术有限公司 | 2 D code verification method and system |
CN108629391A (en) * | 2018-05-10 | 2018-10-09 | 佛山市博知盾识科技有限公司 | Color code decoding method, system and equipment |
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 |
WO2020082384A1 (en) * | 2018-10-26 | 2020-04-30 | 合刃科技(深圳)有限公司 | Spectral anti-counterfeiting identification system, and methods for preparing and decoding spectral anti-counterfeiting code |
CN110348554A (en) * | 2019-07-17 | 2019-10-18 | 北京迈格威科技有限公司 | Digital information decoding method, device, electronic equipment and storage medium |
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 |
CN111382820A (en) * | 2020-02-25 | 2020-07-07 | 南通大学 | Four-lattice pure-color commodity anti-counterfeiting code generation method |
CN111382820B (en) * | 2020-02-25 | 2021-10-12 | 南通大学 | Four-lattice pure-color commodity anti-counterfeiting code generation method |
CN111638978A (en) * | 2020-05-20 | 2020-09-08 | 北京达佳互联信息技术有限公司 | Content sharing method and device |
CN111638978B (en) * | 2020-05-20 | 2023-11-14 | 北京达佳互联信息技术有限公司 | Content sharing method and device |
CN115994773A (en) * | 2023-02-27 | 2023-04-21 | 山东丰茂源认证服务有限公司 | Pharmaceutical product anti-counterfeiting and traceability management system based on blockchain |
CN117315808A (en) * | 2023-11-28 | 2023-12-29 | 成都博瑞科传科技有限公司 | Portable water quality inspection instrument based on data integrity verification and acquisition method |
CN117315808B (en) * | 2023-11-28 | 2024-02-13 | 成都博瑞科传科技有限公司 | Portable water quality inspection instrument based on data integrity verification and acquisition method |
Also Published As
Publication number | Publication date |
---|---|
CN103310255B (en) | 2017-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103310255A (en) | Color character encoding method and decoding method | |
CN109284803B (en) | Commodity anti-counterfeiting two-dimensional code generation method | |
CN109472338B (en) | Batch generation method of commodity anti-counterfeiting two-dimensional codes | |
CN103778590B (en) | Using digital picture storage and the method and apparatus of transmission information | |
CN105976004A (en) | Color two-dimensional code multi-dimensional information encoding and decoding methods and devices | |
CN101662636B (en) | Safe high-speed differential serial interface | |
CN104486073A (en) | Encryption and decryption method of character data | |
CN104680220A (en) | Commodity anti-counterfeiting code batch generation method | |
CN115085924B (en) | Computer information transmission encryption system based on Huffman coding | |
CN103095449B (en) | A kind of dynamic encryption decryption method based on stream cipher | |
CN105099712A (en) | Data encryption method based on double-code verification | |
CN104821942B (en) | Face identification method and system | |
CN101895390B (en) | Method, device and system for encryption and decryption | |
CN101814985B (en) | Block cipher system using multi-chaotic mapping multi-dynamic S-box | |
CN105354717A (en) | Colorful commodity anti-counterfeiting code generating method | |
CN104657871A (en) | Generation method of commodity anti-counterfeiting code | |
CN112163230B (en) | Commodity anti-counterfeiting code generation method based on Chinese character encryption | |
CN102982724A (en) | Anti-counterfeiting method based on fabric weave | |
CN112149774B (en) | Chinese character commodity anti-counterfeiting code generation method | |
CN104348625A (en) | Encryption and decryption device and encryption and decryption method thereof | |
CN104868995B (en) | Coding convention controls formula authenticating method and coding convention controls formula enciphered method | |
CN112149773A (en) | Commodity anti-counterfeiting code generation method based on Chinese character encryption | |
CN109218013A (en) | Cover the binary data communication encryption method on plaintext symbol boundary | |
CN104243147B (en) | Symmetric key generation and the secrecy Enhancement Method of distribution based on radio channel characteristic | |
CN104598801A (en) | Dynamic two-dimension code generation method based on algorithm reconstruction |
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 |