A method for extracting specific person name and unit name attributes in multi-modal data
By employing image text recognition and named entity recognition technologies, the complexity of identifying personal and organizational names in multimodal data has been addressed, enabling efficient and accurate extraction of specific personal and organizational names and supporting auxiliary processing for downstream tasks.
Patent Information
- Application Number
- CN202211031517.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2042-08-26
AI Technical Summary
Existing technologies for identifying specific person and organization names in multimodal data suffer from problems such as complex data format fusion and low extraction algorithm efficiency, especially when text and image data are mixed, making it difficult to efficiently identify and match people and their corresponding organizations.
Text is obtained from multimodal data using image text recognition methods. Image text boxes are processed using OCR technology to filter target information, enhance the results of names, and match people and units based on logical associations. Named entity recognition and word segmentation tools are used to adjust the accuracy by using models such as CRF, LSTM, and BERT.
It enables efficient identification and matching of specific person and organization names in multimodal data, improving identification accuracy and efficiency, and supporting auxiliary tasks in downstream work.
Smart Images

Figure CN115410185B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data recognition, and in particular to a method for extracting specific person name and unit name attributes in multi-modal data. BACKGROUND
[0002] The process of identifying valuable information of specific categories from data is called information extraction, and the process of information extraction faces two key problems. The first problem is data format. Different formats of data need to be processed by different methods according to their characteristics, and data fusion between multiple formats has more complex alignment and interaction problems. The second problem is the extraction algorithm. Generally, it can be divided into rule-based method and machine learning-based method. The rule-based method is convenient to start and can flexibly inject knowledge, but the result is rigid and requires a lot of manual logic debugging. The machine learning-based method can achieve good results on some abstract problems that rules cannot achieve, but it needs a lot of data annotation in the field. The problem solved by this work is to identify the person and the corresponding unit from multi-modal data including text data and image data, which is used to assist the downstream work. SUMMARY
[0003] In view of the above problems, the present application is proposed in order to provide a method for extracting specific person name and unit name attributes in multi-modal data, which overcomes the above problems or at least partially solves the above problems.
[0004] According to one aspect of the present application, a method for extracting specific person name and unit name attributes in multi-modal data is provided, comprising:
[0005] obtaining an original data file;
[0006] using an image text recognition method to recognize the text in the image in the original data file;
[0007] converting the image text recognition text box into a text sequence to obtain a pure text result of picture recognition;
[0008] screening data of target information from the pure text result to obtain a target text;
[0009] identifying a person name result and a unit name entity in the text from the target text;
[0010] enhancing the person name result to obtain an enhanced person name result;
[0011] matching the person and the unit according to the enhanced person name result.
[0012] Optionally, the obtaining of the original data file specifically comprises:
[0013] the original data file format includes pure text, picture, and document containing text and picture;
[0014] The pure text is numbered and archived;
[0015] The picture is numbered and archived;
[0016] For a document containing both text and pictures, the text content and all pictures are extracted by using existing tools, classified, numbered, archived, and the correspondence between the archived file and the original file is saved.
[0017] Optionally, the method for recognizing text in the image in the original data file by using image text recognition specifically comprises:
[0018] The input is a picture, and the output is a sequence of text boxes, each of which includes position coordinates and text content; many pictures are long pictures with a very large length-width size ratio to adapt to mobile terminal viewing, and the picture size is adjusted when directly recognizing by using an image text recognition model; when the picture length exceeds a certain threshold and the length-width ratio exceeds a certain threshold, the cutting process is entered;
[0019] The sub-picture is first cut according to a fixed length, and the text is recognized; when no text box is recognized or the position of the last text box is more than a certain threshold away from the lower boundary of the sub-picture, the cutting lower boundary is taken as the cutting upper boundary of the next time, otherwise it is considered that there is a risk of cutting the text box in the middle, the lower edge of the last text box is taken as the cutting upper boundary of the next time, and the sub-picture is then cut according to the fixed length, until the whole long picture is processed,
[0020] The real coordinate position of the text box in the recognition result is modified according to the cutting position bias;
[0021] The recognition result of each picture is archived, and the correspondence between the recognition result file and the original picture file is saved.
[0022] Optionally, the method for converting the image text recognition text box into a text sequence to obtain the pure text result of picture recognition specifically comprises:
[0023] The image text recognition text box is converted into a text sequence;
[0024] The aligned text box position is fine-tuned; for all text boxes, the mean value of the horizontal coordinates of the upper left and lower left corners is calculated and the original value is replaced, the mean value of the horizontal coordinates of the upper right and lower right corners is calculated and the original value is replaced, the mean value of the vertical coordinates of the upper left and upper right corners is calculated and the original value is replaced, and the mean value of the vertical coordinates of the lower left and lower right corners is calculated and the original value is replaced;
[0025] All text boxes are sorted by the horizontal coordinates of the upper left corners; for adjacent text boxes, if the distance between the left boundaries does not exceed a certain threshold, they are grouped together, otherwise they are grouped differently, and finally the mean value of the left boundaries of the text boxes in the same group is taken and the original value is replaced;
[0026] The same operation is performed on the right boundary, the upper boundary, and the lower boundary;
[0027] Ensure that all text boxes are relatively parallel rectangles, and the border position of similar text boxes is aligned; restore the text box order to the original left-to-right and top-to-bottom order;
[0028] Sort all text boxes based on the top-left vertical coordinate, calculate the distance between adjacent text boxes, and take the upper quartile of the distance between text boxes without overlapping relationships as the interval threshold. Group all text boxes in the vertical direction according to the interval threshold;
[0029] For each vertical group, use the same method to get horizontal direction grouping, take the smallest rectangle containing all text boxes in the small horizontal group as the new merged text box, and calculate the rectangle surrounded by the outermost position in the four directions;
[0030] After restoring the order of text boxes in each merged rectangle from left to right and top to bottom, splice the text in the merged rectangle. When merging text, it is necessary to determine whether the adjacent two sentences can be directly spliced or need to add punctuation marks. After training a statistical language model on Chinese Wikipedia data, five sets of conditional probabilities are calculated: the first word of the next text after the end symbol s1, the punctuation mark s2, the first word of the next text after the first text s3, the start symbol plus the next text s4, and the last word of the first text plus the next text s5. If s3>s1 and s2>s1 or s5>s4, it means that the possibility of connecting the two texts is greater than the possibility of splitting, then directly splice, otherwise splice through the connector;
[0031] For the obtained merged and rearranged result, splice the text with different connectors according to the vertical large partition and horizontal small group, and get the pure text result recognized by the picture. Archive and keep the correspondence between the recognition result file and the original image text recognition result file.
[0032] Optionally, the data of the target information filtered from the pure text result specifically includes:
[0033] High-recall keywords are used to filter text;
[0034] Find keywords in the text file and the image recognition text file respectively, and keep the effective results containing the keywords.
[0035] Optionally, the enhancement processing of the person name result specifically includes:
[0036] Vote for multiple groups of person name recognition results in each data to determine the final result, and keep it if there are more than two consistent results;
[0037] The recognition results of all files belonging to the same original document are summarized, and all person name recognition results are summarized, and the summarized person name recognition results are used for string matching of all files to supplement the position of the person name which is not recognized.
[0038] The co-occurrence times of person names and unit names in a certain window distance are calculated for the recognition result of each file to obtain a person name and unit name co-occurrence matrix in each article.
[0039] Optionally, the matching of the person and the unit according to the enhanced person name result specifically comprises:
[0040] The position distance of adjacent entities is calculated for the recognition result of each file, if the distance exceeds a threshold length, an interval symbol is inserted, and then a hard interval symbol in the previously recognized text is added to find an interval containing at least one person name and one unit name, and the effective interval is reserved.
[0041] The person and unit matching is performed on the pure text data.
[0042] The person and unit matching is performed on the picture recognition data.
[0043] The results of multiple data files belonging to the same original file are merged and mapped to the original file.
[0044] The method for extracting specific person name and unit name attributes in multi-modal data provided by the application comprises the following steps: obtaining an original data file; recognizing the text in the image in the original data file by using an image character recognition method; converting the image character recognition text box into a text sequence to obtain a pure text result of picture recognition; screening the data of target information from the pure text result to obtain target text; recognizing the person name result and unit name entity in the text from the target text; performing enhancement processing on the person name result to obtain an enhanced person name result; and matching the person and the unit according to the enhanced person name result. By analyzing the logical association between the key information in the data, the target result state satisfying all logical relationship constraints is gradually recognized, and the operation details of this algorithm paradigm are specifically illustrated by examples of recognizing persons and units.
[0045] The above description is only a summary of the technical scheme of the application, in order to more clearly understand the technical means of the application, the application can be implemented according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the application more obvious and easy to understand, the specific embodiments of the application are described below. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0047] Figure 1 The flow chart of the method for extracting specific person name and unit name attribute in multi-modal data provided by the embodiments of the present application. DETAILED DESCRIPTION
[0048] The exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings. While the exemplary embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.
[0049] The terms "comprise" and "have" and any variations thereof in the specification and claims of the present application and the drawings are intended to cover not exclusive inclusion, for example, including a series of steps or units.
[0050] The technical solutions of the present application will be described in further detail below in combination with the drawings and embodiments.
[0051] As shown in Figure 1 A method for extracting specific person name and unit name attribute in multi-modal data includes:
[0052] Obtaining an original data file;
[0053] Using an image text recognition method to recognize the text in the image in the original data file;
[0054] Converting the image text recognition text box to a text sequence to obtain a pure text result of picture recognition;
[0055] Filtering the data of the target information from the pure text result to obtain a target text;
[0056] Identifying the person name result and unit name entity in the text from the target text;
[0057] Enhancing the person name result to obtain an enhanced person name result;
[0058] Matching the person and unit according to the enhanced person name result.
[0059] Obtain the original data files, the algorithm input is a data set containing multiple data formats. The original data file formats include plain text (txt), pictures (jpeg, png, tiff, etc.), documents containing text and pictures (html, doc, ppt, pdf, etc.). For plain text files, number and archive. For separate picture files, number and archive. For document files containing text and pictures, use existing tools to extract text content and all pictures, classify, number, archive, and save the correspondence between the archive files and the original files.
[0060] The image text recognition method is used to recognize the text in the image in the original data file, which specifically includes: in order to facilitate semantic understanding of image content, first, the text in the image is recognized by OCR technology. OCR technology can be regarded as a mature and ready-to-use technology, and is not the focus of this work, and its core principle is not described in detail. The input is a picture, and the output is a sequence of text boxes, each text box containing position coordinates and text content. In particular, many pictures are made into long pictures with a large aspect ratio to adapt to mobile terminal viewing. When such pictures are directly recognized by the OCR model, the picture size may be adjusted, which may cause the image to be compressed by a large proportion, and the text content in the image is difficult to recognize. To solve this problem, when the picture length exceeds a certain threshold and the aspect ratio exceeds a certain threshold, the picture is cut into sub-pictures. The text is recognized, and when no text box is recognized or the position of the last text box is more than a certain threshold from the lower boundary of the sub-picture, the lower boundary of the cut is used as the upper boundary of the next cut. Otherwise, it is considered that there is a risk of cutting the text box in the middle, and the lower edge of the last text box is used as the upper boundary of the next cut. The sub-picture is cut again according to the fixed length, until the whole long picture is processed. Finally, the real coordinate position of the text box in the recognition result is modified according to the cutting position bias. The recognition result of each picture is archived, and the correspondence between the recognition result file and the original picture file is saved.
[0061] Screening data of target information from the pure text result comprises: converting the OCR text box to a text sequence to facilitate subsequent identification of key information by a text data analysis method. Considering that the picture design generally follows the principle of content alignment, but the position of the text box recognized by the OCR may have a small amount of deviation, which affects the subsequent grouping judgment, the position of the aligned text box is first fine-tuned. For all text boxes, the mean values of the horizontal coordinates of the upper left and lower left corners are calculated and the original values are replaced, the mean values of the horizontal coordinates of the upper right and lower right corners are calculated and the original values are replaced, the mean values of the vertical coordinates of the upper left and upper right corners are calculated and the original values are replaced, and the mean values of the vertical coordinates of the lower left and lower right corners are calculated and the original values are replaced. All text boxes are sorted by the horizontal coordinate of the upper left corner, and adjacent text boxes are grouped if the left boundary distance is not more than a certain threshold, otherwise they are grouped differently, and finally the left boundary of the text boxes in the same group is averaged and the original value is replaced. The same operation is performed on the right boundary, the upper boundary and the lower boundary. This step ensures that all text boxes are relatively parallel rectangles, and the boundary positions of adjacent text boxes are aligned. Finally, the text box order is restored to the original left-to-right and top-to-bottom order.
[0062] Sometimes the text line spacing in the picture is too large, which will cause continuous text to be cut into different text boxes, resulting in confusion of the original continuous text, so the next step is to group and merge adjacent text boxes. All text boxes are sorted based on the vertical coordinate of the upper left corner, the distance between adjacent text boxes is calculated, the upper quartile of the distance between text boxes without overlapping relationship is taken as the interval threshold, and all text boxes are grouped in the vertical direction according to the threshold. Then, for each vertical group, the same method is used to get the horizontal direction grouping within the group, and the smallest rectangle containing all text boxes in the small horizontal group is taken as the new merged text box, i.e. the rectangle surrounded by the outermost position in the four directions is calculated. After restoring the order of the text boxes in each merged rectangle from left to right and top to bottom, the text in the merged rectangle is spliced. When merging text, it is necessary to judge whether the two adjacent sentences can be directly spliced or need to add punctuation marks. After training a statistical language model on Chinese Wikipedia data, five sets of conditional probabilities are calculated: the first word of the next text s3, the last word of the previous text s5, the first word of the next text s3, the first word of the next text s3, and the first word of the next text s3. If s3>s1 and s2>s1 or s5>s4, the probability that the two texts are coherent is greater than the probability that they are split, then they are directly spliced, otherwise they are spliced by a connector.
[0063] The merged and rearranged result obtained above is grouped in the vertical direction and grouped in the horizontal direction, and the text is spliced with different connectors to obtain the pure text result recognized by the picture, which is archived and the correspondence between the recognition result file and the original OCR result file is preserved.
[0064] Data filtering is specifically: the data containing target information in the real data may only account for a small part, in order to avoid irrelevant data occupying a large amount of processing time and computing resources, the text is filtered by high recall keywords. The following position title related keywords and the appearance of the name are highly related: academician, professor, tutor, doctoral tutor, director, doctor, physician, dean, chairman, director, chairman, hospital. Find keywords in text files and OCR text files, and keep the effective results containing keywords.
[0065] Named entity recognition uses models including but not limited to CRF, LSTM, and BERT to identify person names and unit names in the text.
[0066] CRF: Conditional Random Field model, assuming that X and Y are linearly represented random variable sequences, the conditional probability of Y given X is only related to the adjacent state before and after, and the conditional probability distribution of Y given X is learned. The original CRF method defines a feature function related to the original text, position, current label, and previous label, including state feature functions generated by feature functions from the original sequence and transition feature functions of adjacent state transition scores, and learns the weight of each feature function. The CRF layer of the neural network obtains the feature sequence from the upstream encoding layer, and then learns the transition matrix. When decoding, the emission and transition path scores of the label sequence are calculated, and the best path is obtained by the Viterbi algorithm.
[0067] BiLSTM-CRF: After text vectorization, features are extracted by bidirectional LSTM, and then annotated sequences are obtained by CRF decoding. Each text in LSTM is regarded as a time step, and the input vector and the output of the previous time step are used to calculate the input gate, the forgetting gate, and the output gate, respectively. Then add the long-term memory of the previous time step, calculate the long-term memory and short-term memory, and output to the next time step. Calculate it once in the forward and reverse order to fully obtain the context information before and after, and then concatenate it as the emission matrix into the CRF. In addition, from the perspective of computational efficiency and feature extraction, BiLSTM can be replaced by CNN and other modules.
[0068] BERT: Learn text representation through multiple layers of multi-head self-attention modules. After training on large-scale corpus, small data learning on task-oriented corpus can transfer knowledge and achieve better performance. Each unit of the transformer fuses global features from different angles through multi-head self-attention, which has higher computational efficiency than RNN. Layer normalization and residual connection improve learning efficiency, so that very complex multi-level global text features can be learned through deep networks. In addition to large-scale corpus learning, pre-training models have strong generalization ability. Since BERT itself already has strong context knowledge, the label sequence can be obtained by directly outputting each label probability through a fully connected layer and a softmax.
[0069] To reduce the bias of single model prediction, the names and units are predicted by multiple models. The named entity recognition result may not be accurate in word boundary, so the recognition result is adjusted by the segmentation result. Based on the principle of segmentation tools, in most ambiguous context, the segmentation result tends to cut into more fine-grained, some words are split into word units, but the boundary should be more accurate than the named entity recognition result. By the ready-made segmentation tool to segment the text, for the position of the recognized entity range, compare the segmentation boundary and the entity recognition boundary, if two consecutive entities of the same type are recognized, merge the entity range; if the entity boundary is inconsistent with the segmentation boundary, expand the entity boundary to the nearest segmentation boundary. In addition, the hard interval in the text is recognized according to the comma, division and other separators.
[0070] The name result enhancement includes: voting for multiple sets of name recognition results in each piece of data to determine the final result, and keeping it if there are more than two consistent results. For the recognition results of all files belonging to the same original document, all name recognition results are summarized, and the summarized name recognition results are used to supplement the positions of the names that are not recognized by string matching all files. For the recognition result of each file, the co-occurrence number of names and units within a certain window distance is calculated to obtain the co-occurrence matrix of names and units in each article.
[0071] The paired coarse screening includes: for the recognition result of each file, the distance between adjacent entities is calculated, and if the distance exceeds the threshold length, an interval is inserted, and then the previously recognized hard interval in the text is added to find an interval containing at least one name and one unit, and the effective interval is kept.
[0072] The matching of the person and unit includes: the matching of the pure text data is as follows: first, in each interval, find the "non-competitive" name, and the non-competitive means that according to the principle of adjacent matching, a unit name only exists one matchable name, traverse all the names, analyze the entity sequence with a total length of 5 before and after the name, if the category combination meets the following conditions, it is considered that the target name can be determined to be paired with the adjacent unit name, and there are 17 minimum combination conditions: PA, PAA, AP, AAP, AAPPP, APPP, AAPP, AAPPA, APPA, AAPAA, APA, AAPA, APAA, PPPAA, PPPA, PPAA, APPAA (A represents a unit name, and P represents a name), if the requirement is met, the target name is paired with the unit name closest to both sides, the result is saved, and the paired entity is removed from the entity sequence. Second, in each interval, find the "non-competitive" unit name, and the method is the same as above. Third, find the one-to-two condition of the remaining name and unit, if one of the pairs is in the saved result, the result is reserved and removed from the entity sequence; if the position of one of the unit names is close to the name, the result is reserved and removed from the entity sequence, if the position of the unit name on both sides is close to the name, it is judged which of the unit names on both sides has a greater co-occurrence frequency, and the greater one is found out, the result is reserved and removed from the entity sequence. After the third step, many conditions that can be determined in the previous steps may be left, so this process is repeated until the result does not change. In the last step, for the results that have not been matched, since the unit name is limited, the possibility of the name being excessive is greater, so the unit name is used to find the nearest name and then matched.
[0073] The matching of the picture recognition data is as follows: for all the name recognition results, find the corresponding unit name one by one. If there is only one text box, find the text in the text box according to the above text search method. If there is more than one text box, start from the text box where the current name is located, find the left and right nearest neighbor text boxes that meet the distance threshold, and recursively find all text boxes that meet the requirements until all text boxes that meet the requirements are linked to, and all adjacent text box areas around the target text box are obtained. Sort all candidate text boxes by left-bottom coordinates first vertically and then horizontally, splice the text, and recognize the unit name. If there is only one unit name result, find the corresponding text box, if the text box contains multiple names, match the nearest one. If there are multiple unit name results, for each unit name result, first find the text box where the unit name result is located using the text sequence bias, and then find the nearest name text box of the unit name text box. Find the nearest unit name text box for the target name text box, and if the nearest name text box of the found unit name text box is consistent with the target name text box, the result is reserved. For the found name and unit name text boxes, splice the text, and then find the pairing result according to the above text processing process.
[0074] According to the file name correspondence relationship saved in the previous step, the results of multiple data files belonging to the same original file are merged and mapped to the original file.
[0075] Beneficial effect: Make full use of the stateless results generated by basic technologies such as OCR and NER, and gradually identify the target result state that meets all logical relationship constraints by analyzing the logical association between internal key information in the data. The operation details of this algorithm paradigm are illustrated by examples of identifying characters and their units. Identify characters and their corresponding units from multi-modal data including text data and image data to assist downstream work.
[0076] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for extracting specific person name and unit name attributes in multi-modal data, characterized in that, The extraction method comprises: obtaining an original data file; recognizing text in an image in the original data file by using an image-text recognition method; converting an image-text recognition text box into a text sequence to obtain a pure text result of picture recognition, comprising: converting an image-text recognition text box into a text sequence; fine-tuning the alignment of the text box position, calculating the mean value of the left upper and left lower corner horizontal coordinates of all text boxes and replacing the original value, calculating the mean value of the right upper and right lower corner horizontal coordinates and replacing the original value, calculating the mean value of the left upper and right upper vertical coordinates and replacing the original value, and calculating the mean value of the left lower and right lower vertical coordinates and replacing the original value; sorting all text boxes according to the left upper corner horizontal coordinates, and if the left boundary distance of adjacent text boxes does not exceed a certain threshold, grouping them into a group, otherwise grouping them into different groups, and finally taking the mean value of the left boundary of the text boxes in the same group and replacing the original value; performing the same operation on the right boundary, the upper boundary and the lower boundary; ensuring that all text boxes are relatively parallel rectangles, and the boundary positions of adjacent text boxes are aligned; restoring the text box order to the original left-to-right and top-to-bottom order; sorting all text boxes based on the left upper corner vertical coordinates, calculating the distance between adjacent text boxes, taking the upper quartile of the distance between text boxes without overlapping relationship as the interval threshold, and grouping all text boxes in the vertical direction according to the interval threshold; then, for each vertical group, the same method is used to obtain horizontal direction grouping within the group, and the smallest rectangle containing all text boxes in a small horizontal group is taken as a new merged text box, and the rectangle surrounded by the outermost position in the four directions is calculated respectively; after restoring the order of the text boxes in each merged rectangle from left to right and from top to bottom, the text in the merged rectangle is spliced; when merging the text, it is necessary to judge whether the adjacent two sentences can be directly spliced or need to add punctuation marks, after training a statistical language model on Chinese Wikipedia data, five groups of conditional probabilities are calculated respectively: the first word of the previous text plus the end symbol s1, the previous text plus the punctuation symbol s2, the previous text plus the first word of the next text s3, the start symbol plus the next text s4, and the last word of the previous text plus the next text s5, if s3>s1 and s2>s1 or s5>s4, it means that the possibility of the two texts being coherent is greater than the possibility of being split, then directly splicing, otherwise splicing through a connector; the obtained merged and rearranged result is spliced by different connectors according to the vertical large partition and the horizontal small group, to obtain the pure text result recognized by the picture, and the correspondence between the recognition result file and the original image-text recognition result file is archived and preserved; screening data of target information from the pure text result to obtain a target text; recognizing a person name result and a unit name entity in the text from the target text; enhancing the person name result to obtain an enhanced person name result; matching the person and the unit according to the enhanced person name result. 2.The method of claim 1, wherein, The obtaining of the original data file specifically comprises: the original data file format includes pure text, picture, and document containing text and picture; the pure text is numbered and archived; the picture is numbered and archived; For the document containing text and pictures, the existing tool is used to extract the text content and all pictures, and the classified, numbered and archived files are saved, and the correspondence between the archived files and the original files is saved. 3.The method of claim 1, wherein, The image text recognition method comprises the following steps: The input is a picture, and the output is a text box sequence, each text box comprising position coordinates and text content; many pictures are long pictures with a large length-width size ratio to adapt to mobile terminal viewing, and the picture size is adjusted when directly recognized by the image text recognition model; when the picture length exceeds a certain threshold and the length-width ratio exceeds a certain threshold, the picture cutting process is entered; The sub-pictures are cut according to a fixed length, and the text is recognized; when no text box is recognized or the position of the last text box is more than a certain threshold from the lower boundary of the sub-picture, the cutting lower boundary is taken as the cutting upper boundary of the next time, otherwise it is considered that the text box is cut in the middle, and the lower edge of the last text box is taken as the cutting upper boundary of the next time, and the sub-pictures are cut according to the fixed length again until the whole long picture is processed, The real coordinate position of the text box in the recognition result is modified according to the cutting position bias; The recognition result of each picture is archived, and the correspondence between the recognition result file and the original picture file is saved.
4. The method of claim 1, wherein the method further comprises: The target information data is screened from the pure text result, and the target text is obtained, which comprises the following steps: The text is screened by using a high-recall keyword; The keywords are found in the text file and the image recognition text file, and the effective results containing the keywords are reserved.
5. The method of claim 1, wherein the method further comprises: The person name result is enhanced, which comprises the following steps: The multiple sets of person name recognition results in each data are voted to determine the final result, and if there are more than two consistent results, the consistent result is reserved; The recognition results of all files belonging to the same original document are summarized, all person name recognition results are summarized, and the summarized person name recognition results are used to match all files according to the string matching, and the positions of the person names that are not recognized are supplemented; The co-occurrence times of the person names and the unit names within a certain window distance are calculated for each file to obtain the person name and unit name co-occurrence matrix in each article.
6. The method of claim 1, wherein the method further comprises: The person name result is enhanced, which comprises the following steps: The position distance of adjacent entities is calculated for each file, if the distance exceeds a threshold length, an interval symbol is inserted, and then the hard interval symbol in the previously recognized text is added, the interval containing at least one person name and one unit name is found, and the effective interval is reserved; The person name and unit name matching is performed on the pure text data; The person name and unit name matching is performed on the picture recognition data; The results of multiple data files belonging to the same original file are merged and mapped to the original file.
Citation Information
Patent Citations
Video image-text courseware text extraction method and device, equipment and medium
CN112287916A
Personal relationship extraction method and system for character business cards
CN114220112A