WO2016206446A1 - Character encoding method and character decoding method having error correction function and product thereof - Google Patents

Character encoding method and character decoding method having error correction function and product thereof Download PDF

Info

Publication number
WO2016206446A1
WO2016206446A1 PCT/CN2016/079114 CN2016079114W WO2016206446A1 WO 2016206446 A1 WO2016206446 A1 WO 2016206446A1 CN 2016079114 W CN2016079114 W CN 2016079114W WO 2016206446 A1 WO2016206446 A1 WO 2016206446A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
error correction
data
characters
character encoding
Prior art date
Application number
PCT/CN2016/079114
Other languages
French (fr)
Chinese (zh)
Inventor
吴林
崔征
Original Assignee
信码互通(北京)科技有限公司
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 信码互通(北京)科技有限公司 filed Critical 信码互通(北京)科技有限公司
Publication of WO2016206446A1 publication Critical patent/WO2016206446A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/768Arrangements for image or video recognition or understanding using pattern recognition or machine learning using context analysis, e.g. recognition aided by known co-occurring patterns

Definitions

  • the present invention relates to a character encoding method and a character decoding method having an error correcting function, and to a product using the above character encoding method.
  • OCR computer vision recognition technology
  • the accuracy rate can reach more than 90%.
  • the printing effect is better, and the recognition rate can reach more than 98%.
  • OCR technology itself has the possibility of misreading, and it is impossible to discriminate whether it is misread after OCR recognition.
  • the recognition system cannot distinguish whether or not the reading is wrong.
  • the existing character encoding containing only data characters due to the misunderstanding of OCR technology, the above application system is flawed, and it is impossible to use such character encoding as a mark for the production of some systems with high precision requirements.
  • the primary technical problem to be solved by the present invention is to provide a character encoding method with an error correction function.
  • Another technical problem to be solved by the present invention is to provide a character decoding method with an error correction function.
  • Another technical problem to be solved by the present invention is to provide a product using the above character encoding method.
  • a character encoding method with error correction function wherein the character encoding is composed of data characters and error correcting characters, and includes the following steps:
  • a character code having an error correction function is composed of data characters and corresponding error correction characters.
  • the character encoding table used in the step (1) includes a plurality of numbers and a plurality of letters, and different numbers and different letters represent different values.
  • the character encoding table does not include a letter whose shape is close to any of the numerical shapes.
  • the error correction algorithm used is the Reed Solomon algorithm.
  • the length of the data character is N
  • the number of characters to be error-corrected is T
  • the length of the character encoding is N+2T
  • 2T is the number of error-correcting characters
  • the error correction rate is T/(N+2T).
  • the character code consists of numbers and/or letters.
  • a character decoding method with error correction function wherein the character encoding is composed of data characters and error correction characters, including the following steps:
  • the error correction algorithm used in the step (2) and the step (3) is the Reed Solomon algorithm.
  • the length N of the data character and the length of the error correction character are calculated according to the error correction rate T/(N+2T) and the length of the character encoding (N+2T). 2T, then divide; where T is the number of characters required for error correction.
  • the product is a bottle cap, and the character code is disposed on the cap
  • the top surface, the character codes set on different caps are different.
  • a two-dimensional code is disposed inside the bottle cap, and the two-dimensional code disposed on each cap is different, and the two-dimensional code is associated with the character code in a database.
  • the character encoding method and the character decoding method provided by the present invention are used for encoding and decoding a character encoding having an error correction function.
  • This character encoding with error correction function consists of data characters and their corresponding error correction characters.
  • the use of such character encoding to mark the product can effectively solve the problem that the character encoding including only the data characters in the prior art is easily misunderstood.
  • the error correction algorithm performs error correction processing on the character encoding, and can determine whether there is an error in the recognition of the character encoding, and correct the character encoding in which the number of the wrong characters is less than or equal to the number of error correction characters corresponding to the error correction rate; False failed character encoding.
  • the number of error characters exceeds the number of error correction characters corresponding to the error correction rate, the erroneous characters in the character encoding cannot be completely corrected, but the recognition of the character encoding can also be determined by the error correction algorithm.
  • the error is guaranteed to be 100% rejected. Therefore, using this character encoding, it can be ensured that only correctly recognized data characters can be stored in the system, and 100% of the incorrectly recognized data characters are rejected, and there is no misreading data in the system.
  • FIG. 2 is a flow chart of a coding process of character encoding provided by the present invention.
  • FIG. 3 is a flow chart of a decoding process of character encoding provided by the present invention.
  • Figure 4 is a front elevational view showing a bottle cap provided with a character code
  • Figure 5 is a rear perspective view of the cap of Figure 4.
  • the character encoding method and the character decoding method provided by the present invention are used for encoding and decoding a character encoding having an error correction function.
  • a character code having an error correction function is composed of data characters and their corresponding error correction characters.
  • the decoding process by performing error correction processing on the entire character encoding, it can be determined whether the error correction of the character encoding is successful, thereby ensuring that only correctly decoded data characters can enter the database, and the error correction data (ie, recognition error and cannot The error corrected data) was rejected by 100%.
  • the coding principle of the character encoding is as follows:
  • the character code having the error correction function is composed of two parts: a data character and an error correction character. It is assumed that the error correction processing is performed by using the Reed Solomon algorithm, the number of data characters is N, and the number of characters to be error-corrected is T, the length of the character encoding is N+2T, and 2T is the number of error-correcting characters.
  • the corresponding error correction rate is T/(N+2T). For example, in the character encoding shown in FIG.
  • the length of the valid data character is 8
  • the length of the error correcting character is 4
  • the number of characters capable of error correction is 2
  • 100% misunderstanding can be found.
  • the error correction rate and the correct recognition rate are different, the misreading can also be found 100%.
  • the error correction character is data obtained by processing the data characters using an error correction algorithm. According to the actual needs, the number of characters that need to be corrected can be adjusted. If the error correction is 1 character or 3 characters, the length of the error correction character is also adjusted to 2 or 6.
  • any type of error correction algorithm can be used in the present invention as an error correction algorithm for the character encoding.
  • the commonly used Reed Solomon algorithm is used for error checking and error correction.
  • the Reed-Solomon algorithm please refer to the paper “Reed-Solomon Codec Principle and FPGA Implementation” by Zhou Zhu and Wang Rui (published in “Avionics Technology", No. 2, 2009), which is not specific here. I will go into details. Of course, other error correction algorithms can be selected as needed.
  • the character code with error correction function provided by the present invention may be composed of pure letters or pure numbers, or may be composed of numbers and letters.
  • the length of the character code can be freely defined as needed, generally 8 or more.
  • the character encoding method and the character decoding method provided by the present invention are described below by taking the character encoding table shown in Table 1 as an example.
  • the character encoding table shown in Table 1 is composed of 10 numbers and 22 uppercase letters, and includes 32 characters in total, and each character corresponds to a 5-digit binary number. When the character encoding includes 12 characters, the corresponding binary encoding length is 60 bits.
  • the letters B, I, O, and Q which are similar in shape to the easy-to-read error numbers 8, 1, 0 are not used. 32 characters after removing the above four letters The difference in shape is large, and the OCR device is easy to recognize and reduces the error rate.
  • the reduction, for example, the data length is 16, and the error correction data is 4, and the error correction rate is 2/20 10%.
  • Table 1 is a character encoding table corresponding to 32 values. In actual use, other character encoding tables corresponding to a plurality of values composed of only numbers, only letters, or partial digits and partial letters may be selected as needed. For example, you can use common hexadecimal values for encoding.
  • the character encoding method with error correction function includes the following steps: (1) setting an error correction rate of the error correction character generating device; that is, setting the number of characters that can be corrected, such as Set one error correction character; (2) generate a set of data characters according to the character encoding table; the character encoding table can be arbitrarily selected according to requirements; (3) according to the set error correction rate, the error correction character generating device generates and The error correction character corresponding to the data character; when processed by the Reed Solomon algorithm, the number of error correction characters generated is twice the number of error correction characters set; (4) the data characters and steps generated by the step (2) ( 3)
  • the generated error correction characters constitute a character code with an error correction function. Then you can set the character encoding in production. On the product, used to mark the product, the character code can be set on the product in one or more lines.
  • the error correction rate set in the step (1) is 1 character
  • the error correction is performed using the Reed Solomon algorithm, and if the length of the data character is N, the error correction rate is 1/(N + 2 ⁇ 1).
  • the decoding process if there is a character reading error, it can be corrected. If there is a 2 character reading error, it can only be judged that the data character has an error and cannot be corrected.
  • the number of error corrections is constant, the more the number of data characters, the lower the error correction rate.
  • the data character ACDE1234 is generated by using the character encoding table shown in Table 1; the number of characters requiring error correction is set to 2; and the error correction character generating device is used to generate and data using the error correction algorithm.
  • the four error correction characters corresponding to the character such as EGH2 (this is an example, the actual error correction value needs to be obtained according to a specific error correction algorithm); combining the data characters and the error correction characters to form an error correction function Character encoding, such as ACDE1234EGH2.
  • the character decoding method with error correction function provided by the present invention is used for decoding the character encoding generated by the above encoding method; and the following steps are included: (1) acquiring a character encoded image and identifying each The number or letter corresponding to each character; (2) According to the error correction rate and the error correction algorithm, the entire set of characters recognized is divided into data characters and error correction characters; (3) the error correction decoding device uses the corresponding error correction algorithm Error correction processing is performed on the character encoding; if the error correction is successful, the data character is output; if the error correction fails, the entire data character encoding is eliminated.
  • the OCR device can be used to read the character code having the error correction function; when the OCR device is used for reading, the recognition rate can be more than 90%.
  • the length of the data character N may be first calculated according to the error correction rate T/(N+2T) and the length of the character encoding (N+2T). And the length of the error correction character is 2T, and then the character division is performed; wherein T is the number of characters required for error correction.
  • the length of the data characters and the length of the error correction characters can also be first calculated according to the error correction algorithm, the error correction rate, and the length of the character encoding, and then the character division is performed.
  • the error correction decoding apparatus used in the above step (3) is a device capable of discriminating an error and correcting an error after inputting a character code, and when the number of error characters is less than or equal to the number of error correction characters set, the error is read. Characters can be corrected, error correction is successful; otherwise, only recognition errors can be found Errors can not correct the wrong characters, error correction failed.
  • the error correction algorithm used by the error correction decoding device should be identical to the error correction algorithm used to generate the character encoding.
  • the process of rejecting the entire set of data character encoding can also be understood as a process of culling a product provided with the data character encoding.
  • the rejecting device used in the step (3) means a device that rejects the defective product.
  • the data characters that failed the error correction are not saved in the database.
  • the error correction decoding device may further include a process of converting the character data and the error correction data into corresponding values using the character encoding table. Then perform error correction operations.
  • error correction character generating device error correction decoding device, culling setting, and the like may be implemented by an FPGA or firmware, or may be implemented by a dedicated software program running in a general-purpose microprocessor.
  • the specific implementation manners are conventional technical means that can be grasped by those skilled in the art, and are not specifically described herein.
  • the bottle cap shown in Figs. 4 and 5 will be taken as an example to introduce a product provided with a character code having an error correction function.
  • the bottle cap is taken as an example to introduce the production system for producing the cap.
  • the present invention provides such a product provided with the above character encoding, wherein the character encoding is composed of data characters and their corresponding error correcting characters.
  • the error correction character generating means After inputting data characters, the error correction character generating means generates an error based on the error correction rate and the error correction algorithm. Wrong character.
  • the character code is then composed of data characters and error correction characters and placed on the product.
  • the corresponding values of the character codes set on different products are different and can be used as product codes for inquiring in the production and sales process.
  • QR code recognition software has become a must-have software for mobile phones, and a large number of mobile phone applications contain two-dimensional code recognition functions.
  • enterprises have set the lottery two-dimensional code on many products.
  • the integral lottery two-dimensional code is usually hidden in the product packaging, and only after the purchase is destroyed by the packaging. QR code. Therefore, in the database, the character encoding needs to be associated with the two-dimensional code, so that the manufacturer can judge the destination of the corresponding two-dimensional code by reading the character encoding set on the product.
  • the above-mentioned product and production system provided with character encoding and two-dimensional code with error correction function are particularly suitable for use in various caps such as crown caps and the like.
  • the two-dimensional code and character code set on the bottle cap are identified by the visual recognition device and the two are stored in the background database to ensure the normal sale of the bottle cap.
  • the crown cap shown in FIGS. 4 and 5 includes a cover body 11.
  • a two-dimensional code 14, a glue layer, and an edible sealant pad 15 are sequentially disposed downward on the inner side of the lid body 11.
  • the edible sealant pad 15 is disposed on the surface of the two-dimensional code 14 and the adhesive layer.
  • the edible sealing rubber pad 15 is made of edible silica gel material, and the two-dimensional code 14 can be insulated from the liquid in the bottle by setting the edible sealing rubber pad 15 to prevent the liquid from dissolving and destroying the two-dimensional code 14, and avoiding the two-dimensional code 14 from causing liquid in the bottle. Pollution.
  • a bottom oil layer and a surface oil layer are disposed in this order on the top side of the lid body 11.
  • the exposed visible oil layer forms a character code 13.
  • the character code 13 is composed of data characters and error correction characters, and the character code 13 is obtained by the above encoding method.
  • the character code 13 can be composed of letters and/or numbers, has a short length, is easy to recognize in the production process, and has a fast recognition speed.
  • the character code 13 can be arranged in one or more lines.
  • the base oil layer may be a fluorescent ink or a transparent ink. Further, a printed pattern may be disposed between the base oil layer and the oil layer.
  • the two-dimensional code 14 and the character code 13 are identified and associated in the background, having a unique correspondence, thereby constituting two identification codes of the cap.
  • the QR code 14 can be used for activities such as points, lotteries, and the like after the consumer destroys the package.
  • the product is marked by the use of such character encoding with error correction.
  • the identification process if the error correction of the character encoding set on the product is successful, the character data of the product is stored in the database and stored in association with the two-dimensional code set on the back of the product. If the error correction of the character encoding set on the product is unsuccessful, the above-mentioned character encoding recognition error is judged, thereby eliminating the corresponding product, and deleting the relevant data in the database, thereby ensuring the character encoding on the product entering the sales link. 100% identifiable.
  • the manufacturer or the dealer can know the whereabouts of the product by identifying the character code on the outside of the bottle cap, and carry out the anti-smuggling inquiry; and, by identifying the character code on the outside of the cap, the second side of the cap can be determined.
  • Dimensional code so that by adjusting the winning range of the QR code, the marketing activities can be guaranteed to proceed normally.
  • the present invention provides a character encoding method and a character decoding method for encoding and decoding a character encoding having an error correction function.
  • a character encoding with error correction function is set on the product, it is possible to judge whether there is an error in the recognition of the character encoding through the error correction algorithm, and it can be ensured that only the data characters with successful error correction can be stored in the system, and the data character 100 that fails the error correction is ensured.
  • % is culled to ensure that there are no misreading data in the data system and to avoid data misreading during the sales process.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Probability & Statistics with Applications (AREA)
  • Error Detection And Correction (AREA)
  • Character Discrimination (AREA)

Abstract

A character encoding method and character decoding method having an error correction function and a product using the character encoding method. The character encoding having the error correction function consists of a data character and an error correction character corresponding thereto. Using the character encoding to mark a product can effectively address the problem in the prior art in which encoded data only comprising a data character is easily misread. By determining whether the identification of the character encoding has an error via an error correction algorithm, the present invention can ensure that only the data character having been successfully corrected can be stored in the system, and the data character having been unsuccessfully corrected can be all eliminated, thereby ensuring no misread data in the data system.

Description

具有纠错功能的字符编码方法、字符解码方法及其产品Character encoding method with error correction function, character decoding method and product thereof 技术领域Technical field
本发明涉及一种具有纠错功能的字符编码方法、字符解码方法,同时还涉及采用上述字符编码方法的产品。The present invention relates to a character encoding method and a character decoding method having an error correcting function, and to a product using the above character encoding method.
背景技术Background technique
随着计算机技术的发展,计算机的处理速度得到大幅提升,计算机视觉识别技术(简称为OCR)也得到快速发展。这些技术广泛应用于各种自动化生产线,大幅提高生产效率,降低人工成本。With the development of computer technology, the processing speed of computers has been greatly improved, and computer vision recognition technology (OCR) has also been rapidly developed. These technologies are widely used in a variety of automated production lines to significantly increase production efficiency and reduce labor costs.
目前很多企业出于内部管理和窜货管理等需求,在产品上设置有特定的字符编码。为了确保这些字符编码的有效性,企业通常需要在产品出厂前使用OCR技术来读取这些字符编码。At present, many companies set specific character codes on products for internal management and stock management. To ensure the validity of these character encodings, companies often need to use OCR technology to read these character encodings before they leave the factory.
虽然目前的OCR技术已经比较成熟,准确率能达到90%以上。打印效果较好的,识别率更能达到98%以上。但是OCR技术本身存在误读的可能,并且在OCR识别之后无法判别是否误读。例如,当把字符编码中的数字8识读为字母B时,识别系统无法区分是否读错。对于现有的仅包含数据字符的字符编码,由于OCR技术误读的存在,使得上述应用系统存在瑕疵,对一些精度要求很高的系统,甚至根本不可能使用这样的字符编码作为标记进行生产。Although the current OCR technology is relatively mature, the accuracy rate can reach more than 90%. The printing effect is better, and the recognition rate can reach more than 98%. However, OCR technology itself has the possibility of misreading, and it is impossible to discriminate whether it is misread after OCR recognition. For example, when the number 8 in the character encoding is read as the letter B, the recognition system cannot distinguish whether or not the reading is wrong. For the existing character encoding containing only data characters, due to the misunderstanding of OCR technology, the above application system is flawed, and it is impossible to use such character encoding as a mark for the production of some systems with high precision requirements.
发明内容Summary of the invention
本发明所要解决的首要技术问题在于提供一种具有纠错功能的字符编码方法。The primary technical problem to be solved by the present invention is to provide a character encoding method with an error correction function.
本发明所要解决的另一技术问题在于提供一种具有纠错功能的字符解码方法。Another technical problem to be solved by the present invention is to provide a character decoding method with an error correction function.
本发明所要解决的又一技术问题在于提供一种采用上述字符编码方法的产品。Another technical problem to be solved by the present invention is to provide a product using the above character encoding method.
为了实现上述发明目的,本发明采用下述技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:
一种具有纠错功能的字符编码方法,其中字符编码由数据字符和纠错字符组成,包括如下步骤:A character encoding method with error correction function, wherein the character encoding is composed of data characters and error correcting characters, and includes the following steps:
(1)根据字符编码表生成一组数据字符; (1) generating a set of data characters according to the character encoding table;
(2)根据预先设置的纠错率,使用纠错算法生成与所述数据字符对应的纠错字符;(2) generating an error correction character corresponding to the data character using an error correction algorithm according to a preset error correction rate;
(3)由数据字符和对应的纠错字符组成具有纠错功能的字符编码。(3) A character code having an error correction function is composed of data characters and corresponding error correction characters.
其中较优地,在所述步骤(1)中所使用的字符编码表,包括多个数字和多个字母,并且,不同的数字和不同的字母代表不同的数值。Preferably, the character encoding table used in the step (1) includes a plurality of numbers and a plurality of letters, and different numbers and different letters represent different values.
其中较优地,所述字符编码表中不包括形状与任一数字形状接近的字母。Preferably, the character encoding table does not include a letter whose shape is close to any of the numerical shapes.
其中较优地,在所述步骤(2)中,所使用的纠错算法为Reed Solomon算法。Preferably, in the step (2), the error correction algorithm used is the Reed Solomon algorithm.
其中较优地,所述数据字符的长度为N,所需纠错的字符个数为T,则字符编码的长度为N+2T,2T为纠错字符的个数;所述字符编码所对应的纠错率为T/(N+2T)。Preferably, the length of the data character is N, and the number of characters to be error-corrected is T, and the length of the character encoding is N+2T, and 2T is the number of error-correcting characters; The error correction rate is T/(N+2T).
其中较优地,所述字符编码由数字和/或字母组成。Preferably, the character code consists of numbers and/or letters.
一种具有纠错功能的字符解码方法,其中字符编码由数据字符和纠错字符组成,包括如下步骤:A character decoding method with error correction function, wherein the character encoding is composed of data characters and error correction characters, including the following steps:
(1)获取字符编码的图像,并识别出每个字符所对应的数字或字母;(1) Obtain an image of character encoding and identify the number or letter corresponding to each character;
(2)依据纠错率和纠错算法,将识别出的整组字符划分为数据字符和纠错字符;(2) dividing the identified entire set of characters into data characters and error correction characters according to an error correction rate and an error correction algorithm;
(3)使用对应的纠错算法对所述字符编码进行纠错处理;如果纠错成功,则删除纠错字符后输出数据字符;如果纠错失败,则剔除整组数据字符编码。(3) performing error correction processing on the character encoding using a corresponding error correction algorithm; if the error correction is successful, outputting the data character after deleting the error correction character; if the error correction fails, the entire data character encoding is eliminated.
其中较优地,在所述步骤(2)和所述步骤(3)中使用的纠错算法为Reed Solomon算法。Preferably, the error correction algorithm used in the step (2) and the step (3) is the Reed Solomon algorithm.
其中较优地,在所述步骤(2)中,根据纠错率T/(N+2T)和所述字符编码的长度(N+2T)计算出数据字符的长度N和纠错字符的长度2T,然后进行划分;其中,T为所需纠错的字符个数。Preferably, in the step (2), the length N of the data character and the length of the error correction character are calculated according to the error correction rate T/(N+2T) and the length of the character encoding (N+2T). 2T, then divide; where T is the number of characters required for error correction.
一种设置有字符编码的产品,所述字符编码由数据字符和纠错字符组成,并通过上述编码方法获得。A product provided with a character encoding composed of data characters and error correcting characters and obtained by the above encoding method.
其中较优地,所述产品是瓶盖,所述字符编码设置在所述瓶盖的 顶面,设置在不同瓶盖上的所述字符编码不同。Preferably, the product is a bottle cap, and the character code is disposed on the cap The top surface, the character codes set on different caps are different.
其中较优地,在所述瓶盖的里面设置有二维码,每个瓶盖上设置的二维码不同,所述二维码与所述字符编码在数据库中关联。Preferably, a two-dimensional code is disposed inside the bottle cap, and the two-dimensional code disposed on each cap is different, and the two-dimensional code is associated with the character code in a database.
本发明所提供的字符编码方法和字符解码方法,用于对具有纠错功能的字符编码进行编码和解码。这种具有纠错功能的字符编码由数据字符和其所对应的纠错字符组成。使用这种字符编码对产品进行标记,可以有效解决现有技术中仅包括数据字符的字符编码容易误读的问题。通过纠错算法对字符编码进行纠错处理,可判断字符编码的识别是否存在错误,并纠正错误字符个数少于或等于纠错率所对应的纠错字符个数的字符编码;而对于纠错失败的字符编码,虽然由于错误字符个数超过纠错率所对应的纠错字符个数,字符编码中的错误字符不能被完全纠正,但是也能通过纠错算法判别此字符编码的识别存在错误,从而保证100%被剔除。因此,使用这种字符编码,可以保证只有正确识别的数据字符才能存入系统,识别不正确的数据字符100%被剔除处理,系统中不存在误读数据。The character encoding method and the character decoding method provided by the present invention are used for encoding and decoding a character encoding having an error correction function. This character encoding with error correction function consists of data characters and their corresponding error correction characters. The use of such character encoding to mark the product can effectively solve the problem that the character encoding including only the data characters in the prior art is easily misunderstood. The error correction algorithm performs error correction processing on the character encoding, and can determine whether there is an error in the recognition of the character encoding, and correct the character encoding in which the number of the wrong characters is less than or equal to the number of error correction characters corresponding to the error correction rate; False failed character encoding. Although the number of error characters exceeds the number of error correction characters corresponding to the error correction rate, the erroneous characters in the character encoding cannot be completely corrected, but the recognition of the character encoding can also be determined by the error correction algorithm. The error is guaranteed to be 100% rejected. Therefore, using this character encoding, it can be ensured that only correctly recognized data characters can be stored in the system, and 100% of the incorrectly recognized data characters are rejected, and there is no misreading data in the system.
附图说明DRAWINGS
图1是本发明所提供的字符编码的一个示例;1 is an example of character encoding provided by the present invention;
图2是本发明所提供的字符编码的编码过程流程图;2 is a flow chart of a coding process of character encoding provided by the present invention;
图3是本发明所提供的字符编码的解码过程流程图;3 is a flow chart of a decoding process of character encoding provided by the present invention;
图4是一种设置有字符编码的瓶盖的正视结构示意图;Figure 4 is a front elevational view showing a bottle cap provided with a character code;
图5是图4所示瓶盖的后视结构示意图。Figure 5 is a rear perspective view of the cap of Figure 4;
具体实施方式detailed description
下面结合附图和具体实施例对本发明的技术内容进行进一步的详细说明。The technical content of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
本发明所提供的字符编码方法和字符解码方法,用于对具有纠错功能的字符编码进行编码和解码。如图1所示,这种具有纠错功能的字符编码由数据字符和其所对应的纠错字符组成。在解码过程中,通过对整个字符编码进行纠错处理,可以判断字符编码的纠错是否成功,从而保证只有正确解码的数据字符才能进入数据库中,而纠错失败的数据(即识别错误并且不能纠错的数据)被100%剔除。The character encoding method and the character decoding method provided by the present invention are used for encoding and decoding a character encoding having an error correction function. As shown in FIG. 1, such a character code having an error correction function is composed of data characters and their corresponding error correction characters. In the decoding process, by performing error correction processing on the entire character encoding, it can be determined whether the error correction of the character encoding is successful, thereby ensuring that only correctly decoded data characters can enter the database, and the error correction data (ie, recognition error and cannot The error corrected data) was rejected by 100%.
下面,首先对本发明所提供的字符编码的编码原理进行介绍。本 发明的编码原理如下:具有纠错功能的字符编码由数据字符和纠错字符两部分组成。假设使用Reed Solomon算法进行纠错处理,数据字符的个数为N,所需要纠错的字符个数为T,则字符编码的长度为N+2T,2T为纠错字符的个数,其所对应的纠错率为T/(N+2T)。例如,在如图1所示的字符编码中,假设8个数据字符中能纠正2个错误字符,则实际的字符编码的长度是8+2×2=12,也就是说一个12位的字符编码,其有效数据字符的长度是8,纠错字符的长度是4,能纠错的字符个数是2,纠错率为2/12=16%。由于OCR的识别率能达到90%,加上16%的纠错率,则系统基本能保证96%的正确识别率。而最重要的是,当使用这种具有纠错功能的字符编码时,可以100%发现误读。同理,当使用其他长度的数据字符和纠错字符组成字符编码时,虽然纠错率和正确识别率不同,但同样可以100%发现误读。In the following, the coding principle of the character encoding provided by the present invention will first be introduced. Ben The coding principle of the invention is as follows: The character code having the error correction function is composed of two parts: a data character and an error correction character. It is assumed that the error correction processing is performed by using the Reed Solomon algorithm, the number of data characters is N, and the number of characters to be error-corrected is T, the length of the character encoding is N+2T, and 2T is the number of error-correcting characters. The corresponding error correction rate is T/(N+2T). For example, in the character encoding shown in FIG. 1, assuming that two erroneous characters can be corrected in eight data characters, the length of the actual character encoding is 8 + 2 × 2 = 12, that is, a 12-bit character. For encoding, the length of the valid data character is 8, the length of the error correcting character is 4, the number of characters capable of error correction is 2, and the error correction rate is 2/12 = 16%. Since the recognition rate of OCR can reach 90%, plus 16% error correction rate, the system can basically guarantee 96% correct recognition rate. Most importantly, when using this character encoding with error correction, 100% misunderstanding can be found. Similarly, when using other lengths of data characters and error correction characters to form a character code, although the error correction rate and the correct recognition rate are different, the misreading can also be found 100%.
纠错字符是使用纠错算法对数据字符处理后获得的数据。根据实际的需要可以调整需要纠错的字符个数,如调整为可纠错1个字符或3个字符,则纠错字符的长度也相应调整为2或6。The error correction character is data obtained by processing the data characters using an error correction algorithm. According to the actual needs, the number of characters that need to be corrected can be adjusted. If the error correction is 1 character or 3 characters, the length of the error correction character is also adjusted to 2 or 6.
本发明中可以采用任意一种纠错算法作为本字符编码的纠错算法。例如使用常用的Reed Solomon算法进行错误检查和纠错。关于Reed-Solomon算法的具体介绍,可以参阅周专、王锐撰写的论文《Reed-Solomon编解码原理与FPGA实现》(刊载于《航空电子技术》2009年第2期),在此就不具体赘述了。当然,根据需要也可以选择其他纠错算法。Any type of error correction algorithm can be used in the present invention as an error correction algorithm for the character encoding. For example, the commonly used Reed Solomon algorithm is used for error checking and error correction. For a detailed introduction to the Reed-Solomon algorithm, please refer to the paper "Reed-Solomon Codec Principle and FPGA Implementation" by Zhou Zhu and Wang Rui (published in "Avionics Technology", No. 2, 2009), which is not specific here. I will go into details. Of course, other error correction algorithms can be selected as needed.
本发明所提供的具有纠错功能的字符编码可以由纯字母或纯数字组成,也可以由数字和字母组合而成。字符编码的长度根据需要可以自由定义,一般是8个以上。The character code with error correction function provided by the present invention may be composed of pure letters or pure numbers, or may be composed of numbers and letters. The length of the character code can be freely defined as needed, generally 8 or more.
下面以表一所示的字符编码表为例,对本发明所提供的字符编码方法和字符解码方法进行介绍。The character encoding method and the character decoding method provided by the present invention are described below by taking the character encoding table shown in Table 1 as an example.
表一所示的字符编码表由10个数字和22个大写字母组成,共包括32个字符,每个字符对应一个5位的二进制数。当字符编码包括12个字符时,其所对应的二进制编码长度为60位。为了减少解码过程中的误读,在表一所示的字符编码表中,不使用与易读错数字8、1、0形状近似的字母B、I、O、Q。当去除上述四个字母后,32个字符 的形状区别较大,OCR设备容易识别,减少出错率。The character encoding table shown in Table 1 is composed of 10 numbers and 22 uppercase letters, and includes 32 characters in total, and each character corresponds to a 5-digit binary number. When the character encoding includes 12 characters, the corresponding binary encoding length is 60 bits. In order to reduce misreading during the decoding process, in the character encoding table shown in Table 1, the letters B, I, O, and Q which are similar in shape to the easy-to-read error numbers 8, 1, 0 are not used. 32 characters after removing the above four letters The difference in shape is large, and the OCR device is easy to recognize and reduces the error rate.
Figure PCTCN2016079114-appb-000001
Figure PCTCN2016079114-appb-000001
表一 字符编码表Table 1 Character Code Table
使用上述字符编码表生成具有8个字符的数据字符时,实际的数据最大值是328=1099511627776,如果数据长度不够可以把字符加长到9、10等,更长的数据长度意味着纠错率的降低,例如,数据长度为16,纠错数据为4,则其纠错率为2/20=10%。When using the above character encoding table to generate data characters with 8 characters, the actual data maximum value is 32 8 =1099511627776. If the data length is not enough, the characters can be lengthened to 9, 10, etc., and the longer data length means the error correction rate. The reduction, for example, the data length is 16, and the error correction data is 4, and the error correction rate is 2/20 = 10%.
表一是一个对应于32个值的字符编码表,实际使用中,根据需要也可以选用仅由数字、仅有字母或者由部分数字和部分字母组成的对应于多个值的其他字符编码表。例如可以使用常见的16进制数值进行编码。Table 1 is a character encoding table corresponding to 32 values. In actual use, other character encoding tables corresponding to a plurality of values composed of only numbers, only letters, or partial digits and partial letters may be selected as needed. For example, you can use common hexadecimal values for encoding.
如图2所示,本发明提供的具有纠错功能的字符编码方法,包括如下步骤:(1)设定纠错字符生成装置的纠错率;即设定可纠错的字符个数,如设定纠错1个字符;(2)根据字符编码表生成一组数据字符;字符编码表可根据需要任意选用(3)根据设置的纠错率,纠错字符生成装置使用纠错算法生成与数据字符对应的纠错字符;当使用Reed Solomon算法进行处理,生成的纠错字符的个数是设置纠错字符个数的2倍;(4)由步骤(2)生成的数据字符和步骤(3)生成的纠错字符组成具有纠错功能的字符编码。然后可以将字符编码设置在产 品上,用于对产品进行标记,字符编码可以分一行或多行设置在产品上。As shown in FIG. 2, the character encoding method with error correction function provided by the present invention includes the following steps: (1) setting an error correction rate of the error correction character generating device; that is, setting the number of characters that can be corrected, such as Set one error correction character; (2) generate a set of data characters according to the character encoding table; the character encoding table can be arbitrarily selected according to requirements; (3) according to the set error correction rate, the error correction character generating device generates and The error correction character corresponding to the data character; when processed by the Reed Solomon algorithm, the number of error correction characters generated is twice the number of error correction characters set; (4) the data characters and steps generated by the step (2) ( 3) The generated error correction characters constitute a character code with an error correction function. Then you can set the character encoding in production. On the product, used to mark the product, the character code can be set on the product in one or more lines.
当在步骤(1)中设置的纠错率为1个字符时,使用Reed Solomon算法进行纠错,假设数据字符的长度为N,则纠错率为1/(N+2×1)。此时在解码过程中,如果存在一个字符读错,则能被纠正过来,如果存在2个字符读错,则只能判断此数据字符存在错误,不能被纠正。在纠错个数一定的情况下,数据字符的个数越多,纠错率越低。When the error correction rate set in the step (1) is 1 character, the error correction is performed using the Reed Solomon algorithm, and if the length of the data character is N, the error correction rate is 1/(N + 2 × 1). At this time, in the decoding process, if there is a character reading error, it can be corrected. If there is a 2 character reading error, it can only be judged that the data character has an error and cannot be corrected. In the case where the number of error corrections is constant, the more the number of data characters, the lower the error correction rate.
以图1所示的字符编码为例,假设利用表一所示的字符编码表生成数据字符ACDE1234;设置需要纠错的字符个数为2;使用纠错字符生成装置利用纠错算法生成与数据字符对应的4个纠错字符,例如EGH2(此为示例,实际的纠错值需要根据具体的纠错算法获得);将数据字符和纠错字符组合在一起,即可形成具有纠错功能的字符编码,如ACDE1234EGH2。Taking the character encoding shown in FIG. 1 as an example, it is assumed that the data character ACDE1234 is generated by using the character encoding table shown in Table 1; the number of characters requiring error correction is set to 2; and the error correction character generating device is used to generate and data using the error correction algorithm. The four error correction characters corresponding to the character, such as EGH2 (this is an example, the actual error correction value needs to be obtained according to a specific error correction algorithm); combining the data characters and the error correction characters to form an error correction function Character encoding, such as ACDE1234EGH2.
如图3所示,本发明所提供的具有纠错功能的字符解码方法,用于对上述编码方法生成的字符编码进行解码;包括如下步骤:(1)获取字符编码的图像,并识别出每个字符所对应的数字或字母;(2)依据纠错率和纠错算法,将识别出的整组字符划分为数据字符和纠错字符;(3)纠错解码装置使用对应的纠错算法对字符编码进行纠错处理;如果纠错成功,则输出数据字符;如果纠错失败,则剔除整组数据字符编码。As shown in FIG. 3, the character decoding method with error correction function provided by the present invention is used for decoding the character encoding generated by the above encoding method; and the following steps are included: (1) acquiring a character encoded image and identifying each The number or letter corresponding to each character; (2) According to the error correction rate and the error correction algorithm, the entire set of characters recognized is divided into data characters and error correction characters; (3) the error correction decoding device uses the corresponding error correction algorithm Error correction processing is performed on the character encoding; if the error correction is successful, the data character is output; if the error correction fails, the entire data character encoding is eliminated.
具体来说,在步骤(1)中,可以利用OCR设备读取具有纠错功能的字符编码;使用OCR设备进行读取,识别率可达90%以上。在步骤(2)中,如果在编码过程中使用Reed Solomon算法进行处理,则可以首先根据纠错率T/(N+2T)和字符编码的长度(N+2T)计算出数据字符的长度N和纠错字符的长度2T,然后进行字符划分;其中,T为所需纠错的字符个数。当使用其他纠错算法时,同样可以首先根据纠错算法、纠错率和字符编码的长度计算出数据字符的长度和纠错字符的长度,然后进行字符划分。Specifically, in the step (1), the OCR device can be used to read the character code having the error correction function; when the OCR device is used for reading, the recognition rate can be more than 90%. In step (2), if the Reed Solomon algorithm is used for processing in the encoding process, the length of the data character N may be first calculated according to the error correction rate T/(N+2T) and the length of the character encoding (N+2T). And the length of the error correction character is 2T, and then the character division is performed; wherein T is the number of characters required for error correction. When other error correction algorithms are used, the length of the data characters and the length of the error correction characters can also be first calculated according to the error correction algorithm, the error correction rate, and the length of the character encoding, and then the character division is performed.
在上述步骤(3)中使用的纠错解码装置是输入字符编码后能判别错误和纠正错误的装置,当错误字符的个数少于或等于设定的纠错字符个数时,读错的字符可以被纠正,纠错成功;否则只能发现识别错 误而无法纠正错误字符,纠错失败。在步骤(3)中,纠错解码装置所用的纠错算法应与生成字符编码所用的纠错算法一致。The error correction decoding apparatus used in the above step (3) is a device capable of discriminating an error and correcting an error after inputting a character code, and when the number of error characters is less than or equal to the number of error correction characters set, the error is read. Characters can be corrected, error correction is successful; otherwise, only recognition errors can be found Errors can not correct the wrong characters, error correction failed. In step (3), the error correction algorithm used by the error correction decoding device should be identical to the error correction algorithm used to generate the character encoding.
由于本发明所提供的字符编码普遍设置在产品上使用,因此,在步骤(3)中,剔除整组数据字符编码的过程,也可以理解为剔除设置有该数据字符编码的产品的过程。在这种情况下,在步骤(3)中使用的剔除装置是指剔除不合格产品的装置。当然,在数据库中也不保存该纠错失败的数据字符。Since the character encoding provided by the present invention is generally set for use on a product, in step (3), the process of rejecting the entire set of data character encoding can also be understood as a process of culling a product provided with the data character encoding. In this case, the rejecting device used in the step (3) means a device that rejects the defective product. Of course, the data characters that failed the error correction are not saved in the database.
此外,在步骤(3)中,在纠错解码装置使用对应的纠错算法对字符编码进行纠错的过程中,还可以包括使用字符编码表将字符数据和纠错数据换算成对应数值的过程;然后进行纠错运算。In addition, in the step (3), in the process of correcting the character encoding by using the corresponding error correction algorithm, the error correction decoding device may further include a process of converting the character data and the error correction data into corresponding values using the character encoding table. Then perform error correction operations.
需要说明的是,上述的纠错字符生成装置、纠错解码装置和剔除设置等可以由FPGA或固件实现,也可以由运行在通用微处理器中的专用软件程序实现。其具体的实现方式是本领域普通技术人员都能掌握的常规技术手段,在此就不具体说明了。It should be noted that the above-mentioned error correction character generating device, error correction decoding device, culling setting, and the like may be implemented by an FPGA or firmware, or may be implemented by a dedicated software program running in a general-purpose microprocessor. The specific implementation manners are conventional technical means that can be grasped by those skilled in the art, and are not specifically described herein.
下面以图4和图5所示的瓶盖为例,对设置有具有纠错功能的字符编码的产品进行介绍。同时以该瓶盖为例,对生产该瓶盖的生产系统进行介绍。Next, the bottle cap shown in Figs. 4 and 5 will be taken as an example to introduce a product provided with a character code having an error correction function. At the same time, the bottle cap is taken as an example to introduce the production system for producing the cap.
为了防止窜货,现在许多产品上都设置有包含数据字符的字符编码,在企业生产产品时,通过喷码机、激光机等设备把具有防窜货功能的字符编码设置在产品上。然后,在产品出厂前,使用OCR技术识别并将识别的字符编码存入数据库中,供后续的信息查询。由于OCR技术的局限性,OCR设备读取字符编码时,可能存在字符不能读取和误读的情况。其中,当字符不能读取即不能识别时,可以直接对产品做剔除处理;但是,对于误读则无法判别,例如当把B误读为8时,OCR技术无法判别误读是否发生。而且,在销售过程中,也容易出现误读的情况;现有技术中,对于误读通常的方法是把读取的数据与数据库做比较,但是由于数据量大、查询速度慢等原因,实际应用中很难操作。In order to prevent stockpiling, many products are now equipped with character codes containing data characters. When the company produces products, the character codes with anti-smashing functions are set on the products by means of printers, laser machines and the like. Then, before the product leaves the factory, the OCR technology is used to identify and store the recognized character code in the database for subsequent information inquiry. Due to the limitations of OCR technology, when OCR devices read character encoding, there may be cases where characters cannot be read and misread. Among them, when the character cannot be read and cannot be recognized, the product can be directly culled; however, it cannot be discriminated for misreading. For example, when B is misread as 8, the OCR technology cannot determine whether misreading has occurred. Moreover, in the sales process, misreading is also prone to occur; in the prior art, the usual method for misreading is to compare the read data with the database, but due to the large amount of data and slow query speed, the actual It is difficult to operate in the application.
为此,本发明提供了这种设置有上述字符编码的产品,其中,字符编码由数据字符和其所对应的纠错字符组成。如上述编码方法所述,当输入数据字符后,纠错字符生成装置根据纠错率和纠错算法生成纠 错字符。然后由数据字符和纠错字符组成字符编码,并将之设置在产品上。不同的产品上设置的字符编码的对应值不同,可作为产品编码使用,用于在生产和销售过程中进行窜货查询。To this end, the present invention provides such a product provided with the above character encoding, wherein the character encoding is composed of data characters and their corresponding error correcting characters. As described in the above encoding method, after inputting data characters, the error correction character generating means generates an error based on the error correction rate and the error correction algorithm. Wrong character. The character code is then composed of data characters and error correction characters and placed on the product. The corresponding values of the character codes set on different products are different and can be used as product codes for inquiring in the production and sales process.
此外,随着智能手机的普及,二维码识别软件成为手机的必备软件,大量的手机应用含有二维码识别功能。企业为了吸引用户消费产品,在很多产品上设置有积分抽奖二维码,为了防止用户在购买前扫描二维码,积分抽奖二维码通常隐藏在产品包装里,只有购买后通过破坏包装才能获得二维码。因此,在数据库中需要将字符编码与二维码关联,从而厂商可以通过读取设置在产品上的字符编码,判断对应的二维码的去向。通过在后台数据库中对参加活动的二维码的属性等进行设置,可以保证产品营销活动的正常进行。In addition, with the popularity of smart phones, QR code recognition software has become a must-have software for mobile phones, and a large number of mobile phone applications contain two-dimensional code recognition functions. In order to attract users to consume products, enterprises have set the lottery two-dimensional code on many products. In order to prevent users from scanning the QR code before purchase, the integral lottery two-dimensional code is usually hidden in the product packaging, and only after the purchase is destroyed by the packaging. QR code. Therefore, in the database, the character encoding needs to be associated with the two-dimensional code, so that the manufacturer can judge the destination of the corresponding two-dimensional code by reading the character encoding set on the product. By setting the attributes of the participating QR codes in the back-end database, etc., the product marketing activities can be guaranteed to proceed normally.
上述这种设置有具有纠错功能的字符编码和二维码的产品及生产系统,尤其适合在各种瓶盖如皇冠盖等使用。在出厂前,通过视觉识别设备对设置在瓶盖上的二维码和字符编码进行识别并将两者关联存储于后台数据库中,可以保证瓶盖的正常销售。The above-mentioned product and production system provided with character encoding and two-dimensional code with error correction function are particularly suitable for use in various caps such as crown caps and the like. Before the factory, the two-dimensional code and character code set on the bottle cap are identified by the visual recognition device and the two are stored in the background database to ensure the normal sale of the bottle cap.
具体来说,如图4和图5所示的皇冠盖,包括盖体11。在盖体11的里侧向下依次设置有二维码14、胶层和食用密封胶垫15。食用密封胶垫15设置于二维码14和胶层的表面。食用密封胶垫15采用食用硅胶材质,通过设置食用密封胶垫15可以使二维码14与瓶内液体隔绝,避免液体溶解并破坏二维码14,同时避免二维码14对瓶内液体造成污染。Specifically, the crown cap shown in FIGS. 4 and 5 includes a cover body 11. A two-dimensional code 14, a glue layer, and an edible sealant pad 15 are sequentially disposed downward on the inner side of the lid body 11. The edible sealant pad 15 is disposed on the surface of the two-dimensional code 14 and the adhesive layer. The edible sealing rubber pad 15 is made of edible silica gel material, and the two-dimensional code 14 can be insulated from the liquid in the bottle by setting the edible sealing rubber pad 15 to prevent the liquid from dissolving and destroying the two-dimensional code 14, and avoiding the two-dimensional code 14 from causing liquid in the bottle. Pollution.
在盖体11的顶侧向上依次设置有底油层和面油层。其中,通过激光雕刻等工艺去除面油层的部分面积后,露出的可视的底油层形成字符编码13。通过改变激光雕刻的路径,可以形成对应于不同数值的字符编码13。字符编码13由数据字符和纠错字符组成,字符编码13由上述编码方法获得。字符编码13可以由字母和/或数字组成,长度较短,便于生产过程中识别,识别速度较快。字符编码13可分一行或多行排列。为了不影响产品外观,底油层可采用荧光油墨或透明油墨。此外,在底油层和面油层之间还可以设置印刷图案。A bottom oil layer and a surface oil layer are disposed in this order on the top side of the lid body 11. Wherein, after removing a part of the area of the surface oil layer by a process such as laser engraving, the exposed visible oil layer forms a character code 13. By changing the path of laser engraving, character codes 13 corresponding to different values can be formed. The character code 13 is composed of data characters and error correction characters, and the character code 13 is obtained by the above encoding method. The character code 13 can be composed of letters and/or numbers, has a short length, is easy to recognize in the production process, and has a fast recognition speed. The character code 13 can be arranged in one or more lines. In order not to affect the appearance of the product, the base oil layer may be a fluorescent ink or a transparent ink. Further, a printed pattern may be disposed between the base oil layer and the oil layer.
对于上述瓶盖,二维码14和字符编码13被识别后在后台相关联,具有唯一对应关系,从而构成瓶盖的两个标识码。其中,设置在不同 瓶盖上的二维码互不相同,设置在不同瓶盖上的字符编码也互不相同,两个标识码分别成为瓶盖的身份标识。二维码14可用于消费者破坏包装之后参加积分、抽奖等活动使用。将二维码信息层14设置在盖体1里侧(即内表面),可以防止参加活动的二维码在销售过程中被损坏或被仿冒。设置在盖体顶侧的字符编码13可以用于在生产和销售过程中防窜货使用。For the above cap, the two-dimensional code 14 and the character code 13 are identified and associated in the background, having a unique correspondence, thereby constituting two identification codes of the cap. Among them, set in different The two-dimensional codes on the caps are different from each other, and the character codes set on different caps are different from each other, and the two identification codes respectively become the identity of the cap. The QR code 14 can be used for activities such as points, lotteries, and the like after the consumer destroys the package. By arranging the two-dimensional code information layer 14 on the inner side (i.e., the inner surface) of the cover 1, it is possible to prevent the participating two-dimensional code from being damaged or counterfeited during the sales process. The character code 13 provided on the top side of the cover can be used for anti-smuggling during production and sales.
由于使用这种具有纠错功能的字符编码对产品进行标记。在识别过程中,如果对设置在产品上的字符编码纠错成功,则将该产品的字符数据存入数据库,并将之与设置在产品背面的二维码关联存储。如果对设置在产品上的字符编码纠错不成功,则判断上述字符编码识别错误,从而剔除与之对应的产品,并删除数据库中的相关数据,从而可以保证进入销售环节的产品上的字符编码100%可识别。而在销售过程中,生产厂商或经销商通过识别瓶盖外侧的字符编码可以获知产品的去向,进行防窜货查询;并且,通过识别瓶盖外侧的字符编码还可以确定瓶盖里侧的二维码,从而通过调整二维码的中奖范围,可以保证营销活动的正常进行。而通过在每个瓶盖内侧设置不同的二维码,使得每瓶饮料或啤酒具有唯一的身份,消费者可通过获取二维码参与厂商的活动。The product is marked by the use of such character encoding with error correction. In the identification process, if the error correction of the character encoding set on the product is successful, the character data of the product is stored in the database and stored in association with the two-dimensional code set on the back of the product. If the error correction of the character encoding set on the product is unsuccessful, the above-mentioned character encoding recognition error is judged, thereby eliminating the corresponding product, and deleting the relevant data in the database, thereby ensuring the character encoding on the product entering the sales link. 100% identifiable. In the sales process, the manufacturer or the dealer can know the whereabouts of the product by identifying the character code on the outside of the bottle cap, and carry out the anti-smuggling inquiry; and, by identifying the character code on the outside of the cap, the second side of the cap can be determined. Dimensional code, so that by adjusting the winning range of the QR code, the marketing activities can be guaranteed to proceed normally. By setting a different two-dimensional code on the inside of each cap, each bottle of beverage or beer has a unique identity, and the consumer can participate in the manufacturer's activities by acquiring the two-dimensional code.
综上所述,本发明提供的字符编码方法和字符解码方法,用于对具有纠错功能的字符编码进行编码和解码。当在产品上设置这种具有纠错功能的字符编码,可以通过纠错算法判断字符编码的识别是否存在错误,可以保证只有纠错成功的数据字符才能存入系统,纠错失败的数据字符100%被剔除处理,从而保证数据系统中不存在误读数据,并避免销售过程中发生数据误读的情况。In summary, the present invention provides a character encoding method and a character decoding method for encoding and decoding a character encoding having an error correction function. When such a character encoding with error correction function is set on the product, it is possible to judge whether there is an error in the recognition of the character encoding through the error correction algorithm, and it can be ensured that only the data characters with successful error correction can be stored in the system, and the data character 100 that fails the error correction is ensured. % is culled to ensure that there are no misreading data in the data system and to avoid data misreading during the sales process.
上面对本发明所提供的具有纠错功能的字符编码方法、字符解码方法及其产品进行了详细的说明。对本领域的一般技术人员而言,在不背离本发明实质精神的前提下对它所做的任何显而易见的改动,都应属于本发明的保护范围。 The character encoding method, the character decoding method, and the product thereof having the error correction function provided by the present invention have been described in detail above. Any obvious modifications made to it by those skilled in the art without departing from the spirit of the invention should fall within the scope of the invention.

Claims (14)

  1. 一种具有纠错功能的字符编码方法,其特征在于包括如下步骤:A character encoding method with error correction function, comprising the following steps:
    (1)根据字符编码表生成一组数据字符;(1) generating a set of data characters according to the character encoding table;
    (2)根据预先设置的纠错率,使用纠错算法生成与所述数据字符对应的纠错字符;(2) generating an error correction character corresponding to the data character using an error correction algorithm according to a preset error correction rate;
    (3)由数据字符和对应的纠错字符组成具有纠错功能的字符编码。(3) A character code having an error correction function is composed of data characters and corresponding error correction characters.
  2. 如权利要求1所述的字符编码方法,其特征在于:A character encoding method according to claim 1, wherein:
    在所述步骤(1)中所使用的字符编码表,包括多个数字和多个字母,并且,不同的数字和不同的字母分别代表不同的数值。The character encoding table used in the step (1) includes a plurality of numbers and a plurality of letters, and different numbers and different letters respectively represent different numerical values.
  3. 如权利要求2所述的字符编码方法,其特征在于:A character encoding method according to claim 2, wherein:
    所述字符编码表中不包括形状与任一数字形状接近的字母。Letters whose shapes are close to any of the numerical shapes are not included in the character encoding table.
  4. 如权利要求1所述的字符编码方法,其特征在于:A character encoding method according to claim 1, wherein:
    在所述步骤(2)中,所使用的纠错算法为Reed Solomon算法。In the step (2), the error correction algorithm used is the Reed Solomon algorithm.
  5. 如权利要求4所述的字符编码方法,其特征在于:A character encoding method according to claim 4, wherein:
    所述数据字符的长度为N,所需纠错的字符个数为T,则字符编码的长度为N+2T,2T为纠错字符的个数;所述字符编码所对应的纠错率为T/(N+2T)。The length of the data character is N, the number of characters to be error-corrected is T, and the length of the character encoding is N+2T, and 2T is the number of error-correcting characters; the error correction rate corresponding to the character encoding is T/(N+2T).
  6. 如权利要求1所述的字符编码方法,其特征在于:A character encoding method according to claim 1, wherein:
    所述字符编码由数字和/或字母组成。The character code consists of numbers and/or letters.
  7. 一种具有纠错功能的字符解码方法,其特征在于包括如下步骤:A character decoding method with error correction function, comprising the following steps:
    (1)获取字符编码的图像,并识别出每个字符所对应的数字或字母;(1) Obtain an image of character encoding and identify the number or letter corresponding to each character;
    (2)依据纠错算法和纠错率,将识别出的整组字符划分为数据字符和纠错字符;(2) According to the error correction algorithm and the error correction rate, the identified entire set of characters are divided into data characters and error correction characters;
    (3)使用对应的纠错算法对所述字符编码进行纠错处理;如果纠错成功,则删除纠错字符后输出数据字符;如果纠错失败,则剔除整组数据字符编码。 (3) performing error correction processing on the character encoding using a corresponding error correction algorithm; if the error correction is successful, outputting the data character after deleting the error correction character; if the error correction fails, the entire data character encoding is eliminated.
  8. 如权利要求7所述的字符解码方法,其特征在于:A character decoding method according to claim 7, wherein:
    在所述步骤(2)和所述步骤(3)中使用的纠错算法为Reed Solomon算法。The error correction algorithm used in the step (2) and the step (3) is the Reed Solomon algorithm.
  9. 如权利要求8所述的字符解码方法,其特征在于:A character decoding method according to claim 8, wherein:
    在所述步骤(2)中,根据纠错率T/(N+2T)和所述字符编码的长度(N+2T)计算出数据字符的长度N和纠错字符的长度2T,然后进行划分;其中,T为所需纠错的字符个数。In the step (2), the length N of the data character and the length 2T of the error correction character are calculated according to the error correction rate T/(N+2T) and the length of the character encoding (N+2T), and then divided. Where T is the number of characters required for error correction.
  10. 如权利要求7所述的字符解码方法,其特征在于:A character decoding method according to claim 7, wherein:
    在步骤(3)中,使用纠错算法对所述字符编码进行纠错处理的过程中,还包括使用字符编码表将数据字符和纠错字符换算成对应数值的过程;其中,所述字符编码表包括多个数字和多个字母,并且,不同的数字和不同的字母代表不同的数值。In the step (3), in the process of performing error correction processing on the character encoding using an error correction algorithm, the method further includes converting a data character and an error correction character into a corresponding numerical value by using a character encoding table; wherein the character encoding The table includes a plurality of numbers and a plurality of letters, and different numbers and different letters represent different values.
  11. 如权利要求10所述的字符解码方法,其特征在于:A character decoding method according to claim 10, wherein:
    所述字符编码表中不包括形状与任一数字形状接近的字母。Letters whose shapes are close to any of the numerical shapes are not included in the character encoding table.
  12. 一种设置有字符编码的产品,其特征在于:所述字符编码由数据字符和纠错字符组成,并通过权利要求1至6中任意一项所述的字符编码方法获得。A product provided with a character code, characterized in that the character code is composed of a data character and an error correction character, and is obtained by the character encoding method according to any one of claims 1 to 6.
  13. 如权利要求12所述的产品,其特征在于:The product of claim 12 wherein:
    所述产品是瓶盖,所述字符编码设置在所述瓶盖的顶面,设置在不同瓶盖上的所述字符编码不同。The product is a bottle cap, and the character code is disposed on a top surface of the cap, and the character codes provided on different caps are different.
  14. 如权利要求13所述的产品,其特征在于:The product of claim 13 wherein:
    在所述瓶盖的里面设置有二维码,每个瓶盖上设置的二维码不同;所述二维码与所述字符编码在数据库中进行关联。 A two-dimensional code is disposed inside the cap, and a two-dimensional code disposed on each cap is different; the two-dimensional code is associated with the character encoding in a database.
PCT/CN2016/079114 2015-06-26 2016-04-12 Character encoding method and character decoding method having error correction function and product thereof WO2016206446A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2015103631857 2015-06-26
CN201510363185.7A CN104899612A (en) 2015-06-26 2015-06-26 Character coding method with error correction function, character decoding method with error correction function, and product

Publications (1)

Publication Number Publication Date
WO2016206446A1 true WO2016206446A1 (en) 2016-12-29

Family

ID=54032266

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/079114 WO2016206446A1 (en) 2015-06-26 2016-04-12 Character encoding method and character decoding method having error correction function and product thereof

Country Status (2)

Country Link
CN (1) CN104899612A (en)
WO (1) WO2016206446A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114519856A (en) * 2022-01-26 2022-05-20 西北工业大学 Post-processing judgment and correction method for aviation engine blade character clear code recognition result

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899612A (en) * 2015-06-26 2015-09-09 信码互通(北京)科技有限公司 Character coding method with error correction function, character decoding method with error correction function, and product
EP3367305A1 (en) * 2015-10-25 2018-08-29 Alva Alta, Lda Packaging recognisable by different types of means, system and method for preparing edible products on the basis of said recognisable packaging
CN111652541B (en) * 2020-05-07 2022-11-01 美的集团股份有限公司 Industrial production monitoring method, system and computer readable storage medium
CN117375623B (en) * 2023-10-11 2024-05-24 广东技术师范大学 Binary-based mold coding and identifying method, storage device and intelligent terminal

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1123929A (en) * 1994-10-24 1996-06-05 北方交通大学 Writing and reading method for computer symbols
US20030106013A1 (en) * 2001-11-21 2003-06-05 Jarchi Michael D. Architecture for multi-symbol encoding and decoding
CN1885725A (en) * 2006-07-12 2006-12-27 中国物品编码中心 Error correction coding method
CN101127530A (en) * 2007-08-27 2008-02-20 北京航空航天大学 A relevant forward error correction coding and decoding method based on frames
CN101459431A (en) * 2008-12-30 2009-06-17 北京大学 Decoding method for channel error correcting BCH code and RS code
CN102611463A (en) * 2012-04-09 2012-07-25 上海交通大学 Cascade coding and decoding system and method of multi-system low-density parity check code
CN103986476A (en) * 2014-05-21 2014-08-13 北京京东尚科信息技术有限公司 Cascading error-correction encoding method and device for quick response code
CN104899612A (en) * 2015-06-26 2015-09-09 信码互通(北京)科技有限公司 Character coding method with error correction function, character decoding method with error correction function, and product

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102592160B (en) * 2012-01-17 2014-08-13 浙江工商大学 Character two-dimension code encoding and decoding method for short message
CN104143109B (en) * 2014-01-28 2017-04-05 深圳市雁联计算系统有限公司 A kind of coding and decoding methods and its printed article of Quick Response Code

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1123929A (en) * 1994-10-24 1996-06-05 北方交通大学 Writing and reading method for computer symbols
US20030106013A1 (en) * 2001-11-21 2003-06-05 Jarchi Michael D. Architecture for multi-symbol encoding and decoding
CN1885725A (en) * 2006-07-12 2006-12-27 中国物品编码中心 Error correction coding method
CN101127530A (en) * 2007-08-27 2008-02-20 北京航空航天大学 A relevant forward error correction coding and decoding method based on frames
CN101459431A (en) * 2008-12-30 2009-06-17 北京大学 Decoding method for channel error correcting BCH code and RS code
CN102611463A (en) * 2012-04-09 2012-07-25 上海交通大学 Cascade coding and decoding system and method of multi-system low-density parity check code
CN103986476A (en) * 2014-05-21 2014-08-13 北京京东尚科信息技术有限公司 Cascading error-correction encoding method and device for quick response code
CN104899612A (en) * 2015-06-26 2015-09-09 信码互通(北京)科技有限公司 Character coding method with error correction function, character decoding method with error correction function, and product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114519856A (en) * 2022-01-26 2022-05-20 西北工业大学 Post-processing judgment and correction method for aviation engine blade character clear code recognition result
CN114519856B (en) * 2022-01-26 2024-02-09 西北工业大学 Post-processing judgment correction method for character plaintext recognition result of aero-engine blade

Also Published As

Publication number Publication date
CN104899612A (en) 2015-09-09

Similar Documents

Publication Publication Date Title
WO2016206446A1 (en) Character encoding method and character decoding method having error correction function and product thereof
CN108334922B (en) Dot matrix two-dimensional code and encoding and identifying method thereof
US9104936B2 (en) Machine reading of printed data
US7792371B2 (en) Method and device for generating image code and method and device for decoding image code
CN112884718B (en) Method, device, system and storage medium for detecting packaging code-spraying character
CN102930192A (en) Method for generating and acquiring safety information and relevant devices
CN110647956A (en) Invoice information extraction method combined with two-dimensional code recognition
CN108073966A (en) A kind of conversion method of Quick Response Code and hole horizontal and vertical parity check code
EP3561729B1 (en) Method for detecting and recognising long-range high-density visual markers
CN114005126A (en) Table reconstruction method and device, computer equipment and readable storage medium
CN110889304A (en) Two-dimensional code quality evaluation method and device, storage medium, electronic device and system
CN109299628B (en) Bar code decoding method and device
JP2007511342A (en) Video coding method and apparatus using parity check matrix
CN107016317B (en) Bar code decoding method and device
CN115700590A (en) Commodity information representation method and system based on dot matrix image and application thereof
JP2012084132A (en) Character recognition device, character recognition method, and sorting device
CN111598199A (en) Two-dimensional code generation method
US9530039B2 (en) Identifier eligibility
JP3392596B2 (en) Mail barcode processing system
JP3272919B2 (en) Barcode printing system
KR20030028777A (en) CRS-CODE and CRS-CODE encoding and decoding method of the same
CN207097033U (en) A kind of two-dimensional matrix point horizontal and vertical parity check code based on BCD codings
JPH0362280A (en) Character reading device
CN114169483A (en) Design and identification system of Dot point set code
CN114463426A (en) Method and system for designing and identifying parallelogram point cloud code based on triangular segmentation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16813562

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16813562

Country of ref document: EP

Kind code of ref document: A1