Industrial chain risk assessment method and system based on co-occurrence emotion and graph attention
By using co-occurrence emotions and graph attention methods in industrial chain risk assessment, the co-occurrence relationships between enterprises and quantitative market sentiment are extracted, and dynamic evaluation is carried out in combination with graph neural network model, the insufficient consideration of dynamics in the existing technology is solved. and the shortcomings in early risk identification have achieved efficient and accurate risk assessment of the industrial chain.
Patent Information
- Application Number
- CN202411301810.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-02-07
AI Technical Summary
The existing technology lacks solutions for insufficient dynamic considerations and early risk identification in industrial chain risk assessment, resulting in poor timeliness of risk assessment and the inability to identify industrial chain risks in a timely manner.
Using a method based on co-occurrence emotion and graph attention, the co-occurrence relationship between enterprises is extracted through a named entity recognition and association rule mining algorithm, combined with emotion analysis technology to quantify market sentiment, and the graph attention mechanism is used to integrate multi-dimensional features and co-occurrence emotion. Score, the risk embedding representation of the calculation node, and the dynamic industrial chain risk assessment is finally carried out through the graph neural network model.
It has achieved early warning and accurate identification of risks in the industrial chain, improved the timeliness and accuracy of risk assessment, and can dynamically adjust the evaluation methods to avoid lag in strategy selection.
Smart Images

Figure CN119398486A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial chain risk assessment, and specifically, to an industrial chain risk assessment method and system based on co-occurrence sentiment and graph attention. Background Art
[0002] Early research on industrial chain risk assessment is relatively small and not in-depth, and focuses on concept clarification and qualitative analysis. At the same time, there are relatively few quantitative assessment methods for industrial chain risks, and most of them are from the perspective of supply chain management. The research methods are not applicable to industrial chain research.
[0003] With the development of artificial intelligence technology, in recent years, researchers have noticed that graph deep learning technology can solve the problem of industrial chain risk assessment very well. Chinese patent number CN117236698A, patent name: "Industrial chain risk assessment model method and medium based on graph neural network", Chinese patent number CN117333017A, patent name: "Industrial chain risk assessment and prediction model method and medium based on HKTGNN", Chinese patent number CN202410340914.6, patent name "A graph neural network industrial chain risk assessment method" all record the method of applying graph deep learning technology to industrial chain risk assessment. This type of method depicts the various complex relationships of the industrial chain and completes the industrial chain risk assessment by combining graph deep learning methods, taking into account the infectiousness, diversity and complexity of industrial chain risks, but lacks consideration of the dynamic nature of industrial chain risks, and only stays at the static assessment work of industrial chain risks at a certain point in time, and cannot solve the timeliness problem of industrial chain risk assessment.
[0004] The dynamic characteristics of the industrial chain refer to the fact that the risks of the industrial chain change with the changes in the internal and external environment of the industrial chain, and are time-sensitive. This requires us to dynamically adjust the assessment methods of industrial chain risks to avoid lagging or outdated strategic choices. There are also attempts to use historical financial data of each quarter and combine it with long-term and short-term memory models to solve the problem of dynamic assessment of industrial chain risks. However, financial data is often lagging and is only published once a quarter. It can only solve scenarios that require periodic or regular industrial chain risk assessment. Although it can solve the dynamic problem of industrial chain risk assessment to a certain extent, it still faces serious time lags and cannot identify industrial chain risks in a timely and early manner. Therefore, industrial chain risk assessment urgently needs to further develop quantitative methods that can reflect risk changes in real time to achieve early risk identification and efficient management. Summary of the invention
[0005] The purpose of the present invention is to provide an industrial chain risk assessment method and system based on co-occurrence sentiment and graph attention, which is used to solve the problems of insufficient consideration of dynamics and difficulty in early risk identification in the existing industrial chain risk assessment in the prior art; the method uses named entity recognition technology and association rule mining algorithm to extract and strengthen the co-occurrence relationship between enterprises, combines sentiment analysis technology to quantify market sentiment, and uses graph attention mechanism to fuse multi-dimensional features and co-occurrence sentiment scores to calculate the risk embedding representation of nodes, and finally performs dynamic industrial chain risk assessment through a graph neural network model to achieve early warning and accurate identification of industrial chain risks.
[0006] The present invention solves the above problems through the following technical solutions:
[0007] A dynamic industry chain risk assessment method based on co-occurrence sentiment and graph attention, including:
[0008] Step A, generating a co-occurrence relationship graph;
[0009] Obtain the original news text data of all companies in the industrial chain and perform data cleaning to obtain all news text data of companies in the industrial chain to be studied in a specified time period;
[0010] Use named entity models to identify all company entities in the industry chain in news text data;
[0011] Extract co-occurrence relationships and construct a co-occurrence relationship matrix to record the co-occurrence frequency between companies; generate company pairs with strong correlation co-occurrence relationships and construct a company strong correlation co-occurrence relationship matrix;
[0012] Based on the strong correlation co-occurrence relationship matrix, a strong correlation co-occurrence relationship graph structure is constructed using graph construction technology;
[0013] Step B: Extract co-occurring emotions;
[0014] Perform sentiment analysis on company entity pairs with strong co-occurrence relationships and obtain sentiment polarity scores to determine sentiment tendencies;
[0015] The co-occurrence sentiment score is obtained by weighted fusion based on the sentiment polarity score and the basic edge weight;
[0016] Step C: Graph embedding based on co-occurrence sentiment;
[0017] The multi-dimensional features of neighbor nodes are aggregated through the graph attention mechanism, and the co-occurrence sentiment score is used as the edge weight of the co-occurrence relationship to calculate the new risk embedding representation of the node, thus obtaining the multi-dimensional feature embedding representation of the enterprise node.
[0018] Step D: Industry chain risk assessment based on attention mechanism;
[0019] The neural network model is combined with the new risk embedding representation adjusted by the co-occurrence sentiment score to perform binary risk classification on the company nodes in the industrial chain, thus realizing the dynamic assessment of the risks in the industrial chain.
[0020] As a further improvement, in step A, the named entity model adopts a rule-based model to identify the company's named entities; the rule-based model identifies the company's named entities, including defining entity features, designing regular expressions, integrating rules and identifying processing;
[0021] When identifying company named entities, it is necessary to define entity features that cover all possible mentions;
[0022] And / or consider the existence of multi-word, repeated, or company names that contain or are contained in Chinese, and ensure that the regular expression can match the entire phrase;
[0023] And / or when integrating rules and recognition processing, the regular expression rules are integrated into a rule set so that multiple patterns can be matched at one time, and the rule set is used to recognize named entities, and then the matching results are post-processed to obtain a list of recognized company names.
[0024] As a further improvement, the co-occurrence frequency is determined by defining a co-occurrence window and calculating the number of co-occurring company entities within the co-occurrence window;
[0025] The strongly correlated co-occurrence relationship company pairs are generated using an association rule mining algorithm; and the strongly correlated co-occurrence relationship satisfies the strong association rule with minimum support and minimum confidence thresholds.
[0026] As a further improvement, the calculation formula of the support is:
[0027]
[0028] The confidence calculation formula is:
[0029]
[0030] Among them, co-occurrence frequency (A∩B) represents the number of times company A and company B appear together in the document; co-occurrence frequency (A) represents the number of times company A appears in the document; support (A→B) represents the support between company A and company B in the document; support (A) represents the support for company A in the document; confidence (A→B) represents the confidence that the rule predicts that the consequent company B is true when the premise company A is given in the rule A→B.
[0031] As a further improvement, based on the strong correlation co-occurrence relationship matrix, a strong correlation co-occurrence relationship graph structure is constructed using a graph construction technology; including constructing an adjacency matrix W of the graph according to the strong correlation co-occurrence relationship matrix, defining nodes and edges, and constructing a graph structure using the defined nodes and edges;
[0032] The graph structure is constructed by defining nodes and edges, and the adjacency matrix W is used to construct an undirected graph G = (V, E 1 ,W), where V represents a node, representing a company; E 1 represents an edge, representing a co-occurrence relationship;
[0033] Calculate the edge weight W of the co-occurrence relationship ij , used to reflect the strength of the side relationship and the intensity of the risk transfer relationship between companies;
[0034] W ij =α·support({i,j})+β·confidence(i→j)+γ·confidence(j→i);
[0035] Among them, i and j represent nodes and companies; W ij represents the edge weight between company i and company j. If W ij >0, there is an edge between company i and company j; α, β and γ are weight coefficients that balance the importance of support and confidence; confidence(i→j) means that given rule i→j, it measures the confidence that the rule predicts that the consequent j is true when the premise i is given; confidence(j→i) means that given rule i→j, it measures the confidence that the premise i appears when the consequent j appears.
[0036] As a further improvement, in step B, sentiment analysis is to use the trained sentiment analysis model to obtain sentiment polarity scores for each pair of strongly co-occurring company entities, and convert the sentiment polarity scores output by the sentiment analysis model into co-occurrence sentiment scores between [0, 1], and the calculation formula is as follows:
[0037]
[0038] Among them, Sent ij is the co-occurrence sentiment score matrix, P(e i ,e j ,t) is the corporate entity's i ,e j ) is the sentiment polarity score in text t, f(t) is the feature vector of text t, θ is the weight parameter of the sentiment analysis model, is the bias term and σ is the activation function used to map the output to the range [0,1].
[0039] As a further improvement, in step B, the co-occurrence sentiment score is obtained by weighted fusion combined with the basic edge weights, and the calculation formula is as follows:
[0040] W i ' j =W ij ·Sent ij ;
[0041] Among them, W i ' j represents the co-occurrence sentiment score of companies i and j; W ij represents the edge weight between company i and company j; Sent ij is the co-occurrence sentiment score matrix.
[0042] As a further improvement, in step C, the specific method includes:
[0043] Initialize a feature vector for each node i As risk embedding features, and using a learnable weight matrix W (l) Apply a shared linear transformation to each node to get the risk embedding representation
[0044] Then calculate the pairwise unstandardized attention scores between two neighbor nodes and normalize them using the softmax function to get the attention scores between the nodes;
[0045] The co-occurrence sentiment score and attention score are combined to calculate the new risk embedding representation of node i.
[0046] As a further improvement, in step D, the binary risk classification is as follows: the nonlinear activation function LeakyReLU is used to enhance the model's expressiveness, and the binary classification model is used to embed the new risk representation. Perform node risk assessment and output the final risk classification result R i , that is, high risk and low risk.
[0047] The present invention also solves the above-mentioned problem through the following technical solutions:
[0048] The dynamic industrial chain risk assessment system based on co-occurrence emotion and graph attention includes a graph generation module, a sentiment extraction module, a graph embedding module and an industrial chain risk assessment module which are connected in sequence.
[0049] The graph generation module is used to extract the co-occurrence relationship between enterprises from the co-occurrence news text data using named entity recognition technology, further identify the strong correlation co-occurrence relationship using the association rule mining algorithm, and calculate the basic edge weights based on the support and confidence. These strong correlation co-occurrence relationships are constructed into a weighted strong correlation co-occurrence relationship graph structure to achieve the learning expression of the co-occurrence relationship of enterprise nodes in the industrial chain;
[0050] The sentiment extraction module is used to quantify the sentiment tendency under the constraint of the strong correlation co-occurrence relationship from the news text of the strong correlation co-occurrence relationship through sentiment analysis technology, and obtain the co-occurrence sentiment score by combining the basic edge weight weighted fusion to realize the calculation of the co-occurrence sentiment score;
[0051] The graph embedding module is used to aggregate the multi-dimensional features of neighbor nodes using the graph attention mechanism, and combines the co-occurrence sentiment score as the edge weight of the co-occurrence relationship to calculate the new risk embedding representation of the node, thereby achieving timely capture of risks;
[0052] The industrial chain risk assessment module is used to perform binary risk classification on industrial chain company nodes using a neural network model combined with a new risk embedding representation adjusted with co-occurrence sentiment scores, to achieve dynamic assessment of industrial chain node risks, and to output risk assessment results.
[0053] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0054] (1) The present invention provides real-time insights into information such as corporate reputation and market sentiment through co-occurrence sentiment analysis, while the graph attention mechanism enhances the identification of key risk propagation paths, thereby improving the sensitivity and accuracy of risk assessment.
[0055] (2) In order to solve the problem that the complex relationships between enterprises in the industrial chain are difficult to represent intuitively, a company relationship graph generation module is designed. The named entity recognition technology is used to extract the co-occurrence relationships between enterprises from the co-occurrence news text data. The association rule mining algorithm is further used to identify the strongly correlated co-occurrence relationships. The basic edge weights are calculated based on the support and confidence. These strongly correlated co-occurrence relationships are constructed into a weighted company homogeneous graph structure, which realizes the learning and expression of the co-occurrence relationships of enterprise nodes in the industrial chain.
[0056] (3) In order to address the problem of lack of consideration of the timeliness of emotions in industrial chain risk assessment, a co-occurrence sentiment extraction module was designed. The sentiment analysis technology was used to quantify the news sentiment tendency under the constraints of the strong co-occurrence relationship from the news text with strong co-occurrence relationship, and the co-occurrence sentiment score was obtained by combining the basic edge weights for weighted fusion, thereby achieving efficient calculation of the co-occurrence sentiment score.
[0057] (4) To address the problem that traditional graph embedding methods cannot effectively integrate structural and sentiment information, a co-occurrence sentiment-based graph embedding module is designed. The graph attention mechanism is used to aggregate neighbor node features, and the co-occurrence sentiment score is used as the edge weight of the co-occurrence relationship to calculate the risk embedding representation of the node, thereby achieving timely capture of risks.
[0058] (5) To address the problem of inaccurate identification of risk propagation paths in industrial chain risk assessment, an industrial chain risk assessment module was designed. The risk embedding representation adjusted by co-occurrence sentiment scores was used to perform binary risk classification on industrial chain company nodes, thus realizing dynamic assessment of industrial chain node risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 This is a flow chart of the industrial chain risk assessment method based on co-occurrence sentiment and graph attention of the present invention.
[0060] Figure 2 This is a schematic diagram of the structure of the industrial chain risk assessment system based on co-occurrence emotions and graph attention of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below in conjunction with the drawings in the preferred embodiments of the present application. In the drawings, the same or similar reference numerals throughout represent the same or similar parts or parts with the same or similar functions. The described embodiments are part of the embodiments of the present application, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0062] A dynamic industrial chain risk assessment method and system based on co-occurrence sentiment and graph attention is proposed. First, based on named entity recognition technology and association rule mining algorithm, a co-occurrence relationship graph generation module is designed. Named entity recognition technology is used to extract co-occurrence relationships between enterprises from co-occurrence news text data. The association rule mining algorithm is further used to identify strong co-occurrence relationships, and the basic edge weights based on support and confidence calculations are combined to construct a company homogeneous graph structure, realizing a structured and efficient representation of industrial chain enterprise relationships. At the same time, based on the sentiment analysis technology of news text, a co-occurrence sentiment extraction module is designed. By quantitatively analyzing the sentiment tendency in the news and combining it with the weighted fusion of the basic edge weights, the sentiment extraction module is obtained. The co-occurrence sentiment score realizes the real-time extraction of the market sentiment of the industrial chain; then based on the graph attention mechanism, combined with the co-occurrence relationship graph structure and the co-linear sentiment score, a co-occurrence sentiment-based graph embedding module is designed. The graph attention mechanism is used to aggregate the multi-dimensional features of neighbor nodes, and the co-occurrence sentiment score is used as the edge weight of the co-occurrence relationship to calculate the risk embedding representation of the node, thereby realizing the multi-dimensional feature embedding representation of the enterprise node; finally, based on the neural network model of graph attention, an industrial chain risk assessment module is designed, which uses the risk embedding representation adjusted by the co-occurrence sentiment score and combines it with the multi-layer graph neural network classification model to perform binary risk classification on the industrial chain company nodes, thereby realizing dynamic assessment of the industrial chain risk.
[0063] The following will be combined Figure 1-2 , a method and system for assessing industrial chain risks based on co-occurrence sentiment and graph attention involved in the embodiments of the present application are described in detail. It is worth noting that the following embodiments are only used to explain the present application and do not constitute a limitation on the present application.
[0064] Embodiment 1:
[0065] Combined with Figure 1 As shown in FIG. 1 , a dynamic industry chain risk assessment method based on co-occurrence sentiment and graph attention includes the following steps:
[0066] Step A, generating a co-occurrence relationship graph;
[0067] A1.1. Obtain the original news text data of all listed companies in the industrial chain and perform data cleaning.
[0068] First, we acquire data by obtaining original news text data from reliable and authoritative data sources. The Wind database collects and organizes all publicly disclosed information of listed companies. Here we can extract the original news text data from the Wind database and perform data preprocessing to remove irrelevant characters, useless tags, special characters, stop words, etc., unify the text format, and finally obtain all news text data of the listed companies in the industrial chain to be studied in a specified time period.
[0069] In particular, the specified time period can be flexibly set according to research needs, and the preferred time period can be the same day, the past week, the past month, the past three months, the past six months, the past year, etc. Here, in order to have enough research samples, news text data for the past year is selected.
[0070] A1.2. Use the named entity model (NER) to identify all listed company entities in the industrial chain.
[0071] All listed company entities involved in the industry chain to be studied in the news text are identified through named entity models (NER). There are many types of named entity models to choose from, including rule-based models, which use predefined rules to identify entities, such as matching specific patterns through regular expressions; models based on traditional machine learning, such as hidden Markov models (HMM): used for sequence prediction problems, including named entity recognition. Conditional random fields (CRF): a sequence model that can take into account the dependencies between labels; models based on deep learning, such as convolutional neural networks (CNN): capturing local features through convolutional layers for entity recognition. Recurrent neural networks (RNN): especially long short-term memory networks (LSTM) and gated recurrent units (GRU), which can process sequence data and capture long-distance dependencies. Bidirectional recurrent neural networks (Bi-LSTM): combining forward and backward information to improve the model's ability to understand context; Transformer-based models, such as BERT: through pre-trained bidirectional representation, BERT has achieved remarkable results on multiple NLP tasks. ERNIE: a model developed by Baidu, a pre-trained model enhanced by knowledge graphs. RoBERTa: Optimized the pre-training process of BERT and improved the model performance. ALBERT: A lightweight BERT that reduces the model size through parameter sharing. There are models based on graph neural networks, Graph Neural Networks (GNN): Utilize graph structures to represent entities and relationships in texts, suitable for complex entity recognition tasks. In order to quickly develop and improve recognition efficiency and control recognition costs, a rule-based model is preferred here to perform named entity recognition. The rule-based named entity recognition includes defining entity features, designing regular expressions, integrating rules, and recognition processing.
[0072] In particular, the defined entity features refer to the fact that the names of listed companies usually have a specific structure, such as suffixes like "Company", "Co., Ltd.", "Group", etc. In addition, a listed company may include a stock code or a stock market abbreviation, such as "SZ:", "SH:", etc. Therefore, when defining entity features, various possible mention methods need to be covered. Among A-share listed companies, the stock code is usually 6 digits. For the Shanghai Stock Exchange, it starts with "60", "688", etc.; for the main board of the Shenzhen Stock Exchange, it starts with "000"; for the small and medium-sized board, it starts with "002"; and for the ChiNext board, it starts with "300". In addition, it may also include the stock short name, stock full name, English full name, English short name, and common name of the corresponding listed company. At the same time, it should also be considered that there may be multi-word, repeated, and inclusive or included company names in Chinese, and it is necessary to ensure that the regular expression can match the entire phrase. According to the rule of giving priority to the main and then the secondary, the matching logic of entity features first uses the stock code / stock short name, then the stock full name / English full name, and finally the feature structure in other special cases. For the sake of simplicity in description, here, the example of using the stock code / stock short name first and then the stock full name / English full name is used for illustration.
[0073] In particular, the regular expression is as follows:
[0074] Rule 1, (60\d{3}|688\d{2}|000\d{3}|002\d{3}|300\d{3})), is used to match the stock code, including the Shanghai Stock Exchange (6-digit numbers starting with 60 or 688), the main board of the Shenzhen Stock Exchange (6-digit numbers starting with 000), the small and medium-sized board (6-digit numbers starting with 002), and the ChiNext board (6-digit numbers starting with 300).
[0075] Rule 2, \b([A-Za-z\s]+(?:[A-Za-z\-\s]+)*)\b, matches the English full name or short name, allowing multiple words with spaces or dashes between words.
[0076] Rule 3, \b([\u4e00-\u9fa5]+(?:[\u4e00-\u9fa5\s]+)*(?:股份有限公司)?)\b, matches the Chinese full name or short name, allowing multiple Chinese characters, possibly followed by the suffix "股份有限公司", with spaces between characters.
[0077] Specifically, the integration rule and recognition process integrate the above regular expression rules into a rule set to simultaneously match multiple patterns at once, namely \b(?:(60\d{3}|688\d{2}|000\d{3}|002\d{3}|300\d{3}))\b|\b([A-Za-z\s]+(?:[A-Za-z\-\s]+)*)\b|\b([\u4e00-\u9fa5]+(?:[\u4e00-
[0078] \u9fa5\s]+)*(?:股份有限公司)?)\b, and use this rule set to identify named entities, and then further post-process the matching results, such as eliminating ambiguities, merging entities with the same name, etc. Finally, a list of recognized listed company names is obtained.
[0079] A1.3. Extract co-occurrence relationships, construct a co-occurrence relationship matrix, and use an association rule mining algorithm to generate strongly associated co-occurrence relationship company pairs to construct a company strong co-occurrence relationship matrix.
[0080] The extraction of the co-occurrence relationship and the construction of the co-occurrence matrix create a co-occurrence matrix to record the co-occurrence frequencies between listed companies. Let E be the co-occurrence matrix, with a size of N×N, where N is the number of listed company entities, and E[i][j] represents the co-occurrence frequency between listed company i and listed company j. Initially, all elements are set to 0. For each news article, extract the set of listed companies in it, and for each pair of listed companies mentioned in each news report, update the corresponding element in the co-occurrence matrix. Traverse the pair of listed companies (i,j) in each news article. If i and j appear in news article k at the same time, then perform the update: E[j][i] = E[j][i] + 1.
[0081] Optionally, the calculation of the co-occurrence frequency can also define a co-occurrence window (such as a sentence or a paragraph), and only need to calculate the entity pairs that co-occur within this window. If two companies, entity A and entity B, appear in the same window, they are considered to co-occur.
[0082] In particular, the use of association rule mining algorithms to further clean and filter the co-occurrence relationship matrix means that in the context of news about listed companies, each transaction can be a news article, and the items contained in the transaction are listed company entities mentioned in the article. The association rule mining algorithm can identify frequently occurring company pair patterns, that is, the co-occurrence relationship of the strong association rules that meet the minimum support and minimum confidence thresholds is the strong association co-occurrence relationship required for research, because companies A and B appear together once or twice, which may not indicate that they have close ties or cooperation in certain business areas. However, if it is found that companies A and B often appear together frequently, it indicates that they may have close ties in certain business areas. This relationship may be a competitive or cooperative relationship, an investment relationship, or other relationships.
[0083] The calculation formula of the support is:
[0084]
[0085] The confidence calculation formula is:
[0086]
[0087] Among them, co-occurrence frequency (A∩B) represents the number of times company A and company B appear together in the document; co-occurrence frequency (A) represents the number of times company A appears in the document; support (A→B) represents the support between company A and company B in the document; support (A) represents the support for company A in the document; confidence (A→B) represents the confidence that the rule predicts that the consequent company B is true when the premise company A is given in the rule A→B.
[0088] The association rule mining algorithms include Apriori algorithm, FP-Growth algorithm, Eclat algorithm, Association Rule Mining algorithm, CARMA algorithm, DHP algorithm and LCM algorithm, among which Apriori algorithm can be preferred because of its intuitiveness and easy understanding.
[0089] Optionally, to further illustrate how to mine strong co-occurrence relationships, assume that we have the following news articles as input data: Article 1: mentions Company A and Company B; Article 2: mentions Company A and Company C; Article 3: mentions Company B and Company C; Article 4, mentions Company A and Company B.
[0090] 1.31) Generate transaction data set
[0091] 1. Transaction 1: {A, B};
[0092] 2. Transaction 2: {A, C};
[0093] 3. Transaction 3: {B, C};
[0094] 4. Transaction 4: {A, B};
[0095] 1.32) Find frequent itemsets and set the minimum support to 0.25, which means that it appears in at least one of the four transactions. Based on this minimum support, we can find the following frequent itemsets:
[0096] {A} appears in transaction 1, transaction 2, and transaction 4, a total of 3 times.
[0097] {B} appears in transaction 1, transaction 3, and transaction 4, a total of 3 times.
[0098] {C} appears twice in transaction 2 and transaction 3.
[0099] {A,B} appears twice in transaction 1 and transaction 4.
[0100] {A,C} appears once in transaction 2.
[0101] {B,C} appears once in transaction 3.
[0102] {A,B,C} never appears.
[0103] 1.33) Generate association rules and calculate their support and confidence:
[0104] Rule 1: A→B, support({A,B})=2 / 4=0.5, confidence=support({A,
[0105] B}) / support({A})=0.5 / (3 / 4)=2 / 3≈0.667;
[0106] Rule 2: B→A, support({A,B})=2 / 4=0.5, confidence=support({A,
[0107] B}) / support({B})=0.5 / 3 / 4=2 / 3≈0.667;
[0108] Rule 3: A→C, support({A,C})=1 / 4, confidence=support({A,C}) /
[0109] Support ({A}) = 1 / 4 / 3 / 4 = 1 / 3 ≈ 0.333;
[0110] Rule 4: C→A, support({A,C})=1 / 4, confidence=support({A,C}) /
[0111] Support ({C}) = 1 / 4 / 2 / 4 = 1 / 2 = 0.5;
[0112] Rule 5: B→C, support({B,C})=1 / 4, confidence=support({B,C}) /
[0113] Support ({B}) = 1 / 4 / 3 / 4 = 1 / 3 ≈ 0.333;
[0114] Rule 6: C→B, support({B,C})=1 / 4, confidence=support({B,C}) /
[0115] Support ({C}) = 1 / 4 / 2 / 4 = 1 / 2 = 0.5;
[0116] 1.34) If we set the minimum confidence threshold to 0.5, then only the following rules meet the conditions:
[0117] Rule 1: A→B;
[0118] Rule 2: B → A;
[0119] The confidence of these rules exceeds 0.5, so they can be considered as strong association rules. The confidence of other rules is lower than the threshold, so they are filtered out. At this point, the association rule set under the strong association co-occurrence relationship can be obtained. Based on this, the co-occurrence matrix is filtered and updated to obtain the final strong association co-occurrence relationship matrix E'.
[0120] A1.4. Using graph construction technology, a strong correlation co-occurrence relationship graph structure is constructed based on the strong correlation co-occurrence relationship matrix.
[0121] Using graph network construction technology, the co-occurrence relationship homogeneous graph structure is constructed based on the company's strong correlation co-occurrence relationship matrix E'. This includes: constructing the graph adjacency matrix W according to the co-occurrence relationship matrix, defining nodes and edges, and using the defined nodes and edges to construct the graph structure;
[0122] In particular, the nodes and edges are defined, and a graph is constructed using the nodes and edges, wherein V represents a node, which represents a company; E 1 Denotes an edge, representing a co-occurrence relationship; G denotes a graph. The weighted adjacency matrix is constructed, and the adjacency matrix W of the graph is constructed according to the co-occurrence relationship matrix E'. The graph structure is constructed using the adjacency matrix W to construct an undirected graph G = (V, E 1 ,W).
[0123] In particular, edge weights do not use co-occurrence frequency, but confidence and support to quantify the strength and reliability of co-occurrence relationships, because relying solely on co-occurrence frequency may mistakenly identify accidental and meaningless co-occurrences as important relationships, while support can distinguish the prevalence of item set occurrences, and confidence can distinguish whether such co-occurrences are strong or weak relationships. Therefore, support and confidence can help identify those relationships that are more statistically reliable. Since the value range of support and confidence is [0,1], and combining support and confidence can more comprehensively evaluate the importance and reliability of co-occurrence relationships, avoiding the bias that may be caused by a single indicator, here we combine them as a comprehensive weight as the edge weight W of the co-occurrence relationship. ij , used to reflect the strength of the side relationship and the intensity of the risk transfer relationship between companies;
[0124] W ij =α·support({i,j})+β·confidence(i→j)+γ·confidence(j→i)
[0125] Among them, i and j are nodes, representing companies; α, β and γ are weight coefficients used to balance the importance of support and confidence; support({i,j}) represents the support between company i and company j; confidence(i→j) represents the support between company i and company j; given a rule i→j, i is the antecedent of the rule, j is the consequent, confidence(i→j) represents the conditional probability that a transaction or record containing i also contains j. In other words, it measures the confidence that the rule predicts that the consequent j is true given the antecedent i; confidence(j→i) represents the conditional probability that a transaction or record containing j also contains i. It measures the confidence that the antecedent i appears when the consequent j appears.
[0126] W ij represents the edge weight between company i and company j. If W ij >0, then there is an edge between node i and node j.
[0127] Step B: Extract co-occurring emotions;
[0128] B2.1. Perform sentiment analysis on company entity pairs with strong co-occurrence relationships and obtain sentiment polarity scores to determine sentiment tendencies.
[0129] The sentiment analysis is to use the trained sentiment analysis model to obtain the sentiment polarity score for each pair of strongly co-occurring company entities, and convert the sentiment polarity score output by the model into a co-occurrence sentiment score between [0,1]. The calculation formula is as follows:
[0130]
[0131] Among them, Sent ij is the co-occurrence sentiment score matrix, P(e i ,e j ,t) is the corporate entity's i ,e j ) is the sentiment polarity score in text t, f(t) is the feature vector of text t, θ is the weight parameter of the model, is the bias term, and σ is the activation function, which is used to map the output to the range [0,1]. The activation function can be the sigmoid function, that is:
[0132]
[0133] Here, x represents the input variable of the model.
[0134] B2.2. The co-occurrence sentiment score is obtained by weighted fusion based on the sentiment polarity score and the basic edge weight.
[0135] The calculation formula for the co-occurrence sentiment score obtained by combining the basic edge weights and weighted fusion is as follows:
[0136] W i ' j =W ij ·Sent ij ;
[0137] Among them, W i ' j represents the co-occurrence sentiment score of companies i and j; W ij represents the edge weight between company i and company j; Sent ij is the co-occurrence sentiment score matrix.
[0138] Step C: Graph embedding based on co-occurrence sentiment;
[0139] The multi-dimensional features of neighbor nodes are aggregated through the graph attention mechanism, and the co-occurrence sentiment score is used as the edge weight of the co-occurrence relationship to calculate the new risk embedding representation of the node, thus obtaining the multi-dimensional feature embedding representation of the enterprise node.
[0140] Specific methods include:
[0141] C3.1. Initialize a feature vector for each node and apply a shared linear transformation to each node using a learnable weight matrix.
[0142] The risk embedding representation is first initialized by a feature vector for each node i And use a learnable weight matrix W (l) Apply a shared linear transformation to each node to get the risk embedding representation in, It is a set of node features that can integrate multi-dimensional node attribute features, such as financial features and node structure features, such as degree centrality, betweenness centrality, closeness centrality, K-shell, clustering coefficient, etc.
[0143] Among them, the eigenvector It is a vector composed of a series of fields. At this time, the state is the risk embedding feature that has not been learned.
[0144] C3.2. Calculate the pairwise unnormalized attention scores between two neighbor nodes and normalize them using the softmax function to obtain the attention scores between the nodes.
[0145] Calculate the pairwise unnormalized attention score between two neighbors, where || represents the addition connection operation and LeakyReLU represents the activation function, i.e.:
[0146]
[0147] in, represents the risk embedding representation of node i; represents the risk embedding representation of node j; Represents the transpose of the weight vector, which is used to perform dot product with the concatenated vector; Represents the pairwise unnormalized attention score between two adjacent nodes.
[0148] In order to make the coefficients comparable between different nodes, the softmax function is further used for normalization to obtain the attention score between node i and node j, where N(i) is the set of neighbor nodes of node i, that is:
[0149]
[0150] C3.3. Calculate the risk embedding representation of the node by combining the co-occurrence sentiment score and attention score.
[0151] In particular, combined with the co-occurrence sentiment score W i ' j And the attention score is used to calculate the new risk embedding representation of node i, that is:
[0152]
[0153] Step D: Industry chain risk assessment based on attention mechanism;
[0154] The neural network model is combined with the new risk embedding representation adjusted by the co-occurrence sentiment score to perform binary risk classification on the company nodes in the industrial chain, thus realizing the dynamic assessment of the risks in the industrial chain.
[0155] Specific methods include:
[0156] D4.1. Use the neural network model combined with the new risk embedding representation adjusted by the co-occurrence sentiment score to perform binary risk classification on the company nodes in the industrial chain.
[0157] The binary risk classification is to use the binary classification model to perform node risk assessment on the new risk embedding representation and output the final risk classification result, namely high risk and low risk.
[0158] Among them, the binary classification model can be logistic regression, support vector machine, decision tree, random forest, Bayesian and neural network models, etc. LeakyReLU is a nonlinear activation function used to enhance the expressive power of the model, and MLP is a multi-layer neural network classification model, namely:
[0159]
[0160] Among them, R i Represents the risk classification result.
[0161] In particular, the cross entropy loss for node risk assessment is:
[0162]
[0163] in, is the cross entropy loss function of the node risk assessment module, z i is the label value of the node, z i ′ is the predicted value of the label, and N represents the number of nodes.
[0164] D4.2. Generate risk assessment results and provide real-time early warning and risk management decision support.
[0165] Embodiment 2:
[0166] Combined with Figure 2 As shown, a dynamic industrial chain risk assessment system based on co-occurrence emotion and graph attention is used to implement the dynamic industrial chain risk assessment method based on co-occurrence emotion and graph attention as described in Example 1, which is mainly divided into the following four modules:
[0167] The graph generation module is used to extract the co-occurrence relationship between enterprises from the co-occurrence news text data using named entity recognition technology, further identify the strong co-occurrence relationship using the association rule mining algorithm, and calculate the basic edge weights based on the support and confidence, and construct these strong co-occurrence relationships into a weighted strong co-occurrence relationship graph structure to achieve the learning expression of the co-occurrence relationship of enterprise nodes in the industrial chain; this graph structure will serve as the basis for industrial chain risk assessment and is used to capture the direct and indirect connections between enterprises. By analyzing the co-occurrence of enterprise names in the text, the potential connections and interaction patterns between them can be revealed.
[0168] The sentiment extraction module is used to quantify the news sentiment tendency under the constraints of the strong correlation co-occurrence relationship from the news text with strong correlation co-occurrence relationship through sentiment analysis technology, and obtain the co-occurrence sentiment score by combining the basic edge weight weighted fusion to achieve efficient calculation of the co-occurrence sentiment score; this module is based on identifying the co-occurrence relationship between enterprises and further evaluating the sentiment polarity carried by these co-occurrence relationships, which helps to understand the emotional background of the relationship between enterprises and provide data of the sentiment dimension for subsequent risk assessment.
[0169] The graph embedding module is used to utilize the graph attention mechanism to aggregate neighbor node features, and combine the co-occurrence sentiment score as the edge weight of the co-occurrence relationship to calculate the risk embedding representation of the node, thereby realizing the timely capture of risks; these embedding representations will capture the structural characteristics of the enterprise and information related to sentiment, providing a rich feature basis for industrial chain risk assessment.
[0170] The industrial chain risk assessment module is used to perform binary risk classification on industrial chain company nodes by combining the risk embedding representation adjusted by the co-occurrence sentiment score, realize dynamic assessment of industrial chain node risks, and output risk assessment results. The attention mechanism can enhance the ability of graph neural networks to identify key nodes and risk propagation paths in the industrial chain. By assigning different attention weights between nodes, the model can capture more important risk features and dependencies, thereby improving the accuracy and interpretability of risk assessment.
[0171] Although the present invention is described herein with reference to the illustrative embodiments of the present invention, the above embodiments are only preferred embodiments of the present invention, and the embodiments of the present invention are not limited to the above embodiments. It should be understood that those skilled in the art can design many other modifications and embodiments, which will fall within the scope and spirit of the principles disclosed in this application.
Claims
1. A dynamic industry chain risk assessment method based on co-occurrence sentiment and graph attention, characterized by: include: Step A, generating a co-occurrence relationship graph; Obtain the original news text data of all companies in the industrial chain and perform data cleaning to obtain all news text data of companies in the industrial chain to be studied in a specified time period; Use named entity models to identify all company entities in the industry chain in news text data; Extract co-occurrence relationships and construct a co-occurrence relationship matrix to record the co-occurrence frequency between companies; generate company pairs with strong correlation co-occurrence relationships and construct a company strong correlation co-occurrence relationship matrix; Based on the strong correlation co-occurrence relationship matrix, a strong correlation co-occurrence relationship graph structure is constructed using graph construction technology; Step B: Extract co-occurring emotions; Perform sentiment analysis on company entity pairs with strong co-occurrence relationships and obtain sentiment polarity scores to determine sentiment tendencies; The co-occurrence sentiment score is obtained by weighted fusion based on the sentiment polarity score and the basic edge weight; Step C: Graph embedding based on co-occurrence sentiment; The multi-dimensional features of neighbor nodes are aggregated through the graph attention mechanism, and the co-occurrence sentiment score is used as the edge weight of the co-occurrence relationship to calculate the new risk embedding representation of the node, thus obtaining the multi-dimensional feature embedding representation of the enterprise node. Step D: Industry chain risk assessment based on attention mechanism; The neural network model is combined with the new risk embedding representation adjusted by the co-occurrence sentiment score to perform binary risk classification on the company nodes in the industrial chain, thus realizing the dynamic assessment of the risks in the industrial chain.
2. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 1 is characterized in that: In step A, the named entity model uses a rule-based model to identify the company's named entities; the rule-based model identifies the company's named entities, including defining entity features, designing regular expressions, integrating rules and identifying processing; When identifying company named entities, it is necessary to define entity features that cover all possible mentions; And / or consider the existence of multi-word, repeated, or company names that contain or are contained in Chinese, and ensure that the regular expression can match the entire phrase; And / or when integrating rules and recognition processing, the regular expression rules are integrated into a rule set so as to match multiple patterns at one time, and the rule set is used to recognize named entities, and then the matching results are post-processed to obtain a list of recognized company names.
3. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 1 is characterized in that: The co-occurrence frequency is determined by defining a co-occurrence window and calculating the number of co-occurring company entities within the co-occurrence window; The strongly correlated co-occurrence relationship company pairs are generated using an association rule mining algorithm; and the strongly correlated co-occurrence relationship satisfies the strong association rule with minimum support and minimum confidence thresholds.
4. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 3 is characterized in that: The calculation formula of the support is: The confidence calculation formula is: Among them, co-occurrence frequency (A∩B) represents the number of times company A and company B appear together in the document; co-occurrence frequency (A) represents the number of times company A appears in the document; support (A→B) represents the support between company A and company B in the document; support (A) represents the support for company A in the document; confidence (A→B) represents the confidence that the rule predicts that the consequent company B is true when the premise company A is given in the rule A→B.
5. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 1 is characterized in that: Based on the strong correlation co-occurrence relationship matrix, a strong correlation co-occurrence relationship graph structure is constructed using graph construction technology; It includes constructing an adjacency matrix W of a graph according to a strong correlation co-occurrence relationship matrix, defining nodes and edges, and constructing a graph structure using the defined nodes and edges; The graph structure is constructed by defining nodes and edges, and the adjacency matrix W is used to construct an undirected graph G = (V, E 1 ,W), where V represents a node, representing a company; E 1 represents an edge, representing a co-occurrence relationship; Calculate the edge weight W of the co-occurrence relationship ij , used to reflect the strength of the side relationship and the intensity of the risk transfer relationship between companies; W ij =α·support({i,j})+β·confidence(i→j)+γ·confidence(j→i) Among them, i and j represent nodes and companies; W ij represents the edge weight between company i and company j. If W ij >0, there is an edge between company i and company j; α, β and γ are weight coefficients that balance the importance of support and confidence; confidence(i→j) means that given rule i→j, it measures the confidence that the rule predicts that the consequent j is true when the premise i is given; confidence(j→i) means that given rule i→j, it measures the confidence that the premise i appears when the consequent j appears.
6. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 1 is characterized in that: In step B, sentiment analysis is to use the trained sentiment analysis model to obtain sentiment polarity scores for each pair of strongly co-occurring company entities, and convert the sentiment polarity scores output by the sentiment analysis model into co-occurrence sentiment scores between [0, 1], and the calculation formula is as follows: Among them, Sent ij is the co-occurrence sentiment score matrix, P(e i ,e j ,t) is the corporate entity's i ,e j ) is the sentiment polarity score in text t, f(t) is the feature vector of text t, θ is the weight parameter of the sentiment analysis model, is the bias term and σ is the activation function used to map the output to the range [0,1].
7. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 6 is characterized in that: In step B, the co-occurrence sentiment score is obtained by weighted fusion combined with the basic edge weights, and the calculation formula is as follows: W i ′ j =W ij ·Sent ij ; Among them, W i ′ j represents the co-occurrence sentiment score of companies i and j; W ij represents the edge weight between company i and company j; Sent ij is the co-occurrence sentiment score matrix.
8. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 1 is characterized in that: In the step C, the specific method includes: Initialize a feature vector for each node i As risk embedding features, and using a learnable weight matrix W (l) Apply a shared linear transformation to each node to get the risk embedding representation Then calculate the pairwise unstandardized attention scores between two neighbor nodes and normalize them using the softmax function to get the attention scores between the nodes; The co-occurrence sentiment score and attention score are combined to calculate the new risk embedding representation of node i.
9. The dynamic industrial chain risk assessment method based on co-occurrence sentiment and graph attention according to claim 1 is characterized in that: In step D, the binary risk classification is as follows: the nonlinear activation function LeakyReLU is used to enhance the model's expressive power, and the binary classification model is used to embed the new risk representation Perform node risk assessment and output the final risk classification result R i , that is, high risk and low risk.
10. A dynamic industry chain risk assessment system based on co-occurrence sentiment and graph attention, characterized by: It includes a graph generation module, a sentiment extraction module, a graph embedding module and an industrial chain risk assessment module, which are connected in sequence. The graph generation module is used to extract the co-occurrence relationship between enterprises from the co-occurrence news text data using named entity recognition technology, further identify the strong correlation co-occurrence relationship using the association rule mining algorithm, and calculate the basic edge weights based on the support and confidence. These strong correlation co-occurrence relationships are constructed into a weighted strong correlation co-occurrence relationship graph structure to achieve the learning expression of the co-occurrence relationship of enterprise nodes in the industrial chain; The sentiment extraction module is used to quantify the sentiment tendency under the constraint of the strong correlation co-occurrence relationship from the news text of the strong correlation co-occurrence relationship through sentiment analysis technology, and obtain the co-occurrence sentiment score by combining the basic edge weight weighted fusion to realize the calculation of the co-occurrence sentiment score; The graph embedding module is used to aggregate the multi-dimensional features of neighbor nodes using the graph attention mechanism, and combines the co-occurrence sentiment score as the edge weight of the co-occurrence relationship to calculate the new risk embedding representation of the node, thereby achieving timely capture of risks; The industrial chain risk assessment module is used to perform binary risk classification on industrial chain company nodes using a neural network model combined with a new risk embedding representation adjusted with co-occurrence sentiment scores, to achieve dynamic assessment of industrial chain node risks, and to output risk assessment results.
Citation Information
Patent Citations
Industrial chain risk assessment model and method based on graph neural network, and medium
CN117236698A
Industrial chain risk assessment and prediction model and method based on HKTGNN and medium
CN117333017A
Industrial chain risk assessment method of graph neural network
CN118114989A
Cited By
Text information processing method and device and related equipment
CN120633631A
Sensitive data processing method and system combining privacy score and dynamic threshold
CN121302434A