A business card information extraction system training method and device, and a storage medium
By using a pre-defined BERT model, convolutional neural networks, and recurrent neural networks combined with a classifier, the business card information extraction system was optimized, solving the problem of business card information extraction error and achieving higher extraction accuracy and recognition effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies for extracting business card information contain errors and cannot effectively improve extraction accuracy.
The business card images are processed using a pre-defined BERT model, a pre-defined convolutional neural network, and a pre-defined recurrent neural network. A classifier and a generative adversarial network are combined, and the training is optimized by feature vectors and loss values to reduce structured information errors.
It improves the accuracy of business card information extraction, reduces errors in structured information, and enhances the system's recognition performance.
Smart Images

Figure CN116090463B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image information processing, and particularly relates to a business card information extraction system training method and device and a storage medium. BACKGROUND
[0002] The main goal of business card information extraction is to input an image of a business card and extract structured information in the business card, wherein the structured information includes key fields such as name, position, company, address, telephone number and email address.
[0003] In the prior art, business card information extraction mainly includes two processes: first, using OCR technology to recognize the text in the business card from the business card image; second, structuring the OCR-recognized text as the final system output result, and then using artificial design rules or named entity recognition technology to structure the OCR-recognized text to extract key fields in the business card.
[0004] However, since the existing OCR technology needs to recognize "trigger words" to recognize text from the image in actual use, the layout of the business card is various, and there is much redundant information, some business card information contains "trigger words", some business card information does not include "trigger words", and the "trigger words" in some business card information are icons; therefore, when the prior art extracts information from the business card, the structured information extracted has errors. Therefore, how to obtain a system capable of improving the accuracy of business card information extraction has become a technical problem to be solved. SUMMARY
[0005] The embodiment of the present application aims to provide a business card information extraction system training method and device and a storage medium, which can improve the effect of the system in extracting information from the business card, thereby reducing the error of the structured information extracted when extracting information from the business card.
[0006] The technical solution of the present application is as follows:
[0007] The embodiment of the present application provides a business card information extraction system training method, which comprises the following steps:
[0008] recognizing a business card image to obtain text information; wherein the business card image is at least one of the following: a real business card image or a simulated business card image;
[0009] obtaining a feature vector based on a preset BERT model, a preset convolutional neural network and the text information; wherein the feature vector represents semantic information of words in the text information;
[0010] The feature vectors are combined and encoded based on a preset recurrent neural network to obtain corresponding text segment feature information; wherein the text segment feature information represents different combinations of text content.
[0011] The text segment feature information is discriminated by using a classifier to obtain a predicted classification label corresponding to the text segment feature information; wherein the predicted classification label represents a text type of the text segment feature information, and the predicted classification label is a basis for obtaining structured information.
[0012] Based on a preset target function, the predicted classification label corresponding to the text segment feature information, and a preset classification label, a loss value is obtained, and a target parameter is determined according to the loss value; wherein the target parameter is a variable in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier, and the target parameter represents a system for extracting business card information.
[0013] In the above scheme, based on the preset target function, the predicted classification label corresponding to the text segment feature information, and the preset classification label, a loss value is obtained, and a target parameter is determined according to the loss value, comprising:
[0014] A first sub-loss value is obtained according to a first sub-target function, a first preset weight, the preset classification label, and the predicted classification label;
[0015] A second sub-loss value is obtained according to a second sub-target function, a second preset weight, the first preset weight, the preset classification label, and the predicted classification label; wherein the first sub-target function and the second sub-target function are both the preset target function;
[0016] The loss value is obtained based on the first sub-loss value and the second sub-loss value, and the target parameter is determined according to the loss value.
[0017] In the above scheme, the target parameter is determined according to the loss value, comprising:
[0018] When the loss value remains in a state of not decreasing, the variables in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier are determined as the target parameter.
[0019] In the above scheme, the feature vectors are obtained based on the preset BERT model, the preset convolutional neural network, and the text information, comprising:
[0020] According to the preset BERT model, text content information is converted to obtain a word vector sequence; wherein the text information includes text content information and text position information;
[0021] According to the text line position information, the word vector sequence is filled into a preset two-dimensional grid to obtain a target two-dimensional grid;
[0022] According to the target two-dimensional grid and the preset convolutional neural network, the feature vector is obtained.
[0023] In the above scheme, according to the target two-dimensional grid and the preset convolutional neural network, the feature vector is obtained, including:
[0024] According to the target two-dimensional grid and a three-dimensional convolution kernel in the preset convolutional neural network, the feature vector is obtained.
[0025] In the above scheme, according to the target two-dimensional grid and a three-dimensional convolution kernel in the preset convolutional neural network, the feature vector is obtained, including:
[0026] According to the three-dimensional convolution kernel in the preset convolutional neural network, the feature in the target two-dimensional grid is extracted to obtain the feature vector.
[0027] In the above scheme, when the business card image is the simulated business card image, before the business card image is identified to obtain text information, the method includes:
[0028] Collecting text sample information;
[0029] According to the text sample information, a preset generative adversarial network and a preset layout rule, the business card image is obtained.
[0030] An embodiment of the present application provides a business card information extraction system training device, including an obtaining unit and a determining unit; wherein,
[0031] The obtaining unit is configured to: identify the business card image to obtain text information; obtain a feature vector based on a preset BERT model, a preset convolutional neural network, and the text information, wherein the feature vector represents semantic information of words in the text information; encode the feature vector based on a preset recurrent neural network to obtain corresponding text segment feature information, wherein the text segment feature information represents different combinations of text content; use a classifier to distinguish the text segment feature information to obtain a predicted classification label corresponding to the text segment feature information, wherein the predicted classification label represents a text type of the text segment feature information, and the predicted classification label is a basis for obtaining structured information; obtain a loss value based on a preset objective function and the predicted classification label and a preset classification label corresponding to the text segment feature information, and determine a target parameter according to the loss value.
[0032] The determining unit is configured to determine the target parameter according to the loss value, wherein the target parameter is a variable in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier, and the target parameter represents a system for extracting business card information.
[0033] In the foregoing solution, the obtaining unit is further configured to: obtain a first sub-loss value based on a first sub-objective function, a first preset weight, the preset classification label, and the predicted classification label; obtain a second sub-loss value based on a second sub-objective function, a second preset weight, the first preset weight, the preset classification label, and the predicted classification label, wherein the first sub-objective function and the second sub-objective function are the preset objective function; obtain the loss value based on the first sub-loss value and the second sub-loss value, and determine the target parameter according to the loss value.
[0034] In the foregoing solution, the determining unit is further configured to: when the loss value remains in a state of not decreasing, determine a variable in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier as the target parameter.
[0035] In the foregoing solution, the obtaining unit is further configured to: convert text content information based on the preset BERT model to obtain a word vector sequence, wherein the text information includes text content information and text position information; fill the word vector sequence into a preset two-dimensional grid according to the text line position information to obtain a target two-dimensional grid; and obtain the feature vector based on the target two-dimensional grid and the preset convolutional neural network.
[0036] In the scheme, the obtaining unit is further configured to obtain the feature vector according to the target two-dimensional grid and the three-dimensional convolution kernel in the preset convolutional neural network.
[0037] In the scheme, the obtaining unit is further configured to extract features in the target two-dimensional grid according to the three-dimensional convolution kernel in the preset convolutional neural network, and obtain the feature vector.
[0038] In the scheme, the device further comprises an acquisition unit configured to acquire text sample information when the card image is the simulated card image.
[0039] The obtaining unit is further configured to obtain the card image according to the text sample information and a preset generative adversarial network and a preset layout rule.
[0040] An embodiment of the present application provides a card information extraction system training device, comprising:
[0041] A memory configured to store executable data instructions.
[0042] A processor configured to execute the executable instructions stored in the memory to implement the card information extraction system training method.
[0043] An embodiment of the present application provides a storage medium, characterized by storing executable instructions for causing a processor to execute the card information extraction system training method.
[0044] An embodiment of the present application provides a card information extraction system training method and device, and a storage medium. The method comprises identifying a card image to obtain text information, training the text information by a preset BERT model and a preset convolutional neural network to obtain a feature vector, combining and encoding the feature vector to obtain corresponding text segment feature information, using a classifier to distinguish the text segment feature information to obtain a predicted classification label corresponding to the text segment feature information, and obtaining a loss value of the predicted classification label corresponding to the text segment feature information and a preset classification label by a preset target function. When the loss value meets a requirement, the training of the card information extraction system is completed.
[0045] An embodiment of the present application can improve the effect of the system on card information extraction, thereby reducing the error of the extracted structured information in card information extraction. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 An embodiment of the present application provides a card information extraction system architecture Figure 1 ;
[0047] Figure 2 The architecture of a business card information extraction system provided for an embodiment of the present application Figure 2 ;
[0048] Figure 3 The flow of a business card information extraction system training method provided for an embodiment of the present application Figure 1 ;
[0049] Figure 4 The flow of a business card information extraction system training method provided for an embodiment of the present application Figure 2 ;
[0050] Figure 5 The flow of a business card information extraction system training method provided for an embodiment of the present application Figure 3 ;
[0051] Figure 6 The flowchart of a business card information extraction method provided for an embodiment of the present application
[0052] Figure 7 The schematic diagram of a business card image provided for an embodiment of the present application
[0053] Figure 8 The architecture of a business card information extraction system training device provided for an embodiment of the present application Figure 1 ;
[0054] Figure 9 The architecture of a business card information extraction system training device provided for an embodiment of the present application Figure 2 .DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0056] Before introducing the solutions in the embodiments of the present application, the technical terms that can be used in the embodiments of the present application are simply explained.
[0057] GAN (Generative Adversarial Networks) is a kind of deep learning model, and the model generates quite good output through mutual game learning of (at least) two modules in the framework: generative model (Generative Model) and discriminative model (Discriminative Model).
[0058] NLP (Natural Language Processing) is a branch of artificial intelligence and linguistics, which mainly studies the processing of information such as shape, sound and meaning of natural language by computer, that is, the operation and processing of input, output, recognition, analysis, understanding and generation of words, sentences and chapters. The specific forms of natural language processing include machine translation, text summary, text classification, text correction, information extraction, speech synthesis, speech recognition, etc.
[0059] NER (Name Entity Recognition) is a very basic task in NLP. NER is an important basic tool for information extraction, question and answer system, syntax analysis, machine translation and many other NLP tasks. The purpose of named entity recognition is to identify entities of specified categories in text. The so-called named entity is the name of a person, an organization, a place and all other entities identified by name.
[0060] OCR (Optical Character Recognition) refers to the process in which an electronic device (such as a scanner or digital camera) checks characters printed on paper, determines their shape by detecting light and dark patterns, and then translates the shape into computer text by character recognition method; that is, for printed characters, the technology of converting the characters in paper documents into black and white dot matrix image files by optical method, and converting the characters in the image into text format by computer technology, for further editing and processing by word processing software
[0061] Figure 1 is a card information extraction system architecture provided by an embodiment of the application Figure 1 As shown in Figure 2 , the application provides a card information extraction system, which comprises an input module 1, an OCR module 2, an NER module 3 and an output module 4. The input module 1 is used for inputting a card image to be recognized; the OCR module 2 is used for extracting the characters in the input card image and outputting in text format; the NER module 3 is responsible for entity recognition of the text (text information) output by the OCR; and the output module 4 is used for post-processing the recognition result output by the NER module 3 and outputting the final target structured information.
[0062] In some embodiments of the application, Figure 2 is a card information extraction system architecture provided by an embodiment of the application Figure 3 , as shown in Figure 1As shown, the NER module 3 completes entity recognition of the text output by the OCR through a NER model arranged in the NER module 3. The NER model includes a Word Embedding layer, a Bidirectional layer, a Hidden layer, a Span Representations layer, a Fully-connected Layer layer, and a Span Classifier layer.
[0063] In some embodiments of the present application, the Word Embedding layer is configured to process the text output by the OCR based on a preset BERT model and a preset convolutional neural network to obtain a feature vector. The Bidirectional layer is configured to encode the feature vector based on a preset recurrent neural network to obtain corresponding text segment feature information. The Hidden layer is configured to convert hidden text segment feature information that is not easy to be captured in the text segment feature information into readable text through a Hidden model, i.e., to convert the hidden text segment feature information into readable text information. For example, if the Bidirectional layer encodes the feature vector to obtain text segment feature information containing a piece of hidden text segment feature information "B-LOC | I-LOC | I-LOC", the Hidden model of the Hidden layer can convert the above hidden text segment feature information into readable text information "self-trade zone". The Span Representations layer is configured to splice the above text segment feature information according to a preset rule. The Fully-connected Layer layer is configured to perform feature fusion or feature weighting on the text segment feature information. The Span Classifier layer is configured to discriminate the text segment feature information to obtain a predicted classification label corresponding to the text segment feature information, filter the predicted classification label, obtain target text segment feature information, and determine structured information according to the target text segment feature information and the predicted classification label corresponding to the target text segment feature information.
[0064] Figure 3 is a flow of a business card information extraction system training method provided by an embodiment of the present application Figure 4 As shown in Figure 2 The business card information extraction system training method provided by the embodiment of the present application includes the following steps.
[0065] S101, recognizing a business card image to obtain text information. The business card image is at least one of a real business card image or a simulated business card image.
[0066] In the embodiment of the present application, the scene of recognizing a business card image to obtain text information meeting preset requirements is applicable.
[0067] In the embodiment of the present application, the business card image is recognized by the OCR module to obtain the required text information.
[0068] In the embodiment of the present application, the business card image is a real business card image and / or a simulated business card image. The real business card image represents a business card printed in real life. In actual use, the real business card image can be obtained by scanning or taking a picture of the business card printed in real life. The simulated business card image is constructed based on the business card printed in real life, and the business card corresponding to the simulated business card image is not printed in reality or has differences from the printed business card. In actual use, a preset generative adversarial network can be used to output the corresponding simulated business card image according to the preset content (text sample information) and layout (preset layout rule).
[0069] In the embodiment of the present application, the input of the business card image is completed by the input module. Before input, the business card image needs to be subjected to data preprocessing operations, such as binarization, direction correction, distortion correction, and denoising.
[0070] In the embodiment of the present application, the OCR module is mainly responsible for extracting the text in the input business card image and outputting the text information in a text format, so as to obtain the text information. The text information is in the granularity of a text line, and each text line includes text content and text position information.
[0071] It can be understood that the business card image is recognized by the OCR module to obtain the text information in a text format, which is more convenient for subsequent processing.
[0072] In the embodiment of the present application, based on the preset BERT model, the preset convolutional neural network, and the text information, a feature vector is obtained, wherein the feature vector represents the semantic information of the words in the text information.
[0073] In the embodiment of the present application, the scenario is suitable for processing the text information obtained in S101 to obtain the semantic information of the words in the text information.
[0074] In the embodiment of the present application, the feature vector representing the semantic information of the words in the text information is obtained from the text information by using the preset BERT model and the preset convolutional neural network.
[0075] In the embodiment of the present application, the BERT model (Bidirectional Encoder Representations from Transformers model) is a self-encoding language model that can extract the relationship features of words in a sentence and can extract relationship features at multiple different levels, thereby more comprehensively reflecting the semantic of the sentence. In the extraction process, the meaning of the word can be obtained according to the context of the sentence, thereby avoiding ambiguity.
[0076] In the embodiment of the present application, the text information will be input into the preset BERT model in the form of tokens, wherein the token form refers to the original word vector of each word / word in the text; in actual use, the token form of the text information can be denoted as "text token sequence T", and the text token sequence T=(t1, t2,..., tN). The text token sequence T is input into the preset BERT model, and the text token sequence T is converted by the preset BERT model, and a word vector sequence W will be obtained, and the word vector sequence W=(w1, w2,..., wN).
[0077] In the embodiment of the present application, for example, the text information is "Company address: 1268 Wanrong Road, Jing'an District, Shanghai", the above text information is converted into token form and input into the preset BERT model, that is, "public" is converted into t1 in the text token sequence T, "manager" is converted into t2 in the text token sequence T, and so on, and is input into the preset BERT model to obtain the corresponding word vector sequence.
[0078] In the embodiment of the present application, after the text information is converted into the word vector sequence by the preset BERT model, it is necessary to fill the word vector sequence W into the preset two-dimensional grid according to the text position information in the text information; wherein the value of each position (grid) in the two-dimensional grid corresponds to a word vector in the text token sequence T, and in actual use, if there is a vacancy in the preset two-dimensional grid, the value of the vacancy is filled with <pad>vector filling. Finally, the above two-dimensional grid is captured by a preset convolutional neural network to obtain a feature vector.
[0079] It can be understood that the named entity recognition method for segment classification based on text information can reduce the influence of entity trigger word errors in the named entity recognition process, thereby improving the effect of entity extraction.
[0080] Figure 4 is a flow of a business card information extraction system training method provided by the embodiment of the application Figure 2 As shown in Figure 2 S102 can also include S1021-S1023, as follows:
[0081] S1021, based on the preset BERT model, the text content information is converted to obtain a word vector sequence; wherein the text information includes text content information and text position information.
[0082] In some embodiments of the application, the scene of processing the text content information in the text information is applicable.
[0083] In some embodiments of the application, the text content information in the text information is input to the preset BERT model according to the format required by the preset BERT model, so as to obtain the word vector sequence.
[0084] In some embodiments of the application, the text information includes text content information and text position information, wherein the text content information refers to the text on the business card image, and the text position information refers to the coordinates of the text on the business card image, which can be determined according to a preset coordinate system.
[0085] It can be understood that in the embodiment of the application, the word vector sequence is obtained by the preset BERT model, which can improve the accuracy of the obtained word vector sequence.
[0086] S1022, according to the text line position information, the word vector sequence is filled into a preset two-dimensional grid to obtain a target two-dimensional grid.
[0087] In some embodiments of the application, the target two-dimensional network is obtained, which provides data support for subsequent further processing by a preset convolutional neural network.
[0088] In some embodiments of the application, according to the text line position information in the text information obtained in S101, as Figure 5 The Word Embedding layer of the NER model fills each word vector in the word vector sequence into a preset two-dimensional grid to obtain a target two-dimensional grid.
[0089] It can be understood that the local features are captured, and the layout information of the text on the business card image is modeled.
[0090] S1023, obtaining a feature vector according to the target two-dimensional grid and a preset convolutional neural network.
[0091] In some embodiments of the present application, after obtaining the target two-dimensional grid, the data is processed to obtain the feature vector.
[0092] In some embodiments of the present application, the target two-dimensional grid is input into the preset convolutional neural network to obtain the feature vector.
[0093] In some embodiments of the present application, S1023 comprises: obtaining a feature vector according to the target two-dimensional grid and a three-dimensional convolution kernel in the preset convolutional neural network.
[0094] In an embodiment of the present application, in the three-dimensional convolution kernel, the first dimension represents the width of the convolution kernel, and the first dimension is the same as the length of the word vector; the second dimension represents the height of the convolution kernel; and the third dimension represents the size of the convolution kernel, and the size of the third dimension is the same as the length of the word vector.
[0095] In some embodiments of the present application, in S1023, the feature in the target two-dimensional grid is extracted according to the three-dimensional convolution kernel in the preset convolutional neural network to obtain the feature vector.
[0096] In some embodiments of the present application, the three-dimensional convolution kernel in the preset convolutional neural network is used to extract the feature in the target two-dimensional grid, wherein each word vector corresponds to at least one feature, and each feature corresponds to multiple word vectors.
[0097] It can be understood that the three-dimensional convolution kernel is used to extract the feature, which improves the accuracy of the extracted feature.
[0098] S103, combining and encoding the feature vector based on a preset recurrent neural network to obtain corresponding text segment feature information; wherein the text segment feature information represents different combinations of text content.
[0099] In an embodiment of the present application, the scenario is suitable for combining and encoding the feature vector to obtain the text segment feature information.
[0100] In the embodiment of the present application, after the feature vector is obtained through S102, the feature vector is input into the preset recurrent neural network, and the combination encoding of the feature vector is performed through the preset recurrent neural network, so as to obtain the text segment feature information, which represents the different combinations of the text content formed after the combination encoding of the feature vector.
[0101] In the embodiment of the present application, the preset recurrent neural network is an LSTM model, and the combination encoding of the feature vector through the preset recurrent neural network represents the different forms of combination of the elements in the text token sequence corresponding to the text information through the preset recurrent neural network, such as forward cyclic representation or reverse cyclic representation. Thus, the semantics of the sentence formed after the different combinations of the elements in the above text token sequence are obtained. As described in S102, the text token sequence represents the text information, and each element in the text token sequence represents a word in the text information.
[0102] In the embodiment of the present application, during the processing of the text information, some information may not be easily recognized or captured, which will result in that the above text segment feature information will contain some implicit text segment feature information. At this time, the above implicit text segment feature information can be converted into readable text information (text segment feature information) through the Hidden layer as shown in S103, so as to ensure the integrity of the text segment feature information. Figure 3
[0103] It can be understood that the preset recurrent neural network can improve the accuracy of recognizing the semantics of the text content corresponding to the text segment feature information.
[0104] S104, the text segment feature information is discriminated by using a classifier, so as to obtain a predicted classification label corresponding to the text segment feature information; wherein the predicted classification label represents the text type of the text segment feature information, and the predicted classification label is the basis for obtaining the structured information.
[0105] In the embodiment of the present application, the method is suitable for the scene of obtaining structured information.
[0106] In the embodiment of the present application, the text segment feature information is discriminated by using a classifier, and the predicted classification label corresponding to each text segment feature information is obtained. In actual use, the predicted classification label can be screened according to the preset classification label, and the text segment feature information corresponding to the predicted classification label which is the same as the preset classification label is the target text segment feature information. The structured information can be obtained according to the target text segment feature information and the corresponding predicted classification label, and the structured information is the extraction result of the information in the business card image input in S101.
[0107] In the embodiment of the present application, the classifier is used to select the predicted classification label same as the preset classification label from the predicted classification labels according to the predicted classification label of the text segment feature information. For example, if the preset classification label is "address", the classifier selects the text segment feature information with the predicted classification label of "address" as the target text segment feature information from the predicted classification labels; if the text content represented by the target text segment feature information is "XX City XX District XX Road XXXX", the structured information is "address: XX City XX District XX Road XXXX".
[0108] It can be understood that, in the embodiment of the present application, the classifier is used to obtain the predicted classification label corresponding to the text segment feature information by discriminating the text segment feature information, and the target text segment feature information is obtained by screening the predicted classification label, so as to replace the way of extracting structured information by recognizing "trigger words" in the prior art, so as to remove the error caused by recognizing "trigger words" in the extraction process of structured information, thereby reducing the error of the extracted structured information.
[0109] In S105, a loss value is obtained based on a preset target function, the predicted classification label corresponding to the text segment feature information and the preset classification label, and a target parameter is determined according to the loss value. The target parameter is a variable in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network and the classifier, and the target parameter represents a system for extracting business card information.
[0110] In the embodiment of the present application, the scenario for judging the accuracy of the predicted classification label of the recognized text segment feature information is suitable.
[0111] In the embodiment of the present application, the preset classification label and the predicted classification label of the text segment feature information are calculated by the preset target function, a loss value between the preset classification label and the predicted classification label is obtained, and a target parameter is determined according to the loss value. The loss value represents the error between the preset classification label and the predicted classification label of the text segment feature information.
[0112] In the embodiment of the present application, the preset classification label of the text segment feature information is the actual classification label corresponding to the text segment feature information printed on the business card image. In actual use, the loss value of the preset classification label and the predicted classification label of the text segment feature information can improve the accuracy of the structured information extracted by the business card information extraction system. When the loss value remains unchanged, it can be determined that the accuracy of the structured information extracted by the business card information extraction system reaches the maximum value, the business card information extraction system is trained, and the current value of the variable in the business card information extraction system is the target parameter.
[0113] In the embodiment of the present application, if the text token sequence includes n tokens, the text information corresponding to the text token sequence will include n(n+1) text segment feature information, each of which represents a text segment. However, there is text segment feature information that is meaningless for the predicted classification label, i.e., negative samples, in the n(n+1) text segment feature information. For example, if the text information obtained in S101 is "Company address: Shanghai Jing'an District Wanrong Road 1268", the text information is converted into token form. Each word in the text information corresponds to an element in the text token sequence, for example, "public" corresponds to t1 in the text token sequence T, "manager" corresponds to t2 in the text token sequence T, and so on. Table 1 is n(n+1) text segments obtained based on the text information, as shown in Table 1:
[0114]
[0115] Table 1
[0116] As shown in Table 1, each column in Table 1 corresponds to a text segment, and only one text segment in Table 1 is meaningful: "XX City XX District XX Road 1 XX 8", and its default classification label type is "address", while the other text segments have no actual meaningful label, i.e., negative samples.
[0117] In the embodiment of the present application, the preset target function includes a first preset function and a second preset function. The first preset function can be SoftMax Loss, as shown in formula 1-1:
[0118]
[0119] wherein, i is the text segment feature information index obtained in S103, m is the total number of text segment feature information in the text segment feature information index, x i is the feature information (feature vector) of the i-th text segment in the text segment feature information obtained in S103, y i is the preset classification label corresponding to the i-th text segment feature information, j is the preset classification label index, c+1 is the total number of preset classification labels in the preset classification label index, 1 represents the meaningless preset classification label in the preset classification label index, W is the preset weight parameter in the classifier, and γ is the first preset weight, wherein 0≤γ≤1, T is used for transposition, and T is irrelevant to the text token sequence in S102.
[0120] In the embodiment of the present application, the first preset weight is used to reduce the contribution of negative samples to the objective function. When γ = 0, it is equivalent to that the negative samples do not participate in training at all.
[0121] In the embodiment of the present application, the second preset function can be Center Loss, and the Center Loss is as shown in formula 1-2 as follows:
[0122]
[0123] Wherein, λ is the second preset weight, i is the text segment feature information index obtained by S103, m is the total number of text segment feature information in the text segment feature information index, x i is the feature information (feature vector) of the i th text segment in the text segment feature information obtained by S103, y i is the preset classification label corresponding to the i th text segment feature information, j is the preset classification label index, c + 1 is the total number of preset classification labels in the preset classification label index, 1 represents a meaningless preset classification label in the preset classification label index, W is a preset weight parameter in the classifier, and γ is the first preset weight, wherein 0 ≤ γ ≤ 1.
[0124] In the embodiment of the present application, the preset function is L, and the preset function L is as shown in formula 1-3 as follows:
[0125]
[0126] Wherein, L S is the first preset function, and L C is the second preset function.
[0127] It can be understood that, in the embodiment of the present application, the method based on metric learning is introduced, and on the basis of SoftMax Loss, the Center Loss in the field of face recognition is added, that is, the distance constraint of the sample in the feature space and the class center is added, the classifier is supervised to learn, so that the classes are more aggregated and the classes are more separated, thereby improving the generalization ability of the algorithm and improving the effect of the business card information extraction. Among them, Softmax Loss is used to constrain the entity text (text content) that can distinguish different types, that is, to make the text segment feature information have discriminability. Center Loss is used to constrain the text segment feature information to be more aggregated in the class, thereby improving the model generalization ability.
[0128] Figure 5 is a flowchart of a business card information extraction system training method provided by the embodiment of the present application Figure 6 As shown in Figure 6 S105 can also include S1051-S1053 as follows:
[0129] S1051, obtaining a first sub-loss value according to the first sub-objective function and the first preset weight, and the preset classification label and the predicted classification label.
[0130] In some embodiments of the present application, the scenario suitable for obtaining the first sub-loss value.
[0131] In some embodiments of the present application, the first sub-loss value of the preset classification label and the predicted classification label of the text segment feature information is calculated by formula 1-1, and the first sub-loss value represents the discriminability of the text segment feature information.
[0132] It can be understood that the error between the preset classification label and the predicted classification label corresponding to the text segment feature information can be judged by the first loss value.
[0133] S1052, obtaining a second sub-loss value according to a second sub-objective function, a second preset weight, and the first preset weight, the preset classification label and the predicted classification label; wherein the first sub-objective function and the second sub-objective function are both preset objective functions.
[0134] In some embodiments of the present application, the scenario suitable for obtaining the second sub-loss value.
[0135] In some embodiments of the present application, the second sub-loss value of the preset classification label and the predicted classification label of the text segment feature information is calculated by formula 1-2, and the second sub-loss value represents the aggregation degree of the intra-class in the text segment feature information.
[0136] In some embodiments of the present application, the second preset weight is used to control the proportion of the second sub-loss value in the loss value, and the first preset weight is used to control the influence of the negative sample in the second sub-objective function.
[0137] It can be understood that the distance between the text segment feature information and the class center can be judged by the second loss value.
[0138] S1053, obtaining a loss value based on the first sub-loss value and the second sub-loss value, and determining a target parameter according to the loss value.
[0139] In the embodiments of the present application, the scenario suitable for ending the training according to the loss value.
[0140] In the embodiments of the present application, the loss value is obtained based on the first sub-loss value and the second sub-loss value, and the variable in the business card information extraction system, i.e. the target parameter, is determined according to the loss value.
[0141] When the loss value remains in a state of no longer decreasing, it indicates that the business card information extraction system is completed training, and the current business card information extraction system can guarantee the accuracy of the extracted structured information, that is, improve the extraction effect.
[0142] It can be understood that, in the preset target function, the weight parameter is added, and the Center Loss is introduced in the calculation of the loss value, which not only reduces the influence of the positive and negative sample imbalance on the loss value, but also improves the recognition effect.
[0143] In some embodiments of the present application, the target parameter is determined according to the loss value, that is, when the loss value remains in a state of no longer decreasing, the variables in the current preset BERT model, the preset convolutional neural network, the preset recurrent neural network and the classifier are determined as the target parameters.
[0144] In some embodiments of the present application, the preset BERT model, the preset convolutional neural network, the preset recurrent neural network and the classifier will adjust the numerical value of the variable according to the loss value, and repeatedly process the text information obtained from the business card image to determine the numerical value of the variable when the loss value is the smallest as the target parameter.
[0145] It can be understood that, through the business card information extraction system training method provided by the embodiments of the present application, the recognition effect of the trained business card information extraction system will be improved.
[0146] In some embodiments of the present application, before S101, the business card information extraction system training method provided by the embodiments of the present application further comprises:
[0147] S106, collect text sample information.
[0148] In some embodiments of the present application, it is suitable for sample collection scenarios before extracting business card information.
[0149] In some embodiments of the present application, data is crawled on each platform to collect text sample information.
[0150] In some embodiments of the present application, data collection is performed for each target field of the business card. The data source can be a platform, and the data can include public information such as name, company, address, email, website, mobile phone, telephone, fax, etc. For individual target fields, naming conventions can be summarized, and based on the preset rules, the data collected is constructed. For example, some email field data can be constructed through the "name pinyin + email domain name" rule. For English fields, including English name, position, company, address, translation function can be used for translation.
[0151] It can be understood that this can ensure the quantity of text sample information, and provide data support for training.
[0152] S107, obtaining the simulated business card image according to the text sample information, and the preset generative adversarial network and the preset layout rule.
[0153] In some embodiments of the present application, a scene suitable for constructing a simulated business card image.
[0154] In some embodiments of the present application, the text sample information obtained according to S106 is obtained by the preset generative adversarial network according to the preset layout rule to obtain the simulated business card image.
[0155] In some embodiments of the present application, the preset layout rule is obtained by replacing the text content and changing the order of the text position in the layout based on the existing business card.
[0156] In some embodiments of the present application, the preset generative adversarial network includes a generator and a discriminator. The generator is used to generate a simulated business card image, and the discriminator is used to identify the simulated business card image generated by the generator. Wherein, the generator is an encoder-decoder structure; and the discriminator is composed of an image discriminator and a text matcher, the image discriminator is used to judge the authenticity of the visual features such as the style and background of the simulated business card image output by the generator. The text matcher is used to determine the similarity between the text on the simulated business card image and the text input into the generator. In actual use, a piece of text sample information collected in S106 is input into the discriminator to obtain a text feature vector sample corresponding to the above text sample information; the real business card image and the text feature vector sample are input into the generator, and after the real business card image is encoded in the hidden layer, the text feature vector sample and the random noise are fused, and the simulated business card image is obtained. It can be understood that in actual use, through the cooperation of the generator and the discriminator, the simulation degree of the simulated business card image generated by the generator can be ensured, and through the preset generative adversarial network, the real business card image and the text sample information, the simulated business card image is generated, which is used for training the business card information extraction system, and the purpose of expanding the data set is achieved, and the diversity of data is increased.
[0157] Figure 7 is a flowchart of a business card information extraction method provided by an embodiment of the present application, as shown in Figure 7 The business card information extraction system provided by the embodiment of the present application is obtained by training the business card information extraction system training method provided by the embodiment of the present application, and includes:
[0158] S201, inputting a business card image into an OCR character recognition module (OCR module).
[0159] In some embodiments of the present application, the business card image needs to be preprocessed before input. Figure 6 is a schematic diagram of a business card image provided by an embodiment of the present application, as shown in S201, a business card image is input to an OCR text recognition module. Figure 2
[0160] It can be understood that this can ensure the accuracy of the information extracted subsequently.
[0161] S202, the OCR text recognition module extracts the text in the input business card image to output text information in a text format.
[0162] In some embodiments of the present application, based on Figure 2 , the OCR text recognition module recognizes the above business card image, and the obtained text information will be as follows:
[0163] Word: - AX cloud | 9X8 pos: 284, 46, 440, 84
[0164] Word: O XXXXX cloud service provider pos: 290, 80, 435, 103
[0165] Word: Luo Moumou pos: 29, 137, 162, 170
[0166] Word: 131XXXX 1111 pos: 360, 174, 440, 192
[0167] Word: XXX@XXXXXXX-inc.com pos: 295, 186, 441, 209
[0168] Word: XX Group - XXXXX Business Group pos: 27, 178, 176, 202
[0169] Word: China, XX City, XX District, XX Road, No. 1 XX pos: 276, 201, 442, 226
[0170] Word: XXXXX (Suzhou) Co., Ltd. pos: 27, 195, 176, 221
[0171] Word: XXXX Center X Building X Floor pos: 339, 222, 443, 244
[0172] Word: XXXXX Expert pos: 25, 212, 119, 233
[0173] Word: www.xxxxxx.com pos: 356, 242, 444, 260
[0174] It can be understood that the OCR text recognition module can not only recognize the text content, but also obtain the text position information corresponding to the text content.
[0175] In S203, the NER named entity recognition module (NER module) performs entity recognition on the text information output by the OCR text recognition module, obtains corresponding text segment feature information and corresponding predicted classification labels, and obtains target text segment feature information and a predicted classification label corresponding to the target text segment feature information by screening the predicted classification labels.
[0176] In some embodiments of the present application, as shown in Mr. Luo When the NER named entity recognition module performs entity recognition on the text information output by the OCR text recognition module, it needs to first process the text information according to S102, for example, as shown in XX Group - XXXXX Business Group The grid in the figure is a two-dimensional grid, and the information filled in the two-dimensional grid is the word vector obtained by processing the text according to S202. When the three-dimensional convolution kernel performs weighted average on the word vector in each grid in the two-dimensional grid, that is, after local feature capture is performed on the above two-dimensional grid, a feature vector will be obtained. x1, x2, x3, x4, and x5 in the Bidirectional layer are feature vectors input into the Bidirectional layer for encoding, for example, x1 represents the word vector of "A" in the two-dimensional grid. After the Bidirectional layer combines and encodes the above feature vectors, text segment feature information will be obtained. Then, after the Hidden layer converts the implicit text segment feature information in the above text segment feature information, all text segment feature information will be obtained, that is, Among them, And respectively correspond to x1 in the forward order and x1 in the reverse order. After inputting the above text segment feature information into the Span Representations layer for splicing, a sentence composed of text segment feature information will be obtained Finally, the Fully-connected Layer layer and the SpanClassifier layer are used to classify the text segment feature information, and a predicted classification label corresponding to the text segment feature information is obtained. For example, based on the text obtained in S202, the text segment feature information, and the predicted classification label corresponding to the text segment feature information can be as follows:
[0177] <name>XXXXX (Suzhou) Co., Ltd.< / name>
[0178] <department>XXXXXX Expert< / department>
[0179] <company>131XXXX 1111< / company>
[0180] <position>XXX@XXXXXXX-inc.com< / position>
[0181] -A-X Cloud|9X8
[0182] AoXXXXXX Cloud Service Provider
[0183] <mobile>www.xxxxxx.com< / mobile>
[0184] <mail>Mr. Luo< / mail>
[0185] <addr>China, XX City, XX District, XX Road, No. 1 XX
[0186] XXXX Center, X Building, X Floor< / addr>
[0187] <url>XX Group - XXXXX Business Group< / url>
[0188] Among them, "Luo Moumou" is a text fragment feature information, <name>< / name> "" is the predicted category label for "Luo Moumou", while "-AX Cloud|9X8" and "AoXXXXXX Cloud Service Provider" are negative samples.
[0189] In some embodiments of the present invention, predicted classification labels are filtered based on preset classification labels. The key fields for entity recognition, i.e., the preset classification labels, can be set as needed. For example, if the preset classification labels are: name, department, company, position, mobile phone, email, address, and website, then after filtering the above predicted classification labels, the target text fragment feature information and the corresponding predicted classification labels will be as follows:
[0190] <name>XXXXX (Suzhou) Co., Ltd.< / name>
[0191] <department>XXXXXX Expert< / department>
[0192] <company>131XXXX 1111< / company>
[0193] <position>XXX@XXXXXXX-inc.com< / position>
[0194] <mobile>www.xxxxxx.com< / mobile>
[0195] <mail>Figure 8< / mail>
[0196] <addr>China, XX City, XX District, XX Road, No. 1 XX
[0197] XXXX Center, X Building, X Floor< / addr>
[0198] <url>Figure 1< / url>
[0199] Understandably, the NER named entity recognition module can obtain feature information of the target text fragment.
[0200] S204. The output module performs subsequent processing on the feature information of the target text fragment and the predicted classification label corresponding to the feature information of the target text fragment, and outputs the final structured information.
[0201] In this embodiment of the invention, the output module is used to extract the target field from the feature information of the target text fragment and combine it with the predicted classification label corresponding to the feature information of the target text fragment to obtain the final target structured information. Subsequent processing includes removing whitespace characters, invalid characters, etc. For example, based on the target text fragment feature information obtained in S203 and the predicted classification label corresponding to the target text fragment feature information, the output structured information will be as follows:
[0202] Name: Luo Moumou
[0203] Department: XX Group - XXXXX Business Group
[0204] Company: XXXXX (Suzhou) Co., Ltd.
[0205] Position: XXXXXX Expert
[0206] Mobile phone: 131XXXX 1111
[0207] Email: XXX@XXXXXXX-inc.com
[0208] Address: Xth Floor, Block X, XX Center, No. 1XX, XX Road, XX District, XX City, China
[0209] Website: www.xxxxxx.com
[0210] Among them, "name" corresponds to "in S203" <name>< / name> "" represents the predicted classification label, i.e., the text category; "Luo Moumou" represents the feature information of the target text fragment, i.e., the text content.
[0211] Understandably, the output module will organize the feature information of the target text fragment and the predicted classification labels corresponding to the feature information of the target text fragment, and obtain structured information.
[0212] Figure 8 This is the architecture of a business card information extraction system training device provided in an embodiment of the present invention. Figure 9 ,like Figure 2 As shown, this embodiment of the invention provides a business card information extraction system training device 3, which is applicable to the business card information extraction system training method provided in this embodiment of the invention, and includes an obtaining unit 31 and a determining unit 32; wherein,
[0213] The obtaining unit 31 is configured to: recognize the business card image to obtain text information; obtain a feature vector based on a preset BERT model, a preset convolutional neural network, and the text information, wherein the feature vector represents semantic information of words in the text information; encode the feature vector based on a preset recurrent neural network to obtain corresponding text segment feature information, wherein the text segment feature information represents different combinations of text content; use a classifier to distinguish the text segment feature information to obtain a predicted classification label corresponding to the text segment feature information, wherein the predicted classification label represents a text type of the text segment feature information, and the predicted classification label is a basis for obtaining structured information; obtain a loss value based on a preset objective function and the predicted classification label and a preset classification label corresponding to the text segment feature information, and determine a target parameter according to the loss value.
[0214] The determining unit 32 is configured to determine the target parameter according to the loss value, wherein the target parameter is a variable in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier, and the target parameter represents a system for extracting business card information.
[0215] In some embodiments of the present application, the obtaining unit 31 is further configured to: obtain a first sub-loss value based on a first sub-objective function, a first preset weight, the actual classification label, and the predicted classification label; obtain a second sub-loss value based on a second sub-objective function, a second preset weight, the first preset weight, the preset classification label, and the predicted classification label, wherein the first sub-objective function and the second sub-objective function are both the preset objective function; and obtain the loss value based on the first sub-loss value and the second sub-loss value, and determine the target parameter according to the loss value.
[0216] In some embodiments of the present application, the determining unit 32 is further configured to determine, when the loss value remains in a state of not decreasing, the variable in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier as the target parameter.
[0217] In some embodiments of the present application, the obtaining unit 31 is further configured to: convert text content information based on the preset BERT model to obtain a word vector sequence, wherein the text information includes text content information and text position information; fill the word vector sequence into a preset two-dimensional grid according to the text line position information to obtain a target two-dimensional grid; and obtain the feature vector based on the target two-dimensional grid and the preset convolutional neural network.
[0218] In some embodiments of the present application, the obtaining unit 31 is further configured to obtain the feature vector according to the target two-dimensional grid and a three-dimensional convolution kernel in the preset convolutional neural network.
[0219] In some embodiments of the present application, the obtaining unit is further configured to extract features in the target two-dimensional grid according to the three-dimensional convolution kernel in the preset convolutional neural network, thereby obtaining the feature vector.
[0220] In some embodiments of the present application, the device further comprises a collecting unit 33 configured to collect text sample information when the card image is the simulated card image.
[0221] The obtaining unit 31 is further configured to obtain the card image according to the text sample information and a preset generative adversarial network and a preset layout rule.
[0222] Figure 9 is an architecture of a card information extraction system training device provided by an embodiment of the present application Figure 9 As shown in Figure 1 An embodiment of the present application provides a card information extraction system training device, and a card information extraction system training applied to the card information extraction system training device, the card information extraction system training device 4 comprising a processor 401, a memory 402 and a communication bus 404, the memory 402 being in communication with the processor 401 through the communication bus 404, the memory 402 storing one or more programs executable by the processor 401, when the one or more programs are executed, the processor 401 executes the card information extraction system training method according to an embodiment of the present application, specifically, the card information extraction system training device 4 further comprises a communication component 403 for data transmission, wherein the processor 401 is provided with at least one.
[0223] In an embodiment of the present application, each component in the card information extraction system training device 4 is coupled together through the bus 404
[0224] The card information extraction system training method applied to the card information extraction training device according to an embodiment.
[0225] Those skilled in the art should understand that the present application can be understood as a card information extraction system training device. It can be understood that the bus 404 is used to realize the connection and communication between the components. In addition to the data bus, the bus 404 also includes a power bus, a control bus and a state signal bus. However, for the sake of clarity, all kinds of buses are marked as the bus 404 in Figure 1 .
[0226] Embodiments of the application provide a storage medium having stored thereon executable instructions that, as a result of being executed by a processor 401, enable the processor 401 to operate in conjunction with the storage medium to implement a method, system and / or computer program product embodiments as described herein. Accordingly, aspects of the present application can be embodied in hardware and / or in software (including firmware, resident software, micro-code, etc.) that runs on a processor, which can collectively be referred to as "computer program products". Additionally, aspects of the present application can be implemented by
[0227] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0228] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0229] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. one or more flowcharts and / or blocks means for functionally implementing the steps listed in the flowchart block or blocks.
[0230] The foregoing is merely illustrative of the principles of this application and various modifications can be made by those skilled in the art without departing from the scope of the application.< / pad>
Claims
1. A training method for a business card information extraction system, characterized in that, include: The business card image is recognized to obtain text information; wherein the business card image is at least one of the following: a real business card image or a simulated business card image; Based on the preset BERT model, the preset convolutional neural network, and the text information, a feature vector is obtained; wherein, the feature vector represents the semantic information of the words in the text information; Based on a pre-defined recurrent neural network, the feature vectors are combined and encoded to obtain corresponding text fragment feature information; wherein, the text fragment feature information represents different combinations of text content; A classifier is used to identify the feature information of the text fragment, thereby obtaining the predicted classification label corresponding to the feature information of the text fragment; wherein, the predicted classification label represents the text type of the feature information of the text fragment, and the predicted classification label is the basis for obtaining structured information; Based on the preset objective function, and the predicted classification label and preset classification label corresponding to the feature information of the text fragment, a loss value is obtained, and a target parameter is determined based on the loss value; wherein, the target parameter is a variable in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier, and the target parameter represents the system used to extract business card information; The step of determining the target parameter based on the loss value includes: When the loss value remains unchanged, the variables in the current preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier are determined as the target parameters.
2. The method according to claim 1, characterized in that, The process of obtaining a loss value based on a preset objective function, the predicted classification label corresponding to the text fragment feature information, and the preset classification label, and determining the target parameters based on the loss value, includes: The first sub-loss value is obtained based on the first sub-objective function and the first preset weight, as well as the preset classification label and the predicted classification label; The second sub-loss value is obtained based on the second sub-objective function, the second preset weight, the first preset weight, the preset classification label, and the predicted classification label; wherein, the first sub-objective function and the second sub-objective function are both the preset objective function; The loss value is obtained based on the first sub-loss value and the second sub-loss value, and the target parameter is determined based on the loss value.
3. The method according to claim 1, characterized in that, The feature vector obtained based on the preset BERT model, the preset convolutional neural network, and the text information includes: Based on the preset BERT model, the text content information is transformed to obtain a word vector sequence; wherein, the text information includes text content information and text position information; Based on the text line position information, the word vector sequence is filled into a preset two-dimensional grid to obtain the target two-dimensional grid; The feature vector is obtained based on the target two-dimensional grid and the preset convolutional neural network.
4. The method according to claim 3, characterized in that, The step of obtaining the feature vector based on the target two-dimensional grid and the preset convolutional neural network includes: The feature vector is obtained based on the target two-dimensional grid and the three-dimensional convolution kernel in the preset convolutional neural network.
5. The method according to claim 4, characterized in that, The step of obtaining the feature vector based on the target two-dimensional grid and the three-dimensional convolutional kernel in the preset convolutional neural network includes: Based on the three-dimensional convolution kernel in the preset convolutional neural network, features are extracted from the target two-dimensional grid to obtain the feature vector.
6. The method according to claim 1, characterized in that, When the business card image is the simulated business card image, before recognizing the business card image to obtain text information, the method further includes: Collect text sample information; Based on the text sample information, as well as the preset generative adversarial network and preset layout rules, the simulated business card image is obtained.
7. A training device for a business card information extraction system, characterized in that, This includes obtaining units and determining units; among which, The obtaining unit is used to recognize the business card image to obtain text information; based on a preset BERT model, a preset convolutional neural network, and the text information, a feature vector is obtained; wherein the feature vector represents the semantic information of words in the text information; based on a preset recurrent neural network, the feature vector is encoded to obtain corresponding text fragment feature information; wherein the text fragment feature information represents different combinations of text content; a classifier is used to discriminate the text fragment feature information to obtain the predicted classification label corresponding to the text fragment feature information; wherein the predicted classification label represents the text type of the text fragment feature information, and the predicted classification label is the basis for obtaining structured information; based on a preset objective function, and the predicted classification label and preset classification label corresponding to the text fragment feature information, a loss value is obtained, and the target parameters are determined based on the loss value; The determining unit is used to determine target parameters based on the loss value; wherein, the target parameters are variables in the preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier, and the target parameters represent the system used to extract business card information; The determining unit is further configured to determine the variables in the current preset BERT model, the preset convolutional neural network, the preset recurrent neural network, and the classifier as the target parameters when the loss value remains unchanged.
8. A training device for a business card information extraction system, characterized in that, include: Memory, used to store executable data instructions; The processor, when executing executable instructions stored in the memory, implements the training method for the business card information extraction system according to any one of claims 1 to 6.
9. A storage medium, characterized in that, It stores executable instructions for inducing the processor to execute the training method of the business card information extraction system according to any one of claims 1 to 6.
Citation Information
Patent Citations
Fast document scanning and qualitative method based on recurrent attention mechanism
CN108170736A
Knowledge extraction method and system based on memory neural network and device
CN108304911A