Model training method and device and electronic equipment

By using graph neural networks with graph structure data in risk control scenarios, nodes and aggregation representations are generated, adjustment coefficients are updated, and classification models are trained, the problems of label feedback lag and labeling cost in the existing technology are solved, and the risk is improved Identification ability and model adaptability.

CN119202822APending Publication Date: 2024-12-27ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411215710.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In risk control scenarios, especially cold start and immature scenarios, it is difficult for existing technology to effectively identify illegal network industries. Lagging label feedback, high proportion of hidden cases, high labeling costs and low credibility, and face a small number of label foundations. The challenge of using large amounts of unlabeled data for risk prediction.

Method used

Using graph structure data with the transaction subject as node and transaction events as edges, node characterization and aggregation characterization are generated through the encoding, adjustment, aggregation and update module of the classification model, the adjustment coefficient is updated based on the characterization difference, the classification model is trained, and the label is reduced. Data dependence, adapted to cold start and sample-less scenarios.

Benefits of technology

It improves the ability to identify changing risks, reduces the computational cost and marking cost of the training process, and improves the adaptability and reasoning efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202822A_ABST
    Figure CN119202822A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a model training method and device and electronic equipment. The model training method comprises the following steps: inputting graph structure data which takes a transaction subject as a node and takes a transaction event as an edge into a coding module of a classification model to obtain a first node representation of each node in the graph structure data; inputting the first node representation into an adjustment module of the classification model, and performing adjustment processing on the first node representation based on an adjustment coefficient through the adjustment module to obtain a second node representation; inputting the second node representation into an aggregation module of the classification model to obtain an aggregation representation of each node in the graph structure data, the aggregation representation comprising a second node representation of an adjacent node of the node; and based on the difference between the aggregation representation and the category representation of the node, updating the adjustment coefficient by using an updating module of the classification model to obtain a trained classification model.
Need to check novelty before this filing date? Find Prior Art

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 model training. Background Art

[0002] In risk control scenarios, risk labels are mostly derived from user feedback, such as complaints and reports from payees in fraud identification. For immature scenarios such as cold start (the promotion and marketing process of new products or services in the market), the risk form and illegal online industry methods are not yet clear, and labels often rely on user feedback.

[0003] Manual risk labeling through questionnaires that do not involve user privacy data often has problems such as delayed label feedback, a high proportion of hidden cases (unexposed cases), high labeling costs, and low credibility. At the same time, as the risk pattern continues to change, subject risk identification faces the challenge of using a large amount of unlabeled data for risk prediction based on a small amount of labels. Therefore, it is necessary to provide a better model training solution to better improve the ability to cope with the ever-changing risk challenges. Summary of the invention

[0004] The embodiments of this specification provide a method, device and electronic device for model training to provide a model training solution.

[0005] In a first aspect, an embodiment of the present specification provides a method for model training, the method comprising: inputting graph structure data with transaction entities as nodes and transaction events as edges into an encoding module of a classification model to obtain a first node representation of each node in the graph structure data; inputting the first node representation into an adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on an adjustment coefficient by the adjustment module; inputting the second node representation into an aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, the aggregate representation including a second node representation of a neighboring node of the node; based on the difference between the aggregate representation and the category representation of the node, using the update module of the classification model to update the adjustment coefficient to obtain a trained classification model.

[0006] In a second aspect, an embodiment of the present specification provides a device for model training, comprising: an encoding processing module, which is used to input graph structure data with transaction entities as nodes and transaction events as edges into the encoding module of a classification model to obtain a first node representation of each node in the graph structure data; an adjustment processing module, which is used to input the first node representation into the adjustment module of the classification model, and obtain a second node representation by adjusting the first node representation based on an adjustment coefficient through the adjustment module; an aggregation processing module, which is used to input the second node representation into the aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes a second node representation of a neighboring node of the node; an update processing module, which is used to update the adjustment coefficient using the update module of the classification model based on the difference between the aggregate representation and the category representation of the node to obtain a trained classification model.

[0007] In a third aspect, an embodiment of the present specification provides an electronic device, comprising: a processor, and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor can: input graph structure data with transaction entities as nodes and transaction events as edges into an encoding module of a classification model to obtain a first node representation of each node in the graph structure data; input the first node representation into an adjustment module of the classification model, and obtain a second node representation by adjusting the first node representation based on an adjustment coefficient through the adjustment module; input the second node representation into an aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes a second node representation of a neighboring node of the node; based on the difference between the aggregate representation and the category representation of the node, the adjustment coefficient is updated using an update module of the classification model to obtain a trained classification model.

[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: inputting graph structure data with transaction entities as nodes and transaction events as edges into the encoding module of the classification model to obtain a first node representation of each node in the graph structure data; inputting the first node representation into the adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on an adjustment coefficient through the adjustment module; inputting the second node representation into the aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes a second node representation of a neighboring node of the node; based on the difference between the aggregate representation and the category representation of the node, using the update module of the classification model to update the adjustment coefficient to obtain a trained classification model.

[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: inputting graph structure data with transaction entities as nodes and transaction events as edges into an encoding module of a classification model to obtain a first node representation of each node in the graph structure data; inputting the first node representation into an adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on an adjustment coefficient through the adjustment module; inputting the second node representation into an aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes a second node representation of a neighboring node of the node; based on the difference between the aggregate representation and the category representation of the node, using the update module of the classification model to update the adjustment coefficient to obtain a trained classification model. 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 model training method provided in an embodiment of this specification;

[0012] Figure 2 It is a schematic diagram of an application scenario of a model training method provided in an embodiment of this specification;

[0013] Figure 3 It is a schematic diagram of a training architecture of a classification model provided in an embodiment of this specification.

[0014] Figure 4 It is a structural schematic diagram of a model training device provided in an embodiment of this specification;

[0015] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0016] 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.

[0017] 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.

[0018] The following, in conjunction with the accompanying drawings, describes in detail the model training method, device and electronic device provided in the embodiments of this specification through specific embodiments and their application scenarios.

[0019] Figure 1 A model training method 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 model training method includes the following steps:

[0020] Step S102: inputting the graph structure data with transaction entities as nodes and transaction events as edges into the encoding module of the classification model to obtain the first node representation of each node in the graph structure data.

[0021] Among them, graph structure data is the training data collected for the identification task of specific risk subjects. Graph structure data is composed of transaction events (such as transaction behavior, transfer behavior, social interaction behavior, etc.) of various transaction subjects (such as accounts, merchants, mini-programs, etc.). In the process of constructing graph structure data, transaction subjects are usually used as nodes and transaction events are used as edges. Specifically, graph structure data usually corresponds to the identification task. For example, when the identification task is the identification of overdue subjects, the graph structure data is the transaction events of various overdue / non-overdue accounts, merchants, mini-programs, etc.; when the identification task is the identification of fraud subjects, the graph structure data is the transaction events of various fraud / non-fraudulent accounts, merchants, mini-programs, etc.

[0022] The classification model is a model for identifying risk subjects, which is trained using graph structure data corresponding to a specific identification task to achieve identification of risk subjects corresponding to nodes in the graph data corresponding to the specific identification task. The classification model includes a coding module for encoding graph structure data, and the coding module can be composed of graph neural networks (GNNs). Specifically, the coding module can encode the node information and edge information of the graph structure data to obtain node representation, edge representation and / or graph representation. The coding module encodes the graph structure data to obtain the first node representation of each node in the graph structure data. Among them, the node information can include information such as attribute information (such as name, type, address, etc.) of the transaction subject, and the edge information can include information such as transaction information (such as transaction frequency, transaction amount, transaction time, etc.).

[0023] Step S104: input the first node representation into the adjustment module of the classification model, and the adjustment module adjusts the first node representation based on the adjustment coefficient to obtain the second node representation.

[0024] Among them, the adjustment module is a module in the classification model that adjusts the representation data output by the encoding module. Usually, after the classification model is trained using graph structure data that annotates the subject type, the unlabeled graph structure data is input into the classification model for encoding, and the node representation of the graph structure data can be obtained, and then the type of subject corresponding to the node can be determined based on the node representation. Different from the usual classification model training method of adjusting the parameters of the encoding module in the classification model, the model training method in this specification does not adjust the parameters of the encoding module, but sets an adjustment module corresponding to the specific recognition task, and realizes the training of the classification model by adjusting the adjustment coefficient of the adjustment module.

[0025] Specifically, the first node representation output by the encoding module may be input to the adjustment module, and the adjustment module may adjust the first node representation based on the adjustment coefficient to obtain a second node representation corresponding to the first node representation.

[0026] Step S106: input the second node representation into the aggregation module of the classification model to obtain the aggregation representation of each node in the graph structure data.

[0027] Among them, the aggregate representation includes a second node representation of the neighboring nodes of the node. The neighboring nodes involved in the aggregate representation of the nodes in the graph structure data are not specifically limited in this specification and can be determined according to actual conditions. For example, the neighboring nodes corresponding to the transaction subjects with which the transaction subjects corresponding to the node have frequent transactions can be used as the neighboring nodes involved in the aggregate representation; the neighboring nodes corresponding to the transaction subjects with transaction amounts greater than a preset value corresponding to the node can be used as the neighboring nodes involved in the aggregate representation; the neighboring nodes within N hops of the node can also be used as the neighboring nodes involved in the aggregate representation.

[0028] After determining the node and the neighboring nodes involved in the aggregated representation of the node, the aggregation module can aggregate the second node representations of the neighboring nodes involved in the aggregated representation of the node and the node based on the readout mechanism, and output the aggregated representations corresponding to each node in the graph structure data. In addition to aggregating the representations of the nodes, the aggregation module can also aggregate the representations of the edges into the aggregated representation. Specifically, the aggregated representation can include the representations of the edges between the node and the neighboring nodes and the representations between the neighboring nodes.

[0029] Step S108: Based on the difference between the aggregate representation and the category representation of the node, the adjustment coefficient is updated using the updating module of the classification model to obtain a trained classification model.

[0030] Among them, the category representation is the representation of each category involved in the graph structure data used as training data. For example, for the graph structure data for overdue subject identification, the categories include overdue and not overdue, and correspondingly, the category representation includes the representation corresponding to the overdue category and the representation corresponding to the not overdue category; for the graph structure data for fraud subject identification, the categories include fraud and not fraud, and correspondingly, the category representation includes the representation corresponding to the fraud category and the representation corresponding to the not fraud category.

[0031] In step S106, the second node representations of the nodes in the graph structure data are aggregated by the aggregation module to obtain an aggregate representation. Compared with the second node representation of the node, the aggregate representation of the node not only contains the information of the node itself, but also contains the information of the node's adjacent nodes. Therefore, the aggregate representation of the node is closer to the category representation of the node than the second node representation of the node. After knowing the category of the node, the category representation of the node can be obtained, and then the difference between the aggregate representation and the category representation obtained in step S106 can be used to adjust the adjustment coefficient of the update module to obtain effective knowledge related to the risk subject identification task of the graph structure data (i.e., the adjusted adjustment coefficient).

[0032] Specifically, the difference between the aggregate representation and the node representation can be determined using a similarity measurement method. When the similarity value between the two is greater than a threshold, it can be determined that the difference between the aggregate representation and the node representation is small. The similarity measurement method can use Euclidean distance, cosine similarity, Pearson correlation coefficient, etc. The specific similarity measurement method used is not limited in this specification. The loss function of the above training process can be calculated according to the following formula:

[0033]

[0034] in, is the loss function, N is the number of nodes in the graph structure data in the training data, S i For polymer characterization, is the category representation, and sim(.) is the similarity function.

[0035] In an embodiment of the present specification, the first node representation output by the encoding module is adjusted by the adjustment module to obtain the second node representation, and then the adjustment coefficient of the adjustment module is updated by the difference between the aggregate representation and the category representation corresponding to the second node representation to realize the training of the classification model. This process does not directly adjust the huge number of parameters of the encoding module, but realizes the training of the classification model by fine-tuning the adjustment coefficients of fewer parameters, which greatly reduces the number of parameters that need to be updated in the face of new recognition tasks, improves the computational efficiency of task learning and reasoning, and thus can improve the ability of the classification model to cope with ever-changing risk challenges. At the same time, the update process of the adjustment coefficient is based on the difference between the aggregate representation and the category representation, rather than the label of the transaction subject corresponding to the node in the graph structure data, which can reduce the dependence of the training process on the labeled data, so that the model training method can adapt to the cold start few sample scenario.

[0036] Figure 2 A schematic diagram of an application scenario of a model training method is provided, such as Figure 2 As shown, the model usage server 201 sends a model training command to the model training server 202. After receiving the model training command, the model training server 202 reads the graph structure data in the first database 203, and uses the model training method in this specification to train the classification model. After the training is completed, the training results (including adjustment coefficients) are returned to the model usage server 201, and the trained classification model is stored in the second database 204. Then, the model usage server 201 can read the trained classification model from the second database 204, use the trained classification model to perform risk detection on the nodes in the target graph structure data input by the client 205, and return the detection results to the client 205.

[0037] In one implementation, after the classification model is trained, the model training method further includes the following steps A1-A4:

[0038] Step A1, inputting the received target graph structure data into an encoding module to encode the node information, and obtaining a third node representation of the target node in the target graph structure data;

[0039] Step A2, inputting the target graph structure data into a pre-classification module of a classification model, and obtaining a target adjustment module corresponding to the target graph structure data based on the classification target of the target graph structure data;

[0040] Step A3, inputting the third node representation into a target adjustment module, and obtaining a fourth node representation by adjusting the third node representation based on the adjustment coefficient by the target adjustment module;

[0041] Step A4: input the fourth node representation into the classification module of the classification model to obtain the classification result of the transaction subject corresponding to the target node.

[0042] Among them, the target graph structure data is the graph structure data to be classified that is input after the classification model completes training. Similar to the graph structure data, the sample graph structure data also uses the transaction subject as the node and the transaction event as the edge, and the nodes contained in the target graph structure data are the target nodes. The target graph structure data often carries the identification target, and the identification target can be the identification of fraud subjects or overdue subjects, etc. For different identification tasks, the classification model will train different adjustment modules, and each adjustment module corresponds to a different adjustment coefficient. It should be understood that for different identification tasks, except for the adjustment module, the other modules in the classification model are universal. Therefore, a pre-classification module can be set in the classification model to determine the target adjustment module that matches the target graph structure data from multiple adjustment modules according to the identification target after obtaining the target graph structure data. The classification module in the classification model is used to use the representation of the adjusted node output by the target adjustment module to classify the transaction subject corresponding to the node.

[0043] Specifically, after determining the target adjustment module corresponding to the target graph structure data, the risk subject identification process of the target graph structure data can be: first use the encoding module to determine the third node representation of each target node; input the third node representation into the target adjustment module for adjustment processing to obtain the fourth node representation; use the classification module based on the fourth node representation to determine the classification result of the transaction subject corresponding to each target node in the target graph structure data. Among them, the target adjustment module can use the readout mechanism to adjust the third node representation, and the readout process can be shown as Formula 2:

[0044] h' v =ReadOut({m☉h v}) (Formula 2)

[0045] Among them, h' v is the fourth node representation, m is the adjustment coefficient, h v It represents the third node, and Readout is the readout function.

[0046] In the embodiment of the present specification, the third node representation output by the target encoding module is adjusted by the target adjustment module to obtain the fourth node representation, and then the risk subject is determined based on the fourth node representation. Before classifying the target node, the process uses the pre-classification module to determine the target adjustment module corresponding to the target graph structure data, which can improve the classification efficiency of the transaction subject involved in the target graph structure data.

[0047] In one implementation, the aggregation module includes a sampling submodule and an aggregation submodule. Step S106 can be executed as the following steps B1-B2:

[0048] Step B1, inputting the graph structure data into the sampling submodule to obtain the subgraph corresponding to each node in the graph structure data. The sampling submodule takes each node in the graph structure data as the central node and the neighboring nodes of the node as the context nodes to construct the subgraph of the node;

[0049] Step B2, input the second node representation and the subgraph into the aggregation submodule to obtain the aggregation representation of each node in the graph structure data, and the aggregation submodule aggregates the second node representation of the context node of the subgraph into the second node representation of the central node of the subgraph.

[0050] In the process of determining the aggregate representation, a subgraph with each node in the graph structure data as the central node can be constructed to use the representation corresponding to the subgraph as the aggregate representation of the node. Among them, the sampling submodule is used to determine the subgraph of each node in the graph structure data, and the aggregation submodule is used to use the representation corresponding to the subgraph as the aggregate representation of the node.

[0051] In one example, for each node in the graph structure data, the central node and the context node can be determined in turn, and then the subgraph corresponding to the node can be constructed. Specifically, the node for which the subgraph needs to be determined can be used as the central node, and the neighboring nodes of the central node can be used as the context nodes. In one implementation, the process of the sampling submodule determining the subgraph of each node in the graph structure data can be performed as the following steps C1-C2:

[0052] Step C1, after taking a node in the graph structure data as a central node, taking a node in the graph structure data whose order with the central node satisfies a preset order as a context node of the node;

[0053] Step C2, based on the central node and the context node, extract the subgraph of the node from the graph structure data.

[0054] Specifically, a fixed number of hops (i.e., a preset order) can be used to determine the context node corresponding to the central node from the graph structure data, and then construct the subgraph corresponding to the node to improve the construction efficiency of the subgraph corresponding to the node. Specifically, a node whose order with the central node is less than the preset order can be used as a context node. The value of the preset order is not specifically limited in this specification and can be set according to actual conditions. Specifically, the preset order can be set to 1, 2 or 3.

[0055] Furthermore, after aggregating the second node representation of the context node to the central node, the aggregated representation corresponding to the central node can be determined as the representation of the subgraph. In addition, in addition to the representation data corresponding to the context node, the representation data of the edges between the context nodes and between the context node and the central node can also be aggregated to the central node to further improve the richness of the representation of the subgraph, reduce the gap between the representation of the subgraph and the category representation of the central node in the subgraph, and thus improve the training effect of the classification model.

[0056] In the embodiment of the present specification, the subgraph corresponding to each node in the graph structure data is determined by the sampling submodule, and then the second node representation of the context node in the subgraph is aggregated to the central node, and the representation of the aggregated central node is used as the aggregate representation. This process determines the aggregate representation of the node through the subgraph, and since the second node representation of the context node in the subgraph enriches the content of the aggregate representation of the node, this method can improve the training effect of the classification model.

[0057] In one implementation, when the node information does not include the node category information, step S108 may be performed as the following steps D1-D2:

[0058] Step D1, inputting the aggregate representation of the node into the category representation module of the classification model, and obtaining category information determined by matching the aggregate representation of the node with the category representation of the preset category;

[0059] Step D2, based on the difference between the aggregate representation and the category representation corresponding to the category information, the adjustment coefficient is updated using the update module of the classification model to obtain a trained classification model.

[0060] As mentioned above, there is often a large amount of unlabeled data in the training data of the classification model. For this type of graph structure data, the category representation of the node can be determined by comparing the aggregate representation of the node with the category representation of the existing preset category one by one. Specifically, a category representation module can be set in the classification model, and the category representation module is used to match the aggregate representation of the node with the category representation of the preset category to determine the category information corresponding to the node. After determining the category information of the node, the model training method also includes the following steps:

[0061] The aggregate representation of the node is input into the updating submodule of the category representation module, and based on the aggregate representation, the category representation corresponding to the category information stored in the category representation module is updated to obtain an updated category representation.

[0062] Among them, the category representation of each preset category can be determined according to the aggregate representation of each node belonging to the category, and then an update submodule can be set in the category representation module, so that after the category information corresponding to the node is determined as above, the update submodule can be used to update the category representation corresponding to the category information of the node based on the aggregate information of the node, so as to obtain a more accurate category representation and improve the training effect of the classification model.

[0063] Furthermore, after the category information is determined, the classification model may be trained according to the aggregate representation of the node and the category representation corresponding to the category information.

[0064] In an embodiment of the present specification, a category characterization module is used to determine the category information of a node, which enables the training process of the classification model to learn risk information by relying on only a few labels, thereby reducing the labeling cost of graph structured data and further reducing the cost of the classification model training process.

[0065] In one implementation, the pre-training process of the encoding module can be performed as follows: Steps E1-E3:

[0066] Step E1, inputting the sample graph structure data into the encoding module to obtain the fifth node representation of each sample node in the sample graph structure data;

[0067] Step E2, inputting the fifth node representation into the aggregation module to obtain a sample aggregation representation of each sample node in the sample graph structure data, wherein the sample aggregation representation includes the fifth node representation of the neighboring nodes of the sample node;

[0068] Step E3, based on the difference between the sample node and the sample aggregation representation of the neighboring nodes of the sample node, the parameter updating module of the classification model is used to adjust the parameters of the encoding module to obtain the pre-trained encoding module.

[0069] The sample graph structure data is training data used for pre-training the coding module. Like the graph structure data, the sample graph structure data also uses transaction subjects as nodes and transaction events as edges, and the nodes in the sample graph structure data are sample nodes. The pre-training process requires the use of the coding module to determine the fifth node representation of each sample node in the sample graph structure data. As with the determination process of the classification model, the fifth node representation can be aggregated to determine the sample aggregate representation of each sample node.

[0070] After obtaining the sample aggregation representation, the encoding module can be pre-trained based on the difference between the sample aggregation representation and the sample aggregation representation of the neighboring nodes of the sample node. This pre-training process does not need to rely on any scene labels (including the labels of the sample nodes in the sample graph structure data). It is a self-supervised training method. While reducing the labeling cost of the sample graph structure data, the encoding module can adapt to the recognition tasks of various scenes. Compared with the supervised training scheme, this pre-training process will have higher multi-scene modeling efficiency.

[0071] In the sample graph structure data, when there is an edge between two nodes A and B and there is no edge between nodes A and C, the difference between nodes A and B is often greater than that between nodes A and C. Therefore, the pre-training of the encoding module can be achieved based on the difference between the sample node and the sample aggregation representation of the neighboring nodes of the sample node. In one implementation, step E3 can be executed as the following steps F1-F3:

[0072] Step F1, inputting the sample graph structure data into the triplet submodule of the parameter update module, obtaining the triplet of each sample node in the sample graph structure data, wherein the triplet includes the sample node, the positive sample node of the sample node, and the negative sample node of the sample node;

[0073] Step F2, inputting the triplet and the sample aggregate representation into the difference submodule of the parameter update module, determining the first difference between the sample node and the sample aggregate representation corresponding to the positive sample node, and the second difference between the sample node and the sample aggregate representation corresponding to the negative sample node;

[0074] Step F3, when the first difference is greater than the second difference, the parameter submodule of the parameter updating module is used to adjust the parameters of the encoding module to obtain a pre-trained encoding module.

[0075] In the process of pre-training the encoding module, a comparative learning method can be used to improve the pre-training effect of the encoding module. Specifically, a triple containing positive sample nodes and negative sample nodes can be constructed for each sample node in the sample graph structure data, wherein the positive sample node is a node with an edge between the sample node (for example, for the aforementioned node A, node B is the positive sample node of node A), and the negative sample node is a node without an edge between the sample node (for example, for the aforementioned node A, node C is the negative sample node of node A).

[0076] Since the difference between the positive sample node and the sample node is greater than the difference between the negative sample node and the sample node, the first difference between the sample node and the positive sample node and the second difference between the sample node and the negative sample node can be determined first, and then the encoding module can be pre-trained according to the first difference and the second difference. Specifically, the parameters of the encoding module can be adjusted when the first difference is greater than the second difference. Among them, the first difference and the second difference can be determined based on the representation of the subgraph corresponding to the sample node, which is the same as the aforementioned method for determining the difference between the aggregate representation and the category representation. The loss function corresponding to the pre-training process can be performed according to Formula 3:

[0077]

[0078] Among them, L is the loss function, M is the set of triples corresponding to the sample node v in the pre-training data, S v is the sample aggregation representation of sample node v, S a is the sample aggregation representation of the positive sample node a of the sample node v, S b is the sample aggregation representation of the negative sample node b of the sample node v, node u is node a or node b, sim(.) is the similarity function, and τ is the hyperparameter controlling the distribution of the output.

[0079] In the embodiment of this specification, since the classification model is trained based on the difference between the aggregate representation and the category representation, and the encoding module is determined based on the difference between the sample aggregate representation of the sample node and the adjacent node, the two training processes are unified using a similar template, which solves the problem of inconsistent task objectives and can improve the reasoning effect of the trained classification model.

[0080] Since the pre-training process of the encoding module uses different training objectives from the training process of the aforementioned classification model, the former is to reduce the difference between the sample aggregation representation of the sample node and the adjacent nodes, and the latter is to reduce the difference between the aggregation representation of the node and the category representation, therefore, the two training processes can use the same training data. Figure 3 A schematic diagram of the training architecture of a classification model including a pre-training process of an encoding module is shown, such as Figure 3As shown, both the pre-training process of the encoding module and the training process of the classification model use the training data of multiple graph data constructed by the transaction events of multiple accounts. For each graph data, the subgraph corresponding to each node, the node representation corresponding to each node, and the triple corresponding to each node can be obtained, and then the aggregate representation of each node in the graph data can be determined based on the node representation and the subgraph. Furthermore, the first difference and the second difference can be determined based on the aggregate representation of the nodes in the triple to achieve pre-training of the encoding module; after the pre-training is completed, the classification model can be trained based on the difference between the aggregate representation and the category representation of the nodes in the graph data.

[0081] It should be noted that the execution subject of the model training method provided in the embodiments of this specification may be a model training device, or a control module in the model training device for executing the model training method. In the embodiments of this specification, the model training device provided in the embodiments of this specification is described by taking the model training method executed by the model training device as an example.

[0082] Figure 4 Schematic diagram of the structure of the device for model training according to an embodiment of the present invention. Figure 4 As shown, the device 400 for model training includes:

[0083] The encoding processing module 410 is used to input the graph structure data with transaction subjects as nodes and transaction events as edges into the encoding module of the classification model to obtain the first node representation of each node in the graph structure data;

[0084] An adjustment processing module 420 is used to input the first node representation into an adjustment module of a classification model, and obtain a second node representation by adjusting the first node representation based on an adjustment coefficient by the adjustment module;

[0085] An aggregation processing module 430 is used to input the second node representation into an aggregation module of a classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes a second node representation of a neighboring node of the node;

[0086] The update processing module 440 is used to update the adjustment coefficient using the update module of the classification model based on the difference between the aggregate representation and the category representation of the node to obtain a trained classification model.

[0087] In one embodiment, the aggregation module includes a sampling submodule and an aggregation submodule, and the aggregation processing module 430 includes:

[0088] The sampling unit is used to input the graph structure data into the sampling submodule to obtain the subgraph corresponding to each node in the graph structure data. The sampling submodule takes each node in the graph structure data as the central node and the neighboring nodes of the node as the context nodes to construct the subgraph of the node.

[0089] The aggregation unit is used to input the second node representation and the subgraph into the aggregation submodule to obtain the aggregation representation of each node in the graph structure data. The aggregation submodule aggregates the second node representation of the context node of the subgraph into the second node representation of the central node of the subgraph.

[0090] In one embodiment, the process of the sampling submodule determining the subgraph of each node in the graph structure data includes:

[0091] After taking a node in the graph structure data as a central node, taking a node in the graph structure data whose order with the central node satisfies a preset order as a context node of the node;

[0092] Based on the central node and the context node, a subgraph of nodes is extracted from the graph structure data.

[0093] In one embodiment, the update processing module 440 includes:

[0094] A category unit, used for inputting the aggregate representation of the node into the category representation module of the classification model when the information of the node does not contain the category information of the node, to obtain the category information determined by matching the aggregate representation of the node with the category representation of the preset category;

[0095] The updating unit is used to update the adjustment coefficient based on the difference between the aggregate representation and the category representation corresponding to the category information using the updating module of the classification model to obtain the trained classification model.

[0096] In one embodiment, the model training apparatus 400 further includes:

[0097] The representation updating module is used to input the aggregate representation of the node into the updating submodule of the category representation module after determining the category information of the node, and based on the aggregate representation, update the category representation corresponding to the category information stored in the category representation module to obtain an updated category representation.

[0098] In one embodiment, the model training apparatus 400 further includes:

[0099] A target encoding module, which is used to input the received target graph structure data into the encoding module to encode the node information after training the classification model, so as to obtain a third node representation of the target node in the target graph structure data;

[0100] A target pre-classification module is used to input the target graph structure data into the pre-classification module of the classification model, and obtain a target adjustment module corresponding to the target graph structure data based on the classification target of the target graph structure data;

[0101] A target adjustment module, configured to input the third node representation into the target adjustment module, and obtain a fourth node representation by adjusting the third node representation based on the adjustment coefficient by the target adjustment module;

[0102] The target classification module is used to input the fourth node representation into the classification module of the classification model to obtain the classification result of the transaction subject corresponding to the target node.

[0103] In one embodiment, the pre-training process of the encoding module includes:

[0104] A pre-trained encoding module, used for inputting the sample graph structure data into the encoding module to obtain the fifth node representation of each sample node in the sample graph structure data;

[0105] A pre-trained aggregation module, used for inputting the fifth node representation into the aggregation module to obtain a sample aggregation representation of each sample node in the sample graph structure data, wherein the sample aggregation representation includes the fifth node representation of the neighboring nodes of the sample node;

[0106] The pre-training update module is used to adjust the parameters of the encoding module based on the difference between the sample node and the sample node's neighboring nodes using the parameter update module of the classification model to obtain the pre-trained encoding module.

[0107] In one embodiment, the pre-training update module includes:

[0108] A triplet unit, used for inputting the sample graph structure data into the triplet submodule of the parameter update module, to obtain a triplet of each sample node in the sample graph structure data, wherein the triplet includes the sample node, the positive sample node of the sample node, and the negative sample node of the sample node;

[0109] A difference unit, configured to input the triplet and the sample aggregate representation into a difference submodule of the parameter update module, and determine a first difference between the sample node and the sample aggregate representation corresponding to the positive sample node, and a second difference between the sample node and the sample aggregate representation corresponding to the negative sample node;

[0110] The updating unit is used to adjust the parameters of the encoding module using the parameter submodule of the parameter updating module when the first difference is greater than the second difference, so as to obtain the pre-trained encoding module.

[0111] It should be noted that the embodiments of the device for model training in this specification and the embodiments of the method for model training in this specification are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the corresponding model training method mentioned above, and the repeated parts will not be repeated.

[0112] Each module in the above-mentioned model training device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the terminal device or the processor on the server side in the form of hardware, or can be stored in the memory in the terminal device or the memory on the server side in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0113] Further, corresponding to the above-described model training method, based on the same technical concept, one or more embodiments of this specification also provide an electronic device, which is used to execute the above-described model training method. Figure 5 A schematic diagram of the structure of an electronic device provided for one or more embodiments of this specification.

[0114] Based on the same idea, one or more embodiments of this specification also provide an electronic device, such as Figure 5 As shown. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 501 and memory 502, and the memory 502 may store one or more storage applications or data. Among them, the memory 502 can be a temporary storage or a permanent storage. The application stored in the memory 502 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 501 can be configured to communicate with the memory 502 to execute a series of computer executable instructions in the memory 502 on the electronic device. The electronic device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input and output interfaces 505, and one or more keyboards 506.

[0115] 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:

[0116] Inputting the graph structure data with transaction subjects as nodes and transaction events as edges into the encoding module of the classification model to obtain the first node representation of each node in the graph structure data;

[0117] Inputting the first node representation into an adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on the adjustment coefficient by the adjustment module;

[0118] Inputting the second node representation into an aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes the second node representation of the neighboring nodes of the node;

[0119] Based on the difference between the aggregate representation and the category representation of the node, the adjustment coefficient is updated using the update module of the classification model to obtain the trained classification model.

[0120] It should be noted that the embodiments of the electronic device in this specification and the embodiments of the model training 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 model training method mentioned above, and the repeated parts will not be repeated.

[0121] Furthermore, corresponding to the model training 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 the processor, the following process can be implemented:

[0122] Inputting the graph structure data with transaction subjects as nodes and transaction events as edges into the encoding module of the classification model to obtain the first node representation of each node in the graph structure data;

[0123] Inputting the first node representation into an adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on the adjustment coefficient by the adjustment module;

[0124] Inputting the second node representation into an aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes the second node representation of the neighboring nodes of the node;

[0125] Based on the difference between the aggregate representation and the category representation of the node, the adjustment coefficient is updated using the update module of the classification model to obtain the trained classification model.

[0126] It should be noted that the embodiment of the storage medium in this specification and the method of model training 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 model training method mentioned above, and the repeated parts will not be repeated.

[0127] Furthermore, corresponding to the above-described model training method, based on the same technical concept, one or more embodiments of this specification further provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the following process can be implemented:

[0128] Inputting the graph structure data with transaction subjects as nodes and transaction events as edges into the encoding module of the classification model to obtain the first node representation of each node in the graph structure data;

[0129] Inputting the first node representation into an adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on the adjustment coefficient by the adjustment module;

[0130] Inputting the second node representation into an aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes the second node representation of the neighboring nodes of the node;

[0131] Based on the difference between the aggregate representation and the category representation of the node, the adjustment coefficient is updated using the update module of the classification model to obtain the trained classification model.

[0132] It should be noted that the embodiment of the computer program product in this specification and the embodiment of the model training method in this specification are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the corresponding model training method mentioned above, and the repeated parts will not be repeated.

[0133] 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.

[0134] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to 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 an improvement in a method flow cannot be implemented using 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 it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. 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 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.

[0135] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed 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 controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can 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, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0136] 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.

[0137] 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.

[0138] It should be understood by those skilled in the art that one or more embodiments of this specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this 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.

[0139] 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 box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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.

[0140] 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 including 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.

[0141] 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.

[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0143] The 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. The memory is an example of a computer-readable medium.

[0144] 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 tape 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 herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0145] 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.

[0146] 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.

[0147] 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.

[0148] 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 model training method, comprising: Inputting graph structure data with transaction entities as nodes and transaction events as edges into an encoding module of a classification model to obtain a first node representation of each node in the graph structure data; Inputting the first node representation into the adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on the adjustment coefficient by the adjustment module; Inputting the second node representation into the aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes the second node representation of the neighboring nodes of the node; Based on the difference between the aggregate representation and the category representation of the node, the adjustment coefficient is updated using the updating module of the classification model to obtain a trained classification model.

2. According to the method of claim 1, the aggregation module comprises a sampling submodule and an aggregation submodule, and the step of inputting the second node representation into the aggregation module of the classification model to obtain the aggregate representation of each node in the graph structure data comprises: Input the graph structure data into the sampling submodule to obtain a subgraph corresponding to each node in the graph structure data, wherein the sampling submodule takes each node in the graph structure data as a central node and takes the neighboring nodes of the node as context nodes to construct a subgraph of the node; The second node representation and the subgraph are input into the aggregation submodule to obtain the aggregation representation of each node in the graph structure data. The aggregation submodule aggregates the second node representation of the context node of the subgraph into the second node representation of the central node of the subgraph.

3. According to the method of claim 2, the process of the sampling submodule determining the subgraph of each node in the graph structure data comprises: After taking a node in the graph structure data as a central node, taking a node in the graph structure data whose order with the central node satisfies a preset order as a context node of the node; Based on the central node and the context node, a subgraph of the node is extracted from the graph structure data.

4. The method according to claim 1, wherein when the information of the node does not include the category information of the node, the updating module of the classification model is used to update the adjustment coefficient based on the difference between the aggregate representation and the category representation of the node to obtain the trained classification model, comprising: Inputting the aggregate representation of the node into the category representation module of the classification model to obtain category information determined based on the matching process of the aggregate representation of the node and the category representation of a preset category; Based on the difference between the aggregate representation and the category representation corresponding to the category information, the adjustment coefficient is updated using the updating module of the classification model to obtain a trained classification model.

5. The method according to claim 4, after determining the category information of the node, the method further comprises: The aggregate representation of the node is input into the updating submodule of the category representation module, and based on the aggregate representation, the category representation corresponding to the category information stored in the category representation module is updated to obtain an updated category representation.

6. The method according to claim 1, after training the classification model, further comprising: Inputting the received target graph structure data into the encoding module to encode the node information, and obtaining a third node representation of the target node in the target graph structure data; Inputting the target graph structure data into the pre-classification module of the classification model, and obtaining a target adjustment module corresponding to the target graph structure data based on the classification target of the target graph structure data; Inputting the third node representation into the target adjustment module, and obtaining a fourth node representation by adjusting the third node representation based on the adjustment coefficient by the target adjustment module; The fourth node representation is input into the classification module of the classification model to obtain a classification result of the transaction subject corresponding to the target node.

7. According to the method of claim 1, the pre-training process of the encoding module comprises: Inputting the sample graph structure data into the encoding module to obtain the fifth node representation of each sample node in the sample graph structure data; Inputting the fifth node representation into the aggregation module to obtain a sample aggregation representation of each sample node in the sample graph structure data, wherein the sample aggregation representation includes the fifth node representation of the neighboring nodes of the sample node; Based on the difference between the sample aggregation representations of the sample node and the sample node's neighboring nodes, the parameter updating module of the classification model is used to adjust the parameters of the encoding module to obtain a pre-trained encoding module.

8. The method according to claim 7, wherein the parameter updating module of the classification model is used to adjust the parameters of the encoding module based on the difference between the sample node and the sample aggregation representation of the neighboring nodes of the sample node to obtain the pre-trained encoding module, comprising: Input the sample graph structure data into the triplet submodule of the parameter updating module to obtain a triplet of each sample node in the sample graph structure data, wherein the triplet includes a sample node, a positive sample node of the sample node, and a negative sample node of the sample node; Input the triplet and the sample aggregate representation into the difference submodule of the parameter updating module, and determine a first difference between the sample node and the sample aggregate representation corresponding to the positive sample node, and a second difference between the sample node and the sample aggregate representation corresponding to the negative sample node; When the first difference is greater than the second difference, the parameter submodule of the parameter updating module is used to adjust the parameters of the encoding module to obtain a pre-trained encoding module.

9. A model training device, comprising: An encoding processing module, used for inputting graph structure data with transaction subjects as nodes and transaction events as edges into an encoding module of a classification model to obtain a first node representation of each node in the graph structure data; An adjustment processing module, configured to input the first node representation into the adjustment module of the classification model, and obtain a second node representation by adjusting the first node representation based on an adjustment coefficient by the adjustment module; An aggregation processing module, configured to input the second node representation into an aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes a second node representation of a neighboring node of the node; An update processing module is used to update the adjustment coefficient using the update module of the classification model based on the difference between the aggregate representation and the category representation of the node to obtain a trained classification model.

10. An electronic device comprising: processor, and a memory arranged to store computer executable instructions which, when executed, cause the processor to: Inputting graph structure data with transaction entities as nodes and transaction events as edges into an encoding module of a classification model to obtain a first node representation of each node in the graph structure data; Inputting the first node representation into the adjustment module of the classification model, and obtaining a second node representation by adjusting the first node representation based on the adjustment coefficient by the adjustment module; Inputting the second node representation into the aggregation module of the classification model to obtain an aggregate representation of each node in the graph structure data, wherein the aggregate representation includes the second node representation of the neighboring nodes of the node; Based on the difference between the aggregate representation and the category representation of the node, the adjustment coefficient is updated using the updating module of the classification model to obtain a trained classification model.