Character recognition model training method, character recognition model-based character recognition method, product recognition method, key recognition method and assembly equipment

By training a convolutional neural network model, adjusting its width and depth parameters, and combining image enhancement and positioning technologies, the problem of inaccurate laser character recognition was solved, achieving accurate matching of button materials and shell colors, thus improving product quality.

CN120853149APending Publication Date: 2025-10-28HONGFUJIN PRECISION ELECTRONICS (ZHENGZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410437459.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-11
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

In the manufacturing process of electronic products, inaccurate recognition of laser characters can lead to a mismatch between the button material and the casing color, affecting the product appearance and reducing yield.

Method used

By training a convolutional neural network model using character images as the training set, and adjusting the model's width and depth parameters, the model's recognition ability is enhanced. Combined with image enhancement and localization techniques, the accuracy of character recognition is ensured.

Benefits of technology

It improves the accuracy and speed of character recognition, ensures that the button material matches the shell color, and improves product yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120853149A_ABST
    Figure CN120853149A_ABST
Patent Text Reader

Abstract

The invention provides a character recognition model training method, a character recognition model-based character recognition method, a product recognition method, a key recognition method and assembly equipment. The character recognition method comprises the steps of obtaining a to-be-recognized image; inputting the to-be-recognized image into the character recognition model to obtain prediction probabilities of various characters; and determining a target character corresponding to the to-be-recognized image from the plurality of characters based on the prediction probability. By means of the method, the character recognition accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent manufacturing and involves artificial intelligence technology, particularly a character recognition model training method, a character recognition method based on the character recognition model, a product recognition method, a button recognition method, and assembly equipment. Background Technology

[0002] In the manufacturing process, such as in the production of electronic products like mobile phones, the aesthetics and quality of the product are paramount. To ensure the product's appearance and performance, it is often necessary to assemble button materials with matching colors to the casing. However, due to various factors, the laser characters used to indicate colors in the button materials may experience various problems, such as blurring, obstruction, deformation, and missing parts. These problems will make it difficult to accurately identify the laser characters.

[0003] If the laser characters cannot be accurately identified, it will cause a color mismatch between the button material and the housing, which will affect the product appearance, reduce the product yield, and lead to an increase in defective products. Summary of the Invention

[0004] In view of the above, it is necessary to provide a character recognition model training method, a character recognition method based on the character recognition model, a product recognition method, a button recognition method, and an assembly equipment, which can solve the technical problem that the color mismatch between the button material and the shell is caused by the difficulty in accurately recognizing laser characters, thereby affecting the product appearance and reducing the product yield.

[0005] On the one hand, this application provides a character recognition model training method, which includes: acquiring a training set and model parameters, wherein the training set includes multiple character images, the model parameters include model width parameters and model depth parameters, configuring a convolutional neural network according to the model width parameters and the model depth parameters, and training the configured convolutional neural network according to the training set to obtain the character recognition model.

[0006] In some embodiments of this application, obtaining the training set includes: performing generalization processing on each character image to obtain a generalized image corresponding to each character image, and constructing the training set based on the multiple character images and the generalized images corresponding to each character image.

[0007] In some embodiments of this application, obtaining model parameters includes: obtaining a first preset parameter corresponding to the model width parameter and a second preset parameter corresponding to the model depth parameter; generating a first parameter interval corresponding to the first preset parameter and a second parameter interval corresponding to the second preset parameter; generating a first search list based on the first parameter interval and a second search list based on the second parameter interval; combining multiple first parameters in the first search list and multiple second parameters in the second search list to obtain multiple parameter combinations; configuring the convolutional neural network according to each parameter combination; calculating the model accuracy corresponding to each parameter combination based on the training set and the configured convolutional neural network; and selecting a set of parameter combinations as the model parameters from the multiple parameter combinations based on the multiple model accuracies.

[0008] Through the above implementation methods, configuring the convolutional neural network (CNN) according to the model width and depth parameters allows control over the CNN's width and depth, thereby reducing computation time and improving accuracy during training. Training the CNN using character images as a training set enables it to learn the features of various characters. By learning from a large number of character images in the training set, the CNN gradually improves its character recognition ability, allowing the trained character recognition model to accurately and quickly identify characters in input images and convert them into readable text information.

[0009] On the other hand, this application provides a character recognition method based on a character recognition model, wherein the character recognition model is obtained according to the character recognition model training method, and the character recognition method includes: acquiring an image to be recognized, inputting the image to be recognized into the character recognition model to obtain the predicted probabilities of multiple characters, and determining the target character corresponding to the image to be recognized from the multiple characters based on the predicted probabilities.

[0010] In some embodiments of this application, the character recognition method further includes: obtaining multiple recognition probabilities corresponding to each character based on the character recognition model; determining a first threshold corresponding to each character based on all recognition probabilities corresponding to each character; determining a second threshold based on the first threshold corresponding to each character; and calculating a target threshold based on the second threshold and a first preset value.

[0011] In some embodiments of this application, determining the target character corresponding to the image to be recognized from the plurality of characters based on the predicted probability includes any one or a combination of the following methods: Method 1: Determine the character corresponding to the predicted probability greater than the target threshold as the first candidate character, and determine the first candidate character corresponding to the predicted probability greater than the corresponding first threshold as the second candidate character; if there are multiple second candidate characters, determine the target character from the multiple second candidate characters based on the difference between the predicted probability of each second candidate character and the corresponding first threshold; if there is a single second candidate character, determine the second candidate character as the target character; Method 2: Determine the largest predicted probability from the predicted probabilities of the multiple first candidate characters. If the maximum predicted probability is greater than the second preset value, the first candidate character corresponding to the maximum predicted probability is determined as the target character. Method 3: Classify each first candidate character using a preset similar character classification model to obtain the classification probability of each first candidate character belonging to a preset similar character, determine the maximum classification probability, and if the maximum classification probability is greater than the third preset value, determine the first candidate character corresponding to the maximum classification probability as the target character. Method 4: Extract the character features of each first candidate character, calculate the matching degree between each first candidate character and the character corresponding to the preset feature template based on the character features and the preset feature template, and select the target character from multiple first candidate characters based on multiple matching degrees.

[0012] In some embodiments of this application, the step of acquiring the image to be identified includes: controlling the shooting device to take a picture according to preset shooting parameters to obtain an initial image; performing image enhancement on the initial image according to preset image enhancement parameters to obtain an enhanced image; determining the region of interest in the enhanced image according to preset positioning parameters; and determining the region of interest as the image to be identified.

[0013] In some embodiments of this application, the generation of shooting parameters includes: obtaining initial shooting parameters; determining a threshold interval corresponding to the initial shooting parameters based on the initial shooting parameters and a fourth preset value; performing a parameter search process on the threshold interval to obtain optimized parameters, including: equally dividing the threshold interval to obtain multiple equally divided parameters corresponding to the initial shooting parameters; selecting the optimized parameters from the multiple equally divided parameters; generating an updated threshold interval based on the optimized parameters and the spacing between the multiple equally divided parameters; and repeatedly performing the parameter search process based on the updated threshold interval until the number of searches reaches a preset number, at which point the parameter search stops; and determining the optimized parameters obtained after the preset number of searches as the shooting parameters.

[0014] In the above technical solution, because the character recognition model learns the features of multiple characters, it can accurately and quickly identify characters in the image to be recognized, thus ensuring the accuracy of the predicted probability. Determining the target character from multiple characters based on the predicted probability ensures the accuracy of the target character identification.

[0015] On the other hand, this application provides a product identification method, which includes: obtaining a preset character, obtaining a product image of the product, calling the character recognition method to identify the product image and obtain an identification character, and determining whether the product corresponding to the product image meets the production requirements through the identification character and the preset character.

[0016] In the above implementation scheme, the characters in the product image are identified by a character recognition model. Because the character recognition model learns the features of various characters, it can accurately identify the product image, thus ensuring the accuracy of the identified characters. By accurately identifying the characters and using preset characters, it is possible to accurately determine whether the product meets production requirements.

[0017] On the other hand, this application provides a button recognition method, which includes: recognizing the identification code of the device housing to obtain a first color character corresponding to the device housing; acquiring an image of the button material; calling the character recognition method to recognize the image of the button material to obtain a second color character; and determining whether the button material meets the production requirements based on the first color character and the second color character.

[0018] In the above implementation scheme, the identifiable characters in the image of the button material are obtained through a character recognition model. Since the character recognition model learns the features of multiple characters, it can accurately identify the image of the button material, thus ensuring the accuracy of the first color character. Accurate first and second color characters allow for precise determination of whether the button material meets production requirements.

[0019] On the other hand, this application provides an assembly device, the assembly device comprising: a memory storing at least one instruction; and a processor executing the at least one instruction to implement the character recognition model training method, or the character recognition method, or the product recognition method, or the key recognition method. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the assembly equipment provided in one embodiment of this application.

[0021] Figure 2 This is a flowchart of a character recognition model training method provided in an embodiment of this application.

[0022] Figure 3 This is a flowchart of a method for generating model parameters provided in an embodiment of this application.

[0023] Figure 4 This is a flowchart of a method for generating model width and model depth parameters using an adaptive algorithm, provided in an embodiment of this application.

[0024] Figure 5 This is a flowchart of a method for generating shooting parameters using a parameter adaptive algorithm, provided in an embodiment of this application.

[0025] Figure 6 This is a flowchart of a product identification method provided in an embodiment of this application.

[0026] Figure 7 This is a flowchart of a button recognition method provided in an embodiment of this application.

[0027] Figure 8 This is a schematic diagram of an image of a button material provided in an embodiment of this application. Detailed Implementation

[0028] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.

[0029] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Unless otherwise specified, the following embodiments and features described herein can be combined with each other.

[0030] The character recognition model training method, character recognition method based on the character recognition model, product recognition method, and key recognition method provided in the embodiments of this application can be applied to one or more assembly devices.

[0031] In other embodiments of this application, the character recognition model training method and the character recognition method based on the character recognition model can also be applied to electronic devices such as mobile phones, tablets and computers. This application does not limit the electronic devices.

[0032] To clearly illustrate the character recognition model training method, character recognition method based on the character recognition model, product recognition method, and key recognition method provided in the embodiments of this application, the following description will use assembly equipment as an example.

[0033] like Figure 1 The diagram shown is a structural schematic of an assembly device provided in one embodiment of this application. An assembly device is used to assemble or group the various components of a product in a predetermined manner. This application does not impose any limitations on the specific type of assembly device. For example, when assembling button materials, the assembly device can be a button installation device.

[0034] The assembly equipment 10 can have control capabilities, enabling it to control devices such as robotic arms.

[0035] like Figure 1 As shown, the assembly device 10 may include an image acquisition module 101, a memory 102, a processor 103, and a bus 104. The processor 103 is coupled to the image acquisition module 101 and the memory 102 via the bus 104.

[0036] The image acquisition module 101 consists of a camera, a light source, a lens, an aperture, etc. The camera may include a charge-coupled device (CCD) module. A CCD is a semiconductor device that converts optical images into digital signals. For example, during the assembly of buttons, the image acquisition module is used to capture images of the button materials. In some embodiments, to save costs, the camera may be a two-dimensional (2D) camera that captures and displays two-dimensional images.

[0037] The camera in the image acquisition module 101, through a CCD module or other image sensor, can receive and convert the light signals from the buttons into digital image signals. A light source provides appropriate illumination to ensure image clarity. The lens is used to focus the light, ensuring the image is clearly displayed on the camera.

[0038] Memory 102 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 103, and can be used to store executable programs (e.g., machine instructions) of other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0039] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 103. Non-volatile memory can include disk storage devices and flash memory. For example, flash memory can be Nand Flash.

[0040] The memory 102 is used to store one or more computer programs. These one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions that, when executed by the processor 103, can implement a character recognition model training method, a character recognition method based on a character recognition model, a product recognition method, and a key recognition method, all of which can be executed on the assembly equipment 10. For example, in the key recognition method, the computer program can perform image enhancement and automatic optical detection and positioning operations on the image of the key material captured by the image acquisition module 101, and extract key information such as color characters.

[0041] In other embodiments, such as Figure 1 The assembly equipment 10 shown also includes an external memory interface for connecting to an external memory to expand the storage capacity of the assembly equipment 10.

[0042] Processor 103 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), programmable logic controllers (PLCs), microcontroller units (MCUs), video codecs, digital signal processors (DSPs), and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0043] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute computer programs stored in the memory 102 to implement the character recognition model training method, the character recognition method based on the character recognition model, the product recognition method, and the key recognition method described above.

[0044] The bus 104 can be used to connect at least the image acquisition module 101, memory 102 and processor 103 in the assembly equipment 10, and to enable communication between the connected components.

[0045] In other embodiments of this application, the assembly equipment 10 may also include a tray, a robotic arm, a fixture, a positioning device, a communication module, and an input / output interface, etc. The structure illustrated in the embodiments of this application does not constitute a specific limitation on the assembly equipment 10.

[0046] In other embodiments of this application, the assembly device 10 may include more or fewer components than those illustrated, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of both.

[0047] like Figure 2 The diagram shown is a flowchart of a character recognition model training method provided in one embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The character recognition model training method is applied to assembly equipment, for example... Figure 1 The assembly equipment 10 shown.

[0048] S11, obtain the training set and model parameters. The training set includes multiple character images, and the model parameters include the model width parameter and the model depth parameter.

[0049] In some embodiments of this application, the character image can be an image of a laser character (laser lithography), and the character images in the training set can correspond to various different states. For example, the training set includes images of laser characters with different brightness, contrast, laser parameters, angles, background appearances, scales, and sharpness. The laser character can be a letter, a number, or other symbols or graphics; this application does not impose any limitations on this.

[0050] In addition to character images, the training set also includes one or more generalized images corresponding to each character image. The assembly device performs generalization processing on each character image to obtain a generalized image corresponding to each character image, and constructs the training set based on the multiple character images and the generalized images corresponding to each character image. The generalization processing includes, but is not limited to: occlusion, adding interference, adjusting exposure limits, and handling missing characters. The number of character images can be customized, and this application does not impose any restrictions on this. For example, if there are 20,000 character images, performing generalization processing on each character image can obtain a generalized image corresponding to each character image, totaling 20,000 generalized images. The training set consists of 20,000 character images and 20,000 generalized images.

[0051] For example, assembly equipment can use one or more of the following to mask character images: solid color, mixed color blocks, sparse multicolored cloud blocks, multicolored silk mesh, multicolored dot masking, and semi-transparent color film dots, to obtain a generalized image corresponding to the character image. The area and position of the masking can be customized or randomized.

[0052] In some embodiments, the assembly equipment may identify letters, numbers, or non-character graphics similar to the laser characters and interfere with the character images of the similar laser characters based on images generated from the letters, numbers, or non-character graphics similar to the laser characters.

[0053] For example, the assembly equipment can interfere with the character image of similar laser characters by generating images based on letters and numbers similar to the laser characters. This includes: the assembly equipment can generate an image by adding a vertical line to the number 3 or adding a vertical line to the number 8 as a generalized image corresponding to the character image of the laser character B, and use it to interfere with the character image of the laser character B; it can generate an image by adding a diagonal line to the letter P as a generalized image corresponding to the character image of the laser character R, and use it to interfere with the character image of the laser character R; it can generate an image by adding a diagonal line to the letter O as a generalized image corresponding to the character image of the laser character Q, and use it to interfere with the character image of the laser character Q, etc.

[0054] For example, the assembly equipment can interfere with the character image of the similar laser character by generating an image based on a non-character graphic similar to the laser character. This includes: the assembly equipment can use an image of a solid circle as a generalized image of the laser character 'O' to interfere with the character image of the laser character 'O'; and use an image of a solid rectangle as a generalized image of the laser character 'I' to interfere with the character image of the laser character 'I'.

[0055] In some embodiments, the assembly equipment can perform exposure limit processing on the character image to increase the overall brightness of the character image, causing the outline of the laser character in the character image after exposure limit processing to become blurred due to excessive brightness; the assembly equipment can also perform exposure limit processing on the character image to reduce the brightness of the character image, causing the outline of the laser character in the character image after exposure limit processing to become blurred due to excessive brightness (the character image is too dark).

[0056] For example, the assembly equipment can select at least one region in a character image, determine the pixel values ​​of pixels adjacent to the at least one region, and replace the pixel values ​​of all pixels within that region with the pixel values ​​of the adjacent pixels, thereby simulating situations where some information in the image is missing or damaged. The selection of the region can be random or preset; this application does not limit this. The shape of the region can be rectangular or other shapes; this application does not limit this. Adjacent pixels can be randomly selected or specified by the user.

[0057] In some embodiments of this application, the model width parameter (width_multiple) refers to the scaling factor for the number of channels in a convolutional neural network (CNN), used to control the number of channels or feature maps in the CNN, thereby adjusting the width of the CNN. For example, assuming a layer in the CNN has 64 channels, when the model width parameter is set to 1.5, the number of channels in this layer will increase to 96 = 64 * 1.5. The model depth parameter (depth_multiple) refers to the scaling factor for the number of layers in a repeating module in the CNN, used to control the number of layers in a repeating module, thereby adjusting the depth of the CNN. Repeating modules include one or more combinations of convolutional layers, pooling layers, residual blocks, etc. For example, assuming a repeating module in the CNN includes 5 convolutional layers, when the model depth parameter is set to 0.6, the number of convolutional layers in this repeating module will decrease to 3 (3 = 5 * 0.6). The model width and model depth parameters are determined by preset parameters and the model accuracy of the convolutional neural network on the training set. The convolutional neural network includes, but is not limited to, YOLOv5, EfficientDet, and Faster R-CNN. This application does not limit the convolutional neural network.

[0058] In this embodiment, by applying occlusion, interference, exposure limits, and missing image processing to the character images, not only can the number of images in the training set be increased, but the difficulty of recognition on the training set by the convolutional neural network (CNN) can also be enhanced, as well as the recognition ability of the CNN on the training set. Since the model width and depth parameters are determined by preset parameters and the model accuracy of the CNN on the training set, the accuracy and optimization of the model width and depth parameters can be ensured. Furthermore, by performing various generalization processing on the character images, various anomalies in large-scale industrial manufacturing environments can be comprehensively simulated, thereby improving the scene adaptability and recognition accuracy of the character recognition model trained on the training set.

[0059] S12, Configure the convolutional neural network according to the model width parameter and the model depth parameter.

[0060] In some embodiments of this application, the convolutional neural network includes an initial width parameter corresponding to the model width parameter and an initial depth parameter corresponding to the model depth parameter. The assembly device can replace the corresponding initial width parameter with the model width parameter and replace the corresponding initial depth parameter with the model depth parameter to complete the configuration of the convolutional neural network.

[0061] The final structure of a convolutional neural network (CNN) is determined by its width and depth. If the CNN structure is too wide or too deep, it will increase the computation time; if it is too narrow or too shallow, it will affect the computational accuracy. In this embodiment, by configuring the CNN with accurate model width and depth parameters, the width and depth of the CNN can be controlled, thereby reducing computation time and improving computational accuracy.

[0062] S13, Train the configured convolutional neural network based on the training set to obtain the character recognition model.

[0063] In some embodiments of this application, the assembly device can input all character images and all generalized images in the training set as training images into the configured convolutional neural network to obtain a predicted label vector corresponding to each training image. Each vector value in the predicted label vector corresponding to each training image represents the probability that the training image belongs to a laser character as predicted by the convolutional neural network. The assembly device uses the cross-entropy loss function to calculate the loss value of the convolutional neural network based on the character label vector corresponding to the character label of each training image and the corresponding predicted label vector. Each vector value in the corresponding character label vector of each training image represents the probability that the training image actually belongs to a laser character. When the loss value is within a preset range, training is stopped, and the trained convolutional neural network is determined as the character recognition model. The preset range can be customized, and this application does not limit it. For example, the preset range can be 0.1-0.2.

[0064] In some embodiments of this application, if the convolutional neural network includes image enhancement parameters, when the images in the training set have already undergone image enhancement processing, the image enhancement parameters in the convolutional neural network can be set to zero, thereby disabling the image enhancement function of the convolutional neural network.

[0065] In some embodiments of this application, after training the character recognition model, model quantization techniques can be used to quantize the model, thereby reducing its size and accelerating its computation. To ensure cross-platform compatibility, the character recognition model can be converted to the Open Neural Network Exchange (ONNX) format. Since the character recognition model can be deployed on edge devices (such as smart cameras and sensors), to improve its computational performance on these devices, the OPENVINO (Open Visual Inference & Neural Network Optimization) toolkit can be used to deploy the ONNX-format character recognition model for inference and computation on edge devices, ensuring that its computational efficiency meets practical requirements.

[0066] Through the above implementation methods, configuring the convolutional neural network (CNN) according to the model width and depth parameters allows control over the CNN's width and depth, thereby reducing computation time and improving accuracy during training. Training the CNN using character images as a training set enables it to learn the features of various characters. By learning from a large number of character images in the training set, the CNN gradually improves its character recognition ability, allowing the trained character recognition model to accurately and quickly identify characters in input images and convert them into readable text information.

[0067] In some embodiments of this application, the assembly equipment can adaptively adjust the first preset parameter corresponding to the model width parameter and the second preset parameter corresponding to the model depth parameter according to a parameter adaptive algorithm to obtain the model width parameter and the model depth parameter. The parameter adaptive algorithm is a type of algorithm that can automatically adjust the network parameters, learning rate, and / or network topology of the model according to different sample distributions. The basic principle of the parameter adaptive algorithm is to adjust the model's network parameters, learning rate, and / or network topology in real time through preset rules and / or algorithms to minimize errors (e.g., mean squared error, root mean square error, etc.) or achieve optimal equilibrium. Figure 3 The diagram shown is a flowchart of a method for generating model width and model depth parameters using an adaptive algorithm according to an embodiment of this application, including the following steps:

[0068] S111, obtain the first preset parameter corresponding to the model width parameter and the second preset parameter corresponding to the model depth parameter.

[0069] In some embodiments of this application, the first preset parameter and the second preset parameter can be customized, and this application does not impose any restrictions on them. For example, the first preset parameter can be 0.6, and the second preset parameter can be 0.4.

[0070] In other embodiments of this application, the first preset parameter can be the default initial model width in the convolutional neural network, and the second preset parameter can be the default initial model depth in the convolutional neural network.

[0071] S112, generate the first parameter interval corresponding to the first preset parameter and the second parameter interval corresponding to the second preset parameter.

[0072] In some embodiments of this application, the first parameter range includes an upper limit parameter value and a lower limit parameter value. The assembly equipment can calculate a first product between a first preset parameter and a preset floating ratio, determine the sum of the first preset parameter and the first product as the upper limit parameter value, and determine the difference between the first preset parameter and the first product as the lower limit parameter value. The preset floating ratio can be customized, and this application does not impose any restrictions on it. For example, the preset floating ratio can be 0.5.

[0073] The method for generating the second parameter interval can be found in the description of the method for generating the first parameter interval, and will not be repeated in this application.

[0074] In this embodiment, the first parameter range and the second parameter range are calculated according to a preset floating ratio, which can expand the first parameter range and the second parameter range.

[0075] S113, Generate a first search list based on the first parameter range, and generate a second search list based on the second parameter range.

[0076] In some embodiments of this application, the first search list includes multiple first parameters, and the second search list includes multiple second parameters. The assembly equipment can divide the first parameter interval into multiple equal division points, and determine the upper limit parameter value, the lower limit parameter value, and the multiple equal division points as the first parameters.

[0077] The method for generating the second search list can be found in the description of the method for generating the first search list, and will not be repeated in this application.

[0078] S114, combine multiple first parameters in the first search list and multiple second parameters in the second search list to obtain multiple parameter combinations.

[0079] In some embodiments of this application, each parameter combination may include a first parameter and a second parameter. By combining each first parameter with a second parameter in pairs, multiple parameter combinations can be obtained.

[0080] In this embodiment, since the first preset parameter corresponds to the model width parameter and the second preset parameter corresponds to the model depth parameter, the first parameter corresponds to the model width parameter and the second parameter corresponds to the model depth parameter.

[0081] S115 configures the convolutional neural network according to each parameter combination.

[0082] In some embodiments of this application, the method for configuring the convolutional neural network by each parameter combination can be referred to the description in step S12 above, and will not be repeated in this application.

[0083] S116, Based on the training set and the configured convolutional neural network, calculate the model accuracy corresponding to each parameter combination.

[0084] In some embodiments of this application, model accuracy can be determined using different evaluation metrics, including but not limited to: mean squared error, root mean square error, accuracy, loss value, receiver operating characteristic curve (ROC) and area under the curve (AUC).

[0085] For example, the assembly equipment can input the training set into the convolutional neural network configured with each set of parameters to obtain the prediction results, and calculate the prediction accuracy of the convolutional neural network on the training set based on the comparison results of each prediction result with the corresponding character labels in the training set. The higher the prediction accuracy, the higher the model precision.

[0086] S117, Select a set of parameter combinations from multiple parameter combinations based on the accuracy of multiple models as model parameters.

[0087] In some embodiments of this application, the assembly equipment can determine the first parameter in the parameter combination corresponding to the highest model accuracy as the model width parameter in the model parameters, and determine the second parameter in the parameter combination corresponding to the highest model accuracy as the model depth parameter in the model parameters.

[0088] For example, through multiple experiments, it was found that the model accuracy of the convolutional neural network is relatively good when the first parameter is 0.73 and the second parameter is 0.65. Therefore, 0.73 can be determined as the model width parameter and 0.65 as the model depth parameter.

[0089] In this embodiment, the model width parameter and model depth parameter are determined by comparing the model accuracy corresponding to each parameter combination, which can ensure the accuracy of the model width parameter and model depth parameter.

[0090] In other embodiments of this application, after selecting the parameter combination corresponding to the highest model accuracy, steps S111-S117 can be executed according to the selected parameter combination until the selected parameter combination meets a preset condition. The preset condition can be customized, and this application does not impose any restrictions on it. For example, the preset condition can be that the model accuracy corresponding to the selected parameter combination reaches a preset configuration value.

[0091] In this embodiment, by selecting multiple times, the accuracy of the model width and model depth parameters can be ensured.

[0092] In some embodiments of this application, after training a character recognition model, the trained character recognition model can be used to perform character recognition on the image to be recognized. For example... Figure 4 The diagram shown is a flowchart of a character recognition method based on a character recognition model according to an embodiment of this application. The order of the steps in this flowchart can be adjusted according to different needs, and some steps can be omitted. The character recognition method is applied to assembly equipment, for example... Figure 1 The assembly equipment 10 shown.

[0093] S21, Obtain the image to be recognized.

[0094] In some embodiments of this application, the assembly equipment acquires the image to be identified by: the assembly equipment controlling the shooting equipment to take a picture according to preset shooting parameters to obtain an initial image, performing image enhancement on the initial image according to preset image enhancement parameters to obtain an enhanced image, determining the region of interest in the enhanced image according to preset positioning parameters, and determining the region of interest as the image to be identified.

[0095] The shooting parameters can include parameters such as the signal-to-noise ratio, exposure time, spectral response rate, focal length, aperture, and depth of field of the shooting device. The shooting device can be a camera, webcam, or other device with shooting capabilities; this application does not limit the shooting device. The shooting device can be integrated into the assembly equipment or be an external device of the assembly equipment; this application does not limit this either. The image enhancement parameters can include parameters such as contrast, brightness, and image noise filtering. The positioning parameters can be parameters of the positioning algorithm, wherein the positioning algorithm can be an Automatic Optic Inspection (AOI) algorithm. When using the AOI algorithm for positioning, the region of interest is also called the AOI region.

[0096] When determining the region of interest (ROI) of an enhanced image based on localization parameters, the area of ​​the ROI can be configured to ensure that the recognized characters are completely within the ROI. For example, the area of ​​the ROI can be configured to be three times the size of the recognized character region.

[0097] In some embodiments of this application, the shooting parameters can be obtained by optimizing the initial shooting parameters using a parameter adaptive algorithm, the image enhancement parameters can be obtained by optimizing the initial image enhancement parameters using a parameter adaptive algorithm, and the positioning parameters can be obtained by optimizing the initial positioning parameters using a parameter adaptive algorithm. Since the process of optimizing the initial shooting parameters, initial image enhancement parameters, and initial positioning parameters using a parameter adaptive algorithm is basically the same, the following description will only use the parameter adaptive algorithm as an example. The method of optimizing the initial image enhancement parameters and initial positioning parameters using a parameter adaptive algorithm can be found in the description of optimizing the initial shooting parameters using a parameter adaptive algorithm.

[0098] In this embodiment, the process of optimizing the initial shooting parameters, initial image enhancement parameters, and initial positioning parameters using a parameter adaptive algorithm can be a continuous process.

[0099] In some embodiments of this application, the initial shooting parameters are selected from multiple sets of shooting parameters based on the image quality of the first test images corresponding to each set of shooting parameters. Each set of shooting parameters is used to capture different types of laser characters. Each set of shooting parameters includes parameters such as signal-to-noise ratio, exposure time, spectral responsivity, focal length, aperture, and depth of field. The set of shooting parameters with the best image quality can be selected as the initial shooting parameters. Image quality can be determined by factors such as the sharpness of the first test image.

[0100] In some embodiments of this application, the initial positioning parameters are selected from multiple sets of positioning parameters based on the positioning effect of the second test image. The second test image is obtained by enhancing the third test image using multiple sets of image enhancement parameters. The third test image is obtained by capturing the laser character using shooting parameters optimized by a parameter adaptive algorithm or the initial shooting parameters. The initial positioning parameters and the initial image enhancement parameters can be selected simultaneously based on the positioning effect. Specifically, the set of positioning parameters corresponding to the best positioning effect can be selected as the initial positioning parameters, and the set of image enhancement parameters corresponding to the best positioning effect can be selected as the initial image enhancement parameters. By locating the second test image using each set of positioning parameters, the region of interest corresponding to that set of positioning parameters can be obtained. The positioning effect of each set of positioning parameters is determined based on whether the corresponding region of interest includes the laser character.

[0101] In this embodiment, the initial shooting parameters, initial image enhancement parameters, and initial positioning parameters are optimized using a parameter adaptive algorithm, ensuring their effectiveness and accuracy, thereby guaranteeing the image quality of the image to be recognized. Positioning using an AOI (Automated Optical Interference) algorithm can initially determine the location of the laser characters and reduce the area of ​​the image to be recognized, thus improving recognition speed and accuracy.

[0102] S22, input the image to be recognized into the character recognition model to obtain the predicted probabilities of various characters.

[0103] In some embodiments of this application, the character recognition model can be obtained through training, and the training of the character recognition model can refer to... Figure 2-Figure 3 Detailed explanation.

[0104] In this embodiment, the method of using a character recognition model to output the predicted probability of multiple characters for the image to be recognized can refer to the calculation method of related models, and will not be described in detail here.

[0105] S23, determine the target character corresponding to the image to be recognized from multiple characters based on the predicted probability.

[0106] In some embodiments of this application, before determining the target character corresponding to the image to be recognized from multiple characters based on the predicted probability, the character recognition method further includes: the assembly device obtaining multiple recognition probabilities corresponding to each character based on the character recognition model, determining a first threshold corresponding to each character based on all the recognition probabilities corresponding to each character, the assembly device determining a second threshold based on the first threshold corresponding to each character, and calculating a target threshold according to the second threshold and a first preset value.

[0107] The methods for determining the first threshold for each character and the methods for determining the second threshold can be customized, and this application does not impose any restrictions on them. For example, the assembly equipment can determine the minimum recognition probability among all recognition probabilities for each character as the first threshold for each character, and determine the minimum first threshold among all first thresholds as the second threshold. The first preset value can be customized, and this application does not impose any restrictions on it. For example, the first preset value can be 0.05. The method for calculating the target threshold based on the second threshold and the first preset value can be customized, and this application does not impose any restrictions on it. For example, the assembly equipment can determine the difference between the second threshold and the first preset value as the target threshold.

[0108] In some embodiments of this application, the assembly equipment determines the target character corresponding to the image to be recognized from a variety of characters based on predicted probabilities, including any one or a combination of the following methods:

[0109] Method 1: The assembly equipment determines the character with a predicted probability greater than the target threshold as the first candidate character, and determines the first candidate character with a predicted probability greater than the corresponding first threshold as the second candidate character; if there are multiple second candidate characters, the target character is determined from the multiple second candidate characters based on the difference between the predicted probability of each second candidate character and the corresponding first threshold; if there is a single second candidate character, the second candidate character is determined as the target character.

[0110] Among them, the assembly equipment can determine the second candidate character corresponding to the prediction probability with the largest difference from the corresponding first threshold as the target character.

[0111] Method 2: The assembly equipment determines the highest prediction probability from multiple first candidate characters. If the highest prediction probability is greater than a second preset value, the first candidate character corresponding to the highest prediction probability is determined as the target character. The second preset value can be customized, and this application does not impose any restrictions on it. For example, the second preset value can be 0.63.

[0112] Method 3: Each first candidate character is classified using a preset similar character classification model to obtain the classification probability of each first candidate character belonging to a preset similar character set. The maximum classification probability is determined. If the maximum classification probability is greater than a third preset value, the first candidate character corresponding to the maximum classification probability is determined as the target character. The similar character classification model can be obtained by training a convolutional neural network with multiple classes of similar characters. Each class of similar characters includes multiple characters similar in shape, structure, stroke order, etc. For example, in multiple classes of similar characters, 8, B, and 3 can be grouped into one class; A, V, and v into another; z, Z, and 2 into another; and 0, o, O, C, c, Q, and D into yet another. The third preset value can be customized, and this application does not impose any restrictions on it. For example, the third preset value can be 0.9.

[0113] Method 4: Extract the character features of each first candidate character, calculate the matching degree between each first candidate character and the character corresponding to the preset feature template based on the character features and the preset feature template, and select the target character from multiple first candidate characters based on multiple matching degrees.

[0114] The character features may include the character outline size, line length and width, line curvature, local area size, corner angle, etc. The preset feature template includes features corresponding to each character feature. The assembly equipment can calculate the matching degree (similarity) between each character feature and the corresponding feature in the preset feature template. Based on the matching degree of all character features, the total matching degree between each first candidate character and the preset feature template is calculated, and the first candidate character with the highest total matching degree is determined as the target character.

[0115] In this embodiment, the minimum recognition probability among all recognition probabilities for each character is determined as the first threshold for each character. The smallest first threshold among all first thresholds is determined as the second threshold, and the difference between the second threshold and a first preset value is determined as the target threshold. This improves the selection probability of the target character. By determining the target character corresponding to the image to be recognized from multiple characters using multiple methods, the accuracy of the target character can be ensured.

[0116] In other embodiments of this application, the assembly device can also determine the target character corresponding to the image to be recognized from multiple characters based on other methods. For example, when there are restrictions on the value range of the character at a specified position, the assembly device determines the target character from multiple characters based on the restrictions; or, when the size of the character is determined, the assembly device determines the target character from multiple characters based on the size of the region of interest of each character; or, when the position of the character is determined, the assembly device can locate the position of each character based on a positioning algorithm and determine the target character from multiple characters based on the determined position and the located position.

[0117] In the above technical solution, because the character recognition model learns the features of multiple characters, it can accurately and quickly identify characters in the image to be recognized, thus ensuring the accuracy of the predicted probability. Determining the target character from multiple characters based on the predicted probability ensures the accuracy of the target character identification.

[0118] In some embodiments of this application, such as Figure 5 The diagram shown is a flowchart of a method for generating shooting parameters using a parameter adaptive algorithm according to an embodiment of this application, including the following steps:

[0119] S211, obtain initial shooting parameters.

[0120] In some embodiments of this application, the initial shooting parameters correspond to the shooting parameters. When the shooting parameters are parameters such as the signal-to-noise ratio, exposure time, spectral response rate, focal length, aperture, and depth of field of the shooting device, the initial shooting parameters can be parameters such as the initial signal-to-noise ratio, initial exposure time, initial spectral response rate, initial focal length, initial aperture, and initial depth of field of the shooting device.

[0121] S212, based on the initial shooting parameters and the fourth preset value, determine the threshold range corresponding to the initial shooting parameters.

[0122] In some embodiments of this application, the fourth preset value can be customized, and this application does not impose any restrictions on it. For example, the fourth preset value can be 0.5. The threshold range includes an upper threshold and a lower threshold. The assembly device can calculate a second product between each initial shooting parameter and the fourth preset value, determine the sum of each initial shooting parameter and the second product as the upper threshold, and determine the difference between the initial shooting parameter and the second product as the lower threshold.

[0123] S213, Perform a parameter search process on the threshold interval to obtain optimized parameters.

[0124] In some embodiments of this application, the assembly equipment performs a parameter search process on the threshold interval to obtain optimized parameters, including: the assembly equipment equally divides the threshold interval to obtain multiple equally divided parameters corresponding to the initial shooting parameters, and selects optimized parameters from the multiple equally divided parameters.

[0125] The method for generating multiple equally divided parameters can refer to the description of the method for generating the first parameter in step S113, and the method for selecting optimization parameters can refer to the description of selecting model parameters based on model accuracy in step S117.

[0126] S214, generate an updated threshold range based on the optimized parameters and the spacing between multiple equally divided parameters.

[0127] In some embodiments of this application, the assembly equipment can determine the sum of the optimization parameters and the spacing as the upper limit of the updated threshold interval, and the difference between the optimization parameters and the spacing as the lower limit of the updated threshold interval.

[0128] S215, perform a parameter search process on the updated threshold range to obtain updated optimized parameters.

[0129] In some embodiments of this application, the method for searching parameters for the updated threshold range can be found in the description of step S213, and will not be repeated here.

[0130] S216, Determine whether the number of searches has reached the preset number.

[0131] In some embodiments of this application, the preset quantity can be customized, and this application does not impose any restrictions on it. For example, the preset quantity can be 3 times.

[0132] In this embodiment, when the number of searches reaches a preset number, the assembly equipment executes step S217; or, if the number of searches does not reach the preset number, the process returns to step S214. Multiple parameter searches can improve the accuracy of the optimized parameters obtained.

[0133] S217 will use the updated optimized parameters as the shooting parameters.

[0134] In this embodiment, the precise optimization parameters are determined as the shooting parameters, which ensures the accuracy of the shooting parameters.

[0135] In some embodiments of this application, the characters can be laser-etched characters marked on the product; therefore, the image to be recognized can be a product image. By performing character recognition on the product image, product filtering can be achieved. For example... Figure 6 The diagram shown is a flowchart of a product identification method provided in one embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The product identification method is applied to assembly equipment, for example... Figure 1 The assembly equipment 10 shown.

[0136] S31, Get the preset character.

[0137] In some embodiments of this application, each preset character has a corresponding color. The preset character can be a number, a letter, a combination of numbers and letters, or other symbols or graphics; this application does not limit the preset character.

[0138] In some embodiments of this application, the preset character can be a character representing the color of the device housing that needs to be matched with the product. For example, if the product is a mobile phone button, the device housing can be a mobile phone housing. The assembly equipment can obtain the preset character by scanning the identification code (such as a QR code) carried on the device housing, or by directly recognizing the color of the device housing, or by receiving data input by the user indicating the color of the device housing as the preset character. This application does not limit the method of obtaining the preset character.

[0139] S32, Obtain the product image.

[0140] In some embodiments of this application, the product can be a product with laser-engraved characters. For example, the product can be a button material, a button, an electronic product, an instrument, a communication device, an electronic component, an integrated circuit (IC), etc. This application does not limit the product. For example, the button material can be a power button and volume buttons, etc., on a mobile phone.

[0141] In some embodiments of this application, the assembly equipment can pick up products from a preset material area and move them to a predetermined recognition position based on preset characters. It then uses a camera to photograph the product at the recognition position and performs image enhancement and automatic optical detection and positioning operations on the captured image to obtain a product image. The specific method for obtaining the product image can be found in the description of the method for obtaining the image to be recognized above, and will not be repeated here. The assembly equipment can control a robotic arm (not shown) to pick up products from the material area and move them to the predetermined recognition position.

[0142] In other embodiments of this application, the product may also be manually picked up from the material area and placed at the identification position; this application does not limit the method of picking up the product. Product images may be obtained through other methods; this application does not limit the method of obtaining product images.

[0143] S33, Recognize the product image to obtain the recognized characters.

[0144] In some embodiments of this application, the method for recognizing product images to obtain recognized characters can be referred to. Figures 4-5 The description of the character recognition method based on the character recognition model in the previous paper will not be repeated in this application. Each recognized character has a corresponding color. For example, the color corresponding to the recognized character "J" can be blue, the color corresponding to the recognized character "A" can be black, the color corresponding to the recognized character "B" can be white, and the color corresponding to the recognized character "E" can be gray.

[0145] S34 determines whether the product image corresponds to the production requirements by recognizing characters and preset characters.

[0146] In some embodiments of this application, when the color corresponding to the identified character is the same as the color corresponding to the preset character, the assembly equipment determines that the product corresponding to the product image meets the production requirements; when the color corresponding to the identified character is different from the color corresponding to the preset character, the assembly equipment determines that the product corresponding to the product image does not meet the production requirements.

[0147] In other embodiments of this application, when the identified character is the same as the preset character, the assembly equipment determines that the product corresponding to the product image meets the production requirements; when the identified character is different from the preset character, the assembly equipment determines that the product corresponding to the product image does not meet the production requirements.

[0148] In some embodiments of this application, the product is discarded when it does not meet production requirements.

[0149] In this embodiment, by performing a material removal process on the product, the number of defective products can be reduced.

[0150] In other embodiments of this application, when the product meets production requirements, the next production operation, such as assembly, can be performed on the product and the equipment housing.

[0151] In the above implementation scheme, the characters in the product image are identified by a character recognition model. Since the character recognition model learns the features of various characters, it can accurately identify the product image, thus ensuring the accuracy of the identified characters. By accurately identifying the characters and using preset characters, it is possible to accurately determine whether the product meets production requirements. When it is determined that the product does not meet production requirements, the product is discarded, which can reduce the generation of defective products and save production resources.

[0152] In some embodiments of this application, when the product image corresponds to a button material, it is necessary to assemble the button material with the corresponding device housing, such as... Figure 7 The diagram shown is a flowchart of a button recognition method provided in one embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The button recognition method is applied to assembly equipment, for example... Figure 1 The assembly equipment 10 shown.

[0153] S41, Identify the identification code of the equipment housing to obtain the first color character corresponding to the equipment housing.

[0154] In some embodiments of this application, the device housing corresponds to the button material. For example, when the button material is a mobile phone button, the corresponding device housing can be a mobile phone housing.

[0155] In some embodiments of this application, the assembly equipment includes a scanner (not shown). The scanner can identify the identification code to obtain housing information. The assembly equipment can then assign a preset number of character bits from the housing information to a first color character corresponding to the housing. Each first color character indicates a corresponding color, and the preset number of character bits indicates the color of the housing. The preset number of character bits can be customized, and this application does not limit this setting. For example, if the housing information includes 30 character bits, and the 25th character bit indicates the color of the housing, the assembly equipment can determine the 25th character bit as the first color character.

[0156] In other embodiments of this application, the assembly equipment can obtain the first color character by directly identifying the color of the equipment housing, or the assembly equipment can receive data input by the user indicating the color of the equipment housing as the first color character. This application does not limit the method of obtaining the first color character.

[0157] The identification code can be a QR code or other identification codes; this application does not impose any restrictions on the identification code.

[0158] S42, acquire an image of the button material.

[0159] In some embodiments of this application, the assembly equipment can pick up key materials from a preset material area according to a first color character and move them to a predetermined recognition position. It can then control the shooting equipment to take a picture of the key materials at the recognition position and perform image enhancement and automatic optical detection and positioning operations on the captured image to obtain an image of the key materials.

[0160] The detailed process of acquiring images of button materials can be found in the description of product image acquisition methods above, and therefore will not be repeated here. The assembly equipment can control a robotic arm (not shown) to pick up button materials from the material area and move them to a predetermined recognition position.

[0161] In other embodiments of this application, the button material can also be manually picked up from the material area and placed at the identification position. This application does not limit the method of picking up the button material. The image of the button material can be obtained by other methods. This application does not limit the method of obtaining the image of the button material.

[0162] For example, such as Figure 8 The image shown is a schematic diagram of a button material provided in an embodiment of this application. Figure 8 The laser-engraved character on the image of the button material shown is "J".

[0163] S43, recognize the image of the button material to obtain the second color character.

[0164] In some embodiments of this application, the method for recognizing images of keypad materials to obtain second-color characters can be referred to. Figures 4-5 The description of the character recognition method based on the character recognition model in the previous paper will not be repeated in this application.

[0165] The method for recognizing second-color characters can be found by referring to... Figure 4 The description of the target character recognition method in the previous section will not be repeated in this application. The second-color character can be a letter, number, or other symbol or graphic; this application does not impose any limitations on this. Each second-color character has a corresponding color. For example, the second-color character "J" can correspond to blue, the second-color character "A" can correspond to black, the second-color character "B" can correspond to white, and the second-color character "E" can correspond to gray.

[0166] S44 determines whether the button material meets production requirements by using the first color character and the second color character.

[0167] In some embodiments of this application, when the color indicated by the first color character is the same as the color indicated by the second color character, the assembly equipment determines that the button material meets the production requirements; when the color indicated by the first color character is different from the color indicated by the second color character, the assembly equipment determines that the button material does not meet the production requirements.

[0168] For example, following the above embodiment, if the first color character is "B" and the second color character is "J", and the color indicated by the first color character "B" is blue, and the color indicated by the second color character "J" is blue, then it is determined that the button material meets the production requirements.

[0169] In other embodiments of this application, when the first color character and the second color character are the same, the assembly equipment determines that the button material meets the production requirements; when the first color character and the second color character are different, the assembly equipment determines that the button material does not meet the production requirements.

[0170] For example, following the above embodiment, if the first color character is "J" and the second color character is "J", then the assembly equipment determines that the button material meets the production requirements.

[0171] In some embodiments of this application, when it is determined that the button material does not meet production requirements, the assembly equipment can control a robotic arm to throw the button material away.

[0172] In this embodiment, when the color indicated by the first color character is different from the color indicated by the second color character, the assembly equipment determines that the color of the button material and the equipment housing is mismatched, and performs a discarding process on the button material, which can reduce the production of defective products and thus save production resources.

[0173] In other embodiments of this application, when it is determined that the button material meets the production requirements, operations such as assembling the button material and the device housing can be performed.

[0174] In this embodiment, when the color indicated by the first color character is the same as the color indicated by the second color character, the assembly equipment determines the color matching between the button material and the device housing, and controls the robotic arm to assemble the button material and the device housing, which can ensure the quality of the assembled product.

[0175] In the above implementation scheme, the characters in the image of the button material are identified by a character recognition model. Since the character recognition model learns the features of multiple characters, it can accurately identify the image of the button material, thus ensuring the accuracy of the second color characters.

[0176] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.

[0177] The computer-readable storage medium can be the internal memory of the assembly equipment described in the above embodiments, such as the hard disk or memory of the assembly equipment. Alternatively, the computer-readable storage medium can be an external storage device of the assembly equipment, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on the assembly equipment.

[0178] In some embodiments, a computer-readable storage medium may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of the assembly equipment, etc.

[0179] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the assembly equipment. In other embodiments of this application, the assembly equipment may include more or fewer components than illustrated, or combine certain components, or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0180] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0181] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0182] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0183] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0184] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in this application may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. A method for training a character recognition model, characterized in that, The character recognition model training method includes: Obtain the training set and model parameters. The training set includes multiple character images, and the model parameters include model width and model depth parameters. Configure the convolutional neural network according to the model width parameter and the model depth parameter; The configured convolutional neural network is trained based on the training set to obtain the character recognition model.

2. The character recognition model training method as described in claim 1, characterized in that, The acquisition of the training set includes: Each character image is generalized to obtain a generalized image corresponding to each character image; The training set is constructed based on the multiple character images and the generalized image corresponding to each character image.

3. The character recognition model training method as described in claim 1, characterized in that, The acquisition of model parameters includes: Obtain the first preset parameter corresponding to the model width parameter and the second preset parameter corresponding to the model depth parameter; Generate a first parameter range corresponding to the first preset parameter and a second parameter range corresponding to the second preset parameter; A first search list is generated based on the first parameter range, and a second search list is generated based on the second parameter range; Multiple parameter combinations are obtained by combining multiple first parameters in the first search list and multiple second parameters in the second search list; The convolutional neural network is configured according to each of the parameter combinations; Based on the training set and the configured convolutional neural network, calculate the model accuracy corresponding to each parameter combination; Based on the model accuracy, a set of parameter combinations is selected from the multiple parameter combinations as the model parameters.

4. A character recognition method based on a character recognition model, characterized in that, The character recognition model is obtained according to the character recognition model training method as described in any one of claims 1 to 3, and the character recognition method includes: Acquire the image to be recognized; The image to be recognized is input into the character recognition model to obtain the predicted probabilities of various characters; The target character corresponding to the image to be recognized is determined from the plurality of characters based on the predicted probability.

5. The character recognition method as described in claim 4, characterized in that, The character recognition method further includes: Based on the character recognition model, obtain multiple recognition probabilities corresponding to each character; Based on all the recognition probabilities corresponding to each character, a first threshold corresponding to each character is determined; Based on the first threshold corresponding to each character, a second threshold is determined, and a target threshold is calculated based on the second threshold and a first preset value.

6. The character recognition method as described in claim 5, characterized in that, The step of determining the target character corresponding to the image to be recognized from the plurality of characters based on the predicted probability includes any one or a combination of the following methods: Method 1: Determine the character corresponding to the predicted probability greater than the target threshold as the first candidate character, and determine the first candidate character corresponding to the predicted probability greater than the corresponding first threshold as the second candidate character; If there are multiple second candidate characters, the target character is determined from the multiple second candidate characters based on the difference between the predicted probability of each second candidate character and the corresponding first threshold; if there is a single second candidate character, the second candidate character is determined as the target character. Method 2: Determine the highest prediction probability from the predicted probabilities of multiple first candidate characters. If the highest prediction probability is greater than a second preset value, determine the first candidate character corresponding to the highest prediction probability as the target character. Method 3: Classify each first candidate character using a preset similar character classification model to obtain the classification probability of each first candidate character belonging to a preset similar character, determine the maximum classification probability, and if the maximum classification probability is greater than a third preset value, determine the first candidate character corresponding to the maximum classification probability as the target character; Method 4: Extract the character features of each first candidate character, calculate the matching degree between each first candidate character and the character corresponding to the preset feature template based on the character features and the preset feature template, and select the target character from multiple first candidate characters based on multiple matching degrees.

7. The character recognition method as described in claim 4, characterized in that, The acquisition of the image to be identified includes: The camera is controlled to take a picture based on preset shooting parameters to obtain an initial image; The initial image is enhanced according to preset image enhancement parameters to obtain an enhanced image; The region of interest in the enhanced image is determined based on preset positioning parameters, and the region of interest is identified as the image to be recognized.

8. The character recognition method as described in claim 7, characterized in that, The generation of the shooting parameters includes: Obtain initial shooting parameters; Based on the initial shooting parameters and the fourth preset value, determine the threshold range corresponding to the initial shooting parameters; A parameter search process is performed on the threshold interval to obtain optimized parameters, including: equally dividing the threshold interval to obtain multiple equally divided parameters corresponding to the initial shooting parameters, and selecting the optimized parameters from the multiple equally divided parameters; An updated threshold range is generated based on the optimized parameters and the spacing between the multiple equally divided parameters. The parameter search process is repeated based on the updated threshold range until the number of searches reaches a preset number, at which point the parameter search stops. The optimized parameters obtained after the preset number of searches are then determined as the shooting parameters.

9. A product identification method, characterized in that, The product identification method includes: Get the preset character; Obtain a product image of the product; The character recognition method as described in any one of claims 4 to 8 is invoked to recognize the product image and obtain the recognized characters; By using the identified characters and the preset characters, it is determined whether the product corresponding to the product image meets the production requirements.

10. A key recognition method, characterized in that, The button recognition method includes: The identification code on the device housing is identified to obtain the first color character corresponding to the device housing; Acquire an image of the button material; The character recognition method as described in any one of claims 4 to 8 is invoked to recognize the image of the button material, thereby obtaining a second-color character; The first color character and the second color character are used to determine whether the button material meets the production requirements.

11. An assembly device, characterized in that, The assembly equipment includes: Memory, storing at least one instruction; and The processor executes at least one instruction to implement the character recognition model training method as described in any one of claims 1 to 3, or the character recognition method as described in any one of claims 4 to 8, or the product recognition method as described in claim 9, or the key recognition method as described in claim 10.