Text relationship processing method, device and equipment based on text analysis

By obtaining and optimizing the semantic and word frequency causal intensity information of event text, the problem of inaccurate causal intensity relationship in the existing technology is solved, the accuracy of causal relationship of event text is improved, and the predictive analysis ability of financial transaction events is enhanced.

CN114817475BActive Publication Date: 2024-12-20CCB FINTECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210516011.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2024-12-20
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

The prior art has information loss when determining the causal intensity relationship of event text, especially due to inaccuracy caused by the existence of high-frequency words.

Method used

By obtaining the semantic causal intensity information and word frequency causal intensity information of the target event group text, the vector spatial distance is optimized by using the comparison learning method and the pre-trained language model, and combining statistical probability information and correction parameters, the causal intensity relationship of the event text is determined.

Benefits of technology

It improves the accuracy of the causal strength relationship of event text, avoids information loss, and enhances the effectiveness of predictive analysis of financial transaction events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817475B_ABST
    Figure CN114817475B_ABST
Patent Text Reader

Abstract

The present application provides a text relationship processing method, device and equipment based on text analysis. The method includes: obtaining a target event group text, including a first event text and a second event text having a causal relationship, the first event text representing the cause event text, and the second event text representing the result event text; determining the semantic causal strength information and word frequency causal strength information of the target event group text; determining the target causal strength information of the target event group text based on the semantic causal strength information and the word frequency causal strength information, the target causal strength information representing the causal strength relationship between the first event text and the second event text. The method determines the causal strength information of the event text based on the semantic information and word frequency information of the target event group text, avoids information loss, and improves the accuracy of determining the causal strength relationship of the event text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a text relationship processing method, device and equipment based on text analysis. Background Art

[0002] An event is something that happens in a specific time and region, involves one or more roles, and consists of one or more actions. All walks of life are generating massive amounts of event text, such as in the financial field. Therefore, we not only need to effectively store, calculate, and analyze massive event texts, but also need to mine potential value from massive event texts and explore the laws of event development and change.

[0003] In the prior art, the causal strength relationship of an event text is usually determined by calculating the causal strength relationship of words appearing in the cause event and the result event.

[0004] However, in the prior art, when using words as the granularity to represent events, there is inevitably information loss; there may be some high-frequency words with little meaning in the cause event and the result event, resulting in inaccurate causal strength relationship of the final event text. Summary of the invention

[0005] The present application provides a text relationship processing method, device and equipment based on text analysis, so as to solve the problem that the causal strength relationship of event text cannot be accurately derived.

[0006] In a first aspect, the present application provides a text relationship processing method based on text analysis, the method comprising:

[0007] Acquire a target event group text, wherein the target event group text includes a first event text and a second event text, wherein the first event text and the second event text have a causal relationship, the first event text represents a cause event text, and the second event text represents a result event text;

[0008] Determine the semantic causal strength information and word frequency causal strength information of the target event group text; wherein the semantic causal strength information represents the causal strength relationship between the first event text and the second event text determined based on text semantic information, and the word frequency causal strength information represents the causal strength relationship between the first event text and the second event text determined based on word probability information;

[0009] According to the semantic causal strength information and the word frequency causal strength information, target causal strength information of the target event group text is determined, and the target causal strength information represents the causal strength relationship between the first event text and the second event text.

[0010] In an optional implementation manner, determining the semantic causal strength information and word frequency causal strength information of the target event group text includes:

[0011] Determining the semantic causal strength information of the target event group text based on a contrastive learning method and a preset pre-trained language model;

[0012] Based on the statistical information of the target event group text, the word frequency causal strength information of the target event group text is determined.

[0013] In an optional implementation, the semantic causal strength information is determined based on a contrastive learning method and a preset pre-trained language model, including:

[0014] Based on a contrastive learning method, optimizing the target vector space distance between the first event text and the second event text, and determining the optimized target event group text;

[0015] The semantic causal strength information is determined according to the optimized target event group text.

[0016] In an optional implementation, based on a contrastive learning method, optimizing the target vector space distance between the first event text and the second event text, and determining the optimized target event group text, comprises:

[0017] Obtaining N other weakly related event texts in the data source that have a weak causal relationship with the first event text, where N is a positive integer greater than or equal to 1;

[0018] Based on the contrastive learning method, determining the contrastive loss function of the data source according to the target event group text and each weak relationship event text;

[0019] According to the function value of the contrast loss function, the target vector space distance between the first event text and the second event text is optimized, and the optimized target event group text is determined, wherein the function value of the loss function has a positive correlation with the target vector space distance, and the target event group text when the function value reaches the minimum value is the optimal target event group text.

[0020] In an optional implementation manner, determining the semantic causal strength information according to the optimized target event group text includes:

[0021] Based on a preset pre-trained language model, determine a feature vector of each word in the optimized target event text, perform pooling processing on each feature vector, and determine a semantic feature vector of the optimized target event text;

[0022] Based on preset mapping parameters, the semantic feature vector is mapped to determine the semantic causal strength information.

[0023] In an optional implementation, determining the word frequency causal strength information of the target event group text based on the statistical information of the target event group text includes:

[0024] Based on the statistical probability information of each word in the target event group text, determining the necessity causal strength of each word pair in the target event group text and the sufficiency causal strength of each word pair in the target event group text;

[0025] Determine the target causal strength of each word pair according to the necessary causal strength and sufficient causal strength of each word pair;

[0026] According to the target causal strength of each word pair, the word frequency causal strength information of the target event group text is determined.

[0027] In an optional implementation, based on the statistical probability information of each word in the target event group text, determining the necessity causal strength of each word pair in the target event group text and the sufficiency causal strength of each word pair in the target event group text includes:

[0028] Based on the statistical probability information of each word of the target event group, determining the initial necessity causal strength of each word pair in the target event group text and the initial sufficiency causal strength of each word pair in the target event group text;

[0029] According to preset correction parameters, the initial necessity causal strength and the initial sufficiency causal strength of each word are corrected to determine the necessity causal strength and the sufficiency causal strength of each word in the first event text and each word in the second event text.

[0030] In an optional implementation manner, the first event text is a financial cause event text, and the second event text is a financial result event text; the method further includes:

[0031] A financial event cause-and-effect graph is generated according to the target causal strength information, wherein the cause-and-effect graph is used to perform predictive analysis on financial transaction events.

[0032] In a second aspect, the present application provides a text relationship processing device based on text analysis, the device comprising:

[0033] An acquisition unit, configured to acquire a target event group text, wherein the target event group text includes a first event text and a second event text, wherein the first event text and the second event text have a causal relationship, the first event text represents a cause event text, and the second event text represents a result event text;

[0034] A first determination unit is used to determine the semantic causal strength information and word frequency causal strength information of the target event group text; wherein the semantic causal strength information represents the causal strength relationship between the first event text and the second event text determined based on text semantic information, and the word frequency causal strength information represents the causal strength relationship between the first event text and the second event text determined based on word probability information;

[0035] The second determination unit is used to determine the target causal strength information of the target event group text according to the semantic causal strength information and the word frequency causal strength information, and the target causal strength information represents the causal strength relationship between the first event text and the second event text.

[0036] In a third aspect, the present application provides an electronic device, the electronic device comprising: a memory, a processor;

[0037] Memory: used to store instructions executable by the processor;

[0038] The processor is configured to execute the method as described in the first aspect.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0040] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.

[0041] The text relationship processing method, device and equipment based on text analysis provided by the present application are carried out through the following steps: obtaining a target event group text, including a first event text and a second event text with a causal relationship, the first event text representing the cause event text, and the second event text representing the result event text; determining the semantic causal strength information and word frequency causal strength information of the target event group text; determining the target causal strength information of the target event group text based on the semantic causal strength information and the word frequency causal strength information, the target causal strength information representing the causal strength relationship between the first event text and the second event text. The method determines the causal strength information of the event text based on the semantic information and word frequency information of the target event group text, avoids information loss, and improves the accuracy of determining the causal strength relationship of the event text. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] Figure 1 A flowchart of a text relationship processing method based on text analysis provided in an embodiment of the present application;

[0044] Figure 2 A flowchart of another text relationship processing method based on text analysis provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of the structure of a text relationship processing device based on text analysis provided in an embodiment of the present application;

[0046] Figure 4 A schematic diagram of the structure of another text relationship processing device based on text analysis provided in an embodiment of the present application;

[0047] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0048] Figure 6 The present invention is a block diagram of a terminal device according to an exemplary embodiment.

[0049] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0050] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0051] First, the terms involved in this application are explained:

[0052] The causal graph is a knowledge base of causal logic that describes the evolutionary laws and patterns between events. Structurally, it is a directed cyclic graph, where nodes represent events and directed edges represent the sequential, causal, and hierarchical relationships between events.

[0053] Contrastive learning: Learn the feature representation of samples by comparing the data with positive samples and negative samples in the feature space.

[0054] In production and life, all walks of life generate massive amounts of event texts. For example, the financial field generates massive amounts of financial event data. These financial events have intricate relationships. In order to understand the development patterns of events, it is necessary not only to effectively store, calculate and analyze massive event texts, but also to mine potential value from massive event texts and explore the development and change patterns of events.

[0055] In the prior art, the causal strength relationship of an event text is usually determined by calculating the causal strength relationship of words appearing in the cause event and the result event.

[0056] However, in the prior art, when using words as the granularity to represent events, there is inevitably information loss; there may be some high-frequency words with little meaning in the cause event and the result event, resulting in inaccurate causal strength relationship of the final event text.

[0057] The text relationship processing method based on text analysis provided in this application is intended to solve the above technical problems in the prior art.

[0058] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0059] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0060] Figure 1 A flowchart of a text relationship processing method based on text analysis provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:

[0061] 101. Obtain a target event group text, where the target event group text includes a first event text and a second event text, wherein the first event text and the second event text have a causal relationship, the first event text represents a cause event text, and the second event text represents a result event text.

[0062] Exemplarily, a cause event text and a result event text having a causal relationship, namely a first event text and a second event text, are obtained, and a target event group text is formed by splicing the first event text and the second event text.

[0063] 102. Determine the semantic causal strength information and word frequency causal strength information of the target event group text; wherein the semantic causal strength information represents the causal strength relationship between the first event text and the second event text determined based on the text semantic information, and the word frequency causal strength information represents the causal strength relationship between the first event text and the second event text determined based on the word probability information.

[0064] Exemplarily, the semantic causal strength information of the target event text, the semantic causal strength information of the first event text and the second event text are determined based on the text semantic information of the target event text, and the word frequency causal strength information of the target event text, i.e., the word frequency causal strength information of the first event text and the second event text, is determined based on the probability information of each word of the target event text.

[0065] 103. According to the semantic causal strength information and the word frequency causal strength information, the target causal strength information of the target event group text is determined, and the target causal strength information represents the causal strength relationship between the first event text and the second event text.

[0066] Exemplarily, the semantic causal strength information and word frequency causal strength information of the determined target event text are fused to determine the target causal strength information of the target event group text, wherein the target causal strength information of the target event group text can be used to predict and analyze downstream events of the target event text.

[0067] In this embodiment, the following steps are performed: obtaining a target event group text, including a first event text and a second event text having a causal relationship, wherein the first event text represents the cause event text, and the second event text represents the result event text; determining the semantic causal strength information and the word frequency causal strength information of the target event group text; determining the target causal strength information of the target event group text according to the semantic causal strength information and the word frequency causal strength information, wherein the target causal strength information represents the causal strength relationship between the first event text and the second event text. The method determines the causal strength information of the event text based on the semantic information and the word frequency information of the target event group text, avoids information loss, and improves the accuracy of determining the causal strength relationship of the event text.

[0068] Figure 2 A flowchart of another text relationship processing method based on text analysis provided in an embodiment of the present application, such as Figure 2 As shown, the method includes:

[0069] 201. Obtain a target event group text, where the target event group text includes a first event text and a second event text, wherein the first event text and the second event text have a causal relationship, the first event text represents a cause event text, and the second event text represents a result event text.

[0070] Exemplarily, this step refers to step 101 and will not be described in detail.

[0071] 202. Based on a contrastive learning method, optimize the target vector space distance between the first event text and the second event text, and determine an optimized target event group text.

[0072] In one example, step 202 includes the following steps:

[0073] Obtain N other weakly related event texts in the data source that have a weak causal relationship with the first event text, where N is a positive integer greater than or equal to 1;

[0074] Based on the contrastive learning method, the contrastive loss function of the data source is determined according to the target event group text and each weak relationship event text;

[0075] According to the function value of the comparison loss function, the target vector space distance between the first event text and the second event text is optimized, and the optimized target event group text is determined, wherein the function value of the loss function has a positive correlation with the target vector space distance, and the target event group text when the function value reaches the minimum value is the optimal target event group text.

[0076] Exemplarily, the first event text and the second event text in the target event group text are regarded as two vectors in space. Based on the contrastive learning method, the spatial distance between the first event text and the second event is shortened, that is, the target vector space distance between the first event text and the second event text is optimized, and the optimized target event group text is determined.

[0077] In one example, the first event text and the second event text in the data source have a strong causal relationship, and N other weakly related event texts in the data source that have a weak causal relationship or no causal relationship with the first event text are obtained, where N is a positive integer greater than or equal to 1; based on the definition of the loss function in the contrastive learning method, the contrastive loss function of the data source is determined according to the target event group text and each weakly related event text; according to the function value of the contrastive loss function, the target vector space distance between the first event text and the second event text is optimized, that is, the spatial distance between the first event text and the second event is shortened and the spatial distance between the first event and each weakly related event text is increased, so that the causal strength between the first event text and the second event text is higher than the causal strength between the first event text and other weakly related events, and then the optimized target event group text is determined, wherein the function value of the loss function has a positive correlation with the target vector space distance, the smaller the function value, the smaller the target vector space distance, and the target event group text when the function value takes the minimum value is the optimal target event group text.

[0078] In an example, the loss function of a data source can be expressed as follows:

[0079]

[0080] Among them, the data source has N events, where s 1 ,s 2 For events with greater causal strength, s j For weak relationship events, the loss function ensures that events with strong causal strength are brought closer and events with weak causal strength are kept away; τ is the temperature coefficient, which is used to control the importance of weak relationship event texts.

[0081] 203. Determine semantic causal strength information based on the optimized target event group text, wherein the semantic causal strength information represents the causal strength relationship between the first event text and the second event text determined based on the text semantic information.

[0082] In one example, step 203 includes the following steps:

[0083] Based on a preset pre-trained language model, determine the feature vector of each word in the optimized target event text, perform pooling processing on each feature vector, and determine the semantic feature vector of the optimized target event text;

[0084] Based on the preset mapping parameters, the semantic feature vector is mapped to determine the semantic causal strength information.

[0085] Exemplarily, the target event group text is input into a preset pre-trained language model, such as any one or more of a bidirectional encoding pre-trained language model (Bidirectional Encoder Representations from, BERT model for short), a robustly optimized bidirectional encoding pre-trained language model (A Robustly Optimized BERT Pretraining Approach, RoBERTa model for short), and a bidirectional encoding pre-trained language model for self-learning semantics (A Lite BERT For Self-Supervised Learning Of Language Representations, ALBERT model for short); the pre-trained language model outputs a context-related vector, i.e., a feature vector, that determines each word in the target event text, and these vectors are pooled to obtain a vector of a fixed length, i.e., a semantic feature vector, and then the semantic feature vector is mapped through a fully connected network based on preset mapping parameters to determine semantic causal strength information, such as a semantic causal strength score.

[0086] In an example, the process of determining the semantic causal strength score of the target event group text can be expressed as the following formula:

[0087] H 1 , ..., H k , ..., H m+n =PLM(S 1 , S 2 )

[0088] H=Pooler(H 1 , ..., H k , ..., H m+n )

[0089] C=σ(WH+b)

[0090] Among them, the PLM function represents the pre-trained language model, H 1 , ..., H k , ..., H m+nThe target event group text feature vector is outputted by it, and Pooler represents the pooling function, which maps these feature vectors into a fixed-length semantic feature vector H. H is mapped into a causal strength score C by a fully connected neural network, and W and b are the preset mapping parameters of the fully connected network. σ represents the sigmoid function, which is the activation function of the fully connected network and is used to normalize the causal strength score to ensure that its value range is between 0 and 1:

[0091]

[0092] In one example, the BERT model is a pre-trained language model based on a bidirectional encoder structure. 1 , S 2 When there are two paragraphs of text, the BERT model uses a special symbol to concatenate the two paragraphs of text as follows: [CLS]S 1 [SEP]S 2 [SEP], where the [CLS] symbol marks the beginning of the text and the [SEP] symbol marks the end of the text. The feature vector corresponding to the [CLS] symbol represents the pooling result of the BERT model as the feature vector of all words:

[0093] Pooler BERT (H [CLS] , ..., H [SEP] )=H [CLS]

[0094] In one example, the RoBERTa model is an improvement on the BERT model. The model structure of the RoBERTa model is the same as that of the BERT model, but changes have been made to the pre-training settings, including using a larger batch size and more training data. For the RoBERTa model, when the input is S 1 , S 2 When there are two paragraphs of text, the RoBERTa model will use S 1 , S 2 The two texts are concatenated as follows: <s>S 1 S 2 < / s> ,in <s> The symbol marks the beginning of the text.< / s> The symbol marks the end of the text and ends with <s>The feature vector corresponding to the symbol is used as the pooling result of the RoBRETa model:

[0095] Pooler RoBRETa (H <s>< / s> <s>,...,H < / s> )=H <s>< / s> <s>

[0096] In one example, the ALBERT model introduces a cross-layer parameter sharing mechanism based on the BERT model, so that each transformation layer of the model shares the same parameters. This improvement significantly reduces the number of model parameters while achieving experimental results similar to the BERT model, and enables the ALBERT model to build a larger model than the BERT model using the same computing resources. 1 , S 2 When there are two paragraphs of text, the ALBERT model will S 1 , S 2 The two paragraphs are concatenated into the following format: [SEP]S 1 S 2 [SEP], where the [SEP] symbol marks the beginning and end of the text at the same time, and the feature vector corresponding to the first [SEP] symbol is used as the pooling result of the ALBERT model:

[0097] Pooler ALBERT (H [SEP] , ..., H′ [SEP] )=H [SEP]

[0098] 204. Based on the statistical probability information of each word in the target event group text, determine the necessity causal strength of each word pair in the target event group text and the sufficiency causal strength of each word pair in the target event group text.

[0099] In one example, step 204 includes the following steps:

[0100] Based on the statistical probability information of each word in the target event group, determine the initial necessary causal strength of each word pair in the target event group text and the initial sufficient causal strength of each word pair in the target event group text;

[0101] According to preset correction parameters, the initial necessary causal strength and the initial sufficient causal strength of each word are corrected to determine the necessary causal strength and the sufficient causal strength of each word in the first event text and each word in the second event text.

[0102] For example, the strength of the causal relationship between events is reflected in two aspects: necessity and sufficiency. Consider the first event and the second event (S 1 , S 2 ), necessity emphasizes that if the result event S 2 occurs, then there must be a cause event S before it 1 Occurrence; sufficiency emphasizes that if the cause event S 1 occurs, then the result event S 2 It must happen after it, so based on the statistical probability information of each word in the target event group text, the initial necessary causal strength of each word pair in the target event group text and the initial sufficient causal strength of each word pair in the target event group text are determined, wherein the first event text and the second event text may include some meaningless high-frequency words at the same time, which will lead to inaccurate calculation of causal strength and may make the obtained causal strength too large. Therefore, a penalty coefficient, i.e., a preset correction parameter, is used to take the prior probability of the word as a penalty item, to penalize the posterior probability of the high-frequency word, to correct the initial necessary causal strength and initial sufficient causal strength of each word, and then determine the necessary causal strength of each word pair in the target event group text and the sufficient causal strength of each word pair in the target event group text.

[0103] In one example, the event pair (rainfall, flood) has strong necessity and weak sufficiency because without rainfall, floods are almost impossible to occur, but even if rainfall occurs, floods will not necessarily occur. In contrast, the event pair (storm, loss) has strong sufficiency and weak necessity because storms almost certainly cause losses, but the storms are not necessarily the cause of the losses.

[0104] In one example, the process of determining the necessary causal strength of each word pair in the target event group text and the sufficient causal strength of each word pair in the target event group text can be expressed as:

[0105] Create a text matching task for the target event group text, with the input being the first event text and the second event text:

[0106]

[0107] Where n is the first event text S 1 The number of words contained, m is the second event text S 2 The number of words contained, For the first paragraph of text S 1 The words in For the second text S 2 The words in .

[0108] From the perspectives of necessity and sufficiency, for word i in the first event text, c and word j in the second event text e , use the following method to calculate the causal strength between two words:

[0109]

[0110]

[0111] Among them, CS nec (i c , j e ) represents the word pair (i c , j e )’s necessary causal strength, CS suf (i c , j e ) represents the word pair (i c , j e ) is sufficient causal strength. Intuitively, the posterior probability P(i c |j e ) is larger, reflecting the stronger necessity of causal relationship; (j e |i c ) is larger, reflecting the sufficiency of the causal relationship. Where is the penalty term coefficient, that is, the preset correction parameter, which is set to 0.66 in this embodiment.

[0112] Among them, the probability values ​​of each item in the above formula can be estimated through statistical information:

[0113]

[0114]

[0115]

[0116] Where f(i c , w e ) is word i c The probability of appearing in the first event text, f(w c , j e ) is the word j e The probability of appearing in the second event text, f(i c , j e ) is the word i obtained by statistics c Appears in the first event text and word j e The probability of appearing in the second event text, W is the set of all words, M and N are normalization coefficients, ensuring that the calculation result satisfies the properties of probability.

[0117] 205. Determine the target causal strength of each word pair based on the necessity causal strength and the sufficiency causal strength of each word pair.

[0118] Exemplarily, the necessity causal strength and the sufficiency causal strength of each word pair are combined to determine the target causal strength of each word pair.

[0119] In an example, the word pair (i c , j e )’s target causal strength CS(i c , j e ) is a combination of its causal strength considering necessity and sufficiency:

[0120] CS(i c , j e )=CS nec (i c , j e ) λ CS suf (i c , j e ) 1-λ #(3-6)

[0121] Among them, CS nec (i c , j e ) represents the word pair (i c , j e )’s necessary causal strength, CS suf (i c , j e ) represents the word pair (i c , j e )’s sufficiency causal strength, CS(i c , j e ) is the target causal strength of the word pair. θ takes the value of 0 or 1.

[0122] 206. Determine the word frequency causal strength information of the target event group text according to the target causal strength of each word pair, wherein the word frequency causal strength information represents the causal strength relationship between the first event text and the second event text determined based on the word probability information.

[0123] Exemplarily, based on the target causal strength of each word pair, the word frequency causal strength information of the target event group text, such as the word frequency causal strength score, is determined, wherein the word frequency causal strength information characterizes the causal strength relationship between the first event text and the second event text determined based on the word probability information.

[0124] In an example, two events S 1 , S 2 The causal strength of is the combination of the target causal strengths of all word pairs in the target event group text:

[0125]

[0126] Among them, CS T (S 1 , S 2 ) is the word frequency causal strength information of the target event group text, S 1 is the first event text, S 2 is the second event text, CS(i c , j e ) is a word pair (i c , j e )’s target causal strength.

[0127] In one example, in the calculation of causal relationship strength, C is the causal relationship strength score between the first event text and the second event text. The value range of C is a real number between 0 and 1. C = 0 means that the event text S 1 There is no causal relationship between S and the event text S, that is, S 1 With S 2 The occurrence of is independent of each other; C = 1 means event S 1 With event S 2 There is a deterministic causal relationship between events S 1 The occurrence is event S 2 Necessary and sufficient conditions for occurrence.

[0128] 207. According to the semantic causal strength information and the word frequency causal strength information, the target causal strength information of the target event group text is determined, and the target causal strength information represents the causal strength relationship between the first event text and the second event text.

[0129] Exemplarily, this step refers to step 103 and will not be described in detail.

[0130] 208. The first event text is a financial cause event text, and the second event text is a financial result event text; a financial event causal graph is generated based on the target causal strength information, wherein the causal graph is used to predict and analyze financial transaction events.

[0131] Exemplarily, the target event group text is a financial event with a causal relationship, that is, the first event text is the financial cause, and the second event text is the financial result event text. A financial event causal graph is generated based on the target causal strength information. The causal graph describes the evolution laws between financial events and the sequence, causal, and hierarchical relationships between events, and can be used to predict and analyze downstream financial transaction events of financial events.

[0132] In this embodiment, the target vector space distance between the first event text and the second event text in the target event group text is optimized through comparative learning, thereby improving the accuracy of the semantic causal strength information of the target event group text; by presetting the correction coefficient, the accuracy of the word frequency causal strength information of the target event group text is improved, thereby comprehensively improving the accuracy of the target causal strength information of the target event group text, and improving the effectiveness and accuracy of the prediction analysis of financial transaction events.

[0133] Figure 3 A structural diagram of a text relationship processing device based on text analysis provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device comprises:

[0134] The acquisition unit 31 is used to acquire the target event group text, which includes a first event text and a second event text, wherein the first event text and the second event text have a causal relationship, the first event text represents the cause event text, and the second event text represents the result event text.

[0135] The first determination unit 32 is used to determine the semantic causal strength information and word frequency causal strength information of the target event group text; wherein the semantic causal strength information represents the causal strength relationship between the first event text and the second event text determined based on the text semantic information, and the word frequency causal strength information represents the causal strength relationship between the first event text and the second event text determined based on the word probability information.

[0136] The second determination unit 33 is used to determine the target causal strength information of the target event group text according to the semantic causal strength information and the word frequency causal strength information, wherein the target causal strength information represents the causal strength relationship between the first event text and the second event text.

[0137] Figure 4 A structural diagram of another text relationship processing device based on text analysis provided in an embodiment of the present application, such as Figure 3 Based on the embodiment shown, Figure 4 As shown, the device comprises:

[0138] In one example, the first determining unit 32 includes:

[0139] The first determination subunit 321 is used to determine the semantic causal strength information of the target event group text based on a contrastive learning method and a preset pre-trained language model.

[0140] The second determining subunit 322 is used to determine the word frequency causal strength information of the target event group text based on the statistical information of the target event group text.

[0141] In an example, the first determining subunit 321 is specifically configured to:

[0142] Based on the contrastive learning method, the target vector space distance between the first event text and the second event text is optimized to determine the optimized target event group text.

[0143] According to the optimized target event group text, the semantic causal strength information is determined.

[0144] In an example, the first determining subunit 321 is further configured to:

[0145] Obtain N other weakly related event texts in the data source that have a weak causal relationship with the first event text, where N is a positive integer greater than or equal to 1.

[0146] Based on the contrastive learning method, the contrastive loss function of the data source is determined according to the target event group text and each weak relationship event text.

[0147] According to the function value of the comparison loss function, the target vector space distance between the first event text and the second event text is optimized, and the optimized target event group text is determined, wherein the function value of the loss function has a positive correlation with the target vector space distance, and the target event group text when the function value reaches the minimum value is the optimal target event group text.

[0148] In an example, the first determining subunit 321 is further configured to:

[0149] Based on a preset pre-trained language model, a feature vector of each word in the optimized target event text is determined, each feature vector is pooled, and a semantic feature vector of the optimized target event text is determined.

[0150] Based on the preset mapping parameters, the semantic feature vector is mapped to determine the semantic causal strength information.

[0151] In one example, the second determining subunit 322 is specifically configured to:

[0152] Based on the statistical probability information of each word in the target event group text, the necessity causal strength of each word pair in the target event group text and the sufficiency causal strength of each word pair in the target event group text are determined.

[0153] According to the necessary causal strength and sufficient causal strength of each word pair, the target causal strength of each word pair is determined.

[0154] According to the target causal strength of each word pair, the word frequency causal strength information of the target event group text is determined.

[0155] In one example, the second determining subunit 322 is further configured to:

[0156] Based on the statistical probability information of each word in the target event group, the initial necessity causal strength of each word pair in the target event group text and the initial sufficiency causal strength of each word pair in the target event group text are determined.

[0157] According to preset correction parameters, the initial necessary causal strength and the initial sufficient causal strength of each word are corrected to determine the necessary causal strength and the sufficient causal strength of each word in the first event text and each word in the second event text.

[0158] In one example, the first event text is a financial cause event text, and the second event text is a financial result event text; the device further includes:

[0159] The processing unit 41 is used to generate a financial event cause and effect graph based on the target causal strength information, wherein the cause and effect graph is used to predict and analyze financial transaction events.

[0160] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device includes: a memory 51 and a processor 52.

[0161] Memory 51: A memory used to store instructions executable by the processor 52.

[0162] The processor 52 is configured to execute the method provided in the above embodiment.

[0163] Figure 6 It is a block diagram of a terminal device according to an exemplary embodiment. The device may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a tablet device, a medical device, a personal digital assistant, etc.

[0164] The device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0165] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0166] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0167] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0168] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0169] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0170] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0171] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800 and the temperature change of the device 800. The sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0172] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0173] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0174] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0175] An embodiment of the present application also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method provided by the above embodiment.

[0176] An embodiment of the present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0177] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0178] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.< / s> < / s> < / s>

Claims

1. A text relationship processing method based on text analysis, characterized in that: The method comprises: Acquire a target event group text, wherein the target event group text includes a first event text and a second event text, wherein the first event text and the second event text have a causal relationship, the first event text represents a cause event text, and the second event text represents a result event text; Determine the semantic causal strength information and word frequency causal strength information of the target event group text; wherein the semantic causal strength information represents the causal strength relationship between the first event text and the second event text determined based on text semantic information, and the word frequency causal strength information represents the causal strength relationship between the first event text and the second event text determined based on word probability information; Determine target causal strength information of the target event group text according to the semantic causal strength information and the word frequency causal strength information, wherein the target causal strength information represents the causal strength relationship between the first event text and the second event text; Determining the semantic causal strength information and word frequency causal strength information of the target event group text includes: Based on a contrastive learning method, optimizing the target vector space distance between the first event text and the second event text, and determining the optimized target event group text; Determining the semantic causal strength information according to the optimized target event group text; Based on the statistical probability information of each word in the target event group text, determining the necessity causal strength of each word pair in the target event group text and the sufficiency causal strength of each word pair in the target event group text; Determine the target causal strength of each word pair according to the necessary causal strength and sufficient causal strength of each word pair; According to the target causal strength of each word pair, the word frequency causal strength information of the target event group text is determined.

2. The method according to claim 1, characterized in that Based on the contrastive learning method, optimizing the target vector space distance between the first event text and the second event text, and determining the optimized target event group text, comprises: Obtaining N other weakly related event texts in the data source that have a weak causal relationship with the first event text, where N is a positive integer greater than or equal to 1; Based on the contrastive learning method, determining the contrastive loss function of the data source according to the target event group text and each weak relationship event text; According to the function value of the contrast loss function, the target vector space distance between the first event text and the second event text is optimized, and the optimized target event group text is determined, wherein the function value of the loss function has a positive correlation with the target vector space distance, and the target event group text when the function value reaches the minimum value is the optimal target event group text.

3. The method according to claim 1, characterized in that Determining the semantic causal strength information according to the optimized target event group text includes: Based on a preset pre-trained language model, determine a feature vector of each word in the optimized target event text, perform pooling processing on each feature vector, and determine a semantic feature vector of the optimized target event text; Based on preset mapping parameters, the semantic feature vector is mapped to determine the semantic causal strength information.

4. The method according to claim 1, characterized in that: Based on the statistical probability information of each word in the target event group text, determining the necessity causal strength of each word pair in the target event group text and the sufficiency causal strength of each word pair in the target event group text, including: Based on the statistical probability information of each word of the target event group, determining the initial necessity causal strength of each word pair in the target event group text and the initial sufficiency causal strength of each word pair in the target event group text; According to preset correction parameters, the initial necessary causal strength and the initial sufficient causal strength of each word are corrected to determine the necessary causal strength and the sufficient causal strength of each word in the first event text and each word in the second event text.

5. The method according to any one of claims 1 to 4, characterized in that: The first event text is a financial cause event text, and the second event text is a financial result event text; the method further includes: A financial event cause-and-effect graph is generated according to the target causal strength information, wherein the cause-and-effect graph is used to perform predictive analysis on financial transaction events.

6. A text relationship processing device based on text analysis, characterized in that: The device comprises: An acquisition unit, configured to acquire a target event group text, wherein the target event group text includes a first event text and a second event text, wherein the first event text and the second event text have a causal relationship, the first event text represents a cause event text, and the second event text represents a result event text; A first determination unit is used to determine the semantic causal strength information and word frequency causal strength information of the target event group text; wherein the semantic causal strength information represents the causal strength relationship between the first event text and the second event text determined based on text semantic information, and the word frequency causal strength information represents the causal strength relationship between the first event text and the second event text determined based on word probability information; A second determining unit is used to determine target causal strength information of the target event group text according to the semantic causal strength information and the word frequency causal strength information, wherein the target causal strength information represents the causal strength relationship between the first event text and the second event text; The second determining unit is specifically configured to: Based on a contrastive learning method, optimizing the target vector space distance between the first event text and the second event text, and determining the optimized target event group text; Determining the semantic causal strength information according to the optimized target event group text; Based on the statistical probability information of each word in the target event group text, determining the necessity causal strength of each word pair in the target event group text and the sufficiency causal strength of each word pair in the target event group text; Determine the target causal strength of each word pair according to the necessary causal strength and sufficient causal strength of each word pair; According to the target causal strength of each word pair, the word frequency causal strength information of the target event group text is determined.

7. An electronic device, characterized in that: The electronic device comprises: a memory and a processor; Memory: used to store instructions executable by the processor; The processor is configured to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.

9. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when being executed by a processor.

Citation Information

Patent Citations

  • System and method for automatic semantic labeling of natural language texts

    CN102439590A

  • Financial event-oriented hybrid causal relationship discovery method

    CN111026852A

  • Literature representation method based on word frequency co-occurrence analysis

    CN111259150A

  • Data processing method and device

    CN113065329A

  • Fusion map construction method and device

    CN113157931A