Financial public opinion segmentation detection method and equipment based on key information extraction

Through segmentation of financial text and interactive training of recurrent neural networks and BERT models, an auxiliary model for key information sentence extraction is established, which solves the problems of redundant information processing and insufficient utilization of semantic information in the existing technology, and improves financial public opinion segmentation detection. accuracy.

CN114398480BActive Publication Date: 2024-10-15GUOXIN DIGITAL INTELLIGENCE TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111425815.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2024-10-15
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

Existing detection methods for financial public opinion segmentation cannot effectively filter redundant information and cannot utilize the semantic information of the tag itself, resulting in low detection accuracy.

Method used

By preprocessing the financial text, it is segmented into fragment sentences, and a recurrent neural network and BERT model are used to establish an auxiliary model for key information sentence extraction, and interactive training is performed to improve detection accuracy.

Benefits of technology

It effectively removes redundant information from financial texts and improves the accuracy of financial public opinion detection by using the interaction between tags and fragment sentences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398480B_ABST
    Figure CN114398480B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of big data artificial intelligence technology, and discloses a method and device for detecting the subdivision of financial public opinion based on key information extraction, the steps of which include preprocessing financial text data and a set of financial public opinion label descriptions; encoding financial text fragment sentences and financial public opinion label sentences to obtain fragment sentence representations; performing similarity representation on financial text fragment sentences and financial public opinion label description sets, and then performing classification training to obtain a key information sentence extraction and classification auxiliary model; using the key information sentence extraction and classification auxiliary model to calculate the importance of financial text fragment sentences to the set of financial public opinion label descriptions, and select label key sentences; constructing a label key sentence combination to input the financial text to perform subdivision public opinion classification. The present invention establishes a key information sentence extraction auxiliary model through label descriptions and fragment sentences, then extracts key information sentences, and constructs a pre-trained model input, thereby effectively improving the accuracy of financial public opinion subdivision detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data artificial intelligence technology, and in particular to a method for detecting financial public opinion segmentation based on key information extraction. Background Art

[0002] With the rapid development of the Internet, a large amount of information is generated on the Internet every day, but these information contain a lot of false, fraudulent and other information that is misleading to the public. Therefore, it is particularly important to monitor the public opinion of a large number of texts on the Internet for social environment supervision; especially in the financial field, various financial text public opinions reflect the emotions of investors and financial practitioners, which will affect the behavior of decision makers. By testing the financial text for financial public opinion segmentation, it is helpful to understand the development trend of the financial market and promote the healthy development of the financial market. Financial public opinion segmentation testing refers to determining what aspects of public opinion information (such as lending, overdue, fraud, etc.) the financial public opinion text contains. Each aspect of public opinion has a corresponding label description, and it is necessary to determine whether the text contains information on a certain aspect of public opinion.

[0003] The detection of financial public opinion segmentation is essentially a multi-label classification problem. The general methods currently used are mainly to optimize such problems from two aspects: one is to select different semantic representation structures such as RNN and CNN, and pre-trained models such as BERT; the other is to select different decoding methods, such as treating it as a binary classification problem or a sequence decoding problem. For example, the patent with the authorization announcement number CN103309960B discloses a method and device for extracting multidimensional information of network public opinion events, which includes: extracting seed web pages from search logs based on user search behavior, and using the seed web pages to construct the initial theme of the network public opinion event; obtaining feature web pages in a preset time period according to the theme; obtaining the analysis data of user attention, media attention, and user attitude in the previous preset time period; obtaining the analysis data of user attention, media attention, and user attitude in the current preset time period; respectively comparing the analysis data of user attention, media attention, and user attitude in the previous preset time period with the current time period, and obtaining the trend evolution information of the network public opinion event.

[0004] Although the above method can be used to analyze public opinion events and improve the accuracy of public opinion event analysis, the financial texts on the Internet are diverse in levels and contain a lot of redundant information. The current method has the following problems for financial texts: 1. It cannot filter out redundant information, is too long, and cannot effectively utilize the advantages of the pre-trained model; 2. It cannot effectively utilize the semantic information of the label itself for classification, which results in the current detection accuracy of the financial public opinion segmentation detection method being low. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method for detecting financial public opinion segmentation based on key information extraction, establish a key information sentence extraction auxiliary model through label description and fragment sentences, and then extract key information sentences to construct a pre-trained model input, so as to effectively improve the accuracy of financial public opinion segmentation detection.

[0006] The present invention solves the above technical problems by the following technical means:

[0007] A method for detecting financial public opinion segmentation based on key information extraction includes the following steps:

[0008] S1. Preprocessing financial text data and financial public opinion label description sets;

[0009] S2. Use a recurrent neural network to encode the financial text fragment sentences and financial public opinion label sentences to obtain the fragment sentence representation;

[0010] S3. Perform similarity characterization on the financial text fragment sentences and the financial public opinion label description set, and then perform classification training to obtain a key information sentence extraction and classification auxiliary model;

[0011] S4. Use the key information sentence extraction and classification auxiliary model to calculate the importance of the financial text fragment sentence to the financial public opinion label description set, and select the label key sentence;

[0012] S5. Construct tag key sentence combinations and input financial texts to perform segmented public opinion classification.

[0013] Furthermore, in the step S1, during preprocessing, all financial texts in the original data set D are divided, each financial text is segmented into sentences according to Chinese delimiters, and they are merged according to the coherence probability to obtain the final segment sentences.

[0014] Furthermore, in step S1, the merging method is specifically as follows: the current sentence and the next sentence are concatenated and sent to the pre-trained BERT model, and the sentence coherence probability is obtained according to the probability of whether the output of the pre-trained BERT model is the next sentence. If the probability is greater than 0.8, that is, greater than 80%, the current sentence and the next sentence are concatenated as a new fragment sentence. If the probability is less than or equal to 80%, the current sentence and the next sentence are both regarded as different fragment sentences; then a predefined learning character [s1] is added to the end of the fragment sentence, and a predefined learning character [s2] is added to the end of each financial public opinion type label description sentence.

[0015] Further, the specific method of step S2 is:

[0016] S201, given an input financial text, a set of q fragment sentences X = {M1, M2, ..., M q}, for each fragment sentence Mj ={w j1 , w j2 ,…,w jn}, and sent to the recurrent neural network, where n represents the length of the fragment sentence, and w ji Represents the word at the i-th position of the sentence segment j;

[0017] S202, take the output representation of the last time step The vector is the fragment sentence M j The overall representation of R represents the real number space, and d represents the hidden layer dimension of the recurrent neural network;

[0018] S203, given a label sentence description set L = {l1, l2, ..., l k}, where k represents the number of tags, l i Represents the description of the i-th tag;

[0019] S204, for each tag description l t , sent to the recurrent neural network, and the output representation of the last time step is taken Describe the label t The overall representation of R represents the real number space, and d represents the hidden layer dimension of the recurrent neural network.

[0020] Furthermore, in step S3, the specific method for performing similarity characterization on the financial text segment sentence and the tag description set is: characterizing the tth tag description By calculating the representation set of q fragment sentences in financial text respectively The cosine similarity of t and the financial text is obtained Where R represents the real number space and q represents the number of fragment sentences.

[0021] Furthermore, in step S3, the method for performing classification training to obtain a key information sentence extraction classification auxiliary model is: It is sent to the fully connected layer and classified using binary cross entropy training to obtain a key information sentence extraction and classification auxiliary model.

[0022] Further, the specific method of step S4 is: after obtaining the key information sentence extraction and classification auxiliary model, the similarity representation obtained by calculating the text and the label t according to the key information sentence extraction and classification auxiliary model Take the top 10% of the fragment sentences as the new key text for label t in represents the i-th sentence in the top 10% of the segment sentences, and c represents the number of key sentences of the new key text about tag t.

[0023] Further, the specific method of step S5 is: for the key text of label t Construct input text T t , in For the i-th key sentence of label t, w ij represents the jth word of the i-th key sentence, u1 represents the untrained character, u t Represents the training characters of label t, cls and sep are BERT predefined identifiers;

[0024] T t After being fed into the word vector encoding layer of BERT, we get where e cls , , e sep is cls,u t ,u1, sep is the vector after BERT word vector encoding;

[0025] Then use the key information sentence extraction and classification auxiliary model about the fragment sentence The overall representation of the replacement of e u1 ; Then it is sent to the BERT model for binary classification to determine whether the financial text belongs to the public opinion label t.

[0026] The present invention also discloses a device for detecting financial public opinion segmentation based on key information extraction, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.

[0027] Beneficial effects of the present invention:

[0028] The present invention divides financial text into fragment sentences, and establishes a key information sentence extraction auxiliary model by interacting label descriptions and fragment sentences, and then extracts the key information sentences to construct a pre-trained model input; the redundant information of the financial text is removed in the whole process, and the interaction between labels and fragment sentences is utilized to effectively improve the accuracy of financial public opinion detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flow chart of the method for detecting financial public opinion segmentation based on key information extraction of the present invention;

[0030] Figure 2 This is an embodiment diagram of preprocessing the financial text data and the financial public opinion tag description set in step 101 of embodiment 1;

[0031] Figure 3It is a model diagram of the key information sentence extraction and classification auxiliary model provided in steps 102 and 103 of Example 1;

[0032] Figure 4 This is an embodiment diagram of using the key information sentence extraction auxiliary model provided in step 104 of Example 1 to calculate the importance of text fragment sentences to the tag description set and select tag key sentences. DETAILED DESCRIPTION

[0033] The present invention will be described in detail below with reference to the accompanying drawings:

[0034] Embodiment 1,

[0035] This embodiment is a method for detecting financial public opinion segmentation based on key information extraction. Figure 1 As shown, the method includes:

[0036] Step 101: pre-process the financial text data and the financial public opinion label description set, as follows:

[0037] For financial texts, the texts are lengthy and varied. However, to identify whether a certain type of public opinion is described, only certain sentences in the financial text are related. First, the financial text is preprocessed and divided into fragment sentences. Specifically, it is first divided into sentences using Chinese punctuation marks, and then the previous sentence and the next sentence are input into the pre-trained model BERT. The pre-training task of the pre-trained model outputs the probability of whether it is the next sentence. If the probability is greater than 0.8, that is, 80%, the previous sentence and the next sentence are merged into a fragment sentence to form a fragment sentence of the financial text. If the probability is less than or equal to 80%, the current sentence and the next sentence are regarded as different fragment sentences, and then the character [s1] is added to the end of each fragment sentence for subsequent acquisition of the overall representation of the fragment sentence, and the character [s2] is added after each financial public opinion label description to obtain the overall representation of the label description.

[0038] Preprocess the financial text data and financial public opinion label description set as follows Figure 2 As shown in the figure, a text is divided into 5 sentences according to Chinese punctuation marks, and then they are sequentially combined and input into the pre-trained model BERT, and the probability of the pre-trained task output of the pre-trained model is obtained. If the probability is greater than 80%, the previous sentence and the next sentence are merged into a fragment sentence. In this example, the first sentence and the second sentence are merged into a new fragment sentence, the third sentence and the fourth sentence are merged into a new fragment sentence, and the fifth sentence is a new fragment sentence alone, and [s1] is added after the fragment sentence; for the three-label description sentence, the character [s2] is directly added at the end of the sentence.

[0039] Step 102: Encode the financial text fragment sentences and financial public opinion label sentences using a recurrent neural network to obtain fragment sentence representations; Figure 3As shown, the text fragment sentences and label sentences are encoded through a recurrent neural network to obtain fragment sentence representation. In this embodiment, a given input text q fragment sentence set X = {M1, M2, ..., M q}, in this case q is 3, for each fragment sentence M j ={w j1 , w j2 ,…,w jn}, and sent to the recurrent neural network, where n represents the length of the fragment sentence, and w ji Represents the word at the i-th position of the sentence j, and takes the output representation of the last time step The vector is the fragment sentence M j The overall representation of R represents the real number space, d represents the hidden dimension of the recurrent neural network; given a label sentence description set L = {l1, l2, ..., l k}, where k represents the number of tags. In this example, k is 3. i Represents the description of the i-th tag. For each tag description l t , sent to the recurrent neural network, and the output representation of the last time step is taken Describe the label t The overall representation of R represents the real number space, and d represents the hidden layer dimension of the recurrent neural network.

[0040] Step 103: perform similarity characterization on the financial text segment sentences and the financial public opinion label description set, and then perform classification training to obtain a key information sentence extraction and classification auxiliary model;

[0041] The key information sentence extraction and classification auxiliary model is used to subsequently calculate the similarity between the label and the fragment sentence for fragment screening, such as Figure 3 As shown, in this embodiment, the text fragment sentence and the label description set are characterized by similarity, and then classification training is performed to obtain a key information sentence extraction classification auxiliary model; for the tth label description representation By calculating the representation set of q fragment sentences in the text separately The cosine similarity of the label t and the text is obtained by R represents the real number space, and q represents the number of fragment sentences. In this embodiment, corresponding similarity features are obtained for the three labels and the three fragments, and then sent to the fully connected layer, and classification training is performed using binary cross entropy to obtain a key information sentence extraction classification auxiliary model.

[0042] Step 104: Calculate the importance of the financial text segment sentences to the financial public opinion label description set using the key information sentence extraction and classification auxiliary model, and select the label key sentences; specifically:

[0043] After training the auxiliary model for extracting and classifying key information sentences, the auxiliary model for extracting and classifying key information sentences is used to calculate the importance of text fragment sentences to the label description set. By selecting the label key sentences, redundant information can be excluded and key information can be retained. In this embodiment, for example Figure 4 As shown in the figure, after obtaining the key information sentence extraction and classification auxiliary model, the similarity representation obtained by calculating the text and the label t is obtained according to the key information sentence extraction and classification auxiliary model. Take the first 10% of the fragment sentences as the new key text about the label t, expressed as in represents the i-th sentence in the top 10% of the fragment sentences, c represents the number of key sentences of the new key text about the tag t, in this example, the number of fragment sentences q and the number of tags are both 3.

[0044] Step 105: Construct a tag key sentence combination and input the financial text to perform segmented public opinion classification.

[0045] Specifically, after obtaining the key fragment sentence, construct the label key sentence combination input text, and perform label text classification. For the key text of label t:

[0046]

[0047] Construct the input text as

[0048]

[0049] in For the i-th key sentence of label t, w ij represents the jth word of the i-th key sentence, u1 represents the untrained character, u t Represents the training characters of label t, cls and sep are BERT predefined identifiers; after sending T to the word vector encoding layer of BERT, we get:

[0050]

[0051] where e cls , e u1 ,, e sep is cls,u t ,u1, sep is the vector after BERT word vector encoding; using key information sentence extraction classification auxiliary model about fragment sentence The overall representation of the replacement of e u1 ; Then it is sent to the BERT model for binary classification to determine whether the text belongs to the public opinion label t. For descriptions with N public opinion labels, the model will output N binary classification results for separate judgments.

[0052] Embodiment 2,

[0053] This embodiment also discloses a device for detecting financial public opinion segmentation based on key information extraction, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method in the above-mentioned embodiment 1 are implemented.

[0054] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention. The techniques, shapes, and structural parts not described in detail in the present invention are all known technologies.

Claims

1. A method for detecting financial public opinion segmentation based on key information extraction, characterized by: The following steps are included: S1. Preprocess the financial text data and the financial public opinion label description set. During the preprocessing, all financial texts in the original data set D are divided, and each financial text is split into sentences according to Chinese delimiters, and then merged according to the coherence probability to obtain fragment sentences; S2. Use a recurrent neural network to encode the financial text fragment sentences and financial public opinion label sentences to obtain the fragment sentence representation; S3. Perform similarity characterization on the financial text fragment sentences and the financial public opinion label description set, and then perform classification training to obtain a key information sentence extraction and classification auxiliary model; S4. Use the key information sentence extraction and classification auxiliary model to calculate the importance of the financial text fragment sentence to the financial public opinion label description set, and select the label key sentence; S5. Construct a combination of key sentences and input financial text to perform segmented public opinion classification. The specific method is as follows: for the key text of label t Construct the input text, in represents the th key sentence for the label, represents the th word of the th key sentence, represents the untrained character, represents the trained character of the label, and are BERT predefined identifiers; After being fed into the word vector encoding layer of BERT, we get in, , for,,, The vector after BERT word vector encoding; Then use the key information sentence extraction and classification auxiliary model about the fragment sentence The overall representation is replaced; it is then sent to the BERT model for binary classification to determine whether the financial text belongs to the public opinion label.

2. The method for detecting financial public opinion subdivision based on key information extraction according to claim 1 is characterized by: In the step S1, the method of merging according to the coherence probability is specifically as follows: the current sentence and the next sentence are concatenated and sent to the pre-trained BERT model, and the sentence coherence probability is obtained according to whether the output of the pre-trained BERT model is the probability of the next sentence. If the probability is greater than 80%, the current sentence and the next sentence are concatenated as a new fragment sentence. If the probability is less than or equal to 80%, the current sentence and the next sentence are regarded as different fragment sentences; then a predefined learning character [s1] is added to the end of the fragment sentence, and a predefined learning character [s2] is added to the end of each financial public opinion type label description sentence.

3. The method for detecting financial public opinion subdivision based on key information extraction according to claim 2 is characterized by: The specific method of step S2 is: S201. Given a set of 100 fragment sentences of a given financial text as input, each fragment sentence is fed into a recurrent neural network, where 1 represents the length of the fragment sentence and 2 represents the word at the th position of the fragment sentence; S202, take the output representation of the last time step The vector is the overall representation of the fragment sentence, where R represents the real number space, which indicates the hidden layer dimension of the recurrent neural network; S203, given a set of label sentence descriptions, where k represents the number of labels, and represents the description of the th label; S204: For each label description, send it to the recurrent neural network and take the output representation of the last time step is the overall representation of the label description, where R represents the real number space and indicates the hidden layer dimension of the recurrent neural network.

4. The method for detecting financial public opinion subdivision based on key information extraction according to claim 3 is characterized by: In step S3, the specific method for performing similarity characterization on the financial text segment sentence and the tag description set is as follows: By calculating the sentence representation set of each segment of financial text separately The cosine similarity of the label and the financial text is obtained Where R represents the real number space and q represents the number of fragment sentences.

5. The method for detecting financial public opinion subdivision based on key information extraction according to claim 4 is characterized by: In step S3, the method of performing classification training to obtain the key information sentence extraction classification auxiliary model is to It is sent to the fully connected layer and classified using binary cross entropy training to obtain a key information sentence extraction and classification auxiliary model.

6. The method for detecting financial public opinion subdivision based on key information extraction according to claim 5 is characterized by: The specific method of step S4 is: after obtaining the key information sentence extraction and classification auxiliary model, the similarity representation obtained by calculating the text and the label t according to the key information sentence extraction and classification auxiliary model Take the first 10% of the fragment sentences as the new key text about the tag in represents the sentence in the top 10% of the fragment sentences, and represents the number of key sentences of the new key text about the tag.

7. Financial public opinion segmentation detection equipment based on key information extraction, characterized by: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods of claims 1 to 6 when executing the computer program.