Risk identification method, system and device for delivery network point and medium
By extracting features and modeling causal relationships from risk factor data of delivery outlets, a directed causal graph is generated, which solves the problem that existing technologies cannot reveal the root causes of risks and enables accurate identification and management decision support for risks at delivery outlets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies are insufficient to reveal the root causes of risks at delivery and postal outlets, making it impossible to explain to managers the specific factors that trigger these risks, which severely restricts the optimization of risk management strategies.
By acquiring a dataset of risk factors from delivery outlets, feature extraction and causal relationship modeling are performed to generate an initial directed causal graph. The causal strength is then adjusted using a causal discovery model to generate a target directed causal graph, ultimately leading to risk identification.
It enables accurate identification of risks at delivery outlets, helps managers understand the driving factors of increased risks, and assists in making more effective risk management decisions.
Smart Images

Figure CN121745693A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of risk identification, in particular to a risk identification method, system, device and medium for a delivery network point. BACKGROUND
[0002] With the acceleration of digital transformation of the logistics industry, the risk identification demand of delivery network points is increasingly complex. The complexity and interdependence of risk causes make it increasingly challenging to manage risks, and identifying the root causes of these risks is a key challenge. Traditional methods rely on expert judgment and statistical analysis, which are difficult to effectively handle the complexity of network point risks and may produce misleading correlations, leading to decision-making errors.
[0003] Although existing machine learning and optimization techniques have made some progress in predicting and mitigating risks, they lack in revealing the root causes of risks, and cannot explain to managers the specific transmission factors that trigger risks (such as A network point abnormalities leading to an increase in B region risks), which severely restricts the optimization of risk disposal strategies. SUMMARY
[0004] The purpose of the present application is to provide a risk identification method, system, device and medium for a delivery network point, which can solve the problem of being unable to reveal the root causes of delivery network point risks, leading to the inability to explain to managers the specific transmission factors that trigger risks, and severely restricting the optimization of delivery network point risk disposal strategies.
[0005] To solve the above technical problems, an embodiment of the present application provides a risk identification method for a delivery network point, comprising the following steps: obtaining a risk factor dataset of a delivery network point; extracting features of each risk factor in the risk factor dataset, and modeling the causal relationships between each risk factor according to the extracted features; wherein each causal relationship has a corresponding causal strength and causal direction; taking the risk factors as nodes in a graph structure, establishing directed edges with weights between the nodes of the graph structure according to the causal relationships between the risk factors and the causal strength and causal direction of each causal relationship, and generating an initial directed causal graph; obtaining the inverse information entropy of the causal strength of each causal relationship to quantify the causal strength, and adjusting the weights of the directed edges in the initial directed causal graph through the quantized causal strength to generate a target directed causal graph; According to the target directed causal graph, the risk of the delivery network point is identified.
[0006] Optionally, the initial directed causal graph is generated by a causal discovery model, and the causal discovery model is trained based on a network composed of an encoder, a graph neural network and a decoder; The encoder is configured to extract an initial feature representation of each risk factor in the risk factor dataset; The graph neural network is configured to update the initial feature representation of each node in the graph structure based on the initial adjacency matrix of the graph structure and the initial feature representation of the neighbor nodes of each node, to obtain a target feature representation; The decoder is configured to predict a causal relationship between each pair of nodes and a causal strength and a causal direction of each causal relationship based on the target feature representation of each node, and update the initial adjacency matrix of the graph structure based on the causal relationship between each pair of nodes and the causal strength and the causal direction of each causal relationship, to generate a target adjacency matrix; wherein the target adjacency matrix is configured to represent a topological structure of the initial directed causal graph.
[0007] Optionally, the encoder is composed of a plurality of identical layers, each layer comprising two sub-layers connected by a residual connection, the first sub-layer being configured to extract features of each risk factor by a multi-head self-attention mechanism, and the second sub-layer being configured to perform a nonlinear transformation on the features extracted by the multi-head self-attention mechanism by a fully connected feedforward network, to obtain an initial feature representation between each pair of risk factors; The graph neural network has a plurality of layers, and each layer is configured to update the initial feature representation of each node by the following formula: ; In the formula, h i is a node i In the first k layer, the feature of the node N is the initial feature representation of the node i , and the feature of the node i is the initial feature representation of the node A ij is an element of the initial adjacency matrix, representing a connection between the node i and the node j , is a preset weight matrix, W is a bias term, b is an activation function; σ The decoder predicts a score of the causal relationship between each pair of nodes according to the following formula, and converts the predicted score by a Sigmoid function to obtain an existence probability of the causal relationship between each pair of nodes as a value of the corresponding element A ij in the target adjacency matrix: ; In the formula, and are weight matrices, is a training parameter, is a hyperbolic tangent activation function, and is a target feature representation of a pair of nodes.
[0008] Optionally, in the training process, the causal discovery model adopts a scoring function based on Bayesian information criterion (BIC) to score the initial directed causal graph generated in each iteration, and trains to maximize the score value; wherein the scoring function includes a reward term and a penalty term, the reward term is used to give a reward when the initial directed causal graph in the iteration is a loop-free graph, and the penalty term is used to give a penalty when the sparsity of the initial directed causal graph in the iteration is greater than a first preset threshold.
[0009] Optionally, the loss function used by the causal discovery model in training is constructed according to the difference between the reward value predicted by the causal discovery model and the reward value calculated based on the reward formula, and the difference between the causal relationship distribution predicted by the causal discovery model and the causal relationship distribution with a confidence greater than a second preset threshold extracted from historical causal chains or counterfactual reasoning.
[0010] Optionally, the inverse information entropy of the causal strength of each causal relationship is obtained to quantify the causal strength, including: The inverse information entropy of the causal strength of each causal relationship is calculated by the following formula: ; In the formula, and respectively represent the information entropy of the risk factor and the risk factor ; The calculated inverse information entropy is logarithmically transformed to obtain the quantitative value of the causal strength.
[0011] Optionally, the risk factor data set of the postal delivery network point is obtained, including: Obtain an initial risk factor data set of the postal delivery network point; Randomly sample a plurality of risk factors from the initial risk factor data set and obtain AUC values of the plurality of risk factors; Train a Gaussian process proxy model through the plurality of risk factors and the corresponding AUC values; Based on the Gaussian process proxy model, data optimization is performed on all risk factors in the initial risk factor data set using the expected improvement criterion to obtain a target risk factor data set, so that the AUC values corresponding to all risk factors in the target risk factor data set satisfy a preset condition.
[0012] Embodiments of the present application also provide a risk identification system for a postal delivery network point, comprising: A data acquisition module is configured to acquire a risk factor data set of a postal delivery network point; The causal modeling module is used to extract features from each risk factor in the risk factor dataset and model the causal relationships between the risk factors based on the extracted features; each causal relationship has a corresponding causal strength and causal direction. The causal graph generation module is used to generate an initial directed causal graph by establishing weighted directed edges between nodes in the graph structure, with risk factors as nodes in the graph structure, based on the causal relationships between various risk factors and the causal strength and direction of each causal relationship. The causal graph adjustment module is used to obtain the inverse information entropy of the causal strength of each causal relationship in order to quantify the causal strength, and adjust the weight of each directed edge in the initial directed causal graph based on the quantified causal strength to generate the target directed causal graph. The risk identification module is used to identify risks at delivery outlets based on the target directed cause-effect graph.
[0013] Embodiments of the present invention also provide a computer device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described risk identification method for postal outlets.
[0014] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described risk identification method for postal and express delivery outlets.
[0015] The risk identification method for delivery outlets provided by this invention has at least the following beneficial effects: This study addresses various risk factors at delivery outlets by extracting features from each risk factor and modeling causal relationships between them. Using risk factors as nodes in a graph structure, weighted directed edges are established between nodes based on the causal relationships, their strength, and direction. This generates a directed causal graph. The causal discovery process reveals relationships between data through observation, identifying causal paths and helping to more clearly understand the driving factors leading to increased risk. Finally, the inverse information entropy of causal strength is used to quantify the impact of each risk factor on the outlet's risk, achieving a leap from "correlation inference" to "causal tracing" in risk identification. This allows for more accurate identification of key factors behind increased outlet risk levels, assisting outlet staff in making risk management decisions. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0017] Figure 1 A flowchart illustrating a risk identification method for delivery outlets provided by the present invention. Figure One ; Figure 2 A flowchart illustrating a risk identification method for delivery outlets provided by the present invention. Figure Two . Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0019] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0020] One embodiment of the present invention relates to a risk identification method for delivery outlets. The specific process of the risk identification method for delivery outlets in this embodiment can be as follows: Figure 1 As shown, it includes: Step 101: Obtain the risk factor dataset of the delivery network.
[0021] The risk factor dataset for delivery outlets includes several risk factors, such as the number of customer complaints, business error rate, number of employee training sessions, compliance operation records, and equipment failure rate.
[0022] Step 102: Extract features from each risk factor in the risk factor dataset and model the causal relationships between the risk factors based on the extracted features; where each causal relationship has a corresponding causal strength and causal direction.
[0023] Step 103: Using risk factors as nodes in the graph structure, based on the causal relationships between various risk factors and the causal strength and direction of each causal relationship, establish weighted directed edges between the nodes of the graph structure to generate an initial directed causal graph.
[0024] Specifically, in this embodiment, the initial directed causal graph is generated through a causal discovery model, which is trained based on a network consisting of an encoder, a graph neural network, and a decoder. The encoder is used to extract the initial feature representation of each risk factor in the risk factor dataset. The graph neural network is used to update the initial feature representation of each node based on the initial adjacency matrix of the graph structure, according to the initial feature representation of each node's neighboring nodes, to obtain the target feature representation. The decoder is used to predict the causal relationship between each pair of nodes, as well as the causal strength and causal direction of each causal relationship, based on the target feature representation of each node, and to update the initial adjacency matrix of the graph structure based on the causal relationship between each pair of nodes, as well as the causal strength and causal direction of each causal relationship, to generate the target adjacency matrix. The target adjacency matrix is used to characterize the topological structure of the initial directed causal graph.
[0025] The encoder consists of multiple identical layers, each containing two sub-layers connected by residual connections. The first sub-layer extracts features for each risk factor using a multi-head self-attention mechanism, while the second sub-layer performs a non-linear transformation on the features extracted by the multi-head self-attention mechanism using a fully connected feedforward network to obtain the initial feature representation between each risk factor. The graph neural network has multiple layers, each updating the initial feature representation of each node based on the initial feature representations of its neighboring nodes. The decoder predicts the score of the causal relationship between each pair of nodes based on the target feature representation of each node, and transforms the predicted score using a sigmoid function to obtain the existence probability of the causal relationship between each pair of nodes, which is used as the corresponding element A in the target adjacency matrix. ij The value of .
[0026] In one example, during the training process, the causal discovery model uses a scoring function based on the Bayesian Information Criterion (BIC) to score the initial directed causal graph generated in each iteration, and trains with the goal of maximizing the score value. The scoring function includes a reward term and a penalty term. The reward term is used to reward when the initial directed causal graph of the iteration is an acyclic graph, and the penalty term is used to penalize when the sparsity of the initial directed causal graph of the iteration is greater than a preset threshold.
[0027] In its implementation, this invention employs reinforcement learning to assist causal discovery: causal discovery reveals relationships between variables through observed data, helping to more clearly understand the driving factors leading to increased risk. Reinforcement learning enhances this process by optimizing the causal graph to focus on the most relevant factors. First, an encoder-GNN-decoder framework is used to generate a directed graph. The encoder consists of multiple identical layers, each containing a multi-head self-attention mechanism and a fully connected feedforward network. The encoder extracts preliminary features from the input data, which serve as initial feature representations for the nodes and are input into the graph neural network (GNN). The GNN consists of multiple layers to aggregate and pass information between nodes layer by layer. Each GNN layer updates node features using an adjacency matrix. The GNN captures complex relationships in the graph through information passing between nodes, making it suitable for causal graph generation. The decoder receives the features processed by the GNN and is responsible for converting these features into causal relationship predictions. The decoder can use fully connected layers to process these features, generating the strength and direction of causal relationships. The adjacency matrix is generated using a sigmoid function and Bernoulli distribution sampling, while avoiding self-loops.
[0028] Meanwhile, Bayesian Information Criterion (BIC) scoring is used, and reward and penalty terms are introduced to ensure the generation of DAG. The algorithm is solved by maximizing the reward. During training, the encoder output is fed into the evaluation module. The Adam optimizer is used to minimize the mean square error between the prediction and the actual reward. The learning rate, epochs and batch size are selected through cross-validation to ensure optimal performance. A custom reward function is used to minimize the risk of network points, and a causal strength threshold is set to filter weak relationships.
[0029] The following is a detailed explanation of the above-mentioned use of reinforcement learning to assist in causal discovery: The encoder consists of six identical layers, each containing two sublayers. The first sublayer implements a multi-head self-attention mechanism to capture implicit associations between nodes of different modalities, and the second sublayer is a fully connected feedforward network with position encoding. These sublayers are connected via residual connections. The output of each sublayer is normalized as follows:
[0030] ; In the formula, This indicates the function applied in the sublayer, for the input. Perform specific transformations. Sub-layer functions Acting as a feature extractor, it filters out noise and generates the transformed representation. It retains the input The most relevant information. This transformation is crucial because the input... It typically contains high-dimensional redundant data. This is a residual connection operation. It converts the original input... Compared with the result after sub-layer transformation Add them together.
[0031] Residual connections facilitate gradient backpropagation, mitigating the vanishing gradient problem in deep neural networks. They also allow the network to learn the differences between the input and sub-layer outputs, making training easier. LayerNorm is a normalization technique that normalizes all dimensions of each sample. Layer normalization is better suited for handling inputs with variable sequence lengths. By adjusting the mean and variance of the data, it makes the data distribution more stable, helping to accelerate model training and improve model stability. To maintain consistency, all sub-layers and embedded outputs in the model have the same dimensions. .
[0032] Then, leveraging the edge weight learning capability of the GNN, the strength of causal relationships between modalities is dynamically modeled. For example, if there is a causal relationship between "surge in business volume during Double Eleven" in time-series data and "backlog at hub outlets" in spatial data, weighted edges are established between the corresponding nodes, with the weight values determined by the causal strength threshold of reinforcement learning. The encoder first extracts multimodal features, and then inputs these features into the GNN for further graph structure processing. The GNN maps different modal data (such as time-series data of outlet risk, geospatial data, and policy text data) into graph nodes. The GNN layer is applied as follows:
[0033] ; In the formula, h i It is a node i In the k Features of the layer N ( i ) is a node i The set of neighboring nodes, A ij These are elements of the adjacency matrix (i.e., the initial adjacency matrix), representing nodes. i and j The connection between them W It is a trainable weight matrix. b It is a bias term. σ It is an activation function (ReLU activation function).
[0034] The decoder receives the features processed by the GNN and is responsible for converting these features into causal relationship predictions. The decoding is defined as follows:
[0035] ; In the formula, ,and These are trainable parameters. R dk×1Refers to trainable weight vectors u Dimensions. and It is the node feature result output by GNN (i.e., the target feature representation of the node). and It is a weight matrix, used to encode the input vector. and A linear transformation is performed, using matrix multiplication to change the dimension and numerical distribution of the vectors, in order to better extract and fuse features. The dimension of the matrix needs to be proportional to the input vector. , Only with proper matching can they be multiplied correctly. It is also a vector, which is related to the vector passing through it. The inner product operation is performed on the result after the activation function is applied. express (transpose). It is the hyperbolic tangent activation function, and its functional form is: The range is between (-1, 1). Here, for The result is then subjected to a nonlinear transformation to introduce nonlinear factors, enhancing the model's ability to fit complex relationships. In this equation, the decoder processes the transformed representation. The encoder and GNN extract meaningful features from the input and attempt to map them to observed relationships in the data. The decoder uses these features to predict the strength and direction of causal relationships. Thus, the encoder and GNN extract meaningful features from the input, while the decoder uses these features to estimate causal relationships.
[0036] To generate the adjacency matrix, each element is first passed through a sigmoid function, and then based on the probability... Sampling is performed using the Bernoulli distribution: ; In the formula, M It is an element of the adjacency matrix, which ultimately determines whether there is a directed edge between nodes, and is a binary value {0,1}; It is the Sigmoid function. The score is compressed to the [0,1] interval, representing the probability of the existence of an edge; Ber () represents the Bernoulli distribution, a discrete probability distribution: [where is the probability distribution]. p Generate 1 (with an edge), with probability 1− p Generate 0 (no borders).
[0037] The hyperbolic tangent (tanh) function and the sigmoid function are combined to balance transform values and interpretability. The hyperbolic tangent maps input values to the interval [−1, 1], ensuring that both positive and negative effects are captured symmetrically, which is crucial when dealing with data involving bidirectional variations. However, for outputs like probability or causal strength, values need to be constrained to the interval [0, 1]. This is where the sigmoid function comes in. The sigmoid function compresses the values generated by the hyperbolic tangent into this interval, providing a smooth and interpretable output representing probability or relative strength. By using the hyperbolic tangent to handle a wide range of input values and using the sigmoid function to transform these values into a usable probability space, the model ensures that the results of causal discovery are both balanced and interpretable.
[0038] In one example, to improve the model's convergence efficiency, a random sparse adjacency matrix A is used. (0) As the initialization structure for a reinforcement learning causal graph, its elements satisfy: A (0) ij ~Bernoulli(p0), p0=(2 lod d) / d; In the formula, d is the core feature dimension (the number of nodes in the causal graph), log d is the logarithmic scale of the number of nodes, p0 is the initial probability of each edge existing, and Bernoulli(p0) is the Bernoulli distribution: with probability p0, 1 (edge present) is generated, and 1 − p0 generates 0 (no edge present). This initialization strategy ensures that the edge density of the initial graph adaptively matches the feature scale (average degree is 2 log d), avoiding both the information transmission failure caused by an empty graph and the redundant computation brought by a fully connected graph.
[0039] In one example, this embodiment designs a DAG constraint and scoring mechanism: to avoid self-loops, the diagonal elements of the adjacency matrix... The value is set to zero. The adjacency matrix of the complete directed graph is obtained by iteratively processing the encoder output of all input variables. The scoring function employs the Bayesian Information Criterion (BIC), a metric for evaluating the structural rationality of the graph model. Essentially, it represents a trade-off between model complexity and its ability to fit data. This criterion is decomposable, allowing for adjustment of the penalty term. (Graph) The BIC score is expressed as:
[0040] ; In the formula, P ( ) The maximum likelihood probability of the data given a graph G. L This represents the set of parameters in a cause-effect graph model. for L Maximum likelihood estimate, forL The dimension (number of parameters). m For dataset X Size. The smaller the value, the stronger the graph structure. The better the fit to the data and the lower the complexity, the better it is used as the positive optimization objective in the reward function (because it has a negative sign in front of it, the overall reward increases with...). (Decreases while increasing). To ensure the generated graph is a DAG, the scoring function includes both a reward and a penalty term, and introduces two acyclic constraints:
[0041] ; In the formula, For the indicator function, if the graph no DAG ( DAGs yes DAG (the set of which), then =1; if it is a DAG, then =0, For hyperparameters, Used to control the intensity of the penalty, this term generates a positive penalty value when the graph structure contains cycles. The negative sign is used to convert this into a "negative reward" in the reward function, forcing the model to optimize to a DAG structure. By penalizing the adjacency matrix The non-sparse nature of the graph makes the graph structure simpler and avoids overfitting. Typically represented as a graph adjacency matrix Sparsity measure , d This function represents the number of nodes in the graph. For cyclic graphs, its value is non-negative and small. A directed graph G has a binary adjacency matrix that is acyclic if and only if:
[0042] ; In the formula, For matrix A The index, trace It is the trace of a matrix, that is, the sum of the elements on the main diagonal of the matrix. and The larger the value, the higher the probability that the high-reward graph is acyclic. The goal of this embodiment is to maximize the reward across all possible directed graphs, which is equivalent to solving:
[0043] ; In a specific implementation, the loss function used by the causal discovery model during training in this embodiment is constructed based on the difference between the reward value predicted by the causal discovery model and the reward value calculated based on the reward formula, as well as the difference between the causal relationship distribution predicted by the causal discovery model and the causal relationship distribution with a confidence level greater than a second preset threshold extracted from historical causal chains or counterfactual reasoning.
[0044] The model training strategy is as follows: During training, samples containing temporal features and spatial correlations are randomly selected from the spatiotemporal dynamic risk dataset. The encoder captures the implicit correlations between network risk factors through a multi-head attention mechanism. Its output is processed by the GNN cross-modal fusion module and then input into the evaluation module. The evaluation module uses a hybrid loss function with a graph structure regularization term to ensure that the causal relationships after cross-modal fusion conform to graph topological constraints.
[0045] ; In the formula, α and β These are dynamic weighting coefficients, automatically adjusted by the meta-learner based on real-time data distribution. R pred It is the reward value of the evaluation module for the current causal graph prediction. R true It is the actual reward calculated based on the reward formula. p ( causal ) is the distribution of causal relationships predicted by the model (such as the normalized result of causal strength output by the decoder). q ( causal () is a distribution of true causal relationships with high confidence (extracted from historical causal chains or counterfactual reasoning). To determine the KL divergence of causal relationship distributions, the model prioritizes learning high-confidence causal patterns. At the hyperparameter optimization level, a two-layer search mechanism based on Bayesian optimization and evolutionary algorithms is constructed: the outer layer dynamically updates the search space of the learning rate η and batch size B using a Gaussian process model, while the inner layer optimizes the combination of the L2 regularization coefficient λ and the dropout rate d using an evolutionary strategy (ES). The Adam optimizer is improved to a dynamic momentum version.
[0046] , ; ; In the formula, To achieve an adaptive response to sparse gradients, we use gradient variance. m t It is a first-order moment estimate (momentum term). v t It is a second-order moment estimate (adaptive term). η tIt is a dynamic learning rate. β 1 is the momentum decay parameter, which controls the historical gradient weights. β 2 is the variance decay parameter, which controls the weights of the squared gradient. It is the gradient of the current loss function. η 0 is the initial learning rate, and γ is the adaptive coefficient that controls the rate at which the learning rate decays.
[0047] The custom reward function introduces a causal entropy regularization term, designed as follows: ; In the formula, H ( c i ) represents the causal strength c i Entropy is used to quantify the certainty of causal relationships. This is an indicator function for weak causal connections. Weights , , Optimization through dynamic game theory mechanism—when a risk mutation is detected (such as...) When ), automatically elevate Weights are used to enhance the discovery of key causal chains. Causality strength threshold. Instead of being fixed, it is dynamically adjusted based on the topological entropy of the historical causal graph:
[0048] ; In the formula, It is the basic threshold to ensure basic filtering capability; κ is the entropy sensitivity coefficient; Entropy() is the causal graph entropy, which quantifies the uncertainty of the graph structure; It is a dynamic threshold; G t For a causal graph at time t, Entropy( G t The uncertainty of the representation graph structure enables adaptive filtering of causal relationships in dynamic environments. Furthermore, a "causal memory replay" mechanism is introduced: high-confidence causal chains discovered during historical training are stored in a dynamic memory bank, and replay is sampled with probability p during training, enhancing the model's ability to learn long-tailed causal patterns. The evaluation module combines counterfactual reasoning techniques to verify the authenticity of causal relationships through simulated intervention experiments, using the following formula:
[0049] ; In the formula, X It is the causal factor that has been interfered with; Y It is a risk level indicator; -> Yes X arrive Y The path of influence; do ( X=1) is an intervention operation, a forced setting. X A virtual experiment with a value of 1; do ( X =0) is an intervention operation, forcing the setting. X A virtual experiment with a value of 0; E ( Y |·) is under intervention operation Y Calculate the expected value; Effect It's the difference.
[0050] The training strategy has been upgraded from "static parameter optimization" to "dynamic causal evolution".
[0051] In some embodiments, the characteristics of postal and delivery risks face challenges of high-dimensional data redundancy and nonlinear coupling. Traditional feature selection methods (such as exhaustive search and random search) suffer from exponentially increasing computational complexity, making it difficult to complete the search for the optimal feature subset within a reasonable timeframe. To address this issue, this embodiment proposes a feature combination screening framework based on Bayesian optimization. Through the synergistic optimization of a Gaussian process surrogate model and an expected improvement criterion, it achieves efficient exploration of the high-dimensional feature space. Compared to traditional methods, this technique can improve search efficiency by 2 to 3 orders of magnitude while ensuring that the selected feature subset has strong discriminative power and low redundancy.
[0052] Specifically, the process involves: acquiring an initial risk factor dataset for delivery outlets; randomly sampling multiple risk factors from the initial risk factor dataset and obtaining the AUC values of these risk factors; training a Gaussian process surrogate model using the multiple risk factors and their corresponding AUC values; and optimizing all risk factors in the initial risk factor dataset based on the Gaussian process surrogate model using the expected improvement criterion to obtain a target risk factor dataset, so that the AUC values of all risk factors in the target risk factor dataset meet preset conditions.
[0053] In the specific implementation, the objective function is first defined as the 5-fold cross-validation AUC value of the LightGBM model. The input is the feature subset S⊆F (F is all 127 original features), and the output is the model performance index AUC(S)∈[0,1]. A Gaussian process (GP) is used as a surrogate model with a kernel function of Matérn5 / 2 to model the nonlinear relationship between the feature subset and the model performance.
[0054] The Bayesian optimization process includes the following steps: randomly sampling a subset of 50 features (the subset size is limited to 5-30 features), calculating the initial AUC value to construct the prior distribution, and selecting the next candidate subset using the Expected Improvement (EI) criterion.
[0055] ; In the formula,f ( x ) is the objective function value, i.e., the feature subset. S AUC performance of 5-fold cross-validation on the LightGBM model f ( x =AUC( S ); x + represents the feature combination with the highest AUC in historical evaluations; max (·) indicates a positive deviation; E [] represents the expectation. The L-BFGS-B algorithm is used to maximize... EI The function obtains a new subset Snew. The AUC(Snew) is evaluated and the GP proxy model is updated. The process stops when the AUC improvement over 10 consecutive iterations is too small or the total number of iterations reaches a specified number. After optimization, low-dimensional core features are finally selected, such as the user's historical rejection rate, the volume-to-weight ratio of sensitive items, and the risk transmission coefficient between adjacent branches.
[0056] Step 104: Obtain the inverse information entropy of the causal strength of each causal relationship to quantify the causal strength, and adjust the weight of each directed edge in the initial directed causal graph based on the quantified causal strength to generate the target directed causal graph.
[0057] In practical implementation, based on information entropy, causal strength (i.e., the inverse information entropy of the causal strength of each causal relationship) is defined as: ; In the formula, and Representing variables respectively and The information entropy. For finite datasets, the true probability distribution or density function cannot be directly obtained; therefore, the entropy of the probability distribution of the risk factor set can be estimated using a gamma function estimator.
[0058] ; In the formula, It is a double gamma function. Represents the dataset The dimension of IIE causality is calculated using the original data. However, due to potential differences in the dimensionality of variables in the original data, the calculated causality may deviate from its true value. To address this issue, the IIE causality of normalized data is given by the following formula:
[0059] ; In the formula, T N It is the normalized causal strength; S ( px 1, N) is the normalized variable x Information entropy of 1 represents x 1. Uncertainty at the standard scale; S ( px 2, N ) is the normalized variable x Information entropy of 2, representing x 2. Uncertainty at the standard scale; |·| is the absolute value operation; N It is a marker that specifically refers to the version of data after normalization.
[0060] Finally, a logarithmic transformation was applied to the calculated causal strengths to normalize their distribution and stabilize the variance. This transformation enhances the interpretability of the results and makes it easier to compare the relative impacts of different factors on site risk.
[0061] Step 105: Based on the target directed cause-effect graph, identify risks at delivery outlets.
[0062] This invention combines causal discovery with reinforcement learning to solve the risk identification problem at delivery outlets, more accurately identifying the key factors behind increased risk levels at these outlets. It assists outlet staff in making risk management decisions, enabling a leap from "correlation inference" to "causal tracing" in risk identification.
[0063] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this invention. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, without changing the core design of the algorithm and process, are also within the protection scope of this invention.
[0064] Another embodiment of the present invention relates to a risk identification system for delivery outlets. The implementation details of this risk identification system are described below. The following details are provided for ease of understanding and are not essential for implementing this solution. The risk identification system for delivery outlets in this embodiment includes: The data acquisition module is used to acquire a dataset of risk factors from delivery outlets. The causal modeling module is used to extract features from each risk factor in the risk factor dataset and model the causal relationships between the risk factors based on the extracted features; each causal relationship has a corresponding causal strength and causal direction. The causal graph generation module is used to generate an initial directed causal graph by establishing weighted directed edges between nodes in the graph structure, with risk factors as nodes in the graph structure, based on the causal relationships between various risk factors and the causal strength and direction of each causal relationship. The causal graph adjustment module is used to obtain the inverse information entropy of the causal strength of each causal relationship in order to quantify the causal strength, and adjust the weight of each directed edge in the initial directed causal graph based on the quantified causal strength to generate the target directed causal graph. The risk identification module is used to identify risks at delivery outlets based on the target directed cause-effect graph.
[0065] It is not difficult to see that this embodiment is a system embodiment corresponding to the above method embodiments, and this embodiment can be implemented in conjunction with the above method embodiments. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above embodiments.
[0066] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by this invention; however, this does not mean that other units are absent from this embodiment.
[0067] Another embodiment of the present invention relates to a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the risk identification method for delivery outlets in the above embodiments.
[0068] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.
[0069] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.
[0070] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.
[0071] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0072] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing the present invention, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A risk identification method for postal and express delivery outlets, characterized in that, The method includes: Obtain a dataset of risk factors for delivery and courier outlets; Features are extracted for each risk factor in the risk factor dataset, and causal relationships between the risk factors are modeled based on the extracted features; where each causal relationship has a corresponding causal strength and causal direction. Using risk factors as nodes in the graph structure, and based on the causal relationships between various risk factors and the causal strength and direction of each causal relationship, weighted directed edges are established between the nodes of the graph structure to generate an initial directed causal graph. Obtain the inverse information entropy of the causal strength of each causal relationship to quantify the causal strength, and adjust the weight of each directed edge in the initial directed causal graph based on the quantified causal strength to generate the target directed causal graph. Risk identification is performed on delivery outlets based on the target directed cause-effect graph.
2. The risk identification method for delivery outlets according to claim 1, characterized in that, The initial directed causal graph is generated through a causal discovery model, which is trained based on a network consisting of an encoder, a graph neural network, and a decoder. The encoder is used to extract the initial feature representation of each risk factor in the risk factor dataset; Graph neural networks are used to represent risk factors as nodes in a graph structure. Based on the initial adjacency matrix of the graph structure, the initial feature representation of each node is updated according to the initial feature representation of its neighboring nodes to obtain the target feature representation. The decoder is used to predict the causal relationship between each pair of nodes and the causal strength and causal direction of each causal relationship based on the target feature representation of each node. Based on the causal relationship between each pair of nodes and the causal strength and causal direction of each causal relationship, the decoder updates the initial adjacency matrix of the graph structure to generate the target adjacency matrix. The target adjacency matrix is used to characterize the topology of the initial directed causal graph.
3. The risk identification method for delivery outlets according to claim 2, characterized in that, The encoder consists of multiple identical layers, each containing two sub-layers connected by residual connections. The first sub-layer extracts features for each risk factor using a multi-head self-attention mechanism, and the second sub-layer performs a nonlinear transformation on the features extracted by the multi-head self-attention mechanism using a fully connected feedforward network to obtain the initial feature representation between each risk factor. Graph neural networks have multiple layers, and each layer updates the initial feature representation of each node using the following formula: ; In the formula, h i It is a node i In the k Features of the layer N ( i ) is a node i The set of neighboring nodes, A ij These are elements of the initial adjacency matrix, representing nodes. i and nodes j The connection between them W It is a preset weight matrix. b It is a bias term. σ It is an activation function; The decoder predicts the score of the causal relationship between each pair of nodes according to the following formula, and transforms the predicted score using the Sigmoid function to obtain the existence probability of the causal relationship between each pair of nodes, which is then used as the corresponding element in the target adjacency matrix. A ij Value: ; In the formula, and It is a weight matrix. These are training parameters. It is the hyperbolic tangent activation function. and It is a target feature representation of a pair of nodes.
4. The risk identification method for delivery outlets according to claim 2 or 3, characterized in that, During the training process, the causal discovery model uses a scoring function based on the Bayesian Information Criterion (BIC) to score the initial directed causal graph generated in each iteration, and trains with the goal of maximizing the score value. The scoring function includes a reward term and a penalty term. The reward term is used to reward when the initial directed causal graph of the iteration is an acyclic graph, and the penalty term is used to penalize when the sparsity of the initial directed causal graph of the iteration is greater than a first preset threshold.
5. The risk identification method for delivery outlets according to claim 4, characterized in that, The loss function used during training of the causal discovery model is constructed based on the difference between the reward value predicted by the causal discovery model and the reward value calculated based on the reward formula, as well as the difference between the causal relationship distribution predicted by the causal discovery model and the causal relationship distribution with a confidence level greater than a second preset threshold extracted from historical causal chains or counterfactual reasoning.
6. The risk identification method for delivery outlets according to claim 1, characterized in that, The step of obtaining the inverse information entropy of the causal strength of each causal relationship to quantify the causal strength includes: The inverse information entropy of the causal strength of each causal relationship is calculated using the following formula: ; In the formula, and These represent risk factors respectively. and risk factors Information entropy; The calculated inverse information entropy is logarithmically transformed to obtain the quantified value of causal strength.
7. The risk identification method for delivery outlets according to claim 1, characterized in that, The acquisition of the risk factor dataset for delivery outlets includes: Obtain the initial risk factor dataset for delivery and courier outlets; Multiple risk factors are randomly sampled from the initial risk factor dataset, and the AUC values of multiple risk factors are obtained; A Gaussian process surrogate model is obtained by training multiple risk factors and their corresponding AUC values. Based on the Gaussian process surrogate model, the expected improvement criterion is used to optimize all risk factors in the initial risk factor dataset to obtain the target risk factor dataset, so that the AUC values of all risk factors in the target risk factor dataset meet the preset conditions.
8. A risk identification system for postal and express delivery outlets, characterized in that, The system includes: The data acquisition module is used to acquire a dataset of risk factors from delivery outlets. The causal modeling module is used to extract features from each risk factor in the risk factor dataset and model the causal relationships between the risk factors based on the extracted features; each causal relationship has a corresponding causal strength and causal direction. The causal graph generation module is used to generate an initial directed causal graph by establishing weighted directed edges between nodes in the graph structure, with risk factors as nodes in the graph structure, based on the causal relationships between various risk factors and the causal strength and direction of each causal relationship. The causal graph adjustment module is used to obtain the inverse information entropy of the causal strength of each causal relationship in order to quantify the causal strength, and adjust the weight of each directed edge in the initial directed causal graph based on the quantified causal strength to generate the target directed causal graph. The risk identification module is used to identify risks at delivery outlets based on the target directed cause-effect graph.
9. A computer device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the risk identification method for delivery outlets as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the risk identification method for delivery outlets as described in any one of claims 1 to 7.