Financial entity extraction method, device, equipment and computer-readable storage medium

By using voting strategies in the financial entity extraction method to process the extraction results, the problem of difficulty in identifying and extracting complex financial entities in the existing technology is solved, and the accuracy of extraction is improved.

CN114398871BActive Publication Date: 2025-05-06CHINA MERCHANTS BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210169754.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2025-05-06
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

The prior art is difficult to identify and extract nested and complex financial entities, resulting in a low accuracy of extraction of financial entities.

Method used

A financial entity extraction method is proposed. The financial entity text information collection is obtained through detection and extraction instructions, and input it into the extraction model collection to obtain the extraction result collection. Vot the draw results according to the preset voting strategy and determine the target draw results.

Benefits of technology

It improves the accuracy of financial entities extraction and can effectively identify and extract complex financial entities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398871B_ABST
    Figure CN114398871B_ABST
Patent Text Reader

Abstract

The present invention discloses a financial entity extraction method, device, equipment and computer-readable storage medium. The method comprises: upon detecting an extraction instruction, obtaining a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into an extraction model set to obtain an extraction result set; voting on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determining a target extraction result according to the voting result. The present invention improves the accuracy of financial entity extraction by inputting a financial entity text information set into an extraction model set to obtain an extraction result set, and voting on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determining a target extraction result according to the voting result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology, and in particular to financial entity extraction methods, devices, equipment and computer-readable storage media. Background Art

[0002] Currently, in the field of finance, the most commonly used financial entity extraction method is a sequence labeling method based on deep learning and conditional random fields (CRF). This method first processes the text information in the financial field into basic word vector features as the input of the post-network, uses a deep neural network to construct an intermediate feature representation layer, extracts the hidden state information of the text information, and uses the CRF discriminant algorithm of machine learning to perform sequence labeling on each word in the text, thereby identifying the corresponding different types of financial entities. However, the existing technology can only identify and extract simple financial entities, but cannot identify and extract nested and complex financial entities, resulting in a low accuracy rate of financial entity extraction. Therefore, how to improve the accuracy of financial entity extraction is an urgent problem to be solved. Summary of the invention

[0003] The main purpose of the present invention is to propose a financial entity extraction method, device, equipment and computer-readable storage medium, aiming to solve the problem of how to improve the accuracy of financial entity extraction.

[0004] To achieve the above object, the present invention provides a financial entity extraction method, which comprises the following steps:

[0005] Upon detecting an extraction instruction, obtaining a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into an extraction model set to obtain an extraction result set;

[0006] According to a preset voting strategy, each extraction result in the extraction result set is voted to obtain a voting result, and a target extraction result is determined according to the voting result.

[0007] Preferably, the step of determining the target extraction result according to the voting result includes:

[0008] Obtaining a weight value corresponding to each extraction result in the extraction result set, and determining a voting value corresponding to each extraction result according to the weight value and the voting result;

[0009] The voting values ​​corresponding to each extraction result are compared, and the extraction result with the largest voting value is determined as the target extraction result.

[0010] Preferably, before the steps of detecting an extraction instruction, acquiring a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into an extraction model set to obtain an extraction result set, the financial entity extraction method includes:

[0011] Constructing a training text set, performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pretraining model set to obtain a text feature vector set;

[0012] The text feature vector set is subjected to a second preprocessing to obtain a text feature association matrix, and a loss function is constructed according to the text feature association matrix. Model training is performed based on the loss function to obtain an extraction model set.

[0013] Preferably, the step of performing a first preprocessing on the training text set and inputting the first preprocessed training text set into a pretraining model to obtain a text feature vector set includes:

[0014] Performing vocabulary recognition and vocabulary numbering on each training text in the training text set to obtain a vocabulary set corresponding to each training text;

[0015] A training text set including the vocabulary set is input into a pre-trained model set to obtain a text feature vector set.

[0016] Preferably, the step of performing a second preprocessing on the text feature vector set to obtain a text feature association matrix comprises:

[0017] Mapping the text feature vectors corresponding to each training text in the text feature vector set to generate an intermediate feature vector set corresponding to each training sample;

[0018] An attention matrix is ​​constructed based on a dual affine network, and a text feature association matrix is ​​obtained according to the attention matrix and the set of intermediate feature vectors.

[0019] Preferably, the step of performing model training based on the loss function to obtain an extraction model set includes:

[0020] Performing model training based on the loss function to obtain a pre-extracted model set, obtaining a verification text set, inputting the verification text set into the pre-extracted model set, and obtaining a verification result;

[0021] According to the verification result, an extraction model set is determined.

[0022] Preferably, after the steps of voting on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determining a target extraction result according to the voting result, the financial entity extraction method includes:

[0023] Acquire financial entity text information corresponding to the extraction results that meet the first preset condition in the extraction result set, and update the training text set according to the financial entity text information;

[0024] The extraction model set is trained according to the updated training text set to obtain an updated extraction model set, and based on the updated extraction model set, the following steps are executed: when an extraction instruction is detected, a financial entity text information set corresponding to the extraction instruction is obtained, and the financial entity text information set is input into the extraction model set to obtain an extraction result set.

[0025] Preferably, after the step of constructing a loss function according to the text feature association matrix and performing model training based on the loss function to obtain an extraction model set, the financial entity extraction method includes:

[0026] Acquire training texts that meet a second preset condition in the training text set, and update the training text set according to the training texts;

[0027] Based on the updated training text set, the steps are performed: performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pre-training model set to obtain a text feature vector set.

[0028] In addition, to achieve the above-mentioned purpose, the present invention further provides a financial entity extraction device, the financial entity extraction device comprising:

[0029] An acquisition module, configured to acquire a financial entity text information set corresponding to the extraction instruction upon detecting the extraction instruction, and input the financial entity text information set into an extraction model set to obtain an extraction result set;

[0030] The determination module is used to vote on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determine the target extraction result according to the voting result.

[0031] Preferably, the determining module is further used for:

[0032] Obtaining a weight value corresponding to each extraction result in the extraction result set, and determining a voting value corresponding to each extraction result according to the weight value and the voting result;

[0033] The voting values ​​corresponding to each extraction result are compared, and the extraction result with the largest voting value is determined as the target extraction result.

[0034] Preferably, the acquisition module further includes a training module, and the training module is used to:

[0035] Constructing a training text set, performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pretraining model set to obtain a text feature vector set;

[0036] The text feature vector set is subjected to a second preprocessing to obtain a text feature association matrix, and a loss function is constructed according to the text feature association matrix. Model training is performed based on the loss function to obtain an extraction model set.

[0037] Preferably, the training module is also used for:

[0038] Performing vocabulary recognition and vocabulary numbering on each training text in the training text set to obtain a vocabulary set corresponding to each training text;

[0039] A training text set including the vocabulary set is input into a pre-trained model set to obtain a text feature vector set.

[0040] Preferably, the training module is also used for:

[0041] Mapping the text feature vectors corresponding to each training text in the text feature vector set to generate an intermediate feature vector set corresponding to each training sample;

[0042] An attention matrix is ​​constructed based on a dual affine network, and a text feature association matrix is ​​obtained according to the attention matrix and the set of intermediate feature vectors.

[0043] Preferably, the training module is also used for:

[0044] Performing model training based on the loss function to obtain a pre-extracted model set, obtaining a verification text set, inputting the verification text set into the pre-extracted model set, and obtaining a verification result;

[0045] According to the verification result, an extraction model set is determined.

[0046] Preferably, the determining module further includes a first updating module, and the first updating module is used for:

[0047] Acquire financial entity text information corresponding to the extraction results that meet the first preset condition in the extraction result set, and update the training text set according to the financial entity text information;

[0048] The extraction model set is trained according to the updated training text set to obtain an updated extraction model set, and based on the updated extraction model set, the following steps are executed: when an extraction instruction is detected, a financial entity text information set corresponding to the extraction instruction is obtained, and the financial entity text information set is input into the extraction model set to obtain an extraction result set.

[0049] Preferably, the training module further comprises a second updating module, wherein the second updating module is used for:

[0050] Acquire training texts that meet a second preset condition in the training text set, and update the training text set according to the training texts;

[0051] Based on the updated training text set, the steps are performed: performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pre-training model set to obtain a text feature vector set.

[0052] In addition, to achieve the above-mentioned purpose, the present invention also provides a financial entity extraction device, which includes: a memory, a processor, and a financial entity extraction program stored in the memory and executable on the processor, and the financial entity extraction program implements the steps of the financial entity extraction method described above when executed by the processor.

[0053] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a financial entity extraction program is stored, and when the financial entity extraction program is executed by a processor, the steps of the financial entity extraction method described above are implemented.

[0054] The financial entity extraction method proposed in the present invention, upon detecting an extraction instruction, obtains a financial entity text information set corresponding to the extraction instruction, and inputs the financial entity text information set into an extraction model set to obtain an extraction result set; according to a preset voting strategy, each extraction result in the extraction result set is voted to obtain a voting result, and a target extraction result is determined according to the voting result. The present invention improves the accuracy of financial entity extraction by inputting a financial entity text information set into an extraction model set to obtain an extraction result set, and according to a preset voting strategy, each extraction result in the extraction result set is voted to obtain a voting result, and a target extraction result is determined according to the voting result. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0056] Figure 2It is a flowchart of the first embodiment of the financial entity extraction method of the present invention;

[0057] The realization of the purpose, functional features and advantages of the present invention will be further explained with reference to the accompanying drawings in combination with the embodiments. DETAILED DESCRIPTION

[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0059] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0060] The device in the embodiment of the present invention may be a PC or a server device.

[0061] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0062] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0063] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a financial entity extraction program.

[0064] Among them, the operating system is a program that manages and controls the portable financial entity extraction device and software resources, and supports the operation of the network communication module, user interface module, financial entity extraction program and other programs or software; the network communication module is used to manage and control the network interface 1002; the user interface module is used to manage and control the user interface 1003.

[0065] exist Figure 1In the financial entity extraction device shown, the financial entity extraction device calls the financial entity extraction program stored in the memory 1005 through the processor 1001, and executes the operations in each embodiment of the following financial entity extraction method.

[0066] Based on the above hardware structure, an embodiment of the financial entity extraction method of the present invention is proposed.

[0067] Reference Figure 2 , Figure 2 This is a flow chart of a first embodiment of a method for extracting financial entities according to the present invention. The method comprises:

[0068] Step S10, when an extraction instruction is detected, obtaining a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into an extraction model set to obtain an extraction result set;

[0069] Step S20, voting on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determining a target extraction result according to the voting result.

[0070] The financial entity extraction method of this embodiment is applied to the financial entity extraction device of a financial institution. The financial entity extraction device can be a terminal or a PC device. For the convenience of description, the financial entity extraction device is used as an example for description; the financial entity extraction device detects the extraction instruction, obtains the financial entity text information set corresponding to the extraction instruction, and inputs the financial entity text information set into the extraction model set to obtain the extraction result set; the financial entity extraction device obtains the weight value corresponding to each extraction result in the extraction result set, and determines the voting value corresponding to each extraction result according to the weight value and the voting result; the voting value corresponding to each extraction result is compared, and the extraction result with the largest voting value is determined as the target extraction result. It should be noted that each extraction model in the extraction model set contains one or more pre-trained models, wherein the pre-trained models include but are not limited to: BERT, ELECTRA, ROBERTA, etc., and each extraction model is based on a dual affine network, and the dual affine network has a high recognition accuracy rate for multiple financial entities nested and financial entities in complex scenarios.

[0071] The financial entity extraction method of this embodiment, upon detecting an extraction instruction, obtains a financial entity text information set corresponding to the extraction instruction, and inputs the financial entity text information set into an extraction model set to obtain an extraction result set; according to a preset voting strategy, each extraction result in the extraction result set is voted to obtain a voting result, and a target extraction result is determined according to the voting result. The present invention improves the accuracy of financial entity extraction by inputting a financial entity text information set into an extraction model set to obtain an extraction result set, and according to a preset voting strategy, each extraction result in the extraction result set is voted to obtain a voting result, and a target extraction result is determined according to the voting result.

[0072] The following is a detailed description of each step:

[0073] Step S10, when an extraction instruction is detected, obtaining a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into an extraction model set to obtain an extraction result set;

[0074] In this embodiment, after detecting an extraction instruction, the financial entity extraction device obtains a set of financial entity text information corresponding to the extraction instruction, filters, screens, recognizes and numbers each financial entity text information in the financial entity text information set, and then inputs it into each extraction model of the extraction model set, and parses each financial entity text information through a pre-trained model included in the extraction model to obtain a text feature vector, and maps the text feature vector to obtain an intermediate feature vector of the first word and an intermediate feature vector of the last word of each financial entity text information, and constructs an independent attention matrix by using the characteristics of the dual affine network, and performs a product transformation with the intermediate feature vector of each financial entity text information to determine the association between the text features corresponding to each word in each financial entity text information, and finally merges the results of the association between the text features corresponding to each word in each financial entity text information as the output of the dual affine network to obtain an extraction result set; it can be understood that inputting the financial entity text information set into each extraction model will obtain an extraction result, and all extraction results constitute the extraction result set.

[0075] Step S20, voting on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determining a target extraction result according to the voting result.

[0076] In this embodiment, the financial entity extraction device votes on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determines the voting value corresponding to each extraction result based on the voting result, and selects the extraction result with the largest voting value as the final target extraction result.

[0077] Specifically, the step of determining the target extraction result according to the voting result includes:

[0078] Step a, obtaining a weight value corresponding to each extraction result in the extraction result set, and determining a voting value corresponding to each extraction result according to the weight value and the voting result;

[0079] In this step, the financial entity extraction device obtains the weight value corresponding to each extraction result in the extraction result set, and determines the voting value corresponding to each extraction result based on the weight value and the voting result. For example, for the extraction results obtained by each extraction model in the extraction model set, the financial entity extraction device uses a voting strategy based on machine learning bagging (pocket algorithm) to determine the voting value corresponding to each extraction result based on the weight value and voting result corresponding to the extraction result of each extraction model.

[0080] Step b: compare the voting values ​​corresponding to each extraction result, and determine the extraction result with the largest voting value as the target extraction result.

[0081] In this step, the financial entity extracts the weight value and voting result corresponding to each extraction result, determines the voting value corresponding to each extraction result, and compares the voting value corresponding to each extraction result to determine the extraction result with the largest voting value as the target extraction result.

[0082] Furthermore, after step S20, the following steps are included:

[0083] Step c, obtaining financial entity text information corresponding to the extraction results that meet the first preset condition in the extraction result set, and updating the training text set according to the financial entity text information;

[0084] In this step, the financial entity extraction device obtains the financial entity text information corresponding to the extraction results that meet the first preset condition in the extraction result set, and updates the training text set according to the financial entity text information; for example: assuming that the financial entity text information set contains 8 financial entity text information, the financial entity extraction device inputs the 8 financial entity text information into the extraction model set in sequence to obtain the extraction results corresponding to the 8 financial entity text information, and the number of extraction results corresponding to each financial entity text information is equal to the number of extraction models in the extraction model set, that is, for each financial entity text information, each extraction model will obtain an extraction result. If it is determined through an autonomous learning method that more than half of the extraction models obtain relatively vague extraction results based on a certain financial entity text information, it is determined that the financial entity text information corresponding to the extraction result is labeled, and then the labeled financial entity text information is added to the training text set to update the training text set.

[0085] Step d, performing model training on the extraction model set according to the updated training text set to obtain an updated extraction model set, and based on the updated extraction model set, executing the following steps: upon detecting an extraction instruction, obtaining a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into the extraction model set to obtain an extraction result set.

[0086] In this step, the financial entity extraction device retrains the extraction model set according to the updated training text set to obtain an updated extraction model set, which is conducive to continuously improving the effect and recognition accuracy of the extraction model set, and based on the updated extraction model set, executes when the extraction instruction is detected, obtains the financial entity text information set corresponding to the extraction instruction, and inputs the financial entity text information set into the extraction model set to obtain the extraction result set and subsequent steps.

[0087] The financial entity extraction device of this embodiment detects an extraction instruction, obtains a financial entity text information set corresponding to the extraction instruction, and inputs the financial entity text information set into an extraction model set to obtain an extraction result set; the financial entity extraction device obtains a weight value corresponding to each extraction result in the extraction result set, and determines the voting value corresponding to each extraction result based on the weight value and the voting result; the voting value corresponding to each extraction result is compared, and the extraction result with the largest voting value is determined as the target extraction result, thereby improving the accuracy of financial entity extraction.

[0088] Furthermore, based on the first embodiment of the financial entity extraction method of the present invention, a second embodiment of the financial entity extraction method of the present invention is proposed.

[0089] The second embodiment of the financial entity extraction method is different from the first embodiment of the financial entity extraction method in that, before step S10, it further includes:

[0090] Step e, constructing a training text set, performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pretraining model set to obtain a text feature vector set;

[0091] Step f, performing a second preprocessing on the text feature vector set to obtain a text feature association matrix, and constructing a loss function according to the text feature association matrix, and performing model training based on the loss function to obtain an extraction model set.

[0092] The financial entity extraction device of this embodiment obtains a large amount of financial entity text data, constructs a training text set, performs a first preprocessing on the training text set, and inputs the first preprocessed training text set into a pretrained model set to obtain a text feature vector set; the financial entity extraction device performs a second preprocessing on the text feature vector set based on the characteristics of the dual affine network to obtain a text feature association matrix, and constructs a loss function of the model using multi-label cross entropy and focalloss algorithm according to the text feature association matrix, and performs model training based on the loss function to obtain an extraction model set. Obtaining an extraction model set by performing model training based on a pretrained model set and a dual affine network helps to improve the accuracy of financial entity extraction.

[0093] The following is a detailed description of each step:

[0094] Step e, constructing a training text set, performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pretraining model set to obtain a text feature vector set;

[0095] In this step, the financial entity extraction device obtains a large amount of financial entity text data, removes interference and noise in the financial entity text data through filtering, screening and other operations, constructs a qualified training text set through data enhancement, performs a first preprocessing on the training text set, and inputs the first preprocessed training text set into a pretrained model set to obtain a text feature vector set; it can be understood that the pretrained model set includes but is not limited to: BERT, Electra, Roberta, etc. The financial entity extraction device can process the first preprocessed training text set according to the instructions of relevant R&D personnel or randomly select one or more pretrained models in the pretrained model set to obtain a text feature vector set.

[0096] Specifically, the steps of performing a first preprocessing on the training text set and inputting the first preprocessed training text set into a pre-training model to obtain a text feature vector set include:

[0097] Step e1, performing vocabulary recognition and vocabulary numbering on each training text in the training text set to obtain a vocabulary set corresponding to each training text;

[0098] In this step, the financial entity extraction device performs vocabulary recognition and vocabulary numbering on each training text in the training text set to obtain a vocabulary set corresponding to each training text; for example, the financial entity extraction device performs vocabulary recognition and vocabulary numbering on each training text in the training text set. It can be understood that each training text is a complete sentence, and each sentence is composed of multiple words. The financial entity extraction device recognizes the words contained in each training text, splits each training text into a set of multiple words, and numbers each word to obtain a vocabulary set corresponding to each training text.

[0099] Step e2: inputting the training text set including the vocabulary set into the pre-training model set to obtain a text feature vector set.

[0100] In this step, the financial entity extraction device inputs the training text set containing the vocabulary set into the pre-trained model set to obtain a text feature vector set; for example, the pre-trained model set includes but is not limited to BERT, Electra, Roberta, etc. The financial entity extraction device can select one or more pre-trained models in the pre-trained model set according to the instructions of relevant R&D personnel or randomly, and integrate them into the extraction model to be trained to obtain multiple different extraction models. The financial entity extraction device inputs the training text set containing the vocabulary set into different extraction models respectively, and processes the vocabulary set corresponding to each training text in the training text set through the pre-trained models in the different extraction models to obtain the text feature vector corresponding to each vocabulary in the vocabulary set corresponding to each training text, thereby forming a text feature vector set.

[0101] Step f, performing a second preprocessing on the text feature vector set to obtain a text feature association matrix, and constructing a loss function according to the text feature association matrix, and performing model training based on the loss function to obtain an extraction model set.

[0102] In this step, the financial entity extraction device performs a second preprocessing on the text feature vector corresponding to each word in the vocabulary set corresponding to each training text based on a dual affine network to obtain a text feature association matrix corresponding to each training text, merges the text feature association matrices corresponding to each training text to obtain a text feature association matrix corresponding to the training text set, and constructs a loss function of the model using multi-label cross entropy and focal loss algorithms based on the text feature association matrix corresponding to the training text set, and performs model training based on the loss function to obtain an extraction model set.

[0103] Specifically, the step of performing a second preprocessing on the text feature vector set to obtain a text feature association matrix includes:

[0104] Step f1, mapping the text feature vector corresponding to each training text in the text feature vector set to generate an intermediate feature vector set corresponding to each training sample;

[0105] In this step, the financial entity extraction device maps the text feature vector corresponding to each training text in the text feature vector set to generate an intermediate feature vector set corresponding to each training sample; for example, the financial entity extraction device maps the text feature vector corresponding to each training text in the text feature vector set, and each word in each training text corresponds to a text feature vector. The financial entity extraction device maps the text feature vector corresponding to each word in each training text to obtain the corresponding intermediate feature vector set for each training text. It can be understood that each training text is a complete sentence, and the intermediate feature vector refers to the feature vector corresponding to the first word and the last word in each training text.

[0106] Step f2, constructing an attention matrix based on a dual affine network, and obtaining a text feature association matrix according to the attention matrix and the set of intermediate feature vectors.

[0107] In this step, the financial entity extraction device constructs an attention matrix based on the dual affine network, and obtains a text feature association matrix based on the attention matrix and the set of intermediate feature vectors; for example, the financial entity extraction device utilizes the characteristics of the dual affine network to construct an independent attention matrix, which is generally a matrix of 3 rows and 3 columns, and performs a product transformation with the intermediate feature vector corresponding to each training text to determine the text feature association matrix between the text features corresponding to each word contained in each training text, and then merges the text feature association matrices between the text features corresponding to each word contained in each training text to obtain the text feature association matrix corresponding to the training text set.

[0108] Specifically, the steps of performing model training based on the loss function to obtain an extraction model set include:

[0109] Step f3, performing model training based on the loss function to obtain a pre-extraction model set, and obtaining a verification text set, inputting the verification text set into the pre-extraction model set to obtain a verification result;

[0110] In this step, the financial entity extraction device constructs the loss function of the model, performs model training based on the loss function, obtains a pre-extraction model set, obtains a verification text set, inputs the verification text set into the pre-extraction model set, and obtains a verification result. It should be noted that the pre-extraction model set includes multiple extraction models, and each extraction model contains one or more pre-trained models and a dual affine network.

[0111] Step f4, determining the extraction model set according to the verification result.

[0112] In this step, the financial entity extraction device obtains the verification result, and stores the extraction models in the pre-extraction model set whose extraction accuracy is greater than the preset value according to the verification result, and retains the overall structure and weight value of the stored extraction model, and retrains the extraction models in the pre-extraction model set whose extraction accuracy is less than the preset value according to the verification result, until the extraction accuracy of all extraction models in the pre-extraction model set is greater than the preset value, thereby obtaining the final extraction model set.

[0113] Further, step f includes:

[0114] Step g, obtaining training texts that meet a second preset condition in the training text set, and updating the training text set according to the training texts;

[0115] In this step, the financial entity extraction device obtains the training text that meets the second preset condition in the training text set, and updates the training text set based on the training text. It can be understood that, in the process of training the extraction model, the financial entity extraction device marks the training texts whose extraction results recognized by the extraction model in training are relatively vague through an autonomous learning method, and re-adds the marked training texts to the training sample set to update the training text set.

[0116] Step h, based on the updated training text set, execute the steps of: performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pre-training model set to obtain a text feature vector set.

[0117] In this step, the financial entity extraction device performs a first preprocessing on the training text set in a loop based on the updated training sample set, and inputs the training text set after the first preprocessing into the pre-training model set to obtain a text feature vector set and subsequent steps until the extraction model effect and recognition accuracy reach the expected level.

[0118] The financial entity extraction device of this embodiment constructs a training text set, performs a first preprocessing on the training text set, and inputs the first preprocessed training text set into a pretrained model set to obtain a text feature vector set; performs a second preprocessing on the text feature vector set to obtain a text feature association matrix, and constructs a loss function based on the text feature association matrix, and performs model training based on the loss function to obtain an extraction model set, which helps to improve the accuracy of financial entity extraction.

[0119] The present invention also provides a financial entity extraction device. The financial entity extraction device of the present invention comprises:

[0120] An acquisition module, configured to acquire a financial entity text information set corresponding to the extraction instruction upon detecting the extraction instruction, and input the financial entity text information set into an extraction model set to obtain an extraction result set;

[0121] The determination module is used to vote on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determine the target extraction result according to the voting result.

[0122] Preferably, the determining module is further used for:

[0123] Obtaining a weight value corresponding to each extraction result in the extraction result set, and determining a voting value corresponding to each extraction result according to the weight value and the voting result;

[0124] The voting values ​​corresponding to each extraction result are compared, and the extraction result with the largest voting value is determined as the target extraction result.

[0125] Preferably, the acquisition module further includes a training module, and the training module is used to:

[0126] Constructing a training text set, performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pretraining model set to obtain a text feature vector set;

[0127] The text feature vector set is subjected to a second preprocessing to obtain a text feature association matrix, and a loss function is constructed according to the text feature association matrix. Model training is performed based on the loss function to obtain an extraction model set.

[0128] Preferably, the training module is also used for:

[0129] Performing vocabulary recognition and vocabulary numbering on each training text in the training text set to obtain a vocabulary set corresponding to each training text;

[0130] A training text set including the vocabulary set is input into a pre-trained model set to obtain a text feature vector set.

[0131] Preferably, the training module is also used for:

[0132] Mapping the text feature vectors corresponding to each training text in the text feature vector set to generate an intermediate feature vector set corresponding to each training sample;

[0133] An attention matrix is ​​constructed based on a dual affine network, and a text feature association matrix is ​​obtained according to the attention matrix and the set of intermediate feature vectors.

[0134] Preferably, the training module is also used for:

[0135] Performing model training based on the loss function to obtain a pre-extracted model set, obtaining a verification text set, inputting the verification text set into the pre-extracted model set, and obtaining a verification result;

[0136] According to the verification result, an extraction model set is determined.

[0137] Preferably, the determining module further includes a first updating module, and the first updating module is used for:

[0138] Acquire financial entity text information corresponding to the extraction results that meet the first preset condition in the extraction result set, and update the training text set according to the financial entity text information;

[0139] The extraction model set is trained according to the updated training text set to obtain an updated extraction model set, and based on the updated extraction model set, the following steps are executed: when an extraction instruction is detected, a financial entity text information set corresponding to the extraction instruction is obtained, and the financial entity text information set is input into the extraction model set to obtain an extraction result set.

[0140] Preferably, the training module further comprises a second updating module, wherein the second updating module is used for:

[0141] Acquire training texts that meet a second preset condition in the training text set, and update the training text set according to the training texts;

[0142] Based on the updated training text set, the steps are performed: performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pre-training model set to obtain a text feature vector set.

[0143] The present invention also provides a financial entity extraction device.

[0144] The financial entity extraction device of the present invention comprises: a memory, a processor and a financial entity extraction program stored in the memory and executable on the processor. When the financial entity extraction program is executed by the processor, the steps of the financial entity extraction method described above are implemented.

[0145] The method implemented when the financial entity extraction program running on the processor is executed can refer to the various embodiments of the financial entity extraction method of the present invention, and will not be described in detail here.

[0146] The present invention also provides a computer-readable storage medium.

[0147] The computer-readable storage medium of the present invention stores a financial entity extraction program, and when the financial entity extraction program is executed by a processor, the steps of the financial entity extraction method described above are implemented.

[0148] The method implemented when the financial entity extraction program running on the processor is executed can refer to the various embodiments of the financial entity extraction method of the present invention, and will not be described in detail here.

[0149] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0150] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0152] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A financial entity extraction method, characterized in that: The financial entity extraction method comprises the following steps: Upon detecting an extraction instruction, obtaining a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into an extraction model set to obtain an extraction result set; According to a preset voting strategy, voting is performed on each extraction result in the extraction result set to obtain a voting result, and a target extraction result is determined according to the voting result; The extraction model set includes a pre-trained model set, and the step of inputting the financial entity text information set into the extraction model set to obtain an extraction result set includes: Inputting the financial entity text information set into a pre-trained model set to obtain a text feature vector set; Mapping the text feature vectors corresponding to each financial entity text in the text feature vector set to generate an intermediate feature vector set corresponding to each financial entity text; An attention matrix is ​​constructed based on a dual affine network, and an extraction result set is obtained according to the attention matrix and the set of intermediate feature vectors.

2. The financial entity extraction method according to claim 1, characterized in that: The step of determining the target extraction result according to the voting result comprises: Obtaining a weight value corresponding to each extraction result in the extraction result set, and determining a voting value corresponding to each extraction result according to the weight value and the voting result; The voting values ​​corresponding to each extraction result are compared, and the extraction result with the largest voting value is determined as the target extraction result.

3. The financial entity extraction method according to claim 1, characterized in that: Before the step of detecting an extraction instruction, acquiring a financial entity text information set corresponding to the extraction instruction, and inputting the financial entity text information set into an extraction model set to obtain an extraction result set, the financial entity extraction method includes: Constructing a training text set, performing a first preprocessing on the training text set, and inputting the training text set subjected to the first preprocessing into a pretraining model set to obtain a text feature vector set; The text feature vector set is subjected to a second preprocessing to obtain a text feature association matrix, and a loss function is constructed according to the text feature association matrix. Model training is performed based on the loss function to obtain an extraction model set.

4. The financial entity extraction method as claimed in claim 3, characterized in that: The step of performing a first preprocessing on the training text set and inputting the first preprocessed training text set into a pretraining model to obtain a text feature vector set includes: Performing vocabulary recognition and vocabulary numbering on each training text in the training text set to obtain a vocabulary set corresponding to each training text; A training text set including the vocabulary set is input into a pre-trained model set to obtain a text feature vector set.

5. The financial entity extraction method according to claim 3, characterized in that: The step of performing a second preprocessing on the text feature vector set to obtain a text feature association matrix comprises: Mapping the text feature vectors corresponding to each training text in the text feature vector set to generate an intermediate feature vector set corresponding to each training sample; An attention matrix is ​​constructed based on a dual affine network, and a text feature association matrix is ​​obtained according to the attention matrix and the set of intermediate feature vectors.

6. The financial entity extraction method according to claim 3, characterized in that: The step of performing model training based on the loss function to obtain an extraction model set includes: Performing model training based on the loss function to obtain a pre-extracted model set, obtaining a verification text set, inputting the verification text set into the pre-extracted model set, and obtaining a verification result; According to the verification result, an extraction model set is determined.

7. The financial entity extraction method according to claim 1, characterized in that: After the steps of voting on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determining a target extraction result according to the voting result, the financial entity extraction method includes: Acquire financial entity text information corresponding to the extraction results that meet the first preset condition in the extraction result set, and update the training text set according to the financial entity text information; The extraction model set is trained according to the updated training text set to obtain an updated extraction model set, and based on the updated extraction model set, the following steps are executed: when an extraction instruction is detected, a financial entity text information set corresponding to the extraction instruction is obtained, and the financial entity text information set is input into the extraction model set to obtain an extraction result set.

8. The financial entity extraction method according to claim 3, characterized in that: After the steps of constructing a loss function according to the text feature association matrix and performing model training based on the loss function to obtain an extraction model set, the financial entity extraction method includes: Acquire training texts that meet a second preset condition in the training text set, and update the training text set according to the training texts; Based on the updated training text set, the steps are performed: performing a first preprocessing on the training text set, and inputting the training text set after the first preprocessing into a pre-training model set to obtain a text feature vector set.

9. A financial entity extraction device, characterized in that: The financial entity extraction device comprises: An acquisition module, configured to acquire a financial entity text information set corresponding to the extraction instruction upon detecting the extraction instruction, and input the financial entity text information set into an extraction model set to obtain an extraction result set, wherein the extraction model set includes a pre-trained model set; A determination module, used to vote on each extraction result in the extraction result set according to a preset voting strategy to obtain a voting result, and determine a target extraction result according to the voting result; The acquisition module is also used to input the financial entity text information set into a pre-trained model set to obtain a text feature vector set; perform a mapping operation on the text feature vector corresponding to each financial entity text in the text feature vector set to generate an intermediate feature vector set corresponding to each financial entity text; construct an attention matrix based on a dual affine network, and obtain an extraction result set based on the attention matrix and the intermediate feature vector set.

10. A financial entity extraction device, characterized in that: The financial entity extraction device comprises: a memory, a processor, and a financial entity extraction program stored in the memory and executable on the processor. When the financial entity extraction program is executed by the processor, the steps of the financial entity extraction method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a financial entity extraction program, and when the financial entity extraction program is executed by a processor, the steps of the financial entity extraction method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Information extraction method and device based on pre-training model, equipment and storage medium

    CN112329477A

  • E-commerce comment opinion extraction method based on entity emotion recognition

    CN113158670A