Model generation method and device, index prediction method and device, electronic equipment and storage medium
By constructing sample graphs and using graph neural network models, combining the characteristics of sample objects and associated objects, the problem of low accuracy in indicator prediction in the existing technology is solved, and accurate prediction of target indicators and efficient prediction of risk indicators are achieved.
Patent Information
- Application Number
- CN202310745740.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-31
AI Technical Summary
The accuracy of indicator prediction in the prior art needs to be improved, and it is difficult to effectively predict the target indicators accurately.
By determining the association relationship between the sample object and the associated object, constructing a sample graph and training a graph neural network model, using the characteristics of the sample object and the associated object to predict indexes, and improving the prediction ability of the model.
Accurate prediction of target indicators has been achieved, the prediction ability of indicator prediction model has been improved, and the prediction ability of risk indicators has been enhanced.
Smart Images

Figure CN119227843A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a model generation, indicator prediction method, device, electronic device and storage medium. Background Art
[0002] Quantitative risk assessment is the core work of credit business. Its essence is to conduct a quantitative assessment of the risk of target users, that is, to predict the risk score of target users in risk indicators. On this basis, the credit strategy can make credit decisions based on the risk score.
[0003] In the process of realizing the present invention, the inventors found that the prior art has the following technical problems: the accuracy of indicator prediction needs to be improved. Summary of the invention
[0004] The embodiments of the present invention provide a model generation, an indicator prediction method, a device, an electronic device and a storage medium to achieve accurate prediction of target indicators.
[0005] According to one aspect of the present invention, a model generation method is provided, which may include:
[0006] For each sample object of the at least two sample objects, determining an associated object of the at least two sample objects that has an associated relationship with the sample object;
[0007] The sample object and the associated object are respectively used as sample nodes, and a sample edge is generated for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object;
[0008] Based on the sample nodes and sample edges corresponding to at least two sample objects, a sample graph is constructed, wherein the node features of each sample node in the sample graph are used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator;
[0009] The original prediction model is trained through the sample graph to obtain an indicator prediction model, wherein the indicator prediction model is used to predict the target indicator.
[0010] According to another aspect of the present invention, there is provided an indicator prediction method, which may include:
[0011] For each target object of the at least two target objects, determining a relationship object that has an association relationship with the target object among the at least two target objects;
[0012] The target object and the relationship object are respectively used as target nodes, and a target edge is generated for connecting the target node corresponding to the target object and the target node corresponding to the relationship object;
[0013] Based on target nodes and target edges corresponding to at least two target objects, a target graph is constructed, wherein node features of each target node in the target graph are used to characterize target features of the target object corresponding to the target node, and the target features are related to the target indicator;
[0014] Obtain an indicator prediction model generated by the model generation method provided in any embodiment of the present invention, and input the target graph into the indicator prediction model, and obtain the predicted value of each target object under the target indicator according to the output result of the indicator prediction model.
[0015] According to another aspect of the present invention, a model generation device is provided, which may include:
[0016] An associated object determination module, configured to determine, for each sample object in at least two sample objects, an associated object in at least two sample objects that has an associated relationship with the sample object;
[0017] A sample edge generation module, used to take the sample object and the associated object as sample nodes respectively, and generate a sample edge for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object;
[0018] A sample graph construction module, used to construct a sample graph based on sample nodes and sample edges corresponding to at least two sample objects, wherein the node features of each sample node in the sample graph are used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator;
[0019] The indicator prediction model obtaining module is used to train the original prediction model through the sample graph to obtain the indicator prediction model, wherein the indicator prediction model is used to predict the target indicator.
[0020] According to another aspect of the present invention, an indicator prediction device is provided, which may include:
[0021] A relationship object determination module, used for determining, for each target object among the at least two target objects, a relationship object among the at least two target objects that has an association relationship with the target object;
[0022] A target edge generation module, used to take the target object and the relationship object as target nodes respectively, and generate a target edge for connecting the target node corresponding to the target object and the target node corresponding to the relationship object;
[0023] A target graph construction module, used to construct a target graph based on target nodes and target edges corresponding to at least two target objects, wherein the node features of each target node in the target graph are used to characterize the target features of the target object corresponding to the target node, and the target features are related to the target indicator;
[0024] The prediction value obtaining module is used to obtain the indicator prediction model generated by the model generation method provided in any embodiment of the present invention, and input the target graph into the indicator prediction model, and obtain the prediction value of each target object under the target indicator according to the output result of the indicator prediction model.
[0025] According to another aspect of the present invention, there is provided an electronic device, which may include:
[0026] at least one processor; and
[0027] a memory communicatively connected to at least one processor; wherein,
[0028] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor implements the model generation method or indicator prediction method provided by any embodiment of the present invention when executing.
[0029] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and the computer instructions are used to enable a processor to implement the model generation method or indicator prediction method provided by any embodiment of the present invention when executed.
[0030] The technical solution in the embodiment of the present invention, for each sample object among at least two sample objects, by determining the associated object that has an associated relationship with the sample object among at least two sample objects, and taking the sample object and the associated object as sample nodes respectively, generates a sample edge for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object; based on the sample nodes and sample edges respectively corresponding to at least two sample objects, a sample graph is constructed, and the node features of each sample node in the sample graph are respectively used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator; the original prediction model is trained through the sample graph to obtain an indicator prediction model for predicting the target indicator. In the above technical solution, in the model training process, not only the sample features of the sample object itself are used, but also the sample features of the associated objects of the sample object are fully utilized, which helps to improve the prediction ability of the indicator prediction model obtained by the training for the target indicator, thereby achieving accurate prediction of the target indicator.
[0031] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 is a flow chart of a model generation method provided according to an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of a social relationship network in a model generation method provided in an embodiment of the present invention;
[0035] Figure 3 is a flow chart of another model generation method provided according to an embodiment of the present invention;
[0036] Figure 4a is a schematic diagram of a sample graph in another model generation method provided according to an embodiment of the present invention;
[0037] Figure 4b is a schematic diagram of a space-time graph in another model generation method provided according to an embodiment of the present invention;
[0038] Figure 5 is a flow chart of another model generation method provided according to an embodiment of the present invention;
[0039] Figure 6 is a flowchart of an optional example of another model generation method provided in an embodiment of the present invention;
[0040] Figure 7 is a flowchart of an indicator prediction method provided according to an embodiment of the present invention;
[0041] Figure 8 is a structural block diagram of a model generation device provided according to an embodiment of the present invention;
[0042] Fig. 9 is a structural block diagram of an indicator prediction device provided according to an embodiment of the present invention
[0043] Fig.10 It is a structural schematic diagram of an electronic device for implementing the model generation method or the indicator prediction method of an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily 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 the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0047] Figure 1 It is a flow chart of a model generation method provided in an embodiment of the present invention. This embodiment can be applied to the case where an indicator prediction model for predicting a target indicator is trained, and the indicator prediction model can be particularly used to predict the risk score of the target user under the risk indicator. The method can be executed by the model generation device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware. The device can be integrated in an electronic device, and the electronic device can be various user terminals or servers.
[0048] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0049] S110: For each sample object of the at least two sample objects, determine an associated object of the at least two sample objects that has an associated relationship with the sample object.
[0050] The sample object can be understood as an object involved in the model training process, which can be a person (ie, a user) or an object, which depends on the actual situation and is not specifically limited here. The number of sample objects can be two or more, which is not specifically limited here.
[0051] For each sample object in at least two sample objects, the associated object corresponding to the sample object can be understood as the sample object in at least two sample objects that has an associated relationship with the sample object, specifically, it can be understood as the sample object in the remaining objects that has an associated relationship with the sample object, and the remaining objects can include sample objects other than the sample object in at least two sample objects. The number of associated objects can be one, two or more, which is related to the actual situation and is not specifically limited here. The specific form of the above-mentioned association relationship is related to the actual situation, for example, it can be an interactive relationship between people (i.e., a social relationship), a category relationship between objects, or an ownership relationship between people and objects, etc.
[0052] In conjunction with application scenarios that may be involved in the embodiments of the present invention, optionally, determining an associated object that has an associated relationship with the sample object among the at least two sample objects includes: taking a sample object that interacts with the sample object through the same medium among the at least two sample objects as an associated object that has an associated relationship with the sample object; and / or taking a sample object that interacts with the sample object among the at least two sample objects and the interaction is not achieved with the aid of any medium as an associated object.
[0053] Among them, the above-mentioned medium can be understood as a medium for assisting the interaction between two sample objects, such as a shopping platform, a communication application, or a communication number, etc., which is not specifically limited here. In combination with the application scenarios that may be involved in the embodiments of the present invention, illustratively, taking a sample user as an example, for the former, the sample user who places an order with the sample user through the same mobile phone number can be regarded as an associated user, and the mobile phone number is the medium; for the latter, the sample user who directly talks with the sample user or shares goods with the sample user can be regarded as an associated user. At this time, the two interact directly without the help of any medium. On this basis, Figure 2 As shown, a social relationship network between sample users can be constructed.
[0054] S120 , taking the sample object and the associated object as sample nodes respectively, and generating sample edges for connecting the sample nodes corresponding to the sample object and the sample nodes corresponding to the associated object.
[0055] The sample object and the associated object are respectively used as sample nodes, and a sample edge is generated for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object.
[0056] When each sample object is processed based on the above two steps, each sample object corresponds to its own sample node, that is, the number of sample nodes is at least two, and at least two sample objects correspond one-to-one to at least two sample nodes; and, every two sample objects that are associated with each other in at least two sample objects correspond to their own sample edges.
[0057] S130. Construct a sample graph based on sample nodes and sample edges corresponding to at least two sample objects, wherein node features of each sample node in the sample graph are used to characterize sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator.
[0058] Among them, based on the sample nodes and sample edges corresponding to at least two sample objects, a sample graph is constructed. Specifically, for each sample in all sample edges, two corresponding sample nodes are connected based on the sample edge, so as to construct a sample graph.
[0059] It should be noted that, for each of the at least two sample nodes in the sample graph, the node feature of the sample node is used to characterize the sample feature of the sample object corresponding to the sample node, that is, the sample feature of a sample object is represented by the node feature of the sample node corresponding to the sample object. Moreover, the sample feature is related to the target indicator for which there is a forecast demand. In combination with the application scenarios that may be involved in the embodiments of the present invention, for example, when the target indicator is a risk indicator in a credit business, the sample feature may include pre-loan features and loan features.
[0060] S140. Train the original prediction model through the sample graph to obtain an indicator prediction model, wherein the indicator prediction model is used to predict the target indicator.
[0061] As described above, the node features of the sample nodes in the sample graph can be used to characterize the sample features related to the target indicator. Therefore, by training the original prediction model through the sample graph, an indicator prediction model for predicting the target indicator can be obtained. In practical applications, the model training can be optionally performed based on a variety of methods such as supervised, semi-supervised or unsupervised, which are not specifically limited here.
[0062] It should be noted that, in combination with the application scenarios that may be involved in the embodiments of the present invention, when the target indicators include risk indicators, taking into account the aggregation and transmission of risks, the above-mentioned technical solution establishes and utilizes the social relationship network of sample objects for model training, thereby better ensuring the prediction ability of the trained indicator prediction model for risk indicators. At this time, the indicator prediction model can be understood as an application scoring model for personal risk prediction.
[0063] The technical solution in the embodiment of the present invention, for each sample object among at least two sample objects, by determining the associated object that has an associated relationship with the sample object among at least two sample objects, and taking the sample object and the associated object as sample nodes respectively, generates a sample edge for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object; based on the sample nodes and sample edges respectively corresponding to at least two sample objects, a sample graph is constructed, and the node features of each sample node in the sample graph are respectively used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator; the original prediction model is trained through the sample graph to obtain an indicator prediction model for predicting the target indicator. In the above technical solution, in the model training process, not only the sample features of the sample object itself are used, but also the sample features of the associated objects of the sample object are fully utilized, which helps to improve the prediction ability of the indicator prediction model obtained by the training for the target indicator, thereby achieving accurate prediction of the target indicator.
[0064] An optional technical solution, the original prediction model includes a graph neural network model, and the original prediction model is trained by a sample graph to obtain an indicator prediction model, including: inputting the sample graph into the graph neural network model, training the graph neural network model, and obtaining the indicator prediction model. Among them, in order to fully and directly utilize the unstructured data such as the sample graph, there is no need to manually process the sample graph before reuse. The original prediction model can be constructed based on the graph neural network (GNN) model to directly process the sample graph through the GNN model, that is, the sample graph is used end-to-end for modeling, thereby improving the modeling efficiency and information utilization, thereby further improving the prediction accuracy of the indicator prediction model.
[0065] Figure 3 It is a flowchart of another model generation method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, before each sample object in at least two sample objects, the above-mentioned model generation method also includes: for each sample time slice in at least two sample time slices, determining at least two sample objects corresponding to the sample time slice; constructing a sample graph, including: constructing a sample graph corresponding to the sample time slice, wherein the sample features correspond to the sample time slice; the above-mentioned model generation method may also include: aggregating the sample graphs corresponding to at least two sample time slices respectively to obtain a spatiotemporal graph; training the original prediction model through the sample graph to obtain an indicator prediction model, including: training the original prediction model through the spatiotemporal graph to obtain an indicator prediction model. The explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0066] See also Figure 3The method of this embodiment may specifically include the following steps:
[0067] S210. For each sample time slice of at least two sample time slices, determine at least two sample objects corresponding to the sample time slice.
[0068] Among them, the sample time slice can be understood as the result of slicing the sample time period according to the preset time unit. The preset time unit can be understood as a preset time-related unit, such as month, day or hour, etc., which is not specifically limited here. The number of sample time slices can be two or more, which is related to the specific settings of the sample time period and the preset time unit, and is not specifically limited here. For example, assuming that the sample time period is the fourth quarter of 2022 and the preset time unit is month, the sample time slices can be October 2022, November 2022 and December 2022.
[0069] For each sample time slice of at least two sample time slices, at least two sample objects corresponding to the sample time slice are determined. The at least two sample objects can be understood as sample objects that have an associated relationship on the sample time slice. In combination with the application scenarios that may be involved in the embodiments of the present invention, the at least two sample objects can be understood as sample users interacting on the sample time slice. It should be noted that the at least two sample objects corresponding to different sample time slices may be completely the same or may be different. This is related to the actual situation and is not specifically limited here.
[0070] S220: For each sample object of the at least two sample objects, determine an associated object of the at least two sample objects that has an associated relationship with the sample object.
[0071] S230 , taking the sample object and the associated object as sample nodes respectively, and generating sample edges for connecting the sample nodes corresponding to the sample object and the sample nodes corresponding to the associated object.
[0072] S240. Based on the sample nodes and sample edges corresponding to at least two sample objects, a sample graph corresponding to the sample time slice is constructed, wherein the node features of each sample node in the sample graph corresponding to the sample time slice are used to characterize the sample features of the sample object corresponding to the sample node on the sample time slice, and the sample features are related to the target indicator.
[0073] S210-S240 are processed in units of a single sample time slice, thereby constructing a sample graph corresponding to at least two sample time slices. Figure 4a, which shows the sample graphs (i.e., time subgraphs) constructed for different time slices. Of course, each time subgraph shown here is only a part of the complete time subgraph, that is, it only shows some sample nodes centered on a certain sample node, not all sample nodes.
[0074] It should be noted that, for each sample graph in the at least two sample graphs obtained, the node features of each sample node in the sample graph can be used to characterize the sample features of the sample object corresponding to the sample node at the sample time slice corresponding to the sample graph. Exemplarily, continuing with the above example, for the sample graph corresponding to October 2022, the node features of each sample node therein can be the pre-loan features and mid-loan features of the sample object corresponding to the sample node in October 2022.
[0075] S250 , aggregate the sample graphs corresponding to at least two sample time slices to obtain a spatiotemporal graph.
[0076] Among them, in actual applications, the aggregation process of the sample graph can be implemented in a variety of ways, for example, aggregation can be performed in units of sample users and sample time slices, or in units of sample users. Of course, aggregation can also be performed based on other methods, which are not specifically limited here. Exemplarily, here, taking aggregation as a unit of sample users as an example, for the sample graphs corresponding to at least two sample time slices, the sample nodes corresponding to the same sample object in at least two sample graphs can be aggregated. On this basis, optionally, the time information used to characterize the sample time slices can be recorded on the aggregated sample nodes. The spatiotemporal graph thus constructed can reflect the sample characteristics of each sample object at different sample time slices, that is, it can reflect the changes in the sample characteristics of each sample object over time. When training a model based on such a spatiotemporal graph, it can help the model pay attention to the temporal nature of the sample characteristics, which can help improve the accuracy of risk indicator prediction in application scenarios where personal risks change dynamically over time. Exemplarily, Figure 4b Demonstrated based on Figure 4a The spatiotemporal graph obtained by aggregating the three sample graphs in .
[0077] S260. Train the original prediction model through the space-time graph to obtain an indicator prediction model, wherein the indicator prediction model is used to predict the target indicator.
[0078] The technical solution of the embodiment of the present invention constructs sample graphs for different sample time slices respectively, and aggregates these sample graphs to obtain a spatiotemporal graph, so as to train a model (i.e., modeling) based on the spatiotemporal graph. This helps in the modeling process to no longer just utilize the sample features on one time section, but to capture the change information of the sample features on different sample time slices, so as to better utilize the time series information of the sample features, thereby further improving the prediction accuracy of the trained indicator prediction model.
[0079] Figure 5 It is a flowchart of another model generation method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the edge features of each sample edge in the sample graph corresponding to the sample time slice are used to characterize the sample time slice, and the original prediction model includes a graph neural network model, and the graph neural network model includes at least a time series neural network; the original prediction model is trained through the space-time graph to obtain an indicator prediction model, which may include: inputting the space-time graph into the time series neural network, so as to aggregate the node features of each sample node in the space-time graph according to the edge features of each sample edge in the space-time graph through the time series neural network; and training the indicator prediction model according to the time series features output by the time series neural network. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0080] See also Figure 5 The method of this embodiment may specifically include the following steps:
[0081] S310. For each sample time slice of at least two sample time slices, determine at least two sample objects corresponding to the sample time slice.
[0082] S320: For each sample object of the at least two sample objects, determine an associated object that has an associated relationship with the sample object in the at least two sample objects.
[0083] S330 , taking the sample object and the associated object as sample nodes respectively, and generating sample edges for connecting the sample nodes corresponding to the sample object and the sample nodes corresponding to the associated object.
[0084] S340. Based on the sample nodes and sample edges corresponding to at least two sample objects, a sample graph corresponding to the sample time slice is constructed, wherein the node features of each sample node in the sample graph corresponding to the sample time slice are used to characterize the sample features of the sample object corresponding to the sample node on the sample time slice, and the sample features are related to the target indicator; and the edge features of each sample edge in the sample graph corresponding to the sample time slice are used to characterize the sample time slice.
[0085] S350 , aggregate the sample graphs corresponding to at least two sample time slices to obtain a spatiotemporal graph.
[0086] Among them, for each sample time slice of at least two sample time slices, since the edge features of each sample edge in the sample graph corresponding to the sample time slice are used to characterize the sample time slice, therefore on the basis of aggregating each sample graph to obtain the space-time graph, the edge features of each sample edge in the space-time graph can reflect the sample time slice generated by the association relationship between the sample objects corresponding to the two sample nodes connected thereto, so such sample edges can also be called time edges.
[0087] S360, the graph neural network model includes at least a time series neural network, and the space-time graph is input into the time series neural network so that the node features of each sample node in the space-time graph are aggregated according to the edge features of each sample edge in the space-time graph through the time series neural network.
[0088] Among them, in order to better utilize the time series information in the space-time diagram, a time series neural network is set in the GNN model, that is, the time series neural network can be understood as part or all of the GNN model. In practical applications, the time series neural network can be a long short-term memory network (LSTM), a recurrent neural network (RNN), or a gated recurrent neural network (GRU) and other neural networks related to time series, which are not specifically limited here. Compared with the weighted sum network, the time series neural network can make better use of the time series information, which helps to improve the prediction accuracy of the indicator prediction model obtained by training.
[0089] Specifically, the space-time graph is input into the time series neural network, so that the time series neural network aggregates the node features of each sample node in the space-time graph according to the edge features of each sample edge in the space-time graph, that is, according to the sample time slices corresponding to each sample edge in the space-time graph, to obtain the time series features.
[0090] S370. According to the time series features output by the time series neural network, an indicator prediction model corresponding to the graph neural network model is trained, wherein the indicator prediction model is used to predict the target indicator.
[0091] The technical solution of the embodiment of the present invention processes the time series information in the space-time graph by utilizing the time series neural network in the GNN model, thereby achieving the effect of aggregating node features according to the time series information.
[0092] On the basis of the above technical solution, optionally, according to the edge features of each sample edge in the space-time graph, the node features of each sample node in the space-time graph are aggregated, including:
[0093] For each sample node in the space-time graph, the sample node connected to the sample node in the space-time graph is used as an associated node, and the sample edge used to connect the sample node and the associated node in the space-time graph is used as an associated edge;
[0094] According to the obtained edge feature of at least one associated edge, the node feature of the sample node and the obtained node feature of at least one associated node are aggregated.
[0095] The number of sample nodes in the space-time graph can be two or more, which depends on the actual situation and is not specifically limited here. The following technical solutions are all explained from the perspective of any sample node among all sample nodes, that is, each sample node among all sample nodes is processed separately.
[0096] Specifically, for any sample node in the space-time graph, the sample node connected to the sample node in the space-time graph is used as an associated node, and the sample edge used to connect the sample node and the associated node in the space-time graph is used as an associated edge. It should be noted that the number of associated nodes corresponding to the sample node can be one, two or more, and the associated edges corresponding to the sample node correspond to the associated nodes one by one. Further, according to the edge features of at least one associated edge, the node features of the sample node and the node features of the associated nodes corresponding to the at least one associated edge are aggregated. The above technical solution can aggregate all node features related to the sample node to the sample node according to the timing information, thereby obtaining the timing features of the sample node, which can be used to train the GNN model.
[0097] On this basis, an optional technical solution is that the graph neural network model also includes a feature splicing network, and the original prediction model is trained through the spatiotemporal graph to obtain an indicator prediction model, which also includes (or in other words, the above model generation method also includes):
[0098] Inputting the spatiotemporal graph into a feature concatenation network, so that for each associated node in the obtained at least one associated node, the node feature of the sample node and the node feature of the associated node are concatenated through the feature concatenation network to obtain a relational feature of the sample node;
[0099] Outputting at least one relational feature of the obtained sample node;
[0100] Input the spatiotemporal graph into the temporal neural network, including:
[0101] Inputting at least one relational feature into a temporal neural network;
[0102] Aggregating the node features of the sample node and the node features of the at least one associated node obtained according to the edge features of the at least one associated edge obtained, including:
[0103] At least one relationship feature is aggregated according to the obtained edge feature of at least one associated edge.
[0104] Among them, the feature splicing network and the time series neural network are both part of the GNN model. The spatiotemporal graph is input into the feature splicing network. Here, from the perspective of the sample node processed above, the node feature of the sample node and the node feature of each associated node in at least one associated node can be spliced separately through the feature splicing network, so as to obtain at least one relationship feature of the sample node, and the at least one relationship feature corresponds to the at least one associated node one by one. Then, the at least one relationship feature is input into the time series neural network, so that the at least one relationship feature can be aggregated according to the edge feature of at least one associated edge through the time series neural network to obtain the time series feature of the sample node.
[0105] Another optional technical solution is that the graph neural network model also includes a reverse update network, and according to the time series features output by the time series neural network, an indicator prediction model corresponding to the graph neural network model is trained, including:
[0106] Obtaining the temporal characteristics of the sample nodes output by the temporal neural network;
[0107] Inputting the time series features into the reverse update network, so as to update the node features of the sample nodes based on the time series features through the reverse update network;
[0108] The loss is calculated according to the node characteristics of the sample nodes, and the parameters in the graph neural network model are updated based on the obtained loss value to obtain the indicator prediction model.
[0109] Among them, the time series neural network and the reverse update network are both part of the GNN model. Here, we continue to stand from the perspective of the sample node processed above, and input the time series features of the sample node output by the time series neural network into the reverse update network, so that the node features of the sample node can be updated based on the time series features of the sample node through the reverse update network, so as to calculate the loss based on the updated node features, and update or adjust the parameters in the GNN model based on the obtained loss value. When each sample node is processed based on the above steps, the indicator prediction model can be trained.
[0110] On this basis, it is optional to obtain an indicator prediction model, including:
[0111] Return to the step of inputting the spatiotemporal graph into the temporal neural network;
[0112] When the number of inputs to the time series neural network is a preset threshold, an indicator prediction model is obtained based on the graph neural network model after parameter update.
[0113] Among them, in order to further improve the prediction accuracy of the index prediction model obtained by training, more node features can be aggregated to the sample node for model training, which can be achieved by training the GNN model for a preset number of rounds of thresholds. Specifically, the preset number of thresholds can be understood as a pre-set threshold related to the number of inputs, which can be used to characterize the rounds of training the GNN model. In conjunction with the embodiments of the present invention, the preset number of thresholds can be specifically understood as the neighbor order of the sample node, which can be used to characterize the number of layers of node features that need to be aggregated to the sample node.
[0114] Exemplarily, it is assumed that the spatiotemporal graph is represented by DCAB, that is, the spatiotemporal graph includes four sample nodes A, B, C and D, and D is connected to C, C to A, and A to B, respectively, wherein C and B are first-order neighbors of A and D is a second-order neighbor of A. On this basis, after the first round of parallel processing completes the four sample nodes, the node features of C and B have been aggregated to A, and the node features of D have been aggregated to C; further, after the second round of parallel processing completes the four sample nodes, the node features of C are aggregated to A again. It should be noted that, since the node features of C at this time already carry the node features of D, after the second round of parallel processing, the node features of D have also been aggregated to A. From the above, it can be seen that by inputting the spatiotemporal graph into the GNN model for multiple rounds of training, the node features of more neighbors can be aggregated to the sample nodes, thereby improving the prediction accuracy of the indicator prediction model.
[0115] In order to better understand the above-mentioned technical solutions as a whole, the following is an exemplary description of the above-mentioned technical solutions in combination with specific examples. Figure 6 As shown in Figure 1, the GNN model includes a feature concatenation network, a temporal neural network f(x), and a reverse update network. Based on the obtained spatiotemporal graph, we take the processing of sample node i in the spatiotemporal graph as an example, and the remaining sample nodes are processed in parallel:
[0116] First, the spatiotemporal graph is input into the feature concatenation network, and the node feature h of the sample node i is concatenated into i And the node feature h of the associated node j of the sample node i j Then, the node features after splicing are compressed to the required dimension through mapping a to obtain the relationship feature e between sample node i and sample node j ij , as shown in the following formula, N iis the set of all associated nodes (i.e. neighboring nodes) of sample node i;
[0117] e ij =a(concat(h i ,h j )),j∈N i .
[0118] Then, all the relationship features e of sample node i are ij Input to f(x), aggregate all the relationship features through f(x) to obtain the time series feature h of sample node i i ′, as shown in the following formula. In practical applications, the aggregation method here can be determined in combination with the optimization goal of the GNN model. For example, in the application scoring scenario, the more recently associated neighbors have, the greater the risk gain for predicting the user. Therefore, LSTM can be used here to calculate the risk of the user according to the relationship feature e ij The corresponding edge features (i.e. the time information of the relationship features) are aggregated:
[0119] h i ′=f(e ij ,j∈N i ).
[0120] Finally, the time series feature h i ′ is input into the reverse update network, and the time series feature h i ′, after being compressed to two dimensions using a layer of neural network, the loss value is calculated and reversely updated.
[0121] The above three steps are repeated k times (i.e., a preset number of times) to train an indicator prediction model.
[0122] Figure 7 A flowchart of an indicator prediction method provided in an embodiment of the present invention. This embodiment is applicable to the case of predicting a target indicator, and is particularly applicable to the case of predicting the risk score of a target user under a risk indicator. The method can be executed by an indicator prediction device provided in an embodiment of the present invention, which can be implemented by software and / or hardware, and can be integrated in an electronic device, which can be various user terminals or servers.
[0123] See also Figure 7 The method of the embodiment of the present invention specifically includes the following steps:
[0124] S410: For each target object among the at least two target objects, determine a relationship object among the at least two target objects that has an association relationship with the target object.
[0125] Among them, the target object can be understood as an object for which there is a prediction demand for the target indicator, and the number can be two or more, which is not specifically limited here. It should be noted that at least two target objects and at least two sample objects can completely overlap, partially overlap, or not overlap at all. This can be determined according to the actual situation and is not specifically limited here. In addition, the target object and the sample object are essentially the same. They are named differently here just to distinguish between the model application stage and the model training stage. This description also applies to the remaining "targets" and "samples", "relationship objects" and "associated objects", and "aggregation graphs" and "space-time graphs", and will not be repeated in the following.
[0126] S420: The target object and the relationship object are respectively used as target nodes, and a target edge is generated for connecting the target node corresponding to the target object and the target node corresponding to the relationship object.
[0127] S430. Construct a target graph based on target nodes and target edges corresponding to at least two target objects, wherein node features of each target node in the target graph are used to characterize target features of the target object corresponding to the target node, and the target features are related to the target indicator.
[0128] S440. Obtain an indicator prediction model generated by the model generation method provided in any embodiment of the present invention, and input the target graph into the indicator prediction model, and obtain the predicted value of each target object under the target indicator according to the output result of the indicator prediction model.
[0129] The technical solution of the embodiment of the present invention achieves the effect of accurately predicting the predicted value of each target object under the target indicator, that is, the effect of accurately predicting the target indicator.
[0130] In an optional technical solution, before targeting each of the at least two target objects, the above-mentioned indicator prediction method may further include: for each of the at least two target time slices, determining at least two target objects corresponding to the target time slice;
[0131] Constructing a target graph includes: constructing a target graph corresponding to a target time slice, wherein the target feature corresponds to the target time slice;
[0132] The above-mentioned indicator prediction method further includes: aggregating the target graphs corresponding to at least two target time slices respectively to obtain an aggregated graph;
[0133] The target graph is input into the indicator prediction model, and the prediction value of each target object under the target indicator is obtained according to the output result of the indicator prediction model, including: the aggregation graph is input into the indicator prediction model, and the prediction value of the target object corresponding to each target node in the aggregation graph under the target indicator is obtained according to the output result of the indicator prediction model.
[0134] The above technical solution can further improve the accuracy of the prediction value by capturing the change information of the target feature at different target time slices. In practical applications, optionally, in the time dimension, the target time slice can be later than the sample time slice.
[0135] Figure 8 This is a structural block diagram of a model generation device provided in an embodiment of the present invention, and the device is used to execute the model generation method provided in any of the above embodiments. The device and the model generation method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the model generation device can refer to the embodiment of the above model generation method. Figure 8 The device may specifically include: an associated object determination module 510, a sample edge generation module 520, a sample graph construction module 530 and an indicator prediction model acquisition module 540.
[0136] The associated object determination module 510 is used to determine, for each sample object in at least two sample objects, an associated object in at least two sample objects that has an associated relationship with the sample object;
[0137] A sample edge generation module 520, used to take the sample object and the associated object as sample nodes respectively, and generate a sample edge for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object;
[0138] A sample graph construction module 530 is used to construct a sample graph based on sample nodes and sample edges corresponding to at least two sample objects, wherein the node features of each sample node in the sample graph are used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator;
[0139] The indicator prediction model obtaining module 540 is used to train the original prediction model through the sample graph to obtain the indicator prediction model, wherein the indicator prediction model is used to predict the target indicator.
[0140] Optionally, the original prediction model includes a graph neural network model, and the indicator prediction model obtaining module 540 is specifically used for:
[0141] By inputting the sample graph into the graph neural network model, the graph neural network model is trained to obtain the indicator prediction model.
[0142] Optionally, the above-mentioned model generation device further includes:
[0143] A sample object determination module, configured to determine, before determining each sample object of the at least two sample objects, at least two sample objects corresponding to the sample time slice for each sample time slice of the at least two sample time slices;
[0144] The sample graph construction module 530 may include:
[0145] A sample graph construction unit, used to construct a sample graph corresponding to a sample time slice, wherein the sample features correspond to the sample time slice;
[0146] The above-mentioned model generation device further includes:
[0147] A spatiotemporal graph obtaining module, used for aggregating sample graphs corresponding to at least two sample time slices to obtain a spatiotemporal graph;
[0148] The indicator prediction model obtaining module 540 includes:
[0149] The indicator prediction model obtaining submodule is used to train the original prediction model through the space-time graph to obtain the indicator prediction model.
[0150] On this basis, an optional space-time graph acquisition module is specifically used to:
[0151] For the sample graphs corresponding to at least two sample time slices respectively, the sample nodes corresponding to the same sample object in the at least two sample graphs are aggregated to construct a spatiotemporal graph.
[0152] Alternatively, the edge features of each sample edge in the sample graph corresponding to the sample time slice are used to characterize the sample time slice, and the original prediction model includes a graph neural network model, which includes at least a time series neural network:
[0153] The indicator prediction model has submodules, including:
[0154] A node feature aggregation unit, used for inputting the space-time graph into the time series neural network, so as to aggregate the node features of each sample node in the space-time graph according to the edge features of each sample edge in the space-time graph through the time series neural network;
[0155] The indicator prediction model obtaining unit is used to train the indicator prediction model according to the time series features output by the time series neural network.
[0156] On this basis, the node feature aggregation unit is optional, including:
[0157] The associated edge obtaining subunit is used for taking, for each sample node in the space-time graph, a sample node connected to the sample node in the space-time graph as an associated node, and taking a sample edge in the space-time graph for connecting the sample node and the associated node as an associated edge;
[0158] The node feature aggregation subunit is used to aggregate the node features of the sample node and the obtained node features of at least one associated node according to the obtained edge features of at least one associated edge.
[0159] On this basis, optionally, the graph neural network model also includes a feature concatenation network, and the indicator prediction model obtains a submodule, and also includes:
[0160] A relation feature obtaining unit is used to input the spatiotemporal graph into a feature splicing network, so as to obtain a relation feature of the sample node by splicing the node feature of the sample node and the node feature of the associated node for each associated node in the obtained at least one associated node through the feature splicing network;
[0161] A relationship feature output unit, used to output at least one relationship feature of the obtained sample node;
[0162] The node feature aggregation unit also includes:
[0163] A relation feature input subunit, used for inputting at least one relation feature into the temporal neural network;
[0164] The node feature aggregation subunit is specifically used for:
[0165] At least one relationship feature is aggregated according to the obtained edge feature of at least one associated edge.
[0166] Alternatively, the graph neural network model may further include a reverse update network, and the indicator prediction model obtains a unit, including:
[0167] A time series feature obtaining subunit is used to obtain the time series features of the sample nodes output by the time series neural network;
[0168] A node feature updating subunit, used for inputting the time series feature into the reverse updating network, so as to update the node feature of the sample node based on the time series feature through the reverse updating network;
[0169] The indicator prediction model obtains a subunit, which is used to calculate the loss according to the node characteristics of the sample nodes, and updates the parameters in the graph neural network model based on the obtained loss value to obtain the indicator prediction model.
[0170] On this basis, optionally, the indicator prediction model obtains subunits, which are specifically used for:
[0171] Return to the step of inputting the spatiotemporal graph into the temporal neural network;
[0172] When the number of inputs to the time series neural network is a preset threshold, an indicator prediction model is obtained based on the graph neural network model after parameter update.
[0173] Optionally, the associated object determination module 510 includes:
[0174] a first associated object determining unit, configured to use a sample object that interacts with the sample object through the same medium among at least two sample objects as an associated object that has an associated relationship with the sample object;
[0175] and / or,
[0176] The associated object second determining unit is configured to take, as an associated object, a sample object among the at least two sample objects that interacts with the sample object and the interaction is not achieved by any medium.
[0177] The model generation device provided by the embodiment of the present invention cooperates with each other through the associated object determination module and the sample edge generation module, for each sample object in at least two sample objects, determines the associated object in at least two sample objects that has an associated relationship with the sample object, and uses the sample object and the associated object as sample nodes respectively, and generates sample edges for connecting the sample nodes corresponding to the sample object and the sample nodes corresponding to the associated object; through the sample graph construction module, based on the sample nodes and sample edges respectively corresponding to at least two sample objects, a sample graph is constructed, and the node features of each sample node in the sample graph are respectively used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator; through the indicator prediction model acquisition module, the original prediction model is trained through the sample graph to obtain the indicator prediction model for predicting the target indicator. In the above device, during the model training process, not only the sample features of the sample object itself are used, but also the sample features of the associated objects of the sample object are fully utilized, which helps to improve the prediction ability of the indicator prediction model trained thereby for the target indicator, thereby achieving accurate prediction of the target indicator.
[0178] The model generation device provided in the embodiment of the present invention can execute the model generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0179] It is worth noting that in the embodiment of the above-mentioned model generation device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0180] Fig. 9 This is a structural block diagram of an indicator prediction device provided in an embodiment of the present invention, and the device is used to execute the indicator prediction method provided in any of the above embodiments. The device and the indicator prediction method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the indicator prediction device, refer to the embodiment of the above indicator prediction method. Fig. 9 The device may specifically include: a relationship object determination module 610, a target edge generation module 620, a target graph construction module 630 and a prediction value acquisition module 640.
[0181] The relationship object determination module 610 is used to determine, for each target object among the at least two target objects, a relationship object that has an association relationship with the target object among the at least two target objects;
[0182] A target edge generation module 620 is used to take the target object and the relationship object as target nodes respectively, and generate a target edge for connecting the target node corresponding to the target object and the target node corresponding to the relationship object;
[0183] A target graph construction module 630 is used to construct a target graph based on target nodes and target edges corresponding to at least two target objects, wherein the node features of each target node in the target graph are used to characterize the target features of the target object corresponding to the target node, and the target features are related to the target indicator;
[0184] The prediction value obtaining module 640 is used to obtain the indicator prediction model generated by the model generation method provided in any embodiment of the present invention, and input the target graph into the indicator prediction model, and obtain the prediction value of each target object under the target indicator according to the output result of the indicator prediction model.
[0185] Optionally, the above indicator prediction device further includes:
[0186] A target object determination module, used for determining at least two target objects corresponding to the target time slice for each of the at least two target time slices before determining each of the at least two target objects;
[0187] The target graph construction module 630 includes:
[0188] A target graph construction unit, used to construct a target graph corresponding to a target time slice, wherein the target feature corresponds to the target time slice;
[0189] The above-mentioned indicator prediction device further includes:
[0190] An aggregate graph obtaining module, used for aggregating target graphs corresponding to at least two target time slices respectively to obtain an aggregate graph;
[0191] The prediction value is obtained in module 640, including:
[0192] The prediction value obtaining unit is used to input the aggregation graph into the indicator prediction model, and obtain the prediction value of the target object corresponding to each target node in the aggregation graph under the target indicator according to the output result of the indicator prediction model.
[0193] The indicator prediction device provided by the embodiment of the present invention achieves the effect of accurately predicting the predicted value of each target object under the target indicator, that is, the effect of accurately predicting the target indicator, through the mutual cooperation of the relationship object determination module, the target edge generation module, the target graph construction module and the prediction value acquisition module.
[0194] The indicator prediction device provided in the embodiment of the present invention can execute the indicator prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0195] It is worth noting that in the embodiment of the above-mentioned indicator prediction device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0196] Fig.10 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0197] like Fig.10As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0198] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0199] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a model generation method or an indicator prediction method.
[0200] In some embodiments, the model generation method or the indicator prediction method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the model generation method or the indicator prediction method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the model generation method or the indicator prediction method in any other appropriate manner (e.g., by means of firmware).
[0201] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0202] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0203] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0204] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0205] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0206] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0207] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0208] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A model generation method, characterized in that: include: For each sample object of at least two sample objects, determining an associated object of the at least two sample objects that has an associated relationship with the sample object; The sample object and the associated object are respectively used as sample nodes, and a sample edge is generated for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object; Based on the sample nodes and sample edges respectively corresponding to the at least two sample objects, a sample graph is constructed, wherein the node features of each sample node in the sample graph are respectively used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator; The original prediction model is trained by the sample graph to obtain an indicator prediction model, wherein the indicator prediction model is used to predict the target indicator.
2. The method according to claim 1, characterized in that The original prediction model includes a graph neural network model. The original prediction model is trained by the sample graph to obtain an indicator prediction model, including: By inputting the sample graph into the graph neural network model, the graph neural network model is trained to obtain an indicator prediction model.
3. The method according to claim 1, characterized in that Before the step of performing ... For each sample time slice of at least two sample time slices, determining the at least two sample objects corresponding to the sample time slice; The construction obtains a sample graph, including: Constructing a sample graph corresponding to the sample time slice, wherein the sample feature corresponds to the sample time slice; The method further comprises: Aggregating the sample graphs respectively corresponding to the at least two sample time slices to obtain a spatiotemporal graph; The method of training the original prediction model by using the sample graph to obtain the indicator prediction model includes: The original prediction model is trained through the space-time graph to obtain an indicator prediction model.
4. The method according to claim 3, characterized in that The step of aggregating the sample graphs respectively corresponding to the at least two sample time slices to obtain a spatiotemporal graph includes: For the sample graphs respectively corresponding to the at least two sample time slices, the sample nodes corresponding to the same sample object in the at least two sample graphs are aggregated to construct a spatiotemporal graph.
5. The method according to claim 3, characterized in that: The edge features of each sample edge in the sample graph corresponding to the sample time slice are used to characterize the sample time slice, and the original prediction model includes a graph neural network model, and the graph neural network model includes at least a time series neural network; The original prediction model is trained by the spatiotemporal graph to obtain an indicator prediction model, including: Inputting the space-time graph into the temporal neural network, so as to aggregate node features of each sample node in the space-time graph according to edge features of each sample edge in the space-time graph through the temporal neural network; An indicator prediction model is trained based on the time series features output by the time series neural network.
6. The method according to claim 5, characterized in that According to the edge features of each sample edge in the space-time graph, node features of each sample node in the space-time graph are aggregated, including: For each sample node in the space-time graph, taking a sample node connected to the sample node in the space-time graph as an associated node, and taking a sample edge in the space-time graph used to connect the sample node and the associated node as an associated edge; According to the obtained edge feature of at least one associated edge, the node feature of the sample node and the obtained node feature of at least one associated node are aggregated.
7. The method according to claim 6, characterized in that The graph neural network model also includes a feature splicing network, and the original prediction model is trained by the spatiotemporal graph to obtain an indicator prediction model, and further includes: Inputting the spatiotemporal graph into the feature stitching network, so as to stitch the node feature of the sample node and the node feature of the associated node for each associated node in the at least one associated node obtained through the feature stitching network to obtain the relationship feature of the sample node; Outputting at least one relationship feature of the obtained sample node; The step of inputting the spatiotemporal graph into the temporal neural network comprises: Inputting the at least one relational feature into the temporal neural network; The step of aggregating the node features of the sample node and the node features of the at least one associated node obtained according to the edge features of the at least one associated edge obtained includes: The at least one relationship feature is aggregated according to the obtained edge feature of the at least one associated edge.
8. The method according to claim 6, characterized in that The graph neural network model also includes a reverse update network, and the indicator prediction model is trained according to the time series features output by the time series neural network, including: Obtaining the time series characteristics of the sample nodes output by the time series neural network; Inputting the time series feature into the reverse update network, so as to update the node feature of the sample node based on the time series feature through the reverse update network; The loss is calculated according to the node characteristics of the sample nodes, and the parameters in the graph neural network model are updated based on the obtained loss values to obtain an indicator prediction model.
9. The method according to claim 8, characterized in that The method for obtaining an indicator prediction model comprises: Return to the step of inputting the spatiotemporal graph into the temporal neural network; When the number of inputs to the time series neural network reaches a preset number threshold, an indicator prediction model is obtained based on the graph neural network model after parameter update.
10. The method according to claim 1, characterized in that The determining of an associated object in the at least two sample objects that has an associated relationship with the sample object includes: taking, among the at least two sample objects, a sample object that interacts with the sample object through the same medium as an associated object having an associated relationship with the sample object; and / or, The sample object among the at least two sample objects that interacts with the sample object and the interaction is not achieved by any medium is used as the associated object.
11. An indicator prediction method, characterized in that: include: For each target object among the at least two target objects, determining a relationship object among the at least two target objects that has an association relationship with the target object; The target object and the relationship object are respectively used as target nodes, and a target edge is generated for connecting the target node corresponding to the target object and the target node corresponding to the relationship object; Based on the target nodes and target edges respectively corresponding to the at least two target objects, a target graph is constructed, wherein the node features of each target node in the target graph are respectively used to characterize the target features of the target object corresponding to the target node, and the target features are related to the target indicator; Obtain an indicator prediction model generated by the model generation method according to any one of claims 1 to 10, and input the target graph into the indicator prediction model, and obtain the predicted value of each target object under the target indicator according to the output result of the indicator prediction model.
12. The method according to claim 11, characterized in that Before the step of targeting each of the at least two target objects, the method further includes: For each target time slice of at least two target time slices, determining the at least two target objects corresponding to the target time slice; The construction obtains a target graph, including: Constructing a target graph corresponding to the target time slice, wherein the target feature corresponds to the target time slice; The method further comprises: Aggregating the target graphs corresponding to the at least two target time slices respectively to obtain an aggregated graph; The step of inputting the target graph into the indicator prediction model and obtaining the predicted value of each target object under the target indicator according to the output result of the indicator prediction model comprises: The aggregation graph is input into the indicator prediction model, and according to the output result of the indicator prediction model, the prediction value of the target object corresponding to each target node in the aggregation graph under the target indicator is obtained respectively.
13. A model generation device, characterized in that: include: an associated object determining module, configured to determine, for each sample object among at least two sample objects, an associated object among the at least two sample objects that has an associated relationship with the sample object; A sample edge generation module, used to take the sample object and the associated object as sample nodes respectively, and generate a sample edge for connecting the sample node corresponding to the sample object and the sample node corresponding to the associated object; A sample graph construction module, used to construct a sample graph based on the sample nodes and sample edges respectively corresponding to the at least two sample objects, wherein the node features of each sample node in the sample graph are respectively used to characterize the sample features of the sample object corresponding to the sample node, and the sample features are related to the target indicator; The indicator prediction model obtaining module is used to train the original prediction model through the sample graph to obtain the indicator prediction model, wherein the indicator prediction model is used to predict the target indicator.
14. An indicator prediction device, characterized in that: include: A relationship object determination module, used for determining, for each target object among at least two target objects, a relationship object among the at least two target objects that has an association relationship with the target object; A target edge generation module, used to take the target object and the relationship object as target nodes respectively, and generate a target edge for connecting the target node corresponding to the target object and the target node corresponding to the relationship object; A target graph construction module, used to construct a target graph based on the target nodes and target edges respectively corresponding to the at least two target objects, wherein the node features of each target node in the target graph are respectively used to characterize the target features of the target object corresponding to the target node, and the target features are related to the target indicator; A prediction value obtaining module is used to obtain an indicator prediction model generated by the model generation method according to any one of claims 1 to 10, and input the target graph into the indicator prediction model, and obtain the prediction value of each target object under the target indicator according to the output result of the indicator prediction model.
15. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the model generation method as described in any one of claims 1-10, or the indicator prediction method as described in claim 11 or 12.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the model generation method as described in any one of claims 1 to 10, or the indicator prediction method as described in claim 11 or 12 when executed.
