Information early warning method and device
By constructing a heterogeneous graph structure and training a model, the problem of integrating corporate customer data for banks was solved, the accuracy and timeliness of risk warnings were achieved, and clear decision-making basis was provided, thereby improving the effectiveness of risk prevention and control.
Patent Information
- Application Number
- CN202510989686.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-11-11
AI Technical Summary
Existing technologies struggle to effectively integrate and analyze multi-source heterogeneous data from corporate clients, resulting in insufficient accuracy and timeliness of risk warnings, and traditional models fail to provide clear decision-making support.
By constructing a heterogeneous graph structure, structured and unstructured data are abstracted into nodes and edges. The weights of nodes and edges are generated using heterogeneous convolutional layers and feature masking modules. The prediction model is trained by combining cross-entropy loss and triplet loss functions to show the risk level and transmission path.
It improves the accuracy and timeliness of risk warnings, provides interpretable risk assessment basis, and helps banks quickly locate the source of risk and formulate targeted prevention and control strategies.
Smart Images

Figure CN120931378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to an information early warning method and apparatus. Background Technology
[0002] With the continuous development of the financial market and the intensification of competition, banks' corporate banking business faces increasingly complex risk challenges. Banks' corporate clients span various industries, and their operating conditions, financial status, and market environment are constantly changing, making accurate assessment and early warning of corporate client risks an extremely challenging task.
[0003] In the current wave of fintech, banks have accumulated massive amounts of corporate client data, encompassing both structured and unstructured data such as transaction records, financial statements, corporate relationships, and business registration information. However, effectively integrating and analyzing this multi-source, heterogeneous data to uncover hidden risk information remains a critical challenge that current technologies urgently need to address. Traditional risk warning methods struggle to handle such complex data, failing to comprehensively capture potential risk signals and significantly compromising the accuracy and timeliness of risk identification.
[0004] Furthermore, the increasingly stringent financial regulatory environment demands that banks possess a high degree of interpretability in their risk assessments and early warning results. Banks not only need to accurately identify risks but also clearly understand the causes and influencing factors of those risks in order to take targeted risk control measures and provide reasonable explanations to regulatory agencies. However, many existing risk early warning models are black-box models, failing to intuitively demonstrate the basis for decision-making, severely limiting their effectiveness in practical business operations. Summary of the Invention
[0005] This invention provides an information early warning method and apparatus, which at least solves the problems of low accuracy and timeliness of prediction results and difficulty in providing a basis for prediction results in related technologies.
[0006] According to an embodiment of the present invention, an information early warning method is provided, comprising: acquiring target data and training data; wherein the target data and the training data include: structured data and unstructured data, the structured data and the unstructured data originating from different data sources; abstracting the structured data into nodes and edges, extracting key information from the unstructured data, and integrating the key information into the nodes and edges to construct a heterogeneous graph structure; generating masked nodes, importance weights of node features, masked edges, and criticality weights of edge relationships based on the heterogeneous graph structure; constructing a joint loss function based on a cross-entropy loss function and a triplet loss function; training a prediction model based on the masked nodes, the masked edges, and the joint loss function until the prediction model converges; obtaining a risk level, importance weights of node features, and criticality weights of edge relationships based on the target data using the converged prediction model, and displaying key features based on the importance weights of node features, and displaying the risk transmission path based on the criticality weights of edge relationships.
[0007] According to another embodiment of the present invention, an information early warning device is also provided, comprising: an acquisition module for acquiring target data and training data; wherein the target data and the training data include structured data and unstructured data, the structured data and the unstructured data originating from different data sources; a prediction model for abstracting the structured data into nodes and edges, extracting key information from the unstructured data, and integrating the key information into the nodes and edges to construct a heterogeneous graph structure; and generating masked nodes, importance weights of node features, masked edges, and criticality weights of edge relationships based on the heterogeneous graph structure; and constructing a joint loss function based on a cross-entropy loss function and a triplet loss function; and training the prediction model based on the masked nodes, the masked edges, and the joint loss function until the prediction model converges; and obtaining a risk level, importance weights of node features, and criticality weights of edge relationships based on the target data; wherein the importance weights of node features display key features, and the criticality weights of edge relationships display the risk transmission path.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0009] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0010] According to yet another embodiment of the present invention, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the steps in any of the above method embodiments.
[0011] Through one embodiment of the present invention, firstly, by fusing structured and unstructured data from different data sources, the potential relationships between the data can be fully explored to avoid missing important risk signals. Secondly, during the processing of the target data, the importance weights of the generated node features and the criticality weights of the edge relationships are retained in real time, facilitating the intuitive display of the transmission paths of key features and risks, providing a basis for the risk level generated by the model, thereby improving the credibility and practicality of the prediction model. Therefore, this invention solves the problems of low accuracy and timeliness of prediction results and the difficulty in providing a basis for prediction results in related technologies, thus achieving the effect of improving the accuracy and timeliness of prediction results and providing a basis for prediction results. Attached Figure Description
[0012] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0013] Figure 1 This is a schematic diagram of the structure of a computer terminal for the operation information early warning method according to an embodiment of the present invention;
[0014] Figure 2 This is a flowchart of the information early warning method according to an embodiment of the present invention;
[0015] Figure 3 This is a flowchart of a method for generating masked nodes, node feature importance weights, masked edges, and edge relationship criticality weights based on a heterogeneous graph structure according to an embodiment of the present invention.
[0016] Figure 4 This is a flowchart of a method for constructing a joint loss function based on the cross-entropy loss function and the triplet loss function according to an embodiment of the present invention;
[0017] Figure 5 This is a schematic diagram of the structure of an information early warning device according to an embodiment of the present invention;
[0018] Figure 6This is a framework diagram of the prediction model participating in the above-described information early warning method according to an embodiment of the present invention. Detailed Implementation
[0019] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0021] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking execution on a computer terminal as an example... Figure 1 This is a hardware structure block diagram of the computer terminal used in the embodiments of the method of the present invention. For example... Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0022] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the information warning method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0023] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0024] It should be noted that the following explanation uses the risk warning for corporate bank clients as an example to illustrate the solution of this invention, but the application scenarios of this solution are not limited to this.
[0025] An information early warning method is provided in this embodiment of the invention. Figure 2 This is a flowchart of an information warning method according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes:
[0026] Step S201: Obtain target data and training data; wherein, target data and training data include: structured data and unstructured data, and the structured data and unstructured data come from different data sources;
[0027] Step S202: Abstract structured data into nodes and edges, extract key information from unstructured data, and integrate the key information into nodes and edges to construct a heterogeneous graph structure.
[0028] In one exemplary implementation, multi-source data from corporate bank customers can be constructed into a heterogeneous graph. .in, It is a set of nodes, including enterprise nodes (such as target enterprise, affiliated enterprise) and personnel nodes (legal person of enterprise, senior executive); It is a set of edges, encompassing equity relationships, guarantee relationships, and financial transaction relationships; A collection of node types; This is a set of edge types. Each node... Each edge For example, collecting structured and unstructured data such as financial statements, transaction records, and corporate relationships from corporate clients of banks. Enterprises, legal entities, and related institutions are abstracted as nodes, while equity relationships, guarantee relationships, and financial transactions are abstracted as edges. Natural language processing techniques are used to extract key information from the unstructured data and integrate it into the feature vectors of the corresponding nodes or edges to construct a heterogeneous graph structure.
[0029] Step S203: Generate the importance weights of the masked nodes and node features, the importance weights of the masked edges, and the importance weights of the edge relationships based on the heterogeneous graph structure.
[0030] In one exemplary implementation, for example, a heterogeneous graph is aggregated using a heterogeneous convolutional layer (HGT), and a multi-head attention mechanism is used to capture the complex relationships between different types of nodes and edges. The feature masking module (FNet) generates node feature importance weights based on node features, type encoding, and neighbor aggregation features, and filters features that are critical to risk assessment; the edge masking module (ENet) combines the features and type encodings of source nodes, target nodes, and edges to generate edge relationship criticality weights and identify high-risk transmission paths.
[0031] Step S204: Construct a joint loss function based on the cross-entropy loss function and the triplet loss function;
[0032] Step S205: Train the prediction model based on the masked nodes, masked edges, and joint loss function until the prediction model converges;
[0033] In one exemplary implementation, for example, the masked node and edge features are fused and input into a risk classifier to predict customer risk levels. Classification accuracy is optimized using a cross-entropy loss function, model interpretability is enhanced using a contrastive triplet loss function, and a joint loss function is constructed for backpropagation to update model parameters.
[0034] Step S206: Based on the target data, the risk level, importance weight of node features, and criticality weight of edge relationships are obtained through a converged prediction model. Key features are displayed based on the importance weight of node features, and the risk transmission path is displayed based on the criticality weight of edge relationships.
[0035] In one exemplary implementation, for example, a risk assessment is performed in real time on newly input customer data based on a trained prediction model, and a risk level is output. Simultaneously, based on feature masks and edge mask weights, key features and transmission paths affecting the risk assessment are visualized, providing banks with interpretable risk warning results to support risk prevention and control decisions.
[0036] Through steps S201 to S206, firstly, by fusing structured and unstructured data from different data sources, the potential relationships between data can be fully explored to avoid missing important risk signals. Secondly, during the processing of target data, the importance weights of generated node features and the criticality weights of edge relationships are retained in real time, facilitating a clear visualization of key features and risk transmission paths. This provides a basis for the risk level generated by the model, thereby improving the credibility and practicality of the prediction model. Therefore, this addresses the problems of low accuracy and timeliness of prediction results and the difficulty in providing evidence for predictions in related technologies, thus achieving the effect of improving the accuracy and timeliness of prediction results and providing evidence for them.
[0037] Figure 3 This is a flowchart of a method for generating masked nodes, importance weights of node features, masked edges, and criticality weights of edge relationships based on a heterogeneous graph structure according to an embodiment of the present invention. Figure 3 As shown, in one implementation, the importance weights of the masked nodes and node features, the importance weights of the masked edges, and the criticality weights of the edge relationships are generated based on the heterogeneous graph structure, including:
[0038] Step S301: Feature aggregation of heterogeneous graph structure is performed through heterogeneous convolutional layers to capture the association relationships between different types of nodes and edges;
[0039] In one exemplary implementation, for example, a heterogeneous graph transform (HGT) layer can be used for feature extraction for nodes. In its first Features of the layer Calculated using the following formula:
[0040] ;
[0041] in, , For nodes The set of neighboring nodes; ATTN is the multi-head attention mechanism function used to calculate the attention weights between nodes; The node feature transformation matrix, The edge feature transformation matrix is used to learn parameters through training. This represents matrix multiplication. For nodes In the Features of the layer; For nodes neighboring nodes In the Characteristics of the layer.
[0042] Therefore, heterogeneous convolutional layers can use heterogeneous mutual attention mechanisms to capture complex relationships between different types of nodes and edges, such as mining hidden risk transmission paths in inter-enterprise guarantee relationship networks.
[0043] Step S302: The feature masking learning module generates masked nodes and importance weights of node features to filter key features;
[0044] In one exemplary implementation, for example, a feature mask can be generated by fusing original node features, aggregated features, and node type encoding using a feature mask learning module (FeaturesNetwork, FNet). The formula is as follows:
[0045]
[0046] in, ;[ ] indicates a feature concatenation operation; For nodes Type encoding; It is a multilayer perceptron; The function compresses the output to the (0,1) interval to obtain the importance weights of each feature of the node; the masked node features are... , This is element-wise multiplication; It is a constant.
[0047] Therefore, the feature mask learning module can be used to filter out node features that are important for risk assessment, such as the debt-to-equity ratio and current ratio in corporate financial indicators.
[0048] Step S303: The criticality weights of the masked edges and edge relationships are generated through the edge mask learning module to identify the transmission path of risk.
[0049] In one exemplary implementation, for example, an edge mask can be generated by combining source node features, target node features, and edge type encoding using an edge mask learning module (Edge Attention Network, ENet). The formula is as follows:
[0050] ;
[0051] in, For the edge Type encoding; edge features after masking are It is used to identify edge relationships that are key to risk propagation, such as edge relationships involving unusually large fund transactions or edge relationships involving guarantees between high-risk enterprises.
[0052] Figure 4 This is a flowchart of a method for constructing a joint loss function based on the cross-entropy loss function and the triplet loss function according to an embodiment of the present invention, as shown below. Figure 4 As shown, in one implementation, a joint loss function is constructed based on the cross-entropy loss function and the triplet loss function, including:
[0053] Step S401: Construct a cross-entropy loss function based on the classification labels and classification probabilities of the sample data;
[0054] In one implementation, the algorithm formula for constructing the cross-entropy loss function based on the classification labels and classification probabilities of the sample data is as follows:
[0055] ;
[0056] in, For the number of warning categories, The number of samples; For the sample Category Authentic category labels; For the prediction sample Category The probability of; This represents the cross-entropy loss value.
[0057] Step S402: Construct a triplet loss function based on the original node features, the masked node features, and the randomly perturbed node features;
[0058] In one implementation, the algorithm formula for constructing the triplet loss function based on the original node features, the masked node features, and the randomly perturbed node features is as follows:
[0059] ;
[0060] in, The node features after masking; These are the original node features; The node features are those after random perturbation; D is the distance metric function. These are preset boundary hyperparameters; For model prediction functions; This represents the loss value for the triplet.
[0061] Step S403: Perform a weighted average algorithm on the cross-entropy loss function and the triplet loss function to obtain the joint loss function.
[0062] In one implementation, a weighted average algorithm is applied to the cross-entropy loss function and the triplet loss function to obtain the algorithm formula corresponding to the joint loss function:
[0063] ;
[0064] in, This represents the cross-entropy loss value. This is the loss value for the triplet; For balance parameters; This is the combined loss value.
[0065] In summary, in the scenario of early warning for corporate clients of banks, the predictive model can form a complete application chain from data integration and feature extraction to risk decision-making. First, multi-source information such as corporate financial data, transaction records, and equity guarantee relationships are constructed into a heterogeneous graph, and enterprises and legal entities are abstracted as nodes, and business relationships are abstracted as edges, thereby realizing data structuring.
[0066] Secondly, heterogeneous convolutional layers (HGT) are used to aggregate features in graph data, focusing on capturing risk transmission paths such as guarantee chains and fund flows. Through the feature masking module (FNet) and the edge masking module (ENet), key financial indicators (such as debt-to-equity ratio and cash flow) and high-risk edges (such as large abnormal transaction edges and guarantee edges of defaulting enterprises) for risk assessment are selected respectively, generating interpretable feature representations.
[0067] Finally, the model is optimized using a joint loss function. Cross-entropy loss ensures the accuracy of risk classification, while triplet loss enhances interpretability. The model outputs the customer's risk level and visualizes key risk characteristics and transmission paths. For example, if a company triggers an alert due to high debt and guarantees for defaulting companies, it helps banks quickly pinpoint the source of risk and develop targeted prevention and control strategies.
[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by adding necessary general-purpose hardware platforms with the aid of software. Of course, they can also be implemented using hardware, but in many cases, the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0069] This invention also provides an information warning device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The term "module" as used below refers to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0070] Figure 5 This is a schematic diagram of the structure of an information early warning device according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes:
[0071] The acquisition module 51 is used to acquire target data and training data; wherein, the target data and training data include: structured data and unstructured data, and the structured data and unstructured data come from different data sources;
[0072] Prediction model 52 is used to abstract structured data into nodes and edges, extract key information from unstructured data, and integrate the key information into nodes and edges to construct a heterogeneous graph structure.
[0073] In addition, based on the heterogeneous graph structure, the importance weights of the nodes after the mask is generated, the importance weights of the node features, the importance weights of the edges after the mask, and the importance weights of the edge relationships;
[0074] Furthermore, a joint loss function is constructed based on the cross-entropy loss function and the triplet loss function;
[0075] Furthermore, the prediction model is trained based on the masked nodes, masked edges, and joint loss function until the prediction model converges;
[0076] Furthermore, based on the target data, the risk level, the importance weight of node features, and the criticality weight of edge relationships are obtained; among them, the importance weight based on node features displays key features, and the criticality weight based on edge relationships displays the transmission path of risk.
[0077] In one implementation, the prediction model 52 is also used to: perform feature aggregation on the heterogeneous graph structure through heterogeneous convolutional layers to capture the association relationships between different types of nodes and edges;
[0078] Additionally, the feature masking learning module generates masked nodes and importance weights for node features to filter key features;
[0079] Additionally, the criticality weights of masked edges and edge relationships are generated through the edge masking learning module to identify the transmission paths of risks.
[0080] In one implementation, the prediction model 52 is also used to: construct a cross-entropy loss function based on the classification labels and classification probabilities of the sample data;
[0081] In one implementation, the algorithm formula for constructing the cross-entropy loss function based on the classification labels and classification probabilities of the sample data is as follows:
[0082] ;
[0083] in, For the number of warning categories, The number of samples; For the sample Category Authentic category labels; For the prediction sample Category The probability of; This represents the cross-entropy loss value.
[0084] Furthermore, a triplet loss function is constructed based on the original node features, the masked node features, and the node features after random perturbation;
[0085] In one implementation, the algorithm formula for constructing the triplet loss function based on the original node features, the masked node features, and the randomly perturbed node features is as follows:
[0086] ;
[0087] in, The node features after masking; These are the original node features; The node features are those after random perturbation; D is the distance metric function. These are preset boundary hyperparameters; For model prediction functions; This represents the loss value for the triplet.
[0088] Furthermore, a weighted average algorithm is applied to the cross-entropy loss function and the triplet loss function to obtain the joint loss function.
[0089] In one implementation, a weighted average algorithm is applied to the cross-entropy loss function and the triplet loss function to obtain the algorithm formula corresponding to the joint loss function:
[0090] ;
[0091] in, This represents the cross-entropy loss value. This is the loss value for the triplet; For balance parameters; This is the combined loss value.
[0092] Figure 6 This is a framework diagram of the predictive model participating in the above-described information early warning method according to an embodiment of the present invention, such as... Figure 6 As shown, in one exemplary implementation, the prediction model aggregates heterogeneous graph information using heterogeneous convolutional layers and generates feature embeddings for each node. These feature embeddings, the original features, and the type encoding of each node are concatenated to form the input to a Feature Masking Network (FNet). Edge embeddings consist of the node embeddings at both ends of the edge and are concatenated with the edge type encoding to form the input to an Edge Masking Network (ENet). The feature masks and edge masks learned by the model are further used to reconstruct a weighted heterogeneous graph as input to a Graph Neural Network (GNN) / detection model. Based on the model's output, a contrastive triplet loss function is constructed during training.
[0093] Specifically, a hierarchical contrastive learning framework for heterogeneous graphs is presented. Its core objective is to learn discriminative representations of nodes / edges at different granularities through a three-step strategy of "masking-encoding-contrast". The framework can be broken down into four main stages:
[0094] 1. On the input side: the original heterogeneous graph. Raw Node Features and Raw Edge Features are the unprocessed raw attributes of nodes and edges. Node Type / Edge Type are "type" information specific to the heterogeneous graph, used for subsequent "heterogeneous convolution" and "type-aware masking".
[0095] 2. Mask generation layer: Learnable "interpretive masks".
[0096] The framework trains a masking network for each of the three elements to determine "which information to keep / mask," thereby constructing a comparison view.
[0097]
[0098] 3. Encoding Layer: Heterogeneous convolution + hierarchical feedforward network. After obtaining the mask, the actual representation learning stage begins:
[0099] Heterogeneous Convolution Layer: Uses different weight matrices for different types of nodes / edges to achieve "aggregation within the same type and differentiation between different types". Outputs node / edge features after masking.
[0100] FNet1 / FNet2 / FNet3: Three sequential feedforward sub-networks (LayerBlocks) that progressively refine higher-order semantics. Among them, FNet2 is reused with shared parameters to reduce the number of parameters and enhance cross-layer consistency.
[0101] Enet: An encoder specifically designed for edge representation, which also utilizes edge features filtered by the Edge Mask. It outputs low-dimensional edge embeddings for subsequent edge-level comparisons.
[0102] 4. Comparative learning: triplet loss + weighted heterogeneous graph.
[0103] Contrasting Triplet: The framework constructs triples ⟨anchor, positive, negative> for “node-node” or “node-edge” pairs, and learns discriminative representations by maximizing the distance between positive and negative sample pairs.
[0104] Weighted Heterograph: When calculating the contrastive loss, the weights s3 obtained from the Edge Mask are incorporated into the heterogeneous graph as "soft weights," making important edges contribute more to the loss and weakening noisy edges.
[0105] Concatenate / Dot Product: Concatenates or doest-products the node and edge representations to generate a joint representation that is ultimately used for triplet loss.
[0106] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0107] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0108] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0109] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0110] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0111] Embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0112] Specific examples in the embodiments of the present invention can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0113] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0114] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An information early warning method, characterized in that, include: Acquire target data and training data; wherein the target data and the training data include: structured data and unstructured data, and the structured data and the unstructured data come from different data sources; The structured data is abstracted into nodes and edges, key information of the unstructured data is extracted, and the key information is integrated into the nodes and edges to construct a heterogeneous graph structure. Based on the heterogeneous graph structure, the importance weights of the masked nodes and node features, the importance weights of the masked edges and edge relationships are generated. Construct a joint loss function based on the cross-entropy loss function and the triplet loss function; The prediction model is trained based on the nodes behind the mask, the edges behind the mask, and the joint loss function until the prediction model converges. The convergent prediction model obtains the risk level, importance weight of node features, and criticality weight of edge relationships based on the target data. It then displays key features based on the importance weight of node features and displays the risk transmission path based on the criticality weight of edge relationships.
2. The method according to claim 1, characterized in that, Based on the heterogeneous graph structure, the importance weights of the masked nodes and node features, and the criticality weights of the masked edges and edge relationships are generated, including: The heterogeneous graph structure is subjected to feature aggregation through heterogeneous convolutional layers to capture the association relationships between different types of nodes and edges; The feature masking learning module generates masked nodes and importance weights for node features to filter key features. The criticality weights of masked edges and edge relationships are generated through the edge masking learning module to identify the transmission path of risk.
3. The method according to claim 1, characterized in that, A joint loss function is constructed based on the cross-entropy loss function and the triplet loss function, including: Construct a cross-entropy loss function based on the classification labels and classification probabilities of the sample data; A triplet loss function is constructed based on the original node features, the masked node features, and the node features after random perturbation. The cross-entropy loss function and the triplet loss function are processed by a weighted average algorithm to obtain the joint loss function.
4. The method according to claim 3, characterized in that, The algorithm formula corresponding to the cross-entropy loss function constructed based on the classification labels and classification probabilities of the sample data is as follows: Where K is the number of warning categories and N is the number of samples; For sample i, it belongs to category Authentic category labels; To predict which category sample i belongs to The probability of L; ce This represents the cross-entropy loss value.
5. The method according to claim 3, characterized in that, The algorithm formula for constructing the triplet loss function based on the original node features, the masked node features, and the randomly perturbed node features is as follows: in, The node features after masking; These are the original node features; γ represents the node features after random perturbation; D is the distance metric function; γ is the preset boundary hyperparameter. For model prediction functions; This represents the loss value for the triplet.
6. The method according to claim 3, characterized in that, The weighted average algorithm is applied to the cross-entropy loss function and the triplet loss function to obtain the algorithm formula corresponding to the joint loss function: in, This represents the cross-entropy loss value. λ is the triplet loss value; λ is the balance parameter. This is the combined loss value.
7. An information early warning device, characterized in that, include: An acquisition module is used to acquire target data and training data; wherein the target data and the training data include structured data and unstructured data, and the structured data and the unstructured data come from different data sources; A predictive model is used to abstract the structured data into nodes and edges, extract key information from the unstructured data, and integrate the key information into the nodes and edges to construct a heterogeneous graph structure. And, based on the heterogeneous graph structure, the importance weights of the masked nodes and node features, the importance weights of the masked edges and edge relationships; Furthermore, a joint loss function is constructed based on the cross-entropy loss function and the triplet loss function; Furthermore, a prediction model is trained based on the nodes behind the mask, the edges behind the mask, and the joint loss function until the prediction model converges; Furthermore, based on the target data, the risk level, the importance weight of node features, and the criticality weight of edge relationships are obtained; wherein, the importance weight of node features displays key features, and the criticality weight of edge relationships displays the risk transmission path.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is executed by a processor to perform the method described in any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method of any one of claims 1 to 6.