Disclosure of Invention
In view of the above, it is necessary to provide a risk assessment method, apparatus, computer device and storage medium capable of improving the accuracy of risk assessment.
In a first aspect, the present application provides a method of risk assessment. The method comprises the following steps:
acquiring a target user within evaluation time, and determining a user association diagram corresponding to the evaluation time; the user association graph comprises a target node corresponding to the target user;
determining a plurality of neighbor node sets which are adjacent to the target node and located at different levels, and performing aggregation processing on the neighbor node sets to obtain target node characteristics of the target node;
determining historical time corresponding to the evaluation time, and acquiring a historical hidden state output by a risk evaluation model when the risk evaluation is carried out on the target user in the historical time;
determining an actual hidden state within the evaluation time according to the target node characteristics and the historical hidden state through the risk evaluation model;
and according to the actual hidden state, performing risk assessment on the target user within the assessment time to obtain a risk assessment result.
In one embodiment, determining the user association graph corresponding to the evaluation time includes: acquiring an initial association diagram; the initial association graph comprises a plurality of nodes and a plurality of connecting edges; the connecting edge comprises association time for association between each node; determining a target node of the target user in the initial association graph, and determining whether the association time corresponding to each connection edge belongs to the evaluation time; and if so, extracting the user association graph corresponding to the evaluation time from the initial association graph according to the connecting edge and the target node.
In one embodiment, before the obtaining the initial association map, the method further comprises: acquiring a plurality of nodes to be associated; the nodes to be associated comprise attribute characteristics of the users; the attribute features at least comprise account features, identity features and equipment features of the user; determining an incidence relation between each node to be associated; the association relationship at least comprises an invitation relationship, a spouse relationship and an equipment relationship; and associating the nodes to be associated according to the association relationship to obtain an initial association diagram.
In an embodiment, the aggregating the plurality of neighbor node sets to obtain the target node feature of the target node includes: determining a current level of a plurality of levels and a previous historical level of the current level; determining a first history feature of the target node under the history level and a second history feature corresponding to a neighbor node set of the history level; performing aggregation processing on the first historical characteristics and the second historical characteristics to obtain candidate node characteristics of a target node under the current level; taking the current level as a new history level, taking the candidate node feature as a new first history feature, and returning to the step of determining the first history feature of the target node under the history level and the second history feature corresponding to the neighbor node set of the history level to continue until the candidate node feature of the target node under the last level in the multiple levels is obtained; and taking the candidate node feature under the last level as the target node feature of the target node in the user association graph.
In one embodiment, the history level is a first level; the set of neighbor nodes comprises a plurality of neighbor nodes; the determining a first history feature of the target node under the history level and a second history feature corresponding to a neighbor node set of the history level includes: determining a first attribute feature in the target node, and encoding the first attribute feature through a preset encoder to obtain a first history feature of the target node under the history level; for each neighbor node in the neighbor node set of the history hierarchy, determining a second attribute characteristic corresponding to each neighbor node; mapping each second attribute feature to obtain a sub-history feature corresponding to each neighbor node; and synthesizing a plurality of sub-history characteristics to obtain a second history characteristic corresponding to the neighbor node set of the history level.
In an embodiment, the aggregating the first historical feature and the second historical feature to obtain a candidate node feature of the target node in the current level includes: carrying out mean processing on the first historical characteristic and the second historical characteristic through a preset mean function to obtain a mean historical characteristic; acquiring a history weight corresponding to the history level; and performing association processing on the average historical feature and the historical weight through a preset activation function to obtain candidate node features of the target node under the current level.
In one embodiment, the training step of the risk assessment model comprises: acquiring a plurality of sample association graphs corresponding to the target sample node, and determining sample node characteristics corresponding to each sample association graph and a node characteristic label of the target sample node; determining an initial sample association diagram in a plurality of sample association diagrams, and obtaining an evaluation submodel of a first round according to sample node characteristics corresponding to the initial sample association diagram and the node characteristic labels; determining a round sample association diagram in a plurality of sample association diagrams in a current round from a second round after the first round, and obtaining an evaluation submodel of the current round according to the evaluation submodel of the historical round, sample node characteristics corresponding to the round sample association diagram and the node characteristic labels; the historical round is at least one round prior to the current round; taking the next round as the current round, returning to the current round from the second round after the first round, determining the step of the round sample association diagram in the multiple sample association diagrams, and continuing to execute the step until the evaluation submodel of the current round is obtained; and integrating the evaluation sub-models corresponding to each current turn to obtain the risk evaluation model corresponding to the target sample node.
In one embodiment, obtaining the evaluation submodel of the current round according to the evaluation submodel of the historical round, the sample node feature corresponding to the round sample association graph and the node feature tag includes: determining a first hidden state output by the evaluation submodel for a historical round; determining a second hidden state of the current round according to the sample node characteristics corresponding to the round sample association graph and the first hidden state; determining the predicted output characteristics of the evaluation submodel of the current round according to the second hidden state; determining a loss function corresponding to the evaluation submodel of the current round according to the difference between the predicted output characteristics and the node characteristic labels; and updating the model parameters in the evaluation submodel of the current round through a loss function until the model parameters stop when a training stop condition is reached, and obtaining the trained evaluation submodel of the current round.
In a second aspect, the application further provides a risk assessment device. The device comprises:
the association diagram determining module is used for acquiring a target user within evaluation time and determining a user association diagram corresponding to the evaluation time; the user association graph comprises a target node corresponding to the target user;
a node characteristic determining module, configured to determine multiple neighbor node sets located at different levels and adjacent to the target node, and perform aggregation processing on the multiple neighbor node sets to obtain a target node characteristic of the target node;
the hidden state determining module is used for determining historical time corresponding to the evaluation time and acquiring a historical hidden state output by a risk evaluation model when the risk evaluation is carried out on the target user in the historical time; determining an actual hidden state within the evaluation time according to the target node characteristics and the historical hidden state through the risk evaluation model;
and the evaluation result determining module is used for carrying out risk evaluation on the target user within the evaluation time according to the actual hidden state to obtain a risk evaluation result.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
acquiring a target user within evaluation time, and determining a user association diagram corresponding to the evaluation time; the user association graph comprises a target node corresponding to the target user;
determining a plurality of neighbor node sets which are adjacent to the target node and located at different levels, and performing aggregation processing on the neighbor node sets to obtain target node characteristics of the target node;
determining historical time corresponding to the evaluation time, and acquiring a historical hidden state output by a risk evaluation model when the risk evaluation is carried out on the target user in the historical time;
determining an actual hidden state within the evaluation time according to the target node characteristics and the historical hidden state through the risk evaluation model;
and according to the actual hidden state, performing risk assessment on the target user within the assessment time to obtain a risk assessment result.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a target user within evaluation time, and determining a user association diagram corresponding to the evaluation time; the user association graph comprises a target node corresponding to the target user;
determining a plurality of neighbor node sets which are adjacent to the target node and located at different levels, and performing aggregation processing on the neighbor node sets to obtain target node characteristics of the target node;
determining historical time corresponding to the evaluation time, and acquiring a historical hidden state output by a risk evaluation model when the risk evaluation is carried out on the target user in the historical time;
determining an actual hidden state within the evaluation time according to the target node characteristics and the historical hidden state through the risk evaluation model;
and according to the actual hidden state, performing risk assessment on the target user within the assessment time to obtain a risk assessment result.
According to the risk assessment method, the risk assessment device, the computer equipment and the storage medium, the target user in the assessment time is obtained, and the user association graph corresponding to the assessment time is determined, wherein the user association graph comprises the target node corresponding to the target user; determining a plurality of neighbor node sets which are adjacent to a target node and located at different levels, and performing aggregation processing on the plurality of neighbor node sets to obtain target node characteristics of the target node; determining historical time corresponding to the evaluation time, and acquiring a historical hidden state output by a risk evaluation model when the risk evaluation model carries out risk evaluation on a target user in the historical time; determining an actual hidden state within evaluation time through a risk evaluation model according to the target node characteristics and the historical hidden state; and according to the actual hidden state, performing risk assessment on the target user within the assessment time to obtain a risk assessment result. According to the risk assessment method and system, different historical times are considered in the risk assessment process, and compared with a traditional mode that a neural network with a static frame is used for learning the credit worthiness of a borrower, risk assessment models corresponding to different historical times can be flexibly used for dynamically assessing risks of the target user within the assessment time, and therefore overdue risks of the target user at different times can be accurately predicted.
Meanwhile, the method adopts a mode of carrying out aggregation processing on the neighbor node set, so that the comprehensive consideration of credit worthiness information of the target user through the neighbor node set is realized, and the target node characteristics of the target user are ensured to be obtained in more detail and more accurately.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The risk assessment method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 and the server 104 may be used alone or in combination to execute the risk assessment method in the embodiment of the present application. Taking an example that the terminal 102 and the server 104 cooperate to execute the risk assessment method as an example, the terminal 102 is configured to send the target user within the obtained assessment time to the server 104. The server 104 is configured to determine a user association graph corresponding to the evaluation time, determine a plurality of neighbor node sets adjacent to the target node and located at different levels, and perform aggregation processing on the plurality of neighbor node sets to obtain a target node feature of the target node. The server 104 is further configured to determine historical time corresponding to the evaluation time, perform risk evaluation on the target user within the evaluation time through the risk evaluation model and the target node characteristics, obtain a risk evaluation result, and return the risk evaluation result to the terminal 102. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, a risk assessment method is provided, which is described by taking the method as an example applied to the computer device in fig. 1, where the computer device may be a terminal or a server in fig. 1, and includes the following steps:
step 202, obtaining a target user within the evaluation time, and determining a user association diagram corresponding to the evaluation time.
The user association graph comprises target nodes corresponding to target users; the target user is a target borrower needing risk assessment by the financial institution; the evaluation time may be a current time at which the financial institution needs to evaluate the target borrower, for example, when the current time is 9 months 10, the evaluation time may correspond to 9 months. It will be readily appreciated that the user association profiles for the target borrower at different evaluation times are not identical.
In one embodiment, determining the user association graph corresponding to the evaluation time comprises: acquiring an initial association diagram; determining a target node of a target user in the initial association graph, and determining whether the association time corresponding to each connection edge belongs to the evaluation time; and if the evaluation time belongs to the evaluation time, extracting a user association graph corresponding to the evaluation time from the initial association graph according to the connecting edge and the target node.
The initial association graph comprises a plurality of nodes and a plurality of connecting edges; the connecting edge comprises the association time for association between each node. As shown in fig. 3, fig. 3 is a schematic structural diagram of the initial association map.
Specifically, the computer device acquires an initial association graph which is associated in advance, and determines a target node to which a target user belongs in the initial association graph, for example, taking node 0 in fig. 3 as the target node. Because the associated edges between each node carry the associated time, the computer equipment can extract the associated edges of which the associated time belongs to the evaluation time, and delete the associated edges which do not belong to the evaluation time in the initial association graph to obtain the user association graph taking the target node as the center. For example, if the associated time of the continuous side of the arrow shape in fig. 3 belongs to the evaluation time, the associated time of the continuous side of the continuous shape does not belong to the evaluation time, and therefore, the user association map corresponding to the evaluation time can be determined.
In one embodiment, the computer device deletes the continuous edges of the initial association graph, the association time of which does not belong to the evaluation time, to obtain a candidate graph, and determines the special continuous edges in the candidate graph. The special connecting edge is a connecting edge which is not directly or indirectly associated with the target node. For example, if the association time of the connection edge 1 between the node 1 and the node 6 in fig. 3 belongs to the evaluation time, but the association time of the connection edge 2 between the node 0 and the node 1 does not belong to the evaluation time, the connection edge 1 at this time is a special connection edge, that is, the user association graph does not include the node 1 and the node 6.
In one embodiment, when the computer device acquires a plurality of historical times associated with the evaluation time, for each historical time in the plurality of historical times, the computer device extracts a continuous edge of the associated time belonging to the current historical time to obtain a user association graph corresponding to the current historical time. It is easy to understand that, since the process of determining the target node characteristics of the target node is basically the same through the user association graphs corresponding to different times, for simplification, the following embodiments only take the user association graph corresponding to the evaluation time as an example for explanation.
In one embodiment, before obtaining the initial association map, the method further comprises: acquiring a plurality of nodes to be associated; determining an association relation between each node to be associated; and associating the nodes to be associated according to the association relationship to obtain an initial association diagram.
Each node to be associated is used for representing a borrower, namely a user, and the node to be associated comprises attribute characteristics of the user; the attribute features at least include account features, identity features, device features, unit features and the like of the user. Because a certain social background relationship or interaction relationship may exist between any two borrowers, the association relationship between the nodes to be associated can be determined; the association relationship at least comprises an invitation relationship, a spouse relationship and an equipment relationship, wherein the invitation relationship represents a relationship that the borrower A invites the borrower B to register loan items, and the equipment relationship represents a relationship that the borrower A and the borrower B log in and use through the same equipment.
And 204, determining a plurality of neighbor node sets which are adjacent to the target node and are positioned at different levels, and performing aggregation processing on the plurality of neighbor node sets to obtain the target node characteristics of the target node.
In particular, the computer device may determine the different hierarchies via nodes that are directly or indirectly connected to the target node. Referring to fig. 3, the target node includes two levels of hierarchy, each level of hierarchy corresponding to a neighbor node set including a plurality of neighbor nodes. The neighbor node set of the first level includes node 2, node 4 and node 5, and the neighbor node set of the second level includes node 8, node 9, node 11, node 12, node 13 and node 15. The computer equipment carries out aggregation processing on neighbor node sets of different levels, candidate node characteristics of the target node under different levels can be determined, and when the aggregation processing is an iterative processing process, the candidate node characteristics under the last level can be used as the target node characteristics of the target node in the user association graph.
In one embodiment, for the user association graphs corresponding to the evaluation time and the plurality of historical times, when determining the target node characteristics of the target node in different user association graphs, the computer device stores the target node characteristics corresponding to different times in the memory storage module in a sequence form according to the time sequence between the evaluation time and the historical times.
Step 206, determining historical time corresponding to the evaluation time, and acquiring a historical hidden state output by the risk evaluation model when performing risk evaluation on the target user in the historical time.
The historical time can be any one of a plurality of historical times associated with the evaluation time, and it is easy to understand that the credit worthiness of the borrower is more easily and accurately embodied when the historical time is closer to the evaluation time. The plurality of historical times are not particularly limited, for example, when the evaluation time is 9 months, the plurality of historical times may be 7 months and 8 months, and may also be 4 months, 5 months, and 6 months, etc.
Specifically, the risk assessment model is obtained by determining target node characteristics corresponding to different historical times in the memory storage module, that is, the risk assessment model is trained through the target node characteristics corresponding to the different historical times. Because the risk assessment model at this time can be regarded as the trained model, the computer device can directly obtain the trained risk assessment model, when the risk assessment model is a recurrent neural network model, the recurrent neural network usually includes an input layer, a hidden layer and an output layer, and at this time, the historical hidden state of the hidden layer in the risk assessment model can be determined.
And step 208, determining an actual hidden state within the evaluation time through the risk evaluation model according to the target node characteristics and the historical hidden state.
Specifically, as shown in fig. 4, fig. 4 is a model diagram of a risk assessment model, and when t represents the assessment time, m is (t) Representing the characteristics of the target node corresponding to the evaluation time, m (t-1) Representing target node characteristics corresponding to historical time, and when the computer equipment inputs the target node characteristics corresponding to evaluation time into the input layer, determining an actual hidden state in the evaluation time comprises the following modes:
h (t) =σ(Um (t) +Wh (t-1) +b)
wherein h is (t) To evaluate the actual hidden state of the hidden layer within time; u and W are weight parameters in the risk assessment model and are obtained in the process of training the risk assessment model; b is a bias term constant.
And step 210, performing risk assessment on the target user within the assessment time according to the actual hidden state to obtain a risk assessment result.
Specifically, the risk assessment of the target user in the assessment time by the computer equipment comprises the following modes:
o (t) =Vh (t) +c
y (t) =σ(o (t) )
wherein o is (t) The predicted output characteristic of the output layer output of the risk assessment model in the assessment time is represented; v is a weight parameter in the risk assessment model; c is a bias term constant; sigma is a preset activation function; y is (t) Representing a target user within an evaluation time to perform a risk evaluationAnd obtaining a risk evaluation result.
In the risk assessment method, a target user within assessment time is obtained, and a user association graph corresponding to the assessment time is determined, wherein the user association graph comprises a target node corresponding to the target user; determining a plurality of neighbor node sets which are adjacent to a target node and located at different levels, and performing aggregation processing on the plurality of neighbor node sets to obtain target node characteristics of the target node; determining historical time corresponding to the evaluation time, and acquiring a historical hidden state output by a risk evaluation model when the risk evaluation model carries out risk evaluation on a target user in the historical time; determining an actual hidden state within evaluation time through a risk evaluation model according to the target node characteristics and the historical hidden state; and according to the actual hidden state, performing risk assessment on the target user within the assessment time to obtain a risk assessment result. Compared with the traditional mode of learning the credit worthiness of the borrower by using a neural network of a static frame, the risk assessment method can flexibly use the risk assessment models corresponding to different historical times to dynamically assess the risk of the target user within the assessment time, so that the overdue risk of the target user at different times can be accurately predicted.
In an embodiment, as shown in fig. 5, aggregating a plurality of neighbor node sets to obtain a target node feature of a target node includes the following steps:
at step 502, a current level and a previous historical level of the current level of the plurality of levels are determined.
When the target node includes a plurality of levels, the history level can be regarded as a first-level, and the current level is a second-level.
Step 504, a first history feature of the target node under the history level and a second history feature corresponding to a neighbor node set of the history level are determined.
In one embodiment, determining a first history feature of a target node under a history level and a second history feature corresponding to a neighbor node set of the history level comprises: determining a first attribute feature in a target node, and coding the first attribute feature through a preset coder to obtain a first history feature of the target node under a history level; determining a second attribute characteristic corresponding to each neighbor node aiming at each neighbor node in a neighbor node set of a history level; mapping each second attribute feature to obtain a sub-history feature corresponding to each neighbor node; and synthesizing the plurality of sub-history characteristics to obtain a second history characteristic corresponding to the neighbor node set of the history level.
Specifically, since the first attribute feature of the target node and the second attribute feature corresponding to each neighboring node are the account feature, the identity feature, the device feature, the unit feature, and the like of the user mentioned in the above embodiments, the first attribute feature and the second attribute feature at this time are generally data with a high degree of dimension. Therefore, when the history level is a first-order level, the computer device needs to perform encoding processing on the first attribute feature through a preset encoder, that is, mapping the original high-dimensional data to a low-dimensional dense vector space, so as to obtain the first history feature of the target node in the first-order level. Wherein, when the hierarchy of the target node represents a query depth k, the first history feature may also be referred to as the node representation of the target node at the last query depth, that is, the target node represents the last query depth
![Figure BDA0003871823670000111](https://patentimages.storage.googleapis.com/28/5d/62/66adb9bd2d3cdd/BDA0003871823670000111.png)
Where v is characterized as the target node.
Similarly, the computer device performs mapping processing on each second attribute feature to obtain a sub-history feature corresponding to each neighbor node, that is, the sub-history feature may also be referred to as a node representation of the neighbor node at the last query depth
Where u is characterized as a neighbor node. And the computer equipment integrates the plurality of sub-historical characteristics to obtain a second historical characteristic corresponding to the neighbor node set of the historical hierarchy. For example, the second history characteristic is
And N (v) is characterized as a neighbor node set corresponding to the history level.
In one embodiment, the first history feature and the second history feature are subjected to aggregation processing, that is, a process of splicing vectors in a low-latitude dense vector space.
In one embodiment, the use of
To represent a user association graph, wherein T represents the user association graph corresponding to different times, T represents the total number of the evaluation time and the historical time, v
t Set of nodes, epsilon, representing a user association graph
t An edge set representing a user association graph.
And 506, performing aggregation processing on the first historical characteristics and the second historical characteristics to obtain candidate node characteristics of the target node under the current level.
In one embodiment, the aggregating the first history feature and the second history feature to obtain a candidate node feature of the target node under the current level includes: carrying out mean processing on the first historical characteristic and the second historical characteristic through a preset mean function to obtain a mean historical characteristic; acquiring a history weight corresponding to a history level; and performing correlation processing on the average historical characteristics and the historical weights through a preset activation function to obtain candidate node characteristics of the target node under the current level.
Specifically, the aggregation processing of the first history feature and the second history feature may be performed in the following manner:
the Mean represents a preset Mean function, the U represents a process of carrying out Mean processing on the first historical characteristic and the second historical characteristic, and the sigma is a preset activation function. Because the aggregation treatment is an iterative treatment process, the aggregation will be carried out in each iterative processThe parameters are updated during the training of the combined processing model. The historical weight of the historical level is the weight parameter obtained after the aggregation processing model is trained in the last iteration process. The computer equipment performs correlation processing on the historical characteristics and the historical weight of the mean value, and determines candidate node characteristics of the target node under the current level through an activation function, namely node representation of the target node at the current query depth
In one embodiment, the first history feature and the second history feature are subjected to aggregation processing, that is, a process of splicing vectors in a low-latitude dense vector space.
And step 508, taking the current level as a new history level, taking the candidate node feature as a new first history feature, and returning to the step of determining the first history feature of the target node under the history level and the second history feature corresponding to the neighbor node set of the history level to continue until the candidate node feature of the target node under the last level in the multiple levels is obtained.
Wherein, it is easy to understand that when the query depth k changes, the target node represents the node at the last query depth
And node representation of neighbor nodes at last query depth
A change will occur. Therefore, the computer device needs to continuously take the current hierarchy as a new history hierarchy and enter the iteration process of the next round of aggregation processing. When all the hierarchies are iterated, the target node characteristics of the target node can be obtained.
And step 510, taking the candidate node feature under the last level as the target node feature of the target node in the user association graph.
In one embodiment, the computer device may determine the target node characteristics of the target user through an inductive graph neural network model.
In the embodiment, the target node characteristics of the target node are determined by adopting a mode of carrying out aggregation processing on the neighbor node set, so that the comprehensive consideration of credit worthiness information of the target user through the neighbor node set is realized, and the target node characteristics of the target user are ensured to be obtained more in detail and accurately. Meanwhile, when the user association graph changes, only new nodes are subjected to polymerization again, the expandability of the polymerization is ensured, and the prediction speed of risk prediction for different time in the follow-up process is improved because the obtained target node features are low-latitude dense feature vectors.
In one embodiment, as shown in fig. 6, the training step of the risk assessment model includes the following steps:
step 602, obtaining a plurality of sample association graphs corresponding to the target sample node, and determining a sample node feature corresponding to each sample association graph and a node feature tag of the target sample node.
Specifically, the computer device acquires an initial sample graph and a plurality of sample times, and extracts a sample association graph which comprises target sample nodes and corresponds to each sample time from the initial sample graph according to the sample times. For a specific implementation process of extracting the sample association map from the initial sample map, reference may be made to the specific implementation process of extracting the user association maps corresponding to different historical times from the initial association map, which is not described herein again in this embodiment. The specific implementation process for determining the sample node characteristics corresponding to each sample association graph may refer to the specific implementation process for determining the target node characteristics of the target node in the user association graph, which is not described herein again in this embodiment.
And step 604, determining an initial sample correlation diagram in the multiple sample correlation diagrams, and obtaining an evaluation submodel of the first round according to the sample node characteristics and the node characteristic labels corresponding to the initial sample correlation diagram.
Specifically, the time sequence among the plurality of sample times is determined, and the sample correlation map corresponding to the sample time with the time sequence arranged at the top is used as the initial sample correlation map. And training the evaluation submodel by the computer equipment according to the difference between the sample node characteristics of the initial sample association graph and the node characteristic labels until a training stop condition is reached to obtain the trained evaluation submodel of the first round. Wherein the weight parameters in the evaluation submodel before the first training can be obtained by random initialization.
Step 606, determining a round sample association graph in the multiple sample association graphs in the current round from the second round after the first round, and obtaining an evaluation submodel of the current round according to the evaluation submodel of the historical round, the sample node characteristics corresponding to the round sample association graph and the node characteristic labels.
Wherein the historical round is at least one round prior to the current round. The computer device determines the round sample association graph of the current round in sequence according to the time sequence among the multiple sample times, and takes the node chain corresponding to each sample node feature as an evaluation sub-model, referring to fig. 4.
In one embodiment, obtaining the evaluation submodel of the current round according to the evaluation submodel of the history round, the sample node characteristics corresponding to the round sample association diagram and the node characteristic labels includes: determining a first hidden state output by an evaluation submodel of a historical round; determining a second hidden state of the current round according to the sample node characteristics corresponding to the round sample association graph and the first hidden state; determining the predicted output characteristics of the evaluation submodel of the current round through the second hidden state; determining a loss function corresponding to the evaluation submodel of the current round according to the difference between the predicted output characteristic and the node characteristic label; and updating model parameters in the evaluation submodel of the current round through a loss function until the model parameters are stopped when a training stopping condition is reached, so as to obtain the trained evaluation submodel of the current round.
Specifically, since the process of training the model corresponds to the process of using the risk assessment model, reference may be made to step 208 for a specific implementation process of determining the second hidden state of the current round, which is not described herein again. With reference to FIG. 4Show, L (t) For the loss function, the computer device puts the first hidden state h (t) And sample node characteristics m (t) Inputting the predicted output characteristic o of the evaluation submodel of the current round into the evaluation submodel of the historical round (t) And inputting the predicted output characteristics and the node characteristic labels into a loss function to obtain node characteristic loss values. The computer equipment determines the gradient of the node characteristic loss value through a back propagation algorithm, and updates the model parameters in the evaluation submodel of the current round along the gradient direction of the node characteristic loss value, namely, the node characteristic loss value is minimized as much as possible by using a model parameter attenuation mode, so that the loss function is converged, and the trained evaluation submodel of the current round is obtained.
And 608, taking the next round as the current round, returning to the current round from the second round after the first round, determining a round sample association diagram in the plurality of sample association diagrams, and continuing to execute the steps until an evaluation submodel of the current round is obtained.
Wherein, the historical time can be taken as the last time in the plurality of sample times in the time sequence.
And step 610, integrating the evaluation submodels corresponding to each current round to obtain a risk evaluation model corresponding to the target sample node.
In this embodiment, each layer of evaluation submodel is trained, so that the evaluation submodel of each round has evaluation capabilities corresponding to different times, the output of the evaluation submodel of the historical round is used as the input of the next round, the sequence features corresponding to the time sequence are used as the input of the model, and recursion is performed in the evolution direction of the sequence, so that the trained risk evaluation model has memory.
It should be understood that, although the steps in the flowcharts related to the embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a risk assessment device for realizing the risk assessment method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so the specific limitations in one or more embodiments of the risk assessment device provided below can be referred to the limitations in the risk assessment method above, and are not described herein again.
In one embodiment, as shown in fig. 7, there is provided a risk assessment apparatus 700 comprising: an association graph determining module 702, a node characteristic determining module 704, a hidden state determining module 706, and an evaluation result determining module 708, wherein:
an association diagram determining module 702, configured to obtain a target user within evaluation time, and determine a user association diagram corresponding to the evaluation time; the user association graph comprises target nodes corresponding to the target users.
A node characteristic determining module 704, configured to determine multiple neighbor node sets located at different levels and adjacent to the target node, and aggregate the multiple neighbor node sets to obtain a target node characteristic of the target node.
A hidden state determining module 706, configured to determine historical time corresponding to the evaluation time, and obtain a historical hidden state output by the risk evaluation model when performing risk evaluation on the target user within the historical time; and determining the actual hidden state within the evaluation time through a risk evaluation model according to the target node characteristics and the historical hidden state.
The evaluation result determining module 708 is configured to perform risk evaluation on the target user within the evaluation time according to the actual hidden state, so as to obtain a risk evaluation result.
In one embodiment, the association map determining module 702 is further configured to obtain an initial association map; the initial association graph comprises a plurality of nodes and a plurality of connecting edges; the connecting edge comprises the association time for association between each node; determining a target node of a target user in the initial association graph, and determining whether the association time corresponding to each connection edge belongs to the evaluation time; and if the evaluation time belongs to the preset evaluation time range, extracting a user association graph corresponding to the evaluation time from the initial association graph according to the connecting edge and the target node.
In one embodiment, the association map determining module 702 is further configured to obtain a plurality of nodes to be associated; the nodes to be associated comprise attribute characteristics of the users; the attribute characteristics at least comprise account characteristics, identity characteristics and equipment characteristics of the user; determining an association relation between each node to be associated; the association relationship at least comprises an invitation relationship, a spouse relationship and an equipment relationship; and associating the nodes to be associated according to the association relationship to obtain an initial association diagram.
In one embodiment, the node characteristic determining module 704 is further configured to determine a current level of the plurality of levels and a previous history level of the current level; determining a first history feature of a target node under a history level and a second history feature corresponding to a neighbor node set of the history level; performing aggregation processing on the first historical characteristics and the second historical characteristics to obtain candidate node characteristics of the target node under the current level; taking the current level as a new history level, taking the candidate node characteristics as a new first history characteristic, and returning to the step of determining the first history characteristic of the target node under the history level and the second history characteristic corresponding to the neighbor node set of the history level to continue until the candidate node characteristics of the target node under the last level in the multiple levels are obtained; and taking the candidate node characteristics under the last level as the target node characteristics of the target node in the user association graph.
In one embodiment, the node characteristic determining module 704 includes a characteristic converting module 7041, configured to determine a first attribute characteristic in the target node, and encode the first attribute characteristic through a preset encoder to obtain a first history characteristic of the target node in a history hierarchy; aiming at each neighbor node in the neighbor node set of the history hierarchy, determining a second attribute characteristic corresponding to each neighbor node; mapping each second attribute feature to obtain a sub-history feature corresponding to each neighbor node; and synthesizing the plurality of sub-history characteristics to obtain a second history characteristic corresponding to the neighbor node set of the history level.
In an embodiment, the node feature determining module 704 further includes a feature associating module 7042, configured to perform mean processing on the first historical feature and the second historical feature through a preset mean function to obtain a mean historical feature; acquiring a history weight corresponding to a history level; and performing correlation processing on the average historical characteristics and the historical weights through a preset activation function to obtain candidate node characteristics of the target node under the current level.
In one embodiment, the risk assessment apparatus 700 further includes a model training module 710, configured to obtain a plurality of sample association graphs corresponding to the target sample nodes, and determine sample node features corresponding to each sample association graph and node feature labels of the target sample nodes; determining an initial sample correlation diagram in the multiple sample correlation diagrams, and obtaining an evaluation submodel of a first round according to sample node characteristics and node characteristic labels corresponding to the initial sample correlation diagram; determining a round sample association diagram in the multiple sample association diagrams in a current round from a second round after the first round, and obtaining an evaluation submodel of the current round according to an evaluation submodel of a historical round, sample node characteristics corresponding to the round sample association diagram and node characteristic labels; the historical round is at least one round before the current round; taking the next round as the current round, returning to the current round from the second round after the first round, determining the round sample association graphs in the multiple sample association graphs, and continuously executing the steps until the evaluation submodel of the current round is obtained; and integrating the evaluation sub-models corresponding to each current turn to obtain the risk evaluation model corresponding to the target sample node.
In one embodiment, the model training module 710 is further configured to determine a first hidden state output by the evaluation submodel of the historical round; determining a second hidden state of the current round according to the sample node characteristics corresponding to the round sample association graph and the first hidden state; determining the predicted output characteristics of the evaluation submodel of the current round through the second hidden state; determining a loss function corresponding to the evaluation submodel of the current round according to the difference between the predicted output characteristics and the node characteristic labels; and updating model parameters in the evaluation submodel of the current round through a loss function until the model parameters are stopped when a training stopping condition is reached, so as to obtain the trained evaluation submodel of the current round.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of voice timbre conversion. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), for example. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.