CN111126041B - VIN code dictionary base checking method, VIN code identification method and device - Google Patents

VIN code dictionary base checking method, VIN code identification method and device Download PDF

Info

Publication number
CN111126041B
CN111126041B CN201911344704.XA CN201911344704A CN111126041B CN 111126041 B CN111126041 B CN 111126041B CN 201911344704 A CN201911344704 A CN 201911344704A CN 111126041 B CN111126041 B CN 111126041B
Authority
CN
China
Prior art keywords
verified
character string
vin
vin code
dictionary
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.)
Active
Application number
CN201911344704.XA
Other languages
Chinese (zh)
Other versions
CN111126041A (en
Inventor
张岩
刘丽辉
张雪玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sinosecu Technology Co ltd
Original Assignee
Beijing Sinosecu 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 Sinosecu Technology Co ltd filed Critical Beijing Sinosecu Technology Co ltd
Priority to CN201911344704.XA priority Critical patent/CN111126041B/en
Publication of CN111126041A publication Critical patent/CN111126041A/en
Application granted granted Critical
Publication of CN111126041B publication Critical patent/CN111126041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Character Discrimination (AREA)

Abstract

The invention provides a VIN code dictionary base checking method, a VIN code identification method and a VIN code identification device. The VIN dictionary library checking method comprises the following steps: acquiring a VIN code to be checked; extracting a character string to be checked from the first eight bits of the VIN code to be checked; judging whether the character string to be checked is the same as a regular character string in a dictionary library or not; under the condition that the character string to be verified is the same as at least one rule character string, judging that the VIN code to be verified passes verification; wherein the dictionary repository includes at least one of the rule strings; the rule character string is a specified character string which accords with VIN code encoding rules and corresponds to the character position of the rule character string in the VIN code. By the scheme, the verification accuracy and the identification accuracy of the VIN code can be improved.

Description

VIN code dictionary base checking method, VIN code identification method and VIN code identification device
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a VIN code dictionary library checking method, a VIN code identification method and a VIN code identification device.
Background
The VIN code (Vehicle Identification Number or frame Number) is a seventeen-digit string composed of numbers and english letters, is used for a unique set of numbers on an automobile, and can be used for identifying information such as manufacturer, engine, chassis serial Number and other performances of the automobile. In order to avoid confusion with 1, 0, 9 of numbers, I, O, Q of English letters are not used in VIN codes. Meanwhile, the 10 th model year of VIN code does not use Z, U and 0 except I, O and Q.
The VIN code encoding rules are mainly of two kinds, the first is the ISO3779 standard adopted by the european union, and the second is the north american standard. While the north american standard is more stringent than the ISO3779 standard adopted by the european union, the two standards may also be compatible with each other. The two specifications for VIN codes are specified in the following table:
Figure BDA0002333021470000011
TABLE 1 Difference between the EU ISO3779 standard and the North American standard for VIN codes
Therefore, the VIN code of the automobile is verified according to the VIN code coding rule, and the legality and the vehicle information of the automobile can be obtained. The existing VIN code checking method comprises IOQ judgment (suitable for ISO3779 standard and North American standard), checking rule checking of the 9 th checking position (suitable for North American standard), checking year checking of the 10 th vehicle model (suitable for North American standard), checking of the 12-17 serial number (suitable for ISO3779 standard) and the like.
Due to the diversity of the combination of the numbers and the letters, the accuracy of IOQ judgment, annual check of 10 th vehicle type and check of 12-17 serial number is low.
In the conventional verification method, the 9 th parity bit rule with the strongest verification rule determines whether the remainder obtained by dividing the weighted calculation result of the 1 st bit to the 17 th bit of the VIN code by 11 is 9. If a certain letter or number of the 1 st bit to the 17 th bit of the VIN code is wrong, if the corresponding values of the original correct letter and the recognized wrong letter on the certain bit are the same, the weighting calculation result is also the same, which may cause the VIN code with the recognition error to pass the verification, resulting in a wrong verification result.
Therefore, the conventional verification method is very easy to have the problem of verification error of passing or failing verification error, so that misidentification is caused, and the misidentification rate is as high as 10%.
Disclosure of Invention
The invention provides a VIN code dictionary base checking method, a VIN code recognition method and a VIN code dictionary base checking device, which are used for reducing the checking error rate and the misrecognition rate of VIN codes so as to improve the checking accuracy and the recognition accuracy.
In order to achieve the purpose, the invention adopts the following scheme:
in a first aspect, a method for checking a VIN code dictionary base is provided, which includes: acquiring a VIN code to be checked; extracting a character string to be checked from the first eight bits of the VIN code to be checked; judging whether the character string to be checked is the same as a regular character string in a dictionary library or not; under the condition that the character string to be verified is the same as at least one rule character string, judging that the VIN code to be verified passes verification; wherein the dictionary repository comprises at least one rule string; the rule character string is a specified character string which accords with VIN code encoding rules and corresponds to the character position of the rule character string in the VIN code.
In a second aspect, a method for checking a VIN code dictionary base is provided, which includes: extracting the first eight bits of the VIN code to be checked as a character string to be checked; judging whether the character string to be checked is the same as a regular character string in a dictionary library or not; under the condition that the character string to be verified is the same as at least one regular character string, judging that the VIN code to be verified passes verification; under the condition that the character string to be verified is different from all the regular character strings in the dictionary library, obtaining the confidence coefficient of the VIN code to be verified; if the confidence of the VIN codes to be verified is greater than or equal to a confidence threshold, judging whether the cache space for storing the 10 VIN codes to be verified is full; if the cache space is not full, caching the VIN code to be checked in the cache space; if the cache space is full, judging whether three identical VIN codes to be checked exist in the cache space; under the condition that three identical VIN codes to be verified exist in the cache space, judging that the VIN codes to be verified pass verification; replacing the initial cached VIN code to be verified in the cache space with the VIN code to be verified under the condition that three identical VIN codes to be verified do not exist in the cache space, so as to update the cache space; under the condition that three identical VIN codes to be verified exist in the updated cache space, judging that the VIN codes to be verified pass verification; wherein the dictionary repository comprises at least one rule string; the rule character string is an eight-bit character string which accords with the VIN code coding rule and specifies the first eight-bit character position of the VIN code.
In a third aspect, a VIN code identification method is provided, including: the VIN code dictionary library checking method is adopted, and the VIN code to be checked passing the checking is output.
In a fourth aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method described in the foregoing embodiments are implemented.
In a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the method according to the above embodiments.
The VIN code dictionary base checking method, the VIN code recognition method and the VIN code recognition device of the embodiment of the invention finish checking the VIN code to be checked based on the regular character string in the dictionary base, thereby not causing checking errors due to the diversity of the combination of the numbers and the letters, and also not causing the checking errors when one or more English letters and numbers in the VIN code are recognized wrongly or input wrongly, therefore, the error rate of VIN code checking and the error rate of VIN code recognition can be greatly reduced, and the checking accuracy and the recognition accuracy are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic flow chart of a VIN code dictionary library verification method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a VIN code dictionary library checking method according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a VIN dictionary library verification method in a further embodiment of the invention;
fig. 4 is a flowchart illustrating a VIN code dictionary database checking method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In order to reduce the error rate of VIN code verification, the embodiment of the invention provides a new VIN code dictionary library verification method, which is used for verifying the VIN code to be verified based on the regular character strings in the dictionary library, does not depend on the combination of numbers and letters, does not cause verification failure due to the diversity of the combination of the numbers and the letters, does not perform verification according to the calculation result of a specific formula, and can avoid the problem that one or more English letters and numbers in the VIN code cause verification error passing due to recognition error or entry error.
Fig. 1 is a flowchart illustrating a VIN code dictionary library verification method according to an embodiment of the present invention. Referring to fig. 1, the VIN code dictionary database verification method of some embodiments performs verification based on the dictionary database, and may include the following steps S1 to S4. Specific embodiments of steps S1 to S4 will be described in detail below.
Step S1: acquiring a VIN code to be checked;
the VIN code to be verified can be obtained through identification or direct entry.
Step S2: extracting a character string to be checked from the first eight bits of the VIN code to be checked;
in the embodiment of the present invention, the character string to be verified refers to a character string with a length greater than or equal to 1 extracted from the first eight bits of the VIN code to be verified. The length of the character string to be checked is the number of characters contained in the character string to be checked. And if the length of the character string to be verified is 1, the character string to be verified is a single character. And if the length of the character string to be checked is more than 1 and less than 8, the character string to be checked is a character string consisting of a plurality of continuous-bit characters extracted from the first eight bits of the VIN code to be checked. And if the length of the character string to be checked is equal to 8, the character string to be checked is a character string consisting of the first eight-bit characters extracted from the VIN code to be checked. That is to say, the character string to be verified is a character string starting from the A1 st bit to the A2 nd bit of the VIN code to be verified, where A1 and A2 are both positive integers from 1 to 8, as long as A2 is greater than or equal to A1.
In specific implementation, the rules for extracting the characters to obtain the character string to be verified can be preset or randomly selected from various possible rules. For example, in order to completely eliminate the influence of diversification of numbers and letter combinations, or to maximally avoid that one or several english alphabets and numbers of the VIN code pass through a verification error possibly caused by a recognition error or an entry error, preferably, the length of the character string to be verified is equal to 8, and step S2 specifically includes extracting the first eight bits of the VIN code to be verified as the character string to be verified.
In a one-time verification process, step S2 may be performed only once to extract one to-be-verified character string, or step S2 may be performed once to extract two or more to-be-verified character strings having different lengths, or step S2 may be performed each time only one to-be-verified character string is extracted, step S2 is performed at least twice to extract two or more to-be-verified character strings having different lengths, and then verification is performed through subsequent steps.
And step S3: and judging whether the character string to be checked is the same as the regular character string in the dictionary library.
And step S4: and under the condition that the character string to be verified is the same as at least one regular character string, judging that the VIN code to be verified passes verification.
The rule character string is a character string established based on VIN code encoding rules. The VIN code encoding rule is an encoding rule established for a character at each character position in the VIN code. In other words, each character position in a correct VIN code has its corresponding encoding rule. Based on this, the dictionary database based on the embodiment of the present invention includes at least one regular character string, where the regular character string is a character string that conforms to the VIN code encoding rule and specifies a corresponding character position of the regular character string in the VIN code.
Since the regular character string in the embodiment of the present invention is used for verifying the character string to be verified, the length of the regular character string is greater than or equal to 1 and less than or equal to 8, and therefore, the length of the regular character string is also greater than or equal to 1 and less than or equal to 8. The length of the regular character string is the number of characters contained in the regular character string. The rule character string may be a character string that conforms to the VIN code encoding rule and specifies a continuous character string from the beginning of the B1 th bit to the end of the B2 nd bit, where B1 and B2 are both any positive integer from 1 to 8, as long as B2 is greater than or equal to B1. The regular character string in the dictionary database may be a character string directly obtained according to the VIN code encoding rule, or a character string extracted from a correct VIN code.
The comparison between the regular character string in the dictionary database and the character string to be verified is a key step for completing the verification of the VIN code to be verified, and the character string to be verified is a key element for judging the authenticity of the VIN code to be verified. Therefore, how to set the rule character strings in the dictionary base is a key problem for completing the verification of the VIN code to be verified.
In a possible embodiment, the lengths of the regular character strings included in the dictionary database may be the same or different. In order to facilitate the verification of the character strings to be verified, the regular character strings in the dictionary database are classified. The dictionary repository may include at least one dictionary sub-repository including at least one of the rule strings. In some embodiments, the step S3 is specifically: and judging whether the character string to be checked is the same as the regular character string in at least one dictionary sub-library.
Meanwhile, the different dictionary sub-libraries can be respectively used for storing regular character strings with different rule characteristics. The lengths of the regular character strings in different dictionary sub-libraries can be the same or different, and the lengths of the regular character strings in the same dictionary sub-library can also be the same or different. Similarly, the same dictionary sub-library may also be used to store regular character strings with the same rule characteristic, for example, the dictionary sub-library may be divided according to different license plate types, or the dictionary sub-library may be divided according to the length of the regular character string and the character position of the regular character string in the VIN code encoding rule.
In order to facilitate the judgment of whether the character string to be checked is the same as a regular character string, the lengths of all the regular character strings in any dictionary sub-library are the same. And under the condition that the length of the regular character string in the dictionary sub-library is equal to that of the character string to be verified, and the character position of the regular character string in the dictionary sub-library in the VIN code encoding rule is the same as that of the character string to be verified in the VIN code to be verified, the dictionary sub-library is a target dictionary sub-library of the character string to be verified. Referring to fig. 2, in another embodiment of the present invention, the step of determining whether the character string to be verified is the same as a regular character string in at least one dictionary sub-library specifically includes: step S301, determining at least one target dictionary sub-library according to the length of the character string to be verified and the character position of the character string to be verified in the VIN code to be verified; step S302, judging whether the character string to be checked is the same as the regular character string in the target dictionary sub-library.
In the case that the lengths of all the regular character strings in any one of the dictionary sub-libraries are the same, the lengths of the stored regular character strings and the character positions of the regular character strings in the VIN code encoding rules can be added to each dictionary sub-library in advance as marks, the target dictionary sub-library can be determined by comparing the lengths of the character strings to be checked with the marks of the lengths of the regular character strings in each dictionary sub-library and comparing the character positions of the character strings to be checked in the VIN code to be checked with the marks of the character positions of the regular character strings in the VIN code encoding rules in each dictionary sub-library, for example, when the first eight bits of the VIN code to be checked are extracted as the character strings to be checked, the target dictionary sub-library can be confirmed by searching the dictionary sub-libraries with the lengths of 8 and the character position marks of the 1 st bit to the 8 th bit.
In the step S302, if the character string to be verified is the same as the regular character string in the target dictionary sub-library, it is determined that the VIN code to be verified, from which the character string to be verified is extracted, passes verification; if the character string to be verified is different from all the regular character strings in the target dictionary sub-library, judging that the VIN code to be verified for extracting the character to be verified does not pass verification.
In the embodiments, the dictionary database is divided into two or more dictionary sub-databases, a target dictionary sub-database is accurately determined from the dictionary sub-database according to the length of the character string to be verified and the character position of the character string in the VIN code to be verified, and then whether the target dictionary sub-database contains the character string to be verified is determined, so that whether the character string to be verified is the same as the regular character string in the target dictionary sub-database is determined, and whether the VIN code to be verified passes verification is determined according to the determination result, so that the determination range of the regular character string can be reduced, and the VIN code verification efficiency is improved.
And judging whether the character string to be checked is the same as the regular character string in the dictionary base, and actually comparing the characters in the character string to be checked with the characters in the regular character string in the dictionary base one by one. After comparison, if the characters in the character string to be verified are completely the same as the corresponding characters in one regular character string in the dictionary library, the character string to be verified is considered to be the same as the regular character string in the dictionary library, the character string to be verified is considered to conform to the stipulation of the VIN code encoding rule on the corresponding character position of the character string to be verified in the VIN code, the VIN code to be verified of the extracted character string to be verified conforms to the VIN code encoding rule, and the verification is passed; otherwise, the character string to be verified is regarded as different from all the regular character strings in the dictionary base, the character string to be verified is regarded as not conforming to the regulation of the VIN code encoding rule on the character position corresponding to the character string to be verified in the VIN code, the VIN code to be verified of the extracted character string to be verified is judged not conforming to the VIN code encoding rule, and the verification is not passed.
If the character strings to be verified pass the verification, the result that the verification passes can be directly output, or the steps S1 to S2 can be repeatedly executed according to the verification requirement to obtain at least one new character string to be verified again, and the result that the verification passes is output under the condition that all the character strings to be verified pass the verification, and the result that the verification fails is output under the condition that any one of the character strings to be verified fails the verification.
The VIN code dictionary base verification method in each embodiment is based on the comparison between the regular character string in the dictionary base and the character string to be verified extracted from the VIN code to be verified, so that the VIN code to be verified is verified, verification is not performed according to specific numbers and letters, and verification is not performed according to a calculation result of a specific formula, so that the problems of verification errors caused by the diversity of the numbers and the letters and verification error passing caused by the recognition error of a certain letter can be avoided, and therefore, the VIN code verification error passing rate can be reduced and the verification accuracy can be improved by the scheme in the embodiment.
When the VIN code to be verified is obtained through recognition, it may be caused that the VIN code to be verified obtained through recognition fails to pass verification of the rule character string due to recognition error, so that a true VIN code fails to pass verification of the dictionary database. Here, the foregoing step S1 is specifically S11, and the VIN code to be verified is obtained through identification. To this end, some embodiments of the present invention introduce a confidence determination mechanism through steps S31 to S32. The specific embodiments of steps S31 to S32 will be described in detail below.
Step S31: and under the condition that the character string to be verified is different from all the regular character strings in the dictionary library, obtaining the confidence coefficient of the VIN code to be verified.
Step S32: and if the confidence coefficient of the VIN code to be verified is greater than or equal to the confidence coefficient threshold value, judging that the VIN code to be verified passes verification.
In the step S31, the confidence of the VIN code to be verified may be obtained by using the existing method for obtaining the confidence value of the OCR recognition, and thus, the details are omitted. Obviously, the greater the confidence value of the VIN code to be verified in step S32 is, the greater the probability that the VIN code to be verified as the recognition result is correct is. Therefore, when the confidence coefficient of the VIN code to be verified is greater than or equal to the confidence coefficient threshold, the VIN code to be verified obtained by the current identification can be considered to be correct, and meanwhile, the VIN code to be verified is judged to pass verification. At this time, in order to mark the reliability degree of the VIN code to be verified, the confidence level of the VIN code to be verified may be output.
Considering that there may be a misjudgment situation through only one confidence judgment, in further embodiments, the VIN code to be checked is determined by the number of confidence judgments. In the step S32, if the confidence of the VIN code to be verified is greater than or equal to the confidence threshold, it is determined that the VIN code to be verified passes verification, and the method specifically includes:
step S321: judging whether a cache space for storing a plurality of VIN codes to be checked is full;
step S322: if the cache space is not full, caching the VIN code to be verified in the cache space, and continuously acquiring the VIN code to be verified through identification;
step S323: if the cache space is full, judging whether at least two identical VIN codes to be checked exist in the cache space;
step S324: and under the condition that at least two identical VIN codes to be verified exist in the cache space, judging that the VIN codes to be verified pass verification.
Through the steps, all to-be-verified VIN codes meeting confidence level conditions are stored in the cache space, namely all to-be-verified VIN codes stored in the cache space are to-be-verified VIN codes with confidence levels larger than or equal to a confidence level threshold value, then whether at least two identical VIN codes exist in the to-be-verified VIN codes is judged, if at least two identical VIN codes exist, at least two to-be-verified VIN codes which are obtained through identification and have confidence levels larger than or equal to the confidence level threshold value are identical in the identification process, at the moment, the to-be-verified VIN codes are judged to pass the verification, and therefore judgment errors which may exist when the VIN codes pass the verification are judged only through one-time confidence level judgment are avoided.
Considering that the VIN code encoding rule is added with a new encoding rule after a certain period of time, the dictionary database in the embodiment of the invention has the possibility that the rule character string conforming to the newly added VIN code encoding rule cannot be added in time, and an updating mechanism of the dictionary database is established. In some embodiments, in step S324 (in the case that there are at least two identical VIN codes to be checked in the buffer space), the method further includes: and storing the character string to be checked in the dictionary database so as to update the dictionary database. More specifically, it may include: storing the character string to be verified and the VIN code to be verified in a first temporary dictionary library; and under the condition that the character string to be verified in the first temporary dictionary library accords with the VIN code encoding rule of the corresponding character position, and/or under the condition that the VIN code to be verified in the first temporary dictionary library accords with the VIN code encoding rule, storing the character string to be verified in the dictionary library. In some embodiments, the character string to be verified may be stored in the dictionary library only when the character string to be verified in the first temporary dictionary library conforms to the VIN code encoding rule of the corresponding character position, or the character string to be verified may be stored in the dictionary library only when the VIN code to be verified in the first temporary dictionary library conforms to the VIN code encoding rule, or the character string to be verified may be stored in the dictionary library only when the character string to be verified in the first temporary dictionary library conforms to the VIN code encoding rule of the corresponding character position and the VIN code to be verified in the first temporary dictionary library conforms to the VIN code encoding rule. The VIN code encoding rule includes an original VIN code encoding rule and a newly added VIN code encoding rule. Alternatively, step S324 may specifically include: only the VIN code to be checked is stored in a second temporary dictionary library; and under the condition that the VIN code to be verified in the second temporary dictionary database accords with the VIN code encoding rule, storing the character string to be verified in the dictionary database as a rule character string.
Based on the same inventive concept of updating the dictionary database, considering that the number of the VIN codes to be checked that can be stored in the cache space is limited, when the cache space is full, the newly identified VIN codes to be checked cannot be cached continuously, and if at least two identical VIN codes to be checked still do not exist in the cache space at the moment, if the verification is determined to be finished and a conclusion that the verification fails is given, the correct VIN codes may not pass the verification. Therefore, some preferred embodiments of the present invention further introduce a mechanism for updating the cache space, which specifically includes the following steps:
step S325: replacing the stored VIN codes to be verified in the cache space with the VIN codes to be verified under the condition that at least two identical VIN codes to be verified do not exist in the cache space, so as to update the cache space;
step S326: and under the condition that at least two identical VIN codes to be checked exist in the updated cache space, judging that the confidence coefficient of the VIN codes to be checked is greater than or equal to a confidence coefficient threshold value.
With reference to fig. 3, through the above steps, the cache space updating mechanism is implemented, and when the cache space is full, the VIN codes to be verified that have been stored in the cache space may be replaced with the newly identified VIN codes to be verified, so that the verification of the VIN codes to be verified is completed in the updated cache space.
The specific update mechanism of the cache space may be established according to specific identification requirements. For example, in view of simplicity and convenience of an update mechanism, the VIN code to be checked cached earliest in the cache space may be replaced with the VIN code to be checked. Or continuing to judge whether the confidence of the VIN codes to be verified is greater than the minimum of the confidence of all the VIN codes to be verified stored in the cache space from the perspective of the confidence; if the confidence coefficient of the VIN codes to be verified is greater than the minimum value of the confidence coefficients of all the VIN codes to be verified stored in the cache space, calculating the number of the VIN codes to be verified with the minimum confidence coefficient stored in the cache space; replacing the VIN code to be verified with the lowest confidence coefficient in the cache space when the number of the VIN code to be verified with the lowest confidence coefficient stored in the cache space is 1; and when the number of the VIN codes to be verified with the minimum confidence coefficient stored in the cache space is more than 1, replacing any VIN code to be verified with the minimum confidence coefficient or all the VIN codes to be verified with the minimum confidence coefficient in the cache space with the VIN code to be verified. If the confidence degrees of the VIN codes to be verified are equal to the minimum value of the confidence degrees of all the VIN codes to be verified stored in the buffer space, the VIN codes to be verified with the minimum confidence degrees stored in the buffer space can be replaced by the VIN codes to be verified, or the VIN codes to be verified with the minimum confidence degrees stored in the buffer space can not be replaced by the VIN codes to be verified.
Of course, a mechanism for updating the dictionary repository may still be introduced here. Specifically, in the case that at least two identical VIN codes to be checked exist in the cache space, and/or in the case that at least two identical VIN codes to be checked exist in the updated cache space, the method further includes: and storing the character string to be checked in the dictionary database so as to update the dictionary database. Similarly, storing the character string to be verified in the dictionary library, specifically including storing the character string to be verified and the VIN code to be verified in a third temporary dictionary library; and under the condition that the character string to be verified in the third temporary dictionary library conforms to the VIN code encoding rule of the corresponding character position, and/or under the condition that the VIN code to be verified in the third temporary dictionary library conforms to the VIN code encoding rule, storing the character string to be verified in the dictionary library. Or only storing the VIN code to be verified in a fourth temporary dictionary library; and under the condition that the VIN code to be verified in the fourth temporary dictionary database accords with the VIN code encoding rule, storing the character string to be verified in the dictionary database as a rule character string. The technical effect of the mechanism for updating the dictionary database is the same as that of the mechanism for updating the dictionary database, and therefore, the detailed description thereof is omitted.
The first temporary dictionary bank, the second temporary dictionary bank, the third temporary dictionary bank and the fourth temporary dictionary bank are all used for temporarily storing the verified VIN codes to be verified and/or the character strings to be verified corresponding to the verified VIN codes, and after comparing the character strings to be verified and/or the verified VIN codes with the original VIN code encoding rules and the updated VIN code encoding rules, the character strings to be verified corresponding to the character positions of the VIN code encoding rules or the character strings to be verified corresponding to the verified VIN codes according to the VIN code encoding rules are stored in the dictionary bank to complete the updating of the dictionary bank, so that the dictionary bank can more accurately complete the verification of the VIN codes to be verified.
In consideration of both the verification accuracy and the verification efficiency, as shown in fig. 4, a specific embodiment of the present invention includes the following steps:
acquiring a VIN code to be verified through identification;
extracting the first eight bits of the VIN code to be checked as a character string to be checked;
judging whether the character string to be checked is the same as a regular character string in a dictionary library or not;
under the condition that the character string to be verified is the same as at least one rule character string, judging that the VIN code to be verified passes verification;
under the condition that the character string to be verified is different from all the regular character strings in the dictionary library, obtaining the confidence coefficient of the VIN code to be verified;
if the confidence of the VIN codes to be verified is greater than or equal to a confidence threshold, judging whether the cache space for storing the 10 VIN codes to be verified is full;
if the cache space is not full, caching the VIN code to be verified in the cache space, and continuously acquiring the VIN code to be verified through identification;
if the cache space is full, judging whether three identical VIN codes to be checked exist in the cache space;
under the condition that three identical VIN codes to be verified exist in the cache space, judging that the VIN codes to be verified pass verification;
replacing the earliest cached VIN code to be verified in the cache space with the VIN code to be verified under the condition that three identical VIN codes to be verified do not exist in the cache space so as to update the cache space;
and under the condition that three identical VIN codes to be verified exist in the updated cache space, judging that the VIN codes to be verified pass verification.
Wherein the dictionary repository comprises at least one rule string; the rule character string is an eight-bit character string which accords with the VIN code coding rule and specifies the first eight-bit character position of the VIN code.
The dictionary base verification method greatly improves verification accuracy, and further improves verification accuracy by introducing multi-frame identification verification, so that the misrecognition rate can be reduced to 2% finally.
In addition, it should be noted that the step numbers used in the above embodiments are only used for facilitating the reading of the specification by the person skilled in the art, and are not used for limiting the order of the steps, nor are they used for limiting that a step must be simultaneously present in one embodiment, and the steps included in a certain embodiment and the order between the steps must be determined by the description of the related terms of the embodiments and the relationship between the steps.
In addition, the embodiment of the invention also provides a VIN code identification method, which comprises the above-mentioned VIN code dictionary library verification method and outputs the to-be-verified VIN code passing the verification.
Meanwhile, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the above embodiments when executing the program. The electronic device may also include other hardware components of prior art credential identification devices, such as a camera, a credential placement component, and the like.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method described in the above embodiments.
In summary, the VIN code dictionary base verification method, the VIN code identification method and the device in the embodiments of the present invention complete verification of the to-be-verified VIN code based on the regular character strings in the dictionary base, which neither results in a verification error due to diversity of numbers and letter combinations, nor results in a verification error when one or several english letters and numbers in the VIN code are recognized incorrectly or input incorrectly, so that the VIN code verification error rate and the VIN code misrecognition error rate can be greatly reduced, and the verification accuracy and the identification accuracy are improved.

Claims (15)

1. A VIN code dictionary checking method is characterized by comprising the following steps:
acquiring a VIN code to be checked;
extracting a character string to be checked from the first eight bits of the VIN code to be checked;
judging whether the character string to be checked is the same as a regular character string in a dictionary library or not;
under the condition that the character string to be verified is the same as at least one rule character string, judging that the VIN code to be verified passes verification;
wherein the dictionary repository comprises at least one rule string; the regular character string is a specified character string which accords with VIN code encoding rules and corresponds to the character position of the regular character string in the VIN code;
acquiring a VIN code to be checked, which specifically comprises the following steps: acquiring a VIN code to be verified through identification;
the VIN code dictionary checking method further comprises the following steps:
under the condition that the character string to be verified is different from all the regular character strings in the dictionary library, obtaining the confidence coefficient of the VIN code to be verified;
if the confidence coefficient of the VIN code to be verified is greater than or equal to the confidence coefficient threshold value, judging that the VIN code to be verified passes verification;
if the confidence of the VIN code to be verified is greater than or equal to the confidence threshold, determining that the VIN code to be verified passes verification, specifically comprising:
if the confidence of the VIN codes to be verified is greater than or equal to a confidence threshold, judging whether a cache space for storing the VIN codes to be verified is full;
if the cache space is not full, caching the VIN code to be verified in the cache space, and continuously acquiring the VIN code to be verified through identification;
if the cache space is full, judging whether at least two identical VIN codes to be checked exist in the cache space;
and under the condition that at least two identical VIN codes to be verified exist in the cache space, judging that the VIN codes to be verified pass verification.
2. The method as claimed in claim 1, wherein extracting the character string to be checked from the first eight bits of the VIN code to be checked specifically comprises:
and extracting the first eight bits of the VIN code to be checked as a character string to be checked.
3. The method of claim 1 or 2, wherein the dictionary repository comprises at least one dictionary sub-repository comprising at least one of the rule strings; judging whether the character string to be checked is the same as a regular character string in a dictionary library, and specifically comprising the following steps:
and judging whether the character string to be checked is the same as the regular character string in at least one dictionary sub-library.
4. The method of claim 3, wherein all rule strings in any one of said dictionary sub-libraries are of the same length; under the condition that the length of the regular character string in the dictionary sub-library is equal to that of the character string to be verified, and the character position of the regular character string in the dictionary sub-library in the VIN code encoding rule is the same as that of the character string to be verified in the VIN code to be verified, the dictionary sub-library is a target dictionary sub-library of the character string to be verified;
judging whether the character string to be checked is the same as the regular character string in the dictionary sub-library, and specifically comprising the following steps:
determining at least one target dictionary sub-library according to the length of the character string to be verified and the character position of the character string to be verified in the VIN code to be verified;
and judging whether the character string to be checked is the same as the regular character string in the target dictionary sub-library.
5. The method of any one of claims 1, 2, or 4, further comprising:
and outputting the confidence degree of the VIN code to be verified which passes the verification.
6. The method of any of claims 1, 2 or 4, wherein in case there are at least two identical VIN codes to be checked in the buffer space, further comprising:
and storing the character string to be checked in the dictionary database so as to update the dictionary database.
7. The method according to claim 6, wherein storing the character string to be verified in the dictionary repository specifically includes:
storing the character string to be verified and the VIN code to be verified in a first temporary dictionary library;
under the condition that the character string to be verified in the first temporary dictionary library accords with the VIN code encoding rule of the corresponding character position, and/or under the condition that the VIN code to be verified in the first temporary dictionary library accords with the VIN code encoding rule, the character string to be verified is stored in the dictionary library as a regular character string; or
Storing the VIN code to be verified in a second temporary dictionary library;
and under the condition that the VIN code to be verified in the second temporary dictionary database accords with the VIN code encoding rule, storing the character string to be verified in the dictionary database as a rule character string.
8. The method of any one of claims 1, 2, or 4, further comprising:
replacing the stored VIN codes to be verified in the cache space with the VIN codes to be verified under the condition that at least two identical VIN codes to be verified do not exist in the cache space, so as to update the cache space;
and under the condition that at least two identical VIN codes to be verified exist in the updated cache space, judging that the VIN codes to be verified pass verification.
9. The method of claim 8, wherein replacing the stored VIN code to be verified in the buffer space with the VIN code to be verified comprises:
replacing the earliest cached VIN code to be verified in the cache space with the VIN code to be verified; or
Judging whether the confidence coefficient of the VIN codes to be verified is larger than the minimum value of the confidence coefficients of all the VIN codes to be verified stored in the cache space;
if the confidence coefficient of the VIN codes to be verified is greater than the minimum value of the confidence coefficients of all the VIN codes to be verified stored in the cache space, calculating the number of the VIN codes to be verified with the minimum confidence coefficient stored in the cache space;
if the number of the VIN codes to be verified with the minimum confidence coefficient stored in the cache space is 1, replacing the VIN codes to be verified with the minimum confidence coefficient in the cache space by the VIN codes to be verified;
if the number of the to-be-verified VIN codes with the minimum confidence coefficient stored in the cache space is larger than 1, replacing any one of the to-be-verified VIN codes with the minimum confidence coefficient in the cache space with the to-be-verified VIN code, or replacing all the to-be-verified VIN codes with the minimum confidence coefficient in the cache space with the to-be-verified VIN code.
10. The method of claim 8, wherein in case that at least two identical VIN codes to be checked exist in the buffer space and/or in case that at least two identical VIN codes to be checked exist in the updated buffer space, further comprising:
and storing the character string to be checked in the dictionary database so as to update the dictionary database.
11. The method according to claim 10, wherein storing the character string to be verified in the dictionary repository specifically comprises:
storing the character string to be verified and the VIN code to be verified in a third temporary dictionary library;
under the condition that the character string to be verified in the third temporary dictionary library conforms to the VIN code encoding rule of the corresponding character position, and/or under the condition that the VIN code to be verified in the second temporary dictionary library conforms to the VIN code encoding rule, the character string to be verified is stored in the dictionary library as a regular character string; or alternatively
Storing the VIN code to be verified in a fourth temporary dictionary library;
and under the condition that the VIN code to be verified in the fourth temporary dictionary database accords with the VIN code encoding rule, storing the character string to be verified in the dictionary database as a rule character string.
12. A VIN code dictionary checking method is characterized by comprising the following steps:
acquiring a VIN code to be verified through identification;
extracting the first eight bits of the VIN code to be checked as a character string to be checked;
judging whether the character string to be checked is the same as a regular character string in a dictionary library or not;
under the condition that the character string to be verified is the same as at least one rule character string, judging that the VIN code to be verified passes verification;
under the condition that the character string to be verified is different from all the regular character strings in the dictionary library, obtaining the confidence coefficient of the VIN code to be verified;
if the confidence of the VIN codes to be verified is greater than or equal to a confidence threshold, judging whether the cache space for storing the 10 VIN codes to be verified is full;
if the cache space is not full, caching the VIN code to be verified in the cache space, and continuously acquiring the VIN code to be verified through identification;
if the cache space is full, judging whether three identical VIN codes to be checked exist in the cache space;
under the condition that three identical VIN codes to be verified exist in the cache space, judging that the VIN codes to be verified pass verification;
replacing the initial cached VIN code to be verified in the cache space with the VIN code to be verified under the condition that three identical VIN codes to be verified do not exist in the cache space, so as to update the cache space;
under the condition that three identical VIN codes to be verified exist in the updated cache space, judging that the VIN codes to be verified pass verification;
wherein the dictionary repository comprises at least one rule string; the rule character string is an eight-bit character string which accords with the VIN code coding rule and specifies the first eight-bit character position of the VIN code.
13. A VIN code identification method, comprising the VIN code dictionary library verification method of any one of claims 1 to 12, and outputting the verified VIN codes to be verified.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 13 are implemented when the processor executes the program.
15. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 13.
CN201911344704.XA 2019-12-24 2019-12-24 VIN code dictionary base checking method, VIN code identification method and device Active CN111126041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911344704.XA CN111126041B (en) 2019-12-24 2019-12-24 VIN code dictionary base checking method, VIN code identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911344704.XA CN111126041B (en) 2019-12-24 2019-12-24 VIN code dictionary base checking method, VIN code identification method and device

Publications (2)

Publication Number Publication Date
CN111126041A CN111126041A (en) 2020-05-08
CN111126041B true CN111126041B (en) 2023-04-11

Family

ID=70501705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911344704.XA Active CN111126041B (en) 2019-12-24 2019-12-24 VIN code dictionary base checking method, VIN code identification method and device

Country Status (1)

Country Link
CN (1) CN111126041B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259354B1 (en) * 1998-09-01 2001-07-10 Fdi Consulting, Inc. System and methods for vehicle identification number validation
CN109447076A (en) * 2018-09-20 2019-03-08 上海眼控科技股份有限公司 A kind of vehicle VIN code recognition detection method for vehicle annual test
CN110110162A (en) * 2018-01-30 2019-08-09 江苏迪纳数字科技股份有限公司 A method of VIN code is verified by VIN code check position standard weighting algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259354B1 (en) * 1998-09-01 2001-07-10 Fdi Consulting, Inc. System and methods for vehicle identification number validation
CN110110162A (en) * 2018-01-30 2019-08-09 江苏迪纳数字科技股份有限公司 A method of VIN code is verified by VIN code check position standard weighting algorithm
CN109447076A (en) * 2018-09-20 2019-03-08 上海眼控科技股份有限公司 A kind of vehicle VIN code recognition detection method for vehicle annual test

Also Published As

Publication number Publication date
CN111126041A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN111177184A (en) Structured query language conversion method based on natural language and related equipment thereof
CN110825857B (en) Multi-round question and answer identification method and device, computer equipment and storage medium
US8849841B2 (en) Memory circuit for Aho-corasick type character recognition automaton and method of storing data in such a circuit
CN112668313A (en) Intelligent sentence error correction method and device, computer equipment and storage medium
CN116127953B (en) Chinese spelling error correction method, device and medium based on contrast learning
US7809566B2 (en) One-step repair of misrecognized recognition strings
US11790174B2 (en) Entity recognition method and apparatus
CN104008093A (en) Method and system for chinese name transliteration
CN111651978A (en) Entity-based lexical examination method and device, computer equipment and storage medium
CN108388606B (en) Method for checking base table field names in Sql sentences and computer equipment
CN111797217A (en) Information query method based on FAQ matching model and related equipment thereof
CN111079437B (en) Entity identification method, electronic equipment and storage medium
CN111126042B (en) VIN code verification method and VIN code identification method and device using confidence
CN111126041B (en) VIN code dictionary base checking method, VIN code identification method and device
EP2191396A2 (en) An apparatus for preparing a display document for analysis
CN111126043B (en) VIN code multiple checking method, VIN code identification method and device
CN111079415B (en) Chinese automatic error checking method based on collocation conflict
CN111126044B (en) VIN code multiple verification method and VIN code identification method and device using confidence
CN116756382A (en) Method, device, setting and storage medium for detecting sensitive character string
CN111291535A (en) Script processing method and device, electronic equipment and computer readable storage medium
CN115994210A (en) Method and device for quickly searching text in OFD document and electronic equipment
CN113221558B (en) Express address error correction method and device, storage medium and electronic equipment
CN111782773B (en) Text matching method and device based on cascade mode
CN113609864A (en) Text semantic recognition processing system and method based on industrial control system
TWM620558U (en) String matching system

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
GR01 Patent grant
GR01 Patent grant