CN100479331C - Bar-code decoding method - Google Patents

Bar-code decoding method Download PDF

Info

Publication number
CN100479331C
CN100479331C CNB2004100320523A CN200410032052A CN100479331C CN 100479331 C CN100479331 C CN 100479331C CN B2004100320523 A CNB2004100320523 A CN B2004100320523A CN 200410032052 A CN200410032052 A CN 200410032052A CN 100479331 C CN100479331 C CN 100479331C
Authority
CN
China
Prior art keywords
bar code
character
identifier
standard
type
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 - Lifetime
Application number
CNB2004100320523A
Other languages
Chinese (zh)
Other versions
CN1677872A (en
Inventor
成晓华
范新运
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netac Technology Co Ltd
Original Assignee
Netac Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netac Technology Co Ltd filed Critical Netac Technology Co Ltd
Priority to CNB2004100320523A priority Critical patent/CN100479331C/en
Publication of CN1677872A publication Critical patent/CN1677872A/en
Application granted granted Critical
Publication of CN100479331C publication Critical patent/CN100479331C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

The method includes following steps: decoding bar code into character string according to standard of bar code; reading and recognizing identifier in the character string; based on result of recognizing identifier, decoding field in character string corresponding to the identifier into original information. The invention decodes bar code into original information rapidly, directly and effectively. The bar code technique is suitable to wider range and more areas.

Description

The coding/decoding method of bar code
Technical field
The present invention relates to a kind of bar code decoding method, relate to a kind of different types of spoken and written languages list separator that has particularly, and carry out the method for corresponding bar code decoding according to corresponding separator.
Background technology
Along with fast development of computer technology, and the extensive use of barcode technology, a large amount of information all uses bar code to work out, as various personal information, product information, publication information etc.Existing barcode encoding technology is according to the bar code standard, and the character string that the bar code standard character is formed is the process of bar code information according to the bar code normative translation, is called once coding.
According to existing barcode technology, the standard character collection of most of bar code standards itself only comprises numeral, only has minority can comprise English alphabet and numeral, for example 39 yards and 128 yards.All bar code standards all can not other spoken and written languages of direct representation, for example Chinese, Japanese, German, roman character etc.Therefore, the information that existing bar code can comprise is abundant inadequately, has limited the range of application and the function of barcode technology greatly.
At present, occurred with certain spoken and written languages for example Chinese character information weave into the method for bar code, it is one group of character or numeral that Chinese character is compiled by Chinese character encoding standard (for example GB, the four-corner system or self-defining standard etc.).This group character or numeral are taken from the standard character collection of certain bar code standard.Should organize character or numeral again and be bar code, Chinese character information can be stored in the bar code according to bar code standard volume.Use with it that corresponding decoding method can be visual and understandable spoken and written languages with bar code decoding, greatly the application function of spreading bar-code and range of application.But this method only can be represented a kind of spoken and written languages in one group of bar code, if mix multilingual literal and numerical chracter in the passage, then can't adopt above-mentioned coding-decoding method.
Addressed the above problem two kinds of approach: first kind of approach is that corresponding every kind of spoken and written languages redefine a kind of bar code standard, makes its bar code character corresponding one by one with symbols such as spoken and written languages, English alphabet, numerals; Second kind of approach is on the basis of existing bar code standard, and the raw information that comprises the multilingual literal is carried out secondary coding, and raw information is compiled the character string of forming for by the bar code standard character, the bar code standard characters compiled by once encoding to be bar code again.Comparatively speaking, first kind of approach is less feasible, is example with the Chinese character, and Chinese characters in common use just have more than 3,000, and the workload that defines the bar code character of this quantity and unique identification character is too big.Therefore, it is more feasible by contrast that second method promptly adopts the method for secondary coding.But the method to this employing secondary coding-decoding does not also have realistic plan to occur at present.
Summary of the invention
The present invention proposes with regard to being based on above-mentioned background.Therefore, the purpose of this invention is to provide a kind of bar code
Coding/decoding method comprises: is character string according to the bar code standard with bar code decoding;
Read and discern the identifier in the described character string, described identifier includes the information of the character types of field in the raw information, also comprise the field length information of described character types, and be arranged on described raw information by the front end of the character string after once encoding, wherein:
Discern the bar code blank character between the different bar code sections, utilize with described bar code section corresponding bar code standard described bar code section is decoded,
After reading described identifier, whether the type of discerning this identifier is described first type or second type,
When judging that described identifier is first type, according to the represented type of this first type of identifier to corresponding field decoding,
When judging that described identifier is second type, according to the field length of the represented type of this second type of identifier and the type to corresponding field decoding; And
According to recognition result to described identifier, to be raw information with the corresponding field decoding of this identifier in the described character string, and when carrying out the decoding of described respective field, utilize i and j counting mode, in conjunction with the described field length information in the described identifier, finish judgement to described field length.。
Bar code decoding method provided by the present invention comprises: is corresponding character string according to the bar code standard with bar code decoding; Read and discern the identifier in the described character string; With according to the identification of described identifier, will be raw information with the corresponding field decoding of this identifier in the described character string.
Include the information of the character types of field in the described raw information of expression in the above-mentioned identifier, be arranged on before its corresponding field.
Above-mentioned identifier also can both include the information of the character types of field in the described raw information, also comprised the character quantity information in the field of described character types, and was arranged on described raw information by the field behind the coding once foremost.
The identifier of first field of described raw information can be default.
Further, described bar code can comprise the bar code section by multiple bar code standard code, and is provided with the identifier of the bar code standard of the described bar code section of sign before described bar code section.In this case, described coding/decoding method comprises, discerns the identifier of the preceding expression of described bar code section bar code standard, utilizes with described identifier corresponding bar code standard described bar code section is decoded.
For passing through to separate different types of spoken and written languages symbol, and add corresponding identifier and the novel bar code that forms, adopt said method of the present invention, can decode the raw information of bar code rapidly, directly, effectively, thereby make barcode technology go for wider scope and more field.
Description of drawings
Fig. 1 is the flow chart of the coding method during according to a kind of set-up mode of employing identifier-location of the present invention;
Fig. 2 is the flow chart of the coding/decoding method during according to the above-mentioned set-up mode of employing identifier-location of the present invention;
Fig. 3 is the flow chart of the coding method during according to the another kind of set-up mode of employing identifier-location of the present invention;
Fig. 4 is the flow chart of the coding/decoding method during according to the above-mentioned set-up mode of employing identifier-location of the present invention;
Fig. 5 is the flow chart that the coded system to different is according to one embodiment of the present invention discerned;
Fig. 6 (a)-(e) is respectively the schematic diagram of bar code that the method according to this invention obtained and corresponding information thereof.
Embodiment
Below in conjunction with description of drawings specific embodiments of the present invention.
A main thought of the present invention is, when information is encoded, by using one or more bar code mark symbols, to separate corresponding to the symbol of different coding standard (for example different spoken and written languages) in one group of bar code, bar code mark symbol is placed on before the field of corresponding language letter symbol, expression accords with the coding standard type that character string adopted before to next bar code mark after this bar code mark symbol, be implemented in the symbol that comprises multiple coding standard in one group of bar code with this, to express the multilingual Word message.
To illustrate that at first what obtain once decoding according to the bar code standard of routine can be numeric string (for example for intersecting Biquinary Code) or numeral and some specific characters (for example for 128 yards).In this specification, these results that obtain after will once decoding to bar code according to the bar code standard are called " character string " uniformly.
According to the actual bar code standard difference of selecting for use, the definition of bar code mark symbol has two kinds of methods: so first kind of bar code standard less to some " standard character collection ", itself can't represent more character.Whether in this case, every kind of character, symbol are defined a bar code mark symbol respectively, be " standard character " of this bar code and do not distinguish character.
For example for the Biquinary Code of reporting to the leadship after accomplishing a task, its standard character only has 10 numerals such as 0~9 grade.Therefore can define the bar code mark symbol respectively to multiple characters such as numeral, English, Chinese, punctuates respectively.
Another kind is that bar code standard self " standard character collection " is bigger, can represent more character, need not carry out extra coding.Can treat with a certain discrimination standard/non-standard character this, a bar code mark symbol sign all " standard characters " only is set, and accord with the character that identifies respectively in non-" standard character collection " such as Chinese, German, Japaneses with other bar code marks.
With 128 bar code standards is example: the initial symbol of standard definition has three kinds of StartA, StartB, StartC, respectively corresponding three kinds of character set.Utilize three kinds of character set can represent the alphabet that ascii character-set and expansion ascii character are concentrated altogether." standard character collection " is bigger owing to being somebody's turn to do, can represent multiple English, numeral and punctuation character, only need " standard character " bar code mark symbol of definition, sign all " standard characters ", the bar code mark symbol that defines various " non-standard characters " more respectively gets final product.
According to the difference of bar code standard, the value of bar code mark symbol also can adopt dual mode: first kind is to utilize spcial character, the reserved characters in the bar code " standard character collection " or the character that is of little use uses as the bar code mark symbol.The advantage of this mode is not need self-defined bar code mark symbol, and all characters in the bar code all meet the bar code standard.But its shortcoming is if itself just contain these spcial character or characters that is of little use as the bar code mark symbol in the information that bar code will be represented, then can cause the confusion of Code And Decode.
The second way is according to the bar code standard, the spcial character that does not have in more self-defined " standard character collection ".The standard character collection is all characters that the bar code standard can be represented, generally comprises two kinds of spcial character (as bar code first symbol, end mark or blank character etc.) and common characters.Common character generally all is the character in the ASCII character, and corresponding ASCII character is arranged; Spcial character just may not have corresponding A SCII sign indicating number.According to bar code standard difference, the concrete character that comprises in the character set also may be different.The advantage of this mode is that span is bigger, and is more flexible, and its shortcoming is that these self-defining spcial characters do not have corresponding ASCII character, and part bar code standard is not supported the definition to these spcial characters.
The value and the define method of bar code mark symbol need be used in combination according to concrete bar code standard.For example, use " standard character " of 128 yards standards: "+", "-", "/", " # ", " % ", “ ﹠amp; ", " * " as the value of bar code mark symbol, one of them value sign " standard character ", all the other a plurality of values identify " non-standard characters " such as Chinese, Japanese, Korean, German, French, Greece and roman characters respectively; Also can not distinguish standard/non-standard character, each value identifies English, numeral, punctuation mark, Chinese, Japanese, Korean, German respectively.
And for example, during employing three nine-day periods after the winter solstice sign indicating number standard, can be used as the value that bar code mark accords with by self-defined a plurality of spcial characters, the corresponding bar code mark symbol of each spcial character.The bar code mark symbol can be distinguished bar code " standard character " and other all kinds of non-standard characters; Can not distinguish standard/non-standard character with top the same yet.
Below illustrate according to the present invention, utilize the bar code mark symbol to realize mixing in one group of bar code the specific coding flow process and the decode procedure of multilingual letter symbol.
Fig. 1 and Fig. 2 are respectively the flow charts according to first kind of barcode encoding of the present invention and coding/decoding method.
" Chinese china2004 " is example with character string, according to one embodiment of present invention, adopts 128 bar code standards and Chinese character national standard to encode.Adopt "+", " * " symbol in " standard character collection " to accord with, respectively sign Chinese and " standard character " as bar code mark.
In cataloged procedure, at first read first character in the character string " in ", discerning its type is Chinese.Character " in " insert bar code mark symbol "+" (step 101) of bar code form before.Next to character " in " coding, earlier according to national standard, with Chinese character " in " be converted to four figures word string " 5448 "; Use 128 bar code standards that numeric string " 5448 " is compiled again and be bar code.At this moment, establishing the i value is 2.
Obtain i character " state ", discern its type, be converted into four figures word string " 2590 " for Chinese; Use 128 bar code standards that numeric string " 2590 " is compiled again and be bar code (step 102).
Relatively " state " and last character " in " character types (step 103), type is identical, then i becomes 3 (steps 105).
Because character string still is untreated and finishes, and returns step 102, obtains the type of i character " C ".Because English character is 128 bar code standards " standard character ", be bar code so it is directly compiled according to 128 standards.
Compare the type of " C " and last character " state ", the type difference then carry out step 104, and at the bar code mark symbol " * " of the preceding insertion bar code form of character " C ", i becomes 4 (steps 105).
Because character string is not over yet, return the character string of step 102 pair back once more and carry out similar encoding operation, so until end of string, be bar code thereby all characters are all compiled.This moment the output encoder result, cataloged procedure finishes.
Thereby, select for use "+" and " * " to identify " Chinese " respectively when reaching " standard character " at bar code mark symbol, the character string of compiling out with above-mentioned bar code method for organizing is "+Chinese * china2004 "; If bar code mark symbol is used "+", " # " instead and reached that " * " identifies " Chinese " respectively, " English " reaches " numeral ", the character string of compiling out with above-mentioned bar code method for organizing is "+Chinese #china*2004 ".
As shown in Figure 2, when above-mentioned bar code is decoded, earlier bar code is once decoded, be converted to character string.Then, from first character (step 201) on the left side of decoded information once, judge whether first character is identifier (step 202).If not identifier, then point out error message.This identifier shows the character types of its first character afterwards to the character field of NeXt ID last character composition before.If identifier then obtains the represented character types (step 204) of this identifier, successively the character in this character field is decoded according to this type then.Specifically, judged whether not read character (step 205) exactly.If have, then read character late (step 206), and judge whether this character late is identifier (step 207).If this character late is an identifier, showing then that character field that a represented information type of the identifier that reads comprises has read finishes, whether correctly thereby the character that has read the front is decoded (step 208) according to identifier that reads on this, and judge decoding (step 209).Incorrect if decode, then point out error message (step 210).Otherwise further judged whether not read character (step 211), and to successive character repeating step 204-208, last character decoding up to bar code information finishes, and exports result's (identifier is not exported) at last, just the Word message that this bar code comprised.
Fig. 3 and Fig. 4 have shown that respectively according to second kind of barcode encoding of the present invention and coding/decoding method, its principle and preceding a kind of method are similar, and difference is the position difference of identifier.This method is represented the number of bar code mark symbol with first character of bar code, the bar code mark symbol is emitted on the leading portion of the whole bar code after first character successively, do not have at interval between the character string corresponding to each bar code mark symbol of front end, character string is emitted on the back segment of bar code successively according to the discharging order of bar code mark symbol.
According to the actual conditions differences such as length of bar code standard, character types, character string, can adopt two kinds of bar code organization schemes:
First kind is that bar code mark symbol comprises two characteristic values, first characteristic value identification character type, as " in ", " moral ", " method " etc.; Second characteristic value sign is to the length of character string that should the bar code mark symbol; After reading bar code mark symbol,,, separate with the character string of this and other character types again according to second characteristic value length of this section character string as can be known according to the character types of first characteristic value type of corresponding character string as can be known.
Similar with of the present invention aforementioned barcode encoding method shown in Figure 1, according to the actual bar code standard difference of selecting for use, the definition of the bar code mark of this programme symbol also can have diverse ways.In one embodiment, so the bar code standard less to some " standard character collection ", itself can't represent more character, tackle every kind of character, symbol this moment and define bar code mark symbol respectively, and whether be " standard character " of this bar code and do not distinguish character.In another embodiment, " standard character collection " in bar code standard self is bigger, can represent more character, not under the situation about need additionally encode, can treat with a certain discrimination standard/non-standard character, a bar code mark symbol sign all " standard characters " only is set, and accords with the character that identifies respectively in non-" standard character collection " such as Chinese, German, Japaneses with other bar code marks.
In addition, according to the difference of bar code standard, the value of bar code mark symbol also can adopt dual mode: first kind is to utilize spcial character, the reserved characters in the bar code " standard character collection " or the character that is of little use uses as the bar code mark symbol.The second way is according to the bar code standard, the spcial character that does not have in more self-defined " standard character collection ".The value and the define method of above-mentioned bar code mark symbol need be used in combination according to concrete bar code standard.
Second kind of bar code organization scheme is that the value that bar code mark accords with is made of jointly block information and this bar code mark symbol corresponding characters string length of spoken and written languages symbol.Usually, the default implication of identifier is the field type (Chinese, Japanese, Korean, English, German, French and standard character or the like) that identifier is represented, in addition can also represent field length, if identifier is only represented field type, so only need a bar code character, if also will represent field length, then need two bar code characters.Therefore, can be length of interval of every kind of spoken and written languages sign convention in advance, for example stipulating that English word string is the longest has 49 characters, and Chinese is the longest 19 characters, and numeric string is the longest 29 characters is arranged; With this partition length interval, English is (0~49), and Chinese is (50~69), and numeral is (70~99).The physical length of every kind of spoken and written languages symbol string should be 0 between the length of corresponding types.Obviously, the value of this length of interval and order can be adjusted.That is to say that the length that every kind of spoken and written languages symbol takies can be adjusted, for example can defining Chinese, interval promptly the Chinese character string is the longest can 90 characters in (0~89), and English interval (90~99), promptly English is the longest can 10 characters.
When forming the bar code mark symbol, the initial value and the physical length addition of this kind spoken and written languages sign character string with the length of interval of certain spoken and written languages symbol draw the value that bar code mark accords with.Be defined as example with above-mentioned length of interval, if English character string physical length is 5, the value of then English bar code mark symbol is 0+5=5; If Chinese character string physical length is 7, the value of then Chinese bar code mark symbol is 50+7=57; If the digit strings physical length is 2, the value of then digital bar code mark symbol is 70+2=72; If also have the Chinese character string, physical length is 20, and then corresponding bar code mark symbol value is 51+20=71.
With character string " Zhang San 13570234025 " is example, adopts above-mentioned length of interval define method, adopts 128 yards standard codes, and the bar code mark symbol is respectively 50+2=52, represents 2 Chinese characters; 70+11=81 represents 11 bit digital; Add identifier number 2 at first again, the coding result character string is " 252815337409313570234025 ".Certainly, described bar code mark symbol also can be distinguished standard/non-standard character, all " standard characters " is provided with a character length interval, and other various non-standard characters are defined a length of interval respectively.
For the situation that the same type character pitch is provided with, can similarly handle.With " Chinese CHINA Beijing2008 ", according to Chinese (50~69), and " China " this section string length is 2, and identifier is exactly 52 so; Next according to English (0~49), " china " length is 5, and corresponding identifier is 05; " Beijing " length is 2 again, and identifier is still 52, is (70~99) between the digital block, and " 2008 " length is 4, and so corresponding identifier is exactly 74.Four identifiers are followed successively by 52,05,52,74, and the number 4 of identifier is added in the front.
When encoding with this bar code organizational form, for example numeral, English alphabet, Chinese character, Japanese individual character, Korean individual character, German letter, French letter and Greece and roman character etc. are weaved into the character that bar code can direct representation various types of characters with the standard (for example GB, the four-corner system or the own standard that defines etc.) of agreement, calculate their bar code mark symbol then respectively according to the length of each character string, with dissimilar fields putting in order in prime information, their bar code mark symbol is placed on according to the order of sequence the front of all fields again.Below in conjunction with Fig. 3 concrete coding flow process is described.
As shown in Figure 3, to a customizing messages for example " Chinese china2004 " at first read first character and discern its type (step 301) when carrying out barcode encoding, adopt corresponding standard to encode according to its type.Read i character (initial value of i is 2) then successively, similarly discern its type and with corresponding standard encode (step 302).Next judge whether these character types that read and last character types that read consistent (step 303).If type is identical, then the value with i adds 1, and writes down the field length (step 305) of these character types.If instead the judged result of step 303 is that current character types that read and last character types that read are inconsistent, then determine identifier according to the type and the length of the field that has run through.This identifier is inserted in the front (step 304) of first code field.Follow still execution in step 305, the value that is about to i adds 1, and writes down the field length of the current character types that read.
Next, judge whether in addition character do not read and encode (step 306).If judge there to be the character that does not read and encode, then again to the operation of next character execution in step 302 to 305.In step 306, judge till the character that does not read and encode like this.Execution in step 307 then, obtain total number (being total number of identifier) of all kinds field that comprised in this customizing messages according to the result of aforesaid operations, it is inserted in first identifier front, and the output encoder result, promptly comprises the bar code of above-mentioned customizing messages.
Fig. 4 has shown the flow chart of decoding to according to the bar code that coding method obtained shown in Figure 3.
As shown in Figure 4, when decoding, at first will with bar code according to predetermined bar code standard for example 128 yards or 39 yards decode.Then, from the resulting character string of decoding, obtain the value of first character, according to above-mentioned cataloged procedure, this first character representation be the number n (step 401) of identifier.Then, read j identifier (initial value of j is 1) successively, determine the type of identifier and the length (step 402) of respective field according to the value of this identifier.Then, judge whether this identifier is correct, judge promptly whether identifier exceeds predefined several value.If exceed predefined several value, perhaps do not meet predefined rule, then be judged as this identifier incorrect (step 403), if incorrect, then report error message (step 406); If correct, then according to type that identifier comprised and length information in the bar code with the corresponding field of this identifier decode (step 404).Decode procedure in this step has been technique known, therefore repeats no more.
Next, verify whether decoding correct, promptly in character library, search and the decoded results corresponding characters, and if can not find corresponding character would illustrate the decoding incorrect (step 405).If incorrect, then report error message (step 406); Otherwise, judge whether j equals n, promptly judge whether to have read all identifiers and corresponding field has been carried out decoding processing (step 407).If j is not equal to n, then show to also have untreated identifier and field, j is added 1 back (step 408) return step 402 and again next identifier and corresponding field thereof are handled.And when judging that j equals n, show and handled all identifiers and field.Promptly export all decoded results, the i.e. customizing messages that this bar code comprised, for example " Chinese china2004 " this moment.
Above-mentioned with reference to figure 3 and Fig. 4 explanation barcode encoding and the second method of decoding applicable to two kinds of above-mentioned bar code organization schemes.
Need explanation, implementation of the present invention can be diversified.For example, can be on the basis of above-mentioned barcode encoding and coding/decoding method, the spoken and written languages symbol that first group of character string of default bar code be certain particular type can omit when coding bar code mark that should the section character string is accorded with.For example, default first group of character string is Chinese character, then just can omit going here and there the bar code mark symbol of character string.When the bar code of having omitted first bar code mark symbol with this kind method is decoded, need to adopt corresponding coding/decoding method to decode according to first group of default character string type.
Return Fig. 2 again, in this case, when in step 202, judging that first character that is read is non-identifier, judge that the type under this character is predefined, therefore can decode according to the coding/decoding method of preset characters type.Though not shown in Fig. 4, also can adopt similar method.
Fig. 5 has shown the method flow that the bar code that adopts above-mentioned two types barcode encoding method coding is discerned and decoded.With 128 yards standards is example, and Chinese character is represented with GB, English alphabet and digital direct representation.
First kind of coding method: each identifier disperses to be placed on the beginning of corresponding son field, uses "+", "-", "/" expression Chinese, English, digit-marker respectively.If but first son field is the spoken and written languages of predetermined default designation symbol, first identifier can be default so.
Second kind of coding method: all identifiers are concentrated the front end that is placed on whole text message, and Chinese, English, digital identifier are respectively [0,29], [30,59], [60,99].
In the step 501 of Fig. 5, at first read in i character from text message section (will weave into that section character string of bar code, for example " BeiJing, China 2008 "), the i initial value is made as 1, is used for cycle count.Then, judge in step 502 whether this character is "+", "-", "/".If, then according to above-mentioned in conjunction with Fig. 2 described with first kind of corresponding coding/decoding method of coding method decode (step 506).If this character that reads is not "+", "-", "/", then further judge whether to have run through whole character string (step 504).If the character that will read in addition, then return step 501, continue to read and handle next character, judge up to step 504 till the character that does not have to read, execution in step 505 then, promptly according to above decoding with second kind of corresponding coding/decoding method of coding method in conjunction with Fig. 4 is described.
Fig. 6 (a)-(e) has shown that respectively with " Chinese china2004 " be example, adopts the schematic diagram of above-mentioned formed character information of various barcode encodings and final bar code.Wherein, Fig. 6 (a) adopts first kind of result that coding method is encoded, and wherein adopts "+" identifier as Chinese, adopts " * " identifier as former character.Fig. 6 (b) adopts first kind of result that coding method is encoded, and wherein the Chinese mark symbol is default, adopts " * " identifier as former character.Fig. 6 (c) adopts first kind of result that coding method is encoded, wherein adopt Chinese character " in " as the identifier of Chinese, " former " is as the identifier of former character.Fig. 6 (d) adopts first kind of result that coding method is encoded, and wherein the Chinese mark symbol is default, and " former " is as the identifier of former character.Fig. 6 (e) adopts first kind of result that coding method is encoded, and at first calculates Chinese, former character identifier.
In the above-described embodiments, the identifier strategy that adopts is to be length of interval of every kind of spoken and written languages sign convention in advance, corresponding every section character string, when forming the bar code mark symbol, with the initial value of the length of interval of the spoken and written languages symbol of this character string correspondence and the physical length addition of this kind spoken and written languages sign character string, draw the value of bar code mark symbol.Can produce a defective like this is that the length of interval utilization is abundant inadequately.For example, in 0~99 this interval, dividing English interval is (0~49), and the Chinese interval is (50~69), is (70~99) between the digital block, adds that with interval initial value string length just becomes the bar code mark symbol.Each interval initial value 0,50,70 all can not be used as identifier like this, and the character that 0~99 this interval can be represented altogether has only 97.
In order to improve character capacity, can carry out following improvement to this scheme: these three initial values are used as identifier, when generating the bar code mark symbol, the initial value of length of interval and the physical length addition of this kind spoken and written languages sign character string are subtracted 1 again, draw the bar code mark symbol.For example, length is 1 Chinese character string, and its corresponding bar code mark symbol is 50+1-1=50; And length is 3 digit strings, and its corresponding bar code mark symbol is 70+3-1=72.Like this, the character that can represent altogether of 0~99 interval adds up to 99.
The above length of interval can also change flexibly according to the amount of information that will express, when 99 characters are not enough to expressing information, expands identifier to 3 bar code character, and length of interval is extended for (0~999), 999 characters of coexpression.
In addition,, can also provide a kind of Code And Decode method of in one group of bar code, mixing multiple bar code standard, to improve code efficiency and to reduce bar code length according to the present invention.The principle of this method is that several character fields are formed a whole group bar code, and each section represented with the bar code of various criterion, separates with a bar code blank character between section and the section.The effect of this blank character just geographically separates the bar code of former and later two various criterions, be when bar code information is converted to string number as for the identification of bar code standard, finish by the bar code scan device, and be prior art.
Specifically, the multiple bar code standard of realization according to the present invention, and can carry out Methods for Coding to the multilingual letter symbol and comprise: earlier with various spoken and written languages corresponding codes methods, Chinese characters of the national standard coding etc. for example, which kind of information is once encoded, the coding result segmentation and specify every section to adopt bar code standard.Then, each section encoded with corresponding bar code standards.At last, the coding result of each section (bar code) is made up by original sequence arrangement, and insert corresponding bar code blank character, thereby wait bar code to the end.
When this bar code that is mixed with multiple bar code standard is decoded, its detailed process can for: when bar code is converted to character string, discern the bar code blank character between described bar code section and the different bar code sections.According to the bar code blank character of being discerned, each bar code section is discerned its bar code standard respectively.To the step of bar code section identification bar code standard as mentioned above, can adopt prior art finish by the bar code scan device.According to the bar code standard of being discerned, the corresponding bar code section once is decoded as character string.At last, can adopt the method described in the above embodiment of the present invention to incite somebody to action once decoded character string secondary and be decoded as raw information.

Claims (9)

1. bar code decoding method comprises:
Is character string according to the bar code standard with bar code decoding;
Read and discern the identifier in the described character string, described identifier includes the information of the character types of field in the raw information, also comprise the field length information of described character types, and be arranged on described raw information by the front end of the character string after once encoding, wherein:
Discern the bar code blank character between the different bar code sections, utilize with described bar code section corresponding bar code standard described bar code section is decoded,
After reading described identifier, whether the type of discerning this identifier is described first type or second type,
When judging that described identifier is first type, according to the represented type of this first type of identifier to corresponding field decoding,
When judging that described identifier is second type, according to the field length of the represented type of this second type of identifier and the type to corresponding field decoding; And
According to recognition result to described identifier, to be raw information with the corresponding field decoding of this identifier in the described character string, and when carrying out the decoding of described respective field, utilize i and j counting mode, in conjunction with the described field length information in the described identifier, finish judgement to described field length.
2. bar code decoding method according to claim 1, it is characterized in that, the information of character types that includes field in the described raw information of expression in the described identifier, be arranged on described raw information by in the character string behind the coding once with the corresponding field of this identifier before.
3. bar code decoding method according to claim 1 and 2 is characterized in that, described once the coding is converted to the character string that can be represented by bar code with described raw information.
4. bar code decoding method according to claim 1 and 2 is characterized in that the type of first field of described raw information is default, and this first field is not provided with identifier.
5. bar code decoding method according to claim 1 and 2 is characterized in that,
Described identifier comprises: be used to identify the identifier that the bar code standard character is concentrated the identifier of character types and is used to identify the unspecified character types of bar code standard character collection; Perhaps
Described identifier comprises a plurality of identifiers of each character that is used for identifying respectively multiple character.
6. bar code decoding method according to claim 5 is characterized in that, described identifier is spcial character, reserved characters or the character that is of little use that described bar code standard character is concentrated, or the self-defining character beyond the described bar code standard character collection.
7. bar code decoding method according to claim 1, it is characterized in that the character in the described raw information comprises following any one or polytype: Chinese, Japanese, Korean, English, German, French, English, Greek, roman character, punctuation mark, numeral, additional character.
8. bar code decoding method according to claim 1 is characterized in that, described bar code comprises the bar code section by multiple bar code standard code, and is provided with the bar code blank character between described different bar code sections.
9. bar code decoding method according to claim 1, it is characterized in that, the identifier and the respective field thereof that include first type identifier and respective field thereof or second type in the described character string, the information of character types that includes field in the described raw information of expression in the described first type identifier, be arranged on described raw information by in the character string behind the coding once with the corresponding field of this identifier before; Include the information of the character types of field in the described raw information of expression and the field length information of described character types in the described second type identifier, and be arranged on described raw information foremost by the character string after once encoding.
CNB2004100320523A 2004-03-30 2004-03-30 Bar-code decoding method Expired - Lifetime CN100479331C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100320523A CN100479331C (en) 2004-03-30 2004-03-30 Bar-code decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100320523A CN100479331C (en) 2004-03-30 2004-03-30 Bar-code decoding method

Publications (2)

Publication Number Publication Date
CN1677872A CN1677872A (en) 2005-10-05
CN100479331C true CN100479331C (en) 2009-04-15

Family

ID=35050208

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100320523A Expired - Lifetime CN100479331C (en) 2004-03-30 2004-03-30 Bar-code decoding method

Country Status (1)

Country Link
CN (1) CN100479331C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10726223B2 (en) 2016-10-24 2020-07-28 Alibaba Group Holding Limited Method and apparatus for barcode identifcation

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107609623A (en) * 2017-10-17 2018-01-19 九州通医疗信息科技(武汉)有限公司 Bar code processing method and device
CN108960384B (en) * 2018-06-07 2020-04-28 阿里巴巴集团控股有限公司 Decoding method of graphic code and client
CN111400348B (en) * 2020-03-25 2023-08-08 贵阳块数据城市建设有限公司 Heterogeneous data processing method of multiple identification coding rules
CN111797647B (en) * 2020-07-08 2023-11-03 北京京东振世信息技术有限公司 Bar code decoding method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10726223B2 (en) 2016-10-24 2020-07-28 Alibaba Group Holding Limited Method and apparatus for barcode identifcation

Also Published As

Publication number Publication date
CN1677872A (en) 2005-10-05

Similar Documents

Publication Publication Date Title
US8670976B2 (en) System and methods for encoding and decoding multi-lingual text in a matrix code symbol
CN100447812C (en) Document data waterprint embedded method
CN107094021A (en) Data compression
CN103400173A (en) Generating method and reading method of two-dimensional code containing private information
CN103036641B (en) Method for interchanging data, system and unserializing method
CN112200286B (en) Character string coding method and device
CN100479331C (en) Bar-code decoding method
CN113035282A (en) Data sequence processing method based on tag data growth gene
CN101325418B (en) Haffman quick decoding method based on probability table look-up
WO2014056703A1 (en) Secure and lossless data compression
CN113064863B (en) Method for automatically recognizing file code and computer readable storage medium
JPH10164374A (en) Pattern coding system and decoding system and coder and decoder employing the system
CN102841988A (en) System and method for matching nucleotide sequence information
CN105553483B (en) A kind of method and device generating LZ77
CN1677424B (en) Radio-frequency identifying code encoding and decoding method
CN1661529A (en) Method for encoding bar codes
CN102453751A (en) Method for DNA sequencer to reattach short sequence to genome
CN110007955A (en) A kind of compression method of instruction set simulator decoding module code
CN110059519A (en) A kind of bar code reading method and apparatus with security level processing
EP0930787B1 (en) Image coding apparatus using pattern coding
CN101526893A (en) Method and device for parallelly executing instructions of very long instruction words
CN102119384B (en) Method and device for encoding elements
CN102479187A (en) GBK (Chinese Internal Code Specification) character inquiring system on basis of parity check and implementing method thereof
CN104182236B (en) A kind of software path decoding method based on genetic code
CN101290615A (en) Display process suitable for two different Chinese coding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term

Granted publication date: 20090415

CX01 Expiry of patent term