Text recognition method, device, computer equipment and storage medium
By introducing classification channels and text recognition channels with different network parameters into the text recognition model, multilingual text images are classified and recognized, which solves the problem of low accuracy of multilingual text recognition in the existing technology and achieves a more efficient and Accurate text recognition effect.
Patent Information
- Application Number
- CN202010697383.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-20
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-07-20
AI Technical Summary
The existing CRNN network structure-based image recognition accuracy for text in multiple languages is low, and there is a problem of low text recognition accuracy.
By introducing classification channels and text recognition channels with different network parameters into the text recognition model, the language-biased classification results are processed and text recognition is performed separately to improve the recognition accuracy and efficiency of each text recognition channel.
It improves the recognition accuracy and efficiency of each text recognition channel, ensures that the text images processed by each channel are of the same language category, reduces the interference in the recognition process, and significantly improves the recognition accuracy.
Smart Images

Figure CN111832657B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of text recognition, and in particular to a text recognition method, apparatus, computer device and storage medium. Background Art
[0002] CRNN (Convolutional Recurrent Neural Network) is a network structure commonly used in OCR (Optical Character Recognition) text recognition, which is mostly composed of CNN (Convolutional Neural Network), LSTM (Long Short Term Memory) and CTC (Connectionist temporal classification). Nowadays, CRNN network structure is widely used in the field of text recognition. The existing method of text recognition based on CRNN network structure usually uses the same channel to recognize texts in multiple languages in an image.
[0003] However, when using the existing CRNN network structure to perform text recognition on images with texts in multiple languages, since the existing CRNN network structure can usually only accurately recognize text in a certain language in the image, but is not accurate in recognizing texts in other languages, there is a problem of low text recognition accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a text recognition model method, device, computer equipment and storage medium that can balance the recognition effect of images containing characters of different languages in order to address the above technical problems.
[0005] A text recognition method, the method comprising:
[0006] Acquire a text image to be recognized; the text image includes text in at least one language;
[0007] Extracting features from the text image using a text recognition model to obtain a feature map corresponding to the text image;
[0008] Performing language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language biased classification result corresponding to the text image;
[0009] When the language bias classification result is biased towards the first language category, performing text recognition on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result;
[0010] When the language bias classification result is biased towards the second language category, text recognition is performed on the feature map through the second text recognition channel in the text recognition model to obtain a corresponding text recognition result; the second text recognition channel and the first text recognition channel have different network parameters.
[0011] A text recognition device, comprising:
[0012] An acquisition module, used for acquiring a text image to be recognized; the text image includes text in at least one language;
[0013] A feature extraction module, used to extract features from the text image through a text recognition model to obtain a feature map corresponding to the text image;
[0014] A language classification module, used to perform language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image;
[0015] A text recognition module, configured to, when the language bias classification result is biased towards the first language category, perform text recognition on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result;
[0016] The text recognition module is also used to perform text recognition on the feature graph through a second text recognition channel in the text recognition model to obtain a corresponding text recognition result when the language bias classification result is biased towards a second language category; the second text recognition channel and the first text recognition channel have different network parameters.
[0017] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0018] Acquire a text image to be recognized; the text image includes text in at least one language;
[0019] Extracting features from the text image using a text recognition model to obtain a feature map corresponding to the text image;
[0020] Performing language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language biased classification result corresponding to the text image;
[0021] When the language bias classification result is biased towards the first language category, performing text recognition on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result;
[0022] When the language bias classification result is biased towards the second language category, text recognition is performed on the feature map through the second text recognition channel in the text recognition model to obtain a corresponding text recognition result; the second text recognition channel and the first text recognition channel have different network parameters.
[0023] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the following steps are implemented: obtaining a text image to be recognized; the text image includes text in at least one language;
[0024] Extracting features from the text image using a text recognition model to obtain a feature map corresponding to the text image;
[0025] Performing language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language biased classification result corresponding to the text image;
[0026] When the language bias classification result is biased towards the first language category, performing text recognition on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result;
[0027] When the language bias classification result is biased towards the second language category, text recognition is performed on the feature map through the second text recognition channel in the text recognition model to obtain a corresponding text recognition result; the second text recognition channel and the first text recognition channel have different network parameters.
[0028] The above-mentioned text recognition method, device, computer equipment and storage medium obtain a text image including at least one language text, and extract a feature map in the text image through a text recognition model. The feature map of the text image is subjected to language classification processing through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image. Then, the feature map of the text image is subjected to text recognition processing through the text recognition channel corresponding to the language bias classification result in the text recognition model to obtain a corresponding text recognition result. In this way, different text recognition channels can be used to perform text recognition processing on text images with different language bias classification results, that is, each text recognition channel processes text images biased towards the same language category, without having to process text images of multiple language categories. Therefore, the recognition accuracy of each text recognition channel can be improved. Moreover, the text recognition processes in each text recognition channel do not interfere with each other, that is, the text recognition processes in each text recognition channel can be implemented simultaneously, therefore, not only the recognition efficiency of each text recognition channel is improved, but also the recognition accuracy is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A diagram showing an application environment of a text recognition method in an embodiment;
[0030] Figure 2 A flowchart of a text recognition method in one embodiment;
[0031] FIG3( a ) is a schematic diagram of an intermediate image after white background filling in one embodiment;
[0032] FIG3( b ) is a schematic diagram of a text image to be recognized after scaling processing in one embodiment;
[0033] Figure 4 A schematic diagram of training a text recognition model in one embodiment;
[0034] Figure 5 is a structural block diagram of a text recognition device in one embodiment;
[0035] Figure 6 is a structural block diagram of a text recognition device in another embodiment;
[0036] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0038] The text recognition method provided in this application can be applied to Figure 1 In the application environment shown in the figure, the computer device 110 collects images containing text on the vehicle 120 through the network to obtain the text image to be recognized. Of course, in other application scenarios, the vehicle 120 can also be other target objects to be recognized, such as buildings or parking spaces. It can be understood that Figure 1 The application environment shown is only used for a schematic illustration and is not used to limit a specific application scenario to which the method is applied. The computer device may specifically be a terminal or a server, wherein the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0039] It can be understood that the computer device 110 collects images containing text on the vehicle 120 through the network to obtain a text image to be recognized, and the text image includes text in at least one language. The computer device 110 obtains a text recognition model, and extracts features of the text image through the text recognition model to obtain a feature map corresponding to the text image. The computer device 110 then performs language classification processing on the feature map through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image. When the language bias classification result is biased towards the first language category, the computer device 110 performs text recognition on the feature map through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result; when the language bias classification result is biased towards the second language category, the computer device 110 performs text recognition on the feature map through the second text recognition channel in the text recognition model to obtain a corresponding text recognition result.
[0040] In one embodiment, Figure 2 As shown, a text recognition method is provided, and the method is applied to a computer device 110 as an example for description. The text recognition method includes the following steps:
[0041] S202, obtaining a text image to be recognized; the text image includes text in at least one language.
[0042] Among them, the text image is an image including text, and the text can specifically be characters. Language is the type of language, such as Chinese, English, Korean and other language types. The text image includes text in at least one language, that is, the text image can contain text in one language or text in multiple languages. For example, the text image contains Chinese text, English text, or both Chinese text and English text, which is not limited in the embodiments of the present application.
[0043] Specifically, the computer device may obtain the text image to be recognized from a local or other computer device.
[0044] In one embodiment, the computer device may use a local image acquisition device, such as a camera, to acquire an image of the target environment or target scene where the text appears, to obtain the acquired text image. Alternatively, the computer device receives the text image acquired and sent by other computer devices through a network, which is not limited in the embodiments of the present application.
[0045] In one embodiment, step S202, i.e., the step of obtaining a text image to be recognized, specifically includes: obtaining an original image to be processed; filling the original image with preset content to obtain an intermediate image with a preset aspect ratio; scaling the intermediate image to obtain a text image to be recognized of a preset size.
[0046] The original image is an image that has not been filled or scaled. The preset content is the preset content used to fill the original image, such as the background color. The preset aspect ratio and the preset size are both preset values, which are not limited in the embodiments of the present application. The scaling process includes the zooming process and the reducing process.
[0047] Specifically, the computer device obtains an original image from a local or other computer device, and obtains the original aspect ratio of the original image. The computer device adjusts the original image with the original aspect ratio to an intermediate image with a preset aspect ratio by performing background filling on the original image. Furthermore, the computer device adjusts the intermediate image with the preset aspect ratio to a text image to be recognized with a preset size by performing scaling processing on the intermediate image.
[0048] In one embodiment, the computer device acquires the original image through a local image acquisition device, and the computer device determines the original aspect ratio of the original image, such as 3: 1. Alternatively, after acquiring the original image, the computer device intercepts the area of the original image including the text to be recognized, clears the original image before interception, and uses the intercepted area including the text to be recognized as the original image, thereby determining the original aspect ratio of the original image.
[0049] In one embodiment, the computer device fills the background of the original image, such as filling the background of the original image with a white background, which may be other colors, and the embodiment of the present application does not limit this. Therefore, referring to FIG. 3(a), FIG. 3(a) is a schematic diagram of an intermediate image after the white background is filled in one embodiment. After the filling process, the computer device can adjust the original image with the original aspect ratio to an intermediate image with a preset aspect ratio, such as 6:1.
[0050] In one embodiment, after the original image is adjusted to an intermediate image through filling processing, it is also necessary to perform scaling processing. The preset size is, for example, 360*60, but it can also be other sizes, which is not limited in the embodiment of the present application. Referring to Figure 3(b), Figure 3(b) is a schematic diagram of a text image to be recognized after scaling processing in one embodiment. The computer device obtains the size of the intermediate image. When the size of the intermediate image is larger than the preset size, the intermediate image is enlarged to obtain a text image to be recognized of a preset size; when the size of the intermediate image is smaller than the preset size, the intermediate image is reduced to obtain a text image to be recognized of a preset size.
[0051] In the above embodiment, the computer device fills the original image with preset content to obtain an intermediate image with a preset aspect ratio, and then obtains a text image to be recognized with a preset size by scaling the intermediate image. In this way, the proportion and size of the text image to be recognized can be standardized, and the text area to be recognized in the text image can be highlighted, which is equivalent to preprocessing for subsequent text recognition processing, thereby facilitating feature extraction. In addition, image distortion caused by scale normalization of the sample text image can be prevented, thereby ensuring the accuracy of the training text recognition model.
[0052] S204, extracting features of the text image through a text recognition model to obtain a feature map corresponding to the text image.
[0053] Among them, the text recognition model is a neural network model used to classify and recognize images containing text.
[0054] Specifically, the computer device obtains a text recognition model trained by the server, and extracts features of the text image through the text recognition model to obtain a feature map corresponding to the text image.
[0055] In one embodiment, the computer device may select a neural network such as VGG (Visual Geometry Group Network) or Resnet (Residual Network) as a network for feature extraction, which is not limited in the present embodiment of the application. For example, the computer device uses two residual modules of the Resnet neural network as convolutional layers to perform underlying feature extraction, thereby extracting a feature map from the text image.
[0056] In one embodiment, after the computer device extracts a feature map from a text image, the computer device can perform language classification processing and text recognition processing on the feature map through the corresponding channel in the text recognition model. For example, the computer device performs language classification processing on the feature map through the classification channel in the text recognition model; the computer device performs text recognition processing on the feature map through the text recognition channel in the text recognition model.
[0057] In one embodiment, the text recognition model in the text recognition method is trained by the following steps: obtaining training data; the training data includes a sample text image, and a sample language bias label and a sample text recognition label corresponding to the sample text image; the sample text image includes a first sample text image and a second sample text image; the sample language bias label of the first sample text image is a label biased towards the first language; the sample language bias label of the second sample text image is a label biased towards the second language; feature extraction is performed on the sample text image through the text recognition model to be trained to obtain a sample feature map corresponding to the sample text image; language classification is performed on the sample feature map through the classification channel in the text recognition model to be trained to obtain a sample feature map corresponding to the sample text The predicted language bias classification result corresponding to the image; performing text recognition on the sample feature map of the first sample text image through the first text recognition channel in the text recognition model to be trained, and obtaining the sample text recognition result corresponding to the first sample text image; performing text recognition on the sample feature map of the second sample text image through the second text recognition channel in the text recognition model to be trained, and obtaining the sample text recognition result corresponding to the second sample text image; based on the difference between the predicted language bias classification result and the sample language bias label, and the difference between the sample text recognition label and the sample text recognition result corresponding to each sample text image, adjusting the network parameters of the text recognition model to be trained and continuing training until the training is stopped when the stopping condition is met.
[0058] The training data is data used to train a text recognition model. The training data includes a sample text image, and a sample language bias label and a sample text recognition label corresponding to the sample text image. The sample text image is an image used to train a text recognition model and contains text. The sample text image includes a first sample text image and a second sample text image, wherein the sample language bias label of the first sample text image is a label biased toward the first language; and the sample language bias label of the second sample text image is a label biased toward the second language.
[0059] The sample language bias label is the category to which the sample text image actually belongs. The sample language bias label includes a biased first language label and a biased second language label. The predicted language bias classification result is the predicted category obtained by the text recognition model to be trained. The sample text recognition label is the text content actually contained in the sample text image. The sample text recognition result is the predicted text content obtained by the text recognition model to be trained.
[0060] It can be understood that when the sample language bias label corresponding to the sample text image is biased towards the first language label, it means that the preset features of the first language text in the sample text image account for the largest proportion. In other words, the sample text image at this time may only contain text in the first language, or it may contain text in other languages on the premise of containing the first language text. When the sample text image contains texts in multiple languages, the preset features of the first language text account for the largest proportion. Similarly, the bias towards the second language label indicates that the preset features of the second language text in the sample text image account for the largest proportion. Among them, the preset features are, for example, the amount of text data, or the font size of the text, etc., which are not limited in the embodiments of the present application.
[0061] The first language and the second language are different language types. For example, when the first language is Chinese, the second language is a language other than Chinese. The second language may be English, Korean, Italian or other languages. This embodiment of the present application does not limit this.
[0062] In one embodiment, the text recognition model can be obtained by training the training data in advance. The training data here includes a sample text image, a sample language bias label and a sample text recognition label corresponding to the sample text image. The computer device divides the sample text image into a first sample text image corresponding to the first language bias label and a second sample text image corresponding to the second language bias label according to the sample language bias label corresponding to the sample text image, that is, the category to which the sample text image actually belongs. The computer device can input the sample text image into the text recognition model to be trained, and perform feature extraction on the sample text image through the text recognition model to obtain a sample feature map corresponding to the sample text image. Then, the computer device performs language classification processing on the sample feature map through the classification channel in the text recognition model to be trained, and obtains the predicted language bias classification result corresponding to the sample text image. Here, the corresponding classification training mainly uses softmax regression to learn the main category information of the image characters, and then determines the main characters in English and Chinese in the image.
[0063] Furthermore, text recognition is performed on the sample feature map of the first sample text image through the first text recognition channel in the text recognition model to be trained, and a sample text recognition result corresponding to the first sample text image is obtained; and text recognition is performed on the sample feature map of the second sample text image through the second text recognition channel in the text recognition model to be trained, and a sample text recognition result corresponding to the second sample text image is obtained.
[0064] Then, the computer device compares the predicted category of the sample text image with the actual category, and compares the predicted text content with the actual text content according to the difference between the predicted language bias classification result and the sample language bias label, and the difference between the sample text recognition label and the sample text recognition result corresponding to each sample text image. That is, the computer device compares the predicted category of the sample text image with the actual category, and compares the predicted text content with the actual text content. According to the differences in the above comparisons, a corresponding loss function is constructed. The network parameters of the text recognition model are adjusted by the loss function until the training is stopped when the stopping condition is reached. The training stopping condition is the condition for stopping model training, which can specifically be reaching a preset number of iterations or the trained text recognition model reaching a preset performance indicator.
[0065] In one embodiment, the first text recognition channel is mainly used to identify images with the largest proportion of preset features of the first language; the second text recognition channel is mainly used to identify images with the largest proportion of preset features of the second language. The image may be a sample text image or a text image. Therefore, when a sample text image with a label biased towards the first language is input into the first text recognition channel for text recognition, the sample text recognition result output by the first text recognition channel is compared with the corresponding sample text recognition label, and the parameters of the model are adjusted according to the difference in the comparison, the accuracy of the first text recognition channel in identifying the sample text image of the first language can be effectively improved. Similarly, when the parameters of the model are adjusted according to the difference between the sample text recognition result output by the second text recognition channel and the corresponding sample text recognition label, the accuracy of the second text recognition channel in identifying the sample text image of the second language can be effectively improved.
[0066] In one embodiment, when there are texts in more than two languages in the sample text image, that is, when the sample language bias label is a label biased towards a third language, the sample feature map is subjected to text recognition through the third text recognition channel in the text recognition model to be trained to obtain the corresponding sample text recognition result. The third language refers to a language other than the first language and the second language. In other words, the number of specific text recognition channels can be determined according to the number of languages appearing in the sample text image. Each text recognition channel corresponds to the sample text image that is biased towards one language, and each text recognition channel can be trained in a targeted manner, thereby improving the recognition accuracy of the entire text recognition model.
[0067] In the above embodiment, the computer device trains the text recognition model to be trained through the training data, and performs language classification and text recognition processing on the sample text images in the training data through different channels, and each text recognition channel processes images that are biased towards a language label. In this way, each text recognition channel can be trained in a targeted manner, thereby improving the recognition accuracy of each text recognition channel. Therefore, the computer device can obtain a trained text recognition model with improved accuracy.
[0068] S206, performing language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language biased classification result corresponding to the text image.
[0069] Among them, the classification channel is the channel used for language classification in the text recognition channel. The channel can also be understood as a network structure, or a channel branch, etc. Language classification processing is the process of classifying each image by determining the preset features of the text in each language in the image. The language bias classification result is a biased category obtained by the trained text recognition model. It can be understood that since there is text in at least one language in each image, the corresponding classification result is a biased classification result, indicating which language's text has a larger proportion of preset features in the current image.
[0070] Specifically, the computer device inputs the feature map into the classification channel in the text recognition model, and performs language classification processing on the feature map through the classification channel, and uses the output result of the classification channel as the language biased classification result corresponding to the text image.
[0071] In one embodiment, the computer device performs language classification processing on the feature image through the classification channel in the text recognition model, determines the language type to which the text in the text image corresponding to the feature image belongs, and counts the number of texts in each language. The computer device determines the language bias classification result corresponding to the text image by comparing the number of texts in each language in the text image.
[0072] In one embodiment, step S206, that is, the step of performing language classification processing on the feature map through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image, specifically includes: performing language classification processing on the feature map through the classification channel in the text recognition model to determine the language category to which each character appearing in the text image belongs; the language category includes a first language and a second language; respectively counting a first number of characters belonging to the first language and a second number of characters belonging to the second language in the text image; when the first number is greater than or equal to the second number, determining that the language bias classification result corresponding to the text image is biased towards the first language category; when the first number is less than the second number, determining that the language bias classification result corresponding to the text image is biased towards the second language category.
[0073] The language category is the type of language, for example, the language category is divided into Chinese, English, or Korean, etc. The first number indicates the number of characters in the text image belonging to the first language. The second number indicates the number of characters in the text image belonging to the second language.
[0074] The language bias classification results include a bias toward the first language category and a bias toward the second language category. It can be understood that when the language bias classification result corresponding to the text image is the first language category, it means that the preset features of the first language text in the text image account for the largest proportion. In other words, the text image at this time may only contain text in the first language, or it may contain text in other languages on the premise of containing the first language text. When the text image contains texts in multiple languages, the preset features of the first language text account for the largest proportion. Similarly, the bias toward the second language category indicates that the preset features of the second language text in the text image account for the largest proportion.
[0075] Specifically, the computer device performs language classification processing on the feature map through the classification channel in the text recognition model. The computer device determines each character that appears in the text image corresponding to the feature map, and the language type to which each character belongs. The computer device counts the total number of characters corresponding to each language, takes the number of characters belonging to the first language in the text image as the first number, and takes the number of characters belonging to the second language in the text image as the second number.
[0076] Further, when a first number in a text image obtained by statistics of a computer device is greater than or equal to a second number, it is determined that the language bias classification result corresponding to the current text image is biased toward the first language category; conversely, when a first number in a text image obtained by statistics of a computer device is less than a second number, it is determined that the language bias classification result corresponding to the current text image is biased toward the second language category.
[0077] In the above embodiment, the computer device performs language classification processing on the feature image through the classification channel in the text recognition model, determines the language type to which the text in the text image corresponding to the feature image belongs, and counts the number of texts in each language, and based on the number of texts in each language, determines the language bias classification result corresponding to the text image. In this way, the computer device can pre-classify the text image, thereby obtaining the language bias classification result corresponding to each text image. The language bias classification result is used to input the text image into different text recognition channels for text recognition. Therefore, after the language classification processing, each text recognition channel processes text images that are biased towards the same language category, without having to process text images of multiple language categories, which can improve the recognition accuracy of each text recognition channel.
[0078] S208: When the language bias classification result is biased towards the first language category, text recognition is performed on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result.
[0079] Among them, the text recognition result is the text content obtained by recognizing the trained text recognition model. The text recognition channel is a channel used to recognize text in an image. The text recognition channel is divided into at least a first text recognition channel and a second text recognition channel. For example, the first text recognition channel is mainly used to recognize images in which the number of characters in the first language accounts for the largest proportion; the second text recognition channel is mainly used to recognize images in which the number of characters in the second language accounts for the largest proportion. In addition, when there are texts in multiple languages, corresponding text recognition channels can be added accordingly.
[0080] Specifically, when the language bias classification result is biased towards the first language category, the computer device inputs the feature map corresponding to the first language category into the first text recognition channel for text recognition, and obtains the corresponding text recognition result.
[0081] In one embodiment, the first text recognition channel adopts the network structure of LSTM and CTC. Through the combination of these two network structures, text recognition can be achieved when the character area of the text image is not fixed.
[0082] S210, when the language bias classification result is biased towards the second language category, text recognition is performed on the feature map through the second text recognition channel in the text recognition model to obtain a corresponding text recognition result; the second text recognition channel and the first text recognition channel have different network parameters.
[0083] Specifically, when the language bias classification result is biased towards the second language category, the computer device inputs the feature map corresponding to the second language category into the second text recognition channel for text recognition, and obtains the corresponding text recognition result.
[0084] In one embodiment, the second text recognition channel has the same main structure as the first text recognition channel, and also adopts the network structure of LSTM and CTC. Through the combination of these two network structures, text recognition can be achieved when the character area of the text image is not fixed.
[0085] In one embodiment, since the second text recognition channel is mainly used to recognize text images that are biased towards the second language category, the first text recognition channel is mainly used to recognize text images that are biased towards the second language category, that is, the second text recognition channel and the first text recognition channel respectively have their own network parameters, thereby realizing the recognition of texts in different languages.
[0086] The above-mentioned text recognition method obtains a text image including at least one language text, and extracts a feature map in the text image through a text recognition model. The feature map of the text image is subjected to language classification processing through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image. Then, the feature map of the text image is subjected to text recognition processing through the text recognition channel corresponding to the language bias classification result in the text recognition model to obtain a corresponding text recognition result. In this way, different text recognition channels can be used to perform text recognition processing on text images with different language bias classification results, that is, each text recognition channel processes text images biased towards the same language category, without having to process text images of multiple language categories. Therefore, the recognition accuracy of each text recognition channel can be improved. Moreover, the text recognition processes in each text recognition channel do not interfere with each other, that is, the text recognition processes in each text recognition channel can be implemented simultaneously, therefore, not only the recognition efficiency of each text recognition channel is improved, but also the recognition accuracy is greatly improved.
[0087] In one embodiment, before the step of extracting features of the sample text image through the text recognition model to be trained to obtain a sample feature map corresponding to the sample text image, the text recognition method also includes the step of alternately inputting the sample text images. The step of alternately inputting the sample text images specifically includes: alternately selecting corresponding sample text images from the first sample text image and the second sample text image, respectively, and inputting them into the text recognition model to be trained.
[0088] Specifically, when training the text recognition model, the computer device selects corresponding sample text images from the first sample text image and the second sample text image in turn and inputs them into the text recognition model to be trained.
[0089] In one embodiment, according to the number of language categories in the sample text image, the computer device presets text recognition channels corresponding to the number of language categories, and divides the sample text image into sample text images corresponding to the number of language categories. For example, when the sample text image includes texts in two languages, the computer device divides the sample text image into a first sample text image and a second sample text image.
[0090] In one embodiment, when the sample text image includes texts in two languages, the computer device selects the corresponding sample text images that meet the preset conditions from the first sample text image and the second sample text image, respectively, and inputs them into the text recognition model to be trained. Wherein, the preset condition is, for example, a preset number of sample text images, such as one sample text image as a batch, or three sample text images as a batch, which is not limited in the embodiment of the present application. For example, the computer device selects a preset number of sample text images from the first sample text image for the first time, that is, selects a preset number of sample text images biased towards the first language label, and passes them into the text recognition model to be trained for training the classification channel and the first text recognition channel. The computer device selects a preset number of sample text images from the second sample text image for the second time, that is, selects a preset number of sample text images biased towards the second language label, and passes them into the text recognition model to be trained for training the classification channel and the second text recognition channel.
[0091] In the above embodiment, the computer device selects corresponding sample text images from the first sample text image and the second sample text image alternately in turn, so that each text recognition channel can learn the corresponding text features in a targeted manner, avoid the problem of imbalance of sample text images in different languages, and is beneficial to improving the recognition accuracy of the entire text recognition model.
[0092] In one embodiment, the sample language bias label in the text recognition method is determined by the following steps: determining the sample language category to which each character appearing in the sample text image belongs; the sample language category includes a first sample language and a second sample language; respectively counting a first sample number of characters belonging to the first sample language in the sample text image, and a second sample number of characters belonging to the second sample language; when the first sample number is greater than or equal to the second sample number, determining that the sample language bias label corresponding to the sample text image is a label biased towards the first language; when the first sample number is less than the second sample number, determining that the sample language bias label corresponding to the sample text image is a label biased towards the second language.
[0093] Specifically, the computer device determines the language type corresponding to each character in the sample text image, and counts the total number of characters corresponding to each language. The computer device uses the number of characters belonging to the first language in the sample text image as the first sample number, and uses the number of characters belonging to the second language in the sample text image as the second sample number.
[0094] Furthermore, when the number of first samples in the sample text image obtained by statistics of the computer device is greater than or equal to the number of second samples, the sample language bias label corresponding to the current sample text image is determined to be biased towards the first language label; conversely, when the number of first samples in the sample text image obtained by statistics of the computer device is less than the number of second samples, the sample language bias label corresponding to the current text image is determined to be biased towards the second language label.
[0095] In another embodiment, the sample language bias label corresponding to the sample text image can also be manually determined by an annotator, for example, the annotator manually annotates the sample text image according to the number of characters of each language in the sample text image. Thus, the computer device can obtain the sample text image with the sample language bias label.
[0096] In the above embodiment, the computer device can determine the language type corresponding to each sample text image, count the number of texts in each language, and determine the predicted language bias classification result corresponding to the sample text image based on the number of texts in each language. In this way, the computer device can pre-classify the sample text images to obtain the sample language bias labels corresponding to each sample text image. The sample language bias labels are used to input the sample text images into different text recognition channels for text recognition. Therefore, after the language classification process, each text recognition channel processes sample text images that are biased towards the same language category, without having to process sample text images of multiple language categories, thereby improving the recognition accuracy of each text recognition channel.
[0097] In one embodiment, the text image in the text recognition method includes a vehicle text image; the vehicle text image includes at least one of the vehicle's frame number, license plate, vehicle nameplate, body text, and annual inspection information of the vehicle. The text recognition method also includes a step of obtaining vehicle inspection information, and the step of obtaining vehicle inspection information includes: determining the corresponding vehicle information based on the text recognition result corresponding to the vehicle text image to search for vehicle inspection information corresponding to the vehicle information.
[0098] Among them, the vehicle frame number is the vehicle identification number (VIN), which is generally composed of seventeen letters or numbers. It is a unique number on the vehicle. VIN can be used to identify the manufacturer, engine, chassis serial number and other performance information of the vehicle. The license plate is also called the license plate or vehicle number plate. It is generally composed of five letters or numbers. The license plate records the registration number, registration area or other relevant information of the vehicle. The vehicle nameplate is a sign indicating the basic characteristics of the vehicle. The basic characteristics include brand, model, engine power, total mass, maximum load mass, number of passengers, factory number, factory date and factory name. The body text is generally the text sprayed on the body. The annual inspection information of the vehicle can specifically be a table containing the annual inspection information, wherein the vehicle annual inspection information may include the basic information of the vehicle, the time of each annual inspection, and the inspection status of each annual inspection item.
[0099] Specifically, when the text image is a vehicle text image such as the vehicle frame number, license plate, vehicle nameplate, body text, and vehicle annual inspection information, the computer device performs language classification and text recognition processing on the vehicle text image through a text recognition model, and determines the corresponding vehicle based on the text recognition result corresponding to the vehicle text image, thereby finding the vehicle inspection information corresponding to the vehicle.
[0100] In the above embodiment, the computer device can determine the corresponding vehicle information according to the text recognition result corresponding to the vehicle text image to find the vehicle inspection information corresponding to the vehicle information. In this way, the vehicle inspection information corresponding to the vehicle can be found quickly and accurately, thereby greatly improving the convenience of obtaining the vehicle inspection information.
[0101] In a specific embodiment, reference Figure 4 The text recognition method for training a text recognition model specifically includes the following steps: ① The computer device obtains an original sample image, and performs image size transformation on the original sample image. For example, based on the aspect ratio of the original sample image, the original sample image is filled with a white background, the aspect ratio of the original sample image is adjusted to 6:1, and the size of the original sample image is adjusted to 360*60, thereby obtaining a sample text image (such as Figure 4 401 in the figure). Such a size transformation can facilitate feature extraction of the original sample image and prevent the image from being distorted due to scale normalization of the sample text image before training the text recognition model.
[0102] ② The computer device obtains training data, wherein the training data includes sample text images, sample language bias labels corresponding to the sample text images, and sample text recognition labels. The computer device can classify the training data according to the classification labels of English characters (biased towards the first language label) and Chinese characters (biased towards the second language label), and pass in sample text images under different category labels in turn. For example, the first batch_size (preset number) of Chinese characters are used for training. Figure 4 The LSTM_chinese branch (first text recognition channel) and the classify branch (classification channel) in the second pass batch_size sheets of data with mostly English characters for training Figure 4 The LSTM_english branch (the second text recognition channel) and the classify branch (classification channel) are then passed in alternately to the corresponding sample text images.
[0103] ③ Extract features from the incoming sample text image (such as Figure 4 402 in the figure), the convolutional layer for feature extraction can select a feature extraction network such as VGG or Resnet, and finally obtain a feature map (such as Figure 4 403 in the above example).
[0104] ④ The acquired feature map (such as Figure 4 403 in) into the classify branch (such as Figure 4 404 in the figure) for classification training. Classification training uses softmax regression to learn the main category information of image characters, and then determines the main English characters in the image. At the same time, according to the different feature map category information, select the LSTM_english branch (such as Figure 4 405) for English character network training or LSTM_chinese branch (such as Figure 4 406) in the figure for Chinese character network training. The two branches have the same main structure, both of which are LSTM+CTC network structures, which can realize image text recognition when the image character area is not fixed.
[0105] ⑤After the text recognition model training is completed, when testing the image to be detected, first obtain the classify branch (such as Figure 4 404 in the language bias classification result, and then determine the final result based on the language bias classification result to select the LSTM_english branch (such as Figure 4 405) or the LSTM_chinese branch (such as Figure 4 406) in the text recognition result.
[0106] ⑥ When the training stop condition is met, the training is terminated and the computer device obtains the trained text recognition model.
[0107] In one embodiment, the text recognition model uses two residual modules of ResNet as convolutional layers to extract underlying features. After the computer device obtains the feature map, two branches are added to the original CRNN single LSTM recurrent neural network as the classification channel. Figure 4 404 in the example) uses a fully connected layer plus softmax regression to classify images in Chinese and English. The LSTM_english branch (such as Figure 4 405 in) and LSTM_chinese branch (such as Figure 4 406) has the same structure, but the sample text images passed in are different. The LSTM_chinese branch (such as Figure 4 406 in ) is more inclined to Chinese character training, and the LSTM_english branch (such as Figure 4 405) is biased towards English character training.
[0108] In the above embodiments, based on the small amount of data and the difficulty of detection in the actual detection process, the classification channel and the text recognition channel are designed to solve the problems of imbalanced sample text images in various languages and low accuracy of text recognition in a targeted manner.
[0109] It should be understood that although Figure 2 and Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 4 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0110] In one embodiment, Figure 5 As shown, a text recognition device 500 is provided, comprising: an acquisition module 501, a feature extraction module 502, a language classification module 503 and a text recognition module 504, wherein:
[0111] Acquisition module 501, for acquiring a text image to be recognized; the text image includes text in at least one language.
[0112] The feature extraction module 502 is used to extract features from the text image through a text recognition model to obtain a feature map corresponding to the text image.
[0113] The language classification module 503 is used to perform language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language biased classification result corresponding to the text image.
[0114] The text recognition module 504 is used to perform text recognition on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result when the language bias classification result is biased towards the first language category.
[0115] The text recognition module 504 is also used to perform text recognition on the feature graph through the second text recognition channel in the text recognition model to obtain a corresponding text recognition result when the language bias classification result is biased towards the second language category; the second text recognition channel has different network parameters from the first text recognition channel.
[0116] In one embodiment, the acquisition module 501 is also used to acquire an original image to be processed; fill the original image with preset content to obtain an intermediate image with a preset aspect ratio; and scale the intermediate image to obtain a text image to be recognized with a preset size.
[0117] In one embodiment, the language classification module 503 is also used to perform language classification processing on the feature map through the classification channel in the text recognition model to determine the language category to which each character appearing in the text image belongs; the language category includes a first language and a second language; a first number of characters belonging to the first language and a second number of characters belonging to the second language in the text image are counted respectively; when the first number is greater than or equal to the second number, the language bias classification result corresponding to the text image is determined to be biased towards the first language category; when the first number is less than the second number, the language bias classification result corresponding to the text image is determined to be biased towards the second language category.
[0118] In one embodiment, reference Figure 6The text recognition device 500 also includes a training module 505 for acquiring training data; the training data includes a sample text image, and a sample language bias label and a sample text recognition label corresponding to the sample text image; the sample text image includes a first sample text image and a second sample text image; the sample language bias label of the first sample text image is a label biased towards the first language; the sample language bias label of the second sample text image is a label biased towards the second language; the sample text image is subjected to feature extraction through the text recognition model to be trained to obtain a sample feature map corresponding to the sample text image; the sample feature map is subjected to language classification processing through the classification channel in the text recognition model to be trained to obtain a sample feature map corresponding to the sample text image Predicting language bias classification results; performing text recognition on a sample feature map of a first sample text image through a first text recognition channel in a text recognition model to be trained, and obtaining a sample text recognition result corresponding to the first sample text image; performing text recognition on a sample feature map of a second sample text image through a second text recognition channel in a text recognition model to be trained, and obtaining a sample text recognition result corresponding to the second sample text image; based on the difference between the predicted language bias classification results and the sample language bias labels, and the difference between the sample text recognition labels and the sample text recognition results corresponding to each sample text image, adjusting the network parameters of the text recognition model to be trained and continuing training until the training is stopped when the stopping conditions are met.
[0119] In one embodiment, the training module 505 is further used to select corresponding sample text images from the first sample text image and the second sample text image respectively, and input them into the text recognition model to be trained.
[0120] In one embodiment, the training module 505 is also used to determine the sample language category to which each character appearing in the sample text image belongs; the sample language category includes a first sample language and a second sample language; a first sample number of characters belonging to the first sample language in the sample text image and a second sample number of characters belonging to the second sample language are counted respectively; when the first sample number is greater than or equal to the second sample number, the sample language bias label corresponding to the sample text image is determined to be a label biased towards the first language; when the first sample number is less than the second sample number, the sample language bias label corresponding to the sample text image is determined to be a label biased towards the second language.
[0121] In one embodiment, the text image in the text recognition device 500 includes a vehicle text image; the vehicle text image includes at least one of the vehicle's frame number, painted license plate, nameplate, text painted on the vehicle body, and annual inspection form data of the vehicle. The method also includes: determining the corresponding vehicle information based on the text recognition result corresponding to the vehicle text image to search for vehicle inspection information corresponding to the vehicle information.
[0122] The above-mentioned text recognition device obtains a text image including at least one language text, and extracts a feature map in the text image through a text recognition model. The feature map of the text image is subjected to language classification processing through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image. Then, the feature map of the text image is subjected to text recognition processing through the text recognition channel corresponding to the language bias classification result in the text recognition model to obtain a corresponding text recognition result. In this way, different text recognition channels can be used to perform text recognition processing on text images with different language bias classification results, that is, each text recognition channel processes text images biased towards the same language category, without having to process text images of multiple language categories. Therefore, the recognition accuracy of each text recognition channel can be improved. Moreover, the text recognition processes in each text recognition channel do not interfere with each other, that is, the text recognition processes in each text recognition channel can be implemented simultaneously, therefore, not only the recognition efficiency of each text recognition channel is improved, but also the recognition accuracy is greatly improved.
[0123] For the specific definition of the text recognition device, please refer to the definition of the text recognition method above, which will not be repeated here. Each module in the above text recognition device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0124] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. The internal structure diagram thereof may be as follows: Figure 7 As shown. The computer device includes a processor, a memory and a communication interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI (Wireless Fidelity, wireless local area network), operator network, NFC (Near Field Communication, near field communication) or other technologies. When the computer program is executed by the processor, a text recognition method is implemented.
[0125] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0126] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned text recognition method. The steps of the text recognition method here may be the steps of the text recognition method in the above-mentioned various embodiments.
[0127] In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the above-mentioned text recognition method. The steps of the text recognition method here can be the steps in the text recognition method of each of the above-mentioned embodiments.
[0128] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0129] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0130] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A text recognition method, It is characterized in that The method comprises: Acquire a text image to be recognized; the text image includes texts in multiple languages; Extracting features from the text image using a text recognition model to obtain a feature map corresponding to the text image; Performing language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language biased classification result corresponding to the text image; When the language bias classification result is biased towards the first language category, performing text recognition on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result; When the language bias classification result is biased towards the second language category, performing text recognition on the feature graph through a second text recognition channel in the text recognition model to obtain a corresponding text recognition result; the second text recognition channel and the first text recognition channel have different network parameters; The text recognition model is trained by the following steps: Acquire training data; the training data includes a sample text image, and a sample language bias label and a sample text recognition label corresponding to the sample text image; the sample text image includes a first sample text image and a second sample text image; the sample language bias label of the first sample text image is a label biased towards the first language; the sample language bias label of the second sample text image is a label biased towards the second language; Extracting features of the sample text image using a text recognition model to be trained to obtain a sample feature map corresponding to the sample text image; Performing language classification processing on the sample feature graph through the classification channel in the text recognition model to be trained to obtain a predicted language bias classification result corresponding to the sample text image; Performing text recognition on the sample feature map of the first sample text image through the first text recognition channel in the text recognition model to be trained, to obtain a sample text recognition result corresponding to the first sample text image; Performing text recognition on the sample feature map of the second sample text image through the second text recognition channel in the text recognition model to be trained, to obtain a sample text recognition result corresponding to the second sample text image; Based on the difference between the predicted language bias classification result and the sample language bias label, and the difference between the sample text recognition label and the sample text recognition result corresponding to each sample text image, the network parameters of the text recognition model to be trained are adjusted and training is continued until the stopping condition is met.
2. The method according to claim 1, It is characterized in that The step of obtaining a text image to be recognized includes: Obtain the original image to be processed; Filling the original image with preset content to obtain an intermediate image with a preset aspect ratio; The intermediate image is scaled to obtain a text image to be recognized of a preset size.
3. The method according to claim 1, It is characterized in that The performing language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image includes: Performing language classification processing on the feature graph through the classification channel in the text recognition model to determine the language category to which each character appearing in the text image belongs; the language category includes a first language and a second language; respectively counting a first number of characters in the first language and a second number of characters in the second language in the text image; When the first number is greater than or equal to the second number, determining that the language bias classification result corresponding to the text image is biased towards the first language category; When the first number is less than the second number, it is determined that the language bias classification result corresponding to the text image is biased towards the second language category.
4. The method according to claim 1, It is characterized in that Before extracting features from the sample text image using the text recognition model to be trained to obtain a sample feature map corresponding to the sample text image, the step further includes: Corresponding sample text images are selected alternately from the first sample text image and the second sample text image respectively and input into the text recognition model to be trained.
5. The method according to claim 1, It is characterized in that The sample language bias label is determined by the following steps: Determine the sample language category to which each character appearing in the sample text image belongs; the sample language category includes a first sample language and a second sample language; Respectively counting a first sample number of characters in the first sample language and a second sample number of characters in the second sample language of the sample text image; When the first sample quantity is greater than or equal to the second sample quantity, determining that the sample language biased label corresponding to the sample text image is a label biased towards the first language; When the first sample quantity is smaller than the second sample quantity, it is determined that the sample language biased label corresponding to the sample text image is a label biased towards the second language.
6. The method according to any one of claims 1 to 5, It is characterized in that The text image includes a vehicle text image; the vehicle text image includes at least one of a vehicle frame number, a license plate, a vehicle nameplate, body text, and annual inspection information of the vehicle, and the method further includes: According to the text recognition result corresponding to the vehicle text image, the corresponding vehicle information is determined to search for the vehicle inspection information corresponding to the vehicle information.
7. A text recognition device, It is characterized in that The device comprises: An acquisition module, used to acquire a text image to be recognized; the text image includes texts in multiple languages; A feature extraction module, used to extract features from the text image through a text recognition model to obtain a feature map corresponding to the text image; A language classification module, used to perform language classification processing on the feature graph through the classification channel in the text recognition model to obtain a language bias classification result corresponding to the text image; A text recognition module, configured to, when the language bias classification result is biased towards the first language category, perform text recognition on the feature graph through the first text recognition channel in the text recognition model to obtain a corresponding text recognition result; The text recognition module is further configured to, when the language bias classification result is biased towards the second language category, perform text recognition on the feature graph through a second text recognition channel in the text recognition model to obtain a corresponding text recognition result; the second text recognition channel has different network parameters from the first text recognition channel; A training module is used to obtain training data; the training data includes a sample text image, and a sample language bias label and a sample text recognition label corresponding to the sample text image; the sample text image includes a first sample text image and a second sample text image; the sample language bias label of the first sample text image is a label biased towards the first language; the sample language bias label of the second sample text image is a label biased towards the second language; the sample text image is subjected to feature extraction through a text recognition model to be trained to obtain a sample feature map corresponding to the sample text image; the sample feature map is subjected to language classification processing through a classification channel in the text recognition model to be trained to obtain a predicted language bias label corresponding to the sample text image. Classification result; through the first text recognition channel in the text recognition model to be trained, text recognition is performed on the sample feature map of the first sample text image to obtain a sample text recognition result corresponding to the first sample text image; through the second text recognition channel in the text recognition model to be trained, text recognition is performed on the sample feature map of the second sample text image to obtain a sample text recognition result corresponding to the second sample text image; based on the difference between the predicted language bias classification result and the sample language bias label, and the difference between the sample text recognition label and the sample text recognition result corresponding to each sample text image, the network parameters of the text recognition model to be trained are adjusted and training is continued until the training is stopped when the stopping condition is met.
8. The device according to claim 7, It is characterized in that The acquisition module is further used to acquire an original image to be processed; fill the original image with preset content to obtain an intermediate image with a preset aspect ratio; and scale the intermediate image to obtain a text image to be recognized with a preset size.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
