WO2021169619A1 - 车牌校验方法、装置、计算机设备及存储介质 - Google Patents

车牌校验方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021169619A1
WO2021169619A1 PCT/CN2021/070584 CN2021070584W WO2021169619A1 WO 2021169619 A1 WO2021169619 A1 WO 2021169619A1 CN 2021070584 W CN2021070584 W CN 2021070584W WO 2021169619 A1 WO2021169619 A1 WO 2021169619A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
comparison
character string
license plate
verified
Prior art date
Application number
PCT/CN2021/070584
Other languages
English (en)
French (fr)
Inventor
丁晶晶
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2021169619A1 publication Critical patent/WO2021169619A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/768Arrangements for image or video recognition or understanding using pattern recognition or machine learning using context analysis, e.g. recognition aided by known co-occurring patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • This application relates to the field of image recognition, and in particular to a license plate verification method, device, computer equipment and storage medium.
  • the embodiments of the present application provide a license plate verification method, device, computer equipment, and storage medium to solve the problem of high misjudgment rate of license plate verification.
  • a vehicle license plate verification method including:
  • Target segmented character string is a character string corresponding to a target license plate
  • segmented character string to be verified is a character string corresponding to a license plate to be verified
  • the first target comparison position and the second target comparison are updated according to the preset sequential comparison method Position, and return to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is not the last position, update the first target comparison position and the second target comparison position according to the deviation comparison method , Adding one to the number of character check errors, and returning to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is the last position, adjusting the number of character check errors according to the second comparison result of the last position;
  • the number of character check errors is compared with a preset number of allowable error checks, and if the number of character check errors is not greater than the preset number of allowable error checks, the check is successful.
  • a license plate verification device includes:
  • the first acquisition module is configured to acquire a target segmented character string and a segmented character string to be verified, the target segmented character string is a character string corresponding to a target license plate, and the segmented character string to be verified is a character corresponding to a license plate to be verified string;
  • the first comparison module is configured to compare the length of the target segmented character string with the length of the segmented character string to be verified to obtain a first comparison result, and determine a deviation comparison mode according to the first comparison result;
  • the comparison position setting module is used to determine a first target comparison position from the target segmented character string, and determine a second target comparison position from the to-be-verified segmented character string;
  • a second comparison module configured to compare the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result
  • the first update module is configured to update the first target comparison according to a preset sequential comparison method when the second comparison result is equal and the first target comparison position is not the last position Position and the second target comparison position, and return to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the second update module is configured to update the first target comparison position according to the deviation comparison method when the second comparison result is not equal and the first target comparison position is not the last position And the second target comparison position, add one to the number of character check errors, and return to execute the comparison of the character at the first target comparison position with the character at the second target comparison position to obtain the first 2. Steps to compare results;
  • An adjustment module configured to adjust the number of character check errors according to the second comparison result of the last position when the first target comparison position is the last position
  • the third comparison module is used to compare the number of character check errors with a preset allowable error check number, if the number of character check errors is not greater than the preset allowable error check Number, the verification is successful.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • Target segmented character string is a character string corresponding to a target license plate
  • segmented character string to be verified is a character string corresponding to a license plate to be verified
  • the first target comparison position and the second target comparison are updated according to the preset sequential comparison method Position, and return to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is not the last position, update the first target comparison position and the second target comparison position according to the deviation comparison method , Adding one to the number of character check errors, and returning to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is the last position, adjusting the number of character check errors according to the second comparison result of the last position;
  • the number of character check errors is compared with a preset number of allowable error checks, and if the number of character check errors is not greater than the preset number of allowable error checks, the check is successful.
  • One or more readable storage media storing computer readable instructions, where when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • Target segmented character string is a character string corresponding to a target license plate
  • segmented character string to be verified is a character string corresponding to a license plate to be verified
  • the first target comparison position and the second target comparison are updated according to the preset sequential comparison method Position, and return to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is not the last position, update the first target comparison position and the second target comparison position according to the deviation comparison method , Adding one to the number of character check errors, and returning to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is the last position, adjusting the number of character check errors according to the second comparison result of the last position;
  • the number of character check errors is compared with a preset number of allowable error checks, and if the number of character check errors is not greater than the preset number of allowable error checks, the check is successful.
  • the above-mentioned license plate verification method, device, computer equipment and storage medium determine different deviation comparison methods by comparing the length of the target segmented character string with the length of the segmented character string to be verified.
  • the characters of the character string are compared with the characters of the segmented character string to be verified, and the first target comparison position and the second target comparison position are updated according to the deviation comparison method.
  • the first target comparison position is When the last digit is the last bit, the number of character check errors is adjusted according to the second comparison result of the last position, and the preset number of allowable character check errors is compared with the number of character check errors. It avoids the influence of errors in the license plate recognition process on the license plate verification, improves the pass rate and accuracy of the license plate recognition, and reduces the misjudgment rate of the license plate verification.
  • FIG. 1 is a schematic diagram of an application environment of a license plate verification method in an embodiment of the present application
  • Fig. 2 is a flowchart of a license plate verification method in an embodiment of the present application
  • FIG. 3 is another flowchart of the license plate verification method in an embodiment of the present application.
  • Fig. 4 is a principle block diagram of a license plate verification device in an embodiment of the present application.
  • FIG. 5 is another principle block diagram of the license plate verification device in an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a computer device in an embodiment of the present application.
  • the license plate verification method can be applied in the application environment as shown in FIG. 1.
  • the license plate verification method is applied in the license plate verification system, and the license plate verification Xiyong includes
  • the client and server described in FIG. 1 communicate with the server through the network to solve the problem of a high rate of misjudgment in license plate verification.
  • the client is also called the client, which refers to the program that corresponds to the server and provides local services to the client.
  • the client can be installed on, but not limited to, various personal computers, laptops, smart phones, and tablet computers.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a method for verifying a license plate is provided.
  • the method is applied to the server in FIG. 1 as an example for description, including the following steps:
  • S10 Obtain a target segmented character string and a segmented character string to be verified, where the target segmented character string is a character string corresponding to a target license plate, and the segmented character string to be verified is a character string corresponding to a license plate to be verified;
  • the target segmented character string refers to a character string obtained after character segmentation of a target license plate
  • the target license plate is a real car license plate.
  • the segmented character string to be verified refers to a character string obtained after character segmentation of the license plate to be verified, and the license plate to be verified is obtained by recognizing the license plate image of the vehicle to be verified.
  • the character segmentation method may be used to perform character segmentation processing on the target license plate and the license plate to be verified, so as to obtain the target segmented character string and the segmented character string to be verified.
  • S20 Compare the length of the target segmented character string with the length of the segmented character string to be verified to obtain a first comparison result, and determine a deviation comparison mode according to the first comparison result;
  • the first comparison result refers to a result used to indicate the relationship between the length of the target segmented character string and the length of the segmented character string to be verified. Since the segmented character string to be verified is obtained after character segmentation of the license plate to be verified, and the license plate to be verified is obtained after scanning and recognition by the image recognition system, the image recognition system is used to scan and recognize the license plate to be verified. During the process, the character length of the license plate to be verified may be too long or too short due to recognition errors, that is, the length of the segmented character string to be verified may be different from the length of the target segmented character string.
  • the length value of the target segmented character string and the length value of the segmented character string to be verified are respectively calculated, and then the length value of the target segmented character string is compared with the length value of the segmented character string to be verified to obtain the first comparison As a result, the deviation comparison method is determined according to the first comparison result.
  • the first comparison result can be that if the length of the target segmented character string is the same as the length of the segmented character string to be verified, the corresponding deviation comparison method is the first deviation comparison method; it can also be if the target segment character If the length of the string is greater than the length of the segmented character string to be verified, the corresponding deviation comparison method is the second deviation comparison method; it can also be that if the length of the target segmented character string is less than the length of the segmented character string to be verified, the corresponding The deviation comparison method of is the third deviation comparison method.
  • S30 Determine a first target comparison position from the target segmented character string, and determine a second target comparison position from the to-be-verified segmented character string.
  • the first target comparison position is the position of any character in the target segmented character string.
  • the first target comparison position may be the target segmented character string in order from left to right
  • the first digit of may also be the first digit of the target segmented character string in order from right to left
  • the second target comparison position is the position of any character in the segmented character string to be verified
  • the second target comparison position may be the first position of the segmented character string to be verified in order from left to right, or it may be the first position of the segmented character string to be verified in order from right to left.
  • the order of the first target comparison position and the second target comparison position is the same. It is understandable that if the first target comparison position is the target segmentation string in the order from left to right The first digit, the second target comparison position is the first digit of the segmented character string to be verified in order from left to right.
  • the basis for verifying whether the target license plate and the license plate to be verified are the same is: verifying whether the target license plate string is the same as the license plate string to be verified, so the first target The character at the comparison position is compared with the character at the second target comparison position.
  • the character at the first target comparison position is the character corresponding to the first target comparison position in the target segmented character string
  • the character at the second target comparison position is the second target comparison position in the segmented character string to be verified. The character corresponding to the position.
  • the character at the first target comparison position is converted into a corresponding ASCII value to obtain a first ASCII value
  • the character at the second target comparison position is converted into a corresponding ASCII value to obtain a second ASCII value
  • Comparing the first ASCII value and the second ASCII value to obtain a second comparison result refers to a result obtained by comparing the character at the first target comparison position with the character at the second target comparison position, and the second comparison result may include equality and inequality.
  • the preset sequential comparison mode refers to a mode in which the target segmented character string and the segmented character string to be verified are sequentially compared according to the same character direction.
  • the preset sequential comparison method is to move the first target comparison position one place to the right, and move the second target comparison position one place to the right. If the update sequence of the first target comparison position is determined from right to left according to the target segmented character string, and the update sequence of the second target comparison position is also determined from right to left according to the segmented character string to be verified If the order is determined, the preset sequential comparison method is to move the first target comparison position one place to the left, and move the second target comparison position one place to the left.
  • the second step of comparing results that is, character comparison is performed according to the updated first target comparison position and the second target comparison position, and the corresponding execution step is further selected according to the second comparison result (S50 or S60 or 70).
  • that the first target comparison position is not the last position means that the character indicated by the first target comparison position in the target segmented character string is not the last character. If the second comparison result is not equal, and the two conditions of the first target comparison position are not the last position are both true, then the first target comparison position and the second target comparison position are updated according to the deviation comparison method. Target matching position.
  • the deviation comparison mode may be to move the first target comparison position by one position to the target direction, and move the second target comparison position by one position in the target direction; or it may be to move the first target comparison position to the target direction. Move one position to the target direction, and the comparison position of the second target remains unchanged;
  • the target direction is the preset moving direction.
  • the target direction can be from left to right or from right to left.
  • the target direction is the same as the comparison sequence of the characters. If the comparison sequence of the characters starts from the first position from the left, the target direction can be from left to right. If the comparison starts from the first position on the right, the target direction can be from right to left.
  • the number of character verification errors is used to count the second comparison result. During the comparison between a target segmented character string and the segmented character string to be verified, determine whether to add character verification errors according to the second comparison result performed in the step If the second comparison result performed by the step is not equal, the number of character check errors is increased. Understandably, when the second comparison result is not equal once during the execution of the step, the number of character check errors is The number is increased by 1. When the second comparison result is not equal twice during the execution of the step, the number of character check errors is increased by 2, and so on. The number of character check errors can be initially set to 0. In this step, if the second comparison result is not equal, and the first target comparison position is not the last position, the number of character check errors is increased by one.
  • an error counter may be used. If the second comparison result of the character at the first target comparison position and the second target comparison position is not equal, the error counter is increased by 1, and the After the first target comparison position is the last bit and the comparison is completed, check the reading of the error counter to obtain the number of character verification errors.
  • the second step of comparing results that is, character comparison is performed according to the updated first target comparison position and the second target comparison position, and the corresponding execution step is further selected according to the second comparison result (S50 or S60 or 70).
  • the first target comparison position is the last position, it means that the comparison process between the target segmented character string and the segmented character string to be verified has been completed, then the loop is jumped out, and the second comparison based on the last position As a result, the number of character check errors is adjusted. Specifically, if the second comparison result at the last position is equal, the number of character check errors is not increased or decreased, or an operation of adding zero and subtracting zero is performed. If the second comparison result at the last position is not equal, the number of character check errors is increased by one.
  • S80 Compare the number of character check errors with a preset number of allowable error check, and if the number of character check errors is not greater than the preset number of allowable error check, then check success.
  • the allowable number of character verification errors refers to the number of allowable comparison errors during the process of comparing the characters at the first target comparison position and the characters at the second target comparison position.
  • the number of allowable error checks can be set to 1 or 2. Specifically, it can be set according to the actual accuracy requirements of the length of the target license plate string.
  • the number of character verification errors is less than or equal to the preset allowable number of error verifications, it is determined that the license plate to be verified is successfully verified, and if the number of character verification errors is greater than the preset number If the number of allowable error verifications is set, it is determined that the verification of the license plate to be verified has failed.
  • a preset character device can be set.
  • the number of allowable character verification errors can be preset through the preset character device, and the error counter will finally count errors. To compare.
  • different deviation comparison methods are determined by comparing the length of the target segmented character string with the length of the segmented character string to be verified, and the characters of the target segmented character string are compared with the characters of the segmented character string to be verified. Compare the characters of the segmented character string, and then update the first target comparison position and the second target comparison position according to the deviation comparison method.
  • the second comparison result of a position adjusts the number of character verification errors, and compares the preset allowable number of character verification errors with the number of character verification errors, which better avoids the occurrence of the license plate recognition process
  • the impact of the error on the license plate verification improves the pass rate and accuracy of the license plate recognition, and reduces the misjudgment rate of the license plate verification.
  • the following steps are further included before acquiring the target segmented character string and the segmented character string to be verified:
  • the license plate verification request refers to a request triggered when the license plate verification is performed.
  • the target license plate refers to the accurate license plate number obtained from the license plate system database.
  • the license plate system database refers to the database that stores the license plate numbers registered in the system. For example: when a vehicle pair enters a parking lot, the vehicle's license plate number will be systematically registered first, and the registered license plate number will be stored in the license plate system database.
  • the license plate to be verified refers to the license plate to be verified.
  • the license plate to be verified is mainly obtained by scanning and recognizing the license plate number of a certain vehicle through an image recognition system. For example, when a certain vehicle leaves the parking lot, the license plate of the vehicle is scanned and recognized through the image recognition system to confirm whether it has been registered, which is beneficial to the subsequent calculation of the parking time and the amount of the vehicle.
  • the target license plate and the license plate to be checked included in the license plate verification request are the license plates obtained for the same vehicle at different times or occasions.
  • the method is based on the license plate verification system of the parking lot.
  • the image recognition system first scans and recognizes the license plate number of the vehicle to obtain The license plate to be verified, and the target license plate corresponding to the vehicle is obtained from the license plate system database, thereby triggering the generation of a license plate verification request.
  • the license plate verification request includes the target license plate and the license plate to be verified.
  • S100 Perform character segmentation processing on the target license plate and the license plate to be verified to obtain a target segmented character string and a segmented character string to be verified.
  • the target license plate and the license plate to be verified are divided into a character string formed by independent characters, which is convenient for the target license plate in the subsequent steps.
  • the length of the segmented character string is compared with the length of the segmented character string to be verified, and the characters of the target segmented character string are compared with the characters of the segmented character string to be verified in the subsequent steps.
  • the determining a deviation comparison manner according to the first comparison result includes:
  • the deviation comparison mode is the first deviation comparison mode; the first deviation comparison mode It is: move the first target comparison position by one position to the target direction, and move the second target comparison position by one position in the target direction.
  • the target direction is consistent with the direction in which the first target comparison position is determined from the target segmented character string, and the second target comparison position is determined from the to-be-verified segmented character string. Understandably, if the first target comparison position is determined The update sequence of a target comparison position is determined according to the target segmented character string from left to right, and the second target comparison position update sequence is also determined according to the sequence of the segmented character string to be verified from left to right, The target direction is from left to right.
  • the target license plate is "Yue S 50010”
  • the license plate to be verified recognized by the image recognition system is "Yue S 50O10”.
  • the target segmented string can be obtained as "Yue”, "S”, "5", “0", "0", "1” and "0", and the length of the target segmented string is 7, And determine the character at the first target comparison position in order from left to right, that is, the character at the first target comparison position is "Yue";
  • the segmented character string to be verified can be obtained as "Canton", "S”, "5", “0", "O", "1” and "0", and the segmented character string to be verified can be obtained
  • the length is 7, and the characters in the second target comparison position are determined in order from left to right, that is, the characters in the second target comparison position are "Canton";
  • the character “Yue” in the first target comparison position is compared with the character "Yue” in the second target comparison position.
  • the second comparison result is equal, and the first target comparison position and the second target comparison position are updated according to the preset sequential comparison method, that is, the character at the first target comparison position is updated to "S", and the second The character at the target comparison position is updated to "S”, and the execution of the comparison between the character at the first target comparison position and the character at the second target comparison position is returned, and so on, until the first target comparison position is compared.
  • the character in the target comparison position is updated to the number "0", and the character in the second target comparison position is updated to the letter "O".
  • the second comparison result is not equal, the first target comparison position and the second target comparison position are updated according to the first deviation comparison mode, the first target comparison position is moved one position in the target direction, and the second target comparison The position is moved to the target direction by one position, that is, the character in the first target comparison position is updated to "1", and the character in the second target comparison position is updated to "1", until the first target comparison position is the last position, Then the comparison is completed, and the number of character check errors is 1.
  • the length of the target segmented character string is equal to the length of the segmented character string to be verified, it is considered that if errors occur in the image acquisition, image recognition, and image processing of the license plate number, It is possible to get wrong results.
  • the license plate "Guangdong S 50010” is collected, processed and then identified, and then "Guangdong S 50O10" is obtained.
  • the second comparison result is not equal, it is counted as the number of character verification errors, instead of directly judging that the license plate verification fails, and the subsequent steps are compared with the preset allowable verification errors.
  • the determining a deviation comparison method according to the first comparison result includes:
  • the deviation comparison mode is a second deviation comparison mode, and the second deviation comparison mode In order to move the first target comparison position by one position to the target direction, the second target comparison position remains unchanged.
  • the target license plate is "Yue S 50010”
  • the license plate to be verified recognized by the image recognition system is "Yue S 5010”.
  • the target segmented string can be obtained as "Yue”, "S”, "5", “0", "0", "1” and "0", and the length of the target segmented string is 7, And determine the character at the first target comparison position in order from left to right, that is, the character at the first target comparison position is "Yue";
  • the segmented character string to be verified can be obtained as "Canton”, “S”, "5", “0", "1” and "0", and the length of the segmented character string to be verified is 6. And determine the character at the second target comparison position in order from left to right, that is, the character at the second target comparison position is "Yue";
  • the character “Yue” in the first target comparison position is compared with the character "Yue” in the second target comparison position.
  • the second comparison result is equal, and the first target comparison position and the second target comparison position are updated according to the preset sequential comparison method, that is, the character at the first target comparison position is updated to "S", and the second The character at the target comparison position is updated to "S”, and the execution of the comparison between the character at the first target comparison position and the character at the second target comparison position is returned, and so on, until the first target comparison position is compared.
  • the character in the target comparison position is updated to "0", and the character in the second target comparison position is updated to "1".
  • the second comparison result is not equal, the first target comparison position and the second target comparison position are updated according to the second deviation comparison method, the first target comparison position is moved one position to the target direction, and the second target comparison is The position remains unchanged, that is, the character in the first target comparison position is updated to "1", the character in the second target comparison position remains "1", and the second comparison result is equal. Until the first target direction is the last position, the comparison is completed, and the number of character check errors is 1.
  • the length of the target segmented character string is greater than the length of the segmented character string to be verified, it is taken into account that in the process of image recognition and image processing of the license plate number, if there is a missed recognition or character segmentation process If there is a deviation, it is possible to get the wrong license plate image.
  • the license plate "Guangdong S 50010" is collected, and "Yue S 5010" is obtained after recognition and image processing.
  • the second comparison result is not equal, it is not directly judged that the license plate verification failed, but the first target is compared according to the deviation comparison method when the length of the target segmented string is greater than the length of the segmented string to be verified.
  • the position moves to the target direction by one position, the second target comparison position remains unchanged as the update method of the comparison position, and the number of character error checks is counted, which improves the license plate calibration while ensuring the integrity of the license plate verification.
  • the pass rate and accuracy of the test reduce the misjudgment rate caused by image recognition errors.
  • the determining a deviation comparison method according to the first comparison result includes:
  • the deviation comparison mode is a third deviation comparison mode; the third deviation comparison mode To keep the first target comparison position unchanged, move the second target comparison position to the target direction by one position.
  • the target license plate is "Yue S 50010”
  • the to-be-verified license plate identified by the image recognition system is "Yue S 500010”.
  • the target segmented string can be obtained as "Yue”, "S”, "5", “0", "0", "1” and "0", and the length of the target segmented string is 7, And determine the character at the first target comparison position in order from left to right, that is, the character at the first target comparison position is "Yue";
  • the segmented character string to be verified can be obtained as "Yue”, "S”, "5", "0", "0", "0", "1” and "0" to obtain the verification
  • the length of the split string is 8, and the characters at the second target comparison position are determined in the order from left to right, that is, the characters at the second target comparison position are "Yue";
  • the character “Yue” in the first target comparison position is compared with the character “Yue” in the second target comparison position, the second comparison result is equal, and the said sequence is updated according to the preset sequential comparison method.
  • the first target comparison position and the second target comparison position that is, the character in the first target comparison position is updated to "S”
  • the character in the second target comparison position is updated to "S”
  • the execution returns to the
  • the character at the first target comparison position is compared with the character at the second target comparison position, and so on, until the character at the first target comparison position is updated to "1", and the character at the second target comparison position is
  • the character is updated to "0"
  • the second comparison result is not equal
  • the first target comparison position and the second target comparison position are updated according to the third deviation comparison method, the first target comparison position remains unchanged, and the first target comparison position remains unchanged.
  • the second target comparison position moves one bit in the target direction, that is, the character in the first target comparison position remains "1”, the second target comparison position is updated to "1", and the second comparison result is equal. Until the first target direction is the last position, the comparison is completed, and the number of character check errors is 1.
  • the license plate “Yue S 50010” is collected, and "Yue S 500010" is obtained after recognition and image processing.
  • the second comparison result is not equal, it is not directly judged that the license plate verification failed, but according to the deviation comparison method that the length of the target segmented string is less than the length of the segmented string to be verified, the first target is compared to the position Keep unchanged, the second target comparison position moves one position to the target direction as the update method of the comparison position, and counts the number of character error checks, which improves the license plate verification while ensuring the integrity of the license plate verification.
  • the pass rate and accuracy of the image recognition rate reduce the misjudgment rate caused by image recognition errors.
  • the license plate verification method before comparing the second comparison result with the number of allowable character verification errors, the license plate verification method further includes the following steps:
  • the number of allowable character verification errors is set within a certain range, and the range set for different target license plates is different, and the range is determined by setting the upper limit value and the lower limit value
  • the upper limit is determined by the length of the target character string of the target license plate means that the upper limit cannot exceed the length of the target character string of the target license plate.
  • the preset strategy means that the lower limit of the number of allowable character verification errors should be greater than zero.
  • the number of allowable character verification errors is determined based on the upper limit value and the lower limit value.
  • the number of allowable character check errors is determined between the upper limit and the lower limit.
  • a preset characterizer can be set to receive a preset number of allowable character verification errors, so as to facilitate subsequent comparison with the second comparison result.
  • the preset number of allowable character verification errors is specified within a reasonable range, even if it is compared with the second comparison result, the set number of allowable character verification errors will not be allowed. Exceeding the range is meaningless, because before judging whether the license plate verification is successful, the preset number of allowable character verification errors is designed, which improves the pass rate and accuracy of the license plate verification.
  • a license plate verification device is provided, and the license plate verification device corresponds to the license plate verification method in the above-mentioned embodiment in a one-to-one correspondence.
  • the license plate verification device includes a first acquisition module 10, a first comparison module 20, a comparison position setting module 30, a second comparison module 40, a first update module 50, and a second update module. 60.
  • the detailed description of each functional module is as follows:
  • the first obtaining module 10 is configured to obtain a target segmented character string and a segmented character string to be verified, the target segmented character string is a character string corresponding to a target license plate, and the segmented character string to be verified corresponds to a license plate to be verified String
  • the first comparison module 20 is configured to compare the length of the target segmented character string with the length of the segmented character string to be verified to obtain a first comparison result, and determine a deviation comparison mode according to the first comparison result;
  • the comparison position setting module 30 is configured to determine a first target comparison position from the target segmented character string, and determine a second target comparison position from the to-be-verified segmented character string;
  • the second comparison module 40 is configured to compare the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result
  • the first update module 50 is configured to update the first target ratio according to a preset sequential comparison method when the second comparison result is equal and the first target comparison position is not the last position. Compare the position with the second target position, and return to execute the step of comparing the character at the first target matching position with the character at the second target matching position to obtain a second comparison result;
  • the second update module 60 is configured to update the first target comparison according to the deviation comparison method when the second comparison result is not equal and the first target comparison position is not the last position Position and the second target comparison position, add one to the number of character check errors, and return to execute the comparison of the character at the first target comparison position with the character at the second target comparison position to obtain Steps of the second comparison result;
  • the adjustment module 70 is configured to adjust the number of character check errors according to the second comparison result of the last position when the first target comparison position is the last position;
  • the third comparison module 80 is configured to compare the number of character check errors with a preset allowable error check number, if the number of character check errors is not greater than the preset allowable error check If the number is verified, the verification is successful.
  • the license plate verification device further includes:
  • the second obtaining module 90 is configured to obtain a license plate verification request, where the license plate verification request includes the target license plate and the license plate to be verified;
  • the character segmentation module 100 is configured to perform character segmentation processing on the target license plate and the to-be-verified license plate to obtain the target segmented character string and the to-be-verified segmented character string.
  • the first comparison module 20 further includes:
  • the first deviation comparison module is configured to: when the first comparison result is that the length of the target segmented character string is equal to the length of the segmented character string to be verified, the deviation comparison mode is a first deviation comparison Way, the first deviation comparison method is: moving the first target comparison position by one position in the target direction, and moving the second target comparison position by one position in the target direction.
  • the first comparison module 20 further includes:
  • the second deviation comparison module is configured to: when the first comparison result is that the length of the target segmented character string is greater than the length of the segmented character string to be verified, the deviation comparison mode is a second deviation comparison Mode, the second deviation comparison mode is to move the first target comparison position by one position to the target direction, and the second target comparison position remains unchanged.
  • the first comparison module 20 further includes:
  • the third deviation comparison module is configured to: when the first comparison result is that the length of the target segmented character string is less than the length of the segmented character string to be verified, the deviation comparison mode is a third deviation comparison mode, The third deviation comparison mode is that the first target comparison position remains unchanged, and the second target comparison position is moved by one position in the target direction.
  • Each module in the above-mentioned license plate verification device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 6.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a readable storage medium and an internal memory.
  • the readable storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium.
  • the database of the computer equipment is used to store the data used in the above-mentioned license plate verification method.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to realize a method of license plate verification.
  • the readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
  • a computer device including a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer readable instructions:
  • Target segmented character string is a character string corresponding to a target license plate
  • segmented character string to be verified is a character string corresponding to a license plate to be verified
  • the first target comparison position and the second target comparison are updated according to the preset sequential comparison method Position, and return to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is not the last position, update the first target comparison position and the second target comparison position according to the deviation comparison method , Adding one to the number of character check errors, and returning to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is the last position, adjusting the number of character check errors according to the second comparison result of the last position;
  • the number of character check errors is compared with a preset number of allowable error checks, and if the number of character check errors is not greater than the preset number of allowable error checks, the check is successful.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage. Medium; the readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by one or more processors, the one or more processors implement the following steps:
  • Target segmented character string is a character string corresponding to a target license plate
  • segmented character string to be verified is a character string corresponding to a license plate to be verified
  • the first target comparison position and the second target comparison are updated according to the preset sequential comparison method Position, and return to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is not the last position, update the first target comparison position and the second target comparison position according to the deviation comparison method , Adding one to the number of character check errors, and returning to execute the step of comparing the character at the first target comparison position with the character at the second target comparison position to obtain a second comparison result;
  • the first target comparison position is the last position, adjusting the number of character check errors according to the second comparison result of the last position;
  • the number of character check errors is compared with a preset number of allowable error checks, and if the number of character check errors is not greater than the preset number of allowable error checks, the check is successful.
  • the computer-readable instructions can be stored in a non-volatile computer.
  • a readable storage medium or a volatile computer readable storage medium when the computer readable instruction is executed, it may include the processes of the above-mentioned method embodiments.
  • any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • the readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Character Input (AREA)
  • Character Discrimination (AREA)

Abstract

本申请公开了一种车牌校验方法、装置、计算机设备及存储介质;通过对目标分割字符串的长度和待校验分割字符串的长度进行比较的结果来确定不同的偏差比对方式,通过对所述目标分割字符串的字符和所述待校验分割字符串的字符进行对比,再根据所述偏差比对方式,更新第一目标比对位置和第二目标比对位置,当第一目标比对位置为最后一位时,根据所述最后一个位置的第二对比结果调整所述字符校验错误个数,通过预设的允许字符校验错误个数和所述字符校验错误个数进行比较,较好的规避了车牌识别过程中出现的错误对车牌校验的影响,提高了车牌识别的通过率和准确性,降低了车牌校验的误判率。

Description

车牌校验方法、装置、计算机设备及存储介质
本申请要求于2020年2月26日提交中国专利局、申请号为202010119428.3,发明名称为“车牌校验方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像识别领域,尤其涉及一种车牌校验方法、装置、计算机设备及存储介质。
背景技术
随着计算机图形学和计算机学的发展,在对图像识别和处理上有很多不同的方法,特别是在对车牌图像处理上。发明人意识到,在对车牌图像识别过程中,可能在对车牌号码的图像采集、图像识别以及图像处理过程中会出现误差,车牌字符与车牌图像字符本应是匹配的,但是由于这些误差导致车牌字符与车牌图像字符出现了不匹配的情况,从而导致系统判定车牌不存在或者车牌验证错误。
申请内容
本申请实施例提供一种车牌校验方法、装置、计算机设备及存储介质,以解决车牌校验误判率高的问题。
一种车牌校验方法,包括:
获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
一种车牌校验装置,包括:
第一获取模块,用于获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
第一比对模块,用于比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
比对位置设定模块,用于从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
第二比对模块,用于将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
第一更新模块,用于在所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置时,根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
第二更新模块,用于在所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置时,根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
调整模块,用于在所述第一目标比对位置为最后一个位置时,根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
第三比对模块,用于将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果, 根据所述第一对比结果确定偏差比对方式;
从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
上述车牌校验方法、装置、计算机设备及存储介质,通过对目标分割字符串的长度和待校验分割字符串的长度进行比较的结果来确定不同的偏差比对方式,通过对所述目标分割字符串的字符和所述待校验分割字符串的字符进行对比,再根据所述偏差比对方式,更新第一目标比对位置和第二目标比对位置,当第一目标比对位置为最后一位时,根据所述最后一个位置的第二对比结果调整所述字符校验错误个数,通过预设的允许字符校验错误个数和所述字符校验错误个数进行比较,较好的规避了车牌识别过程中出现的错误对车牌校验的影响,提高了车牌识别的通过率和准确性,降低了车牌校验的误判率。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中车牌校验方法的一应用环境示意图;
图2是本申请一实施例中车牌校验方法的一流程图;
图3是本申请一实施例中车牌校验方法的另一流程图;
图4是本申请一实施例中车牌校验装置的一原理框图;
图5是本申请一实施例中车牌校验装置的另一原理框图;
图6是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供的车牌校验方法,该车牌校验方法可应用在如图1的应用环境中, 具体地,该车牌校验方法应用在车牌校验系统中,该车牌校验西永包括如图1所述的客户端和服务端,客户端与服务端通过网络进行通信,用于解决车牌校验误判率高的问题。其中,客户端又称为用户端,是指与服务端相对应,为客户提供本地服务的程序。客户端可安装在但不限于各种个人计算机、笔记本电脑、智能手机和平板电脑。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图2所示,提供一种车牌校验方法,以该方法应用在图1中的服务端为例进行说明,包括如下步骤:
S10:获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
其中,所述目标分割字符串是指对目标车牌进行字符分割后得到的字符串,所述目标车牌为真实的汽车车牌。所述待校验分割字符串是指对待校验车牌进行字符分割后得到的字符串,所述待校验车牌是通过对待校验车辆的车牌图像进行识别得到的。具体地,可采用字符分割方法分别对目标车牌和待校验车牌进行字符分割处理,从而得到目标分割字符串和待校验分割字符串。
S20:比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
其中,第一对比结果是指用于表明目标分割字符串的长度与待校验分割字符串的长度关系的结果。由于待校验分割字符串是对待校验车牌进行字符分割后得到的,而待校验车牌是通过图像识别系统扫描识别后得到的,因此,在采用图像识别系统对待校验车牌进行扫描识别的过程中,会因为识别误差而导致待校验车牌的字符长度出现过长或者过短的现象,即待校验分割字符串的长度与目标分割字符串的长度可能存在不同。
具体地,分别计算目标分割字符串的长度值和待校验分割字符串的长度值,然后将目标分割字符串的长度值与待校验分割字符串的长度值进行对比,从而得到第一对比结果,再根据第一对比结果确定偏差比对方式。可以理解地,第一对比结果可以为若目标分割字符串的长度与待校验分割字符串的长度相同,则对应的偏差比对方式为第一偏差比对方式;也可以为若目标分割字符串的长度大于待校验分割字符串的长度,则对应的偏差比对方式为第二偏差比对方式;还可以为若目标分割字符串的长度小于待校验分割字符串的长度,则对应的偏差比对方式为第三偏差比对方式。
S30:从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置。
其中,所述第一目标比对位置是所述目标分割字符串中任一字符所在的位置,优选地,所述第一目标比对位置可以是所述目标分割字符串按照从左往右顺序的第一位,也可以是所述目标分割字符串按照从右往左顺序的第一位;所述第二目标比对位置是所述待校验分割字符串中任一字符所在的位置,优选地,所述第二目标比对位置可以是所述待校验分割字符串按照从左往右顺序的第一位,也可以是所述待校验分割字符串从右往左顺序的第一位。所述第一目标比对位置和所述第二目标比对位置的顺序是一样的,可以理解地,若所述第一目标比对位置是所述目标分割字符串按照从左往右顺序的第一位,则所述第二目标比对位置是所述待校验分割字符串按照从左往右顺序的第一位。
S40:将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果。
其中,由于校验所述目标车牌与所述待校验车牌是否相同的依据是:校验所述目标车牌字符串与所述待校验车牌字符串是否相同,因此需要将所述第一目标比对位置的字符与所述第二目标比对位置的字符进行对比。所述第一目标比对位置的字符为目标分割字符串中第一目标比对位置对应的字符,所述第二目标比对位置的字符为所述待校验分割字符串中第二目标比对位置对应的字符。具体地,将所述第一目标比对位置的字符转换成对应的 ASCII值,得到第一ASCII值,将所述第二目标比对位置的字符转换成对应的ASCII值,得到第二ASCII值,将所述第一ASCII值和第二ASCII值进行比较,得到第二对比结果。所述第二对比结果是指,将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比得到的结果,第二对比结果可以包括相等和不相等。
S50:若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤。
其中,当所述第一目标比对位置的字符与所述第二目标比对位置的字符进行比较且第二对比结果相等,且所述第一目标比对位置不为最后一个位置时,应将所述第一目标比对位置和所述第二目标比对位置向预设的顺次方向移动一位,并继续进行比较。所述预设的顺次比对方式指的是目标分割字符串和待校验分割字符串按照相同的字符方向依次进行字符比对的方式。可以理解地,若所述第一目标比对位置更新顺序为根据所述目标分割字符串从左往右顺序确定的,且第二目标比对位置更新顺序也是根据所述待校验分割字符串从左往右顺序确定的,则预设的顺次比对方式为将第一目标比对位置往右移动一位,将第二目标比对位置往右移动一位。若所述第一目标比对位置更新顺序是根据所述目标分割字符串从右往左顺序确定的,且第二目标比对位置更新顺序也是根据所述待校验分割字符串从右往左顺序确定的,则预设的顺次比对方式为将第一目标比对位置往左移动一位,将第二目标比对位置往左移动一位。
在对第一目标比对位置和第二目标比对位置进行更新之后,返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤,即按照更新后的第一目标比对位置和第二目标比对位置在进行字符对比,进一步根据第二对比结果选择对应的执行步骤(S50或者S60或者70)。
S60:若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤。
在该步骤中,所述第一目标比对位置不为最后一个位置是指在目标分割字符串中该第一目标比对位置指示的字符不是最后一个字符。若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置这两个条件都成立,则根据所述偏差比对方式更新第一目标比对位置和第二目标比对位置。
可选地,所述偏差比对方式可以为将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位;也可以为将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变;
还可以为第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位。
其中,目标方向为预设的移动方向。例如,该目标方向可以从左到右或者从右到左。可以理解地,该目标方向和字符的对比顺序相同,若字符的对比顺序是从左边第一位开始对比,则目标方向可以为从左到右。若从右边第一位开始对比,则目标方向可以为从右到左。
字符校验错误个数用于对第二对比结果进行统计,在一个目标分割字符串和待校验分割字符串的对比过程中,根据步骤执行的第二对比结果确定是否需要增加字符校验错误个数,若步骤执行的第二对比结果为不相等,则增加字符校验错误个数,可以理解地,当步骤执行中出现一次第二对比结果为不相等时,所述字符校验错误个数加1,当步骤执行中出现两次第二对比结果为不相等时,所述字符校验错误个数加2,以此类推。该字符校验错误个数初始可设置为0。在该步骤中,若所述第二对比结果为不相等,且所述第一目标 比对位置不为最后一个位置,则将字符校验错误个数进行加一的操作。可选地,可以采用一个错误计数器,若所述第一目标比对位置的字符和所述第二目标比对位置的字符第二对比结果为不相等,则所述错误计数器加1,在所述第一目标比对位置为最后一位且比较完毕后,查看错误计数器的读数,得到所述字符校验错误个数。
在对第一目标比对位置和第二目标比对位置进行更新之后,返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤,即按照更新后的第一目标比对位置和第二目标比对位置在进行字符对比,进一步根据第二对比结果选择对应的执行步骤(S50或者S60或者70)。
S70:若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数。
其中,若所述第一目标比对位置为最后一个位置,则说明目标分割字符串和待校验分割字符串的对比过程已经完成,则跳出循环,并且根据所述最后一个位置的第二对比结果调整所述字符校验错误个数。具体地,若最后一个位置的第二对比结果为相等,则字符校验错误个数不进行增减,或者进行加零减零操作。若最后一个位置的第二对比结果为不相等,则字符校验错误个数加一。
S80:将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
其中,所述允许字符校验错误个数是指,在所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比过程中,允许出现对比错误的个数。可选地,该允许错误校验个数可以设置为1或2。具体可以根据所述目标车牌字符串的长度的实际精度要求进行设置。
若所述字符校验错误个数小于或等于所述预设的允许错误校验个数,则判断所述待校验车牌校验成功,若所述字符校验错误个数大于所述预设的允许错误校验个数,则判断所述待校验车牌校验失败。
可选地,可以设置一个预设字符器,对于不同的目标车牌和待校验车牌的对比,可以通过预设字符器来预设允许字符校验错误个数,与所述错误计数器最终统计错误的个数进行比较。
本实施例中,通过对目标分割字符串的长度和待校验分割字符串的长度进行比较的结果来确定不同的偏差比对方式,通过对所述目标分割字符串的字符和所述待校验分割字符串的字符进行对比,再根据所述偏差比对方式,更新第一目标比对位置和第二目标比对位置,当第一目标比对位置为最后一位时,根据所述最后一个位置的第二对比结果调整所述字符校验错误个数,通过预设的允许字符校验错误个数和所述字符校验错误个数进行比较,较好的规避了车牌识别过程中出现的错误对车牌校验的影响,提高了车牌识别的通过率和准确性,降低了车牌校验的误判率。
在一实施例中,如图3所示,在所述获取目标分割字符串和待校验分割字符串之前还包括以下步骤:
S90:获取车牌校验请求,所述车牌校验请求包括目标车牌和待校验车牌;
其中,车牌校验请求指进行车牌校验时所触发的请求。目标车牌指从车牌系统数据库获取的准确的车牌号。车牌系统数据库是指对系统登记后的车牌号进行存储的数据库。例如:当某一车辆对进入停车场时,会先对该车辆的车牌号进行系统登记,并将登记后的车牌号存入该车牌系统数据库中。
其中,待校验车牌是指待进行校验的车牌。具体地,待校验车牌主要通过图像识别系统对某一车辆的车牌号进行扫描识别得到。例如,当某一车辆离开停车场时,通过图像识别系统对该车辆的车牌进行扫描识别,确认是否有进行过登记,利于后续计算该车辆的停车时间和应交金额。可以理解地,在本实施例中,车牌校验请求所包括的目标车牌和待校 验车牌是对同一车辆在不同时刻或者场合所获取的车牌。
例如:在一应用场景中,该方法的运行基于停车场的车牌校验系统,当发现某一待校验车辆离开停车场时,先通过图像识别系统对该车辆的车牌号进行扫描识别,得到待校验车牌,并从车牌系统数据库获取该车辆对应的目标车牌,从而触发生成车牌校验请求,车牌校验请求包括目标车牌和待校验车牌。
S100:对所述目标车牌和所述待校验车牌进行字符分割处理,得到目标分割字符串和待校验分割字符串。
其中,由于校验所述目标车牌和所述待校验车牌是否相同,需要校验所述目标车牌的字符和所述待校验车牌的字符是否都对应相等,因此在获取所述目标车牌和所述待校验车牌后,应对所述目标车牌和所述待校验车牌进行字符分割处理,才能够将所述目标车牌的字符与所述待校验车牌的字符进行比较。
在本实施例中,通过对所述目标车牌和所述待校验车牌进行字符分割,将所述目标车牌和所述待校验车牌分割成独立字符形成的字符串,便于后续步骤中对目标分割字符串的长度和待校验分割字符串的长度进行比较,以及后续步骤中将目标分割字符串的字符与待校验分割字符串的字符进行比较。
在一实施例中,所述根据所述第一对比结果确定偏差比对方式包括:
若第一对比结果为所述目标分割字符串的长度等于所述待校验分割字符串的长度时,则所述偏差比对方式为第一偏差比对方式;所述第一偏差比对方式为:将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位。
其中,目标方向与从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置的方向一致,可以理解地,若所述第一目标比对位置更新顺序是根据所述目标分割字符串从左到右顺序确定的,且所述第二目标比对位置更新顺序也是按照所述待校验分割字符串从左到右顺序,则目标方向为从左到右的方向。
示例性地,假设目标车牌为“粤S 50010”,经过图像识别系统识别出来的待校验车牌为“粤S 50O10”。
经过字符分割后,可以得到目标分割字符串为“粤”,“S”,“5”,“0”,“0”,“1”和“0”,得到目标分割字符串的长度为7,并按照从左到右顺序确定第一目标比对位置的字符,即第一目标比对位置的字符为“粤”;
经过字符分割后,可以得到待校验分割字符串为“粤”,“S”,“5”,“0”,“O”,“1”和“0”,得到待校验分割字符串的长度为7,并按照从左到右顺序确定第二目标比对位置的字符,即第二目标比对位置的字符为“粤”;
将所述第一目标比对位置的字符“粤”和所述第二目标比对位置的字符“粤”进行对比。第二对比结果为相等,根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,即将第一目标比对位置的字符更新为“S”,第二目标比对位置的字符更新为“S”,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,以此类推,直到将第一目标比对位置的字符更新为数字“0”,第二目标比对位置的字符更新为字母“O”。第二对比结果为不相等,根据第一偏差对比方式更新所述第一目标比对位置和第二目标比对位置,将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位,即第一目标比对位置的字符更新为“1”,第二目标比对位置的字符更新为“1”,直到第一目标比对位置为最后一个位置,则对比完成,得到字符校验错误个数为1。
在本实施例中,在所述目标分割字符串的长度等于所述待校验分割字符串的长度时,考虑到在对车牌号码的图像采集、图像识别以及图像处理过程中若出现了误差,有可能得到错误的结果。例如,将车牌“粤S 50010”进行采集、处理再识别之后得到“粤S 50O10”。当出现第二对比结果为不相等时,将其计为字符校验错误个数,而不是直接判断该车牌校 验失败,通过后续步骤中与预设的允许校验错误个数的比较,再对车牌校验判定是否为失败,在保证识别效率的同时,提高了车牌识别的通过率,降低了由于图像采集、图像处理或者图像识别错误造成的误判率。考虑到相似车牌出现在同一场所的概率是很低的,而且在同一时刻出现在同一停车场的概率更是极低,本方案通过对这种情况的这种考虑,很好地降低了由于图像采集、图像处理或者图像识别错误造成的误判率。
在一实施例中,所述根据所述第一对比结果确定偏差对比方式包括:
若第一对比结果为所述目标分割字符串的长度大于所述待校验分割字符串的长度时,则所述偏差比对方式为第二偏差比对方式,所述第二偏差比对方式为将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变。
示例性地,假设目标车牌为“粤S 50010”,经过图像识别系统识别出来的待校验车牌为“粤S 5010”。
经过字符分割后,可以得到目标分割字符串为“粤”,“S”,“5”,“0”,“0”,“1”和“0”,得到目标分割字符串的长度为7,并按照从左到右顺序确定第一目标比对位置的字符,即第一目标比对位置的字符为“粤”;
经过字符分割后,可以得到待校验分割字符串为“粤”,“S”,“5”,“0”,“1”和“0”,得到待校验分割字符串的长度为6,并按照从左到右顺序确定第二目标比对位置的字符,即第二目标比对位置的字符为“粤”;
将所述第一目标比对位置的字符“粤”和所述第二目标比对位置的字符“粤”进行对比。第二对比结果为相等,根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,即将第一目标比对位置的字符更新为“S”,第二目标比对位置的字符更新为“S”,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,以此类推,直到将第一目标比对位置的字符更新为“0”,第二目标比对位置的字符更新为“1”。第二对比结果为不相等,根据第二偏差对比方式更新所述第一目标比对位置和第二目标比对位置,将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变,即第一目标比对位置的字符更新为“1”,第二目标比对位置的字符保持为“1”,第二对比结果为相等。直到第一目标方向为最后一个位置,则对比完成,得到字符校验错误个数为1。
在本实施例中,在所述目标分割字符串的长度大于待校验分割字符串的长度时,考虑到在对车牌号码的图像识别以及图像处理过程中,若出现了漏识别或者字符分割过程出现了偏差,有可能得到错误的车牌图像。例如,将车牌“粤S 50010”进行采集,识别和图像处理后得到“粤S 5010”。当出现第二对比结果不相等时,不是直接判断该车牌校验失败,而是根据目标分割字符串的长度大于待校验分割字符串的长度时的偏差比对方式,将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变的方式作为比对位置的更新方式,并统计字符错误校验个数,在保证车牌校验完整性的同时,提高了车牌校验的通过率和准确性,降低了由于图像识别错误造成的误判率。
在一实施例中,所述根据所述第一对比结果确定偏差对比方式包括:
若第一对比结果为所述目标分割字符串的长度小于所述待校验分割字符串的长度时,则所述偏差比对方式为第三偏差比对方式;所述第三偏差比对方式为第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位。
示例性地,假设目标车牌为“粤S 50010”,经过图像识别系统识别出来的待校验车牌为“粤S 500010”。
经过字符分割后,可以得到目标分割字符串为“粤”,“S”,“5”,“0”,“0”,“1”和“0”,得到目标分割字符串的长度为7,并按照从左到右顺序确定第一目标比对位置的字符,即第一目标比对位置的字符为“粤”;
经过字符分割后,可以得到待校验分割字符串为“粤”,“S”,“5”,“0”,“0”, “0”,“1”和“0”,得到待校验分割字符串的长度为8,并按照从左到右顺序确定第二目标比对位置的字符,即第二目标比对位置的字符为“粤”;
将所述第一目标比对位置的字符“粤”和所述第二目标比对位置的字符“粤”进行对比,第二对比结果为相等,根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,即将第一目标比对位置的字符更新为“S”,第二目标比对位置的字符更新为“S”,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,以此类推,直到将第一目标比对位置的字符更新为“1”,第二目标比对位置的字符更新为“0”,第二对比结果为不相等,根据第三偏差对比方式更新所述第一目标比对位置和第二目标比对位置,第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位,即第一目标比对位置的字符保持为“1”,第二目标比对位置的字符更新为“1”,第二对比结果为相等。直到第一目标方向为最后一个位置,则对比完成,得到字符校验错误个数为1。
在本实施例中,在所述目标分割字符串的长度小于待校验分割字符串的长度时,考虑到在对车牌号码的图像识别以及图像处理过程中,若出现了重复识别或者字符分割过程出现了偏差,有可能得到错误的车牌图像。例如,将车牌“粤S 50010”进行采集,识别和图像处理后得到“粤S 500010”。当出现第二对比结果不相等时,不是直接判断该车牌校验失败,而是根据目标分割字符串的长度小于待校验分割字符串的长度的偏差比对方式,将第一目标比对位置保持不变,第二目标比对位置向目标方向移动一位的方式作为比对位置的更新方式,并统计字符错误校验个数,在保证车牌校验完整性的同时,提高了车牌校验的通过率和准确性,降低了由于图像识别错误造成的误判率。
可选地,在一实施例中,在所述将所述第二对比结果与允许字符校验错误个数进行比较之前,所述车牌校验方法还包括如下步骤:
根据所述目标车牌的目标字符串长度,确定所述允许字符校验错误个数的上限值;
根据预设策略确定所述允许字符校验错误个数的下限值;
其中,所述允许字符校验错误个数是在一定范围内设定的,对于不同的目标车牌设定的范围是不同的,所述范围是通过设定上限值和下限值确定的,所述上限值通过所述目标车牌的目标字符串长度来确定是指,所述上限值不可以超过所述目标车牌的目标字符串长度。所述预设策略指的是,所述允许字符校验错误个数的下限值应大于0。
基于所述上限值和所述下限值确定允许字符校验错误个数。
其中,根据设定好的上限值和下限值,将所述允许字符校验错误个数确定在所述上限值和所述下限值之间。
可选地,可以设置一个预设字符器,用来接收预设的允许字符校验错误个数,便于后续与所述第二对比结果进行比较。
在本实施例中,把预设的允许字符校验错误个数规定在合理的范围之内,即便于与所述第二对比结果进行比较,也不会让设置的允许字符校验错误个数超出范围而没有意义,由于在判断车牌校验是否成功前,设计预设的允许字符校验错误个数,提高了车牌校验的通过率和准确性。
在一实施例中,提供一种车牌校验装置,该车牌校验装置与上述实施例中车牌校验方法一一对应。如图4所示,该车牌校验装置包括第一获取模块10、第一比对模块20、比对位置设定模块30、第二比对模块40、第一更新模块50、第二更新模块60、调整模块70和第三比对模块80。各功能模块详细说明如下:
第一获取模块10,用于获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
第一比对模块20,用于比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
比对位置设定模块30,用于从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
第二比对模块40,用于将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
第一更新模块50,用于在所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置时,根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
第二更新模块60,用于在所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置时,根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
调整模块70,用于在所述第一目标比对位置为最后一个位置时,根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
第三比对模块80,用于将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
优选地,如图5所示,所述车牌校验装置还包括:
第二获取模块90,用于获取车牌校验请求,所述车牌校验请求包括目标车牌和待校验车牌;
字符分割模块100,用于对所述目标车牌和所述待校验车牌进行字符分割处理,得到目标分割字符串和待校验分割字符串。
优选地,所述第一比对模块20还包括:
第一偏差比对模块,用于在所述第一对比结果为所述目标分割字符串的长度等于所述待校验分割字符串的长度时,所述偏差比对方式为第一偏差比对方式,所述第一偏差比对方式为:将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位。
优选地,所述第一比对模块20还包括:
第二偏差比对模块,用于在所述第一对比结果为所述目标分割字符串的长度大于所述待校验分割字符串的长度时,所述偏差比对方式为第二偏差比对方式,所述第二偏差比对方式为将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变。
优选地,所述第一比对模块20还包括:
第三偏差比对模块,用于在第一对比结果为所述目标分割字符串的长度小于所述待校验分割字符串的长度时,所述偏差比对方式为第三偏差比对方式,所述第三偏差比对方式为第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位。
关于车牌校验装置的具体限定可以参见上文中对于车牌校验方法的限定,在此不再赘述。上述车牌校验装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括可读存储介质、内存储器。该可读存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为可读存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储上述车牌校验方法中使用到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种车牌校 验方法。本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现如下步骤:
获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
在一个实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质;该可读存储介质上存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现如下步骤:
获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果 调整所述字符校验错误个数;
将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质或者易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种车牌校验方法,其中,所述车牌校验方法包括:
    获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
    比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
    从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
    将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
    若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
    将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
  2. 如权利要求1所述的车牌校验方法,其中,在所述获取目标分割字符串和待校验分割字符串之前,所述车牌校验方法还包括:
    获取车牌校验请求,所述车牌校验请求包括目标车牌和待校验车牌;
    对所述目标车牌和所述待校验车牌进行字符分割处理,得到目标分割字符串和待校验分割字符串。
  3. 如权利要求1所述的车牌校验方法,其中,所述根据所述第一对比结果确定偏差比对方式,包括:
    若所述第一对比结果为所述目标分割字符串的长度等于所述待校验分割字符串的长度,则所述偏差比对方式为第一偏差比对方式,所述第一偏差比对方式为:将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位。
  4. 如权利要求1所述的车牌校验方法,其中,所述根据所述第一对比结果确定偏差对比方式,还包括:
    若所述第一对比结果为所述目标分割字符串的长度大于所述待校验分割字符串的长度,则所述偏差比对方式为第二偏差比对方式,所述第二偏差比对方式为将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变。
  5. 如权利要求1所述的车牌校验方法,其中,所述根据所述第一对比结果确定偏差对比方式,还包括:
    若所述第一对比结果为所述目标分割字符串的长度小于所述待校验分割字符串的长度,则所述偏差比对方式为第三偏差比对方式,所述第三偏差比对方式为第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位。
  6. 一种车牌校验装置,其中,包括:
    第一获取模块,用于获取目标分割字符串和待校验分割字符串,所述目标分割字符串 是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
    第一比对模块,用于比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
    比对位置设定模块,用于从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
    第二比对模块,用于将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
    第一更新模块,用于在所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置时,根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    第二更新模块,用于在所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置时,根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    调整模块,用于在所述第一目标比对位置为最后一个位置时,根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
    第三比对模块,用于将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
  7. 如权利要求6所述的车牌校验装置,其中,所述车牌校验装置还包括:
    第二获取模块,用于获取车牌校验请求,所述车牌校验请求包括目标车牌和待校验车牌;
    字符分割模块,用于对所述目标车牌和所述待校验车牌进行字符分割处理,得到目标分割字符串和待校验分割字符串。
  8. 如权利要求6所述的车牌校验装置,其中,所述第一比对模块还包括:
    第一偏差比对模块,用于在所述第一对比结果为所述目标分割字符串的长度等于所述待校验分割字符串的长度时,所述偏差比对方式为第一偏差比对方式,所述第一偏差比对方式为:将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位。
  9. 如权利要求6所述的车牌校验装置,其中,所述第一比对模块还包括:
    第二偏差比对模块,用于在所述第一对比结果为所述目标分割字符串的长度大于所述待校验分割字符串的长度时,所述偏差比对方式为第二偏差比对方式,所述第二偏差比对方式为将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变。
  10. 如权利要求6所述的车牌校验装置,其中,所述第一比对模块还包括:
    第三偏差比对模块,用于在第一对比结果为所述目标分割字符串的长度小于所述待校验分割字符串的长度时,所述偏差比对方式为第三偏差比对方式,所述第三偏差比对方式为第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
    比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
    从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
    将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
    若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
    将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
  12. 如权利要求11所述的计算机设备,其中,在所述获取目标分割字符串和待校验分割字符串之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    获取车牌校验请求,所述车牌校验请求包括目标车牌和待校验车牌;
    对所述目标车牌和所述待校验车牌进行字符分割处理,得到目标分割字符串和待校验分割字符串。
  13. 如权利要求11所述的计算机设备,其中,所述根据所述第一对比结果确定偏差比对方式,包括:
    若所述第一对比结果为所述目标分割字符串的长度等于所述待校验分割字符串的长度,则所述偏差比对方式为第一偏差比对方式,所述第一偏差比对方式为:将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位。
  14. 如权利要求11所述的计算机设备,其中,所述根据所述第一对比结果确定偏差对比方式,还包括:
    若所述第一对比结果为所述目标分割字符串的长度大于所述待校验分割字符串的长度,则所述偏差比对方式为第二偏差比对方式,所述第二偏差比对方式为将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变。
  15. 如权利要求11所述的计算机设备,其中,所述根据所述第一对比结果确定偏差对比方式,还包括:
    若所述第一对比结果为所述目标分割字符串的长度小于所述待校验分割字符串的长度,则所述偏差比对方式为第三偏差比对方式,所述第三偏差比对方式为第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位。
  16. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    获取目标分割字符串和待校验分割字符串,所述目标分割字符串是目标车牌对应的字符串,所述待校验分割字符串是待校验车牌对应的字符串;
    比对所述目标分割字符串的长度和所述待校验分割字符串的长度,得到第一对比结果,根据所述第一对比结果确定偏差比对方式;
    从所述目标分割字符串中确定第一目标比对位置,从所述待校验分割字符串中确定第二目标比对位置;
    将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果;
    若所述第二对比结果为相等,且所述第一目标比对位置不为最后一个位置,则根据预设 的顺次比对方式更新所述第一目标比对位置和第二目标比对位置,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    若所述第二对比结果为不相等,且所述第一目标比对位置不为最后一个位置,则根据所述偏差比对方式更新所述第一目标比对位置和第二目标比对位置,将字符校验错误个数加一,并返回执行所述将所述第一目标比对位置的字符和所述第二目标比对位置的字符进行对比,得到第二对比结果的步骤;
    若所述第一目标比对位置为最后一个位置,则根据所述最后一个位置的第二对比结果调整所述字符校验错误个数;
    将所述字符校验错误个数与预设的允许错误校验个数进行对比,若所述字符校验错误个数不大于所述预设的允许错误校验个数,则校验成功。
  17. 如权利要求16所述的可读存储介质,其中,在所述获取目标分割字符串和待校验分割字符串之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    获取车牌校验请求,所述车牌校验请求包括目标车牌和待校验车牌;
    对所述目标车牌和所述待校验车牌进行字符分割处理,得到目标分割字符串和待校验分割字符串。
  18. 如权利要求16所述的可读存储介质,其中,所述根据所述第一对比结果确定偏差比对方式,包括:
    若所述第一对比结果为所述目标分割字符串的长度等于所述待校验分割字符串的长度,则所述偏差比对方式为第一偏差比对方式,所述第一偏差比对方式为:将第一目标比对位置向目标方向移动一位,将第二目标比对位置向目标方向移动一位。
  19. 如权利要求16所述的可读存储介质,其中,所述根据所述第一对比结果确定偏差对比方式,还包括:
    若所述第一对比结果为所述目标分割字符串的长度大于所述待校验分割字符串的长度,则所述偏差比对方式为第二偏差比对方式,所述第二偏差比对方式为将第一目标比对位置向目标方向移动一位,第二目标比对位置保持不变。
  20. 如权利要求16所述的可读存储介质,其中,所述根据所述第一对比结果确定偏差对比方式,还包括:
    若所述第一对比结果为所述目标分割字符串的长度小于所述待校验分割字符串的长度,则所述偏差比对方式为第三偏差比对方式,所述第三偏差比对方式为第一目标比对位置保持不变,将第二目标比对位置向目标方向移动一位。
PCT/CN2021/070584 2020-02-26 2021-01-07 车牌校验方法、装置、计算机设备及存储介质 WO2021169619A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010119428.3A CN111428708A (zh) 2020-02-26 2020-02-26 车牌校验方法、装置、计算机设备及存储介质
CN202010119428.3 2020-02-26

Publications (1)

Publication Number Publication Date
WO2021169619A1 true WO2021169619A1 (zh) 2021-09-02

Family

ID=71547235

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/070584 WO2021169619A1 (zh) 2020-02-26 2021-01-07 车牌校验方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN111428708A (zh)
WO (1) WO2021169619A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428708A (zh) * 2020-02-26 2020-07-17 深圳壹账通智能科技有限公司 车牌校验方法、装置、计算机设备及存储介质
CN114821829B (zh) * 2022-06-23 2022-09-02 成都宜泊信息科技有限公司 一种路边停车缴费防误缴的方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108416878A (zh) * 2018-03-16 2018-08-17 西安艾润物联网技术服务有限责任公司 车牌校验方法、装置及计算机可读存储介质
CN109034158A (zh) * 2017-06-09 2018-12-18 杭州海康威视数字技术股份有限公司 一种车牌识别方法、装置及计算机设备
CN109255283A (zh) * 2017-07-14 2019-01-22 杭州海康威视数字技术股份有限公司 一种基于多帧的车牌号码确定方法、装置及电子设备
CN110490186A (zh) * 2018-05-15 2019-11-22 杭州海康威视数字技术股份有限公司 车牌识别方法、装置及存储介质
CN111428708A (zh) * 2020-02-26 2020-07-17 深圳壹账通智能科技有限公司 车牌校验方法、装置、计算机设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034158A (zh) * 2017-06-09 2018-12-18 杭州海康威视数字技术股份有限公司 一种车牌识别方法、装置及计算机设备
CN109255283A (zh) * 2017-07-14 2019-01-22 杭州海康威视数字技术股份有限公司 一种基于多帧的车牌号码确定方法、装置及电子设备
CN108416878A (zh) * 2018-03-16 2018-08-17 西安艾润物联网技术服务有限责任公司 车牌校验方法、装置及计算机可读存储介质
CN110490186A (zh) * 2018-05-15 2019-11-22 杭州海康威视数字技术股份有限公司 车牌识别方法、装置及存储介质
CN111428708A (zh) * 2020-02-26 2020-07-17 深圳壹账通智能科技有限公司 车牌校验方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN111428708A (zh) 2020-07-17

Similar Documents

Publication Publication Date Title
WO2021169619A1 (zh) 车牌校验方法、装置、计算机设备及存储介质
WO2020073502A1 (zh) 发票验证方法、融资审核方法、装置、设备及介质
CN110517673B (zh) 语音识别方法、装置、计算机设备及存储介质
WO2022116436A1 (zh) 长短句文本语义匹配方法、装置、计算机设备及存储介质
WO2021143088A1 (zh) 多证件类型同步检测方法、装置、计算机设备及存储介质
CN110764998B (zh) 基于Django框架的数据比对方法、装置、设备及存储介质
WO2021135131A1 (zh) 区块链的交易方法、装置、计算机设备及存储介质
CN114676444B (zh) 一种基于区块链的存储系统
CN112363995A (zh) 基于日志解析的增量数据比对方法、装置和电子设备
CN110795171A (zh) 业务数据处理方法、装置、计算机设备及存储介质
WO2020233065A1 (zh) 网络环境测试方法、装置及终端设备
CN112395857A (zh) 基于对话系统的语音文本处理方法、装置、设备及介质
CN111931672A (zh) 字迹识别方法、装置、计算机设备及存储介质
CN112363929B (zh) 系统上线方法、装置、计算机设备及存储介质
CN110704901A (zh) 山墙屋面顶导梁的连接节点放置方法和相关产品
CN112115449B (zh) 一种芯片物理指纹可靠性评估方法、装置、设备及介质
CN114218188A (zh) 数据迁移方法、装置、设备及存储介质
CN114547087A (zh) 提案自动识别并生成报告的方法、装置、设备和介质
US11106627B2 (en) Front-end validation of data files requiring processing by multiple computing systems
CN112711574A (zh) 数据库安全性检测方法、装置、电子设备及介质
CN109657210B (zh) 基于语义解析的文本准确率计算方法、装置、计算机设备
CN112784877A (zh) 一种基于区块链的大规模图像模板匹配方法及装置
WO2021184553A1 (zh) 人脸识别模型训练方法、装置、计算机设备及存储介质
CN112085791A (zh) 施工设计图纸自动定位方法、装置、设备以及存储介质
CN113343275B (zh) 数据访问方法及数据管理服务系统

Legal Events

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

Ref document number: 21760474

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.01.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21760474

Country of ref document: EP

Kind code of ref document: A1