Method, device and electronic equipment for recognizing crown character

By constructing a serial number recognition template for standard banknotes and utilizing projection and coordinate matching technologies, the problem of low accuracy in recognizing serial numbers with complex structures was solved, achieving efficient serial number recognition and counterfeit banknote identification.

CN121789340BActive Publication Date: 2026-05-26CASHWAY FINTECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CASHWAY FINTECH CO LTD
Filing Date
2026-03-09
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies have low accuracy and high computational cost when identifying serial numbers with complex structures, making it difficult to meet the needs of bank cash handling equipment.

Method used

A serial number recognition template for standard banknotes is constructed. The recognition result is confirmed by using projection and coordinate matching technology, and the similarity of cosine value and number of dark spots, thereby reducing the computational power consumption.

Benefits of technology

It improves the accuracy of serial number recognition, reduces computing power consumption, is suitable for banknote recognition scenarios, and supports subsequent functions such as counterfeit banknote recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121789340B_ABST
    Figure CN121789340B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and electronic device for recognizing serial number characters, comprising: constructing a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters; projecting a pre-acquired character to be recognized and determining the character's coordinates based on the projection result; confirming the recognition result of the character based on the cosine value between the character's coordinates and the corresponding standard coordinates of the standard character; determining the accuracy of the recognition result based on the similarity between the number of dark spots in the character's coordinates and the number of standard dark spots in the standard coordinates; if the recognition result is accurate, outputting the recognition result; otherwise, re-determining the character's coordinates. This application can accurately recognize serial numbers with complex structures, improve the accuracy of serial number recognition, and reduce the computational power required.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of banknote recognition technology, and in particular to a method, apparatus and electronic device for recognizing serial number characters. Background Technology

[0002] Currently, major banks at home and abroad generally require cash-handling equipment to recognize the serial numbers of banknotes. Although the accuracy of single-character recognition has been greatly improved with the continuous development and improvement of neural network recognition technology, this method requires a lot of computing power, and the phenomenon of recognition errors still exists when faced with some complex serial numbers. Summary of the Invention

[0003] Therefore, the purpose of this application is to provide a method, apparatus and electronic device for recognizing serial number characters. This application can accurately recognize serial numbers with complex structures, improve the accuracy of serial number recognition, and reduce the consumption of computing power.

[0004] In a first aspect, embodiments of the present invention provide a method for recognizing serial number characters, comprising: S102: constructing a serial number recognition template for a standard banknote, wherein the serial number recognition template includes standard coordinates of standard characters; S104: projecting a pre-acquired character to be recognized, and determining the character's coordinates to be recognized based on the projection result; S106: confirming the recognition result of the character to be recognized based on the cosine value between the character's coordinates to be recognized and the corresponding standard coordinates of the standard character; S108: determining the accuracy of the recognition result based on the similarity between the number of dark spots in the character's coordinates and the number of standard dark spots in the standard coordinates; S110: if the recognition result is accurate, outputting the recognition result; otherwise, returning to S104 to redetermine the character's coordinates to be recognized.

[0005] Furthermore, different characters on standard banknotes from different countries, with different denominations, and different versions correspond to different serial number recognition templates; the characters include letters, numbers, and fraction lines.

[0006] Further, S102 also includes: S102-2: determining the number of standard dark spots for any standard character based on a predetermined acquisition rule, wherein the acquisition rule includes the number of spots and the projection method, and the projection method includes vertical projection and horizontal projection; S102-4: using the number of standard dark spots as the vertical coordinate, and assigning a corresponding horizontal coordinate to the vertical coordinate based on a preset assignment rule; S102-6: combining the vertical coordinate and the horizontal coordinate as the standard coordinate, and determining the serial number recognition template according to the standard coordinate; S102-8: adding a standard label to the serial number recognition template, wherein the standard label includes: country, denomination, version, character content, and acquisition rule.

[0007] Further, S104 includes: S104-2: performing serial number segmentation and binarization on the current banknote to be identified to obtain the character to be identified; S104-4: determining the coordinates to be identified according to the current acquisition rules and the preset assignment rules; S104-6: confirming the identification label of the coordinates to be identified, wherein the identification label includes: country, denomination, version and acquisition rules.

[0008] Further, S106 includes: S106-2: determining the serial number recognition template group corresponding to the character to be recognized based on the label to be recognized and the standard label; S106-4: calculating the cosine value between the coordinates to be recognized of the character to be recognized and the standard coordinates of the standard character in each serial number recognition template group; S106-6: determining the recognition result of the character to be recognized based on the cosine value.

[0009] Further, S108 includes: S108-2: determining the number of standard dark spots for the corresponding standard character based on the recognition result; S108-4: calculating the similarity between the number of dark spots in the coordinates to be recognized and the number of standard dark spots; S108-6: determining the accuracy of the recognition result based on the similarity.

[0010] Furthermore, the number of points selected includes 3, and the projection method is vertical projection; the cosine value is calculated based on the following formula: ; ; Where N_L, N_R, and N_M are the standard dark spot counts in the left, right, and center, respectively; N_l, N_r, and N_m are the dark spot counts of the characters to be recognized in the left, right, and center, respectively; and x1, x2, and x3 are the x-coordinates of the dark spot counts assigned based on the preset assignment rules.

[0011] Furthermore, the number of points selected includes 3, and the projection method is vertical projection; the similarity d is calculated based on the following formula: ; ; .

[0012] Secondly, embodiments of the present invention provide a serial number character recognition device. The device includes a first recognition module for constructing a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters; a second recognition module for projecting a pre-acquired character to be recognized and determining the character's coordinates based on the projection result; a third recognition module for confirming the recognition result of the character to be recognized based on the cosine value between the character's coordinates and the corresponding standard coordinates of the standard characters; a fourth recognition module for determining the accuracy of the recognition result based on the similarity between the number of dark spots in the character's coordinates and the number of standard dark spots in the standard coordinates; and a fifth recognition module for outputting the recognition result if the recognition result is accurate, otherwise re-determining the character's coordinates.

[0013] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method for recognizing serial numbers.

[0014] The beneficial effects of the embodiments of the present invention are as follows:

[0015] This application discloses a method, apparatus, and electronic device for recognizing serial number characters, comprising: constructing a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters; projecting a pre-acquired character to be recognized and determining the character's coordinates based on the projection result; confirming the recognition result of the character based on the cosine value between the character's coordinates and the corresponding standard coordinates of the standard character; determining the accuracy of the recognition result based on the similarity between the number of dark spots in the character's coordinates and the number of standard dark spots in the standard coordinates; if the recognition result is accurate, outputting the recognition result; otherwise, re-determining the character's coordinates. This application can accurately recognize serial numbers with complex structures, improve the accuracy of serial number recognition, and reduce the computational power required.

[0016] Other features and advantages of this application will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the above-described techniques of this application.

[0017] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating a method for recognizing prefix characters provided in this application;

[0020] Figure 2 A standard coordinate diagram of the first type of serial number template provided in this application;

[0021] Figure 3 A standard coordinate diagram of the second type of serial number template provided in this application;

[0022] Figure 4 A standard coordinate diagram of the third type of serial number template provided in this application;

[0023] Figure 5 A standard coordinate diagram of the fourth type of serial number template provided in this application;

[0024] Figure 6 A schematic diagram of the first type of serial number provided in this application;

[0025] Figure 7 A schematic diagram of the second type of serial number provided in this application;

[0026] Figure 8 A schematic diagram of the third type of serial number provided for this application;

[0027] Figure 9 A schematic diagram of the fourth type of serial number provided in this application;

[0028] Figure 10 A schematic diagram of the fifth type of serial number provided for this application;

[0029] Figure 11 A flowchart illustrating another method for recognizing prefix characters provided in this application;

[0030] Figure 12 A schematic diagram of a serial number character recognition device provided in this application;

[0031] Figure 13 A schematic diagram of an electronic device for use with serial number characters provided in this application. Detailed Implementation

[0032] The technical solutions of this application will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] This application is used in the scenario of banknote serial number recognition.

[0034] Example 1

[0035] like Figure 1 As shown, this embodiment of the invention provides a method for recognizing prefix characters, including:

[0036] S102: Construct a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters.

[0037] Different characters on standard banknotes from different countries, denominations, and versions correspond to different serial number recognition templates. These characters include letters, numbers, and fraction bars.

[0038] Specifically, such as Figure 2 and Figure 3 The standard coordinates for characters 1 and 4 in the Sri Lankan 1000 rupee, 2010 standard banknote are determined, with 3 points selected and projected vertically. For example... Figure 4 and Figure 5 The standard coordinates corresponding to characters 1 and 4 in the Sri Lankan standard banknote of denomination 1000 and issued in 2010 are determined, with 4 points selected and the projection method being vertical projection.

[0039] S102 also includes:

[0040] S102-2: Determine the number of standard dark spots for any standard character based on a predetermined acquisition rule, wherein the acquisition rule includes the number of spots and the projection method, and the projection method includes vertical projection and horizontal projection.

[0041] S102-4: Use the number of standard dark spots as the vertical coordinate, and assign a corresponding horizontal coordinate to the vertical coordinate based on a preset assignment rule.

[0042] Specifically, for Figure 2 , Figure 3 , Figure 4 , Figure 5 The vertical axis represents the number of black dots collected after vertically projecting the standard character, and the horizontal axis represents the value assigned to the vertical axis. For Figure 2 , Figure 3 , Figure 4 , Figure 5In any graph, the interval between two x-coordinates is generally consistent, but it can also be set to be inconsistent, as long as the assignment rules are determined. For example, the assignment rules can be to directly assign the x-coordinate to the intervals of 1, 2, 3, etc., which are equal; or to assign it to a geometric or arithmetic sequence; or to assign the x-coordinate based on the value of the y-coordinate.

[0043] S102-6: Combine the vertical coordinate and the horizontal coordinate as the standard coordinate, and determine the serial number recognition template based on the standard coordinate.

[0044] S102-8: Add standard labels to the serial number recognition template, wherein the standard labels include: country, denomination, version, character content and acquisition rules.

[0045] Specifically, for Figure 2 Its labels are: Sri Lanka, 1000 denomination, 2010 issue, character 1, number of points is 3, vertical projection.

[0046] S104: Project the pre-acquired character to be recognized, and determine the coordinates of the character to be recognized based on the projection result.

[0047] Specifically, S104 includes:

[0048] S104-2: Perform serial number segmentation and binarization on the current banknote to be identified to obtain the character to be identified.

[0049] S104-2-2: Obtain the tilt angle of the banknote image to be identified by rectangle fitting, and rotate and cut the serial number area according to the obtained tilt angle to roughly obtain the first serial number image.

[0050] S104-2-4: Binarize the captured first serial number image to obtain the second serial number image with white background and black text.

[0051] Since the second serial number image is generally composed of multiple letters and numbers, it has continuous dark spots in the vertical direction. Because most of the characters have dark spots, and these dark spots are continuous while the characters are discontinuous, the second serial number image also has partially continuous dark spots in the horizontal direction.

[0052] S104-2-6: Determine the upper and lower boundaries of the serial number region based on the second serial number image.

[0053] Specifically, this involves projecting the second serial number image horizontally to obtain the sum of the number of dark dots (dots with a pixel value of 0) in each row. If the sum of the number of dark dots is equal to 0, then the row can be assumed to have no characters.

[0054] If the sum of the number of dark dots in eight consecutive rows starting from a certain row is greater than 0, then that row can be considered the upper boundary of the prefix area.

[0055] When the sum of the number of dark dots in three consecutive rows starting from a certain row is 0, then that row can be considered the lower boundary of the prefix area.

[0056] S104-2-8: Determine the left and right boundaries of the prefix region based on the second prefix image, and obtain... Figure 6 .

[0057] Specifically, this involves projecting the second serial number image vertically to obtain the sum of the number of dark spots in each column.

[0058] If the sum of the number of dark dots in a column is 0, then the column can be assumed to have no characters.

[0059] If the sum of the number of dark spots in five consecutive columns starting from a certain column is greater than 0, then this column can be considered the left boundary of the prefix area.

[0060] By judging one by one from the last column of the second serial number image backwards, when the sum of the number of dark spots in 5 consecutive columns is greater than 0, this column can be identified as the right boundary of the serial number area.

[0061] S104-2-10: Based on Figure 6 The prefix area is segmented one by one to obtain individual characters to be recognized. Figure 8 or Figure 9 .

[0062] The boundaries of each prefix region can be determined from S104-2-8 (i.e., the following can be obtained). Figure 6 S104-2-10 is a precise segmentation of the serial number to obtain individual characters (i.e., obtaining...). Figure 8 or Figure 9 ).

[0063] S104-2-10 includes:

[0064] S104-2-10-2: Perform vertical projection on the prefix area to obtain the sum of the number of dark points in each column, denoted from left to right as A1, A2, A3...An (if the number of points is 3, then n=3).

[0065] S104-2-10-4: When the number of dark dots in the preceding column is 0 but the number in the current column is not 0, the left boundary of that column for a single character is obtained; when the number of dark dots in the right column of a certain column is 0, the right boundary of that column for a single character is obtained. The upper and lower boundaries of a single character are obtained using the same method. Therefore, we can obtain... Figure 7 or Figure 8 If the prefix to be identified is a simple prefix that is not a fraction, then we can obtain the following result: Figure 8 A single character, if the serial number to be recognized is Figure 7 For complex prefixes in fractional form, execute S104-2-10-6.

[0066] S104-2-10-6: For characters with complex structures (such as...) Figure 7 To perform segmentation and projection, for the complex character structure described above, first, the top independent letters are segmented, and then vertical and horizontal projections are performed on them to obtain the left and right boundaries and top and bottom boundaries of each character. Figure 9 .

[0067] S104-4: Determine the coordinates to be identified based on the current acquisition rules and the preset assignment rules.

[0068] Specifically, a vertical projection is performed on a single character to be recognized. If the number of points is 3, then the number of dark points on the left boundary N_l, the number of dark points on the right boundary N_r, and the number of dark points in the middle point N_m are obtained.

[0069] Because the letters below are smaller (e.g.) Figure 10 In existing technologies, characters obtained after independent segmentation are often blurry, resulting in poor neural network recognition. Therefore, this application employs a projection scheme. First, the three letters below the complex structure are projected horizontally. Given the different shapes of the digits 0-9, different combinations of digits result in different projections. By comparing these projections, the values ​​of the three digits can be determined. Then, the three letters below are projected vertically. As in the second step, this method can accurately determine the boundaries of the three characters, obtaining the number of dark spots N_l on the left boundary, N_r on the right boundary, and N_m at the midpoint of each character to be recognized.

[0070] S104-6: Confirm the identification label of the coordinates to be identified, wherein the identification label includes: country, denomination, version and acquisition rule.

[0071] Specifically, here we need to confirm the label to be identified for the coordinates to be identified, which will be used for subsequent matching with the serial number template.

[0072] S106: Confirm the recognition result of the character to be recognized based on the cosine value between the coordinates of the character to be recognized and the standard coordinates of the corresponding standard character.

[0073] S106 includes:

[0074] S106-2: Determine the prefix recognition template group corresponding to the character to be recognized based on the label to be recognized and the standard label.

[0075] Specifically, for example, if the label to be identified is Sri Lanka, 1000 denomination, 2010 issue, and the acquisition rule is to take 3 points and project vertically, then it is necessary to match the serial number recognition templates of all characters of Sri Lanka, 1000 denomination, 2010 issue, 3 points, and vertical projection, as the serial number recognition template group.

[0076] S106-4: Calculate the cosine value between the coordinates of the character to be identified and the standard coordinates of the standard characters in each set of serial number recognition templates.

[0077] S106-6: Determine the recognition result of the character to be recognized based on the cosine value.

[0078] S108: Determine the accuracy of the identification result based on the similarity between the number of dark spots in the coordinates to be identified and the number of standard dark spots in the standard coordinates.

[0079] S108 includes:

[0080] S108-2: Determine the number of standard dark spots for the corresponding standard character based on the recognition results.

[0081] S108-4: Calculate the similarity between the number of dark spots in the coordinates to be identified and the number of standard dark spots.

[0082] S108-6: Determine the accuracy of the recognition result based on the similarity.

[0083] S110: If the recognition result is accurate, output the recognition result. Otherwise, return to S104 to redetermine the coordinates of the character to be recognized.

[0084] Specifically, when redetermining, parameters such as the number of points to be identified, projection method, and assignment rules can be modified to reacquire the coordinates to be identified. If necessary, the template library can also be modified.

[0085] The beneficial effects of the embodiments of the present invention are as follows:

[0086] It accurately identifies serial numbers with complex structures, improving the accuracy of serial number recognition while reducing computing power consumption, thus facilitating subsequent functions such as serial number comparison and counterfeit banknote identification.

[0087] Example 2

[0088] like Figure 11 The diagram shown is a flowchart of another serial number character recognition method provided by an embodiment of the present invention. This embodiment mainly takes the number of sampling points as 3 and the vertical projection as an example to elaborate on the serial number character recognition method.

[0089] The method includes:

[0090] S102: Construct a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters.

[0091] Specifically, that is, to obtain Figures 2-6 The standard coordinates.

[0092] Obtain a large number of sample banknotes, binarize the numeric characters 0-9 or the alphanumeric characters AZ, and then project them vertically to obtain the average number of pixels with a pixel value of 0 (i.e., dark spots or black spots) for different numbers or letters. Take three values ​​from the left, middle, and right, and represent the number as N_L, N_M, and N_R, respectively.

[0093] To establish a coordinate system, first take any three points with equal intervals on the X-axis, with x1, x2, and x3 as the x-coordinates. Then, use N_L, N_M, and N_R as the Y-values ​​and combine them with x1, x2, and x3 respectively to obtain three template coordinates: A(x1, N_L), B(x2, N_M), and C(x3, N_R). The triangle formed by A, B, and C is the triangular template for a specific country, denomination, version, and character.

[0094] Because the characters 0-9 and AZ have different shapes, the number of pixels with a value of 0 (i.e., dark spots or black spots) obtained by vertical projection of these three points on different types of banknotes is different, and the different triangular templates formed are also different.

[0095] S104: Project the pre-acquired character to be recognized, and determine the coordinates of the character to be recognized based on the projection result.

[0096] Specifically, the number of dark spots on the left boundary N_l, the number of dark spots on the right boundary N_r, and the number of dark spots at the midpoint N_m of the character to be identified are assigned horizontal coordinates x1, x2, and x3 using the same assignment rule. The cosine value is then calculated using the serial number triangle template of the banknote to confirm the character to be identified.

[0097] S106: Confirm the recognition result of the character to be recognized based on the cosine value between the coordinates of the character to be recognized and the standard coordinates of the corresponding standard character.

[0098] Specifically, in this case, three points are selected, and the projection method is vertical projection. The closer the similarity is to 1, the higher the similarity. A threshold of 0.95 can be set. If the similarity is greater than 0.95, it is considered to meet the standard. If all three points of the triangle meet the standard, the content of the character to be identified can be determined.

[0099] The cosine value is calculated based on the following formula:

[0100] .

[0101] .

[0102] .

[0103] Where N_L, N_R, and N_M represent the standard number of dark spots in the left, right, and center, respectively. N_l, N_r, and N_m represent the number of dark spots in the characters to be recognized in the left, right, and center, respectively. x1, x2, and x3 represent the x-coordinates assigned to the number of dark spots based on preset assignment rules.

[0104] S108: Determine the accuracy of the identification result based on the similarity between the number of dark spots in the coordinates to be identified and the number of standard dark spots in the standard coordinates.

[0105] Specifically, the Euclidean algorithm can be used to calculate the similarity d between the three-point projection of the character to be recognized (i.e., the number of dark spots on the left boundary N_l, the right boundary N_r, and the midpoint N_m of the character to be recognized) and the obtained template (i.e., N_L, N_M, N_R). The smaller the d value, the higher the similarity. A threshold of 0.1 is set, and all three values ​​are less than 0.1 to be considered satisfactory. If all three values ​​meet the criteria, the above character value / letter recognition can be confirmed as correct. If any d ≥ 0.1, the recognition is incorrect, and S104 is executed again in a loop.

[0106] Specifically, the number of points taken includes 3, and the projection method is vertical projection.

[0107] Similarity d is calculated based on the following formula:

[0108] .

[0109] .

[0110] .

[0111] S110: If the recognition result is accurate, output the recognition result; otherwise, return to S104 to redetermine the coordinates of the character to be recognized.

[0112] In practice, it is entirely feasible to use not only three points (left, center, and right), but also four, five, six, or even more points. For example, if four points are selected, the standard coordinates would be as follows: Figure 4 , Figure 5 As shown.

[0113] S106 is changed to:

[0114] .

[0115] .

[0116] .

[0117] .

[0118] S108 is changed to:

[0119] Verification and correction of the formula:

[0120]

[0121]

[0122]

[0123]

[0124] The method for recognizing serial numbers provided in this application has the same implementation principle and technical effect as the aforementioned method embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the aforementioned method embodiments.

[0125] Example 3

[0126] This invention provides a device for recognizing prefix characters, such as... Figure 12 As shown, it includes:

[0127] The first recognition module is used to construct a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters.

[0128] The second recognition module is used to project the pre-acquired character to be recognized and determine the coordinates of the character to be recognized based on the projection result.

[0129] The third recognition module is used to confirm the recognition result of the character to be recognized based on the cosine value between the coordinates of the character to be recognized and the standard coordinates of the corresponding standard character.

[0130] The fourth identification module is used to determine the accuracy of the identification result based on the similarity between the number of dark spots in the coordinates to be identified and the number of standard dark spots in the standard coordinates.

[0131] The fifth recognition module is used to output the recognition result if the recognition result is accurate, otherwise to redetermine the coordinates of the character to be recognized.

[0132] The serial number character recognition device provided in this application has the same implementation principle and technical effect as the aforementioned serial number character recognition method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0133] Example 3

[0134] This application also provides an electronic device, see [link to relevant documentation] Figure 13 As shown, it includes a processor 100 and a memory 200. The memory 200 stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-mentioned method for recognizing serial numbers.

[0135] Furthermore, Figure 13 The electronic device shown also includes a bus 300 and a communication interface 400, with the processor 100, communication interface 400 and memory 200 connected via the bus 300.

[0136] The memory 200 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 400 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 300 may be an ISA bus, PCI bus, or EISA bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0137] The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams of the application embodiments in this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method applied in conjunction with the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 200, and processor 100 reads information from memory 200 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0138] This application also provides a machine-readable storage medium storing machine-executable instructions. When these machine-executable instructions are called and executed by a processor, they cause the processor to implement the aforementioned method for recognizing serial numbers. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0139] The computer program product for the method, apparatus and electronic device for recognizing serial numbers provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0140] If this function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for recognizing prefix characters, characterized in that, The method includes: S102: Construct a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters; S104: Project the pre-acquired character to be recognized, and determine the coordinates of the character to be recognized based on the projection result; S106: Confirm the recognition result of the character to be recognized based on the cosine value between the coordinates of the character to be recognized and the standard coordinates of the corresponding standard character; S108: Determine the accuracy of the identification result based on the similarity between the number of dark spots in the coordinates to be identified and the number of standard dark spots in the standard coordinates; S110: If the recognition result is accurate, output the recognition result; otherwise, return to S104 to redetermine the coordinates of the character to be recognized. S102 includes: S102-2: Determine the number of standard dark spots for any standard character based on a predetermined acquisition rule, wherein the acquisition rule includes the number of spots and the projection method, and the projection method includes vertical projection and horizontal projection; S102-4: Use the number of standard dark spots as the vertical coordinate, and assign a corresponding horizontal coordinate to the vertical coordinate based on a preset assignment rule; S102-6: Combine the vertical coordinate and the horizontal coordinate as the standard coordinate, and determine the serial number recognition template based on the standard coordinate.

2. The method for recognizing prefix characters according to claim 1, characterized in that, Different characters on standard banknotes from different countries, denominations, and versions correspond to different serial number recognition templates. The characters include letters, numbers, and fraction lines.

3. The method for recognizing prefix characters according to claim 2, characterized in that, S102 also includes: Add standard labels to the serial number recognition template, wherein the standard labels include: country, denomination, version, character content and acquisition rules.

4. The method for recognizing serial number characters according to claim 3, characterized in that, S104 includes: S104-2: Perform serial number segmentation and binarization on the current banknote to be identified to obtain the character to be identified; S104-4: Determine the coordinates to be identified based on the current acquisition rules and the preset assignment rules; S104-6: Confirm the identification label of the coordinates to be identified, wherein the identification label includes: country, denomination, version and acquisition rule.

5. The method for recognizing prefix characters according to claim 4, characterized in that, S106 includes: S106-2: Determine the prefix recognition template group corresponding to the character to be recognized based on the label to be recognized and the standard label; S106-4: Calculate the cosine value between the coordinates of the character to be identified and the standard coordinates of the standard characters in each set of serial number recognition templates; S106-6: Determine the recognition result of the character to be recognized based on the cosine value.

6. The method for recognizing prefix characters according to claim 5, characterized in that, S108 includes: S108-2: Determine the number of standard dark spots for the corresponding standard character based on the recognition result; S108-4: Calculate the similarity between the number of dark spots in the coordinates to be identified and the standard number of dark spots; S108-6: Determine the accuracy of the recognition result based on the similarity.

7. The method for recognizing prefix characters according to claim 5, characterized in that, The number of points selected includes 3, and the projection method is vertical projection; The cosine value is calculated based on the following formula: ; ; ; Where N_L, N_R, and N_M are the standard number of dark spots in the left, right, and center, respectively; N_l, N_r, and N_m are the number of dark spots of the characters to be recognized in the left, right, and center, respectively; and x1, x2, and x3 are the x-coordinates of the number of dark spots assigned based on the preset assignment rules.

8. The method for recognizing prefix characters according to claim 6, characterized in that, The number of points selected includes 3, and the projection method is vertical projection; Similarity d is calculated based on the following formula: ; ; 。 9. A device for recognizing serial number characters, characterized in that, The device includes: The first recognition module is used to construct a serial number recognition template for standard banknotes, wherein the serial number recognition template includes standard coordinates of standard characters; The second recognition module is used to project the pre-acquired character to be recognized and determine the recognition coordinates of the character based on the projection result. The third recognition module is used to confirm the recognition result of the character to be recognized based on the cosine value between the coordinates of the character to be recognized and the standard coordinates of the corresponding standard character. The fourth identification module is used to determine the accuracy of the identification result based on the similarity between the number of dark spots in the coordinates to be identified and the number of standard dark spots in the standard coordinates; The fifth recognition module is used to output the recognition result if the recognition result is accurate; otherwise, it redetermines the coordinates of the character to be recognized. The first recognition module is further configured to determine the number of standard dark spots of any standard character based on a predetermined acquisition rule, wherein the acquisition rule includes the number of spots and the projection method, and the projection method includes vertical projection and horizontal projection; take the number of standard dark spots as the vertical coordinate, and assign a corresponding horizontal coordinate to the vertical coordinate based on a preset assignment rule; combine the vertical coordinate and the horizontal coordinate as the standard coordinate, and determine the serial number recognition template according to the standard coordinate.

10. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method for recognizing serial number characters as described in any one of claims 1 to 8.