A credit risk prediction method and device, electronic equipment and storage medium
By constructing and optimizing transaction graphs, generating dynamic graph sequences, and combining them with a credit risk prediction model using feature extraction and fusion layers, the problem of balancing dynamic temporal series and network spatial features is solved, thereby improving the accuracy of credit risk prediction and the risk management capabilities of financial institutions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2026-03-12
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to simultaneously capture dynamic temporal and cyberspace characteristics, resulting in insufficient accuracy in credit risk prediction.
An initial transaction graph is constructed and its topology is optimized to generate a dynamic graph sequence. A credit risk prediction model, consisting of a spatiotemporal feature extraction layer, a spatial graph convolutional layer, and a gated spatiotemporal fusion layer, is then used to capture the dynamic transaction relationships between accounts.
It enables precise depiction of the dynamic evolution of account associations, improves the accuracy of credit risk prediction, provides accurate risk warnings and anomaly interception basis, and safeguards the asset security of financial institutions.
Smart Images

Figure CN122492328A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, and in particular to a credit risk prediction method, apparatus, electronic device and storage medium. Background Technology
[0002] In the process of digital transformation in finance, credit risk prediction based on account transaction data has become a core technical means to ensure the asset security of financial institutions. Existing solutions typically rely on time-series network models to capture the time dependence of dynamic transaction behavior, or on graph neural network models based on static features to mine the nonlinear relationships of customer attributes.
[0003] However, the two approaches mentioned above have the following drawbacks: temporal network models only focus on individual behavioral patterns, neglecting the spatial characteristics of the transaction relationship network between users; graph neural network models are mostly limited to static graph structures and cannot capture the dynamic evolution of the transaction network topology over time. Both approaches struggle to simultaneously consider dynamic temporal and spatial network characteristics, resulting in incomplete feature extraction and ultimately affecting the accuracy of credit risk prediction. Therefore, there is an urgent need to design a method that can improve the accuracy of credit risk prediction. Summary of the Invention
[0004] This application provides a credit risk prediction method, apparatus, electronic device, and storage medium, which can achieve the coordinated capture of dynamic time series and cyberspace characteristics, thereby improving the accuracy of credit risk prediction.
[0005] Firstly, this application provides a credit risk prediction method, which includes: Construct an initial transaction graph for the first account group, the initial transaction graph including account nodes corresponding to each account; The topology of the initial transaction graph is optimized based on the correlation strength between each account node in the initial transaction graph to obtain the target transaction graph corresponding to the second account group, wherein the second account group belongs to the first account group; A dynamic graph sequence is generated based on the target transaction graph corresponding to each historical moment within a time sliding window. The dynamic graph sequence is input into a pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period.
[0006] Furthermore, optimizing the topology of the initial transaction graph based on the correlation strength between account nodes in the initial transaction graph to obtain the target transaction graph corresponding to the second account group includes: calculating the correlation strength of the connecting edges in the initial transaction graph, wherein the connecting edges are constructed based on account transaction behavior; retaining connecting edges in the initial transaction graph whose correlation strength is greater than a preset strength threshold to obtain candidate transaction graphs; for each account node in the candidate transaction graph, retaining a preset number of neighboring nodes and corresponding connecting edges based on the ranking of the correlation strength; determining the retained account nodes as the second account group, and determining the topology formed by the retained account nodes and the retained connecting edges as the target transaction graph.
[0007] Furthermore, calculating the association strength of the connecting edges in the initial transaction graph includes: for each connecting edge in the initial transaction graph, obtaining the credit feature vectors of the two account nodes corresponding to the connecting edge; calculating the cosine similarity of the two credit feature vectors; and performing threshold normalization on the cosine similarity to obtain the association strength of the connecting edge.
[0008] Furthermore, the credit feature vector is a feature extracted from account transaction data, and the credit feature vector includes at least one of the following: fund deposit activity, expenditure level, total inflow amount, inflow amount stability, minimum repayment ratio, and expenditure ratio.
[0009] Furthermore, the dynamic graph sequence includes a node feature matrix and a weighted adjacency matrix corresponding to each historical moment. The node feature matrix is determined by the credit feature vector, the number of dimensions of the credit feature vector, and the number of accounts in the second account group. The weighted adjacency matrix is determined by the association strength and the number of accounts in the second account group.
[0010] Furthermore, the credit risk prediction model includes at least a spatiotemporal feature extraction layer, a spatial graph convolutional layer, and a gated spatiotemporal fusion layer. The step of inputting the dynamic graph sequence into the pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period includes: extracting an initial spatiotemporal feature sequence of the dynamic graph sequence through the spatiotemporal feature extraction layer; updating the initial spatiotemporal feature sequence step-by-step using a dynamic topology adaptation mechanism through the spatial graph convolutional layer, and mining the spatial evolution pattern of the second account group to obtain a spatial evolution feature sequence; extracting long-term time-series dependency features of the initial spatiotemporal feature sequence through the gated spatiotemporal fusion layer; performing weighted fusion of the spatial evolution feature sequence and the long-term time-series dependency features based on preset fusion weights to obtain spatiotemporal coupling features; and calculating the feature vector corresponding to the spatiotemporal coupling features using a preset activation function to obtain the credit risk probability of each account in the second account group over a future period.
[0011] Furthermore, the spatiotemporal feature extraction layer includes a temporal feature filtering sublayer, a spatial feature aggregation sublayer, and a feature projection sublayer; the step of extracting the initial spatiotemporal feature sequence of the dynamic graph sequence through the spatiotemporal feature extraction layer includes: performing feature extraction operations on the node feature matrix through the temporal feature filtering sublayer to obtain a temporal feature sequence, wherein the feature extraction operations include at least depthwise separable convolution and pointwise convolution; constructing an associated neighbor graph on the weighted adjacency matrix through the spatial feature aggregation sublayer and performing a single-layer graph convolution aggregation operation to obtain a spatial feature sequence; concatenating the temporal feature sequence and the spatial feature sequence in the feature dimension to obtain a fused feature sequence; and convolving the fused feature sequence and projecting it onto a unified feature space to obtain the initial spatiotemporal feature sequence.
[0012] Secondly, this application provides a credit risk prediction device, which includes: The transaction graph construction module is used to construct an initial transaction graph for the first group of accounts, wherein the initial transaction graph includes account nodes corresponding to each account; The transaction graph optimization module is used to optimize the topology of the initial transaction graph based on the correlation strength between each account node in the initial transaction graph, so as to obtain the target transaction graph corresponding to the second account group, wherein the second account group belongs to the first account group; The graph sequence generation module is used to generate dynamic graph sequences based on the target transaction graph corresponding to each historical moment within a time sliding window; The risk probability prediction module is used to input the dynamic graph sequence into a pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period.
[0013] Thirdly, this application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the credit risk prediction method described in any embodiment of this application.
[0014] Fourthly, this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the credit risk prediction method described in any embodiment of this application.
[0015] To address the shortcomings of existing technologies, this application provides a credit risk prediction method. This method offers the following advantages: First, by constructing an initial transaction graph and optimizing its topology, this application selects strongly correlated accounts to form a second account group and a target transaction graph. This accurately mines the spatial correlation features between accounts, overcoming the limitation of traditional time-series models that only focus on individual behavior and enriching the dimensions of risk features. Second, this application generates dynamic graph sequences based on a time sliding window, fully preserving the changing patterns of the transaction network topology and account features over time. This achieves a precise depiction of the dynamic evolution of account relationships, resulting in more comprehensive feature extraction. Finally, the dynamic graph sequences provide high-quality input with both spatiotemporal dimensions for the credit risk prediction model. Combined with the feature mining capabilities of the pre-trained model, the output credit risk probability more closely matches actual risk control scenarios, providing accurate basis for risk warnings, anomaly interception, and other decisions, effectively protecting the assets of financial institutions. This application can achieve the collaborative capture of dynamic time-series and network spatial features, improving the accuracy of credit risk prediction.
[0016] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on a computer-readable storage medium. This computer-readable storage medium may be packaged together with the processor of the credit risk prediction device, or it may be packaged separately from the processor of the credit risk prediction device; this application does not impose any limitations on this.
[0017] The descriptions of the second, third, and fourth aspects in this application can be referenced to the detailed description of the first aspect; and the beneficial effects described in the second, third, and fourth aspects can be referenced to the analysis of the beneficial effects of the first aspect, which will not be repeated here.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description.
[0019] It is understood that before using the technical solutions disclosed in the various embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating a credit risk prediction method provided in an embodiment of this application; Figure 2 A schematic diagram of the structure of a credit risk prediction device provided in an embodiment of this application; Figure 3 This is a block diagram of an electronic device used to implement a credit risk prediction method according to an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0023] The terms "first," "second," "target," and "original," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprising," "having," and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] It should be noted that the information collected in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, necessary confidentiality measures have been taken, and it does not violate public order and good morals. Corresponding operation portals are provided for users to choose to authorize or refuse.
[0025] Figure 1 This is a flowchart illustrating a credit risk prediction method provided in this application embodiment. This embodiment is applicable to financial scenarios where precise risk control is achieved by combining the timeline of dynamic account behavior with the user transaction association network. The credit risk prediction method provided in this embodiment can be executed by the credit risk prediction device provided in this application embodiment. This device can be implemented by software and / or hardware and integrated into the electronic device executing this method.
[0026] See Figure 1 The method in this embodiment includes, but is not limited to, the following steps: S110, Construct the initial transaction graph for the first account group.
[0027] In this embodiment, the first account group can be the target set of accounts for which credit risk assessment is to be conducted. Optionally, the scope of the first account group can be defined according to the actual business scenario (e.g., credit risk control). The first account group can be a group of accounts from a single business line or a group of accounts across business lines.
[0028] In this embodiment, the initial transaction graph can be a basic graph structure built based on the account information of the first account group. It is the original graph data without topology optimization (e.g., weak edge removal). The initial transaction graph includes the account nodes corresponding to each account in the first account group and the connection edges to be added later.
[0029] In this embodiment, the account node can be an element used to represent a single account in the initial transaction graph. Each account node is bound to a unique identifier (ID) and basic attribute information of the corresponding account, and can be uniquely mapped to the actual account.
[0030] In this embodiment of the application, the process of determining the first account group may be as follows: a target set of accounts is selected based on the business scenario to form the first account group. For example, a credit customer group, a high-frequency trading user group, or a supply chain upstream and downstream enterprise account group defined by an institution, ensuring that the first account group covers the objects whose credit risk is to be assessed.
[0031] Basic account information is collected for each account within the first account group. This information includes at least a unique account identifier (e.g., account number, customer ID) and account type (e.g., individual, enterprise). Based on this information, a unique account node is generated for each account in the first account group. Each account node is bound to its own unique basic information attributes to ensure its distinctiveness and uniqueness—that is, one account corresponds to one account node in the graph. Simultaneously, using these account nodes as the core, a basic framework for the initial transaction graph is constructed. At this stage, the initial transaction graph already contains a complete set of account nodes. Subsequent steps involve adding edge structures between these account nodes to form a complete graph topology.
[0032] S120. Optimize the topology of the initial transaction graph based on the correlation strength between the account nodes in the initial transaction graph to obtain the target transaction graph corresponding to the second account group.
[0033] In this embodiment, the association strength can be a quantitative indicator used to measure the closeness of the transaction relationship between two account nodes in the initial transaction graph, comprehensively reflecting characteristics such as the frequency, amount ratio, and temporal continuity of transactions between accounts. Association strength can also be referred to as the edge weight of the connecting edge.
[0034] In this embodiment, topology optimization can be a process of reconstructing the account nodes and connecting edges of the initial transaction graph. This may include operations such as quantifying correlation strength, removing weakly correlated edges, and filtering account nodes. The purpose of topology optimization is to simplify the graph structure, strengthen risk correlation features, and improve the efficiency and accuracy of subsequent model calculations.
[0035] In this embodiment, the second account group can be a set of accounts with strong transactional relationships selected from the first account group. Since the second account group belongs to the first account group, the relationships between the account nodes in the second account group are more targeted for credit risk analysis.
[0036] In this embodiment, the target transaction graph can be a weighted graph structure formed after topology optimization, including the account nodes of the second account group and the connecting edges between the account nodes.
[0037] In some embodiments, the topology of the initial transaction graph is optimized based on the correlation strength between account nodes in the initial transaction graph to obtain the target transaction graph corresponding to the second account group. This includes: calculating the correlation strength of the connecting edges in the initial transaction graph, where the connecting edges are constructed based on account transaction behavior. In the initial transaction graph, connecting edges with a correlation strength greater than a preset strength threshold (i.e., retaining strong correlation edges) are retained, while connecting edges with a correlation strength not greater than the preset strength threshold (i.e., removing weak correlation edges) are removed, resulting in a candidate transaction graph. This step can initially simplify the graph structure and filter out weak transaction relationships with no risk representation value. For each account node in the candidate transaction graph, the correlation strength of all its connecting edges is ranked in descending order, with one account node as the center. Based on the ranking of correlation strength, a preset number (e.g., k) of neighboring nodes and their corresponding connecting edges are retained, while neighboring nodes and connecting edges with lower rankings are removed. This step can further simplify the graph structure, avoiding graph structure redundancy caused by too many connecting edges for a single node, while ensuring that each node retains only the most core strongly correlated transaction objects, thus improving the efficiency of model prediction. The retained account nodes are designated as the second account group. Compared to the initial first account group, the second account group eliminates isolated nodes without strong transaction connections and focuses more on account groups with close business relationships. The topology formed by the retained account nodes and retained connecting edges is defined as the target transaction graph.
[0038] The preset strength threshold and preset number are dynamically configured based on the accuracy requirements of credit risk prediction and the size of the account group; neighbor nodes are nodes adjacent to account nodes. To retain only the k neighbors with the highest association strength for each account node, computational overhead can be controlled, forming a sparse weighted adjacency matrix. The target transaction graph is a dynamic adjacency matrix based on co-occurrence and behavioral similarity.
[0039] In one embodiment, calculating the association strength of connecting edges in the initial transaction graph includes: for each connecting edge in the initial transaction graph, obtaining the credit feature vectors of the two account nodes corresponding to the connecting edge. Before calculating the cosine similarity, it should be ensured that the dimensions of the credit feature vectors of the two account nodes are consistent. The cosine similarity of the two credit feature vectors is calculated. The cosine similarity measures the angle between the two credit feature vectors in the feature space, quantifying the similarity between the credit feature vectors. The smaller the angle, the higher the similarity, the more similar the credit features of the corresponding account nodes, and the more risk-representing the transaction association. To enhance numerical stability and suppress noisy links, the cosine similarity is thresholded and normalized to obtain the association strength of the connecting edges.
[0040] Assuming account The credit feature vector at time t is Account The credit feature vector at time t is The cosine similarity is used to calculate the behavioral consistency of the two entities using the following formula (1), and the cosine similarity is subjected to threshold pruning and normalization using the following formula (2): (1) (2) in, For cosine similarity, For account With account The strength of the connection between the edges. This is an indicator function that indicates that self-loops are prohibited; τ This is a similarity threshold used to control the sparsity of the graph; It can be achieved if: The correlation strength is ;like If the correlation strength is 0, then the correlation strength is 0. This design has a dual significance: first, co-occurrence ensures that edges are established only between active accounts, reflecting the synchronicity of behavior; second, similarity weighting makes the internal links of high-risk or low-risk accounts stronger, improving the graph structure's expression of risk clustering optimization.
[0041] In one embodiment, the credit feature vector is a feature extracted from account transaction data, and the credit feature vector includes at least one of the following: deposit activity, expenditure level, total inflow amount, inflow stability, minimum repayment ratio, and expenditure ratio.
[0042] The process of constructing the connecting edge can be as follows: traverse the historical transaction data of any two account nodes within a preset time period; if the historical transaction data meets the preset transaction criteria (e.g., a transaction occurs and the transaction amount is greater than a specified amount), then establish a connecting edge between the two account nodes.
[0043] The process of determining the credit feature vector of an account node can be as follows: Historical transaction data of each account within the first account group is collected. This historical transaction data includes transaction records between accounts within a specified time window (e.g., the past 3 months or 6 months), and may include key information such as the transaction initiating account, the transaction receiving account, the transaction amount, the transaction time, and the transaction type. Credit risk features are constructed from a preset number of dimensions. This embodiment takes three dimensions as examples: fund transfers, income status, and repayment tendency. In the fund transfer dimension, the number of deposits and transfers (reflecting liquidity) of the account are obtained from historical transaction data. A preset formula is used to process both, and the processing result is used as the fund deposit activity level. The fund withdrawal destinations (reflecting debt repayment pressure) of the account are obtained from historical transaction data. A preset formula is used to process these data, and the processing result is used as the expenditure level, which reflects the total expenditure amount of the account within the selected time window. In the income status dimension, the total inflow amount is obtained from historical transaction data, and the standard deviation of the total inflow amount is used as the inflow stability. In terms of repayment tendency, the minimum repayment amount is obtained from historical transaction data, and the minimum repayment ratio and expenditure ratio are calculated. The deposit activity, expenditure level, total inflow amount, inflow stability, minimum repayment ratio, and expenditure ratio of a certain account at each time step are used as the credit feature vector of the corresponding account node.
[0044] S130. Generate a dynamic graph sequence based on the target transaction graph corresponding to each historical moment within the time sliding window.
[0045] In this embodiment, the time sliding window can be a dynamic window tool used to extract historical time ranges. By setting the window length, sliding step size, and time granularity, it can achieve segmented extraction and rolling updates of continuous time series data. Its core function is to filter out the historical time range used to generate dynamic graph sequences.
[0046] In this embodiment, the historical moment can be a single time unit (e.g., 1 hour, 1 day) divided according to a preset time granularity within a time sliding window. Each historical moment corresponds to an independent target transaction graph, which is the basic component of the dynamic graph sequence and represents the account transaction association status at a specific point in time.
[0047] In this embodiment, the dynamic graph sequence can be an ordered graph data set formed by arranging target transaction graphs from multiple historical moments within a time sliding window in chronological order. Its characteristic is that it preserves the graph structure (nodes, edges, weights), the evolution of the characteristics of nodes and connecting edges over time.
[0048] In this embodiment, parameters for the time sliding window are pre-configured, including window length, sliding step size, and time granularity. These parameters can be dynamically adjusted according to the business scenario; for example, in high-frequency trading risk control scenarios, a smaller time granularity and sliding step size can be configured to improve the accuracy of time-series capture. Based on the configured time sliding window, the target transaction graph corresponding to each historical moment within the time sliding window is extracted from the historical transaction data storage system in chronological order. The target transaction graph for each historical moment is the final graph structure obtained through the aforementioned topology optimization process (association strength calculation, strong association edge filtering, and neighbor node refinement). The collected multi-moment target transaction graphs are arranged in chronological order to form a dynamic graph sequence. The length of the dynamic graph sequence is equal to the number of historical moments contained within the time sliding window. After construction, the dynamic graph sequence is validated, and moment graphs with missing or abnormal data are removed. Missing values are filled using a completion algorithm to ensure the continuity and effectiveness of the dynamic graph sequence.
[0049] In one embodiment, the update mechanism of the dynamic graph sequence can be as follows: in the actual model deployment scenario, as time progresses, the time sliding window moves forward by a preset step size, removes the earliest time graph outside the window, and adds the target transaction graph of the current time (generated by real-time topology optimization), so as to realize the rolling update of the dynamic graph sequence, ensuring that the sequence always reflects the latest account transaction association and time sequence evolution characteristics, and adapts to the real-time requirements of credit risk prediction.
[0050] In one embodiment, the dynamic graph sequence includes a node feature matrix and a weighted adjacency matrix corresponding to each historical time point. The dynamic graph sequence is a target transaction graph corresponding to each historical time point, and each target transaction graph is numerically represented by the node feature matrix and the weighted adjacency matrix.
[0051] In one embodiment, the node feature matrix is determined by the credit feature vector, the number of dimensions of the credit feature vector, and the number of accounts in the second account group. The node feature matrix is a centralized numerical encapsulation of the credit features of all account nodes in the second account group at the current time. Its dimensionality is determined by the number of accounts in the second account group and the number of dimensions of the credit feature vector of a single account, denoted as […]. , is a two-dimensional matrix of N×D dimensions, where N is the number of accounts in the second account group and D is the number of dimensions of the credit feature vector.
[0052] In one embodiment, the weighted adjacency matrix is determined by the association strength and the number of accounts in the second account group. The weighted adjacency matrix is a numerical representation of the association strength between account nodes within the second account group at a given time, and its dimension is determined solely by the number of accounts in the second account group, denoted as […]. , is an N×N square matrix, where N is the number of accounts in the second account group.
[0053] S140. Input the dynamic graph sequence into the pre-trained credit risk prediction model to obtain the credit risk probability of the second account group in the future.
[0054] The credit risk prediction model in this embodiment can be a dynamic spatiotemporal graph convolutional model that is trained, validated and optimized based on historical dynamic graph sequence samples and corresponding labels (e.g., whether the account has defaulted).
[0055] In this embodiment, the future duration can be a preset risk prediction time range, which can be flexibly configured according to business scenarios, such as the next 7 days, 30 days, etc. Its setting needs to be determined in conjunction with risk control requirements (such as short-term transaction warnings and long-term credit risk assessments).
[0056] In some embodiments, the dynamic graph sequence is first pre-input validated to ensure that the node feature matrix and weighted adjacency matrix at each historical moment in the dynamic graph sequence have consistent dimensions and that there are no missing data or outliers. The validated dynamic graph sequence is then input into a pre-trained credit risk prediction model in time step order. After receiving the input, the model uses a spatiotemporal feature extraction layer to capture temporal patterns and mine spatial correlations in the matrix data at each time step. Then, it integrates the extracted deep spatiotemporal features through a nonlinear transformation and feature fusion layer. Finally, the fused features are mapped to probability values through the output layer.
[0057] The output results correspond to the credit risk probability of each account in the second account group within a preset future time period. The probability value ranges from [0,1]. The closer the value is to 1, the higher the probability that the account will experience credit risk events such as default in the future time period; the closer the value is to 0, the more stable the future credit status of the account.
[0058] Optionally, before inputting the dynamic graph sequence into the credit risk prediction model, the node feature matrix in the dynamic graph sequence can be analyzed. The data elements are normalized across time periods. Optionally, the node feature matrix for all time steps is normalized. Perform mean-variance normalization to eliminate dimensional differences; apply mean-variance normalization to the weighted adjacency matrix. Perform symmetric normalization to avoid gradient explosion, and obtain the input tensor {( ), ( ), ..., ( )}, where T is the number of historical moments.
[0059] Optionally, the credit risk prediction model can simultaneously output the average risk probability of the entire account group, providing a reference for batch decision-making in risk control scenarios. Subsequently, it can be combined with business risk control thresholds to convert the probability value into a clear risk level (such as low risk, medium risk, and high risk), supporting specific business operations such as risk warning and abnormal transaction interception.
[0060] In some embodiments, the credit risk prediction model includes at least a spatiotemporal feature extraction layer, a spatial graph convolutional layer, and a gated spatiotemporal fusion layer; inputting the dynamic graph sequence into the pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period includes the following three steps: Step 1: Extract the initial spatiotemporal feature sequence of the dynamic graph sequence through the spatiotemporal feature extraction layer.
[0061] In one embodiment, the spatiotemporal feature extraction layer includes a temporal feature filtering sublayer, a spatial feature aggregation sublayer, and a feature projection sublayer. Extracting an initial spatiotemporal feature sequence from a dynamic graph sequence via the spatiotemporal feature extraction layer includes: performing feature extraction operations on the node feature matrix through the temporal feature filtering sublayer to obtain a temporal feature sequence, wherein the feature extraction operations include at least depthwise separable convolution and pointwise convolution; constructing an associated neighbor graph on the weighted adjacency matrix through the spatial feature aggregation sublayer and performing a single-layer graph convolution aggregation operation to obtain a spatial feature sequence; concatenating the temporal feature sequence and the spatial feature sequence along the feature dimension to obtain a fused feature sequence; and convolving the fused feature sequence through a single 1×1 convolution layer and projecting it onto a unified feature space to obtain the initial spatiotemporal feature sequence.
[0062] To alleviate computational redundancy and gradient interference in joint spatiotemporal modeling, this step employs spatiotemporal separable convolution to decouple feature extraction into two orthogonal sub-operations (temporal feature filtering sub-layer and spatial feature aggregation sub-layer), achieving efficient initial screening. The working logic of the temporal feature filtering sub-layer is as follows: for the node feature matrix at each time step t in the dynamic graph sequence, depthwise separable convolution and pointwise convolution operations are performed.
[0063] The process involves several key components: Depthwise separable convolution: performing a one-dimensional convolution independently on each input tensor to capture the periodic variation of a single feature over time (e.g., the fluctuation cycle of income stability); Pointwise convolution: using a 1×1 convolution kernel to perform cross-dimensional feature fusion on the output of the depthwise separable convolution to obtain a temporal feature matrix. This process iterates through all time steps and concatenates the resulting temporal feature sequence. The spatial feature aggregation sublayer works as follows: for each time step t, a K-nearest neighbor graph based on feature similarity is constructed using the weighted adjacency matrix, and a single-layer graph convolution operation is performed. This process iterates through all time steps and concatenates the resulting spatial feature sequence.
[0064] The use of spatiotemporal separable convolutions significantly reduces the number of model parameters and lowers single-window inference time. The introduction of Top-k adjacency matrix pruning reduces the computational complexity of graph convolutions, enabling efficient training of graph sequences with millions of accounts.
[0065] Step 2: The initial spatiotemporal feature sequence is updated step by step using a dynamic topology adaptation mechanism through a spatial graph convolutional layer, and the spatial evolution pattern of the second account group is mined to obtain the spatial evolution feature sequence.
[0066] This step is dedicated to modeling risk spatial propagation within a dynamic graph structure, consisting of L layers of stacked dynamic topology-adaptive graph convolutions. Unlike traditional models that rely on a fixed adjacency matrix, this step optimizes the graph structure in real time through a dynamic topology adaptation mechanism, focusing on risk-sensitive links and ultimately outputting a spatial evolution representation sequence. The dynamic topology adaptation mechanism automatically strengthens the internal links of the risk homoproton graph, improving the efficiency of group default detection and enabling adaptive focusing on risk propagation paths.
[0067] Step 3: To address the interaction effect of individual evolution and herd contagion in the collaborative credit risk prediction model, a gated spatiotemporal fusion layer was designed to achieve dynamic feature weighting. The gated spatiotemporal fusion layer extracts long-term dependency features from the initial spatiotemporal feature sequence; based on preset fusion weights, the spatial evolution feature sequence and the long-term dependency features are weighted and fused to obtain spatiotemporal coupled features; and a preset activation function is used to calculate the feature vectors corresponding to the spatiotemporal coupled features to obtain the credit risk probability of each account in the second account group over the future.
[0068] In one embodiment, credit risk probability can be used to assess the probability of account default risk and classify risk levels according to the value of the probability, providing an interpretable basis for financial decision-making.
[0069] In one embodiment, multi-granularity risk detection and early warning can also be supported. The model output results can include not only account-level location probabilities to identify high-risk accounts and increase vigilance and prevent risks associated with accounts that have high potential relationship weights with high-risk accounts, but also risk hotspot community detection and key hub node identification functions, which can provide early warning of potential problem accounts through sudden changes in gating weights.
[0070] The technical solution provided in this embodiment constructs an initial transaction graph for a first account group, which includes account nodes corresponding to each account. Based on the correlation strength between account nodes in the initial transaction graph, the topology of the initial transaction graph is optimized to obtain a target transaction graph for a second account group, which belongs to the first account group. A dynamic graph sequence is generated based on the target transaction graph corresponding to each historical moment within a time sliding window. This dynamic graph sequence is then input into a pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period. First, this application, by constructing an initial transaction graph and optimizing its topology, selects strongly correlated accounts to form a second account group and a target transaction graph, accurately mining the spatial correlation features of transaction relationships between accounts. This overcomes the limitation of traditional time-series models that only focus on individual behavior, enriching the dimensions of risk features. Second, this application generates a dynamic graph sequence based on a time sliding window, fully preserving the changing patterns of the transaction network topology and account features over time, achieving accurate characterization of the dynamic evolution of account relationships, and making feature extraction more comprehensive. Finally, the dynamic graph sequence provides a high-quality input with both spatiotemporal dimensions for the credit risk prediction model. Combined with the feature mining capabilities of the pre-trained model, the output credit risk probability is more closely aligned with actual risk control scenarios, providing accurate basis for risk warning, anomaly interception, and other decisions, effectively safeguarding the assets of financial institutions. This application can achieve the collaborative capture of dynamic temporal series and cyberspace features, thereby improving the accuracy of credit risk prediction.
[0071] Figure 2 This is a schematic diagram of the structure of a credit risk prediction device provided in an embodiment of this application, as shown below. Figure 2 As shown, the device 200 may include: The transaction graph construction module 210 is used to construct an initial transaction graph for the first account group, wherein the initial transaction graph includes account nodes corresponding to each account; The transaction graph optimization module 220 is used to optimize the topology of the initial transaction graph based on the correlation strength between each account node in the initial transaction graph, so as to obtain the target transaction graph corresponding to the second account group, wherein the second account group belongs to the first account group; The graph sequence generation module 230 is used to generate a dynamic graph sequence based on the target transaction graph corresponding to each historical moment within a time sliding window. The risk probability prediction module 240 is used to input the dynamic graph sequence into a pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period.
[0072] In one embodiment, the transaction graph optimization module 220 described above can be specifically used to: calculate the association strength of the connecting edges in the initial transaction graph, wherein the connecting edges are constructed based on account transaction behavior; retain connecting edges in the initial transaction graph whose association strength is greater than a preset strength threshold to obtain a candidate transaction graph; for each account node in the candidate transaction graph, retain a preset number of neighbor nodes and corresponding connecting edges based on the ranking of the association strength; determine the retained account nodes as the second account group, and determine the topology structure formed by the retained account nodes and the retained connecting edges as the target transaction graph.
[0073] In one embodiment, the transaction graph optimization module 220 described above can be specifically used to: for each connection edge in the initial transaction graph, obtain the credit feature vectors of the two account nodes corresponding to the connection edge; calculate the cosine similarity of the two credit feature vectors; and perform threshold normalization processing on the cosine similarity to obtain the association strength of the connection edge.
[0074] In one embodiment, the credit feature vector is a feature extracted from account transaction data, and the credit feature vector includes at least one of the following: deposit activity, expenditure level, total inflow amount, inflow stability, minimum repayment ratio, and expenditure ratio.
[0075] In one embodiment, the dynamic graph sequence includes a node feature matrix and a weighted adjacency matrix corresponding to each historical moment. The node feature matrix is determined by the credit feature vector, the number of dimensions of the credit feature vector, and the number of accounts in the second account group. The weighted adjacency matrix is determined by the association strength and the number of accounts in the second account group.
[0076] In one embodiment, the credit risk prediction model includes at least a spatiotemporal feature extraction layer, a spatial graph convolutional layer, and a gated spatiotemporal fusion layer; The aforementioned risk probability prediction module 240 can be specifically used to: extract the initial spatiotemporal feature sequence of the dynamic graph sequence through the spatiotemporal feature extraction layer; update the initial spatiotemporal feature sequence step by step through the spatial graph convolutional layer using a dynamic topology adaptation mechanism, and mine the spatial evolution law of the second account group to obtain a spatial evolution feature sequence; extract the long-term time-series dependency features of the initial spatiotemporal feature sequence through the gated spatiotemporal fusion layer; perform weighted fusion of the spatial evolution feature sequence and the long-term time-series dependency features based on a preset fusion weight to obtain spatiotemporal coupling features; and calculate the feature vector corresponding to the spatiotemporal coupling features using a preset activation function to obtain the credit risk probability of each account in the second account group in the future time period.
[0077] In one embodiment, the spatiotemporal feature extraction layer includes a temporal feature filtering sublayer, a spatial feature aggregation sublayer, and a feature projection sublayer; The aforementioned risk probability prediction module 240 can be specifically used for: performing feature extraction operations on the node feature matrix through the temporal feature filtering sublayer to obtain a temporal feature sequence, wherein the feature extraction operations include at least depthwise separable convolution and pointwise convolution; constructing an associated neighbor graph on the weighted adjacency matrix through the spatial feature aggregation sublayer and performing a single-layer graph convolution aggregation operation to obtain a spatial feature sequence; concatenating the temporal feature sequence and the spatial feature sequence in the feature dimension to obtain a fused feature sequence; and convolving the fused feature sequence and projecting it onto a unified feature space to obtain the initialized spatiotemporal feature sequence.
[0078] The credit risk prediction device provided in this embodiment can be applied to the credit risk prediction method provided in any of the above embodiments, and has the corresponding functions and beneficial effects.
[0079] Figure 3 This is a block diagram of an electronic device used to implement a credit risk prediction method according to embodiments of this application. The electronic device 10 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, 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 illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0080] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0081] Multiple components in electronic device 10 are connected to input / output (I / O) interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0082] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as credit risk prediction methods.
[0083] In some embodiments, the credit risk prediction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory (ROM) 12 and / or communication unit 19. When the computer program is loaded into random access memory (RAM) 13 and executed by processor 11, one or more steps of the credit risk prediction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the credit risk prediction method by any other suitable means (e.g., by means of firmware).
[0084] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0085] Computer programs used to implement the methods of this application 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, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0086] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0087] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0088] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0089] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can 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 address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.
[0090] Note that the above are merely preferred embodiments and technical principles applied in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. For example, those skilled in the art can use the various forms of processes shown above to reorder, add, or delete steps; the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution of this application can be achieved, and no limitations are imposed herein.
[0091] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A credit risk prediction method, characterized in that, The method includes: Construct an initial transaction graph for the first account group, the initial transaction graph including account nodes corresponding to each account; The topology of the initial transaction graph is optimized based on the correlation strength between each account node in the initial transaction graph to obtain the target transaction graph corresponding to the second account group, wherein the second account group belongs to the first account group; A dynamic graph sequence is generated based on the target transaction graph corresponding to each historical moment within a time sliding window. The dynamic graph sequence is input into a pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period.
2. The credit risk prediction method according to claim 1, characterized in that, The step of optimizing the topology of the initial transaction graph based on the correlation strength between account nodes in the initial transaction graph to obtain the target transaction graph corresponding to the second account group includes: Calculate the correlation strength of the connecting edges in the initial transaction graph, where the connecting edges are constructed based on account transaction behavior; In the initial transaction graph, the connection edges with a correlation strength greater than a preset strength threshold are retained to obtain alternative transaction graphs; For each account node in the candidate transaction graph, a preset number of neighbor nodes and corresponding connection edges are retained based on the ranking of the association strength; The retained account nodes are identified as the second account group, and the topology formed by the retained account nodes and the retained connecting edges is identified as the target transaction graph.
3. The credit risk prediction method according to claim 2, characterized in that, The calculation of the association strength of the connecting edges in the initial transaction graph includes: For each connecting edge in the initial transaction graph, obtain the credit feature vectors of the two account nodes corresponding to the connecting edge; Calculate the cosine similarity between the two credit feature vectors; The cosine similarity is thresholded to obtain the association strength of the connecting edge.
4. The credit risk prediction method according to claim 3, characterized in that, The credit feature vector is a feature extracted from account transaction data, and the credit feature vector includes at least one of the following: fund deposit activity, expenditure level, total inflow amount, inflow amount stability, minimum repayment ratio, and expenditure ratio.
5. The credit risk prediction method according to claim 4, characterized in that, The dynamic graph sequence includes a node feature matrix and a weighted adjacency matrix corresponding to each historical moment. The node feature matrix is determined by the credit feature vector, the number of dimensions of the credit feature vector, and the number of accounts in the second account group. The weighted adjacency matrix is determined by the association strength and the number of accounts in the second account group.
6. The credit risk prediction method according to claim 1, characterized in that, The credit risk prediction model includes at least a spatiotemporal feature extraction layer, a spatial graph convolutional layer, and a gated spatiotemporal fusion layer; the step of inputting the dynamic graph sequence into the pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period includes: The initial spatiotemporal feature sequence of the dynamic graph sequence is extracted through the spatiotemporal feature extraction layer; The initial spatiotemporal feature sequence is updated step by step using a dynamic topology adaptation mechanism through the spatial graph convolutional layer, and the spatial evolution pattern of the second account group is mined to obtain the spatial evolution feature sequence. The long temporal dependency features of the initial spatiotemporal feature sequence are extracted through the gated spatiotemporal fusion layer; The spatial evolution feature sequence and the long temporal dependence feature are weighted and fused based on a preset fusion weight to obtain spatiotemporal coupling features; By calculating the feature vector corresponding to the spatiotemporal coupling feature using a preset activation function, the credit risk probability of each account in the second account group over a future period can be obtained.
7. The credit risk prediction method according to claim 6, characterized in that, The spatiotemporal feature extraction layer includes a temporal feature filtering sublayer, a spatial feature aggregation sublayer, and a feature projection sublayer; the extraction of the initial spatiotemporal feature sequence of the dynamic graph sequence through the spatiotemporal feature extraction layer includes: The temporal feature filtering sublayer performs feature extraction operations on the node feature matrix to obtain a temporal feature sequence. The feature extraction operations include at least depthwise separable convolution and pointwise convolution. The spatial feature aggregation sublayer constructs an associated neighbor graph from the weighted adjacency matrix, and performs a single-layer graph convolution aggregation operation to obtain a spatial feature sequence. The temporal feature sequence and the spatial feature sequence are concatenated along the feature dimension to obtain a fused feature sequence; The fused feature sequence is convolved and projected onto a unified feature space to obtain the initial spatiotemporal feature sequence.
8. A credit risk prediction device, characterized in that, The device includes: The transaction graph construction module is used to construct an initial transaction graph for the first group of accounts, wherein the initial transaction graph includes account nodes corresponding to each account; The transaction graph optimization module is used to optimize the topology of the initial transaction graph based on the correlation strength between each account node in the initial transaction graph, so as to obtain the target transaction graph corresponding to the second account group, wherein the second account group belongs to the first account group; The graph sequence generation module is used to generate dynamic graph sequences based on the target transaction graph corresponding to each historical moment within a time sliding window; The risk probability prediction module is used to input the dynamic graph sequence into a pre-trained credit risk prediction model to obtain the credit risk probability of the second account group over a future period.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores a computer program that is executed by the at least one processor, which enables the at least one processor to perform the credit risk prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the credit risk prediction method according to any one of claims 1 to 7.