Method, device, equipment, storage medium and program product for recognizing text
By identifying and typing the annotated content in paper books, the problems of reading difficulties and storage space occupied are solved, and the user experience is improved.
Patent Information
- Application Number
- CN202110629018.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-02
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-06-02
AI Technical Summary
When looking up paper books, the marked content cannot be viewed anytime and anywhere, and the image taken occupies the memory of the mobile phone, making it difficult to find it.
By obtaining the image to be identified, the text, marked text and label information are identified, and the identification text is generated according to the label format, reducing the device storage space and improving user review experience.
It realizes the reduction of device storage space and the improvement of user review experience, making it easier to view and manage labeled content.
Smart Images

Figure CN113361404B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, specifically to the field of image recognition and speech recognition technology, and in particular to a method, device, electronic device, storage medium and computer program product for recognizing text. Background Art
[0002] When reading paper books, readers often like to mark them. Paper books are not easy to carry, and the marked contents cannot be read anytime and anywhere. Taking pictures of the marked pages will occupy the memory of the user's mobile phone, and it is not conducive to classification, making it difficult to find them when reading them later. Summary of the invention
[0003] The present application provides a method, apparatus, electronic device, storage medium and computer program product for recognizing text.
[0004] According to a first aspect, a method for recognizing text is provided, comprising: acquiring an image to be recognized; recognizing the image to be recognized to obtain a main text, annotated text in the main text, and annotation information; in the main text, annotating the annotation information corresponding to the annotated text to obtain the recognized text.
[0005] According to a second aspect, a device for recognizing text is provided, comprising: an acquisition unit, configured to acquire an image to be recognized; a recognition unit, configured to recognize the image to be recognized, and obtain the main text, annotated text in the main text, and annotation information; and an annotation unit, configured to annotate the annotation information in the main text corresponding to the annotated text, and obtain the recognized text.
[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method described in any implementation manner of the first aspect.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method described in any implementation of the first aspect.
[0008] According to a fifth aspect, a computer program product is provided, comprising: a computer program, which implements the method described in any implementation manner of the first aspect when executed by a processor.
[0009] According to the technology of the present application, the main text, annotated text and annotation information in the image to be identified are identified, and the main text, annotated text and annotation information are typeset with reference to the annotation format in the image to be identified to obtain the identified text, thereby reducing the storage space of the device and improving the user's browsing experience.
[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0012] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;
[0013] Figure 2 is a flow chart of an embodiment of a method for recognizing text according to the present application;
[0014] Figure 3 is a schematic diagram of an application scenario of the method for recognizing text according to this embodiment;
[0015] Figure 4 is a flowchart of another embodiment of a method for recognizing text according to the present application;
[0016] Figure 5 is a structural diagram of an embodiment of a device for recognizing text according to the present application;
[0017] Figure 6 It is a structural diagram of a computer system suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0018] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0019] Figure 1 An exemplary architecture 100 is shown to which the method and apparatus for recognizing text of the present application can be applied.
[0020] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The communication connection between the terminal devices 101, 102, 103 constitutes a topological network, and the network 104 is used to provide a medium for the communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0021] Terminal devices 101, 102, 103 may be hardware devices or software that support network connection for data interaction and data processing. When terminal devices 101, 102, 103 are hardware, they may be various electronic devices that support network connection, information acquisition, interaction, display, processing and other functions, including but not limited to smart phones, tablet computers, e-book readers, laptop computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they may be installed in the electronic devices listed above. They may be implemented as multiple software or software modules for providing distributed services, or they may be implemented as a single software or software module. No specific limitation is made here.
[0022] The server 105 can be a server that provides various services, such as obtaining the image to be recognized sent by the user through the terminal devices 101, 102, and 103, recognizing the main text in the image to be recognized, the annotated text and annotation information in the main text, and referring to the annotation format in the image to be recognized to obtain the background processing server of the recognized text. Optionally, the background processing server feeds back the recognized text to the terminal device. As an example, the server 105 can be a cloud server.
[0023] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0024] It should also be noted that the method for recognizing text provided in the embodiments of the present application can be executed by a server, or by a terminal device, or by a server and a terminal device in cooperation with each other. Accordingly, the various parts (e.g., various units) included in the apparatus for recognizing text can be all arranged in the server, or all arranged in the terminal device, or respectively arranged in the server and the terminal device.
[0025] It should be understood that Figure 1The number of terminal devices, networks and servers in the system architecture is only illustrative. Depending on the implementation requirements, there may be any number of terminal devices, networks and servers. When the electronic device on which the method for recognizing text runs does not need to transmit data with other electronic devices, the system architecture may only include the electronic device (e.g., server or terminal device) on which the method for recognizing text runs.
[0026] Please refer to Figure 2 , Figure 2 A flowchart of a method for recognizing text provided in an embodiment of the present application, wherein process 200 includes the following steps:
[0027] Step 201: Obtain an image to be recognized.
[0028] In this embodiment, the execution subject of the method for recognizing text (for example, Figure 1 The terminal device or server in the system can obtain the image to be identified.
[0029] The image to be identified includes text information of multiple parts, such as the main text part, the annotated part and the annotated part. Among them, the annotated part is included in the main text part and is a part of the main text part. As an example, the image to be identified can be an image representing a reading note.
[0030] When the execution subject is a terminal device with an image shooting function, the image to be identified may be an image shot by the terminal device. When the execution subject is a server connected to the terminal device in communication, the image to be identified may be an image acquired from the terminal device.
[0031] Step 202, identifying the image to be identified, obtaining the main text, the annotated text in the main text, and the annotated information.
[0032] In this embodiment, the execution subject identifies the image to be identified and obtains the main text, the annotated text in the main text and the annotated information.
[0033] As an example, the execution subject can identify the image to be identified through a pre-trained recognition model to obtain the main text, the annotated text in the main text, and the annotation information. The recognition model represents the correspondence between the image to be processed and the main text, the annotated text, and the annotation information, and a neural network model with text recognition function can be used.
[0034] As another example, the above-mentioned execution entity can mark the image areas corresponding to the main text, the annotated text and the annotation information in the image to be recognized, and then recognize each image area according to the OCR (Optical Character Recognition) technology to obtain the main text, the annotated text and the annotation information in turn.
[0035] Step 203: in the main text, annotate the annotation information corresponding to the annotated text to obtain the recognized text.
[0036] In this embodiment, the execution subject may annotate the annotation information corresponding to the annotated text in the main text to obtain the recognized text.
[0037] As an example, the execution subject may refer to the relative position information between the main text, the annotated text and the annotation information in the image to be recognized, typeset the main text, the annotated text and the annotation information to obtain the recognized text. The annotated text in the main text may be highlighted in the form of underlining, highlighting, etc.
[0038] In this embodiment, the main text, annotated text and annotation information in the image to be identified are identified, and the main text, annotated text and annotation information are typeset with reference to the annotation format in the image to be identified to obtain the identified text, thereby reducing the storage space of the device and improving the user's browsing experience.
[0039] Continue to see Figure 3 , Figure 3 FIG. 3 is a schematic diagram 300 of an application scenario of the method for recognizing text according to this embodiment. Figure 3 In the application scenario, user 301 takes a photo of a reading note through terminal device 302 to obtain image 3021 to be recognized. Terminal device 302 sends image 3021 to be recognized to server 303, which recognizes image 3021 to be recognized, obtains body text 30211, annotated text 30212 in the body text, and annotation information 30213; in body text 30211, annotation information 30213 is annotated corresponding to annotated text 30212, obtains recognized text, and displays recognized text 3022 to user 301 through terminal device 302.
[0040] In some optional implementations of this embodiment, for the case where the annotated portion in the image to be identified is marked by a preset mark, the execution subject may perform step 202 in the following manner:
[0041] In response to determining that the main text portion in the image to be identified includes a preset mark, the main text portion in the image to be identified, the annotated portion of the main text portion marked by the preset mark, and the annotated portion are identified to obtain the main text, the annotated text, and the annotated information in sequence.
[0042] The preset mark may be any marker with a marking function, such as a stroke, a bracket, a painting of a specific color, etc.
[0043] As an example, the execution subject may identify the main body, the annotated part and the annotated part in the image to be identified by ICR (Intelligent Character Recognition) technology, and obtain the main body text, the annotated text and the annotated information in sequence. In this case, the execution subject directly determines and identifies each part of the text in the image to be identified, and can quickly perform text recognition.
[0044] In some optional implementations of this embodiment, for the case where the annotated portion in the image to be identified is not marked by the preset mark, the execution subject may perform step 203 in the following manner:
[0045] First, in response to determining that the text portion in the image to be recognized does not include a preset mark, a speech to be recognized is received.
[0046] The speech to be recognized is used to enable the execution subject to determine the annotated part in the main text. As an example, the speech to be recognized can be a speech that completely matches the annotated text (a speech formed by the user reading the annotated text of the annotated part), or a speech that only represents the beginning and end of the annotated text, or a speech that represents the position information of the annotated part in the main text.
[0047] Second, the speech to be recognized is recognized to obtain the speech text, and the text in the main text that matches the speech text is determined as the annotated text.
[0048] When the speech to be recognized is a speech that completely matches the annotated text, the above-mentioned execution subject can directly recognize the speech to be recognized to determine the speech text; when the speech to be recognized is a speech that represents the beginning and ending parts of the annotated text, the above-mentioned execution subject recognizes the text of the beginning and ending parts, and then matches them with the main text, and determines the part of the main text that starts at the beginning and ends at the ending part as the annotated text; when the speech to be recognized is a speech that represents the position information of the annotated part in the main text, the above-mentioned execution subject can perform semantic recognition on the speech text, determine the position information, and then determine the annotated text from the main text based on the position information.
[0049] In such cases, the above-mentioned execution entity can determine the annotated text based on speech recognition technology, thereby improving the convenience for users to use this application.
[0050] In the case where the annotation information is handwritten text, text recognition may result in recognition errors. In this case, the execution subject may perform step 202 in the following manner:
[0051] First, identify the main text part and the annotated part, and obtain the main text and the annotated text in turn.
[0052] The main text and the annotated part are generally printed text, and the text recognition accuracy for printed text is relatively high.
[0053] Second, perform image segmentation on the annotated part to obtain the annotated information in image form.
[0054] In this implementation, in order to avoid the problem of incorrect recognition of the annotation information of the annotated part, the execution subject directly performs image segmentation on the annotated part, thereby improving the accuracy of information processing.
[0055] In some optional implementations of this embodiment, the execution subject may display the recognized text. As an example, after the execution subject recognizes the image to be recognized for the first time and obtains the recognized text, the recognized text is displayed to the user by default. In the subsequent viewing process, the recognized text may be displayed to the user based on the user's viewing request.
[0056] In this implementation, the above-mentioned execution body can conveniently and flexibly display the recognized text to the user, thereby improving the flexibility of text display and the user experience.
[0057] In some optional implementations of this embodiment, the execution entity receives an editing operation from a user and edits the recognized text according to the editing operation.
[0058] The editing operation may be any operation to edit the recognized text, including but not limited to adding, deleting, adjusting, modifying, etc. As an example, the editing operation is a deletion operation, and the execution subject may delete the content in the recognized text that is irrelevant to the marked text.
[0059] In this implementation, the user can flexibly edit the recognized text, which improves the flexibility and practicality of the application.
[0060] Continue to refer Figure 4 , shows a schematic process 400 of an embodiment of a method for recognizing text according to the method of the present application, comprising the following steps:
[0061] Step 401: Obtain an image to be recognized.
[0062] Step 402, in response to determining that the main text portion in the image to be identified includes a preset mark, identify the main text portion in the image to be identified, the annotated portion of the main text portion marked by the preset mark, and the annotated portion, and obtain the main text, the annotated text, and the annotation information in sequence.
[0063] Step 403: In response to determining that the text portion in the image to be recognized does not include a preset mark, receiving a speech to be recognized.
[0064] Step 404 , recognize the speech to be recognized, obtain the speech text, and determine the text in the main text that matches the speech text as the annotated text.
[0065] Step 405: Display the recognized text.
[0066] Step 406, receiving the user's editing operation, and editing the recognized text according to the editing operation.
[0067] It can be seen from this embodiment that Figure 2 Compared with the corresponding embodiments, the process 400 of the method for recognizing text in this embodiment specifically illustrates the text recognition process and the text editing process under different situations, thereby improving the flexibility and practicality of text recognition.
[0068] Continue to refer Figure 5 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for recognizing text, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0069] like Figure 5 As shown, the device for recognizing text includes: an acquisition unit 501, configured to acquire an image to be recognized; a recognition unit 502, configured to recognize the image to be recognized, and obtain the main text, the annotated text in the main text, and the annotation information; and a marking unit 503, configured to mark the annotation information in the main text corresponding to the annotated text, and obtain the recognized text.
[0070] In some embodiments, the recognition unit 502 is further configured to: in response to determining that the main text part in the image to be recognized includes a preset mark, identify the main text part in the image to be recognized, the annotated part of the main text part marked by the preset mark, and the annotated part, and obtain the main text, the annotated text and the annotation information in sequence.
[0071] In some embodiments, the recognition unit 502 is further configured to: receive speech to be recognized in response to determining that the main text portion in the image to be recognized does not include a preset mark; recognize the speech to be recognized, obtain speech text, and determine the text in the main text that matches the speech text as the annotated text.
[0072] In some embodiments, the recognition unit 502 is further configured to: recognize the main text part and the annotated part to obtain the main text and the annotated text in sequence; perform image segmentation on the annotated part to obtain the annotation information in the form of an image.
[0073] In some embodiments, the above-mentioned apparatus further includes: a display unit (not shown in the figure), configured to display the recognized text.
[0074] In some embodiments, the above-mentioned device further includes: an editing unit (not shown in the figure), which is configured to receive an editing operation of the user and edit the recognized text according to the editing operation.
[0075] This embodiment identifies the main text, annotated text and annotation information in the image to be identified, and typesets the main text, annotated text and annotation information with reference to the annotation format in the image to be identified to obtain the identified text, thereby reducing the storage space of the device and improving the user's browsing experience.
[0076] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the method for recognizing text described in any of the above embodiments can be implemented when the at least one processor executes the instructions.
[0077] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the method for recognizing text described in any of the above embodiments when executed.
[0078] An embodiment of the present disclosure provides a computer program product. When the computer program is executed by a processor, the method for recognizing text described in any of the above embodiments can be implemented.
[0079] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0080] like Figure 6As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0081] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0082] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a method for identifying text. For example, in some embodiments, the method for identifying text may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or a communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method for identifying text described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform a method for identifying text in any other appropriate manner (e.g., by means of firmware).
[0083] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0084] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0085] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0086] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0087] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0088] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0089] According to the technical solution of the embodiment of the present disclosure, by acquiring an image to be recognized; recognizing the image to be recognized, obtaining the main text, the annotated text in the main text, and the annotation information; in the main text, annotating the annotation information corresponding to the annotated text, to obtain the recognized text. The present application recognizes the main text, the annotated text, and the annotation information in the image to be recognized, and typesets the main text, the annotated text, and the annotation information in reference to the annotation format in the image to be recognized to obtain the recognized text, thereby reducing the storage space of the device and improving the user's browsing experience.
[0090] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0091] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for recognizing text, It is characterized in that include: Obtain an image to be recognized; In response to determining that the text portion in the image to be recognized includes a preset mark, the text portion in the image to be recognized and the annotated portion in the text portion marked by the preset mark are recognized to obtain a text of the body and an annotated text in the text of the body in sequence, wherein, in the case that the text portion in the image to be recognized does not include the preset mark, the annotated text is the text in the body text that matches the speech text of the speech to be recognized; Performing image segmentation on the annotated part of the image to be identified to obtain annotated information in the form of an image; Referring to the relative position information among the main text, the annotated text and the annotation information in the image to be identified, the identified main text, the annotated text and the annotation information are typeset to obtain an identified text, wherein in the identified text, the annotated text is highlighted.
2. The method according to claim 1, in, The step of identifying the image to be identified and obtaining the main text, the annotated text in the main text and the annotated information further includes: In response to determining that the text portion in the image to be recognized does not include a preset mark, receiving a speech to be recognized; The speech to be recognized is recognized to obtain speech text, and the text in the body text that matches the speech text is determined as the annotated text.
3. The method according to any one of claims 1-2, in, Also includes: The recognized text is displayed.
4. The method according to claim 3, in, Also includes: Receive an editing operation from a user, and edit the recognized text according to the editing operation.
5. A device for recognizing text, It is characterized in that include: An acquisition unit, configured to acquire an image to be recognized; The recognition unit is configured to, in response to determining that the main text portion in the image to be recognized includes a preset mark, recognize the main text portion in the image to be recognized, and the annotated portion in the main text portion marked by the preset mark, and obtain the main text and the annotated text in the main text in sequence, wherein, when the main text portion in the image to be recognized does not include the preset mark, the annotated text is the text in the main text that matches the voice text of the voice to be recognized; perform image segmentation on the annotated portion in the image to be recognized, and obtain the annotation information in the form of an image; The annotation unit is configured to refer to the relative position information between the main text, the annotated text and the annotation information in the image to be identified, and typeset the identified main text, the annotated text and the annotation information to obtain an identified text, wherein the annotated text is highlighted in the identified text.
6. The device according to claim 5, in, The identification unit is further configured to: In response to determining that the body part of the image to be recognized does not include a preset mark, receiving a speech to be recognized; recognizing the speech to be recognized to obtain a speech text, and determining the text in the body text that matches the speech text as the annotated text.
7. The device according to any one of claims 5-6, in, Also includes: The display unit is configured to display the recognized text.
8. The device according to claim 7, in, Also includes: The editing unit is configured to receive an editing operation of a user and edit the recognized text according to the editing operation.
9. An electronic device, It is characterized in that include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.
11. A computer program product, include: A computer program which, when executed by a processor, implements the method according to any one of claims 1 to 4.
