CN112989862A - Bar code checking method and device, storage medium and electronic equipment - Google Patents

Bar code checking method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112989862A
CN112989862A CN202110183006.7A CN202110183006A CN112989862A CN 112989862 A CN112989862 A CN 112989862A CN 202110183006 A CN202110183006 A CN 202110183006A CN 112989862 A CN112989862 A CN 112989862A
Authority
CN
China
Prior art keywords
data bit
bar code
information
data
barcode
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.)
Pending
Application number
CN202110183006.7A
Other languages
Chinese (zh)
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.)
Beijing SoundAI Technology Co Ltd
Original Assignee
Beijing SoundAI 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 Beijing SoundAI Technology Co Ltd filed Critical Beijing SoundAI Technology Co Ltd
Priority to CN202110183006.7A priority Critical patent/CN112989862A/en
Publication of CN112989862A publication Critical patent/CN112989862A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14131D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/1434Barcodes with supplemental or add-on codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • G06K7/1473Methods for optical code recognition the method including quality enhancement steps error correction

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a bar code checking method, a bar code checking device, a storage medium and electronic equipment, and relates to the technical field of medical detection. The barcode checking method can respectively obtain the data bit parameters and the checking parameters in the barcode picture, check the barcode information in the barcode picture based on the data bit parameters and the checking parameters, output the content of the barcode when the checking result is that the checking passes, and output the prompt information of barcode reading errors when the checking result is that the checking does not pass. Therefore, the bar code with the reading error can be removed according to the verification result of the bar code information, the accuracy and the integrity of the bar code reading are improved, the relevant personnel corresponding to the detection result can be determined, and the detection result is informed to the relevant personnel.

Description

Bar code checking method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of medical detection, in particular to a bar code checking method, a bar code checking device, a storage medium and electronic equipment.
Background
When the nucleic acid detection is performed on a person, a test tube with a bar code attached thereto is needed, the number information of the person performing the nucleic acid detection can be acquired by reading the content of the bar code, and then the detection result of the nucleic acid detection is notified to the related person according to the number information of the person.
However, in the process of collecting nucleic acid information of a person through a test tube or detecting the nucleic acid information, the barcode is easily contaminated, and the situation may cause errors or incompleteness in reading the barcode. And in the process of reading the bar code, the bar code is blocked, so that the finally read bar code is wrong or incomplete. If the read bar code is wrong or incomplete, the relevant person corresponding to the detection result cannot be determined, and the relevant person cannot be notified.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present application provide a barcode checking method, apparatus, storage medium, and electronic device, which can improve the correctness and integrity of reading a barcode.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a barcode checking method, including:
respectively acquiring data bit parameters and verification parameters in a bar code picture;
based on the data bit parameters and the verification parameters, verifying the bar code information in the bar code picture;
and if the verification result is that the verification fails, outputting prompt information of bar code reading errors.
The barcode checking method provided by the embodiment of the application can respectively obtain the data bit parameter and the checking parameter in the barcode picture, check the barcode information in the barcode picture based on the data bit parameter and the checking parameter, output the content of the barcode when the checking result is that the checking passes, and output the prompt information of the barcode reading error when the checking result is that the checking does not pass. Therefore, the bar code with the reading error can be removed according to the verification result of the bar code information, the correctness and the integrity of the reading of the bar code are improved, the relevant personnel corresponding to the detection result can be determined, and the relevant personnel can be informed of the detection result.
In an optional embodiment, the data bit parameter is data bit content in the barcode information, and the check parameter is a check bit value in the barcode information;
the verifying the barcode information in the barcode picture based on the data bit parameter and the verification parameter includes:
determining the number to be checked corresponding to the bar code information according to the data bit content;
and if the number to be verified and the check digit value do not accord with the preset condition, determining that the verification result is that the verification fails.
In this embodiment, the data bit parameter is data bit content in the barcode information, and the check parameter is a check bit value in the barcode information, so that the number to be checked corresponding to the barcode information can be determined according to the data bit content, and when the number to be checked and the check bit value do not meet the preset condition, the check result can be determined as a check failure. Therefore, the verification result for verifying the bar code information can be determined according to the comparison result of the number to be verified and the verification bit value determined according to the data bit content, so that the verification accuracy for verifying the bar code is improved.
In an optional embodiment, the determining, according to the content of the data bit, a number to be checked corresponding to the barcode information includes:
determining a data bit value corresponding to the bar code information according to the data bit content in the bar code information;
summing the data bit values corresponding to the bar code information to obtain the data sum; or, multiplying each data bit value corresponding to the bar code information by the corresponding preset coefficient to obtain a weighted data bit value corresponding to each data bit value; summing the weighted data bit values to obtain a data sum; or selecting a set number of data bit values from the data bit values corresponding to the bar code information, and summing the set number of data bit values to obtain the data sum; or, selecting a set number of data bit values from the data bit values corresponding to the barcode information, multiplying each data bit value of the set number of data bit values by a corresponding preset coefficient to obtain a set number of weighted data bit values, and summing the set number of weighted data bit values to obtain the sum of data;
taking the data and the number to be checked corresponding to the bar code information; or performing modular operation on the data sum and a set numerical value to obtain the data sum corresponding to the remainder, and taking the remainder as the number to be checked corresponding to the bar code information.
In this embodiment, the data bit values corresponding to the barcode information may be determined according to the data bit contents in the barcode information, the sum of data may be obtained by summing the data bit values corresponding to the barcode information, or a weighted data bit value corresponding to each data bit value may be obtained by multiplying the data bit values corresponding to the barcode information by a corresponding preset coefficient, and then summing the weighted data bit values, or a sum of data may be obtained by selecting a set number of data bit values from the data bit values corresponding to the barcode information and summing the set number of data bit values, or a preset coefficient may be multiplied by each data bit value in the set number of data bit values, and obtaining the weighted data bit values of the set number, and summing the weighted data bit values of the set number to obtain the data sum. After the data sum is obtained, the data sum can be used as a number to be checked corresponding to the bar code information, or the data sum and a set numerical value are subjected to modular operation to obtain the data sum corresponding to a remainder, and the remainder is used as the number to be checked corresponding to the bar code information. Therefore, the number to be verified corresponding to the bar code information can be accurately determined.
In an optional embodiment, the separately acquiring the data bit parameter and the verification parameter in the barcode picture includes:
recognizing data information in the bar code picture by adopting an Optical Character Recognition (OCR) method; the data information comprises data bit content and a check bit value;
determining a data bit value corresponding to the data information according to the data bit content in the data information;
and taking the data bit value as the data bit parameter, and taking the check bit value in the data information as the check parameter.
In this embodiment, the data information in the barcode picture, which includes the data bit content and the check bit value, may be identified by using an OCR method. The data bit value corresponding to the data information can be determined according to the data bit content in the data information, then the data bit value is used as the data bit parameter, and the check bit value in the data information is used as the check parameter, so that the data bit parameter and the check parameter corresponding to the bar code information can be determined through an OCR method, and the check process of the bar code information can be completed.
In an optional embodiment, the data bit parameter is the number of data bits in the barcode information, and the check parameter is a check bit value in the barcode information; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content in the bar code picture, and the check parameter is the data bit content in the data information in the bar code picture; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content of target bar code information in the bar code information acquired for multiple times, and the verification parameter is the data bit content of other bar code information except the target bar code information in the bar code information acquired for multiple times; the target bar code information is bar code information acquired at any time.
In this embodiment, when the data bit parameter is the number of data bits in the barcode information, the check parameter may be a check bit value in the barcode information. When the data bit parameter is the data bit content in the barcode within the barcode picture, the verification parameter may be the data bit content in the data information within the barcode picture. When the data bit parameter is the data bit content of the target barcode information in the barcode information acquired multiple times, the verification parameter may be the data bit content of other barcode information except the target barcode information in the barcode information acquired multiple times, and the target barcode information is the barcode information acquired at any time. Therefore, the data bit parameters and the verification parameters corresponding to the bar code information can be determined in various ways.
In an optional embodiment, the verifying the barcode information in the barcode picture based on the data bit parameter and the verification parameter includes:
comparing the data bit parameter with the check parameter;
and if the data bit parameter is inconsistent with the verification parameter, determining that the verification result is verification failure.
In this embodiment, after the data bit parameter and the verification parameter corresponding to the barcode information are determined, the data bit parameter and the verification parameter may be compared, and when the data bit parameter is inconsistent with the verification parameter, the verification result is determined to be that the verification fails. Therefore, after the data bit parameters and the check parameters corresponding to the bar code information are determined, the bar code can be checked.
In an optional embodiment, the data bit parameter is a data bit content in a barcode in the barcode picture, and the verification parameter is a data bit content in data information in the barcode picture; the respectively obtaining of the data bit parameter and the check parameter in the barcode picture includes:
identifying a bar code in a bar code picture, and taking the data bit content in the identified bar code as the data bit parameter; and recognizing data information in the bar code picture by adopting an OCR (optical character recognition), and taking the data bit content in the data information as the verification parameter.
In this embodiment, the data bit parameter may be a data bit content in a barcode picture, the verification parameter may be a data bit value in data information in the barcode picture, the barcode in the barcode picture may be identified, the data bit content in the barcode obtained by identification is used as the data bit parameter, the data information in the barcode picture is identified by using OCR, and the data bit content in the data information is used as the verification parameter. Therefore, the data bit content obtained by identifying the bar code can be compared with the data bit content obtained by identifying the data information in the bar code picture through the OCR so as to complete the verification of the bar code information.
In a second aspect, an embodiment of the present application further provides a barcode checking apparatus, including:
the parameter acquisition unit is used for respectively acquiring data bit parameters and verification parameters in the bar code picture;
the information checking unit is used for checking the bar code information in the bar code picture based on the data bit parameters and the checking parameters;
and the prompt information output unit is used for outputting prompt information of bar code reading errors if the verification result is that the verification fails.
In an optional embodiment, the data bit parameter is data bit content in the barcode information, and the check parameter is a check bit value in the barcode information; the information checking unit is specifically used for:
determining the number to be checked corresponding to the bar code information according to the data bit content;
and if the number to be verified and the check digit value do not accord with the preset condition, determining that the verification result is that the verification fails.
In an optional embodiment, the information checking unit is further configured to:
determining a data bit value corresponding to the bar code information according to the data bit content in the bar code information;
summing the data bit values corresponding to the bar code information to obtain the data sum; or, multiplying each data bit value corresponding to the bar code information by the corresponding preset coefficient to obtain a weighted data bit value corresponding to each data bit value; summing the weighted data bit values to obtain a data sum; or selecting a set number of data bit values from the data bit values corresponding to the bar code information, and summing the set number of data bit values to obtain the data sum; or, selecting a set number of data bit values from the data bit values corresponding to the barcode information, multiplying each data bit value of the set number of data bit values by a corresponding preset coefficient to obtain a set number of weighted data bit values, and summing the set number of weighted data bit values to obtain the sum of data;
taking the data and the number to be checked corresponding to the bar code information; or performing modular operation on the data sum and a set numerical value to obtain the data sum corresponding to the remainder, and taking the remainder as the number to be checked corresponding to the bar code information.
In an optional embodiment, the parameter obtaining unit is specifically configured to:
recognizing data information in the bar code picture by adopting an Optical Character Recognition (OCR) method; the data information comprises data bit content and a check bit value;
determining a data bit value corresponding to the data information according to the data bit content in the data information;
and taking the data bit value as the data bit parameter, and taking the check bit value in the data information as the check parameter.
In an optional embodiment, the data bit parameter is the number of data bits in the barcode information, and the check parameter is a check bit value in the barcode information; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content in the bar code picture, and the check parameter is the data bit content in the data information in the bar code picture; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content of target bar code information in the bar code information acquired for multiple times, and the verification parameter is the data bit content of other bar code information except the target bar code information in the bar code information acquired for multiple times; the target bar code information is bar code information acquired at any time.
In an optional embodiment, the information checking unit is further configured to:
comparing the data bit parameter with the check parameter;
and if the data bit parameter is inconsistent with the verification parameter, determining that the verification result is verification failure.
In an optional embodiment, the data bit parameter is a data bit content in a barcode in the barcode picture, and the verification parameter is a data bit content in data information in the barcode picture; the parameter obtaining unit is further configured to:
identifying a bar code in a bar code picture, and taking the data bit content in the identified bar code as the data bit parameter; and recognizing data information in the bar code picture by adopting an OCR (optical character recognition), and taking the data bit content in the data information as the verification parameter.
In a third aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the processor is enabled to implement the barcode checking method according to the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the barcode checking method of the first aspect is implemented.
For technical effects brought by any one implementation manner of the second aspect, the third aspect, or the fourth aspect, reference may be made to technical effects brought by the implementation manner of the first aspect, and details are not described here.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a barcode checking method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a barcode picture according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of barcode information provided in an embodiment of the present application;
FIG. 4 is a schematic view of another barcode picture provided in the embodiments of the present application;
FIG. 5 is a schematic view of another barcode information provided in the embodiments of the present application;
FIG. 6 is a schematic view of another barcode information provided in the embodiments of the present application;
FIG. 7 is a schematic view of another barcode information provided in the embodiments of the present application;
FIG. 8 is a schematic view of another barcode information provided in the embodiments of the present application;
FIG. 9 is a flowchart of another bar code verification method provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of a barcode checking apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that the terms "first," "second," and the like, as used herein, are used interchangeably to distinguish between similar elements and not necessarily to describe a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The present application will be described in further detail with reference to the following drawings and specific embodiments.
The word "exemplary" is used hereinafter to mean "serving as an example, embodiment, or illustration. Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
With the frequent occurrence of epidemic situations, the universal nucleic acid detection for the majority of people has become more and more important. Medical personnel can adopt the test tube attached with the bar code when carrying out nucleic acid detection on personnel who receive nucleic acid detection, and through reading the content of bar code, just can acquire the serial number information of the personnel who carry out nucleic acid detection very conveniently, and then according to personnel's serial number information, inform relevant personnel with nucleic acid detection's testing result. In the process of collecting the nucleic acid information of personnel through the test tube or detecting the nucleic acid information, the bar code is easily polluted, and the conditions can cause that the read bar code is wrong or incomplete. In the process of reading the bar code, the bar code is blocked, and the finally read bar code is wrong or incomplete. If the read bar code is wrong or incomplete, the relevant person corresponding to the detection result cannot be determined, and the relevant person cannot be notified. Therefore, the bar code needs to be verified, and it is important to prevent the detection result from being unable to be notified to the corresponding relevant personnel due to errors or incompleteness of the read bar code.
In order to prevent a detection result from being unable to be notified to corresponding related personnel due to errors or incompleteness of a read bar code, and improve the accuracy and the integrity of reading the bar code, the application provides a bar code checking method, which can respectively obtain a data bit parameter and a checking parameter in a bar code picture, check bar code information in the bar code picture based on the obtained data bit parameter and the checking parameter, and when the checking result is that the checking is passed, can output the content of the bar code, and when the checking result is that the checking is not passed, output prompt information of a bar code reading error so as to prompt medical personnel that the read bar code has errors.
The embodiment of the application provides a bar code checking method, as shown in fig. 1, comprising the following steps:
step S101, respectively obtaining data bit parameters and verification parameters in the bar code picture.
In some embodiments, the data bit parameter may be the content of a data bit in the barcode information, or may be the number of data bits in the barcode information. The data bit content may include numbers, letters, characters, and the like. The verification parameter may be a check digit value in the bar code information. The barcode information may be obtained by recognizing a barcode in a barcode picture, or may be obtained by recognizing data information in a barcode picture by OCR. That is, the check bit value may be set according to the number of data bits in the barcode information, or may be set according to the data bit content of each data bit.
In other embodiments, the barcode picture may include a barcode and data information, the data bit content in the barcode may be obtained by reading the barcode, and the data information in the barcode picture is identified by OCR, so as to obtain the data bit content in the data information. The data bit parameter may be the data bit content in the barcode and the verification parameter may be the data bit content in the data information.
In other embodiments, the barcode information in the barcode picture may be acquired multiple times. The data bit parameter is the data bit content of the target bar code information in the bar code information acquired for multiple times, and the target bar code information is the bar code information acquired at any time. The verification parameters are data bit contents of other bar code information except the target bar code information in the bar code information acquired for multiple times. For example, the barcode information in the barcode picture may be acquired three times, the barcode information acquired at any one time in the barcode information acquired three times is taken as the target barcode information, and the data bit parameter is the data bit content of the target barcode information; the other two times of acquired bar code information are other bar code information, and the verification parameter is the data bit content of the other bar code information.
And S102, verifying the bar code information in the bar code picture based on the data bit parameters and the verification parameters.
In some embodiments, the data bit parameter may be directly compared with the verification parameter, and if the data bit parameter is consistent with the verification parameter, the verification result is determined to be a verification pass; and if the data bit parameter is not consistent with the verification parameter, determining that the verification result is verification failure.
Specifically, when the data bit parameter and the verification parameter meet any one of the following three setting conditions, the data bit parameter and the verification parameter may be directly compared: the first setting condition is: the data bit parameter is the number of data bits in the bar code information, and the check parameter is a check bit value in the bar code information; the second setting condition is: the data bit parameter is the data bit content in the bar code picture, and the check parameter is the data bit content in the data information in the bar code picture; the third setting condition is: the data bit parameter is the data bit content of the target bar code information in the bar code information acquired for multiple times, and the check parameter is the data bit content of other bar code information except the target bar code information in the bar code information acquired for multiple times, wherein the target bar code information is the bar code information acquired at any time.
In other embodiments, the number to be verified can be determined according to the data bit parameter, and if the number to be verified and the verification parameter meet the preset condition, the verification result is determined to be verification pass; and if the number to be verified and the verification parameters do not accord with the preset conditions, determining that the verification result is verification failure. The preset condition may be that the number to be verified is consistent with the verification parameter, or that the number to be verified is in a multiple relationship with the verification parameter, for example, the number to be verified may be 2 times of the verification parameter. The preset condition may also be that a difference between the number to be checked and the checking parameter satisfies a set threshold, for example, the difference between the number to be checked and the checking parameter may be 2.
Specifically, the data bit parameter may be the data bit content in the barcode information, and the check parameter may be a check bit value in the barcode information. The data bit value corresponding to the barcode information can be determined according to the data bit content in the barcode information, then the data bit value is summed to obtain a data sum, and the data sum can be directly used as a number to be checked corresponding to the barcode information, or the data sum and a set value are subjected to modulo operation to obtain the data sum and a corresponding remainder, and then the remainder is used as the number to be checked corresponding to the barcode information. When the number to be verified and the check digit value are not in accordance with the preset condition, the check result can be determined as that the check is passed.
And step S103, if the verification result is that the verification fails, outputting prompt information of bar code reading errors.
When the verification result of the verification of the barcode information in the barcode picture is that the verification fails, the read barcode information can be determined to be wrong and unreliable, and prompt information of the barcode reading error can be output.
In an embodiment, when the verification result of the verification of the barcode information in the barcode picture is that the verification is passed, it can be determined that the read barcode information is correct and reliable, and the read barcode content can be output.
The barcode checking method provided by the embodiment of the application can respectively obtain the data bit parameter and the checking parameter in the barcode picture, check the barcode information in the barcode picture based on the data bit parameter and the checking parameter, output the content of the barcode when the checking result is that the checking passes, and output the prompt information of the barcode reading error when the checking result is that the checking does not pass. Therefore, the bar code with the reading error can be removed according to the verification result of the bar code information, the correctness and the integrity of the reading of the bar code are improved, the relevant personnel corresponding to the detection result can be determined, and the relevant personnel can be informed of the detection result.
Specifically, in some embodiments, only the barcode may be included in the barcode picture, check bits may be set in the barcode, and other bits except the check bits are used as data bits, that is, the barcode may include data bits and check bits. The data bits and the check bits in the barcode may be any number of bits, and the check bits may be set at any position of the barcode, for example, the check bits may be set at the end or the middle of the barcode. And reading the bar code in the bar code picture to acquire the bar code information. The bar code information comprises data bit content and check bit values, wherein the data bit content is the content on the data bits of the bar code, and the check bit values are the numbers on the check bits of the bar code.
For example, fig. 2 is a barcode picture, and the barcode picture only includes a barcode composed of black and white rectangles, when the barcode in fig. 2 is read by a barcode scanning device, barcode content "978435698" shown in fig. 3 can be obtained, where "97843569" is data bit content, and "8" is check bit value.
The data bit content in the barcode may be used as the data bit parameter, and the check bit value in the barcode may be used as the check parameter. Or the number of data bits in the bar code may be used as a data bit parameter, and the check bit value in the bar code may be used as a check parameter.
In other embodiments, the barcode picture may include data information in addition to the barcode, and both the barcode and the data information only include data bits, and the barcode in the barcode picture may be read, the data bit content in the barcode is obtained, and the data information in the barcode picture is identified by using an OCR (Optical Character Recognition) method, so as to obtain the data bit content in the data information. For example, fig. 4 is a barcode picture, where a barcode is formed by black and white rectangles, and "SVSQPO 2080" is data information, and the barcode in fig. 4 is read by a barcode scanning device, so as to obtain the data bit content "SVSOPO 2080" shown in fig. 5, and the data information in fig. 4 is identified by OCR, so as to obtain the data bit content "SVSQPO 2080" shown in fig. 6. The data bit content in the barcode may be used as the data bit parameter and the data bit content in the data information may be used as the verification parameter.
The OCR technology is a character recognition technology that converts characters into an image file of black and white dot matrix optically and converts characters in the image file into a text format. The whole picture can be traversed through a sliding window algorithm, supervised marked training sample characteristics are judged, after a target picture with a target character area is found, the target picture can be rectangularly extracted, then one-dimensional sliding window movement is carried out in a rectangle, the space between characters is judged, the characters are divided, the process that the character area is rectangularly divided and is divided into different characters is finished, then the divided characters can be predicted according to the supervision algorithm, character classification is obtained, each character in the target character area can be recognized, and finally subsequent processing and correction can be carried out on the recognized characters.
In other embodiments, the barcode and the data information in the barcode picture also both include only data bits, and the barcode or the data information in the barcode picture can be read multiple times to obtain the data bit content of the barcode or the data information. The data bit content of the target barcode or data information in the barcode or data information acquired multiple times can be used as the data bit parameter, and the data bit content of other barcodes or data information except the target barcode or data information in the barcode or data information acquired multiple times can be used as the verification parameter. The target bar code or data information may be bar code or data information read at any time.
In an embodiment, the barcode picture may include both the barcode and the data information, the barcode in the barcode picture may be identified by using an infrared scanning device to obtain a data bit parameter and a verification parameter corresponding to the barcode, and if a verification result of verifying the barcode information according to the data bit parameter and the verification parameter corresponding to the barcode is a verification pass, the barcode information obtained according to the identified barcode may be directly output. And if the verification result of verifying the bar code information according to the data bit parameters and the verification parameters corresponding to the bar codes is that the verification fails, the bar code information obtained according to the identification bar codes is wrong. For example, the bar code may be damaged, contaminated, or obscured, which may cause errors in the bar code information obtained by identifying the bar code.
If the barcode information obtained by identifying the barcode is wrong, the data information in the barcode picture can be identified by using an OCR technology, the data bit parameter and the verification parameter corresponding to the data information are obtained, the barcode information is further obtained, and the barcode information is verified according to the obtained data bit parameter and the verification parameter, so that the correct barcode information is obtained.
Compared with the prior art, when the bar code in the bar code picture is polluted or shielded to cause the read bar code to be wrong or incomplete, the method for manually inputting the bar code information can obviously improve the efficiency of obtaining the bar code information, can avoid the problem that the obtained bar code information is incorrect due to the input error when the bar code information is manually input, and ensures that the correct bar code information is obtained.
The bar codes in the embodiment of the application can come from different mechanisms and regions, so that the verification method for verifying the bar codes and the setting of the positions and the lengths of the verification bits in the bar codes can be different. Specifically, different verification methods for verifying the barcode may be embodied in different manners of calculating a data bit value in the barcode information. The different settings of the positions and the lengths of the check bits in the bar code can be embodied according to different mechanisms or regions, the check bits can be set at different positions of the bar code, and the check bits with different lengths can also be set in the bar code, so that the compatibility of checking the bar code is improved. For example, for different hospitals a and B, hospital a may set the check digit in the middle of the barcode and set with 4 check digits, while hospital B may set the check digit at the end of the barcode and set with 2 check digits.
In some embodiments, the data bit parameter may be a data bit content in the barcode information, and the check parameter may be a check bit value in the barcode information, where the data bit content and the check bit value may both be obtained by identifying a barcode in a barcode picture, and may also both be obtained by identifying data information in a barcode picture by OCR.
After the data bit content and the check bit value in the bar code information are determined, the number to be checked corresponding to the bar code information can be determined according to the data bit content, the number to be checked and the check bit value are compared, and when the number to be checked and the check bit value are consistent, the check result can be determined to be a check pass, so that the read bar code information is correct and credible. When the number to be checked is inconsistent with the check digit value, it can be determined that the check result is a check failure, which indicates that the read barcode information is wrong and unreliable.
The number to be checked can be determined according to the content of the data bits. Specifically, after the data bit content in the barcode information is obtained, the data bit value corresponding to the barcode information may be determined according to the data bit content, a data sum may be obtained by summing the data bit values, and the number to be checked corresponding to the barcode information may be determined according to the obtained data sum. For example, the data sum may be used as the number to be checked corresponding to the barcode information, or the data sum may be modulo-operated with a set numerical value to obtain the data sum and a corresponding remainder, and the remainder is used as the number to be checked corresponding to the barcode information.
In an embodiment, after the data bit value corresponding to the barcode information is determined according to the data bit content in the barcode information, the data bit value may be summed to obtain a data sum, and the data sum obtained by summing is directly used as the number to be checked corresponding to the barcode information and compared with the check bit value in the barcode information to determine the check result.
For example, identifying the barcode in FIG. 4 results in the data bit content "SVSQPO 2" and check bit value "540" in FIG. 7. After obtaining the data bit content "SVSQPO 2", the data bit value corresponding to each data bit content can be determined according to an ASCII (American Standard Code for Information Interchange) Code table, that is, the values corresponding to the data bit contents "S", "V", "S", "Q", "P", "O", and "2" are respectively searched in the ASCII Code table, and the value corresponding to "S" is "83", "the value corresponding to V" is "86", "the value corresponding to S" is "83", "the value corresponding to Q" is "81", "the value corresponding to P" is "80", "the value corresponding to O" is "79", and the value corresponding to 2 "is" 50 "can be obtained. And sequentially adding the determined data bit values to obtain data sum '542', directly taking the data sum '542' as a number to be verified, and comparing the data sum '542' with the check bit value '540', so that the verification result can be determined to be that the verification fails.
In another embodiment, after the data sum is obtained by summing the data bit values, the data sum and a set value may be subjected to a modulo operation to obtain the data sum corresponding to a remainder, and the remainder is used as a number to be checked corresponding to the barcode information and compared with the check bit value in the barcode information to determine a check result. For example, identifying the barcode in fig. 4 can result in the data bit content "SVSQPO 208" and the check bit value "4" in fig. 8. After the data bit content "SVSQPO 208" is obtained, the data bit value corresponding to each data bit content can be determined according to the ASCII code table, that is, the value corresponding to "S" is "83", "V" is "86", "S" is "83", "Q" is "81", "P" is "80", "O" is "79", "2" is "50", "0" is "48", and "8" is "56", respectively. And sequentially summing the determined digit values of the data to obtain a data sum 646, and performing modular operation on the data sum 646 and a set numerical value 6 to obtain a remainder of the data sum 646 of 4. And comparing the remainder 4 serving as the number to be checked with the check digit value of 4 to determine that the check result is a check pass.
In the above step, when the data bit values corresponding to the barcode information are summed, the data sum corresponding to the data bit values can be obtained through different operation modes. For example, some or all data bit values in the barcode information may be directly summed to obtain a data sum; or, multiplying part or all of the data bit values in the bar code information by the corresponding preset coefficients to obtain weighted data bit values corresponding to the data bit values, and then summing the weighted data bit values to obtain the data sum.
Specifically, the first operation method: the data sum can be obtained by directly summing the numerical values of the data bits in the bar code information.
The second operation method: each data bit value corresponding to the barcode information may be multiplied by a corresponding preset coefficient to obtain a weighted data bit value corresponding to each data bit value, and then the weighted data bit values are summed to obtain a data sum. For example, the data bit values determined according to the data bit contents are respectively "9", "7", "8", "4", "3", "5" and "6", and the preset coefficient corresponding to "9" is 1, the preset coefficient corresponding to "7" is 1, the preset coefficient corresponding to "8" is 1, the preset coefficient corresponding to "4" is 2, the preset coefficient corresponding to "3" is 2, the preset coefficient corresponding to "5" is 2, and the preset coefficient corresponding to "6" is 1. Multiplying each data bit value by the corresponding preset coefficient respectively to obtain a weighted data bit value corresponding to 9 as 9, a weighted data bit value corresponding to 7 as 7, a weighted data bit value corresponding to 8 as 8, a weighted data bit value corresponding to 4 as 8, a weighted data bit value corresponding to 3 as 6, a weighted data bit value corresponding to 5 as 10 and a weighted data bit value corresponding to 6 as 6 in turn. The weighted data bit values "9", "7", "8", "8", "6", "10" and "6" are added in sequence to obtain the data sum "54".
The third operation mode is as follows: the data bit values of the set number can be selected from the data bit values corresponding to the bar code information, and the selected data bit values of the set number are added to obtain the data sum. For example, the data bit values determined according to the data bit contents are respectively "9", "7", "8", "4", "3", "5", "6", 3 data bit values of "8", "4" and "6" can be selected from the data bit values, and the data sum "18" can be obtained by sequentially adding "8", "4" and "6".
The fourth operation mode: after the data bit values of the set number are selected, each data bit value in the selected data bit values can be multiplied by the corresponding preset coefficient to obtain weighted data bit values of the set number, and then the weighted data bit values of the set number are summed to obtain data sum. For example, the data bit values selected from the data bit values "9", "7", "8", "4", "3", "5" and "6" are "8", "4" and "6", the data bit value "8" may be multiplied by the preset coefficient "2", "4" may be multiplied by the preset coefficient "3", and "6" may be multiplied by the preset coefficient "1", the weighted data bit value "16" corresponding to "8", the weighted data bit value "12" corresponding to "4", the weighted data bit value "6" corresponding to "6" may be obtained, and then "16", "12" and "6" may be sequentially added to obtain the data sum "34".
The sum of the data corresponding to the data bit value is obtained through different operation modes, and then the number to be checked is obtained, so that the checking accuracy of checking the bar code can be improved.
In other embodiments, the data bit parameter may be the content of a data bit in a barcode within a barcode picture and the verification parameter may be the content of a data bit in data information within a barcode picture. The data bit content obtained by identifying the bar code can be compared with the data bit content obtained by identifying the data information, and when the data bit content corresponding to the bar code is consistent with the data bit content corresponding to the data information, the verification result can be determined to be verification passing, which indicates that the read bar code information is correct and credible. When the data bit content corresponding to the barcode is inconsistent with the data bit content corresponding to the data information, it can be determined that the verification result is verification failed, indicating that the read barcode information is wrong and unreliable. For example, by identifying the barcode in fig. 4, the data bit content "SVSOPO 2080" in fig. 5 can be obtained, by identifying the data information in fig. 4, the data bit content "SVSQPO 2080" in fig. 6 can be obtained, by comparing "SVSOPO 2080" with "SVSQPO 2080", since "SVSQPO 2080" is not consistent with "SVSOPO 2080", it can be determined that the check result of checking the barcode information is a check failure, and it is also indicated that the barcode is read with an error.
In other embodiments, the barcode within the barcode image may be read multiple times to obtain the data bit content in the barcode information. The data bit content of the target barcode information in the barcode information acquired multiple times can be used as the data bit parameter, the data bit content of other barcode information except the target barcode information in the barcode information acquired multiple times can be used as the verification parameter, and the target barcode information is the barcode information acquired at any time. The data bit content in the target bar code information and the data bit content in other bar code information can be respectively compared, and when the data bit content in the target bar code information is consistent with the data bit content in other bar code information, the verification result can be determined to be verification passing, and the read bar code information is correct and credible. When the data bit content in at least one piece of other bar code information is inconsistent with the data bit content in the target bar code information, the verification result can be determined to be verification failure, and the read bar code information is wrong and unreliable.
For example, the barcode in fig. 4 is read three times, the data bit content obtained by the first reading may be used as the data bit content in the target barcode information, and the data bit content obtained by the second and third reading may be used as the data bit content in other barcode information. When the data bit contents obtained by three times of reading are all 'SVSQPO 2080', namely the data bit contents obtained by each time of reading are consistent, the verification result can be determined to be verification pass, the barcode reading is correct, and the barcode content is 'SVSQPO 2080'. When the content of the data bit obtained by the first reading is 'SVSQPO 2080', the content of the data bit obtained by the second reading is 'SVSQPO 2080' and the content of the data bit obtained by the third reading is 'SVSOPO 2080', the content of the data bit obtained by the first reading is inconsistent with the content of the data bit obtained by the third reading, so that the verification result can be determined as that the verification fails and the barcode reading is incorrect.
In other embodiments, the data bit parameter may also be the number of data bits in the barcode information, and the check parameter may be a check bit value in the barcode information, where the number of data bits is compared with the check bit value, and when the number of data bits is consistent with the check bit value, it may be determined that the check result is a check pass and the barcode is correctly read. When the number of the data bits is inconsistent with the number of the check bits, the check result can be determined as that the check fails, the reading of the bar code is wrong, and prompt information of the bar code reading error is output. For example, if the content of the data bits in fig. 3 is "97843569" and the check bit value is "8", the number of the data bits in fig. 3 is "8", and the number of the data bits "8" is compared with the check bit value "8", so that it can be determined that the check result is that the check is passed and the barcode is correctly read.
As shown in fig. 9, the barcode checking method proposed in the present application is described in detail by a specific embodiment as follows:
step S901, a data bit content and a check bit value in the barcode are obtained.
And identifying the bar code to obtain the data bit content and the check bit value in the bar code.
Step S902, determining a data bit value according to the data bit content.
The numerical value corresponding to the content of each data bit can be sequentially searched in an ASCII code table, and the numerical value of the data bit is determined according to the numerical value corresponding to the content of each data bit.
Step S903, summing the data bit values to obtain a data sum.
The data bit values may be summed to obtain a data sum by any one of the following:
the first way is to sum the individual data bit values to obtain a data sum.
The second way is to multiply each data bit value by the corresponding preset coefficient to obtain the weighted data bit value corresponding to each data bit value, and then sum up each weighted data bit value to obtain the data sum.
The third method is to select a set number of data bit values from the data bit values and sum the set number of data bit values to obtain a data sum.
The fourth method is to select a set number of data bit values from the data bit values, multiply each data bit value of the set number of data bit values by a corresponding preset coefficient to obtain a set number of weighted data bit values, and sum the set number of weighted data bit values to obtain a data sum.
And step S904, determining the number to be checked corresponding to the bar code according to the data sum.
After the data sum is obtained, the data sum can be directly used as the number to be checked corresponding to the bar code, or the data sum and a set numerical value are subjected to modular operation to obtain the data sum corresponding to the remainder, and then the remainder is used as the number to be checked corresponding to the bar code.
Step S905, determining a checking result according to the number to be checked and the check digit value.
Step S906, determining whether the checking result is that the checking is passed; if not, go to step S907; if so, step S908 is performed.
In step S907, the barcode is read incorrectly, and prompt information of the barcode reading error is output.
Step S908, the barcode is read correctly, and the content of the barcode is output.
When the number to be verified and the check digit number do not accord with the preset condition, the verification result can be determined as that the verification is not passed and the bar code is read wrongly, and prompt information of the bar code reading mistake is output. When the number to be verified and the number of the verification bits meet the preset conditions, the verification result can be determined as verification passing, the bar code is read correctly, and the content of the bar code is output.
The bar code checking method shown in fig. 1 is based on the same inventive concept, and the embodiment of the application also provides a bar code checking device. Because the device is a device corresponding to the barcode checking method and the problem solving principle of the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and repeated parts are not described again.
Fig. 10 shows a schematic structural diagram of a barcode checking apparatus provided in an embodiment of the present application, and as shown in fig. 10, the barcode checking apparatus includes a parameter obtaining unit 1001, an information checking unit 1002, and a prompt information output unit 1003.
The parameter acquiring unit 1001 is configured to acquire a data bit parameter and a verification parameter in a barcode picture respectively;
an information checking unit 1002, configured to check barcode information in a barcode picture based on the data bit parameter and the checking parameter;
and a prompt information output unit 1003, configured to output prompt information of a barcode reading error if the verification result is that the verification fails.
In an optional embodiment, the data bit parameter is data bit content in the barcode information, and the check parameter is a check bit value in the barcode information; the information checking unit 1002 is specifically configured to:
determining the number to be checked corresponding to the bar code information according to the data bit content;
and if the number to be verified and the number of the verification bits do not accord with the preset condition, determining that the verification result is verification failure.
In an alternative embodiment, the information checking unit 1002 is further configured to:
determining a data bit value corresponding to the bar code information according to the data bit content in the bar code information;
summing the data bit values corresponding to the bar code information to obtain a data sum; or multiplying each data bit value corresponding to the bar code information by the corresponding preset coefficient to obtain a weighted data bit value corresponding to each data bit value; summing the weighted data bit values to obtain a data sum; or, selecting a set number of data bit values from the data bit values corresponding to the bar code information, and summing the set number of data bit values to obtain a data sum; or selecting a set number of data bit values from the data bit values corresponding to the bar code information, multiplying each data bit value in the set number of data bit values by a corresponding preset coefficient to obtain a set number of weighted data bit values, and summing the set number of weighted data bit values to obtain a data sum;
taking the data and the number to be checked corresponding to the bar code information; or performing modular operation on the data sum and the set numerical value to obtain the data sum corresponding to the remainder, and taking the remainder as the number to be checked corresponding to the bar code information.
In an optional embodiment, the parameter obtaining unit 1001 is specifically configured to:
recognizing data information in the bar code picture by adopting an Optical Character Recognition (OCR) method; the data information comprises data bit content and check bit values;
determining a data bit value corresponding to the data information according to the data bit content in the data information;
and taking the data bit value as a data bit parameter, and taking the check bit value in the data information as a check parameter.
In an alternative embodiment, the data bit parameter is the number of data bits in the barcode information, and the check parameter is a check bit value in the barcode information; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content in the bar code picture, and the check parameter is the data bit content in the data information in the bar code picture; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content of target bar code information in the bar code information acquired for multiple times, and the check parameter is the data bit content of other bar code information except the target bar code information in the bar code information acquired for multiple times; the target barcode information is barcode information acquired at any one time.
In an alternative embodiment, the information checking unit 1002 is further configured to:
comparing the data bit parameters with the check parameters;
and if the data bit parameter is not consistent with the verification parameter, determining that the verification result is verification failure.
In an alternative embodiment, the data bit parameter is the data bit content in the barcode picture, and the check parameter is the data bit content in the data information in the barcode picture; the parameter acquiring unit 1001 is further configured to:
identifying a bar code in a bar code picture, and using the data bit content in the identified bar code as a data bit parameter; and recognizing data information in the bar code picture by adopting an OCR (optical character recognition), and taking data bit content in the data information as a verification parameter.
The electronic equipment is based on the same inventive concept as the method embodiment, and the embodiment of the application also provides the electronic equipment. The electronic device may be used for bar code verification. In one embodiment, the electronic device may be a server, a terminal device, or other electronic device. In this embodiment, the electronic device may be configured as shown in fig. 11, and include a memory 1101, a communication module 1103, and one or more processors 1102.
A memory 1101 for storing computer programs executed by the processor 1102. The memory 1101 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a program required for running an instant messaging function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 1101 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1101 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or the memory 1101 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 1101 may be a combination of the above memories.
The processor 1102 may include one or more Central Processing Units (CPUs), a digital processing unit, and the like. The processor 1102 is configured to implement the barcode checking method when the computer program stored in the memory 1101 is called.
The communication module 1103 is used for communicating with the terminal device and other servers.
In the embodiment of the present application, the specific connection medium among the memory 1101, the communication module 1103 and the processor 1102 is not limited. In fig. 11, the memory 1101 and the processor 1102 are connected by a bus 1104, the bus 1104 is shown by a thick line in fig. 11, and the connection manner between other components is merely illustrative and not limited. The bus 1104 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 11, but does not indicate only one bus or one type of bus.
According to an aspect of the application, a computer program product or a computer program is provided, comprising computer instructions, which are stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the barcode checking method in the above-described embodiment. The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (10)

1. A method of bar code verification, the method comprising:
respectively acquiring data bit parameters and verification parameters in a bar code picture;
based on the data bit parameters and the verification parameters, verifying the bar code information in the bar code picture;
and if the verification result is that the verification fails, outputting prompt information of bar code reading errors.
2. The method of claim 1, wherein the data bit parameter is a data bit content in the barcode information, and the check parameter is a check bit value in the barcode information;
the verifying the barcode information in the barcode picture based on the data bit parameter and the verification parameter includes:
determining the number to be checked corresponding to the bar code information according to the data bit content;
and if the number to be verified and the check bit value do not accord with the preset condition, determining that the verification result is verification failure.
3. The method according to claim 2, wherein the determining the number to be checked corresponding to the barcode information according to the data bit content comprises:
determining a data bit value corresponding to the bar code information according to the data bit content in the bar code information;
summing the data bit values corresponding to the bar code information to obtain the data sum; or multiplying each data bit value corresponding to the bar code information by the corresponding preset coefficient to obtain a weighted data bit value corresponding to each data bit value; summing the weighted data bit values to obtain a data sum; or selecting a set number of data bit values from the data bit values corresponding to the bar code information, and summing the set number of data bit values to obtain the data sum; or, selecting a set number of data bit values from the data bit values corresponding to the barcode information, multiplying each data bit value of the set number of data bit values by a corresponding preset coefficient to obtain a set number of weighted data bit values, and summing the set number of weighted data bit values to obtain the sum of data;
taking the data and the number to be checked corresponding to the bar code information; or performing modular operation on the data sum and a set numerical value to obtain the data sum corresponding to the remainder, and taking the remainder as the number to be checked corresponding to the bar code information.
4. The method according to claim 1 or 2, wherein the respectively acquiring the data bit parameter and the verification parameter in the barcode picture comprises:
recognizing data information in the bar code picture by adopting an Optical Character Recognition (OCR) method; the data information comprises data bit contents and check bit values;
determining a data bit value corresponding to the data information according to the data bit content in the data information;
and taking the data bit value as the data bit parameter, and taking the check bit value in the data information as the check parameter.
5. The method of claim 1, wherein the data bit parameter is a number of data bits in the barcode information, and the check parameter is a check bit value in the barcode information; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content in the bar code picture, and the check parameter is the data bit content in the data information in the bar code picture; alternatively, the first and second electrodes may be,
the data bit parameter is the data bit content of target bar code information in the bar code information acquired for multiple times, and the verification parameter is the data bit content of other bar code information except the target bar code information in the bar code information acquired for multiple times; the target bar code information is bar code information acquired at any time.
6. The method of claim 5, wherein the verifying the barcode information in the barcode picture based on the data bit parameter and the verification parameter comprises:
comparing the data bit parameter with the check parameter;
and if the data bit parameter is inconsistent with the verification parameter, determining that the verification result is verification failure.
7. The method of claim 5, wherein the data bit parameter is the data bit content in a barcode within the barcode picture and the verification parameter is the data bit content in the data information within the barcode picture; the respectively obtaining of the data bit parameter and the check parameter in the barcode picture includes:
identifying a bar code in a bar code picture, and taking the data bit content in the identified bar code as the data bit parameter; and recognizing data information in the bar code picture by adopting an OCR (optical character recognition), and taking the data bit content in the data information as the verification parameter.
8. A bar code verification device, the device comprising:
the parameter acquisition unit is used for respectively acquiring data bit parameters and verification parameters in the bar code picture;
the information checking unit is used for checking the bar code information in the bar code picture based on the data bit parameters and the checking parameters;
and the prompt information output unit is used for outputting prompt information of bar code reading errors if the verification result is that the verification fails.
9. A computer-readable storage medium having a computer program stored therein, the computer program characterized by: the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, implementing the method of any of claims 1-7.
CN202110183006.7A 2021-02-08 2021-02-08 Bar code checking method and device, storage medium and electronic equipment Pending CN112989862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110183006.7A CN112989862A (en) 2021-02-08 2021-02-08 Bar code checking method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110183006.7A CN112989862A (en) 2021-02-08 2021-02-08 Bar code checking method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112989862A true CN112989862A (en) 2021-06-18

Family

ID=76393940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110183006.7A Pending CN112989862A (en) 2021-02-08 2021-02-08 Bar code checking method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112989862A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114692663A (en) * 2022-03-30 2022-07-01 上海中商网络股份有限公司 Photographing identification fault-tolerant method for code reading failure

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06103400A (en) * 1992-09-22 1994-04-15 Hitachi Electron Eng Co Ltd Bar-code checking method for ocr
US5880451A (en) * 1997-04-24 1999-03-09 United Parcel Service Of America, Inc. System and method for OCR assisted bar code decoding
US9740907B1 (en) * 2016-06-29 2017-08-22 Mueller International, Llc Systems and methods for a self-identifying barcode
CN111144161A (en) * 2020-04-03 2020-05-12 支付宝(杭州)信息技术有限公司 Barcode identification method and device, commodity information determination method and payment method
CN111368574A (en) * 2020-03-06 2020-07-03 联想(北京)有限公司 Bar code identification method and device
CN111797645A (en) * 2020-07-08 2020-10-20 北京京东振世信息技术有限公司 Method and apparatus for identifying bar code

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06103400A (en) * 1992-09-22 1994-04-15 Hitachi Electron Eng Co Ltd Bar-code checking method for ocr
US5880451A (en) * 1997-04-24 1999-03-09 United Parcel Service Of America, Inc. System and method for OCR assisted bar code decoding
US9740907B1 (en) * 2016-06-29 2017-08-22 Mueller International, Llc Systems and methods for a self-identifying barcode
CN111368574A (en) * 2020-03-06 2020-07-03 联想(北京)有限公司 Bar code identification method and device
CN111144161A (en) * 2020-04-03 2020-05-12 支付宝(杭州)信息技术有限公司 Barcode identification method and device, commodity information determination method and payment method
CN111797645A (en) * 2020-07-08 2020-10-20 北京京东振世信息技术有限公司 Method and apparatus for identifying bar code

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114692663A (en) * 2022-03-30 2022-07-01 上海中商网络股份有限公司 Photographing identification fault-tolerant method for code reading failure
CN114692663B (en) * 2022-03-30 2023-09-29 上海中商网络股份有限公司 Photographing identification fault tolerance method for code reading failure

Similar Documents

Publication Publication Date Title
US11409979B2 (en) Method of barcode templating for enhanced decoding performance
CN108734089B (en) Method, device, equipment and storage medium for identifying table content in picture file
JP2009217821A (en) Detecting, capturing and processing of valid login credential
WO2018005096A1 (en) Systems and methods for a self-identifying barcode
CN105787897A (en) Processing method and device of fuzzy two-dimensional code image
CN112631896B (en) Equipment performance test method and device, storage medium and electronic equipment
CN112989861A (en) Sample identification code reading method and device, electronic equipment and storage medium
CN112989862A (en) Bar code checking method and device, storage medium and electronic equipment
US7434132B2 (en) Method and system of configuring a software program
JP2013182468A (en) Parameter value setting error detection system, parameter value setting error detection method and parameter value setting error detection program
CN111639643B (en) Character recognition method, character recognition device, computer equipment and storage medium
CN112990404B (en) Method and device for generating sample identification code pattern, acquisition method and electronic equipment
CN112446442A (en) Sample analysis system, information matching method and computer storage medium
CN114677689B (en) Text image recognition error correction method and electronic equipment
JP2017187931A (en) Table data conversion method, program, and image reading device
CN114065762A (en) Text information processing method, device, medium and equipment
JP4160206B2 (en) Database registration method using character recognition device
CN113868210A (en) Validity verification method, system, equipment and storage medium for imported data
JPH0773267A (en) Method and apparatus for discrimination and correction of error
JP5195011B2 (en) Code reader and program
CN111797645A (en) Method and apparatus for identifying bar code
JP6260350B2 (en) Image processing apparatus and image processing program
CN111260618B (en) Method and device for constructing focus detection system and electronic equipment
CN116206315A (en) Table data verification method and apparatus
CN114708906B (en) Method, electronic device and storage medium for predicting true and false somatic cell mutation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210618