Text recognition method, device, computer-readable medium and electronic device

By extracting and obtaining the character position of Arabic character characters, combining the set character association relationship, the recognition results are generated, and the problems of inaccurate and unreadable recognition in the prior art are solved, and text recognition with high accuracy and readability are achieved.

CN113569567BActive Publication Date: 2025-07-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110129547.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-29
Publication Date
2025-07-18
Estimated Expiration
2041-01-29

AI Technical Summary

Technical Problem

The existing Arabic character and text recognition technology has problems such as inaccurate recognition results, inconsistent with writing rules and lack of readability, especially when identifying texts such as Uyghur, Kazakh and Kirgiz.

Method used

By extracting and obtaining character positions for the recognized text, the associated characters of each character are determined based on the set character association relationship, and the recognition results are generated based on the position of the characters in the text, and character recognition rules are used to improve the recognition accuracy and readability.

Benefits of technology

It improves the accuracy of text recognition, ensures the readability of the recognition results, and complies with writing rules, especially when identifying texts such as Uyghur, Kazakh and Kirgiz.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113569567B_ABST
    Figure CN113569567B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a text recognition method, apparatus, computer-readable medium, and electronic device. The text recognition method includes: extracting characters and obtaining character positions from the text to be recognized, so as to obtain a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized; obtaining associated characters of each character based on a set character association relationship; determining recognition results corresponding to each character according to the associated characters of each character and the positions of each character in the text to be recognized; and generating a text recognition result for the text to be recognized according to the recognition results corresponding to each character. The technical solution of the embodiments of the present application improves the accuracy of text recognition and at the same time ensures the readability of the text recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer and communication technologies, and in particular, to a text recognition method, apparatus, computer-readable medium, and electronic device. Background Art

[0002] Currently, there are approximately more than 60 ethnic groups in the world whose writing is based on Arabic characters, such as Uyghur, Kazakh, and Kirgiz. The Uyghur, Kazakh, Kirgiz and other characters written using the Arabic character set are all composed of 30 to 40 basic letters. According to their different positions in a word, the basic characters have different variant forms. In the process of forming a word, the basic characters will select appropriate variant forms to be connected.

[0003] With the increasing number of users of Uyghur, Kazakh, Kirgiz and other characters, the research on related character recognition technologies has also become an urgent need for the development of various text information processing systems. However, existing recognition technologies often have many problems, such as the recognized letters are not connected, do not conform to the writing rules, and the recognition results are not readable. Summary of the Invention

[0004] Embodiments of the present application provide a text recognition method, apparatus, computer-readable medium, and electronic device, which can at least overcome defects such as low accuracy and unreadability of text recognition results to a certain extent.

[0005] Other features and advantages of the present application will become apparent through the following detailed description, or will be learned in part through the practice of the present application.

[0006] According to one aspect of the embodiments of the present application, a text recognition method is provided, including: performing character extraction and character position acquisition on a text to be recognized to obtain a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized; obtaining associated characters of each character based on a set character association relationship; determining a recognition result corresponding to each character according to the associated characters of each character and the position of each character in the text to be recognized; and generating a text recognition result for the text to be recognized according to the recognition results corresponding to each character.

[0007] According to one aspect of the embodiments of the present application, there is provided a text recognition device, including: a processing unit configured to perform character extraction and character position acquisition on the text to be recognized, so as to obtain a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized; an acquisition unit configured to acquire associated characters of each character based on a set character association relationship; a determination unit configured to determine a recognition result corresponding to each character according to the associated characters of each character and the position of each character in the text to be recognized; and a generation unit configured to generate a text recognition result for the text to be recognized according to the recognition result corresponding to each character.

[0008] In some embodiments of the present application, based on the foregoing solution, the determination unit is configured to: if there is a first type of character among the plurality of characters, then based on the position of the first type of character in the text to be recognized, according to at least one of the independent character, the front-connected character, the double-connected character, and the rear-connected character associated with the first type of character, and the position of the first type of character in the text to be recognized, determine the recognition result corresponding to the first type of character, where the first type of character is a character whose associated characters include the independent character, the front-connected character, the double-connected character, and the rear-connected character; wherein, the double-connected character is a character that can be connected to the characters at the adjacent front and rear positions, the independent character is a character that cannot be connected to the characters at the adjacent front and rear positions, the front-connected character is a character that is only connected to the character at the adjacent front position, and the rear-connected character is a character that is only connected to the character at the adjacent rear position.

[0009] In some embodiments of the present application, based on the foregoing solution, the determining unit includes: a first determining subunit configured to, if it is determined that there are characters at both the front and rear adjacent positions of the first type of character according to the position of the first type of character in the text to be recognized, determine the recognition result corresponding to the first type of character according to the double-connected character associated with the first type of character and the rear-connected character associated with the first type of character; a second determining subunit configured to, if it is determined that there is a character at the front adjacent position of the first type of character and there is no character at the rear adjacent position according to the position of the first type of character in the text to be recognized, determine the recognition result corresponding to the first type of character according to the independent character associated with the first type of character and the front-connected character associated with the first type of character; a third determining subunit configured to, if it is determined that there is no character at the front adjacent position of the first type of character and there is a character at the rear adjacent position according to the position of the first type of character in the text to be recognized, use the rear-connected character associated with the first type of character as the recognition result corresponding to the first type of character; a fourth determining subunit configured to, if it is determined that there are no characters at both the front and rear adjacent positions of the first type of character according to the position of the first type of character in the text to be recognized, use the independent character associated with the first type of character as the recognition result corresponding to the first type of character.

[0010] In some embodiments of the present application, based on the foregoing solution, the first determining subunit is configured to: obtain the recognition result corresponding to the character at the front adjacent position of the first type of character; if the recognition result corresponding to the character at the front adjacent position of the first type of character is the double-connected character or the rear-connected character, use the double-connected character associated with the first type of character as the recognition result corresponding to the first type of character; if the recognition result corresponding to the character at the front adjacent position of the first type of character is the independent character or the front-connected character, use the rear-connected character associated with the first type of character as the recognition result corresponding to the first type of character.

[0011] In some embodiments of the present application, based on the foregoing solution, the second determining subunit is configured to: obtain the recognition result corresponding to the character at the front adjacent position of the first type of character; if the recognition result corresponding to the character at the front adjacent position of the first type of character is the double-connected character or the rear-connected character, use the front-connected character associated with the first type of character as the recognition result corresponding to the first type of character; if the recognition result corresponding to the character at the front adjacent position of the first type of character is the independent character or the front-connected character, use the independent character associated with the first type of character as the recognition result corresponding to the first type of character.

[0012] In some embodiments of the present application, based on the foregoing solution, the determining unit is configured to: if there is a second type of character among the multiple characters, then based on the position of the second type of character in the text to be recognized, determine the recognition result corresponding to the second type of character according to at least one of the independent character associated with the second type of character and the pre-connected character associated with the second type of character, where the second type of character is a character among the associated characters that includes the independent character and the pre-connected character; wherein, the independent character is a character that cannot be connected to the characters at the adjacent front and rear positions, and the pre-connected character is a character that is only connected to the character at the adjacent front position.

[0013] In some embodiments of the present application, based on the foregoing solution, the determining unit includes: a fifth determining subunit, configured to if it is determined according to the position of the second type of character in the text to be recognized that there is a character at the adjacent front position of the second type of character, and there is no character at the adjacent rear position or there are characters at both the adjacent front and rear positions of the second type of character, then determine the recognition result corresponding to the second type of character according to the independent character associated with the second type of character and the pre-connected character associated with the second type of character; a sixth determining subunit, configured to if it is determined according to the position of the second type of character in the text to be recognized that there is no character at the adjacent front position of the second type of character, and there is a character at the adjacent rear position or there are no characters at both the adjacent front and rear positions of the second type of character, then use the independent character associated with the second type of character as the recognition result corresponding to the second type of character.

[0014] In some embodiments of the present application, based on the foregoing solution, the fifth determining subunit is configured to: obtain the recognition result corresponding to the character at the adjacent front position of the second type of character; if the recognition result corresponding to the character at the adjacent front position of the second type of character is the double-connected character or the post-connected character, then use the pre-connected character associated with the second type of character as the recognition result corresponding to the second type of character; if the recognition result corresponding to the character at the adjacent front position of the second type of character is the independent character or the pre-connected character, then use the independent character associated with the second type of character as the recognition result corresponding to the second type of character.

[0015] In some embodiments of the present application, based on the foregoing solution, the determining unit is configured to: if there is a third type of character among the multiple characters, based on the position of the third type of character in the text to be recognized, determine the recognition result corresponding to the third type of character according to at least one of the pre-connected character associated with the third type of character and the third type of character, where the third type of character is a character in the associated characters that only contains the pre-connected character; wherein, the pre-connected character is a character that is only connected to the character in the immediately adjacent previous position.

[0016] In some embodiments of the present application, based on the foregoing solution, the determining unit includes: a seventh determining subunit, configured to, if it is determined according to the position of the third type of character in the text to be recognized that there is a character in the immediately adjacent previous position of the third type of character, and there is no character in the immediately adjacent next position or there are characters in both the immediately adjacent previous and next positions of the third type of character, determine the recognition result corresponding to the third type of character according to the pre-connected character associated with the third type of character and the third type of character; an eighth determining subunit, configured to, if it is determined according to the position of the third type of character in the text to be recognized that there is no character in the immediately adjacent previous position of the third type of character, and there is a character in the immediately adjacent next position or there are no characters in both the immediately adjacent previous and next positions of the third type of character, directly use the third type of character as the recognition result corresponding to the third type of character.

[0017] In some embodiments of the present application, based on the foregoing solution, the seventh determining subunit is configured to: obtain the recognition result corresponding to the character in the immediately adjacent previous position of the third type of character; if the recognition result corresponding to the character in the immediately adjacent previous position of the third type of character is the double-connected character or the post-connected character, use the pre-connected character associated with the third type of character as the recognition result corresponding to the third type of character; if the recognition result corresponding to the character in the immediately adjacent previous position of the third type of character is the independent character or the pre-connected character, directly use the third type of character as the recognition result corresponding to the third type of character.

[0018] In some embodiments of the present application, based on the foregoing solution, the determining unit is configured to: if the target character among the plurality of characters does not have the associated character, directly use the target character as the recognition result corresponding to the target character; the generating unit is configured to: adjust the position of the target character in the plurality of consecutive characters to the first position among the plurality of consecutive characters to obtain a new position order of the plurality of consecutive characters; according to the new position order, connect the recognition results corresponding to the target character and the other characters except the target character among the plurality of consecutive characters to generate the word included in the text to be recognized; according to the word included in the text to be recognized, generate a text recognition result for the text to be recognized.

[0019] According to one aspect of the embodiments of the present application, there is provided a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, it implements the text recognition method as described in the above embodiments.

[0020] According to one aspect of the embodiments of the present application, there is provided an electronic device, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the text recognition method as described in the above embodiments.

[0021] According to one aspect of the embodiments of the present application, there is provided a computer program product or a computer program, the computer program product or the computer program including computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the text recognition method provided in the above various alternative embodiments.

[0022] In the technical solutions provided by some embodiments of the present application, by performing character extraction and character position acquisition on the text to be recognized, a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized are obtained. Then, based on the set character association relationship, the associated characters of each character can be obtained. After obtaining the associated characters of each character, the recognition result corresponding to each character can be determined according to the associated characters of each character and the position of each character in the text to be recognized. Finally, according to the recognition results corresponding to each character, a text recognition result for the text to be recognized can be generated. The technical solution of the embodiment of the present application determines a character recognition rule, that is, after obtaining a plurality of characters included in the text to be recognized, the recognition result corresponding to each character can be determined according to the associated characters of each character and the position of each character in the text to be recognized. Compared with the prior art solutions, due to the lack of a character recognition rule, directly obtaining the text recognition result based on the obtained characters leads to defects such as low accuracy of the text recognition result, lack of readability, and non-compliance with writing rules. The technical solution of the embodiment of the present application can improve the accuracy of text recognition and ensure the readability of the text recognition result.

[0023] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:

[0025] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied;

[0026] Figure 2 A flowchart showing a text recognition method according to an embodiment of the present application;

[0027] Figure 3 A flowchart showing a text recognition method according to an embodiment of the present application;

[0028] Figure 4 A flowchart showing a text recognition method according to an embodiment of the present application;

[0029] Figure 5 A flowchart showing a text recognition method according to an embodiment of the present application;

[0030] Figure 6 The flowchart of a text recognition method according to an embodiment of the present application is shown;

[0031] Figure 7 The schematic diagram of Kazakh characters is shown;

[0032] Figure 8 The comparison schematic diagram of the recognition results of the text recognition method according to an embodiment of the present application applied to the Kazakh scenario is shown;

[0033] Figure 9 The block diagram of a text recognition device according to an embodiment of the present application is shown;

[0034] Figure 10 The schematic diagram of the structure of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown. Detailed implementation manners

[0035] Now, the exemplary embodiments will be described more comprehensively with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present application will be more complete and comprehensive, and the concept of the exemplary embodiments will be fully conveyed to those skilled in the art.

[0036] In addition, the described features, structures or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present application. However, those skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid obscuring aspects of the present application.

[0037] It should be noted that the terms used in the description and claims of the present application and the above drawings are only for describing the embodiments and are not intended to limit the scope of the present application. It should be understood that the terms "including", "comprising", "having", etc. are used herein to specify the presence of the stated features, wholes, steps, operations, elements, components and / or their groups, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their groups.

[0038] It will be further understood that although the terms "first", "second", "third", etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the present invention, a first element may be referred to as a second element. Similarly, a second element may be referred to as a first element. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0039] The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0040] The flowcharts shown in the drawings are only exemplary illustrations, and do not necessarily include all contents and operations / steps, nor are they necessarily executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.

[0041] It should be noted that: "a plurality of" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0042] The embodiments of the present application relate to artificial intelligence (AI) and machine learning technologies, and are designed based on natural language processing (NLP) technology and machine learning (ML) in artificial intelligence.

[0043] Artificial intelligence is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, a theory, method, technology and application system that perceives the environment, acquires knowledge and uses knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making. Artificial intelligence technology mainly includes several major directions such as computer vision technology, natural language processing technology, and machine learning / deep learning.

[0044] With the research and progress of artificial intelligence technology, artificial intelligence has been studied and applied in many fields, such as common smart homes, intelligent customer service, virtual assistants, smart speakers, intelligent marketing, driverless, autonomous driving, robots, intelligent healthcare, etc. It is believed that with the development of technology, artificial intelligence will be applied in more fields and play an increasingly important role.

[0045] Machine learning is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning.

[0046] Natural language processing technology is an important direction in the field of computer science and artificial intelligence. Its research focuses on various theories and methods that can enable effective communication between humans and computers using natural language. Natural language processing is a science that combines linguistics, computer science, and mathematics. Therefore, the research in this field will involve natural language, that is, the language people use in daily life, so it has a close connection with the research of linguistics. Natural language processing technology usually includes technologies such as text processing, semantic understanding, machine translation, robot question answering, and knowledge graphs.

[0047] Text processing is the main process in natural language processing technology and can be widely applied in various application scenarios. Identifying ethnic minority languages in text is an important part of text processing. For example, in a text containing Kazakh language characters, if the Kazakh language characters can be accurately identified, it is beneficial to correctly understand the text and conduct research and analysis on the text.

[0048] Based on this, an embodiment of the present application proposes a text recognition method. By performing character extraction and character position acquisition on the text to be recognized, a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized are obtained. Then, based on the set character association relationship, the associated characters of each character can be obtained. After obtaining the associated characters of each character, the recognition result corresponding to each character can be determined according to the associated characters of each character and the position of each character in the text to be recognized. Finally, according to the recognition results corresponding to each character, a text recognition result for the text to be recognized can be generated. The technical solution of the embodiment of the present application determines a character recognition rule, that is, after obtaining a plurality of characters included in the text to be recognized, the recognition result corresponding to each character can be determined according to the associated characters of each character and the position of each character in the text to be recognized. Compared with the defects in the prior art solutions, such as low accuracy of the text recognition result, unreadability of the text recognition result, and non-compliance with writing rules due to the lack of a character recognition rule, the technical solution of the embodiment of the present application improves the accuracy of text recognition and at the same time ensures the readability of the text recognition result.

[0049] Figure 1 The figure shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied.

[0050] As Figure 1 shown, the system architecture 100 may include a terminal device 102, a network, and a server 104. The network is used to provide a medium for a communication link between the terminal device 102 and the server 104. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0051] The terminal device 102 may be various electronic devices with a display screen, including but not limited to smartphones, tablets, laptop portable computers, and desktop computers, etc. The server 104 may be an independent physical server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0052] The text recognition method provided by the embodiments of the present application is generally executed by the server 104. Correspondingly, the text recognition device is generally disposed in the server 104. However, those skilled in the art can easily understand that the text recognition method provided by the embodiments of the present application can also be executed by the terminal device 102. Correspondingly, the text recognition device can also be disposed in the terminal device 102. No special limitation is made in this exemplary embodiment. For example, in an exemplary embodiment, the user can upload the text to be recognized to the server 104 through the terminal device 102, and the server 104 processes the text through the text recognition method provided by the embodiments of the present application, and sends the obtained text recognition result to the terminal device 102.

[0053] It should be understood that Figure 1 the numbers of the terminal devices, networks, and servers in are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. For example, the server 105 can be a server cluster composed of multiple servers, etc.

[0054] The implementation details of the technical solutions of the embodiments of the present application are elaborated in detail below:

[0055] Figure 2 The flowchart of the text recognition method according to an embodiment of the present application is shown. The text recognition method can be executed by a server, and the server can be Figure 1 the server shown in. Refer to Figure 2 As shown, the text recognition method at least includes the following steps:

[0056] Step S210: Extract characters and obtain the positions of characters from the text to be recognized, so as to obtain multiple characters included in the text to be recognized and the positions of each character in the text to be recognized;

[0057] Step S220: Obtain the associated characters of each character based on the set character association relationship;

[0058] Step S230: Determine the recognition result corresponding to each character according to the associated characters of each character and the position of each character in the text to be recognized;

[0059] Step S240: Generate a text recognition result for the text to be recognized according to the recognition result corresponding to each character.

[0060] These steps are described in detail below.

[0061] In step S210, characters are extracted from the text to be recognized and the positions of the characters are obtained, so as to obtain multiple characters included in the text to be recognized and the positions of each character in the text to be recognized.

[0062] Among them, the text to be recognized is the text that needs to be recognized. In this embodiment, the text to be recognized can be a text that at least contains characters written based on Arabic characters.

[0063] Characters written based on Arabic characters can be, for example, Uyghur, Kazakh, and Kirgiz. Here, it needs to be explained that Uyghur, Kazakh, Kirgiz and other characters written in Arabic characters are composed of 30 to 40 basic characters. According to the different positions in the word, the basic characters have different variant forms. In the process of forming a word, the basic characters will choose the appropriate variant forms to be connected.

[0064] Since characters are the basic building blocks of text, in order to recognize the text to be recognized, the text to be recognized can be first subjected to character extraction and character position acquisition to obtain multiple characters included in the text to be recognized and the positions of each character in the text to be recognized.

[0065] In some embodiments, the characters in the text to be recognized can be stored in the form of Unicode encoding. Therefore, in the process of character extraction for the text to be recognized, the Unicode encoding in the recognized text to be recognized can be decoded to obtain multiple characters included in the text to be recognized. Among them, Unicode is a computer character encoding, also known as "Universal Code" or "Unicode". Unicode was developed to address the limitations of traditional character encoding schemes. It sets a unified and unique binary encoding for each character in each language to meet the requirements of text conversion and processing across languages and platforms.

[0066] It should be noted that although the text to be recognized is a text that at least contains characters written based on Arabic characters, and the characters written based on Arabic characters are composed of basic characters, and according to the different positions in the word, the basic characters have different variant forms, and in the process of forming a word, the basic characters will choose the appropriate variant forms to be connected. However, the process of character extraction is exactly the opposite of the process of forming a word. Only in the process of forming a word, the basic characters will choose the appropriate variant forms to be connected. On the contrary, in the process of extracting characters, the extracted characters will not be variant forms, but only basic characters.

[0067] It should also be noted that while extracting characters from the text to be recognized, the position of the characters in the text to be recognized can be obtained. Among them, the positions of the obtained characters in the text to be recognized can be understood as the positions of the characters in the words to which the characters belong. For example, each character is at the beginning, in the middle, or at the end of the word to which it belongs.

[0068] In step S220, based on the set character association relationship, the associated characters of each character are obtained.

[0069] As mentioned above, the Uyghur, Kazakh, Kirgiz and other languages written in Arabic characters are composed of basic characters, and the basic characters have different variant forms according to their positions in words.

[0070] Then, it can be understood that due to the normative characteristics of the language, the basic characters or variant forms that make up the language can be preset. For example, the number of variant forms and the styles of variant forms can all be preset.

[0071] Specifically in this embodiment, after extracting a plurality of characters included in the text to be recognized through step S210, the associated characters of each character can be obtained based on the set character association relationship. The associated characters obtained here are also the variant forms of the basic characters.

[0072] In step S230, according to the associated characters of each character and the position of each character in the text to be recognized, the recognition result corresponding to each character is determined.

[0073] Since in the process of forming the text to be recognized in this embodiment, according to the position in the word, the character will select the appropriate associated character to connect, therefore, after extracting a plurality of characters included in the text to be recognized through step S210, the plurality of characters cannot be directly connected to obtain the recognition result of the text to be recognized. Instead, it should be further considered which associated character is selected by each extracted character to connect in the text to be recognized.

[0074] Specifically in this step, in order to determine which associated character is selected by each character to connect in the text to be recognized, it can be determined according to the associated character of each character and the position of each character in the text to be recognized. Among them, determining which associated character is selected by each character to connect in the text to be recognized is also to determine the recognition result corresponding to each character.

[0075] In an embodiment of the present application, if there is a target character among the plurality of characters included in the text to be recognized extracted through step S210, and the target character has no associated character, in other words, the target character does not select an associated character to connect in the process of forming a word. Therefore, in this embodiment, the target character can be directly used as the recognition result corresponding to the target character.

[0076] In step S240, according to the recognition results corresponding to each character, a text recognition result for the text to be recognized is generated.

[0077] Specifically, after determining the recognition results corresponding to each character, generating a text recognition result for the text to be recognized according to the recognition results corresponding to each character may specifically include: First, the recognition results corresponding to multiple consecutive characters can be concatenated in the position order of the multiple consecutive characters to generate multiple words included in the text to be recognized; then, a text recognition result for the text to be recognized can be generated according to the words included in the text to be recognized. Among them, multiple consecutive characters refer to multiple characters without spaces, punctuation marks, or other different types of characters between them, and the multiple characters are consecutive in position.

[0078] In an embodiment of the present application, if there is a target character among multiple consecutive characters and the target character has no associated character, the target character can be directly used as the recognition result corresponding to the target character. After obtaining the recognition result corresponding to the target character and the recognition results corresponding to other characters except the target character among the multiple consecutive characters, generating a text recognition result for the text to be recognized may specifically include: First, the position of the target character among the multiple consecutive characters can be adjusted to the first position among the multiple consecutive characters to obtain a new position order of the multiple consecutive characters; then, according to the new position order, the recognition results corresponding to the target character and other characters can be concatenated to generate the words included in the text to be recognized; furthermore, a text recognition result for the text to be recognized can be generated according to the words included in the text to be recognized.

[0079] It can be seen that through the above steps, the character recognition rule is determined, that is, after obtaining multiple characters included in the text to be recognized, the recognition result corresponding to each character can be determined according to the associated character of each character and the position of each character in the text to be recognized. Compared with the prior art solution, due to the lack of a character recognition rule, directly obtaining the text recognition result according to the obtained characters leads to defects such as low accuracy of the text recognition result, unreadability of the text recognition result, and non-compliance of the text recognition result with writing rules. The technical solution of the embodiment of the present application improves the accuracy of text recognition and at the same time ensures the readability of the text recognition result.

[0080] In an embodiment of the present application, according to different situations of the associated characters of each character, a corresponding method for determining the recognition result corresponding to each character can be adopted. Specifically, step S230 may specifically include:

[0081] If there is a first type of character among multiple characters, and the first type of character is a character whose associated characters include an independent character, a front-connected character, a double-connected character, and a back-connected character, then based on the position of the first type of character in the text to be recognized, at least one of the independent character, the front-connected character, the double-connected character, and the back-connected character associated with the first type of character can be used to determine the recognition result corresponding to the first type of character.

[0082] Here, it needs to be explained that an independent character refers to a character that cannot be connected to the characters adjacent to its front and back positions. A front-connected character refers to a character that can only be connected to the character adjacent to its front position. A double-connected character refers to a character that can be connected to the characters adjacent to its front and back positions. A back-connected character refers to a character that can only be connected to the character adjacent to its back position.

[0083] In an embodiment of the present application, based on the position of the first type of character in the text to be recognized, according to at least one of the independent character, front-connected character, double-connected character, and back-connected character associated with the first type of character, determining the recognition result corresponding to the first type of character may include:

[0084] If it is determined according to the position of the first type of character in the text to be recognized that there are characters at both the front and back adjacent positions of the first type of character, then the recognition result corresponding to the first type of character can be determined according to the double-connected character associated with the first type of character and the back-connected character associated with the first type of character;

[0085] If it is determined according to the position of the first type of character in the text to be recognized that there is a character at the front adjacent position of the first type of character and there is no character at the back adjacent position, then the recognition result corresponding to the first type of character can be determined according to the independent character associated with the first type of character and the front-connected character associated with the first type of character;

[0086] If it is determined according to the position of the first type of character in the text to be recognized that there is no character at the front adjacent position of the first type of character and there is a character at the back adjacent position, then the back-connected character associated with the first type of character can be used as the recognition result corresponding to the first type of character;

[0087] If it is determined according to the position of the first type of character in the text to be recognized that there are no characters at both the front and back adjacent positions of the first type of character, then the independent character associated with the first type of character can be used as the recognition result corresponding to the first type of character.

[0088] In an embodiment of the present application, as Figure 3 shown, in the above embodiment, determining the recognition result corresponding to the first type of character according to the double-connected character associated with the first type of character and the back-connected character associated with the first type of character may specifically include steps S310 - S330, which are described as follows:

[0089] In step S310, obtain the recognition result corresponding to the character at the front adjacent position of the first type of character.

[0090] Since the character at the position immediately adjacent to the front of the first type of character can be recognized before the first type of character to obtain the corresponding recognition result, when determining the recognition result corresponding to the first type of character, the recognition result corresponding to the character at the position immediately adjacent to the front of the first type of character can be obtained first.

[0091] In step S320, if the recognition result corresponding to the character at the position immediately adjacent to the front of the first type of character is a double-connected character or a rear-connected character, the double-connected character associated with the first type of character is used as the recognition result corresponding to the first type of character.

[0092] Specifically, since a double-connected character is a character that can be connected to the characters at the adjacent front and rear positions, and a rear-connected character is a character that is connected to the character at the adjacent rear position and not connected to the character at the adjacent front position, if the recognition result corresponding to the character at the position immediately adjacent to the front of the first type of character obtained is a double-connected character or a rear-connected character, it means that the recognition result corresponding to the first type of character needs to be connected to the recognition result corresponding to the character at the position immediately adjacent to the front. Therefore, the double-connected character associated with the first type of character can be used as the recognition result corresponding to the first type of character, so as to realize the connection with the recognition result corresponding to the character at the position immediately adjacent to the front through the double-connected character.

[0093] In step S330, if the recognition result corresponding to the character at the position immediately adjacent to the front of the first type of character is an independent character or a front-connected character, the rear-connected character associated with the first type of character is used as the recognition result corresponding to the first type of character.

[0094] Conversely, if the recognition result corresponding to the character at the position immediately adjacent to the front of the first type of character obtained is an independent character or a front-connected character, it means that the recognition result corresponding to the first type of character does not need to be connected to the recognition result corresponding to the character at the position immediately adjacent to the front. Therefore, the rear-connected character associated with the first type of character can be used as the recognition result corresponding to the first type of character, because the rear-connected character is connected to the adjacent rear position and not connected to the adjacent front position.

[0095] In an embodiment of the present application, as Figure 4 shown, in the above embodiment, determining the recognition result corresponding to the first type of character according to the independent character associated with the first type of character and the front-connected character associated with the first type of character may specifically include steps S410 - S430, which are described as follows:

[0096] In step S410, obtain the recognition result corresponding to the character at the position immediately adjacent to the front of the first type of character.

[0097] In this embodiment, before determining the recognition result corresponding to the first type of character based on the independent character associated with the first type of character and the pre-connected character associated with the first type of character, the recognition result corresponding to the character at the position immediately before the first type of character may be obtained in advance.

[0098] In step S420, if the recognition result corresponding to the character at the position immediately before the first type of character is a double-connected character or a post-connected character, then the pre-connected character associated with the first type of character is used as the recognition result corresponding to the first type of character.

[0099] As described above, since a double-connected character is a character that can be connected to the characters at the adjacent front and back positions, and a post-connected character is a character that can be connected to the character at the adjacent back position, therefore, if the recognition result corresponding to the character at the position immediately before the first type of character obtained is a double-connected character or a post-connected character, it indicates that the recognition result corresponding to the first type of character needs to be connected to the recognition result corresponding to the character at the position immediately before it. Thus, the pre-connected character associated with the first type of character can be used as the recognition result corresponding to the first type of character, so that connection with the character at the position immediately before it can be achieved through the pre-connected character.

[0100] In step S430, if the recognition result corresponding to the character at the position immediately before the first type of character is an independent character or a pre-connected character, then the independent character associated with the first type of character is used as the recognition result corresponding to the first type of character.

[0101] If the recognition result corresponding to the character at the position immediately before the first type of character is an independent character or a pre-connected character, it indicates that the recognition result corresponding to the first type of character does not need to be connected to the recognition result corresponding to the character at the position immediately before it. Then, the independent character associated with the first type of character can be used as the recognition result corresponding to the first type of character because an independent character is a character that is not connected to the adjacent front and back positions.

[0102] In another embodiment of the present application, step S230 may further specifically include: If there is a second type of character among the associated characters in multiple characters that includes an independent character and a pre-connected character, then based on the position of the second type of character in the text to be recognized, at least one of the independent character associated with the second type of character and the pre-connected character associated with the second type of character is used to determine the recognition result corresponding to the second type of character.

[0103] As described above, an independent character refers to a character that cannot be connected to the characters at the adjacent front and back positions of this character, and a pre-connected character is a character that is connected to the character at the position immediately before this character and is not connected to the character at the position immediately after this character.

[0104] In one embodiment of the present application, determining the recognition result corresponding to the second type of character based on the position of the second type of character in the text to be recognized, according to at least one of the independent character associated with the second type of character and the pre-connected character associated with the second type of character may specifically include:

[0105] If it is determined according to the position of the second type of character in the text to be recognized that there is a character at the previous adjacent position of the second type of character, and there is no character at the subsequent adjacent position or there are characters at both the previous and subsequent adjacent positions of the second type of character, then the recognition result corresponding to the second type of character may be determined according to the independent character associated with the second type of character and the pre-connected character associated with the second type of character;

[0106] If it is determined according to the position of the second type of character in the text to be recognized that there is no character at the previous adjacent position of the second type of character, and there is a character at the subsequent adjacent position or there are no characters at both the previous and subsequent adjacent positions of the second type of character, then the independent character associated with the second type of character may be used as the recognition result corresponding to the second type of character.

[0107] In one embodiment of the present application, as Figure 5 shown, determining the recognition result corresponding to the second type of character according to the independent character associated with the second type of character and the pre-connected character associated with the second type of character in the above embodiment may specifically include steps S510 - S530, which are described as follows:

[0108] In step S510, obtain the recognition result corresponding to the character at the previous adjacent position of the second type of character.

[0109] Since the character at the previous adjacent position of the second type of character can be recognized before the second type of character to obtain the corresponding recognition result, therefore, when determining the recognition result corresponding to the second type of character, the recognition result corresponding to the character at the previous adjacent position of the second type of character can be obtained.

[0110] In step S520, if the recognition result corresponding to the character at the previous adjacent position of the second type of character is a double-connected character or a post-connected character, then the pre-connected character associated with the second type of character is used as the recognition result corresponding to the second type of character.

[0111] Among them, if the recognition result corresponding to the character at the previous adjacent position of the second type of character is a double-connected character or a post-connected character, it means that the recognition result corresponding to the second type of character needs to be connected to the recognition result corresponding to the character at the previous adjacent position. Therefore, the pre-connected character associated with the second type of character can be used as the recognition result corresponding to the second type of character, and the connection with the recognition result corresponding to the character at the previous adjacent position is achieved through the pre-connected character.

[0112] In step S530, if the recognition result corresponding to the character at the position immediately before the second type of character is an independent character or a pre - joined character, then the independent character associated with the second type of character is taken as the recognition result corresponding to the second type of character.

[0113] In this step, if the recognition result corresponding to the character at the position immediately before the second type of character is an independent character or a pre - joined character, it indicates that the recognition result corresponding to the second type of character does not need to be connected to the recognition result corresponding to the character at the immediately preceding position. Therefore, the independent character associated with the second type of character can be taken as the recognition result corresponding to the second type of character because an independent character is a character that is not connected to the characters at the adjacent positions before and after.

[0114] In another embodiment of the present application, step S230 may further specifically include: If there is a third type of character among the associated characters that only contains pre - joined characters among multiple characters, then based on the position of the third type of character in the text to be recognized, at least one of the pre - joined characters associated with the third type of character and the third type of character is used to determine the recognition result corresponding to the third type of character, where the pre - joined character is a character that is connected to the character at the position immediately before it and is not connected to the character at the position immediately after it.

[0115] In an embodiment of the present application, determining the recognition result corresponding to the third type of character according to the pre - joined character associated with the third type of character, the third type of character, and the position of the third type of character in the text to be recognized in the above - mentioned embodiment may specifically include:

[0116] If it is determined according to the position of the third type of character in the text to be recognized that there is a character at the position immediately before the third type of character and there is no character at the position immediately after it, or there are characters at both the positions immediately before and after the third type of character, then the recognition result corresponding to the third type of character can be determined according to the pre - joined character associated with the third type of character and the third type of character;

[0117] If it is determined according to the position of the third type of character in the text to be recognized that there is no character at the position immediately before the third type of character and there is a character at the position immediately after it, or there are no characters at both the positions immediately before and after the third type of character, then the third type of character can be directly taken as the recognition result corresponding to the third type of character.

[0118] In an embodiment of the present application, as Figure 6 shown, determining the recognition result corresponding to the third type of character according to the pre - joined character associated with the third type of character and the third type of character in the above - mentioned embodiment may specifically include steps S610 - S630, which are described as follows:

[0119] In step S610, obtain the recognition result corresponding to the character at the position immediately before the third-type character.

[0120] Before determining the recognition result corresponding to the third-type character based on the pre-connected character associated with the third-type character and the third-type character, first obtain the recognition result corresponding to the character at the position immediately before the third-type character.

[0121] In step S620, if the recognition result corresponding to the character at the position immediately before the third-type character is a double-connected character or a post-connected character, then use the pre-connected character associated with the third-type character as the recognition result corresponding to the third-type character.

[0122] Among them, if the recognition result corresponding to the character at the position immediately before the third-type character is a double-connected character or a post-connected character, it indicates that the recognition result corresponding to the third-type character needs to be connected to the recognition result corresponding to the character at the position immediately before it. Therefore, the pre-connected character associated with the third-type character can be used as the recognition result corresponding to the third-type character. In this way, by using the pre-connected character as the corresponding recognition result, it can be connected to the recognition result corresponding to the character at the position immediately before it.

[0123] In step S630, if the recognition result corresponding to the character at the position immediately before the third-type character is an independent character or a pre-connected character, then directly use the third-type character as the recognition result corresponding to the third-type character.

[0124] If the recognition result corresponding to the character at the position immediately before the third-type character is a double-connected character or a post-connected character, it indicates that the recognition result corresponding to the third-type character does not need to be connected to the recognition result corresponding to the character at the position immediately before it. Therefore, the third-type character can be directly used as the recognition result corresponding to the third-type character.

[0125] The following combines Figure 7 and Figure 8 , taking the text to be recognized as a Kazakh text as an example to elaborate in detail on the technical solution of the embodiment of the present application. Figure 7 shows the basic characters of Kazakh and the variant forms of the basic characters. The variant forms of the basic characters can include independent characters, pre-connected characters, double-connected characters, and post-connected characters. Among them, an independent character is a character that cannot be connected to the characters at the adjacent positions before and after it, a double-connected character is a character that can be connected to the characters at the adjacent positions before and after it, a pre-connected character is a character that can only be connected to the character at the adjacent position before it, and a post-connected character is a character that can only be connected to the character at the adjacent position after it.

[0126] Kazakh belongs to the Turkic language family of the Altaic language family. According to the grammar rules of Kazakh, in the process of forming words, the basic characters of Kazakh will choose appropriate variant forms for connection. The existing Kazakh recognition technology lacks the ability to judge which variant form the basic characters should choose for connection during the recognition process, resulting in problems such as the recognition results not conforming to the writing rules and the recognition results being unreadable. In response to this, the embodiments of the present application provide a text recognition method. Through the text recognition method of the embodiments of the present application, not only can the readability of the recognition results of Kazakh texts be guaranteed, which conforms to the writing rules of Kazakh, but also the recognition accuracy is high.

[0127] In the application scenario where the text to be recognized is a Kazakh text, the method for recognizing the Kazakh text may specifically include the following steps:

[0128] S1. Extract characters and obtain the positions of characters from the Kazakh text to obtain multiple characters included in the Kazakh text and the positions of each character in the Kazakh text.

[0129] Specifically, although in the process of forming words, the basic characters of Kazakh will choose appropriate variant forms for connection. However, the process of character extraction is exactly the opposite of the process of forming words. Only in the process of forming words will the basic characters choose appropriate variant forms for connection. Conversely, in the process of character extraction, the extracted characters will not be variant forms, but only basic characters, that is Figure 7 the basic characters shown in

[0130] S2. Based on the set character association relationship, obtain the associated characters of each character.

[0131] Since in the writing of Kazakh, according to the position in the word, the basic characters will have different variant forms, therefore, the set character association relationship also refers to the association relationship between the basic characters of Kazakh and the corresponding variant forms of the basic characters. Obtaining the associated characters of each character is also to obtain the variant forms of the basic characters of Kazakh.

[0132] As Figure 7 shown, the variant forms of the basic characters can include independent characters, pre-connected characters, double-connected characters, and post-connected characters. That is, the associated characters can include four forms: independent characters, pre-connected characters, double-connected characters, and post-connected characters. The associated characters of different basic characters are different. For example, the associated characters of the basic character with serial number 1 include the independent character with serial number 1 and the pre-connected character with serial number 34, while the associated characters of the basic character with serial number 7 include the independent character with serial number 7 and the pre-connected character with serial number 40, the double-connected character with serial number 67, and the post-connected character with serial number 88.

[0133] S3. Determine the recognition results corresponding to each character according to the associated characters of each character and the positions of each character in the Kazakh text.

[0134] Since the writing rule of Kazakh is that in the process of forming words, basic characters will choose appropriate associated characters to be connected according to their positions in the word, therefore, after obtaining multiple characters in the Kazakh text, the multiple characters cannot be used as the recognition results of the Kazakh text. Instead, it should be further considered which associated characters are selected by each of the extracted characters to be connected in the Kazakh text. Specifically, the recognition results corresponding to each character can be determined according to the associated characters of each character and the positions of each character in the Kazakh text, that is, determine which associated characters are selected by each character to be connected in the Kazakh text.

[0135] For example, as Figure 8 shown, Figure 8 A shows the Kazakh text Figure 8 B shows the three characters included in the Kazakh text obtained through step S1 These three characters are exactly located at the beginning, in the middle, and at the end of the respective words (here it should be noted that the writing of Kazakh is from right to left), Figure 8 C are the associated characters of the three characters obtained through step S2.

[0136] Figure 8 After obtaining multiple characters in the Kazakh text, the multiple characters cannot be used as the recognition results of the Kazakh text, such as D shows a wrong recognition result. In the embodiments of the present application, it is also necessary to further determine the recognition results corresponding to each character. For example, according to the starting position of the first character and the associated character of the first character the post - joining character included in the associated character can be used as the recognition result corresponding to the first character ; according to the middle position of the second character and the associated character of the second character the double - joining character included in the associated character can be used as the recognition result corresponding to the second character ; according to the ending position of the third character and the associated character of the third character ​​​​The corresponding recognition result, the leading concatenated characters included in the associated characters as the third character The corresponding recognition result.

[0137] S4. According to the recognition results corresponding to each character, generate a text recognition result for the Kazakh text.

[0138] Continue with Figure 7 as an example for illustration. After obtaining the recognition result corresponding to the first character through step S3 the second character the corresponding recognition result the third character the corresponding recognition result then, the recognition results corresponding to each character can be concatenated in the position order to obtain the correct recognition result shown in Figure 8 E.

[0139] The following introduces the device embodiments of the present application, which can be used to execute the text recognition method in the above embodiments of the present application. For the details not disclosed in the device embodiments of the present application, please refer to the embodiments of the above text recognition method of the present application.

[0140] Figure 9 Fig. shows a block diagram of a text recognition device according to an embodiment of the present application.

[0141] Referring to Figure 9 shown, a text recognition device 900 according to an embodiment of the present application includes: a processing unit 902 configured to perform character extraction and character position acquisition on the text to be recognized to obtain a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized; an acquisition unit 904 configured to acquire the associated characters of each character based on a set character association relationship; a determination unit 906 configured to determine the recognition result corresponding to each character according to the associated characters of each character and the position of each character in the text to be recognized; a generation unit 908 configured to generate a text recognition result for the text to be recognized according to the recognition results corresponding to each character.

[0142] In some embodiments of the present application, the determining unit 906 is configured to: if there is a first type of character among the multiple characters, then based on the position of the first type of character in the text to be recognized, and according to at least one of the independent character, the front-connected character, the double-connected character, and the back-connected character associated with the first type of character, and the position of the first type of character in the text to be recognized, determine the recognition result corresponding to the first type of character, where the first type of character is a character among the associated characters that includes the independent character, the front-connected character, the double-connected character, and the back-connected character; wherein, the double-connected character is a character that can be connected to the characters at the adjacent front and back positions, the independent character is a character that cannot be connected to the characters at the adjacent front and back positions, the front-connected character is a character that is only connected to the character at the adjacent front position, and the back-connected character is a character that is only connected to the character at the adjacent back position.

[0143] In some embodiments of the present application, the determining unit 906 includes: a first determining subunit, configured to if it is determined according to the position of the first type of character in the text to be recognized that there are characters at both the adjacent front and back positions of the first type of character, then determine the recognition result corresponding to the first type of character according to the double-connected character associated with the first type of character and the back-connected character associated with the first type of character; a second determining subunit, configured to if it is determined according to the position of the first type of character in the text to be recognized that there is a character at the adjacent front position of the first type of character and there is no character at the adjacent back position, then determine the recognition result corresponding to the first type of character according to the independent character associated with the first type of character and the front-connected character associated with the first type of character; a third determining subunit, configured to if it is determined according to the position of the first type of character in the text to be recognized that there is no character at the adjacent front position of the first type of character and there is a character at the adjacent back position, then use the back-connected character associated with the first type of character as the recognition result corresponding to the first type of character; a fourth determining subunit, configured to if it is determined according to the position of the first type of character in the text to be recognized that there are no characters at both the adjacent front and back positions of the first type of character, then use the independent character associated with the first type of character as the recognition result corresponding to the first type of character.

[0144] In some embodiments of the present application, the first determination subunit is configured to: obtain the recognition result corresponding to the character at the position adjacent to the front of the first type of character; if the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the double-connected character or the rear-connected character, then use the double-connected character associated with the first type of character as the recognition result corresponding to the first type of character; if the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the independent character or the front-connected character, then use the rear-connected character associated with the first type of character as the recognition result corresponding to the first type of character.

[0145] In some embodiments of the present application, the second determination subunit is configured to: obtain the recognition result corresponding to the character at the position adjacent to the front of the first type of character; if the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the double-connected character or the rear-connected character, then use the front-connected character associated with the first type of character as the recognition result corresponding to the first type of character; if the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the independent character or the front-connected character, then use the independent character associated with the first type of character as the recognition result corresponding to the first type of character.

[0146] In some embodiments of the present application, the determination unit 906 is configured to: if there is a second type of character among the multiple characters, then based on the position of the second type of character in the text to be recognized, determine the recognition result corresponding to the second type of character according to at least one of the independent character associated with the second type of character and the front-connected character associated with the second type of character, where the second type of character is a character whose associated characters include the independent character and the front-connected character; wherein, the independent character is a character that cannot be connected to the characters at the adjacent front and rear positions, and the front-connected character is a character that can only be connected to the character at the adjacent front position.

[0147] In some embodiments of the present application, the determining unit 906 includes: a fifth determining subunit configured to, if it is determined that there is a character at the position adjacent to the front of the second type of character and there is no character at the position adjacent to the rear of the second type of character according to the position of the second type of character in the text to be recognized, or there are characters at both the positions adjacent to the front and rear of the second type of character, determine the recognition result corresponding to the second type of character according to the independent character associated with the second type of character and the front-connected character associated with the second type of character; a sixth determining subunit configured to, if it is determined that there is no character at the position adjacent to the front of the second type of character and there is a character at the position adjacent to the rear of the second type of character according to the position of the second type of character in the text to be recognized, or there are no characters at both the positions adjacent to the front and rear of the second type of character, use the independent character associated with the second type of character as the recognition result corresponding to the second type of character.

[0148] In some embodiments of the present application, the fifth determining subunit is configured to: obtain the recognition result corresponding to the character at the position adjacent to the front of the second type of character; if the recognition result corresponding to the character at the position adjacent to the front of the second type of character is the double-connected character or the rear-connected character, use the front-connected character associated with the second type of character as the recognition result corresponding to the second type of character; if the recognition result corresponding to the character at the position adjacent to the front of the second type of character is the independent character or the front-connected character, use the independent character associated with the second type of character as the recognition result corresponding to the second type of character.

[0149] In some embodiments of the present application, the determining unit 906 is configured to: if there is a third type of character among the multiple characters, based on the position of the third type of character in the text to be recognized, determine the recognition result corresponding to the third type of character according to at least one of the front-connected character associated with the third type of character and the third type of character, where the third type of character is a character that only includes the front-connected character among the associated characters; wherein, the front-connected character is a character that is only connected to the character at the adjacent position in front.

[0150] In some embodiments of the present application, the determining unit 906 includes: a seventh determining subunit configured to, if it is determined according to the position of the third type of character in the text to be recognized that there is a character at the position adjacent to the front of the third type of character and there is no character at the position adjacent to the back of the third type of character, or there are characters at both the front and back adjacent positions of the third type of character, determine the recognition result corresponding to the third type of character according to the front joined character associated with the third type of character and the third type of character; an eighth determining subunit configured to, if it is determined according to the position of the third type of character in the text to be recognized that there is no character at the position adjacent to the front of the third type of character and there is a character at the position adjacent to the back of the third type of character, or there are no characters at both the front and back adjacent positions of the third type of character, directly use the third type of character as the recognition result corresponding to the third type of character.

[0151] In some embodiments of the present application, the seventh determining subunit is configured to: obtain the recognition result corresponding to the character at the position adjacent to the front of the third type of character; if the recognition result corresponding to the character at the position adjacent to the front of the third type of character is the double joined character or the back joined character, use the front joined character associated with the third type of character as the recognition result corresponding to the third type of character; if the recognition result corresponding to the character at the position adjacent to the front of the third type of character is the independent character or the front joined character, directly use the third type of character as the recognition result corresponding to the third type of character.

[0152] In some embodiments of the present application, the determining unit 906 is configured to: if there is no associated character for the target character among the multiple characters, directly use the target character as the recognition result corresponding to the target character; the generating unit 908 is configured to: adjust the position of the target character in the multiple consecutive characters to the first position in the multiple consecutive characters to obtain a new position order of the multiple consecutive characters; according to the new position order, connect the recognition results corresponding to the target character and the other characters except the target character in the multiple consecutive characters to generate the word included in the text to be recognized; generate the text recognition result for the text to be recognized according to the word included in the text to be recognized.

[0153] Figure 10 The structural schematic diagram of the computer system of the electronic device suitable for implementing the embodiments of the present application is shown.

[0154] It should be noted that Figure 10 The computer system 1000 of the electronic device shown is only an example, and should not bring any limitation to the functions and usage scope of the embodiments of the present application.

[0155] Such as Figure 10As shown, computer system 1000 includes a Central Processing Unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the Read-Only Memory (ROM) 1002 or the program loaded from the storage section 1008 into the Random Access Memory (RAM) 1003, such as executing the method described in the above embodiments. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004.

[0156] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including, for example, a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc. and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read from it can be installed into the storage section 1008 as needed.

[0157] Specifically, according to the embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication section 1009 and / or installed from the removable medium 1011. When the computer program is executed by the Central Processing Unit (CPU) 1001, various functions defined in the system of the present application are executed.

[0158] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0160] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. In some cases, the names of these units do not constitute a limitation on the units themselves.

[0161] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist alone without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiments.

[0162] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more of the above-described modules or units can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0163] From the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.

[0164] After considering the specification and practicing the disclosed embodiments herein, those skilled in the art will readily conceive of other embodiments of the present application. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present application.

[0165] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

Claims

1. A text recognition method, characterized in that, The method includes: Performing character extraction and character position acquisition on the text to be recognized, so as to obtain a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized; Based on the set character association relationship, obtaining the associated characters of each character; If the target character among the plurality of characters does not have the associated character, directly using the target character as the recognition result corresponding to the target character, and determining the recognition results corresponding to the other characters according to the associated characters of the other characters except the target character among the plurality of characters and the positions of the other characters in the text to be recognized; Adjusting the position of the target character among the plurality of consecutive characters to the first position among the plurality of consecutive characters, to obtain a new position order of the plurality of consecutive characters; Connecting the recognition results corresponding to the target character and the other characters according to the new position order, to generate the words included in the text to be recognized; Generating a text recognition result for the text to be recognized according to the words included in the text to be recognized.

2. The method according to claim 1, characterized in that, Determining the recognition results corresponding to the other characters according to the associated characters of the other characters except the target character among the plurality of characters and the positions of the other characters in the text to be recognized, includes: If there are first type characters among the other characters, based on the position of the first type characters in the text to be recognized, determining the recognition results corresponding to the first type characters according to at least one of the independent character, the front-connected character, the double-connected character and the rear-connected character associated with the first type characters, where the first type characters are the characters among the associated characters that include the independent character, the front-connected character, the double-connected character and the rear-connected character; Wherein, the double-connected character is a character that can be connected with the characters at the adjacent front and rear positions, the independent character is a character that cannot be connected with the characters at the adjacent front and rear positions, the front-connected character is a character that is only connected with the character at the adjacent front position, and the rear-connected character is a character that is only connected with the character at the adjacent rear position.

3. The method according to claim 2, characterized in that, Based on the position of the first type characters in the text to be recognized, determining the recognition results corresponding to the first type characters according to at least one of the independent character, the front-connected character, the double-connected character and the rear-connected character associated with the first type characters, includes: If it is determined that there are characters at both the adjacent front and rear positions of the first type characters according to the position of the first type characters in the text to be recognized, determining the recognition results corresponding to the first type characters according to the double-connected character associated with the first type characters and the rear-connected character associated with the first type characters; If it is determined that there is a character at the adjacent front position of the first type characters and there is no character at the adjacent rear position according to the position of the first type characters in the text to be recognized, determining the recognition results corresponding to the first type characters according to the independent character associated with the first type characters and the front-connected character associated with the first type characters; If it is determined according to the position of the first type of character in the text to be recognized that there is no character at the position adjacent to the front of the first type of character and there is a character at the position adjacent to the back, then the post-connected character associated with the first type of character is used as the recognition result corresponding to the first type of character; If it is determined according to the position of the first type of character in the text to be recognized that there are no characters at the positions adjacent to the front and back of the first type of character, then the independent character associated with the first type of character is used as the recognition result corresponding to the first type of character.

4. The method according to claim 3, characterized in that, Determining the recognition result corresponding to the first type of character according to the double-connected character associated with the first type of character and the post-connected character associated with the first type of character includes: Obtaining the recognition result corresponding to the character at the position adjacent to the front of the first type of character; If the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the double-connected character or the post-connected character, then the double-connected character associated with the first type of character is used as the recognition result corresponding to the first type of character; If the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the independent character or the pre-connected character, then the post-connected character associated with the first type of character is used as the recognition result corresponding to the first type of character.

5. The method according to claim 3, wherein Determining the recognition result corresponding to the first type of character according to the independent character associated with the first type of character and the pre-connected character associated with the first type of character includes: Obtaining the recognition result corresponding to the character at the position adjacent to the front of the first type of character; If the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the double-connected character or the post-connected character, then the pre-connected character associated with the first type of character is used as the recognition result corresponding to the first type of character; If the recognition result corresponding to the character at the position adjacent to the front of the first type of character is the independent character or the pre-connected character, then the independent character associated with the first type of character is used as the recognition result corresponding to the first type of character.

6. The method according to claim 1, characterized in that Determining the recognition result corresponding to the other characters according to the associated characters of the other characters except the target character among the multiple characters and the positions of the other characters in the text to be recognized includes: If there is a second type of character among the other characters, then based on the position of the second type of character in the text to be recognized, at least one of the independent character associated with the second type of character and the pre-connected character associated with the second type of character is used to determine the recognition result corresponding to the second type of character, and the second type of character is a character among the associated characters that includes the independent character and the pre-connected character; Wherein, the independent character is a character that cannot be connected to the characters at the adjacent front and back positions, and the pre-connected character is a character that can only be connected to the character at the adjacent front position.

7. The method according to claim 6, characterized in that, Based on the position of the second type of character in the text to be recognized, determine the recognition result corresponding to the second type of character according to at least one of the independent character associated with the second type of character and the pre-connected character associated with the second type of character, including: If it is determined according to the position of the second type of character in the text to be recognized that there is a character at the pre-adjacent position of the second type of character, and there is no character at the post-adjacent position or there are characters at both the pre-adjacent and post-adjacent positions of the second type of character, then determine the recognition result corresponding to the second type of character according to the independent character associated with the second type of character and the pre-connected character associated with the second type of character; If it is determined according to the position of the second type of character in the text to be recognized that there is no character at the pre-adjacent position of the second type of character, and there is a character at the post-adjacent position or there are no characters at both the pre-adjacent and post-adjacent positions of the second type of character, then use the independent character associated with the second type of character as the recognition result corresponding to the second type of character.

8. The method according to claim 7, wherein Determine the recognition result corresponding to the second type of character according to the independent character associated with the second type of character and the pre-connected character associated with the second type of character, including: Obtain the recognition result corresponding to the character at the pre-adjacent position of the second type of character; If the recognition result corresponding to the character at the pre-adjacent position of the second type of character is a double-connected character or a post-connected character, then use the pre-connected character associated with the second type of character as the recognition result corresponding to the second type of character; If the recognition result corresponding to the character at the pre-adjacent position of the second type of character is the independent character or the pre-connected character, then use the independent character associated with the second type of character as the recognition result corresponding to the second type of character.

9. The method according to claim 1, wherein Determine the recognition result corresponding to the other characters according to the associated characters of the other characters except the target character among the multiple characters and the positions of the other characters in the text to be recognized, including: If there is a third type of character among the other characters, then based on the position of the third type of character in the text to be recognized, determine the recognition result corresponding to the third type of character according to at least one of the pre-connected character associated with the third type of character and the third type of character, where the third type of character is a character that only contains the pre-connected character among the associated characters; Wherein, the pre-connected character is a character that is only connected to the character at the pre-adjacent position.

10. The method according to claim 9, wherein Based on the position of the third type of character in the text to be recognized, determine the recognition result corresponding to the third type of character according to at least one of the pre-connected character associated with the third type of character and the third type of character, including: If it is determined according to the position of the third type of character in the text to be recognized that there is a character at the position adjacent to the front of the third type of character, and there is no character at the position adjacent to the rear of the third type of character, or there are characters at both the positions adjacent to the front and rear of the third type of character, then determine the recognition result corresponding to the third type of character according to the front-connected character associated with the third type of character and the third type of character; If it is determined according to the position of the third type of character in the text to be recognized that there is no character at the position adjacent to the front of the third type of character, and there is a character at the position adjacent to the rear of the third type of character, or there are no characters at both the positions adjacent to the front and rear of the third type of character, then directly use the third type of character as the recognition result corresponding to the third type of character.

11. The method according to claim 10, characterized in that, Determining the recognition result corresponding to the third type of character according to the front-connected character associated with the third type of character and the third type of character includes: Obtain the recognition result corresponding to the character at the position adjacent to the front of the third type of character; If the recognition result corresponding to the character at the position adjacent to the front of the third type of character is a double-connected character or a rear-connected character, then use the front-connected character associated with the third type of character as the recognition result corresponding to the third type of character; If the recognition result corresponding to the character at the position adjacent to the front of the third type of character is an independent character or the front-connected character, then directly use the third type of character as the recognition result corresponding to the third type of character.

12. A text recognition device, characterized in that, The device includes: A processing unit configured to perform character extraction and character position acquisition on the text to be recognized to obtain a plurality of characters included in the text to be recognized and the positions of each character in the text to be recognized; An acquisition unit configured to acquire the associated characters of each character based on a set character association relationship; A determination unit configured to, if the target character among the plurality of characters does not have the associated character, directly use the target character as the recognition result corresponding to the target character, and determine the recognition results corresponding to the other characters according to the associated characters of the other characters except the target character among the plurality of characters and the positions of the other characters in the text to be recognized; A generation unit configured to adjust the position of the target character among the plurality of consecutive characters to the first position among the plurality of consecutive characters to obtain a new position order of the plurality of consecutive characters; connect the recognition results corresponding to the target character and the other characters according to the new position order to generate the words included in the text to be recognized; generate a text recognition result for the text to be recognized according to the words included in the text to be recognized.

13. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the text recognition method according to any one of claims 1 to 11.

14. An electronic device, characterized in that, Including: One or more processors; A storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the text recognition method according to any one of claims 1 to 11.

15. A computer program product, characterized in that, The computer program product includes a computer program, the computer program is stored in a computer-readable storage medium, and a processor of a computer device reads and executes the computer program, so that the computer device executes the text recognition method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Arabic optical character recognition method using hidden markov models and decision trees

    US20170017854A1