A document information recognition method, system and electronic device based on artificial intelligence
Through the document information recognition method based on artificial intelligence, the problem of low accuracy in low-quality document recognition in the prior art is solved, and higher recognition accuracy and more accurate document information updates are achieved.
Patent Information
- Application Number
- CN202411053073.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-08-02
AI Technical Summary
Existing document information recognition technology is not very accurate when processing low-quality documents, resulting in frequent identification errors.
Using an artificial intelligence-based method, we obtain document information images for first-level recognition, and determine whether there is a text with unclear semantics and mark it. Then, through content scene correlation analysis, the target text is obtained and document information is updated.
It improves the accuracy of document information recognition, can accurately identify and update text with unclear semantics, and provides more accurate document information.
Smart Images

Figure CN118982840B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of document recognition, and in particular to a document information recognition method, system and electronic device based on artificial intelligence. Background Art
[0002] With the rapid development of document processing technology, document information recognition technology has been widely used in various natural language processing scenarios. Document information recognition technology refers to the recognition of optical characters in images through image processing and pattern recognition technology, and the translation of optical characters into computer text; document translation is the process of converting one natural language into another natural language using a computer. For some translation scenarios, it is necessary to perform text recognition on document information before translating the document. The accuracy of document information recognition will affect the accuracy of document translation.
[0003] At present, the existing document information recognition technology can only recognize the text in the document when it is clear and without interfering lines or ink marks. There are often many errors in the recognition of low-quality document information, and there is a problem of low accuracy in text recognition. Summary of the invention
[0004] In order to improve the accuracy of document information recognition, the present application provides a document information recognition method, system and electronic device based on artificial intelligence.
[0005] In the first aspect, the present application provides a document information recognition method based on artificial intelligence, which adopts the following technical solutions:
[0006] A document information recognition method based on artificial intelligence, comprising:
[0007] Acquire a document information image, wherein the document information image is the document information image currently required to be recognized;
[0008] Performing primary recognition on the document information image to obtain first document information and content scene information corresponding to the first document information;
[0009] Determine whether there is semantically unclear text in the first document information, and if so, mark the image nodes corresponding to the semantically unclear text in the document information image to obtain a marked document information image, wherein the semantically unclear text includes illogical incoherence and disordered characters;
[0010] Performing content-scenario association analysis on the first document information and the content-scenario information to obtain a target text;
[0011] The first document information is updated based on the target text to obtain second document information, and the second document information is sent to a user terminal.
[0012] In a possible implementation, performing content-scenario association analysis on the first document information and the content-scenario information to obtain the target text includes:
[0013] Acquire associated document information associated with the content scene information, create a training model based on the associated document information, and input the first document information into the training model for secondary recognition to obtain multiple groups of matching texts corresponding to the marked image nodes of the marked document information image;
[0014] The multiple groups of matching texts are screened in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain the target text corresponding to the marked image node.
[0015] In a possible implementation, the screening of the multiple groups of matching texts in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain the target text corresponding to the marked image node includes:
[0016] Using the preceding and following texts of the marked image node as a first screening condition, and performing a primary screening on the multiple groups of matching texts based on the first screening condition to obtain an associated text group;
[0017] Performing feature recognition processing on the marked image nodes to obtain text image data;
[0018] Inputting the text image data into a pre-trained text detection model to obtain a text data set with different probability information;
[0019] The text data set is used as a second screening condition, and based on the second screening condition, a secondary screening is performed on the associated text group to obtain a target text corresponding to the marked image node.
[0020] In a possible implementation, performing feature recognition processing on the marked image node to obtain text image data includes:
[0021] Creating a two-dimensional recognition coordinate system, and placing the marked image node into the two-dimensional recognition coordinate system to obtain a text image map point of the marked image node;
[0022] Determine the coordinate information and descriptor information corresponding to each text feature point in the marked image node according to the text image map point;
[0023] The coordinate information and the descriptor information are packaged and processed to obtain text image data.
[0024] In a possible implementation, the text image data is input into a pre-trained text detection model to obtain a text data set with different probability information, which also includes:
[0025] Obtain the fuzzy images corresponding to different text data in different formats;
[0026] Creating a two-dimensional training coordinate system corresponding to the two-dimensional recognition coordinate system, and placing the blurred image into the two-dimensional training coordinate system to obtain blurred image map points of the blurred image;
[0027] Determine the training coordinate information and training descriptor information corresponding to each image feature point in the blurred image according to the blurred image map point;
[0028] A text detection model is created, and each text data and the training coordinate information and training descriptor information corresponding to the text data are used as training samples to train the text detection model to obtain a trained text detection model.
[0029] In a possible implementation, the inputting the text image data into a pre-trained text detection model to obtain a text data set with different probability information includes:
[0030] When the text detection model completes the detection of the text image data, obtaining a text data set output by the text detection model;
[0031] Determine the training descriptor information corresponding to the text data set, and perform matrix comparison between the descriptors in the training descriptor information and the descriptors in the descriptor information to obtain similarity ratio information of each text in the text data set;
[0032] The probability value of each text in the text data set is defined according to the similarity ratio information to obtain text data sets with different probability information.
[0033] In a possible implementation, the text data set is used as a second screening condition, and the associated text group is subjected to secondary screening based on the second screening condition to obtain the target text corresponding to the marked image node, including:
[0034] Determining the text fuzziness degree corresponding to the marked image node, and defining a first weight of the associated text group and a second weight of the text data set according to the text fuzziness degree and a preset weight matching standard;
[0035] Determining the degree of association between the associated text group and the text before and after the marked image node, and sorting each associated text in the associated text group based on the degree of association to obtain an associated text sequence;
[0036] Defining a score for each associated text in the associated text group according to the associated text sequence to obtain an associated text score for each associated text in the associated text group;
[0037] Determine, according to the text data set, a probability score corresponding to each text data in the text data set;
[0038] Perform overlapping screening on the associated texts according to the text data to obtain at least one overlapping text;
[0039] Calculate the associated weight of the at least one overlapping text based on the first weight and the associated text score to obtain an associated weight value;
[0040] Calculate the probability weight of the at least one overlapping text based on the second weight and the probability score to obtain a probability weight value;
[0041] The sum of the associated weight value and the probability weight value corresponding to the at least one overlapping text is used as the text representative value corresponding to the at least one overlapping text, and the text representative value is numerically sorted and filtered based on preset filtering criteria to obtain the target text corresponding to the marked image node.
[0042] In the second aspect, the present application provides a document information recognition system based on artificial intelligence, which adopts the following technical solutions:
[0043] A document information recognition system based on artificial intelligence, comprising:
[0044] An image acquisition module is used to acquire a document information image, wherein the document information image is the document information image currently required to be identified;
[0045] An image recognition module, used to perform primary recognition on the document information image to obtain first document information and content scene information corresponding to the first document information;
[0046] an image marking module, used to determine whether there is semantically unclear text in the first document information, and if so, mark the image nodes corresponding to the semantically unclear text in the document information image to obtain a marked document information image, wherein the semantically unclear text includes illogical incoherence and disordered characters;
[0047] A correlation analysis module, configured to perform content-scenario correlation analysis on the first document information and the content-scenario information to obtain a target text;
[0048] The document updating module is used to update the first document information based on the target text to obtain the second document information, and send the second document information to the user terminal.
[0049] In a possible implementation, when the association analysis module performs content-scenario association analysis on the first document information and the content-scenario information to obtain the target text, it is specifically used to:
[0050] Acquire associated document information associated with the content scene information, create a training model based on the associated document information, and input the first document information into the training model for secondary recognition to obtain multiple groups of matching texts corresponding to the marked image nodes of the marked document information image;
[0051] The multiple groups of matching texts are screened in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain the target text corresponding to the marked image node.
[0052] In another possible implementation, the association analysis module is specifically used to:
[0053] Using the preceding and following texts of the marked image node as a first screening condition, and performing a primary screening on the multiple groups of matching texts based on the first screening condition to obtain an associated text group;
[0054] Performing feature recognition processing on the marked image nodes to obtain text image data;
[0055] Inputting the text image data into a pre-trained text detection model to obtain a text data set with different probability information;
[0056] The text data set is used as a second screening condition, and based on the second screening condition, a secondary screening is performed on the associated text group to obtain a target text corresponding to the marked image node.
[0057] In another possible implementation, when the association analysis module performs feature recognition processing on the marked image node to obtain text image data, it is specifically used to:
[0058] Creating a two-dimensional recognition coordinate system, and placing the marked image node into the two-dimensional recognition coordinate system to obtain a text image map point of the marked image node;
[0059] Determine the coordinate information and descriptor information corresponding to each text feature point in the marked image node according to the text image map point;
[0060] The coordinate information and the descriptor information are packaged and processed to obtain text image data.
[0061] In another possible implementation, the system further includes: a data image acquisition module, a coordinate system creation module, an information determination module, and a model training module, wherein:
[0062] The data image acquisition module is used to acquire fuzzy images corresponding to different text data in different formats;
[0063] The coordinate creation module is used to create a two-dimensional training coordinate system corresponding to the two-dimensional recognition coordinate system, and place the blurred image into the two-dimensional training coordinate system to obtain blurred image map points of the blurred image;
[0064] The information determination module is used to determine the training coordinate information and training descriptor information corresponding to each image feature point in the blurred image according to the blurred image map point;
[0065] The model training module is used to create a text detection model, and use each text data and the training coordinate information and training descriptor information corresponding to the text data as training samples to train the text detection model to obtain a trained text detection model.
[0066] In another possible implementation, when the association analysis module inputs the text image data into a pre-trained text detection model to obtain a text data set with different probability information, it is specifically used to:
[0067] When the text detection model completes the detection of the text image data, obtaining a text data set output by the text detection model;
[0068] Determine the training descriptor information corresponding to the text data set, and perform matrix comparison between the descriptors in the training descriptor information and the descriptors in the descriptor information to obtain similarity ratio information of each text in the text data set;
[0069] The probability value of each text in the text data set is defined according to the similarity ratio information to obtain text data sets with different probability information.
[0070] In another possible implementation, when the association analysis module uses the text data set as the second screening condition and performs secondary screening on the associated text group based on the second screening condition to obtain the target text corresponding to the marked image node, it is specifically used to:
[0071] Determining the text fuzziness degree corresponding to the marked image node, and defining a first weight of the associated text group and a second weight of the text data set according to the text fuzziness degree and a preset weight matching standard;
[0072] Determining the degree of association between the associated text group and the text before and after the marked image node, and sorting each associated text in the associated text group based on the degree of association to obtain an associated text sequence;
[0073] Defining a score for each associated text in the associated text group according to the associated text sequence to obtain an associated text score for each associated text in the associated text group;
[0074] Determine, according to the text data set, a probability score corresponding to each text data in the text data set;
[0075] Perform overlapping screening on the associated texts according to the text data to obtain at least one overlapping text;
[0076] Calculate the associated weight of the at least one overlapping text based on the first weight and the associated text score to obtain an associated weight value;
[0077] Calculate the probability weight of the at least one overlapping text based on the second weight and the probability score to obtain a probability weight value;
[0078] The sum of the associated weight value and the probability weight value corresponding to the at least one overlapping text is used as the text representative value corresponding to the at least one overlapping text, and the text representative value is numerically sorted and filtered based on preset filtering criteria to obtain the target text corresponding to the marked image node.
[0079] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:
[0080] An electronic device, comprising:
[0081] at least one processor;
[0082] Memory;
[0083] At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the document information recognition method based on artificial intelligence described in the first aspect above.
[0084] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0085] A computer-readable storage medium, comprising: storing a computer program that can be loaded by a processor and execute the document information recognition method based on artificial intelligence described in the first aspect above.
[0086] In summary, the present application includes the following beneficial technical effects: when performing text recognition on a document information image containing text information, the document information image that needs to be recognized is obtained, and then the document information image is subjected to primary recognition to obtain first document information and content scene information corresponding to the first document information. Through the primary recognition, the text in the document information image can be recognized and converted into the first document information and the content scene information when the first document information is applied, so as to facilitate the subsequent confirmation of the semantic clarity of the recognized first document information, and then determine whether there is semantically unclear text in the first document information. If so, the image nodes corresponding to the semantically unclear text in the document information image are marked to obtain the marked document information. Information image, semantically unclear text includes illogicality and chaotic characters, and then the first document information and content scene information are subjected to content-scene association analysis to obtain the target text, the first document information is updated based on the target text to obtain the second document information, and the second document information is sent to the user terminal. By performing content-scene association analysis on the first document information and the content scene information, the correct text corresponding to the semantically unclear text in the first document information, that is, the target text, can be accurately obtained, and the semantically unclear text in the first document information is replaced and updated based on the target text, and the obtained second document information is the accurate document information required by the current user terminal, thereby improving the accuracy of document information recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 It is a flowchart of a document information recognition method based on artificial intelligence provided by an embodiment of the present application;
[0088] Figure 2 It is a block diagram of a document information recognition system based on artificial intelligence provided by an embodiment of the present application;
[0089] Figure 3 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0090] The following is combined with Figure 1-3 This application is described in further detail.
[0091] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, a person skilled in the art may make non-creative modifications to the present embodiment as needed, but such modifications are protected by the patent law as long as they are within the scope of the present application.
[0092] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0093] In addition, the term "and / or" in this article is only a description of 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 at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.
[0094] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.
[0095] The embodiment of the present application provides a document information recognition method based on artificial intelligence, which is executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and the embodiment of the present application does not limit this. Figure 1 As shown, the method includes:
[0096] Step S10: Acquire document information image.
[0097] The document information image is the document information image that needs to be recognized currently.
[0098] Specifically, the document information image is the core object of this step and is the basis for subsequent recognition, processing or analysis. In this application, the document information image can be obtained by shooting with devices such as scanners, digital cameras, and mobile phone cameras, or it can be directly extracted from digital resources such as electronic documents, web pages, or databases. The characteristics currently required to be recognized emphasize the timeliness and pertinence of the image, requiring the system to accurately recognize and respond to the needs of the current user.
[0099] Step S11: Perform primary recognition on the document information image to obtain first document information and content scene information corresponding to the first document information.
[0100] Specifically, primary recognition refers to the text recognition process of the document information image, the purpose of which is to extract the text information contained in the image from the image. This recognition is usually based on image processing technology, such as OCR (optical character recognition), etc., which is used to convert the text in the image into editable text information. The first document information represents the basic document content extracted from the document information image through the primary recognition process, such as text information, keywords, etc. This information is the basis for subsequent processing or analysis. In addition, content scene information refers to the background information associated with the first document information, which is used to describe the scene or environment described by the document content. For example, if the document is the minutes of a meeting of officials, then the content scene information is the meeting and parameters related to the meeting, such as time, place, and participants.
[0101] For the embodiment of the present application, natural language processing technology or rule matching method is used to determine the corresponding content scene information in the first document information.
[0102] Step S12: determine whether there is semantically unclear text in the first document information. If so, mark the image nodes corresponding to the semantically unclear text in the document information image to obtain a marked document information image.
[0103] Among them, semantically unclear text includes illogicality and jumbled characters.
[0104] For the embodiment of the present application, semantically unclear text refers to text content in the first document information that is illogical, has confusing characters, or cannot accurately express the original meaning. The reasons for the appearance of these texts include poor quality of document image information. An image node is a node in the document information image where semantically unclear text exists. In the embodiment of the present application, the image node is marked by highlighting, drawing a frame, or adding an annotation to obtain a marked document information image, that is, a document information image with an image node mark.
[0105] Step S13: Perform content-scenario association analysis on the first document information and the content-scenario information to obtain a target text.
[0106] Specifically, associated document information associated with the content scene information is obtained, a training model is created based on the associated document information, and the first document information is input into the training model for secondary recognition to obtain multiple groups of matching texts corresponding to the marked image nodes of the marked document information image. The multiple groups of matching texts are screened in combination with the previous and next texts of the marked image nodes and the marked image nodes themselves to obtain the target text corresponding to the marked image nodes.
[0107] In the embodiment of the present application, the training model is a neural network model, and the training model is trained by taking the associated document information associated with the content scene information as a sample to obtain a training model corresponding to the content scene information. The so-called associated document information refers to the content scene described in the information being consistent with or associated with the content scene described in the content scene information, and the associated document information within the historical period is collected so that the text data contained in the associated document information covers the text data contained in the current first document information, and the first document information is input into the training model for secondary recognition to obtain multiple groups of matching texts corresponding to the marked image nodes, which can not only improve the efficiency of determining the subsequent target text, but also improve the data processing volume for determining the target text.
[0108] Furthermore, when multiple groups of matching texts are screened in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain the target text corresponding to the marked image node, it specifically includes: taking the preceding and following texts of the marked image node as the first screening condition, and performing a primary screening on the multiple groups of matching texts based on the first screening condition to obtain an associated text group, performing feature recognition processing on the marked image node to obtain text image data, inputting the text image data into a pre-trained text detection model to obtain a text data set with different probability information, taking the text data set as the second screening condition, and performing a secondary screening on the associated text group based on the second screening condition to obtain the target text corresponding to the marked image node.
[0109] Specifically, the text before and after the marked image node is the text adjacent to the text corresponding to the marked image node in the first document information. For example, the first document information is: ** optimization method based on user feedback, where "**" is the text corresponding to the marked image node, and the text before and after is "user feedback" and "optimization method".
[0110] Furthermore, when performing feature recognition processing on the marked image node to obtain text image data, it specifically includes: creating a two-dimensional recognition coordinate system, and placing the marked image node in the two-dimensional recognition coordinate system to obtain the text image map point of the marked image node, and then determining the coordinate information and descriptor information corresponding to each text feature point in the marked image node based on the text image map point, and then packaging the coordinate information and descriptor information to obtain the text image data.
[0111] Specifically, the main components of text image map points include: coordinates, feature points and descriptors. Among them, coordinates are generally in the form of (u, v) to represent the position coordinates of the marked image node, that is, the coordinates in the two-dimensional recognition coordinate system. The descriptor is a data structure that describes the features, generally represented in the form of a matrix. The description of feature points is to assign a specific and identifiable ID to the extracted feature points, and calibrate the feature points according to the depiction characteristics of the text. Each calibrated feature point can be expressed as: .
[0112] Where (u, v) represents the position coordinates of the feature point, and d is the descriptor (usually a matrix of fixed size).
[0113] Furthermore, when training a text detection model, fuzzy images corresponding to different text data in different formats are obtained, a two-dimensional training coordinate system corresponding to the two-dimensional recognition coordinate system is created, and the fuzzy image is placed in the two-dimensional training coordinate system to obtain fuzzy image map points of the fuzzy image. The training coordinate information and training descriptor information corresponding to each image feature point in the fuzzy image are determined according to the fuzzy image map points, and then a text detection model is created. Each text data and the training coordinate information and training descriptor information corresponding to the text data are used as training samples to train the text detection model to obtain a trained text detection model.
[0114] It is worth mentioning that when placing the marked image node into the two-dimensional recognition coordinate system and placing the fuzzy image into the two-dimensional training coordinate system, the texts are placed one by one. For example, when the marked image node or the fuzzy image corresponds to multiple texts, the marked image node or the fuzzy image is split into texts to obtain multiple text image nodes to be input corresponding to the marked image node and multiple text images to be input corresponding to the fuzzy image. In addition, when the text image is placed into the two-dimensional recognition coordinate system or the two-dimensional training coordinate system, the text image is placed in the first quadrant of the two different coordinate systems, and the bottom of the text image is aligned with the X-axis, and the left side of the text image is aligned with the Y-axis.
[0115] In an embodiment of the present application, text image data is input into a pre-trained text detection model to obtain text data sets with different probability information, including: after the text detection model completes detection of the text image data, the text data set output by the text detection model is obtained, the training descriptor information corresponding to the text data set is determined, and the descriptors in the training descriptor information are compared with the descriptors in the descriptor information in a matrix to obtain similarity ratio information of each text in the text data set, and the probability value of each text in the text data set is defined according to the similarity ratio information to obtain text data sets with different probability information.
[0116] Specifically, when the text data set is used as the second screening condition, and the associated text group is subjected to secondary screening based on the second screening condition to obtain the target text corresponding to the marked image node, it specifically includes: determining the fuzziness degree of the text corresponding to the marked image node, and defining the first weight of the associated text group and the second weight of the text data set according to the fuzziness degree of the text and a preset weight matching standard, determining the degree of association between the associated text group and the preceding and following texts of the marked image node, and sorting each associated text in the associated text group based on the degree of association to obtain an associated text sequence, and defining a score for each associated text in the associated text group according to the associated text sequence to obtain a score for each associated text in the associated text group. Associated text score, determine the probability score corresponding to each text data in the text data set according to the text data set, perform overlapping screening on the associated text according to the text data to obtain at least one overlapping text, calculate the associated weight of the at least one overlapping text based on the first weight and the associated text score to obtain the associated weight value, calculate the probability weight of the at least one overlapping text based on the second weight and the probability score to obtain the probability weight value, take the sum of the associated weight value and the probability weight value corresponding to the at least one overlapping text as the text representative value corresponding to the at least one overlapping text, and numerically sort and screen the text representative value based on the preset screening criteria to obtain the target text corresponding to the marked image node.
[0117] In the embodiment of the present application, the preset weight ratio standard is the weight ratio relationship between the associated text group and the text data set defined by the staff according to the text fuzziness. When the fuzziness is 30%, the weight ratio of the associated text group is 30%, and the weight ratio of the text data set is 70%. The degree of association between the text before and after the marked image node in the associated text group represents the degree of association of each text in the associated text group after combining with the text before and after, that is, finding the degree of adaptation of the associated text group after combining with the text before and after, and defining the score according to the degree of adaptation. The specific definition method is to define the score according to the preset definition standard. The definition standard includes associated text parameters and score parameters. According to the order of different associated text parameters, the corresponding scores are preset.
[0118] Step S14: Update the first document information based on the target text to obtain second document information, and send the second document information to the user terminal.
[0119] For the embodiment of the present application, when performing text recognition on a document information image containing text information, the document information image that needs to be recognized is obtained, and then the document information image is subjected to primary recognition to obtain first document information and content scene information corresponding to the first document information. Through the primary recognition, the text in the document information image can be recognized and converted into the first document information and the content scene information when the first document information is applied, so as to facilitate the subsequent confirmation of the semantic clarity of the recognized first document information, and then determine whether there is semantically unclear text in the first document information. If so, the image nodes corresponding to the semantically unclear text in the document information image are marked to obtain a marked document information image. Unclear text includes illogicality and chaotic characters. Then, a content-scenario association analysis is performed on the first document information and the content-scenario information to obtain the target text. The first document information is updated based on the target text to obtain the second document information, and the second document information is sent to the user terminal. By performing a content-scenario association analysis on the first document information and the content-scenario information, the correct text corresponding to the semantically unclear text in the first document information, that is, the target text, can be accurately obtained, and the semantically unclear text in the first document information is replaced and updated based on the target text. The obtained second document information is the accurate document information required by the current user terminal, thereby improving the accuracy of document information recognition.
[0120] The above embodiment introduces a document information recognition method based on artificial intelligence from the perspective of method flow, and the following embodiment introduces a document information recognition system based on artificial intelligence from the perspective of a virtual module or a virtual unit. For details, please refer to the following embodiment.
[0121] See also Figure 2 , a document information recognition system 20 based on artificial intelligence may specifically include: an image acquisition module 21, an image recognition module 22, an image marking module 23, an association analysis module 24 and a document update module 25, wherein:
[0122] A document information recognition system 20 based on artificial intelligence, comprising:
[0123] The image acquisition module 21 is used to acquire a document information image, where the document information image is the document information image currently required to be recognized;
[0124] An image recognition module 22, configured to perform primary recognition on the document information image to obtain first document information and content scene information corresponding to the first document information;
[0125] The image marking module 23 is used to determine whether there is semantically unclear text in the first document information. If so, the image nodes corresponding to the semantically unclear text in the document information image are marked to obtain a marked document information image. The semantically unclear text includes illogical and chaotic characters.
[0126] The association analysis module 24 is used to perform content-scenario association analysis on the first document information and the content-scenario information to obtain a target text;
[0127] The document updating module 25 is used to update the first document information based on the target text to obtain the second document information, and send the second document information to the user terminal.
[0128] In a possible implementation of the embodiment of the present application, when the association analysis module 24 performs content-scenario association analysis on the first document information and the content-scenario information to obtain the target text, it is specifically used to:
[0129] Acquire associated document information associated with the content scene information, create a training model based on the associated document information, and input the first document information into the training model for secondary recognition to obtain multiple groups of matching texts corresponding to the marked image nodes of the marked document information image;
[0130] The multiple groups of matching texts are screened in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain the target text corresponding to the marked image node.
[0131] In another possible implementation of the embodiment of the present application, the association analysis module 24 is specifically used to:
[0132] Using the preceding and following texts of the marked image node as a first screening condition, and performing a primary screening on multiple groups of matching texts based on the first screening condition to obtain an associated text group;
[0133] Perform feature recognition processing on the marked image nodes to obtain text image data;
[0134] Input text image data into a pre-trained text detection model to obtain text datasets with different probability information;
[0135] The text data set is used as the second screening condition, and the associated text group is secondary screened based on the second screening condition to obtain the target text corresponding to the marked image node.
[0136] In another possible implementation of the embodiment of the present application, when the association analysis module 24 performs feature recognition processing on the marked image node to obtain text image data, it is specifically used to:
[0137] Create a two-dimensional recognition coordinate system, and place the marked image node into the two-dimensional recognition coordinate system to obtain the text image map point of the marked image node;
[0138] Determine the coordinate information and descriptor information corresponding to each text feature point in the marked image node according to the text image map point;
[0139] The coordinate information and the descriptor information are packaged and processed to obtain text image data.
[0140] In another possible implementation of the embodiment of the present application, the system 20 further includes: a data image acquisition module, a coordinate system creation module, an information determination module, and a model training module, wherein:
[0141] A data image acquisition module is used to acquire fuzzy images corresponding to different text data in different formats;
[0142] A coordinate creation module is used to create a two-dimensional training coordinate system corresponding to the two-dimensional recognition coordinate system, and place the blurred image into the two-dimensional training coordinate system to obtain blurred image map points of the blurred image;
[0143] An information determination module, used to determine the training coordinate information and training descriptor information corresponding to each image feature point in the blurred image according to the blurred image map point;
[0144] The model training module is used to create a text detection model, and use each text data and the training coordinate information and training descriptor information corresponding to the text data as training samples to train the text detection model to obtain a trained text detection model.
[0145] In another possible implementation of the embodiment of the present application, when the association analysis module 24 inputs the text image data into a pre-trained text detection model to obtain a text data set with different probability information, it is specifically used to:
[0146] When the text detection model completes the detection of the text image data, the text data set output by the text detection model is obtained;
[0147] Determine the training descriptor information corresponding to the text data set, and perform matrix comparison between the descriptors in the training descriptor information and the descriptors in the descriptor information to obtain similarity ratio information of each text in the text data set;
[0148] The probability value of each text in the text data set is defined according to the similarity ratio information, and text data sets with different probability information are obtained.
[0149] In another possible implementation of the embodiment of the present application, the association analysis module 24 uses the text data set as the second screening condition and performs secondary screening on the associated text group based on the second screening condition to obtain the target text corresponding to the marked image node, specifically for:
[0150] Determine the text fuzziness level corresponding to the marked image node, and define a first weight of the associated text group and a second weight of the text data set according to the text fuzziness level and a preset weight matching standard;
[0151] Determine the degree of association between the associated text group and the text before and after the marked image node, and sort each associated text in the associated text group based on the degree of association to obtain an associated text sequence;
[0152] Defining a score for each associated text in the associated text group according to the associated text sequence, and obtaining an associated text score for each associated text in the associated text group;
[0153] Determine the probability score corresponding to each text data in the text data set according to the text data set;
[0154] Perform overlapping screening on the associated texts according to the text data to obtain at least one overlapping text;
[0155] Calculate the correlation weight of at least one overlapping text based on the first weight and the correlation text score to obtain a correlation weight value;
[0156] Calculate the probability weight of at least one overlapping text based on the second weight and the probability score to obtain a probability weight value;
[0157] The sum of the associated weight value and the probability weight value corresponding to at least one overlapping text is used as the text representative value corresponding to at least one overlapping text, and the text representative value is numerically sorted and filtered based on preset filtering criteria to obtain the target text corresponding to the marked image node.
[0158] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0159] See also Figure 3 , the embodiment of the present application also introduces an electronic device from the perspective of a physical device, such as Figure 3 As shown, Figure 3The electronic device 300 shown includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.
[0160] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0161] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0162] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0163] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.
[0164] The electronic devices include but are not limited to: mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc., and can also be servers, etc. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0165] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.
[0166] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0167] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A document information recognition method based on artificial intelligence, characterized in that: include: Acquire a document information image, wherein the document information image is the document information image currently required to be recognized; Performing primary recognition on the document information image to obtain first document information and content scene information corresponding to the first document information; Determine whether there is semantically unclear text in the first document information, and if so, mark the image nodes corresponding to the semantically unclear text in the document information image to obtain a marked document information image, wherein the semantically unclear text includes illogical incoherence and disordered characters; Performing content-scenario association analysis on the first document information and the content-scenario information to obtain a target text; The performing content-scenario association analysis on the first document information and the content-scenario information to obtain a target text includes: Acquire associated document information associated with the content scene information, create a training model based on the associated document information, and input the first document information into the training model for secondary recognition to obtain multiple groups of matching texts corresponding to the marked image nodes of the marked document information image; The plurality of groups of matching texts are screened in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain a target text corresponding to the marked image node; The first document information is updated based on the target text to obtain second document information, and the second document information is sent to a user terminal.
2. The document information recognition method based on artificial intelligence according to claim 1 is characterized in that: The step of screening the multiple groups of matching texts in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain the target text corresponding to the marked image node includes: Using the preceding and following texts of the marked image node as a first screening condition, and performing a primary screening on the multiple groups of matching texts based on the first screening condition to obtain an associated text group; Performing feature recognition processing on the marked image nodes to obtain text image data; Inputting the text image data into a pre-trained text detection model to obtain a text data set with different probability information; The text data set is used as a second screening condition, and based on the second screening condition, a secondary screening is performed on the associated text group to obtain a target text corresponding to the marked image node.
3. The document information recognition method based on artificial intelligence according to claim 2 is characterized in that: The step of performing feature recognition processing on the marked image nodes to obtain text image data includes: Creating a two-dimensional recognition coordinate system, and placing the marked image node into the two-dimensional recognition coordinate system to obtain a text image map point of the marked image node; Determine the coordinate information and descriptor information corresponding to each text feature point in the marked image node according to the text image map point; The coordinate information and the descriptor information are packaged and processed to obtain text image data.
4. The document information recognition method based on artificial intelligence according to claim 3 is characterized in that: The text image data is input into a pre-trained text detection model to obtain a text data set with different probability information, and the method also includes: Obtain the fuzzy images corresponding to different text data in different formats; Creating a two-dimensional training coordinate system corresponding to the two-dimensional recognition coordinate system, and placing the blurred image into the two-dimensional training coordinate system to obtain blurred image map points of the blurred image; Determine the training coordinate information and training descriptor information corresponding to each image feature point in the blurred image according to the blurred image map point; A text detection model is created, and each text data and the training coordinate information and training descriptor information corresponding to the text data are used as training samples to train the text detection model to obtain a trained text detection model.
5. The document information recognition method based on artificial intelligence according to claim 4 is characterized in that: The text image data is input into a pre-trained text detection model to obtain a text data set with different probability information, including: When the text detection model completes the detection of the text image data, obtaining a text data set output by the text detection model; Determine the training descriptor information corresponding to the text data set, and perform matrix comparison between the descriptors in the training descriptor information and the descriptors in the descriptor information to obtain similarity ratio information of each text in the text data set; The probability value of each text in the text data set is defined according to the similarity ratio information to obtain text data sets with different probability information.
6. The document information recognition method based on artificial intelligence according to claim 3 is characterized in that: The step of using the text data set as a second screening condition and performing secondary screening on the associated text group based on the second screening condition to obtain a target text corresponding to the marked image node includes: Determining the text fuzziness degree corresponding to the marked image node, and defining a first weight of the associated text group and a second weight of the text data set according to the text fuzziness degree and a preset weight matching standard; Determining the degree of association between the associated text group and the text before and after the marked image node, and sorting each associated text in the associated text group based on the degree of association to obtain an associated text sequence; Defining a score for each associated text in the associated text group according to the associated text sequence to obtain an associated text score for each associated text in the associated text group; Determine, according to the text data set, a probability score corresponding to each text data in the text data set; Perform overlapping screening on the associated texts according to the text data to obtain at least one overlapping text; Calculate the associated weight of the at least one overlapping text based on the first weight and the associated text score to obtain an associated weight value; Calculate the probability weight of the at least one overlapping text based on the second weight and the probability score to obtain a probability weight value; The sum of the associated weight value and the probability weight value corresponding to the at least one overlapping text is used as the text representative value corresponding to the at least one overlapping text, and the text representative value is numerically sorted and filtered based on preset filtering criteria to obtain the target text corresponding to the marked image node.
7. A document information recognition system based on artificial intelligence, characterized in that: include: An image acquisition module is used to acquire a document information image, wherein the document information image is the document information image currently required to be identified; An image recognition module, used to perform primary recognition on the document information image to obtain first document information and content scene information corresponding to the first document information; an image marking module, used to determine whether there is semantically unclear text in the first document information, and if so, mark the image nodes corresponding to the semantically unclear text in the document information image to obtain a marked document information image, wherein the semantically unclear text includes illogical incoherence and disordered characters; A correlation analysis module, configured to perform content-scenario correlation analysis on the first document information and the content-scenario information to obtain a target text; A document updating module, configured to update the first document information based on the target text to obtain second document information, and send the second document information to a user terminal; When the association analysis module performs content-scenario association analysis on the first document information and the content-scenario information to obtain the target text, the association analysis module is specifically used to: Acquire associated document information associated with the content scene information, create a training model based on the associated document information, and input the first document information into the training model for secondary recognition to obtain multiple groups of matching texts corresponding to the marked image nodes of the marked document information image; The multiple groups of matching texts are screened in combination with the preceding and following texts of the marked image node and the marked image node itself to obtain the target text corresponding to the marked image node.
8. An electronic device, characterized in that: The electronic device includes: at least one processor; Memory; At least one application, wherein at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute an artificial intelligence-based document information recognition method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the document information recognition method based on artificial intelligence as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Document layout analysis method, model training method and device and equipment
CN113361247A
Image character recognition method, system and equipment based on intelligent corpus
CN114612912A