Uyghur language recognition method, device, electronic device, storage medium and product

CN114332476BActive Publication Date: 2024-09-06BEIJING ZHONGKE PATTEK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111553113.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2024-09-06
Estimated Expiration
2041-12-17

Smart Images

  • Figure CN114332476B
    Figure CN114332476B
Patent Text Reader

Abstract

The present invention provides a Uyghur language recognition method, device, electronic device, storage medium and product, the method comprising the following steps: obtaining a picture to be recognized; inputting the picture to be recognized into a Uyghur language recognition model, obtaining a subword category sequence contained in the picture to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is obtained by training by inputting a Uyghur language picture sample set and a sample set category label of a subword granularity, and the subword granularity is greater than the character granularity and less than the word granularity; querying a Uyghur language subword word library according to the subword category sequence contained in the picture to be recognized, obtaining a Uyghur sentence contained in the picture to be recognized, wherein each subword in the Uyghur language subword word library corresponds to a category. The present invention can effectively solve the problems caused by the unique language characteristics of the Uyghur language in Uyghur language text recognition. Reduce the influence of the language characteristics of the Uyghur language on text recognition, and improve the accuracy of Uyghur language text recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text recognition, and in particular to a Uyghur language recognition method, device, electronic equipment, storage medium and product. Background Art

[0002] OCR (Optical Character Recognition) is the electronic or mechanical conversion of images of typed, handwritten or printed text into machine-encoded text. This text can be edited, searched, displayed online, etc., and used in machine processes such as cognitive computing, machine translation, text to speech, key data and text mining. OCR is an important and practical research area in pattern recognition, artificial intelligence and computer vision.

[0003] With the continuous development of artificial intelligence technology in recent years, using deep learning neural networks to solve OCR problems has become a mainstream method. The deep learning model based on sequence information can extract the features of the input sequence through a deep neural network, and fit and model the deep language style features, that is, learn the language's grammar, phrases, fixed collocations and other language sequence information. In recent years, deep learning models that model sequence model information based on the self-attention mechanism have received more and more attention. The self-attention mechanism is used to extract the correlation between features at different positions (times) in the input and output sequences. Compared with RNN (recurrent neural network), neural networks based on the self-attention mechanism can effectively model longer range sequence information.

[0004] The current text recognition technology for Uyghur language has the following difficulties:

[0005] 1. There is little public technical information on Uyghur text recognition. Research on Uyghur text recognition at home and abroad is still in its infancy, and no mature solutions for reference have been published.

[0006] 2. Conventional character granularity modeling and word granularity modeling are not suitable for Uyghur text recognition scenarios.

[0007] 3. The particularity of Uyghur characters makes it difficult to build neural network models.

[0008] Existing Uyghur language recognition schemes do not take into account the above difficulties and the particularity of Uyghur language, and directly apply the recognition methods of English or Chinese to Uyghur language, resulting in low recognition accuracy. Summary of the invention

[0009] The present invention provides a Uyghur language recognition method, device, electronic device, storage medium and product, which are used to solve the defect of insufficient Uyghur language recognition accuracy caused by the unique language characteristics of Uyghur language in the prior art, reduce the influence of the language characteristics of Uyghur language on text recognition, and improve the accuracy of Uyghur language text recognition.

[0010] The present invention provides a Uyghur language recognition method, comprising:

[0011] Get the image to be identified;

[0012] Input the image to be recognized into a Uyghur language recognition model, and obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, and the subword granularity is larger than a character granularity and smaller than a word granularity;

[0013] A Uyghur sub-word lexicon is queried according to the sub-word category sequence contained in the to-be-recognized image to obtain the Uyghur sentence contained in the to-be-recognized image, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category.

[0014] According to a Uyghur language recognition method provided by the present invention, the acquisition of the Uyghur language sub-word vocabulary includes:

[0015] Generate an original word library based on the Uyghur picture sample set;

[0016] Each word in the original word library is split into a character sequence, and the character sequence of each word is merged according to the occurrence frequency of each continuous byte pair in the original word library to obtain subwords of each word, and a Uyghur subword word library is obtained according to the subwords of all words.

[0017] According to a Uyghur language recognition method provided by the present invention, the Uyghur language recognition model includes a modal conversion module, and the modal conversion module is used to extract features including detail feature information and high-level semantic feature information from the Uyghur language picture sample set to obtain a first feature sequence corresponding to each Uyghur language picture, wherein the first feature sequence includes multiple positions, each position corresponding to a subword.

[0018] According to a Uyghur language recognition method provided by the present invention, the Uyghur language recognition model also includes a semantic inverse transformation module, which is used to inversely transform the spatial position of the first feature sequence to obtain a second feature sequence corresponding to each Uyghur language picture.

[0019] According to a Uyghur language recognition method provided by the present invention, the Uyghur language recognition model also includes a translation module, and the translation module is used to weight the second feature sequence according to the self-attention mechanism to obtain a third feature sequence corresponding to each Uyghur language picture.

[0020] According to a Uyghur language recognition method provided by the present invention, the Uyghur language recognition model further includes a sequence classification module, and the sequence classification module is used to obtain the category of each position contained in the third feature sequence.

[0021] The present invention also provides a Uyghur language recognition device, comprising:

[0022] The acquisition module is used to obtain the image to be identified;

[0023] A category recognition module is used to input the image to be recognized into a Uyghur language recognition model to obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, wherein the subword granularity is larger than the character granularity and smaller than the word granularity;

[0024] The output module is used to query the Uyghur sub-word lexicon according to the sub-word category sequence contained in the image to be identified, and obtain the Uyghur sentence contained in the image to be identified, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category.

[0025] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the above-mentioned Uyghur language recognition methods are implemented.

[0026] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned Uyghur language recognition methods are implemented.

[0027] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any one of the above-mentioned Uyghur language recognition methods are implemented.

[0028] The present invention provides a Uyghur language recognition method, device, electronic device, storage medium and product, which can effectively solve the problems caused by the unique language characteristics of Uyghur language in Uyghur language recognition. The influence of the language characteristics of Uyghur language on text recognition is reduced, and the accuracy of Uyghur language text recognition is improved. When training the Uyghur language recognition model, a subword granularity word library is established, which can effectively model the language time sequence information of the training data while reducing the data annotation cost, and greatly alleviate the phenomenon of exceeding the word library. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1 It is a flowchart of a Uyghur language recognition method provided by an embodiment of the present invention;

[0031] Figure 2 is a schematic diagram of the structure of a modal conversion module provided by an embodiment of the present invention;

[0032] Figure 3 is a schematic diagram of the submodule structure of the modal conversion module provided in an embodiment of the present invention;

[0033] Figure 4 It is a flowchart of the Uyghur language recognition model training process provided by an embodiment of the present invention;

[0034] Figure 5 is a schematic diagram of the structure of a Uyghur language recognition device provided by an embodiment of the present invention;

[0035] Figure 6 is a schematic diagram of recognition results provided by an embodiment of the present invention;

[0036] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] Modeling sequences based on different granularities has different effects on model training and reasoning. The choice of modeling granularity should be based on the following two points: 1. It can reflect the semantic information of this language; 2. It ensures the availability of the model, that is, the model can converge from the training perspective, and the model is easy to deploy and use from the reasoning perspective. If the modeling granularity is too small, the model cannot learn the language temporal information contained in the smallest semantic unit of this language, and the training data is not fully utilized. And because each time step can only predict one minimum modeling unit, the reasoning time of the model will also be greatly increased, resulting in low availability.

[0039] Due to the particularity of Uyghur characters, the commonly used character-level and word-level granularity modeling are not applicable to Uyghur character recognition scenarios. Character-level granularity modeling treats each character as a separate modeling unit. For English, character-level granularity modeling is to model a single letter; for Chinese, character-level granularity modeling is to model a single Chinese character. At present, the industry uses character-level granularity modeling for Latin (English) and Sino-Tibetan (Chinese) character image recognition tasks. However, due to the small number of public datasets for Uyghur text images and the high cost of labeling Uyghur text image data, the labeling cost of Uyghur character-level data required for training character granularity models is even higher. At present, the labeling of Uyghur text image data usually adopts sentence-level labeling. Therefore, it is difficult to provide sufficient training data to support the training of character granularity modeling models. The training of the model is often in an underfitting state, and it is difficult to obtain good recognition performance. Word-level granularity modeling is to model each word in the language. Since Uyghur is an agglutinative language in terms of grammar, grammatical functions are realized by attaching different affixes to the front, middle and back of the root, which makes the vocabulary of Uyghur words very large. According to reference statistics, the total number of Uyghur words exceeds 100 million, and the number of commonly used words exceeds 200,000. Therefore, if word granularity is used for modeling, such a large vocabulary will make the classifier parameters huge and the model difficult to converge. And because the modeling granularity is large (word granularity), for the model, it is necessary to associate features with a larger range of image areas (an entire Uyghur word area), which greatly increases the difficulty of modeling, making it difficult for the model to converge and affecting recognition performance. In addition, if word granularity modeling is adopted, a large-scale vocabulary needs to be established to cover as many words as possible. This approach will easily lead to OOV (out of vocabulary) phenomenon when facing texts in different fields.

[0040] Based on the above difficulties, the embodiment of the present invention proposes a Uyghur language recognition method. Figure 1-Figure 4 To describe, the present invention comprises the following steps:

[0041] Step 101: Obtain a picture to be identified;

[0042] Step 102: input the image to be recognized into a Uyghur language recognition model to obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, and the subword granularity is larger than a character granularity and smaller than a word granularity;

[0043] Step 103: query a Uyghur sub-word lexicon according to the sub-word category sequence contained in the image to be identified, and obtain the Uyghur sentence contained in the image to be identified, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category.

[0044] It should be noted that the Uyghur sentence contained in the image to be recognized may be a whole natural sentence or an incomplete natural sentence, such as 1.2 or 0.7 natural sentences.

[0045] The Uyghur language recognition method of the embodiment of the present invention can combine the characteristics of Uyghur language and select a subword granularity between character granularity and word granularity for modeling sample data for the Uyghur language image recognition task through word segmentation operation. While reducing the data annotation cost, it can effectively model the language time sequence information of the training data and greatly alleviate the phenomenon of exceeding the vocabulary. Although the present invention is mainly aimed at the field of Uyghur language recognition, it is also of reference significance for other similar fields.

[0046] In at least one embodiment of the present invention, the Uyghur language picture sample set is obtained by the following method:

[0047] Prepare a large amount of labeled text image data of different categories as the Uyghur image sample set. It mainly includes the following 11 categories: livelihood, culture, entertainment, sports, finance, real estate, automobiles, education, technology, tourism, and agriculture. Collect 10,000 text image data for each category to ensure that text images in various fields of Uyghur are covered as much as possible. Divide these data into development set and training set at a ratio of 1:5.

[0048] Preferably, the text images in the training set and the development set are reduced in height to 32 pixels while maintaining the original aspect ratio of the images.

[0049] In at least one embodiment of the present invention, the acquisition of the Uyghur sub-word database includes:

[0050] Step 201: Generate an original word library according to a Uyghur picture sample set, wherein the original word library is a large-scale original word library;

[0051] Step 202: split each word in the original vocabulary into a character sequence, merge the character sequence of each word according to the occurrence frequency of each continuous byte pair in the original vocabulary to obtain subwords of each word, and obtain a Uyghur subword vocabulary based on the subwords of all words.

[0052] It should be noted that the differences between Uyghur vocabulary categories are small. The small differentiation of Uyghur vocabulary is not only due to the small differences in the shapes of Uyghur letters, but also due to its agglutinative grammatical type. For example, Uyghur vocabulary and As shown in the figure, the roots are the same, but the meanings are different due to different affixes. However, from the perspective of glyphs, most of the structures (root parts) of these two Uyghur words are the same, and only a small part (affix part) is different, so their feature information is very similar. However, for neural networks, these two Uyghur words are two separate classes in terms of semantics. For neural networks, the premise for the model to correctly fit the data is that the training data has a large inter-class difference, that is, the data itself is highly separable. The Uyghur vocabulary has a small feature distinction, which makes its inter-class difference small, making modeling difficult.

[0053] Therefore, the establishment of the Uyghur sub-word vocabulary in the embodiment of the present invention takes into account the particularity of Uyghur characters to the greatest extent, adopts sub-words rather than words as the smallest processing unit, expands the inter-class differences during Uyghur recognition training, and thus improves the recognition accuracy.

[0054] In at least one embodiment of the present invention, in step 202, each word in the original vocabulary is split into character sequences, and the character sequences of each word are merged according to the occurrence frequency of each consecutive byte pair in the original vocabulary to obtain subwords of each word, including the following steps:

[0055] Step 2021: Determine the subword granularity vocabulary size.

[0056] Step 2022: Count the occurrence frequency of each consecutive byte pair in the original word library and save it as an intermediate encoding file;

[0057] Step 2023: split the word into character sequences, and merge new subwords according to the intermediate encoding file, wherein the byte pairs with the highest frequency are merged first;

[0058] Step 2024: Repeat step 2023 until the sub-word vocabulary size set in step 2021 is reached or the frequency of occurrence of the next highest frequency byte pair is 1.

[0059] After completing the above steps, a Uyghur sub-word vocabulary with a specified sub-word granularity can be obtained.

[0060] In at least one embodiment of the present invention, the sample set category labels are obtained by recoding the training set labels through the Uyghur sub-word lexicon, including:

[0061] For each Uyghur word in each training data label, an encoding operation based on the subword granularity vocabulary is performed, and the encoding results of the subword granularity vocabulary are arranged in sequence according to the original Uyghur training label order to make the order of the subwords meet the order of the original words in the sentence, and the final training data label is obtained.

[0062] Example: Uyghur word After encoding with the subword granularity word library (word library size 5000), the label value is [4090,51,433]

[0063] The comparison of training data label encoding based on different granularity lexicons and different size lexicons at subword granularity is shown in Table 1:

[0064] Table 1 Comparison of training data label encoding effects

[0065]

[0066] In at least one embodiment of the present invention, the Uyghur recognition model includes a modal conversion module, which is used to perform feature extraction on the Uyghur picture sample set including detail feature information and high-level semantic feature information to obtain a first feature sequence corresponding to each Uyghur picture, wherein the first feature sequence includes multiple positions, each position corresponding to a subword.

[0067] It should be noted that the modal conversion module converts the input two-dimensional text image into a one-dimensional feature sequence. Because the Uyghur characters have strong particularity, specifically, the Uyghur letters are rich in details, simple in shape and small in difference. and As shown in the figure, it is composed of "dots" and curves. The difference in the glyphs of these two Uyghur letters with different meanings is only reflected in a "dot" and the arc of the curve. And the detailed features that distinguish these two letters occupy fewer pixels in the original image. Since ordinary convolutional neural networks downsample the original image data during feature extraction, the size of the feature array is continuously reduced in the deep network structure, and the extracted features are difficult to retain these distinctive original detailed information, so it is difficult to accurately and effectively model different Uyghur letters.

[0068] Therefore, the Uyghur language recognition method of the embodiment of the present invention can fully utilize the detail feature information of the Uyghur word shape and the high-level semantic feature information extracted by the deep neural network by fusing the high detail-low semantic features extracted by the low-layer convolutional neural network with the low detail-high semantic features extracted by the high-layer convolutional neural network, thereby improving the model recognition accuracy.

[0069] Preferably, Figure 2 As shown in , the modality conversion module is composed of 8 stacked submodules. Each submodule consists of two convolutional layers with 64 channels, and downsamples the input feature map in width and height, as shown in Figure 3As shown in the figure. The outputs of the 8 submodules are aligned through upsampling and downsampling operations, and the channels are stacked to output a feature array with 512 channels. At the same time, considering that in Uyghur text images, the shape of Uyghur subwords is often rectangular, and the aspect ratio is greater than 1. Therefore, in order to better associate the image feature information within the subword range, the convolution kernel size is set to a rectangular convolution kernel of (3, 5) or (3, 7) in the modal conversion module.

[0070] In at least one embodiment of the present invention, the Uyghur language recognition model further includes a semantic inverse transformation module, which is used to inversely transform the spatial position of the first feature sequence to obtain a second feature sequence corresponding to each Uyghur language picture.

[0071] It should be noted that the writing order of Uyghur is from right to left, so the order of the text on the text image is also arranged from right to left. However, for computers, the indexes of the image data (array) stored in the memory are arranged in order from left to right, that is, the pixel value storage address index (index) of the leftmost pixel of the image is 0, and the pixel value storage address index (index) to the right is 1, 2, 3... For a neural network based on sequence information, on its timeline, the first information received is the information of the leftmost pixel (the end of the Uyghur sentence), and then to the right, the last information received is the information of the rightmost pixel (the head of the Uyghur sentence). Therefore, the model is modeling the reverse Uyghur text. Although this modeling method can learn certain language timing information (reverse order), compared with the correct language timing information (normal word order), the reverse timing information is "deformed" and damages the performance of the model.

[0072] Therefore, the Uyghur language recognition method of the embodiment of the present invention can make the spatial arrangement order of information in the one-dimensional feature array conform to the real logical order in the language through the semantic inverse transformation module, so that the model can learn the correct language time sequence information and improve the recognition accuracy.

[0073] Preferably, the semantic inverse transformation module is built after the modal conversion and consists of a 1×1 convolution layer. The convolution kernel size is set to (1, 1), the stride is 1, and the convolution operation is performed in reverse from the end of the input one-dimensional feature array. The semantic information is spatially inverted.

[0074] In at least one embodiment of the present invention, the Uyghur language recognition model further includes a translation module, which is used to weight the second feature sequence according to a self-attention mechanism to obtain a third feature sequence corresponding to each Uyghur language picture.

[0075] It should be noted that each position in the third sequence can establish a certain connection with the global feature, and this connection is the learned weight. The embodiment of the present invention can achieve better recognition effect by extracting the features (information) of each position itself through the self-attention mechanism.

[0076] The Uyghur language recognition method of the embodiment of the present invention can extract the correlation between the features at different positions (times) in the sequence through a translation module, and the translation module in this embodiment is a self-attention module based on Transformer. The text image recognition task is converted into a sequence generation task through the CNN-self-attention mechanism joint network. It combines the ability of convolutional neural network to extract spatial information features of images with the ability of self-attention mechanism to model the natural sequence information features of image text, fully utilizes training data, and improves the recognition accuracy of the model.

[0077] In at least one embodiment of the present invention, the Uyghur language recognition model further includes a sequence classification module, and the sequence classification module is used to obtain the category of each position contained in the third feature sequence.

[0078] It should be noted that the prediction of the results of the deep learning model based on sequence information modeling follows the logical relationship of sequence, that is, it is driven by the timeline, and each time step predicts the result of the current position (the smallest modeling unit). By building a sequence information classification module, the output result sequence of the self-attention mechanism can be classified to obtain the final prediction result.

[0079] Preferably, the sequence classification module includes two fully connected layers. The number of input neurons of the first fully connected layer is 512, and the number of output neurons is 4096. The number of input neurons of the second fully connected layer is 4096, and the number of output neurons is the size of the subword vocabulary.

[0080] The Uyghur language recognition method of the embodiment of the present invention can reduce the number of model parameters and speed up the inference speed by combining the sequence information classification module of the subword granularity vocabulary.

[0081] Preferably, the training of the Uyghur language recognition model of the present invention can be considered to be completed when the loss value is lower than 1e-5.

[0082] like Figure 4 As shown, the Uyghur language recognition model of the embodiment of the present invention is composed of a modal conversion module, a semantic inverse transformation module, a translation module, and a sequence information classification module stacked in sequence. Among them, the modal conversion module and the semantic inverse transformation module are CNN layers, the translation module is a self-attention module based on Transformer, and the sequence information classification module is a fully connected layer.

[0083] The Uyghur language recognition device provided by the present invention is described below. The Uyghur language recognition device described below and the Uyghur language recognition method described above can be referenced to each other.

[0084] like Figure 5 The figure shows a Uyghur language recognition device disclosed in an embodiment of the present invention, comprising:

[0085] The acquisition module 501 is used to obtain the image to be identified;

[0086] A category recognition module 502 is used to input the image to be recognized into a Uyghur language recognition model to obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, wherein the subword granularity is larger than the character granularity and smaller than the word granularity;

[0087] The output module 503 is used to query the Uyghur sub-word lexicon according to the sub-word category sequence contained in the image to be identified, and obtain the Uyghur sentence contained in the image to be identified, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category.

[0088] The Uyghur language recognition device of the embodiment of the present invention can combine the characteristics of Uyghur language and select the subword granularity between the character granularity and the word granularity for the Uyghur language image recognition task through the word segmentation operation to model the sample data. While reducing the data annotation cost, it can effectively model the language time sequence information of the training data and greatly alleviate the phenomenon of exceeding the vocabulary. Although the present invention is mainly aimed at the field of Uyghur language recognition, it is also of reference significance for other similar fields.

[0089] In at least one embodiment of the present invention, after obtaining the trained Uyghur language recognition model, unlabeled test text image data is prepared according to business requirements, the collected text images are reduced in height to 32 pixels while maintaining the original aspect ratio of the images, reasoning is performed on the text images to be recognized, and a label sequence contained in the images to be recognized is obtained. The label sequence is used as an index to search in the Uyghur sub-word database to obtain a final recognition result, such as Figure 6 shown.

[0090] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the Uyghur language recognition method, which includes:

[0091] Get the image to be identified;

[0092] Input the image to be recognized into a Uyghur language recognition model, and obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, and the subword granularity is larger than a character granularity and smaller than a word granularity;

[0093] A Uyghur sub-word lexicon is queried according to the sub-word category sequence contained in the to-be-recognized image to obtain the Uyghur sentence contained in the to-be-recognized image, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category.

[0094] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0095] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the Uyghur language recognition method provided by the above methods, the method includes:

[0096] Get the image to be identified;

[0097] Input the image to be recognized into a Uyghur language recognition model, and obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, and the subword granularity is larger than a character granularity and smaller than a word granularity;

[0098] A Uyghur sub-word lexicon is queried according to the sub-word category sequence contained in the to-be-recognized image to obtain the Uyghur sentence contained in the to-be-recognized image, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category.

[0099] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the Uyghur language recognition method provided by the above methods, the method comprising:

[0100] Get the image to be identified;

[0101] Input the image to be recognized into a Uyghur language recognition model, and obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, and the subword granularity is larger than a character granularity and smaller than a word granularity;

[0102] A Uyghur sub-word lexicon is queried according to the sub-word category sequence contained in the to-be-recognized image to obtain the Uyghur sentence contained in the to-be-recognized image, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category.

[0103] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A Uyghur language recognition method, characterized in that: include: Get the image to be identified; Input the image to be recognized into a Uyghur language recognition model, and obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, and the subword granularity is larger than a character granularity and smaller than a word granularity; Querying a Uyghur sub-word lexicon according to the sub-word category sequence contained in the image to be identified, to obtain the Uyghur sentence contained in the image to be identified, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category; The Uyghur language recognition model includes a modal conversion module, which is used to perform feature extraction including detail feature information and high-level semantic feature information on the Uyghur language picture sample set to obtain a first feature sequence corresponding to each Uyghur language picture, wherein the first feature sequence includes multiple positions, each position corresponding to a subword; The Uyghur language recognition model further includes a semantic inverse transformation module, which is used to inversely transform the spatial position of the first feature sequence to obtain a second feature sequence corresponding to each Uyghur language picture; The Uyghur language recognition model further includes a translation module, which is used to weight the second feature sequence according to a self-attention mechanism to obtain a third feature sequence corresponding to each Uyghur language picture; The Uyghur language recognition model further includes a sequence classification module, and the sequence classification module is used to obtain the category of each position contained in the third feature sequence.

2. The Uyghur language recognition method according to claim 1, characterized in that: The acquisition of the Uyghur subword database includes: Generate an original word library based on the Uyghur picture sample set; Each word in the original word library is split into a character sequence, and the character sequence of each word is merged according to the occurrence frequency of each continuous byte pair in the original word library to obtain subwords of each word, and a Uyghur subword word library is obtained according to the subwords of all words.

3. A Uyghur language recognition device, characterized in that: include: The acquisition module is used to obtain the image to be identified; A category recognition module is used to input the image to be recognized into a Uyghur language recognition model to obtain a subword category sequence contained in the image to be recognized output by the Uyghur language recognition model, wherein the Uyghur language recognition model is trained by inputting a Uyghur language image sample set and a sample set category label of a subword granularity, wherein the subword granularity is larger than the character granularity and smaller than the word granularity; An output module, configured to query a Uyghur sub-word lexicon according to a sub-word category sequence contained in the image to be identified, to obtain a Uyghur sentence contained in the image to be identified, wherein each sub-word in the Uyghur sub-word lexicon corresponds to a category; The Uyghur language recognition model includes a modal conversion module, which is used to perform feature extraction including detail feature information and high-level semantic feature information on the Uyghur language picture sample set to obtain a first feature sequence corresponding to each Uyghur language picture, wherein the first feature sequence includes multiple positions, each position corresponding to a subword; The Uyghur language recognition model further includes a semantic inverse transformation module, which is used to inversely transform the spatial position of the first feature sequence to obtain a second feature sequence corresponding to each Uyghur language picture; The Uyghur language recognition model further includes a translation module, which is used to weight the second feature sequence according to a self-attention mechanism to obtain a third feature sequence corresponding to each Uyghur language picture; The Uyghur language recognition model further includes a sequence classification module, and the sequence classification module is used to obtain the category of each position contained in the third feature sequence.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the Uyghur language recognition method as claimed in claim 1 or 2 are implemented.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the Uyghur language recognition method as claimed in claim 1 or 2 are implemented.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the Uyghur language recognition method as claimed in claim 1 or 2 are implemented.