Risk identification method and device and electronic equipment
By extracting and fusion of target subgraphs in graph structure data, using pre-trained models for risk identification, the problem of large differences in different types of risk identification tasks in graph structure data is solved, and the robustness and efficiency of risk identification are improved.
Patent Information
- Application Number
- CN202411320071.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-10
AI Technical Summary
In risk prevention and control scenarios, different types of risk identification tasks based on graph structure data have great differences, which are difficult to unify, and the existing technology is difficult to effectively solve.
By extracting the first target subgraph of the target transaction subject and building a second target subgraph describing the target task, the fusion graph structure data is used to identify the fusion graph structure data after the fusion process, and different types of risk identification tasks are unified.
It improves the robustness and efficiency of the risk identification process and can effectively perform different types of risk identification tasks for graph structure data.
Smart Images

Figure CN119295079A_ABST
Abstract
Description
Technical Field
[0001] This document belongs to the field of data processing technology, and specifically relates to a method, device and electronic equipment for risk identification. Background Art
[0002] In risk prevention and control scenarios, graph-structured data that does not infringe on users' privacy information is an important modeling data structure, which contains rich information: independent attributes of the subject, the relationship and attributes between subjects, and attributes attached to the relationship.
[0003] The rich information in graph structured data makes different types of risk identification tasks based on graph structured data very different and difficult to unify. Therefore, it is necessary to provide a better risk identification solution to perform different types of risk identification tasks based on graph structured data. Summary of the invention
[0004] The embodiments of this specification provide a method, device and electronic device for risk identification, so as to provide a risk identification solution.
[0005] In a first aspect, an embodiment of the present specification provides a method for risk identification, the method comprising: based on a target transaction subject related to a target task for risk identification, extracting a first target subgraph containing the target transaction subject from graph structure data corresponding to the target task for describing the relationship between transaction subjects; constructing a second target subgraph for describing the target task according to the target task, the second target subgraph comprising a description node and a classification node connected to the description node, the description node representing the task content of the target task, and the classification node representing information on the risk type corresponding to the target task; fusing the first target subgraph and the second target subgraph to obtain fused graph structure data, the fusion processing comprising constructing edges between nodes corresponding to the target transaction subject in the first target subgraph and the description nodes; performing risk identification on the fused graph structure data using a pre-trained risk identification model to obtain a risk identification result corresponding to the target task.
[0006] In a second aspect, an embodiment of the present specification provides a device for risk identification, comprising: a first subgraph module, for extracting a first target subgraph containing a target transaction subject from graph structure data corresponding to the target task for describing the relationship between transaction subjects, based on a target transaction subject related to a target task for risk identification; a second subgraph module, for constructing a second target subgraph for describing the target task according to the target task, the second target subgraph comprising a description node and a classification node connected to the description node, the description node representing the task content of the target task, and the classification node representing information on the risk type corresponding to the target task; a subgraph fusion module, for fusing the first target subgraph and the second target subgraph to obtain fused graph structure data, the fusion processing process comprising constructing edges between nodes corresponding to the target transaction subject in the first target subgraph and the description nodes; a risk identification module, for performing risk identification on the fused graph structure data using a pre-trained risk identification model to obtain a risk identification result corresponding to the target task.
[0007] In a third aspect, an embodiment of the present specification provides an electronic device, which includes: a processor, and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor can: based on a target transaction subject related to a target task for risk identification, extract a first target subgraph containing the target transaction subject from graph structure data corresponding to the target task for describing the relationship between transaction subjects; construct a second target subgraph for describing the target task according to the target task, wherein the second target subgraph includes a description node and a classification node connected to the description node, the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; fuse the first target subgraph and the second target subgraph to obtain fused graph structure data, the fusion processing process including constructing edges between nodes corresponding to the target transaction subject in the first target subgraph and the description nodes; perform risk identification on the fused graph structure data using a pre-trained risk identification model to obtain a risk identification result corresponding to the target task.
[0008] In a fourth aspect, an embodiment of the present specification provides a storage medium for storing a computer program, which can be executed by a processor to implement the following process: based on a target transaction subject related to a target task for risk identification, extract a first target subgraph containing the target transaction subject from the graph structure data corresponding to the target task for describing the relationship between the transaction subjects; construct a second target subgraph for describing the target task according to the target task, wherein the second target subgraph comprises a description node and a classification node connected to the description node, the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; fuse the first target subgraph and the second target subgraph to obtain fused graph structure data, the fusion processing process comprising constructing edges between nodes corresponding to the target transaction subject in the first target subgraph and the description nodes; use a pre-trained risk identification model to perform risk identification on the fused graph structure data to obtain a risk identification result corresponding to the target task.
[0009] In a fifth aspect, an embodiment of the present specification provides a computer program product, comprising a computer program, which implements the following process when executed by a processor: based on a target transaction subject related to a target task for risk identification, extracting a first target subgraph containing the target transaction subject from graph structure data corresponding to the target task for describing the relationship between transaction subjects; constructing a second target subgraph for describing the target task according to the target task, wherein the second target subgraph comprises a description node and a classification node connected to the description node, the description node representing the task content of the target task, and the classification node representing information on the risk type corresponding to the target task; fusing the first target subgraph and the second target subgraph to obtain fused graph structure data, the fusion processing comprising constructing edges between nodes corresponding to the target transaction subject in the first target subgraph and the description nodes; performing risk identification on the fused graph structure data using a pre-trained risk identification model to obtain a risk identification result corresponding to the target task. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0011] Figure 1 It is a flowchart of a risk identification method provided in an embodiment of this specification; Figure 2 This is a schematic diagram of an application scenario of a risk identification method provided in an embodiment of this specification; Figure 3 It is a flowchart of a method for training a risk identification model provided in an embodiment of this specification; Figure 4 It is a schematic diagram of a training process of a risk identification model as a base model provided in an embodiment of this specification; Figure 5 It is a schematic diagram of the structure of a risk identification device provided in an embodiment of this specification; Figure 6 It is a structural diagram of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0012] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this document.
[0013] The terms "first", "second", etc. in the specification and claims of this document are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of this specification can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0014] The risk identification method, device and electronic device provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0015] Figure 1 A method for risk identification provided by an embodiment of the present invention is shown. The method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device, wherein the terminal device may be, for example, a vehicle-mounted terminal or a mobile phone terminal. In other words, the method can be executed by software or hardware installed in the aforementioned electronic device, and the risk identification method includes the following steps: Step S102: Based on the target transaction subject related to the target task for risk identification, extract a first target subgraph including the target transaction subject from the graph structure data corresponding to the target task and used to describe the relationship between the transaction subjects.
[0016] Among them, the target task is a task of risk identification (such as abnormal transaction risk identification, abnormal interaction relationship identification, etc.). The risk type corresponding to the target task is not specifically limited in this specification and can be determined according to actual conditions. The risk type corresponding to the target task can be a known risk type or an unknown risk type.
[0017] In the case of executing a target task based on graph structure data, when the user triggers the execution of the target task, the graph structure data for the target task will be input at the same time. The content of the graph structure data is not specifically limited in this specification and can be determined according to actual conditions. For example, the graph structure data can be a transaction graph, a social graph, a transfer graph, an address book graph, a family relationship graph, etc.
[0018] Graph structure data consists of nodes and edges. In graph structure data, nodes are used to represent transaction subjects, and edges are used to represent the relationship or behavior between transaction subjects corresponding to nodes. Specifically, the information corresponding to nodes can be the basic information of transaction subjects (such as attribute information, registration time, etc.) and business information (industry, income and expenditure information, etc.); the information corresponding to edges can be the relationship and attributes between transaction subjects, such as transactions between users and merchants, interactive social relationships between user subjects, and attributes attached to the relationship, such as the user's behavior before completing the transaction, the frequency of interaction between users, etc.
[0019] The target transaction subject is the transaction subject for which the target task is executed. For example, if the target task is to identify abnormal transaction risks, the target transaction subject may be the object for which abnormal transaction risks need to be identified in the target task; if the target task is to identify abnormal interactive relationships, the target transaction subject may be the two parties with interactive relationships in the target task.
[0020] In the graph structure data, in addition to the nodes corresponding to the target transaction subject, the transaction subject directly or indirectly related to the target transaction subject may also be included. Generally, in the graph structure data, when the path length between a node and the node corresponding to the target transaction subject is larger, the correlation between the transaction subject corresponding to the node and the target transaction subject may be lower, and when the path length between a node and the node corresponding to the target transaction subject is smaller, the correlation between the transaction subject corresponding to the node and the target transaction subject may be higher. In this way, when there are a large number of nodes in the graph structure data, there may be nodes and edges corresponding to the transaction subject with a small correlation with the target transaction subject (specifically, the correlation can be determined in the graph structure data based on the relationship between the path length between the node and the node corresponding to the target transaction subject and the preset threshold) (such as the nodes and edges corresponding to the transaction subject with a large path length between the graph structure data and the target transaction subject). Therefore, in the graph structure data, the first target subgraph can be extracted from the graph structure data with the target transaction subject as the center, so that the first target subgraph is constructed using only the data of the transaction subject closely related to the target transaction subject in the graph structure data, which can improve the efficiency of risk identification.
[0021] Step S104: constructing a second target subgraph for describing the target task according to the target task.
[0022] The second target subgraph includes a description node and a classification node connected to the description node. The description node is used to represent the task content of the target task, and the classification node is used to represent information on the risk type corresponding to the target task.
[0023] As mentioned above, there are large differences between risk identification tasks in risk prevention and control scenarios. Generally, risk identification tasks include three types: node risk prediction tasks, link risk prediction tasks, and graph risk prediction tasks. In one example, corresponding graph structure data (i.e., the second target subgraph) can be constructed for the target task. Specifically, for each target task, a description node can be used to represent the task content. For example, the information corresponding to the description node can be "determine whether the account has abnormal transaction risks" (i.e., node risk prediction tasks), "determine whether the interactive relationship is abnormal" (i.e., link risk prediction tasks), and "determine the type of the organizational structure" (i.e., graph risk prediction tasks).
[0024] The risk types corresponding to the target task can be divided into two categories: binary risk and multi-category risk. For binary risk, the risk type is usually "yes" (i.e., it is determined to be a certain risk type) or "no" (i.e., it is determined not to be a certain risk type). For multi-category tasks, the risk types can include at least three types, among which "no" can be one of the types in the classification results of multi-category tasks.
[0025] In one example, for the risk type corresponding to the target task, a classification node connected to the description node corresponding to the target task can be set, and the information corresponding to the classification node is a description of the above risk type. The classification node, the description node, and the edge between the classification node and the description node constitute the second target subgraph. For example, when the target task is "determine whether the account has abnormal transaction risk", the information corresponding to one of the classification nodes connected to the description node can be "abnormal transaction risk is a bottom line risk,..."; when the target task is "determine whether the interactive relationship is abnormal", the information corresponding to one of the classification nodes connected to the description node can be "mutual assistance in brushing volume relationship, which means that users collude with each other to cheat and create false traffic,...".
[0026] In step S104, a second target subgraph including description nodes and classification nodes is constructed, so that various target tasks input by the user can be represented by description nodes, and the risk categories corresponding to various target tasks can also be represented by classification nodes. Therefore, step S104 unifies the graph tasks of different risk types in risk prevention and control scenarios.
[0027] Step S106: Fusing the first target subgraph and the second target subgraph to obtain fused graph structure data.
[0028] Since risk identification is a target task for the target transaction subject, the first target subgraph and the second target subgraph can be merged in such a way that, on the basis of the first target subgraph and the second target subgraph, edges connecting the nodes corresponding to the target transaction subject and the description nodes are constructed. In this way, through the nodes corresponding to the target transaction subject in the first target subgraph, the description nodes in the second target subgraph can automatically focus on the information related to the target task, thereby realizing risk identification.
[0029] Step S108: Use the pre-trained risk identification model to perform risk identification on the fusion graph structure data to obtain a risk identification result corresponding to the target task.
[0030] Among them, the risk identification model may include a relational graph convolutional network R-GCN structure. The specific structure of the risk identification model is not specifically limited in this specification and can be determined according to actual conditions. The risk identification model can be a model obtained after training based on various types of risk identification tasks. The training process of the risk identification model can refer to the subsequent embodiments and will not be repeated here.
[0031] In the fusion graph structure data, the description node is directly connected to the node corresponding to the target transaction subject, and the description node contains the task content of the target task. In this way, the information of each node and edge in the first transaction subgraph and the information of the description node will be collected by the description node after the message transmission of the relationship graph convolution network in the risk identification model. The information of the description node and the information collected by the description node will reach each classification node after the message transmission of the relationship graph convolution network in the risk identification model. Then, the risk identification model can perform risk identification only through the classification nodes to obtain the risk identification results corresponding to the target task.
[0032] In the embodiment of this specification, a first target subgraph containing the target transaction subject and a second target subgraph describing the target task are first constructed in sequence, and then the pre-trained risk identification model is used to perform risk identification on the fused graph structure data obtained after the fusion processing of the first target subgraph and the second target subgraph. This process proposes a new risk identification method, which unifies different types of risk identification tasks by introducing a second target subgraph containing description nodes and classification nodes to construct fused graph structure data, so that the risk identification model can perform different types of risk identification tasks for graph structure data, thereby improving the robustness of the risk identification process.
[0033] Figure 2 A schematic diagram of the application scenario of a risk identification method is provided, such as Figure 2 As shown, the user sends a service request to the server through a terminal such as a mobile phone. The service request includes: executing the target task of risk identification for the graph structure data provided by the user. After receiving the service request, the server uses the risk identification method in this manual to obtain the risk identification result, and sends the risk identification result to the terminal for the user's reference.
[0034] In one implementation, step S102 may be performed as follows: Step A1, based on the task type of the target task, in the graph structure data corresponding to the target task, determining the path length between the relevant node and the node corresponding to the target transaction subject, wherein the relevant node is a node related to the target task in the graph structure data corresponding to the target task except the node corresponding to the target transaction subject; Step A2: extracting a first target subgraph from the graph structure data corresponding to the target task based on the target transaction subject and the path length.
[0035] Among them, the path length between two nodes can be measured by the minimum number of edges between the two nodes. The first target subgraph can be determined according to the target transaction subject and the preset path length. Specifically, the relevant nodes whose path lengths between the nodes corresponding to the target transaction subject in the graph structure data meet the preset path length (for example, nodes less than or equal to the preset path length) can be used as nodes in the first target subgraph, and the edges between the nodes corresponding to the target transaction subject in the graph structure data and each related node can be used as edges in the first target subgraph.
[0036] As mentioned above, the task type of the target task can be at least one of a node risk prediction task, a link risk prediction task, and a graph risk prediction task, and the number of target transaction entities corresponding to each task type is different. In one implementation, before extracting the first target subgraph from the graph structure data corresponding to the target task, the risk identification method further includes the following steps B1-B2: Step B1, obtaining a task type of a target task from preset task types, where the preset task types include a node prediction task, a link prediction task, and a graph prediction task; Step B2, according to the task type of the target task, determine the target transaction subject from the graph structure data corresponding to the target task.
[0037] The number of target transaction entities matches the task type of the target task. For example, the number of target transaction entities corresponding to the node risk prediction task is usually 1, the number of target transaction entities corresponding to the link risk prediction task is usually 2, and the number of target transaction entities corresponding to the graph risk prediction task is usually the number of nodes in the graph structure data.
[0038] After determining the task type of the target task, the target transaction subject can be determined from the graph structure data according to the task type. For example, for node risk prediction tasks and link risk prediction tasks, the transaction subject represented by the node corresponding to the target task in the graph structure data is the target transaction subject. For graph prediction tasks, the transaction subject corresponding to each node in the graph structure data is the target transaction subject.
[0039] Obviously, the number of target transaction entities will affect the construction strategy of the first target subgraph, and the number of target transaction entities is related to the task type of the target task. In one example, the path length in the construction strategy can be determined based on the task type of the target task, and the path length is used to represent the path length between the relevant nodes in the graph structure data and the nodes corresponding to the target transaction entity. Usually, the path length corresponding to the node risk prediction task and the link risk prediction task is greater than or equal to 1, and the path length corresponding to the graph risk prediction task is equal to 0.
[0040] Furthermore, the first target subgraph can be extracted from the graph structure data with the target transaction subject as the center and the path length as the guide. In one implementation, step A2 can be executed as the following steps C1-C4: Step C1, according to the target transaction subject and the path length, determine the relevant nodes from the graph structure data corresponding to the target task; Step C2, taking the nodes corresponding to the target transaction subject and the related nodes as nodes in the first target subgraph, and taking the edges corresponding to the paths between the nodes corresponding to the target transaction subject and the related nodes as edges in the first target subgraph; Step C3, obtaining target node texts describing nodes in the first target subgraph and target edge texts describing edges in the first target subgraph from the graph structure data corresponding to the target task; Step C4, determining information corresponding to the nodes in the first target subgraph according to the target node text, and determining information corresponding to the edges in the first target subgraph according to the target edge text.
[0041] Specifically, the relevant nodes corresponding to the target transaction subject can be determined from the graph structure data according to the target transaction subject and the path length, and then the architecture of the first target subgraph can be determined based on the target transaction subject and the relevant nodes. Taking the link risk prediction task as an example, this type of task contains two target transaction subjects. Each target transaction subject can be taken as the center and the path length can be used as a guide to determine the relevant nodes corresponding to each target transaction subject from the graph structure data, and then the path between the relevant node and the node corresponding to the target transaction subject can be used as the relevant edge. Further, the relevant nodes and relevant edges determined by the two target transaction subjects are merged to obtain the first target subgraph.
[0042] In addition to using the path length to determine the first target subgraph, the similarity between each node in the graph structure data and the node corresponding to the target transaction subject can also be used to determine the related nodes (specifically, the similarity can be measured by whether the attribute information of the nodes is similar). Specifically, the similarity between each node in the graph structure data and the node corresponding to the target transaction subject can be determined first, and the nodes whose similarity between the nodes corresponding to the target transaction subject in the graph structure data is greater than a preset threshold are taken as related nodes. Furthermore, the edges between the nodes corresponding to the target transaction subject and the related nodes can be taken as the edges in the first target subgraph.
[0043] In the field of risk prevention and control, the nodes in the graph structure data may be subjects such as accounts, merchants, and mini-programs. The relationships represented by the edges in the graph structure data may be relationships such as transactions, transfers, same entities, and social interactions. Different subjects and relationships are heterogeneous. The information corresponding to the description node is the task content, and the information corresponding to the classification node is the risk type information. Both are text information. In order to facilitate the processing of heterogeneous data by the risk identification model, in one example, the information corresponding to the edges and nodes in the first target subgraph can also be set as text information. Specifically, the target node text describing the target node in the first target subgraph can be obtained from the graph structure data corresponding to the target task. The target node text at least includes the information corresponding to the target node in the graph structure data and the information corresponding to the edge between the target node and the neighboring node; the target edge text describing the target edge in the first target subgraph can also be obtained. The target edge text at least includes the information corresponding to the two nodes connected by the target edge in the graph structure data and the information corresponding to the target edge.
[0044] In order to facilitate data processing of the risk identification model and improve the risk identification effect, each target node text can be set to a similar text format, and each target edge text can be set to a similar text format. In one implementation, step C3 can be executed as the following steps D1-D2: Step D1, based on the first conversion template describing the node, obtaining the target node text from the graph structure data corresponding to the target task; Step D2, based on the second conversion template describing the edge, obtain the target edge text from the graph structure data corresponding to the target task.
[0045] Specifically, the preset first conversion template and the second conversion template can be used to obtain target node text and target edge text with similar formats. Examples of the first conversion template and conversion effect for a node are as follows: Template: Node characteristics. <node description>: <node characteristics / content> Example 1: Node characteristics. Account node: (nickname) Zhang Sanfeng, (first attribute information) Zhang San, (second attribute information) 28 years old, (third attribute information) male,... Example 2: Node features. Merchant node: (Merchant name) abc Food Store, (Registration time) 3 years, (Store address) xx Road, xx District, Shanghai, ... In the above template, the text attribute of the node begins with the "node feature" mark to distinguish it from other attributes, followed by a description of the node, including node-related features. The content in brackets is an annotation of the example and is not displayed in the converted text result.
[0046] The following are examples of the second transformation template and transformation effect for edges: Template: Edge feature. <Edge description>: <Edge related features / content> Example 1: Edge features. Transaction relationship: (active party) Mr. A, (passive party) Ms. B, (transaction time) 20240120, (transaction location) xx Road, xx District, Shanghai, (transaction amount) 100 yuan, ... Example 2: Edge features. Social relationship: (active party) Mr. A, (passive party) Ms. B, (time of adding friends) 20240120, (number of interactions) 5 times, ... It can be seen from the above two conversion effects that the use of a unified conversion template can make the format of the information corresponding to each edge in the first target subgraph more consistent, and the format of the information corresponding to each node is also relatively consistent, avoiding the interference of different text formats on the risk identification results, and thus improving the risk identification effect of the risk identification model. In one implementation, step C4 may be performed as the following steps E1-E2: Step E1, using a preset language model to encode the target node text to obtain information corresponding to the node in the first target subgraph; Step E2, using a preset language model to encode the target edge text to obtain information corresponding to the edge in the first target subgraph.
[0047] Specifically, a preset large language model (such as a sentence transformer) can be used to encode the target node text and edge node text in the first target subgraph to obtain a vector corresponding to the target node text and a vector corresponding to the target edge text mapped to the same space, and the vector corresponding to the target node text is used as the information corresponding to the node in the first target subgraph, and the vector corresponding to the target edge text is used as the information corresponding to the edge in the first target subgraph.
[0048] Similarly, in one implementation, step S104 can be executed as the following steps F1-F2: Step F1, obtaining a task description text describing the task content of the target task, and encoding the task description text using a preset language model to obtain information corresponding to a description node in a second target subgraph; Step F2, obtaining a type description text describing the risk type corresponding to the target task, and encoding the type description text using a preset language model to obtain information corresponding to the classification node in the second target subgraph.
[0049] Specifically, after obtaining the task description text corresponding to the description node in the second target subgraph and the type description text corresponding to the classification node from the relevant database or network, the task description text and the type description text can be encoded using the above-mentioned preset large language model to obtain the vector corresponding to the task description text and the vector corresponding to the type description text in the same space, and the vector corresponding to the task description text is used as the information corresponding to the description node, and the vector corresponding to the type description text is used as the information corresponding to the classification node.
[0050] After the above operations, the information corresponding to the edges and nodes in the first target subgraph and the second target subgraph is located in the same space, which can further facilitate the use of heterogeneous data in the graph structure data by the risk identification model.
[0051] The pre-trained risk identification model contains information corresponding to various description nodes and classification nodes. In order to improve the efficiency of risk identification, in one implementation, step S104 can be executed as the following steps G1-G2: Step G1, obtaining the knowledge learned by the pre-trained risk identification model, the knowledge including the sample description node and its corresponding information, the sample classification node and its corresponding information in the sample data; Step G2, obtaining information corresponding to the description node and the classification node in the second target subgraph from the knowledge.
[0052] Specifically, according to the task content of the target task, the description nodes and classification nodes in the second target subgraph can be constructed directly from the description nodes and classification nodes in the knowledge learned by the risk identification model. Then, the information corresponding to the description nodes and classification nodes in the knowledge learned by the risk identification model can be used as the information corresponding to the description nodes and classification nodes in the second target subgraph, which can improve the efficiency of risk identification.
[0053] Figure 3 A method for training a risk identification model provided by an embodiment of the present invention is shown. The method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device, wherein the terminal device may be, for example, a vehicle-mounted terminal or a mobile phone terminal. In other words, the method can be executed by software or hardware installed in the aforementioned electronic device, and the method for training a risk identification model includes the following steps: Step S302: Based on the sample transaction subjects related to the sample tasks for risk identification in the training data, extract a first sample subgraph including the sample transaction subjects from the graph structure data corresponding to the sample tasks.
[0054] Among them, the training data is the data used to train the risk identification model that performs the risk identification task. The training data contains multiple sample tasks, which perform the identification of various types of risks, such as the risk identification of transaction entities (abnormal transaction risks, abnormal interaction relationships, etc.). In the training data, each sample task has corresponding graph structure data. The type of graph structure data is not specifically limited in this specification and can be determined according to actual conditions. Figure 4 A schematic diagram of the training process of the risk identification model as a base model is shown, Figure 4 As shown in the figure, the graph structure data used for training can be a transaction graph, a social graph, a transfer graph, an address book graph, a family relationship graph, etc. Each sample task corresponds to at least one graph structure data.
[0055] The sample transaction subject is the transaction subject for which the sample task performs risk identification. For example, if the sample task is to identify abnormal transaction risks, the sample transaction subject may be the object of abnormal transaction risk identification in the sample task; if the sample task is to identify abnormal interactive relationships, the sample transaction subject may be the two parties with interactive relationships in the sample task.
[0056] In the graph structure data corresponding to the sample task, in addition to the nodes corresponding to the sample transaction subject, the transaction subject directly or indirectly related to the sample transaction subject may also be included. Therefore, when there are a large number of nodes in the graph structure data, there may be nodes and edges corresponding to transaction subjects that are not very related to the sample transaction subject (such as nodes corresponding to transaction subjects with a larger path length between the sample transaction subjects). Therefore, in the graph structure data, the first sample subgraph can be extracted from the graph structure data with the sample transaction subject as the center. In this way, the first sample subgraph is constructed using only the data of transaction subjects closely related to the sample transaction subject in the graph structure data, which can improve the efficiency of risk identification.
[0057] The information corresponding to the nodes and edges in the first sample subgraph can refer to the determination process of the information of the nodes and edges in the first target subgraph mentioned above. Specifically, the first conversion template can be used to convert the attribute information of the nodes and edges in the graph structure data into text information, and all kinds of heterogeneous relationships in the risk prevention and control scenario are converted into text descriptions. Further, Figure 4 As shown in Figure 1, a large language model (LLM) can be used to encode text information to generate a fixed-dimensional representation vector as the information corresponding to the nodes and edges in the first sample subgraph to achieve the unification of the representation space of heterogeneous graph structure data. i and edge ij , the node representation and edge representation can be obtained using the following formula 1.
[0058] x i = LLM ( S vi ), x ij = LLM ( S eij ) (Formula 1) in, S vi is node v i The attribute representation can include the node v in the graph structure data corresponding to the sample task i And the information corresponding to adjacent nodes and adjacent edges, S eij It is edge ij The attribute representation can include the edge e in the graph structure data corresponding to the sample task ij And the information corresponding to adjacent nodes and adjacent edges, LLM ( · ) indicates encoding with a large language model, x i is the encoded node v i The representation vector of x ij The encoded edge e ij The representation vector of .
[0059] Step S304: constructing a second sample subgraph for describing the sample task according to the sample task.
[0060] The second sample subgraph includes a sample description node and a sample classification node connected to the sample description node. The sample description node is used to represent the task content of the sample task, and the sample classification node is used to represent the task type included in the sample task.
[0061] As mentioned above, there are large differences between the tasks in risk prevention and control scenarios. Generally, the tasks in risk prevention and control scenarios include three types: node risk prediction tasks, link risk prediction tasks, and graph risk prediction tasks. In one example, the sample task can be constructed as graph structure data (i.e., the second sample subgraph). Specifically, for each sample task, a description node can be used to describe the task content. For example, the information corresponding to the description node can be "determine whether the account has abnormal transaction risks" (i.e., node risk prediction tasks), "determine whether the interactive relationship is abnormal" (i.e., link risk prediction tasks), and "determine the type of the organizational structure" (i.e., graph risk prediction tasks).
[0062] Sample tasks usually include two types: binary classification tasks and multi-classification tasks. For binary classification tasks, the classification results are usually "yes" (i.e., it is determined to be a certain risk type) or "no" (i.e., it is determined not to be a certain risk type). For multi-classification tasks, the classification results are usually the first classification, the second classification, the third classification, etc. Among them, the classification results of multi-classification tasks can include "no" as one of the types.
[0063] In one example, a classification node connected to the description node corresponding to the sample task can be set for each type in the sample task, and the information corresponding to the classification node is the type description of each classification, and the classification node, the description node, and the edge between the classification node and the description node constitute the second sample subgraph. For example, for the description node whose corresponding information is "determine whether the account has abnormal transaction risk", the information of one of the classification nodes connected to it can be "abnormal transaction risk is a bottom line risk,..."; for the description node whose corresponding information is "determine whether the interactive relationship is abnormal", the information of one of the classification nodes connected to it can be "mutual assistance in brushing volume relationship refers to users colluding with each other to cheat and create false traffic,...".
[0064] In addition to the first conversion template and the second conversion template mentioned above, for description nodes and classification nodes, templates can also be used to limit the information corresponding to description nodes and classification nodes to unify the processing and reading processes of different task types. Examples of conversion templates and conversion effects for description nodes are as follows: Template: Prompt node. <task description> Example 1: Prompt node. (Node classification task) Determine whether the account has abnormal transaction risks.
[0065] Example 2: Prompt node. (Link prediction task) Determine whether the interaction relationship is abnormal.
[0066] The following are examples of conversion templates and conversion effects for classification nodes: Template: Prompt Node. <class description> Example 1: Prompt node. Abnormal transaction risk, abnormal transaction risk is a bottom line risk,… Example 2: Prompt Node. Mutual assistance in brushing volume refers to users colluding with each other to cheat and create fake traffic,… Further, such as Figure 4 As shown, a large language model (LLM) can be used to encode the text information obtained by converting the template to generate a representation vector of fixed dimension as the corresponding information describing the nodes and the classification nodes in the second sample subgraph, so as to achieve the unification of the representation space of heterogeneous graph structure data.
[0067] In step S304, a second sample subgraph including description nodes and classification nodes is constructed, so that various tasks can be described using description nodes, and various categories in various tasks can also be described using classification nodes. This step unifies different types of graph tasks in the field of risk identification.
[0068] Step S306: Fusing the first sample sub-graph and the second sample sub-graph to obtain sample fusion graph structure data.
[0069] Since risk identification is a sample task performed on sample transaction entities, the first sample subgraph and the second sample subgraph can be merged by constructing edges between nodes corresponding to the sample transaction entities and nodes corresponding to the description nodes. In this way, through the nodes corresponding to the sample transaction entities in the first sample subgraph, the description nodes in the second sample subgraph can automatically focus on task-related information.
[0070] Step S308: Use the sample fusion graph structure data corresponding to each sample task to train the risk identification model to obtain a pre-trained risk identification model.
[0071] Specifically, the data of nodes and edges in the fusion graph structure data can be input into the risk identification model to train the risk identification model. Figure 4 As shown, the sample fusion graph structure data obtained by fusing the first sample subgraph and the second sample subgraph is used as the input for training the downstream risk identification model. By training the risk identification model, knowledge is continuously transferred and fused between nodes, so that the classification node can learn its own category information, the task information carried by the description node, and the description information of each node in the first sample subgraph. Finally, the risk identification model can output the node representation of each node in the sample fusion graph structure data. Based on the node representation of the category node, the prediction of the downstream risk task can be realized. The downstream risk task can be a node risk prediction task, a link risk prediction task or a graph risk prediction task.
[0072] When the risk identification model includes the relational graph convolutional network R-GCN structure, the formula for updating the node representation of the network layer is as follows: (Formula 2) in, , W self , W r is a learnable parameter matrix corresponding to self-loops and relations, Represents the node v i Connected first-order neighbors with relationship type r, x ij is the text representation of the edge, x iis the text representation of the node, and h represents the network level.
[0073] It should be understood that when it is necessary to build a risk identification model in a specific field in the field of risk prevention and control, similar to the construction process of the first target subgraph mentioned above, the information of the description nodes and classification nodes determined in the pre-trained risk identification model can be taken out to build a risk identification model for the specific field to improve the model construction speed.
[0074] In the embodiment of this specification, the first sample subgraph containing the sample transaction subject and the second sample subgraph describing the sample task are first constructed in sequence, and then the risk identification model is trained using the sample fusion graph structure data after the fusion of the first sample subgraph and the second sample subgraph. This process proposes a new prompt learning paradigm for the field of risk identification, which unifies different types of risk identification tasks by introducing the second sample subgraph containing sample description nodes and sample classification nodes to construct sample fusion graph structure data, and at the same time improves the ability of the risk identification model as a base model to perform different types of risk identification tasks in graph structure data.
[0075] It should be noted that the method for risk identification provided in the embodiments of this specification may be performed by a risk identification device or a control module in the risk identification device for performing the method for risk identification. In the embodiments of this specification, the method for risk identification performed by a risk identification device is taken as an example to illustrate the risk identification device provided in the embodiments of this specification.
[0076] Figure 5 FIG. 1 is a schematic diagram of the structure of a risk identification device according to an embodiment of the present invention. Figure 5 As shown, the risk identification device 500 includes: A first subgraph module 510 is used to extract a first target subgraph including a target transaction subject from graph structure data corresponding to the target task and used to describe the relationship between the transaction subjects, based on the target transaction subject related to the target task for risk identification; A second subgraph module 520 is used to construct a second target subgraph for describing the target task according to the target task, wherein the second target subgraph includes a description node and a classification node connected to the description node, wherein the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; The subgraph fusion module 530 is used to fuse the first target subgraph and the second target subgraph to obtain fused graph structure data, wherein the fusion process includes constructing edges between nodes corresponding to the target transaction subject in the first target subgraph and the description nodes; The risk identification module 540 is used to use the pre-trained risk identification model to perform risk identification on the fusion graph structure data to obtain a risk identification result corresponding to the target task.
[0077] In one embodiment, the first sub-graph module 510 includes: A path unit, which is used to determine, based on the task type of the target task, the path length between the relevant node and the node corresponding to the target transaction subject in the graph structure data corresponding to the target task, wherein the relevant node is a node related to the target task except the node corresponding to the target transaction subject in the graph structure data corresponding to the target task; The extraction unit is used to extract the first target subgraph from the graph structure data corresponding to the target task based on the target transaction subject and the path length.
[0078] In one embodiment, the risk identification device 500 further includes: A type determination module, used for obtaining a task type of the target task from preset task types before extracting the first target subgraph from the graph structure data corresponding to the target task, wherein the preset task types include a node prediction task, a link prediction task, and a graph prediction task; The subject determination module is used to determine the target transaction subject from the graph structure data corresponding to the target task according to the task type of the target task, and the number of the target transaction subjects matches the task type of the target task.
[0079] In one embodiment, the extraction unit is used to: According to the target transaction subject and path length, determine the relevant nodes from the graph structure data corresponding to the target task; The nodes corresponding to the target transaction subject and the related nodes are used as nodes in the first target subgraph, and the edges corresponding to the paths between the nodes corresponding to the target transaction subject and the related nodes are used as edges in the first target subgraph; Obtaining, from the graph structure data corresponding to the target task, target node text describing the nodes in the first target subgraph and target edge text describing the edges in the first target subgraph; According to the target node text, the information corresponding to the node in the first target subgraph is determined, and according to the target edge text, the information corresponding to the edge in the first target subgraph is determined.
[0080] In one embodiment, obtaining target node text describing nodes in the first target subgraph and target edge text describing edges in the first target subgraph from graph structure data corresponding to the target task includes: Based on the first conversion template describing the node, obtaining the target node text from the graph structure data corresponding to the target task; Based on the second conversion template that describes the edge, the target edge text is obtained from the graph structure data corresponding to the target task.
[0081] In one embodiment, determining information corresponding to a node in the first target subgraph according to the target node text, and determining information corresponding to an edge in the first target subgraph according to the target edge text, includes: Encode the target node text using a preset language model to obtain information corresponding to the node in the first target subgraph; The target edge text is encoded using a preset language model to obtain information corresponding to the edge in the first target subgraph.
[0082] In one embodiment, the second sub-graph module 520 includes: A first encoding unit is used to obtain a task description text describing the task content of the target task, and encode the task description text using a preset language model to obtain information corresponding to a description node in a second target subgraph; The second encoding unit is used to obtain a type description text that describes the risk type corresponding to the target task, and encode the type description text using a preset language model to obtain information corresponding to the classification node in the second target subgraph.
[0083] In one embodiment, the pre-training process of the risk identification model includes: Based on sample transaction subjects related to sample tasks for risk identification in training data, extracting a first sample subgraph including the sample transaction subjects from graph structure data corresponding to the sample tasks, wherein the training data includes sample tasks for identifying multiple types of risks; According to the sample task, a second sample subgraph for describing the sample task is constructed, wherein the second sample subgraph includes a sample description node and a sample classification node connected to the sample description node, wherein the sample description node represents the task content of the sample task, and the sample classification node represents information on the risk type corresponding to the sample task; The first sample subgraph and the second sample subgraph are fused to obtain sample fusion graph structure data, wherein the fusion process includes constructing an edge between a node corresponding to a sample transaction subject and a sample description node in the first sample subgraph; The risk identification model is trained using the sample fusion graph structure data corresponding to each sample task to obtain a pre-trained risk identification model.
[0084] It should be noted that the embodiments of the risk identification device in this specification and the embodiments of the risk identification method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding risk identification method mentioned above, and the repeated parts will not be repeated.
[0085] Each module in the above risk identification device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the terminal device or the processor on the server in the form of hardware, or can be stored in the memory in the terminal device or the memory on the server in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0086] Furthermore, corresponding to the risk identification method described above, based on the same technical concept, one or more embodiments of this specification also provide an electronic device, which is used to execute the risk identification method described above. Figure 6 A schematic diagram of the structure of an electronic device provided for one or more embodiments of this specification.
[0087] Based on the same idea, one or more embodiments of this specification also provide an electronic device, such as Figure 6 As shown. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, and the memory 602 may store one or more storage applications or data. Among them, the memory 602 can be a short-term storage or a persistent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 601 can be configured to communicate with the memory 602 to execute a series of computer executable instructions in the memory 602 on the electronic device. The electronic device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input and output interfaces 605, and one or more keyboards 606.
[0088] In a specific embodiment, the electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the electronic device, and the one or more programs configured to be executed by one or more processors include the following computer executable instructions: Based on a target transaction subject related to a target task for risk identification, extracting a first target subgraph including the target transaction subject from graph structure data corresponding to the target task and used to describe the relationship between the transaction subjects; According to the target task, a second target subgraph for describing the target task is constructed, wherein the second target subgraph includes a description node and a classification node connected to the description node, wherein the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; The first target subgraph and the second target subgraph are fused to obtain fused graph structure data, wherein the fusion process includes constructing edges between nodes corresponding to the target transaction subject and description nodes in the first target subgraph; Use the pre-trained risk identification model to perform risk identification on the fusion graph structure data and obtain the risk identification results corresponding to the target task.
[0089] It should be noted that the embodiments of the electronic device in this specification and the embodiments of the risk identification method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding risk identification method mentioned above, and the repeated parts will not be repeated.
[0090] Furthermore, corresponding to the risk identification method described above, based on the same technical concept, one or more embodiments of this specification further provide a storage medium for storing computer executable instructions. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instructions stored in the storage medium are executed by a processor, the following process can be implemented: Based on a target transaction subject related to a target task for risk identification, extracting a first target subgraph including the target transaction subject from graph structure data corresponding to the target task and used to describe the relationship between the transaction subjects; According to the target task, a second target subgraph for describing the target task is constructed, wherein the second target subgraph includes a description node and a classification node connected to the description node, wherein the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; The first target subgraph and the second target subgraph are fused to obtain fused graph structure data, wherein the fusion process includes constructing edges between nodes corresponding to the target transaction subject and description nodes in the first target subgraph; Use the pre-trained risk identification model to perform risk identification on the fusion graph structure data and obtain the risk identification results corresponding to the target task.
[0091] It should be noted that the embodiment of the storage medium in this specification and the method for risk identification in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding risk identification method mentioned above, and the repeated parts will not be repeated.
[0092] Furthermore, corresponding to the risk identification method described above, based on the same technical concept, one or more embodiments of this specification further provide a computer program product, the computer program product including a computer program, and when the computer program is executed by a processor, the following process can be implemented: Based on a target transaction subject related to a target task for risk identification, extracting a first target subgraph including the target transaction subject from graph structure data corresponding to the target task and used to describe the relationship between the transaction subjects; According to the target task, a second target subgraph for describing the target task is constructed, wherein the second target subgraph includes a description node and a classification node connected to the description node, wherein the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; The first target subgraph and the second target subgraph are fused to obtain fused graph structure data, wherein the fusion process includes constructing edges between nodes corresponding to the target transaction subject and description nodes in the first target subgraph; Use the pre-trained risk identification model to perform risk identification on the fusion graph structure data and obtain the risk identification results corresponding to the target task.
[0093] It should be noted that the embodiment of the computer program product in this specification and the embodiment of the risk identification method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding risk identification method mentioned above, and the repeated parts will not be repeated.
[0094] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0095] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0096] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0097] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0098] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0099] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0100] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0103] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0104] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0105] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0107] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0108] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0109] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.
Claims
1. A method for risk identification, comprising: Based on a target transaction subject related to a target task for risk identification, extracting a first target subgraph including the target transaction subject from graph structure data corresponding to the target task and used to describe the relationship between the transaction subjects; According to the target task, construct a second target subgraph for describing the target task, wherein the second target subgraph includes a description node and a classification node connected to the description node, wherein the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; The first target subgraph and the second target subgraph are fused to obtain fused graph structure data, wherein the fusion process includes constructing an edge between a node corresponding to a target transaction subject in the first target subgraph and the description node; The pre-trained risk identification model is used to perform risk identification on the fusion graph structure data to obtain a risk identification result corresponding to the target task.
2. According to the method of claim 1, based on the target transaction subject related to the target task for risk identification, extracting a first target subgraph including the target transaction subject from the graph structure data corresponding to the target task for describing the relationship between the transaction subjects, comprises: Based on the task type of the target task, determining, in the graph structure data corresponding to the target task, a path length between a relevant node and a node corresponding to the target transaction subject, wherein the relevant node is a node in the graph structure data corresponding to the target task other than a node corresponding to the target transaction subject and related to the target task; Based on the target transaction subject and the path length, the first target subgraph is extracted from the graph structure data corresponding to the target task.
3. According to the method of claim 2, before extracting the first target subgraph from the graph structure data corresponding to the target task, the method further comprises: Acquire the task type of the target task from preset task types, where the preset task types include node prediction tasks, link prediction tasks, and graph prediction tasks; According to the task type of the target task, the target transaction subject is determined from the graph structure data corresponding to the target task, and the number of the target transaction subjects matches the task type of the target task.
4. The method according to claim 2, wherein extracting the first target subgraph from the graph structure data corresponding to the target task based on the target transaction subject and the path length comprises: Determining the relevant nodes from the graph structure data corresponding to the target task according to the target transaction subject and the path length; Using the node corresponding to the target transaction subject and the related nodes as nodes in the first target subgraph, and using the edge corresponding to the path between the node corresponding to the target transaction subject and the related nodes as an edge in the first target subgraph; Acquire, from the graph structure data corresponding to the target task, target node texts describing nodes in the first target subgraph and target edge texts describing edges in the first target subgraph; According to the target node text, information corresponding to the node in the first target subgraph is determined, and according to the target edge text, information corresponding to the edge in the first target subgraph is determined.
5. The method according to claim 4, wherein obtaining, from the graph structure data corresponding to the target task, target node text describing the nodes in the first target subgraph and target edge text describing the edges in the first target subgraph comprises: Based on a first conversion template describing a node, acquiring the target node text from the graph structure data corresponding to the target task; Based on a second conversion template that describes the edge, the target edge text is obtained from the graph structure data corresponding to the target task.
6. The method according to claim 4, wherein determining information corresponding to a node in the first target subgraph according to the target node text and determining information corresponding to an edge in the first target subgraph according to the target edge text comprises: Encode the target node text using a preset language model to obtain information corresponding to the node in the first target subgraph; The target edge text is encoded using the preset language macro model to obtain information corresponding to the edge in the first target subgraph.
7. The method according to claim 6, wherein constructing a second target subgraph for describing the target task according to the target task comprises: Obtaining a task description text that describes the task content of the target task, and encoding the task description text using the preset language model to obtain information corresponding to the description node in the second target subgraph; A type description text describing the risk type corresponding to the target task is obtained, and the type description text is encoded using the preset language model to obtain information corresponding to the classification node in the second target subgraph.
8. According to the method of claim 1, the pre-training process of the risk identification model comprises: Based on sample transaction entities related to sample tasks for risk identification in training data, extracting a first sample subgraph including the sample transaction entities from graph structure data corresponding to the sample tasks, wherein the training data includes sample tasks for identifying multiple types of risks; According to the sample task, construct a second sample subgraph for describing the sample task, wherein the second sample subgraph includes a sample description node and a sample classification node connected to the sample description node, wherein the sample description node represents the task content of the sample task, and the sample classification node represents information on the risk type corresponding to the sample task; The first sample subgraph and the second sample subgraph are fused to obtain sample fusion graph structure data, wherein the fusion process includes constructing an edge between a node corresponding to a sample transaction subject in the first sample subgraph and the sample description node; The risk identification model is trained using the sample fusion graph structure data corresponding to each of the sample tasks to obtain a pre-trained risk identification model.
9. A risk identification device, comprising: A first subgraph module is used to extract, based on a target transaction subject related to a target task for risk identification, a first target subgraph including the target transaction subject from graph structure data corresponding to the target task for describing the relationship between the transaction subjects; A second subgraph module is used to construct a second target subgraph for describing the target task according to the target task, wherein the second target subgraph includes a description node and a classification node connected to the description node, the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; A subgraph fusion module, used for fusing the first target subgraph and the second target subgraph to obtain fused graph structure data, wherein the fusion process includes constructing an edge between a node corresponding to a target transaction subject in the first target subgraph and the description node; The risk identification module is used to use the pre-trained risk identification model to perform risk identification on the fusion graph structure data to obtain a risk identification result corresponding to the target task.
10. An electronic device, comprising: processor, and a memory arranged to store computer executable instructions which, when executed, cause the processor to: Based on a target transaction subject related to a target task for risk identification, extracting a first target subgraph including the target transaction subject from graph structure data corresponding to the target task and used to describe the relationship between the transaction subjects; According to the target task, construct a second target subgraph for describing the target task, wherein the second target subgraph includes a description node and a classification node connected to the description node, wherein the description node represents the task content of the target task, and the classification node represents information on the risk type corresponding to the target task; The first target subgraph and the second target subgraph are fused to obtain fused graph structure data, wherein the fusion process includes constructing an edge between a node corresponding to a target transaction subject in the first target subgraph and the description node; The pre-trained risk identification model is used to perform risk identification on the fusion graph structure data to obtain a risk identification result corresponding to the target task.