Circuit board component character recognition method, device and equipment and storage medium

By using a character recognition network model including the first branch channel and the second branch channel in the circuit board component character recognition, the problem of low accuracy of component character recognition in the prior art is solved, especially when identifying polar-free component reverse patches and character-free components, a higher recognition accuracy is achieved.

CN119851254APending Publication Date: 2025-04-18GUANGZHOU LEICHEN INTELLIGENT EQUIP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311705209.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing circuit board component character recognition methods have low accuracy, especially in character recognition and character-free component recognition when identifying reverse patches of polarity-free components.

Method used

A character recognition network model including the first branch channel and the second branch channel is used to identify the character box area in the circuit board image. The first branch channel is used to output the classification results of preset element characters, and the second branch channel is used to output unconventional characters after rotation 180°. By compiling unconventional characters into original component characters and performing position reversal processing, the corresponding string is generated.

Benefits of technology

It improves the accuracy of character recognition of circuit board components, can effectively identify characters when the polarity-free component reverse patch, and handles character recognition problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119851254A_ABST
    Figure CN119851254A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a circuit board component character recognition method and device, equipment and a storage medium, and the method comprises the steps: obtaining a circuit board image of a to-be-detected circuit board, and determining a character frame region of a corresponding position point for the circuit board image according to a preset division rule; inputting the image data of the character box region into a preset character recognition network model to obtain a character recognition result, the character recognition network model comprising a first branch channel for outputting a classification result of a corresponding preset element character and a second branch channel for outputting a classification result corresponding to a first character, the first character is an unconventional character obtained after the preset element character is rotated by 180 degrees; compiling a first character of the character recognition result into a corresponding first original element character; and according to the preset element character and the first original element character in the character recognition result, obtaining a character string corresponding to the character box region, so that the problem of relatively low recognition accuracy of the component can be solved, and the character recognition accuracy of the circuit board component is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of character recognition technology, and in particular to a circuit board component character recognition method, device, equipment and storage medium. Background Art

[0002] Circuit boards are an important part of smart electronic devices. Circuit boards generally have chips and components mounted on them. The correct placement of components on circuit boards is an important guarantee for the normal operation of the circuit boards. Therefore, it is particularly important to detect whether the components are correctly mounted during the production process.

[0003] Generally, corresponding character information is printed on components. The characters on the components are generally recognized, and the recognition results are compared with the standard board to determine whether the components are correctly mounted based on the comparison results.

[0004] For non-polar components, such as resistors, capacitors or inductors, reverse patching will not affect the performance of the components themselves, and reverse patching is also more likely to occur in actual production. The characters on the components are reverse characters when reverse patching. Existing optical character recognition methods cannot recognize reverse characters on components, so components with reverse patches (regardless of whether they are non-polar components) are considered to be patch errors, and when there are components without characters, they are also considered to be patch errors. Therefore, the accuracy of component character recognition methods in existing optical character recognition methods is low. Summary of the invention

[0005] The embodiments of the present application provide a circuit board component character recognition method, device, equipment and storage medium, which can solve the problem of low accuracy of existing circuit board component character recognition and improve the accuracy of circuit board component character recognition.

[0006] In a first aspect, an embodiment of the present application provides a circuit board component character recognition method, comprising:

[0007] Obtaining a circuit board image of the circuit board to be tested, and determining a character frame area corresponding to a position point of the circuit board image according to a preset division rule;

[0008] Inputting the image data of the character frame area into a preset character recognition network model to obtain a character recognition result, wherein the character recognition network model includes a first branch channel and a second branch channel, wherein the first branch channel is used to output a classification result of a preset component character, and the second branch channel is used to output a classification result of a first character, wherein the first character is an unconventional character obtained by rotating the preset component character by 180°;

[0009] compile a first character of the character recognition result into a corresponding first original component character;

[0010] A character string corresponding to the character frame area is obtained according to the preset component character and the first original component character in the character recognition result.

[0011] In a second aspect, an embodiment of the present application provides a circuit board component character recognition device, comprising:

[0012] An image acquisition unit, used to acquire a circuit board image of the circuit board to be tested, and determine a character frame area corresponding to a position point of the circuit board image according to a preset division rule;

[0013] A character recognition unit, used for inputting the image data of the character frame area into a preset character recognition network model to obtain a character recognition result, wherein the character recognition network model includes a first branch channel and a second branch channel, wherein the first branch channel is used for outputting a classification result of a preset component character, and the second branch channel is used for outputting a classification result of a first character, wherein the first character is an unconventional character obtained by rotating the preset component character by 180°;

[0014] A compiling unit, used for compiling a first character of a character recognition result into a corresponding first original component character;

[0015] The character string generating unit is used to obtain a character string corresponding to the character frame area according to the preset component characters and the first original component characters in the character recognition result.

[0016] In a third aspect, an embodiment of the present application provides a circuit board component character recognition device, comprising:

[0017] memory and one or more processors;

[0018] The memory is used to store one or more programs;

[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the circuit board component character recognition method as described in the first aspect.

[0020] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the circuit board component character recognition method as described in the first aspect.

[0021] The embodiment of the present application uses a character recognition network model to identify the image data of the character frame area of ​​the corresponding position point in the circuit board image to obtain a character recognition result, compiles the first character of the character recognition result into a corresponding first original component character, and obtains a character string corresponding to the character frame area according to the preset component character and the first original component character in the character recognition result. Using the above technical means, the unconventional character after the preset component character is rotated 180° can be recognized by the preset character recognition network model to obtain the corresponding first character, and the problem of low accuracy of existing circuit board component character recognition can be avoided by compiling the first character into the corresponding first original component character, and the character string corresponding to the component in the character frame area is obtained according to the preset component character and the first original component character of the character recognition result, thereby improving the accuracy of circuit board component character recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of a circuit board component character recognition method provided by an embodiment of the present application;

[0023] Figure 2 It is a partial schematic diagram of a circuit board image provided by an embodiment of the present application;

[0024] Figure 3 It is a schematic diagram of a character recognition network model provided in an embodiment of the present application;

[0025] Figure 4 This is a schematic diagram of branch channel division provided in an embodiment of the present application;

[0026] Figure 5 It is a structural schematic diagram of a circuit board component character recognition device provided in an embodiment of the present application;

[0027] Figure 6 It is a structural schematic diagram of a circuit board component character recognition device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0029] The circuit board component character recognition method, device, equipment and storage medium provided by the present application are intended to identify the character string of components. The unconventional characters after the preset component characters are rotated 180° can be identified by a preset character recognition network model to obtain the corresponding first character, and the first character is compiled into the corresponding first original component character, and the character string corresponding to the character frame area is obtained according to the preset component characters and the first original component characters of the character recognition result, thereby improving the accuracy of circuit board component character recognition. Compared with the traditional character string method of identifying components, it cannot identify the unconventional characters (i.e., reverse characters) after the characters on the components are rotated 180° when the forward patch is used through the optical character recognition method of deep learning; or when identifying the unconventional characters after the characters on the components are rotated 180° when the forward patch is used, the corresponding ambiguous characters are output; and finally, the components of the reverse patch (regardless of whether they are non-polar components) are considered to be wrong patches, and when there are components without characters, they are also considered to be wrong patches. In addition, the existing optical character recognition method of deep learning has unsatisfactory recognition results for the case of long character strings. Therefore, the existing optical character recognition method through deep learning has a low accuracy rate in component recognition, and has a low accuracy rate in recognition of unconventional characters after the characters on the components are rotated 180°, recognition of no characters (i.e., blank characters), and recognition of long character strings. Based on this, a circuit board component character recognition method according to an embodiment of the present application is provided to solve the problem of low recognition accuracy in the existing component character string recognition process.

[0030] Figure 1A flow chart of a circuit board component character recognition method provided in an embodiment of the present application is given. The circuit board component character recognition method provided in this embodiment can be executed by a circuit board component character recognition device, which can be implemented by software and / or hardware. The circuit board component character recognition device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the circuit board component character recognition device can be a terminal device, such as a computer device, etc.

[0031] The following description is made by taking a computer device as an example to implement the circuit board component character recognition method. Figure 1 , the circuit board component character recognition method specifically includes:

[0032] S101, obtaining a circuit board image of a circuit board to be tested, and determining a character frame area corresponding to a position point of the circuit board image according to a preset division rule.

[0033] There are components mounted on the circuit board, including resistors, capacitors, inductors, diodes, transistors, etc. Some components are printed with corresponding character strings to indicate the type or number of the component, such as R1, C2, Y21 or 348. In the production process of circuit board patch, common abnormalities can be detected by automatic optical inspection, such as detecting whether there are patch errors. The circuit board image of the circuit board to be tested can be obtained, and the character frame area of ​​the corresponding position point of the circuit board image can be determined according to the preset division rules, and the image of each character frame area can be recognized and processed respectively, and the recognition result can be compared with the preset area content of the position point corresponding to the preset standard board, and it can be determined whether there is a patch abnormality in the circuit board to be tested based on the comparison result.

[0034] Figure 2 This is a partial schematic diagram of a circuit board image provided by an embodiment of the present application, referring to Figure 2 There are multiple components mounted on the circuit board to be tested, and the corresponding components are mounted at preset positions on the circuit board according to the design of the circuit board. Based on the design of the circuit board, the positions of the components on the circuit board are fixed; therefore, the circuit board image can be divided into corresponding character box areas according to the design positions of the corresponding components according to the design of the circuit board. It should be noted that the divided character box area needs to include the corresponding component patch area, and the area needs to be slightly larger than the area of ​​the corresponding component. For example, Figure 2 As shown, on the circuit board image, the character box area corresponding to component A is area 1; the character box area corresponding to component B is area 2. By analogy, the character box areas corresponding to all surface mount components can be obtained.

[0035] As described above, by acquiring the circuit board image of the circuit board to be tested, and determining the character frame areas of the corresponding position points of the circuit board image according to the preset division rules, the circuit board image is divided into character frame areas based on components, so as to facilitate subsequent independent recognition and comparative analysis based on each character frame area, so as to identify each component and perform independent abnormality detection on each component, thereby improving the accuracy of circuit board component character recognition.

[0036] S102. Input the image data of the character box area into a preset character recognition network model to obtain a character recognition result. The character recognition network model includes a first branch channel and a second branch channel. The first branch channel is used to output the classification result of the preset component character, and the second branch channel is used to output the classification result of the first character. The first character is an unconventional character obtained by rotating the preset component character 180°.

[0037] The components on the circuit board include polar components and non-polar components. Non-polar components include resistors, capacitors, inductors, etc.; polar components include transistors, diodes, amplifiers, etc. For polar components, reverse patching (i.e. reverse connection) is not allowed. Reverse patching will directly affect the normal use of polar components. For non-polar components, reverse patching (i.e. reverse connection) will not affect the normal use of non-polar components. Therefore, the character box area divided in the above steps is positioned and divided into character box areas corresponding to polar components and character box areas corresponding to non-polar components.

[0038] The preset component characters are numeric characters, punctuation characters or English alphabetic characters. For example, the preset component characters include "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ." and the like. The image data of the character frame area corresponding to the non-polar component is input into the preset character recognition network model to obtain the character recognition result. The character recognition network model includes a first branch channel and a second branch channel. The first branch channel is used to output the classification result of the corresponding preset component character. The second branch channel is used to output the classification result of the corresponding first character. The first character is an unconventional character obtained by rotating the preset component character 180°. Exemplarily, the preset component characters corresponding to the first character include "123457ABCDEFGJKLPQRVUTY". The character obtained by rotating any preset component character in "123457ABCDEFGJKLPQRVUTY" by 180° is an unconventional character. For example, "R" is rotated 180° to If it is an unconventional character, the unconventional character is the first character. By inputting the image data of the character frame area corresponding to the non-polar components into the preset character recognition network model for character recognition, the unconventional characters obtained after the preset component characters are rotated 180° can also be recognized, so that the corresponding component characters can still be recognized after being rotated 180°, and will not be judged as patch errors due to unrecognizable, thereby improving the recognition accuracy of non-polar components.

[0039] Figure 3 is a schematic diagram of a character recognition network model provided in an embodiment of the present application, referring to Figure 3 , the preset character recognition network model of the present embodiment is an improved CRNN model, including a convolution layer, a recurrent layer and a transcription layer. The convolution layer is used to input an image, perform convolution feature mapping according to the input image, and obtain a feature sequence based on the convolution feature mapping. The recurrent layer is used to perform data processing of a deep bidirectional long short-term memory network (LSTM) according to the feature sequence to obtain a predicted value for each branch channel. The transcription layer is used to obtain a corresponding predicted sequence according to the predicted value of each branch channel. On this basis, the character recognition network model of the present embodiment is provided with a first branch channel and a second branch channel, wherein the first branch channel is used to output the classification result of the corresponding preset component character, and the second branch channel is used to output the classification result corresponding to the first character, and the first character is an unconventional character obtained by rotating the preset component character by 180°. The image data of the character frame area corresponding to the non-polar components is input into the preset character recognition network model, and the image data of the character frame area is processed by the character recognition network model, and the corresponding character recognition result is output through the corresponding first branch channel and / or the second branch channel, that is, the predicted value corresponding to each branch channel is output.

[0040] The preset component characters include a first preset component character and a second preset component character, wherein the first preset component character is a regular character obtained by rotating the preset component character by 180°, which is the same as the preset component character. Exemplarily, the first preset component character includes ".08HINOSXZ", any first preset component character in ".08HINOSXZ", which is the same as the original component character after being rotated by 180°, for example, "0" is still "0" after being rotated by 180°. The second preset component character is a regular character obtained by rotating the preset component character by 180°, which is different from the preset component character. Exemplarily, the second preset component character includes "69MW". Any second preset component character in "69MW", which is the same as the original component character after being rotated by 180°, for example, "6" is "9" after being rotated by 180°, and both are regular characters, but different.

[0041] In one embodiment, based on the character string corresponding to the component, which is usually composed of regular characters, that is, 26 English letters, numbers 0-9 and ".", the preset component characters can be set to include ".08HINOSXZ69MW123457ABCDEFGJKLPQRVUTY", and each preset component character corresponds to a first branch channel, so the number of first branch channels is 37. Among them, the preset component characters include a first preset component character and a second preset component character, and the first preset component character includes ".08HINOSXZ". Any first preset component character in ".08HINOSXZ", after rotating 180°, the character obtained is the same as the original component character, for example, "0" is still "0" after rotating 180°. The second preset component character includes "69MW". Any second preset component character in "69MW", after rotating 180°, the character obtained is a regular character different from the original component character. For example, "6" is "9" after rotating 180°, both of which are regular characters, but not the same. The first character is an unconventional character obtained by rotating the preset component character by 180°. The preset component characters corresponding to the first character include "123457ABCDEFGJKLPQRVUTY". The character obtained by rotating any preset component character in "123457ABCDEFGJKLPQRVUTY" by 180° is an unconventional character. For example, "R" is rotated by 180° to It is an unconventional character, that is, it is a first character. Each first character corresponds to one second branch channel, so the number of second branch channels is 24.

[0042] It should be noted that the specific number of the first branch channel and the specific number of the second branch channel can be set according to actual conditions. For example, according to actual conditions, the corresponding preset component characters only include numbers 0-9, then the corresponding first branch channel data is 10, and the corresponding second branch channel data is 6.

[0043] Since the first character is an unconventional character obtained by rotating the preset component character by 180°, a character mapping relationship between the first character and the corresponding preset component character can be established. In the preset character recognition network model, the first branch channel is numbered in a preset order to obtain a first number value, and the second branch is numbered in a preset order to obtain a second number value. According to the character mapping relationship between the first character and the corresponding preset component character, a number mapping relationship between the second number value and the corresponding first number value is established.

[0044] Figure 4 This is a schematic diagram of a branch channel division provided in an embodiment of the present application, referring to Figure 4Assuming that the preset component characters include ".08HINOSXZ69MW123457ABCDEFGJKLPQRVUTY", there are 37 first branch channels. The first branch channels are numbered in the order of the preset component characters ".08HINOSXZ69MW123457ABCDEFGJKLPQRVUTY" to obtain the first number value of the first branch channel corresponding to ".08HINOSXZ69MW123457ABCDEFGJKLPQRVUTY". For example, the first number value of the first branch channel corresponding to the preset component character "." is 1, and the first number value of the first branch channel corresponding to the preset component character "0" is 2. By analogy, the first number values ​​of all first branch channels are 1-37. Based on the fact that the preset component characters corresponding to the first character include "123457ABCDEFGJKLPQRVUTY", the second branch channels are 24, and the second branch channels are numbered in the order of "123457ABCDEFGJKLPQRVUTY" to obtain a second number value. For example, the first character corresponding to the preset component character "1" is The second number value of the corresponding second branch channel is 38. Therefore, the second number value corresponding to the second branch channel can be obtained as 38-61. According to the character mapping relationship between the first character and the corresponding preset component character, a number mapping relationship between the second number value 38-61 and the corresponding first number value 15-37 is established. For example, the second number value 38 has a number mapping relationship with the first number value 15, the second number value 39 has a number mapping relationship with the first number value 16, and so on. The second number value 38-61 has a corresponding number mapping relationship with the corresponding first number value 15-37.

[0045] It should be noted that the preset order for numbering processing can be adjusted according to actual conditions, and the preset order for numbering processing mentioned above is only an example.

[0046] As described above, the image data of the character frame area corresponding to the non-polar components is input into a preset character recognition network model, the corresponding preset component characters are output through the first branch channel in the character recognition network model, and the corresponding first characters are output through the second branch channel in the character recognition network model to obtain character recognition results. Unconventional first characters can be recognized, so that non-polar components can still be recognized when presenting unconventional characters during reverse pasting, and will not be judged as pasting errors due to inability to recognize, thereby improving the recognition accuracy of non-polar components.

[0047] S103: Compile the first character of the character recognition result into a corresponding first original component character.

[0048] Based on the fact that the first character is an unconventional character obtained by rotating the preset component character by 180°, when the character recognition result includes the first character, it means that the component corresponding to the character frame area is reversely mounted, that is, the first character is a reverse character. In order to restore the forward character of the forward mounting, the first character of the character recognition result can be compiled into the corresponding first original component character, and the first original component character can be understood as the forward character corresponding to the first character. For example, the aforementioned first character Its corresponding forward character (i.e., the first original component character) is "1". During compilation, the first character of the character recognition result can be compiled into the corresponding preset component character according to the mapping relationship between the first character and the corresponding preset component character to obtain the first original component character. Based on the fact that the first character is output through the second branch channel in the preset character recognition model, the corresponding first number value can be determined according to the second number value of the second branch channel that outputs the first character and the aforementioned number mapping relationship. The first character is compiled into the preset component character output by the first branch channel corresponding to the corresponding first number value to obtain the first original component character.

[0049] In one embodiment, referring to Figure 4 , assuming that the preset component characters include ".08HINOSXZ69MW123457ABCDEFGJKLPQRVUTY", the preset component characters corresponding to the first character include "123457ABCDEFGJKLPQRVUTY", and the number mapping relationship between the second number values ​​38-61 and the corresponding first number values ​​15-37 is obtained according to the above. Assuming that the first character of the character recognition result is Its corresponding second number value is 38. According to the number mapping relationship between the second number values ​​38-61 and the corresponding first number values ​​15-37, that is, according to the number mapping relationship between the second number value 38 and the first number value 15, the first character is obtained. The corresponding first number value is 15. The preset component character output by the first branch channel with the first number value of 15 is "1", then the first character The preset component character "1" of the first branch channel output corresponding to the first number value 15 is compiled, that is, the first original component character "1" is obtained.

[0050] As mentioned above, by compiling the first character of the character recognition result into the corresponding first original component character, when the preset character recognition network model outputs the corresponding unconventional character (i.e., the first character), the unconventional character can be restored to the corresponding regular character (i.e., the first original component character), thereby realizing the recognition of unconventional characters, so that when the corresponding character is rotated 180° and presented as an unconventional character due to the reverse mounting of non-polar components, the corresponding unconventional character can also be recognized, thereby improving the flexibility and accuracy of identifying non-polar components.

[0051] S104: Obtain a character string corresponding to the character frame area according to the preset component characters and the first original component characters in the character recognition result.

[0052] Based on the reverse placement of components, it is equivalent to that all characters are rotated 180°. When only the corresponding first character is compiled into the corresponding forward character (that is, the first original component character), the corresponding character string is disordered. Therefore, the corresponding order adjustment is required to restore the corresponding correct character string. If the character recognition results are all the first characters, the characters in the character string representing the component pair are all preset component characters corresponding to the first character. Therefore, after compiling the first character into the corresponding first original component character, the first original component character is reversed to obtain the character string corresponding to the character box area. Exemplarily, assuming that the character recognition result is the first character and the first character The corresponding first original component characters "1" and "R" are obtained through the compilation process of S103, and the first original component characters "1" and "R" are reversed to obtain the corresponding character string "R1", that is, the corresponding character box area corresponds to the character string "R1".

[0053] In one embodiment, in addition to the first character, other preset component characters may exist in the character recognition result. When the character recognition result only includes the first preset component character and the first character, after the first character is compiled into the corresponding first original component character in S103, the first preset component character and the first original component character are reversed to obtain a character string corresponding to the character frame area. For example, assuming that the character recognition result is the first preset component character "8" and the first character The first character is obtained by the compilation process of S103 The corresponding first original component character "R" is obtained by reversing the positions of the first preset component character "8" and the first original component character "R", and the corresponding character string is "R8", that is, the character string corresponding to the corresponding character box area is "R8".

[0054] In one embodiment, in addition to the first character, other preset component characters may exist in the character recognition result. When the character recognition result includes the first preset component character, the second preset component character and the first character, the second preset component character in the character recognition result is compiled into the corresponding second original component character, and the first preset component character, the first original component character and the second original component character in the character recognition result are positionally reversed to obtain a character string corresponding to the character frame area. When compiling the second preset component character into the second original component character, the second preset component character of the character recognition result can be compiled into the corresponding preset component character according to the mapping relationship between the second preset component character and the corresponding preset component character to obtain the second original component character.

[0055] For example, refer to Figure 4 , ".08HINOSXZ69MW123457ABCDEFGJKLPQRVUTY" corresponds to the first number value 1-37 of the first branch channel, and the second preset component character includes "69MW", then the first number value of the second preset component character can be obtained to be 11-14, therefore, a mapping relationship between the second preset component character "69MW" and the corresponding preset component character "96WM" can be established, that is, a number mapping relationship between the first number value of the second preset component character and the first number value of the corresponding preset component character can be established, that is, a coding mapping relationship between the first number values ​​11, 12, 13, 14 of the second preset component character and the first number values ​​12, 11, 14, 13 of the preset component character are established respectively. According to the number mapping relationship between the first number value of the second preset component character and the first number value of the corresponding preset component character, the second preset component character of the character recognition result can be compiled into the corresponding preset component character to obtain the second original component character.

[0056] For example, assuming that the character recognition result is the first preset element character "8", the second preset element character "6" and the first character The first character is obtained by the compilation process of S103 The corresponding first original component character "R" compiles the second preset component character "6" into the corresponding second original component character "9", and the first preset component character "8", the second original component character "9" and the first original component character "R" are positionally reversed to obtain the corresponding character string "R98", that is, the corresponding character box area corresponds to the character string "R98".

[0057] In one embodiment, when the character recognition result only includes the second preset component character and the first character, the second preset component character in the character recognition result is compiled into the corresponding second original component character, and the first original component character and the second original component character in the character recognition result are positionally reversed to obtain a character string corresponding to the character frame area. For example, assuming that the character recognition result is the second preset component character "6" and the first character The first character is obtained by the compilation process of S103 The corresponding first original component character "R" compiles the second preset component character "6" into the corresponding second original component character "9", and reverses the position of the second original component character "9" and the first original component character "R" to obtain the corresponding character string "R9", that is, the corresponding character box area corresponds to the character string "R9".

[0058] As described above, when the character recognition result includes the first character and other preset component characters, further compilation and / or position inversion processing can be performed to obtain the character string in the corresponding character box area to restore the corresponding forward character string of the component and complete the character recognition during the reverse patch of the non-polar component. Compared with the existing method that cannot recognize reverse characters, the accuracy and flexibility of character recognition are improved, thereby improving the accuracy of component recognition.

[0059] In one embodiment, the character recognition network model also includes a third branch channel, and the third branch channel is used to output the classification result of the second character, and the second character is an unrecognizable character. The second character can be understood as an unrecognizable character or a blank character (such as a space), and the second character of the character recognition result is compiled into a preset identification character. The preset identification character can be set to any identification character such as "#", "*" and "_". According to the preset component characters, the preset identification characters and the first original component characters in the character recognition result, a character string corresponding to the character box area is obtained. Through the existence of unrecognizable characters or blank characters (such as spaces), the corresponding preset identification characters can be output through the third branch channel of the character recognition network model. Compared with the existing method of reporting errors when unrecognizable characters, the error rate is reduced, thereby saving production costs.

[0060] In one embodiment, when a preset identification character appears, a corresponding manual review is required to perform a secondary confirmation of abnormal detection of the corresponding component, thereby improving the accuracy of component recognition.

[0061] In one embodiment, referring to Figure 4, assuming that the preset component characters include ".08HINOSXZ69MW123457ABCDEFGJKLPQRVUTY", then the first branch channels are 37, and the corresponding first numbering values ​​of the first branch channels are 1-37. Based on the fact that the preset component characters corresponding to the first character include "123457ABCDEFGJKLPQRVUTY", then the second branch channels are 24, and the second numbering values ​​corresponding to the second branch channels are 38-61. The third numbering value corresponding to the third branch channel is 62. The image data of the input character box area is recognized and processed by the preset character recognition network model, and the corresponding preset component characters, first characters and / or second characters are output through the corresponding first branch channel, second branch channel and / or third branch channel. The first character is compiled into the corresponding first original component character, and the character string corresponding to the character box area is obtained according to the preset component characters, second characters and first original component characters in the character recognition result. By setting the third branch channel, the corresponding unrecognizable characters or space characters can be output and displayed with preset identification characters to avoid material waste caused by direct error reporting. The user can be reminded for secondary confirmation based on the preset identification characters, thereby reducing the error rate, improving the accuracy of component identification, and further improving the quality of circuit board production.

[0062] It should be noted that the specific arrangement order of the first number value of the first branch channel, the second number value of the second branch channel, and the third number value of the third branch channel can be adjusted according to actual conditions. In one embodiment, the third branch channel can be set behind the first branch channel, that is, the third number value is the next number value of the last first number value corresponding to the first branch channel. For example, assuming that the first number value is 1-37, the corresponding third number value is 38.

[0063] In one embodiment, for the identification of polar components, the image data of the character box area corresponding to the polar components is input into another preset character recognition network model to obtain a character recognition result. The character recognition network model only includes a first branch channel, and the first branch channel is used to output the classification result of the corresponding preset component character. According to the character recognition network model, the character recognition result is output to obtain the character string corresponding to the character box area. Based on the fact that the character recognition network model does not have a corresponding second branch channel that can recognize unconventional characters, when unconventional characters appear due to the reverse patch of the component, the unconventional characters cannot be recognized, and an error processing is performed, that is, it can be judged that the component patch corresponding to the character box area is wrong. As mentioned above, the reverse patch of the polar components will directly affect the normal use of the polar components. Therefore, the character string recognition is performed by the character recognition network model that only includes the first branch channel, so that the corresponding character string is output only when the forward patch presents a regular character, and an error processing is performed when the reverse patch presents an unconventional character, so as to detect whether the polar components are correctly patched, and improve the accuracy of polar component identification and abnormal detection.

[0064] The character string corresponding to the above-obtained character box area is compared with the standard character string in the corresponding character box area in the standard circuit board image of the preset standard board. If the character string corresponding to the above-obtained character box area is the same as the standard character string in the corresponding character box area in the standard circuit board image of the preset standard board, it is judged that the component patch corresponding to the above-obtained character box area is correct. If the character string corresponding to the above-obtained character box area is not the same as the standard character string in the corresponding character box area in the standard circuit board image of the preset standard board, it is judged that the component patch corresponding to the above-obtained character box area is wrong.

[0065] As mentioned above, the corresponding preset component characters and the corresponding unconventional characters can be output through the corresponding character recognition network model, so that when the corresponding non-polar components are based on the reverse patch and cause the corresponding characters to appear as unconventional characters, the corresponding original component characters can be restored by compiling the unconventional characters, and the character string in the corresponding character box area can be restored based on the position inversion processing, thereby realizing the recognition of the non-polar components of the reverse patch, so that when the patch abnormality detection is performed subsequently, it can be judged based on the original character string in the corresponding character box area and the standard character string in the corresponding character box area in the corresponding standard circuit board image. Compared with the existing method that can only recognize forward characters, the recognition flexibility and accuracy of components are improved.

[0066] In the above, the character recognition result is obtained by identifying the image data of the character frame area of ​​the corresponding position point in the circuit board image through the character recognition network model, and the first character of the character recognition result is compiled into the corresponding first original component character. According to the preset component character and the first original component character in the character recognition result, the character string corresponding to the character frame area is obtained. By adopting the above technical means, the unconventional character after the preset component character is rotated 180° can be recognized by the preset character recognition network model to obtain the corresponding first character. By compiling the first character into the corresponding first original component character, the problem of low accuracy of existing circuit board component character recognition can be avoided. According to the preset component character and the first original component character of the character recognition result, the character string of the component corresponding to the character frame area is obtained, thereby improving the accuracy of circuit board component character recognition.

[0067] Based on the above embodiments, Figure 5 A schematic diagram of the structure of a circuit board component character recognition device provided in an embodiment of the present application. Figure 5 The circuit board component character recognition device provided in this embodiment specifically includes: an image acquisition unit 21, a character recognition unit 22, a compilation unit 23 and a character string generation unit 24.

[0068] The image acquisition unit 21 is used to acquire a circuit board image of the circuit board to be tested, and determine a character frame area corresponding to a position point of the circuit board image according to a preset division rule;

[0069] The character recognition unit 22 is used to input the image data of the character frame area into a preset character recognition network model to obtain a character recognition result, wherein the character recognition network model includes a first branch channel and a second branch channel, wherein the first branch channel is used to output a classification result of a preset component character, and the second branch channel is used to output a classification result of a first character, wherein the first character is an unconventional character obtained by rotating the preset component character by 180°;

[0070] A compiling unit 23, used for compiling a first character of a character recognition result into a corresponding first original component character;

[0071] The character string generating unit 24 is used to obtain a character string corresponding to the character frame area according to the preset component characters and the first original component characters in the character recognition result.

[0072] In one embodiment, the character recognition network model further includes a third branch channel, the third branch channel is used to output a classification result of the second character, and the second character is an unrecognizable character;

[0073] The character string generating unit 24 includes a second compiling module;

[0074] A second compiling module, used for compiling a second character of the character recognition result into a preset identification character;

[0075] The character string generation module is used to obtain a character string corresponding to the character frame area according to the preset component characters, the preset identification characters and the first original component characters in the character recognition result.

[0076] In one embodiment, the compiling unit 23 includes a compiling module;

[0077] The compiling module is used to compile the first character of the character recognition result into the corresponding preset component character according to the mapping relationship between the first character and the corresponding preset component character, so as to obtain the first original component character.

[0078] In one embodiment, the compiling module includes a first numbering submodule, a second numbering submodule, a mapping establishment submodule, a mapping submodule, and a compiling submodule;

[0079] A first numbering submodule, used to number the first branch channel according to a preset sequence to obtain a first numbering value;

[0080] A second numbering submodule, used for numbering the second branch channels according to a preset sequence to obtain a second numbering value;

[0081] A mapping establishment submodule is used to establish a number mapping relationship between the second number value and the corresponding first number value according to the character mapping relationship between the first character and the corresponding preset element character,

[0082] A mapping submodule, used for determining a corresponding first number value according to a second number value corresponding to a first character in a character recognition result and a number mapping relationship;

[0083] The compiling submodule is used to compile the first character of the character recognition result into a preset component character outputted by the first branch channel corresponding to the corresponding first serial number value, so as to obtain a first original component character.

[0084] In one embodiment, the character string generating unit 24 is further configured to perform position reversal processing on the first original component character obtained after compilation to obtain a character string corresponding to the character frame area if the character recognition results are all the first character.

[0085] In one embodiment, the preset component character includes a first preset component character and a second preset component character, the first preset component character is a regular character obtained by rotating the preset component character by 180° and the second preset component character is a regular character obtained by rotating the preset component character by 180° and different from the preset component character;

[0086] The character string generating unit 24 is further configured to perform position reversal processing on the first preset component character and the first original component character to obtain a character string corresponding to the character frame area if the character recognition result only includes the first preset component character and the first character.

[0087] In one embodiment, the string generation unit 24 includes a first compilation module and a string generation module;

[0088] A first compiling module, configured to compile the second preset component character of the character recognition result into a corresponding second original component character if the character recognition result includes the second preset component character and the first character;

[0089] The character string generation module is used to perform position inversion processing on the first preset component character, the first original component character and the second original component character of the character recognition result to obtain a character string corresponding to the character frame area.

[0090] In one embodiment, the first compilation module is further used to compile the second preset component character of the character recognition result into the corresponding preset component character according to the mapping relationship between the second preset component character and the corresponding preset component character if the character recognition result includes the second preset character and the first character, so as to obtain the second original component character.

[0091] In one embodiment, the device further comprises a monitoring unit;

[0092] A monitoring unit is used to compare the character string corresponding to the character frame area with the standard character string in the corresponding character frame area of ​​the preset standard board. If the character string corresponding to the character frame area is the same as the standard character string in the corresponding character frame area of ​​the preset standard board, it is determined that the component patch corresponding to the character frame area is correct;

[0093] If the character string corresponding to the character frame area is different from the standard character string in the corresponding character frame area in the preset standard board, it is determined that the component patch corresponding to the character frame area is wrong.

[0094] In the above, the character recognition result is obtained by identifying the image data of the character frame area of ​​the corresponding position point in the circuit board image through the character recognition network model, and the first character of the character recognition result is compiled into the corresponding first original component character. According to the preset component character and the first original component character in the character recognition result, the character string corresponding to the character frame area is obtained. By adopting the above technical means, the unconventional character after the preset component character is rotated 180° can be recognized by the preset character recognition network model to obtain the corresponding first character. By compiling the first character into the corresponding first original component character, the problem of low accuracy of existing circuit board component character recognition can be avoided. According to the preset component character and the first original component character of the character recognition result, the character string of the component corresponding to the character frame area is obtained, thereby improving the accuracy of circuit board component character recognition.

[0095] The circuit board component character recognition device provided in the embodiment of the present application can be used to execute the circuit board component character recognition method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0096] The present application embodiment provides a circuit board component character recognition device, referring to Figure 6 The circuit board component character recognition device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The number of processors in the circuit board component character recognition device can be one or more, and the number of memories in the circuit board component character recognition device can be one or more. The processor, memory, communication module, input device and output device of the circuit board component character recognition device can be connected through a bus or other methods.

[0097] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the circuit board component character recognition method of any embodiment of the present application (for example, the image acquisition unit, character recognition unit, compilation unit and string generation unit in the circuit board component character recognition device). The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0098] The communication module 33 is used for data transmission.

[0099] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizes the above-mentioned circuit board component character recognition method.

[0100] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.

[0101] The circuit board component character recognition device provided above can be used to execute the circuit board component character recognition method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0102] An embodiment of the present application also provides a storage medium storing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute a circuit board component character recognition method. The circuit board component character recognition method includes: obtaining a circuit board image of the circuit board to be tested, and determining a character frame area corresponding to a position point of the circuit board image according to a preset division rule; inputting image data of the character frame area into a preset character recognition network model to obtain a character recognition result, the character recognition network model includes a first branch channel and a second branch channel, the first branch channel is used to output a classification result of a preset component character, and the second branch channel is used to output a classification result of a first character, the first character being an unconventional character obtained by rotating the preset component character by 180°; compiling the first character of the character recognition result into a corresponding first original component character; and obtaining a character string corresponding to the character frame area based on the preset component character and the first original component character in the character recognition result.

[0103] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0104] Of course, the computer executable instructions of a storage medium storing computer executable instructions provided in an embodiment of the present application are not limited to the above-mentioned circuit board component character recognition method, and can also execute related operations in the circuit board component character recognition method provided in any embodiment of the present application.

[0105] The circuit board component character recognition device, storage medium and circuit board component character recognition equipment provided in the above embodiments can execute the circuit board component character recognition method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the circuit board component character recognition method provided in any embodiment of the present application.

[0106] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A circuit board component character recognition method, characterized in that: include: Acquire a circuit board image of the circuit board to be tested, and determine a character frame area corresponding to a position point of the circuit board image according to a preset division rule; Inputting the image data of the character frame area into a preset character recognition network model to obtain a character recognition result, wherein the character recognition network model includes a first branch channel and a second branch channel, wherein the first branch channel is used to output a classification result of a preset component character, and the second branch channel is used to output a classification result of a first character, wherein the first character is an unconventional character obtained by rotating the preset component character by 180°; compiling a first character of the character recognition result into a corresponding first original component character; A character string corresponding to the character frame area is obtained according to the preset component characters and the first original component characters in the character recognition result.

2. The method according to claim 1, characterized in that The character recognition network model further includes a third branch channel, and the third branch channel is used to output a classification result of a second character, where the second character is an unrecognizable character; The obtaining, according to the preset component character and the first original component character in the character recognition result, a character string corresponding to the character frame area includes: Compiling the second character of the character recognition result into a preset identification character; A character string corresponding to the character frame area is obtained according to the preset component character, the preset identification character and the first original component character in the character recognition result.

3. The method according to claim 1, characterized in that The step of compiling the first character of the character recognition result into a corresponding first original component character comprises: According to the mapping relationship between the first character and the corresponding preset component character, the first character of the character recognition result is compiled into the corresponding preset component character to obtain the first original component character.

4. The method according to claim 3, characterized in that The step of compiling the first character of the character recognition result into a corresponding preset component character according to a mapping relationship between the first character and the corresponding preset component character to obtain the first original component character includes: Numbering the first branch channels according to a preset sequence to obtain a first number value; The second branch channels are numbered according to a preset sequence to obtain a second number value; According to the character mapping relationship between the first character and the corresponding preset component character, establishing a number mapping relationship between the second number value and the corresponding first number value; Determine the corresponding first number value according to the second number value corresponding to the first character of the character recognition result and the number mapping relationship; The first character of the character recognition result is compiled into a preset component character output by the first branch channel corresponding to the corresponding first number value to obtain the first original component character.

5. The method according to claim 1, characterized in that The obtaining, according to the preset component character and the first original component character in the character recognition result, a character string corresponding to the character frame area includes: If the character recognition results are all the first characters, the first original component characters obtained after compilation are subjected to position reversal processing to obtain a character string corresponding to the character frame area.

6. The method according to claim 1, characterized in that The preset component character includes a first preset component character and a second preset component character, wherein the first preset component character is a regular character obtained by rotating the preset component character by 180° and the second preset component character is a regular character obtained by rotating the preset component character by 180° and different from the preset component character; The obtaining, according to the preset component character and the first original component character in the character recognition result, a character string corresponding to the character frame area includes: If the character recognition result only includes the first preset component character and the first character, performing position reversal processing on the first preset component character and the first original component character to obtain a character string corresponding to the character frame area; If the character recognition result includes a second preset component character and a first character, compiling the second preset component character of the character recognition result into a corresponding second original component character; The first preset component character, the first original component character and the second original component character of the character recognition result are subjected to position reversal processing to obtain a character string corresponding to the character frame area.

7. The method according to claim 6, characterized in that If the character recognition result includes the second preset component character and the first character, compiling the second preset component character of the character recognition result into a corresponding second original component character includes: If the character recognition result includes the second preset character and the first character, the second preset component character of the character recognition result is compiled into the corresponding preset component character according to the mapping relationship between the second preset component character and the corresponding preset component character to obtain a second original component character.

8. The method according to claim 1, characterized in that After obtaining the character string corresponding to the character frame area according to the preset component character and the first original component character in the character recognition result, the method includes: Compare the character string corresponding to the character frame area with the standard character string in the corresponding character frame area of ​​the preset standard board, and if the character string corresponding to the character frame area is the same as the standard character string in the corresponding character frame area of ​​the preset standard board, then determine that the component patch corresponding to the character frame area is correct; If the character string corresponding to the character frame area is different from the standard character string in the corresponding character frame area in the preset standard board, it is determined that the component patch corresponding to the character frame area is wrong.

9. A circuit board component character recognition device, characterized in that: include: An image acquisition unit, used to acquire a circuit board image of the circuit board to be tested, and determine a character frame area corresponding to a position point of the circuit board image according to a preset division rule; A character recognition unit, used for inputting the image data of the character frame area into a preset character recognition network model to obtain a character recognition result, wherein the character recognition network model includes a first branch channel and a second branch channel, wherein the first branch channel is used for outputting a classification result of a preset element character, and the second branch channel is used for outputting a classification result of a first character, wherein the first character is an unconventional character obtained by rotating the preset element character by 180°; A compiling unit, used for compiling a first character of the character recognition result into a corresponding first original component character; The character string generating unit is used to obtain the character string corresponding to the character frame area according to the preset component characters and the first original component characters in the character recognition result.

10. A circuit board component character recognition device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to perform the method according to any one of claims 1 to 8 when executed by a processor.