A spatiotemporal risk modeling method

By constructing a spatiotemporal delivery risk modeling method based on a ternary spatial knowledge graph and a dynamic encoder, the problems of time drift and cold start in modern delivery networks are solved, enabling accurate and dynamic prediction and assessment of delivery risks.

CN121599493BActive Publication Date: 2026-04-24NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHWESTERN POLYTECHNICAL UNIV
Filing Date
2026-01-28
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies are ill-equipped to handle the complexities of modern delivery networks, particularly in the face of time drift and cold start issues, and are unable to accurately and in real-time identify and predict emerging risks.

Method used

A spatiotemporal delivery risk modeling method based on a ternary spatial knowledge graph is constructed. The delivery data is deeply fused through the ternary spatial knowledge graph, and risk prediction is performed using a dynamic encoder and a multilayer perceptron to capture the spatiotemporal dynamics and cross-dimensional correlations of entities.

Benefits of technology

It enables accurate, dynamic, and comprehensive prediction and assessment of risks in the delivery network, improving the breadth and depth of risk identification and overcoming the challenges of time drift and cold start.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599493B_ABST
    Figure CN121599493B_ABST
Patent Text Reader

Abstract

The application particularly relates to a spatiotemporal delivery risk modeling method, which can deeply fuse information of original delivery data in three dimensions of physics, network and social-semantics by constructing a unique ternary space knowledge graph, compared with prior art, forms a more comprehensive and profound risk correlation network, thereby being beneficial to discovering hidden risk paths across dimensions. On the basis of the ternary space knowledge graph, by configuring a core entity set corresponding to a new delivery event and the ternary space knowledge graph as inputs of a dynamic encoder, evolution of a graph topology structure and time dependence of node attributes can be captured in real time, and the entity can be encoded with the aid of rich global correlation information of the knowledge graph, thereby greatly improving the breadth and depth of risk identification and improving the precision performance of a risk prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a spatiotemporal delivery risk modeling method. Background Technology

[0002] In related technologies, with the explosive growth of global e-commerce, modern delivery networks have evolved into a massive, highly dynamic, and complex system supporting the operation of society. Hundreds of millions of parcels flow daily among massive physical outlets, virtual orders, and diverse participating entities, an unprecedented scale and complexity. While this has greatly promoted economic and social development, it has also provided fertile ground for various risks. From traditional security issues such as the transport of contraband and lost parcels, to new types of online fraud and information leaks using delivery channels, these risks not only directly threaten the assets and reputation of logistics companies but also pose serious challenges to public safety and social stability. Therefore, how to accurately and in real-time identify potential risks from massive, heterogeneous delivery data, and achieve a shift from passive response to proactive prediction, has become a core issue of common concern for both academia and industry.

[0003] Traditional risk modeling methods, such as those relying on expert rules or machine learning models based on static features, are struggling to cope with the complexity of modern delivery networks. Expert rules are updated slowly and cannot cover the ever-emerging new risks; while traditional machine learning relies heavily on manual feature engineering, making it difficult to capture deep, cross-dimensional, and complex relationships between entities.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] This invention provides a spatiotemporal delivery risk modeling method, a computer program product, and a storage medium, which can overcome the defects existing in the prior art to a certain extent.

[0006] Other features and advantages of the invention will become apparent from the following detailed description, or may be learned in part by practice of the invention.

[0007] According to a first aspect of the present invention, a spatiotemporal delivery risk modeling method is provided, the method comprising:

[0008] A ternary space knowledge graph is constructed based on the original postal data. The ternary space knowledge graph is used to describe the heterogeneous multi-relationship of the temporal fact flow. The ternary space includes: a physical space constructed based on the physical entity type set and the physical relation type set; a network space constructed based on the network entity type set and the network relation type set; and a social-semantic space constructed based on the social-semantic entity type set and the social-semantic relation type set.

[0009] Retrieve currently pending new delivery events and create corresponding spatiotemporal delivery risk prediction tasks;

[0010] Based on the timestamp of the new delivery event The system queries the ternary space knowledge graph to obtain contextual facts associated with the new delivery event; it also performs entity recognition on the new delivery event to determine the core entity corresponding to the new delivery event; and constructs a core entity set based on the core entity and contextual facts.

[0011] Configure the core entity set and the ternary space knowledge graph as inputs to the dynamic encoder to obtain the dynamic embedding vectors of each entity output by the dynamic encoder based on the ternary space knowledge graph.

[0012] Each dynamic embedding vector is concatenated to obtain a high-dimensional aggregated vector; the high-dimensional aggregated vector is then configured as a risk prediction head based on a multilayer perceptron to obtain the risk assessment results corresponding to new delivery events.

[0013] In some exemplary embodiments, a ternary space knowledge graph based on ternary space is constructed according to the original delivery data, including:

[0014] The system is configured with a three-dimensional space: physical space, which represents the objective physical environment upon which delivery activities depend; cyberspace, which represents the digital information and virtual identity information that support the operation of delivery services; and socio-semantic space, which represents the abstract classification and conceptual definition of things, behaviors, and social attributes.

[0015] The original delivery data is obtained, and standardized using a ternary space to obtain time-series fact data in quadruplicate form; wherein, the quadruplicate form includes: ; , These represent the head entity and the tail entity, respectively. Indicates the type of relationship between entities. Represents a timestamp;

[0016] Relational data is extracted from the original delivery history data to construct a set of cross-spatial relationship types;

[0017] A set of relationship types is constructed based on the entity relationship types and cross-space relationship types in the time-series fact data; among them, the entity relationship types in the time-series fact data include: the set of physical relationship types corresponding to physical space, the set of network relationship types corresponding to cyberspace, and the set of social-semantic relationship types corresponding to social-semantic space.

[0018] Based on the entity types in the time-series fact data, an entity type set is constructed; the entity type set includes: the physical entity type set corresponding to the physical space, the network entity type set corresponding to the cyberspace, and the social-semantic entity type set corresponding to the social-semantic space.

[0019] Based on the set of relation types and the set of entity types, a ternary spatial knowledge graph is constructed from the time-series fact data up to the time T corresponding to the original delivery data.

[0020] In some exemplary embodiments,

[0021] The original delivery data includes: delivery information, user information, equipment information, and risk information.

[0022] In some exemplary embodiments,

[0023] The core entity set and the ternary space knowledge graph are configured as inputs to the dynamic encoder to obtain the dynamic embedding vectors of each entity output by the dynamic encoder based on the ternary space knowledge graph, including:

[0024] Obtain the context facts corresponding to each entity in the core entity set, and configure the current time-series facts corresponding to each entity based on the context facts. ;in, , These represent the head entity and the tail entity, respectively. Indicates the type of relationship between entities. Represents a timestamp;

[0025] Determine the current entity The entity currently interacting The latest memory state prior to the current temporal facts. ;

[0026] Obtain the current time-series facts and the current entities The time interval between the last update And configure the corresponding timing coding;

[0027] For the current entity The corresponding entity relationship type is encoded to obtain the relationship type embedding vector;

[0028] The latest memory state, temporal encoding, and relation type embedding vector are concatenated to obtain the first concatenated vector; and a message generator based on a multilayer perceptron is used. Perform information fusion processing on the first concatenated vector to obtain the first fused message;

[0029] Based on the first fusion message, the gating loop unit is used to process the current entity. Perform memory state update processing to obtain the current entity. Updated memory state;

[0030] Get the current entity The corresponding set of neighboring entities is used to focus on the current entity using a heterogeneous graph attention network. The updated memory state and the memory states of each neighboring entity are aggregated to obtain the current entity. The corresponding dynamic embedding vector.

[0031] In some exemplary implementations, heterogeneous graph attention networks are used to focus on the current entity. The updated memory state and the memory states of each neighboring entity are aggregated to obtain the current entity. The corresponding dynamic embedding vectors include:

[0032] Get the current entity The corresponding set of neighboring entities, based on the current entity The updated memory state and the memory states of each associated neighboring entity are configured with attention weights.

[0033] Based on the memory state of each neighboring entity, combined with the corresponding attention weight and the current entity... Relationship type transformation matrix corresponding to the relationship type, to obtain the current entity. The corresponding dynamic embedding vector.

[0034] In some exemplary implementations, based on the current entity The updated memory state and the memory states of each associated neighboring entity are configured with attention weights, including:

[0035] According to the current entity Updated memory state, memory state of neighboring entities, current entity The entity relationships with neighboring entities are used to determine the attention score based on the corresponding neighboring entity, including:

[0036]

[0037] in, Indicates attention score; This represents the function used to calculate the attention score; Represents the current entity Updated memory state; Represents the memory state of neighboring entities; Represents the current entity The relationship type embedding vector with the neighboring entity;

[0038] The attention score is normalized to obtain the attention weight based on the neighboring entity.

[0039] In some exemplary implementations, based on the memory state of each neighboring entity, combined with the corresponding attention weight and the current entity... Relationship type transformation matrix corresponding to the relationship type, to obtain the current entity. The corresponding dynamic embedding vectors include:

[0040]

[0041] in, This represents the relation type transformation matrix corresponding to the relation type. Represents the memory state of neighboring entities; Indicates attention weight; Represents the current entity In relation The set of neighboring entities.

[0042] In some exemplary embodiments, the method further includes:

[0043] When there are multiple currently interacting entities, obtain the first fusion message corresponding to each interacting entity;

[0044] The first fusion messages are aggregated to obtain an aggregated message, and the current entity's memory state is updated based on the aggregated message.

[0045] In some exemplary embodiments, the method further includes:

[0046] When the current entity is a new entity, the entity type corresponding to the new entity is encoded to obtain the type embedding vector. ;

[0047] The initial neighbor nodes corresponding to the new entity are obtained based on the ternary spatial knowledge graph. The memory states of each initial neighbor node are aggregated to obtain the initial neighborhood context representation information. ;

[0048] Obtain the related entities of the new entity in the socio-semantic space, and encode the related entities to obtain the embedding codes of the related entities. ;

[0049] The type embedding vector, the initial neighborhood context representation information, and the embedding encoding of the associated entities are concatenated to obtain the second concatenated vector;

[0050] The second concatenated vector is processed by information fusion using a multilayer perceptron-based generator to obtain the initial memory state corresponding to the new entity.

[0051] According to a second aspect of the present invention, a computer program product is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-described spatiotemporal delivery risk modeling method is implemented.

[0052] According to a third aspect of the present invention, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described spatiotemporal delivery risk modeling method.

[0053] According to a fourth aspect of the present invention, an electronic device is provided, comprising:

[0054] Processor, memory;

[0055] The memory is used to store the executable instructions of the processor; the processor is configured to implement the above-described spatiotemporal delivery risk modeling method when executing instructions by executing the executable instructions.

[0056] The spatiotemporal delivery risk modeling method provided in the embodiments of this invention, by constructing a unique ternary spatial knowledge graph, can deeply integrate information from the original delivery data in the physical, network, and socio-semantic dimensions. Compared with existing technologies, it forms a more comprehensive and profound risk association network, thereby facilitating the discovery of hidden risk paths across dimensions. Based on the ternary spatial knowledge graph, by configuring the core entity set corresponding to a new delivery event and the ternary spatial knowledge graph as input to a dynamic encoder, it can capture the evolution of the graph topology and the temporal dependence of node attributes in real time. Furthermore, it can encode entities using the rich global association information of the knowledge graph, thereby greatly improving the breadth and depth of risk identification and enhancing the accuracy of risk prediction results.

[0057] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0058] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0059] Figure 1 The diagram illustrates an exemplary embodiment of the present invention: a spatiotemporal delivery risk modeling method.

[0060] Figure 2 The diagram illustrates an exemplary embodiment of the present invention, showing a ternary space and a set of types.

[0061] Figure 3 The diagram illustrates a TSKG-RiskNet model architecture according to an exemplary embodiment of the present invention.

[0062] Figure 4 The illustration shows a schematic diagram of an event-driven memory update process according to an exemplary embodiment of the present invention;

[0063] Figure 5 The diagram illustrates an inductive initialization method according to an exemplary embodiment of the present invention.

[0064] Figure 6 The diagram illustrates an exemplary embodiment of the present invention: a temporal neighborhood aggregation method.

[0065] Figure 7 The schematic diagram illustrates an electronic device according to an exemplary embodiment of the present invention. Detailed Implementation

[0066] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the invention will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0067] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0068] In related technologies, graph neural networks (GNNs) and similar techniques have made significant progress in risk modeling. However, in complex spatiotemporal delivery scenarios, existing methods still face two major bottleneck challenges: Challenge 1: Temporal Drift. Delivery risk patterns are not static but exhibit significant temporal dynamics. For example, the emergence of new contraband, the periodic changes in fraud gangs' methods, and abnormal user delivery behavior caused by holidays or sudden social events (such as pandemics) all lead to changes in the distribution of risk data over time, i.e., "temporal drift" or "conceptual drift." Currently, most graph-based models have fixed parameters after training, capturing static correlation patterns within a specific time window. When risk patterns drift, the performance of these models drops sharply, making true dynamic adaptive learning impossible. Challenge 2: Cold Start. The delivery network is an open ecosystem with a large influx of new users, addresses, and outlets every day. These new entities lack sufficient historical interaction data, resulting in a typical data sparsity or "cold start" problem. For these cold-start entities, modeling methods that rely on historical behavior are almost entirely ineffective, failing to adequately assess their initial risk. Generating high-quality risk representations for new entities in situations of extremely sparse data is a common challenge faced by existing models.

[0069] To address the shortcomings and deficiencies of existing technologies, this example implementation provides a spatiotemporal delivery risk modeling method that can simultaneously overcome the aforementioned problems of "time drift" and "cold start," thereby achieving accurate, dynamic, and comprehensive prediction and assessment of risks for various entities in large-scale delivery networks. (Reference) Figure 1 As shown, the method may include the following steps:

[0070] Step S11: Construct a ternary space knowledge graph based on the original delivery data; wherein, the ternary space knowledge graph is used to describe the heterogeneous multiple relations of the time-series fact flow; the ternary space includes: a physical space constructed based on the physical entity type set and the physical relation type set, a network space constructed based on the network entity type set and the network relation type set, and a social-semantic space constructed based on the social-semantic entity type set and the social-semantic relation type set;

[0071] Step S12: Obtain the new delivery events to be processed and create the corresponding spatiotemporal delivery risk prediction task;

[0072] Step S13, based on the timestamp of the new delivery event The system queries the ternary space knowledge graph to obtain contextual facts associated with the new delivery event; it also performs entity recognition on the new delivery event to determine the core entity corresponding to the new delivery event; and constructs a core entity set based on the core entity and contextual facts.

[0073] Step S14: Configure the core entity set and the ternary space knowledge graph as inputs to the dynamic encoder to obtain the dynamic embedding vectors of each entity output by the dynamic encoder based on the ternary space knowledge graph.

[0074] Step S15: Concatenate the dynamic embedding vectors to obtain a high-dimensional aggregated vector; and configure the high-dimensional aggregated vector as a risk prediction head based on a multilayer perceptron to obtain the risk assessment result corresponding to the new delivery event.

[0075] The method provided by this invention constructs and utilizes a three-dimensional spatial knowledge graph that deeply integrates physical space (outlets and packages), cyberspace (virtual identities and orders), and socio-semantic space (items and risk concepts) to achieve a comprehensive and structured representation of risk elements. Based on this, dynamic and inductive risk prediction is performed. This model transcends traditional data source divisions, unifying the modeling of delivery risk elements across physical, cyber, and socio-semantic dimensions, providing a novel perspective for comprehensively understanding and characterizing complex risk scenarios.

[0076] The following will describe in more detail each step of the spatiotemporal delivery risk modeling method in this example embodiment, with reference to the accompanying drawings and embodiments.

[0077] For example, for a new delivery event, the corresponding spatiotemporal delivery risk prediction problem can be defined as an inductive node classification task on a dynamic, heterogeneous graph.

[0078] Correspondingly, a new delivery event could be a future moment. New delivery incidents At the heart of this incident is a new, previously unseen waybill entity. The event can consist of a set of instantaneous facts describing its initial context.

[0079] The task of predicting the risk of spatiotemporal delivery aims to learn a mapping function f, which can take a knowledge graph based on historical data and new delivery events as input and output a risk probability value between [0,1].

[0080] Specifically, for a new delivery event, the corresponding spatiotemporal delivery risk prediction task has the following two key characteristics, making it highly challenging:

[0081] 1) Due to the waybill entity corresponding to the new delivery event This is unprecedented; this task is a rigorous inductive learning problem. The risk prediction model must have generalization ability, capable of generating meaningful representations and risk assessments for cold-start entities, rather than simply relying on the memory of known entities.

[0082] 2) Prediction function It should be able to effectively learn complex spatiotemporal patterns from historical data. This includes capturing spatial relationships between heterogeneous entities from the structure of knowledge graphs, and capturing the temporal evolution dynamics of risky behaviors from the timestamp sequences of events.

[0083] In step S11, a ternary space knowledge graph based on the original delivery data is constructed. The ternary space knowledge graph is used to describe the heterogeneous multiple relations of the time-series fact flow. The ternary space includes: a physical space constructed based on the physical entity type set and the physical relation type set; a network space constructed based on the network entity type set and the network relation type set; and a social-semantic space constructed based on the social-semantic entity type set and the social-semantic relation type set.

[0084] For example, step S11 may include:

[0085] Step S21: Configure the three-dimensional space; wherein, the physical space is used to represent the objective physical environment on which the delivery activities depend; the cyberspace is used to represent the digital information and virtual identity information that support the operation of the delivery business; and the socio-semantic space is used to represent the abstract classification and conceptual definition of things, behaviors and social attributes.

[0086] Step S22: Obtain the original delivery data, and standardize the original delivery data using a ternary space to obtain time-series fact data based on a quadruple format; wherein, the quadruple format includes: ; , These represent the head entity and the tail entity, respectively. Indicates the type of relationship between entities. Represents a timestamp;

[0087] Step S23: Extract relational data from the original delivery history data and construct a set of cross-spatial relational types;

[0088] Step S24: Construct a set of relationship types based on the entity relationship types and cross-space relationship types in the time-series fact data; wherein, the entity relationship types in the time-series fact data include: the set of physical relationship types corresponding to physical space, the set of network relationship types corresponding to cyberspace, and the set of social-semantic relationship types corresponding to social-semantic space.

[0089] Step S25: Construct an entity type set based on the entity types in the time-series fact data; wherein, the entity type set includes: the physical entity type set corresponding to the physical space, the network entity type set corresponding to the cyberspace, and the social-semantic entity type set corresponding to the social-semantic space.

[0090] Step S26: Based on the set of relation types and the set of entity types, construct a ternary spatial knowledge graph of the time-series fact data up to the time T corresponding to the original delivery data.

[0091] For example, the original delivery data includes: delivery information, user information, device information, and risk information.

[0092] Specifically, in order to comprehensively model the heterogeneous entities and their complex spatiotemporal relationships in the delivery network, a definition of a ternary space is provided, and it is further formalized into a temporal knowledge graph.

[0093] The complex environment in which the risk factors of postal and delivery services exist is deconstructed into three interconnected basic spaces. Each space consists of its specific set of entity types. and set of relation types Composition. Specifically, it may include:

[0094] 1) Physical space This space represents the objective physical environment upon which delivery activities depend. Among them, This represents a collection of physical entity types, including: {'outlets', 'packages', 'geographical locations'}; It is a collection of physical relationship types, containing: {'located in', 'contains', 'overlays on'}. For example, geographical location can be the address of the recipient and / or sender.

[0095] 2) Cyberspace This space represents the digital information and virtual identities that support the operation of delivery services. It is a collection of network entity types, containing: {'User ID', 'Order Number', 'Device ID'}. It is a collection of network relationship types, including: {'Place an order', 'Associate', 'Use'}. For example, the device ID can be the ID of the user's terminal device, such as a mobile phone number, device identification number, etc.

[0096] 3) Socio-semantic space This space represents the abstract classification and conceptual definition of the attributes of things, behaviors, and society. Among them, It is a collection of social-semantic entity types, including: {'user reputation score', 'item type', 'risk concept'}; It is a set of social-semantic relation types, containing: {'user reputation score', 'is a type of', 'has risk'}.

[0097] Specifically, a Temporal Knowledge Graph (TKG) is defined as a stream of temporal facts. Each fact is represented by a quadruple. It exists in the form of , and its set is represented as . :

[0098]

[0099] in, It is the collection of all entities. It is the set of all relation types. and These are the head entity and the tail entity, respectively. It refers to the relationship between entities; It is a precise timestamp indicating that the relationship occurred or became valid at a specific moment.

[0100] Specifically, a Ternary Space Knowledge Graph (TSKG) can be a specific instantiation configured as the TKG described above. Its core feature is that its entity and relation types span the ternary space we define, thus forming a unified and integrated graph structure.

[0101] make Let be the union of all entity types; let , which is the union of all relation types. This represents the type of cross-space relationship. Based on this, a TSKG Also composed of a series of temporal facts, represented as:

[0102]

[0103] Each entity At least belong to One of the types.

[0104] For the ternary space knowledge graph (TSKG), its key feature lies in the fact quadruples. It can represent interactions across spaces. For example, a fact can be linked to a waybill of type '∈'. An entity of type 'dot' (∈ An entity whose relation type is 'flow' (∈ Similarly, another fact can connect the 'waybill' entity to an entity of type 'item type' (∈LS) with a relation type of 'contains' (∈LS). ).

[0105] refer to Figure 2 As shown, TSKG constructs a time-series diagram that includes both internal and cross-spatial relationships, thus organically integrating information that was originally scattered across different dimensions (online orders, offline outlets, and product concepts). This integration allows complex, cross-domain relationship patterns to be naturally expressed and discovered.

[0106] Specifically, a ternary spatial knowledge graph can be pre-constructed using historical data. For example, a user can select original delivery data on a terminal device and create a corresponding knowledge graph creation task for that data. This task can be sent to a server, allowing the server to retrieve the original delivery data based on data identifiers or data path information and complete the creation of the ternary spatial knowledge graph. Alternatively, the task can be executed locally on the terminal device, querying and retrieving the original delivery data based on data identifiers or data path information to complete the creation of the ternary spatial knowledge graph. For instance, original delivery data can be obtained from log data. Log data can include physical logs, network logs, and preset semantic targets. Physical logs can include delivery information such as delivery points, packages, and geographical locations; network logs can include information such as users, orders, and devices; users can be user identifiers, such as names or nicknames; orders can be specific order numbers; and devices can be user devices and identification information of express information processing devices, such as mobile phone numbers and device identification codes.

[0107] Specifically, based on the above definition of a ternary spatial knowledge graph, after acquiring the original delivery data, entity data and entity relationship data can be identified and standardized. Standardization can involve extracting the corresponding entity for each delivery data entry, determining the entity type, the entity relationship type between the head and tail entities, and timestamp information. Corresponding time-series fact data is then constructed based on the four-tuples. Finally, the set of relationship types and entity types are obtained, and a ternary spatial knowledge graph corresponding to the original delivery data up to time T is constructed, represented as follows: It contains all timestamps in the complete TSKG collection. The set of facts is represented as:

[0108]

[0109] The ternary spatial knowledge graph corresponding to the original delivery data contains all known entities and their interaction history before time T.

[0110] By constructing a ternary spatial knowledge graph corresponding to the original delivery data, the multi-source heterogeneous raw data stream can be structured into a unified attribute graph containing precise temporal information. TSKG provides the model with an unprecedentedly rich perspective that can simultaneously observe entity interactions under physical, network, and socio-semantic dimensions. This explicit modeling of heterogeneous entities and dynamic relationships is a prerequisite for effectively capturing complex, cross-domain risk patterns.

[0111] For example, based on the constructed ternary spatial knowledge graph (TSKG), the mapping function corresponding to the spatiotemporal delivery risk prediction task. It can take a ternary spatial knowledge graph built based on historical delivery data and new delivery events as input, and output a value between... The probability value of the risk between them is expressed by the formula:

[0112] To address the problem of spatiotemporal delivery risk prediction, this method provides a risk modeling framework based on a ternary spatial knowledge graph (TSKG-RiskNet). This framework is an end-to-end deep learning model designed to effectively address the challenges of time drift and cold start by performing representation learning on dynamic and heterogeneous delivery networks.

[0113] The overall architecture of TSKG-RiskNet consists of three core modules: (1) a ternary spatial knowledge graph construction module; (2) a dynamic graph representation learning module; and (3) a risk prediction output module. Its data flow can be summarized as from raw multi-source data to structured temporal knowledge, then to dynamic entity representation, and finally outputting accurate risk predictions.

[0114] For details, please refer to Figure 3 As shown, the ternary spatial knowledge graph construction module can construct the ternary spatial knowledge graph corresponding to the original delivery data using the methods described above.

[0115] For the dynamic graph representation learning module, a dynamic encoder can be provided, which outputs a time-series fact stream from the TSKG. As input, the goal is to learn a low-dimensional representation vector for each entity i in the graph that captures its spatiotemporal dynamics. The encoder's design closely revolves around the two core challenges this invention aims to address: first, it employs an event-driven memory mechanism to continuously update entity states, thereby capturing long-term behavioral evolution patterns to address the time drift problem; second, it integrates an inductive initialization strategy, leveraging the rich semantic information of TSKG to generate high-quality initial representations for newly emerging (cold-start) entities, thus solving the data sparsity problem. The internal mechanisms of this module will be analyzed in detail later.

[0116] For the risk prediction output module, a risk prediction head can be provided as an output layer for downstream specific tasks. It is responsible for embedding entities generated by the dynamic encoder in a high-dimensional latent space and transforming them into specific risk prediction results. When a new delivery event... When an evaluation is required, the risk prediction head receives the dynamic embeddings of the core entities of the event at the current moment, fuses them into an event-level representation vector through an aggregation layer, and finally maps it to the final risk probability through a classifier (MLP). .

[0117] TSKG-RiskNet achieves a complete information processing chain through the collaborative work of these three parts, from raw data to structured knowledge, then to deep dynamic representation, and finally to specific risk decisions. This design enables it to effectively learn from complex spatiotemporal data and make accurate and robust risk judgments.

[0118] Specifically, after constructing the ternary spatial knowledge graph, a risk modeling framework based on the ternary spatial knowledge graph can be pre-trained. During model training, all learnable parameters of the TSKG-RiskNet framework are optimized end-to-end by minimizing a unified loss function. For the binary classification task of risk prediction, the standard binary cross-entropy (BCE) loss function is adopted. Mini-batch of training samples its losses The calculation is as follows:

[0119]

[0120] in, It is the first The true risk label of each training sample It is the model's predicted risk probability.

[0121] This invention employs gradient-based optimizers such as Adam, and uses the backpropagation algorithm to minimize the loss function, thereby updating the parameters of the entire model.

[0122] In step S12, new delivery events to be processed are obtained, and corresponding spatiotemporal delivery risk prediction tasks are created.

[0123] For example, the aforementioned new delivery event can be a user-defined delivery event selected on the terminal; or it can be a delivery event randomly selected by the system, or a delivery event selected by the system according to preset rules. For instance, it can be a delivery event filtered based on one or more of the following: recipient information, sender information, and item type.

[0124] For new delivery events currently pending processing, a corresponding spatiotemporal delivery risk prediction task can be created. For example, this risk prediction task can be executed locally on the terminal or on the server.

[0125] Specifically, based on the constructed ternary spatial knowledge graph, the task of predicting the spatiotemporal delivery risk corresponding to a new delivery event can be defined as an inductive node classification task on a dynamic, heterogeneous graph.

[0126] Among them, the new delivery event could be a future moment. New delivery incidents The core of this event is a new one, in A waybill entity that has never appeared in China Of course, there can also be at least one entity that has appeared before in this new delivery event, such as the sender, the recipient, the phone number, etc.

[0127] Correspondingly, this new delivery event can be composed of a set of instantaneous facts describing its initial context, specifically represented as follows:

[0128]

[0129] This set of time-series factual data describes the new waybill. Initial association with a set of context entities. These context entities may include known entities from the constructed ternary space knowledge graph (belonging to...). It may also include the same time. The first new entity (not belonging to) ).

[0130] The processing results of the spatiotemporal delivery risk prediction task can be represented using risk probabilities, that is, for new delivery events to be processed. (with its core entity) (For example,) a trained model can be used to predict the probability that it is a risky event, which can be specifically expressed as: .

[0131] In step S13, based on the timestamp of the new delivery event The system queries the ternary space knowledge graph to obtain contextual facts associated with the new delivery event; it also performs entity recognition on the new delivery event to determine the core entity corresponding to the new delivery event; and constructs a core entity set based on the core entity and contextual facts.

[0132] Specifically, refer to Figure 3 As shown, for a new delivery event, the core entities can be identified first. Determine the corresponding entity type; and determine the corresponding entity relationship, timestamp. Additionally, it can be based on the entity and timestamp of the new delivery event. The knowledge graph of the three-dimensional space is queried to obtain the timestamp of the new delivery event. The contextual facts. Construct the core entity set and configure it as input to the dynamic encoder.

[0133] In step S14, the core entity set and the ternary space knowledge graph are configured as inputs to the dynamic encoder to obtain the dynamic embedding vectors of each entity output by the dynamic encoder based on the ternary space knowledge graph.

[0134] For example, step S14 described above may include:

[0135] Step S31: Obtain the context facts corresponding to each entity in the core entity set, and configure the current time-series facts corresponding to each entity based on the context facts. ;in, , These represent the head entity and the tail entity, respectively. Indicates the type of relationship between entities. Represents a timestamp;

[0136] Step S32, determine the current entity The entity currently interacting The latest memory state prior to the current temporal facts. ;

[0137] Step S33: Obtain the current time-series facts and the current entity. The time interval between the last update And configure the corresponding timing coding;

[0138] Step S34, for the current entity The corresponding entity relationship type is encoded to obtain the relationship type embedding vector;

[0139] Step S35: Concatenate the latest memory state, temporal encoding, and relation type embedding vector to obtain the first concatenated vector; and utilize the message generator based on a multilayer perceptron. Perform information fusion processing on the first concatenated vector to obtain the first fused message;

[0140] Step S36: Based on the first fusion message, use the gated loop unit to process the current entity. Perform memory state update processing to obtain the current entity. Updated memory state;

[0141] Step S37, obtain the current entity The corresponding set of neighboring entities is used to focus on the current entity using a heterogeneous graph attention network. The updated memory state and the memory states of each neighboring entity are aggregated to obtain the current entity. The corresponding dynamic embedding vector.

[0142] Specifically, the dynamic encoder is the core of the TSKG-RiskNet framework. It is designed to generate a representation vector for each entity in the TSKG that simultaneously reflects its long-term evolutionary history and the immediate graph topological context. This encoder is event-driven and integrates two key mechanisms to address the challenges of temporal drift and cold start, respectively.

[0143] To address time drift, the dynamic encoder introduces a temporally evolving memory module for each entity, such as... Figure 4 As shown. To capture the dynamic evolution of entity states over time, we perform a process for each entity... Associate a memory state vector that changes with time t. This memory vector does not change continuously, but rather changes with each interaction with the entity. Discrete updates are performed as relevant temporal facts (i.e., interactive events) occur.

[0144] Specifically, for each entity in the set, when a time-series fact When it occurs, it will be for the entity This triggers a memory update process. First, the model updates the entity based on the context of the event. Generate a time-series message. This message aims to encapsulate the new information brought about by this interaction, and its formal definition is as follows:

[0145]

[0146] in, It is an interactive entity. The latest memory state prior to this incident; , is a relation type Learnable embedding vectors; It is a timing encoding function that associates the current event with the entity. The time interval between the last update Mapped to a vector to capture continuous temporal dependencies; This represents a vector concatenation operation. It is a multilayer perceptron (MLP) used for fusing information.

[0147] After generating the timing message, refer to Figure 4 As shown, the message is fed into a gated cyclic unit (GRU) to update the entity. The memory state of each core entity can be obtained through the above method.

[0148] For example, in step S36 above, the method further includes: when there are multiple currently interacting entities, obtaining the first fusion message corresponding to each interacting entity respectively;

[0149] The first fusion messages are aggregated to obtain an aggregated message, and the current entity's memory state is updated based on the aggregated message.

[0150] Specifically, if multiple messages are delivered to entities at the same timestamp The messages will be aggregated first. The memory update process is as follows:

[0151]

[0152] Through this update mechanism based on recurrent neural networks, the memory state of each entity is updated. It can serve as a compressed, continuously evolving summary to effectively record the entire interaction history from its initial state to the present moment. This ability to continuously accumulate and adapt to new information allows the entity representation of the model to naturally follow the evolution of its behavioral patterns, thereby effectively mitigating the performance degradation problem caused by changes in data distribution over time (i.e., time drift).

[0153] For example, in step S37, a heterogeneous graph attention network is used to focus on the current entity. The updated memory state and the memory states of each neighboring entity are aggregated to obtain the current entity. The corresponding dynamic embedding vectors include:

[0154] Step S371, obtain the current entity The corresponding set of neighboring entities, based on the current entity The updated memory state and the memory states of each associated neighboring entity are configured with attention weights.

[0155] Step S372: Based on the memory state of each neighboring entity, combined with the corresponding attention weight and the current entity... Relationship type transformation matrix corresponding to the relationship type, to obtain the current entity. The corresponding dynamic embedding vector.

[0156] For example, in step S371, based on the current entity The updated memory state and the memory states of each associated neighboring entity are configured with attention weights, including:

[0157] According to the current entity Updated memory state, memory state of neighboring entities, current entity The entity relationship with neighboring entities is determined, and the attention score corresponding to the neighboring entity is determined. The attention score is normalized to obtain the attention weight based on the neighboring entity.

[0158] Specifically, the encoder generates the final entity embedding through time-aware neighborhood aggregation. It only remembers the state. Although the long-term history of entities is recorded, it is not yet fully integrated into their instantaneous graph topological context at a specific time t. This requires generating dynamic embeddings for final prediction. The encoder aggregates entities through a Heterogeneous Graph Attention Network (HGAT) layer. Its own latest memory state and the latest memory states of all its neighbors, such as Figure 6 As shown.

[0159] Specifically, for the central entity His neighbors In relation The information being transmitted will be assigned an attention weight based on its importance. This weight is determined by the entity. and At any moment It is determined by the state of memory.

[0160] First, calculate an attention score. The formula includes:

[0161]

[0162] in, It is a function used to calculate attention scores.

[0163] Then, the scores are normalized using the Softmax function to obtain the final attention weights, the formula of which includes:

[0164]

[0165] in, It is a physical entity In relation The set of neighbors below.

[0166] Final dynamic embedding This is the result of attention-weighted summation of all neighbor information, and the formula includes:

[0167]

[0168] in, It is a relation type Dedicated learnable transformation matrix, Is with entity The set of all related relation types, It is a non-linear activation function.

[0169] Through this two-stage process of "memory evolution + neighborhood aggregation", the embedding vector output by the encoder is dynamically represented. It can simultaneously contain the long-term historical evolution patterns of entities and real-time, context-aware graph structure information, providing highly expressive features for downstream risk prediction tasks.

[0170] For example, the method further includes:

[0171] Step S41: When the current entity is a new entity, encode the entity type corresponding to the new entity to obtain the type embedding vector. ;

[0172] Step S42: Based on the ternary spatial knowledge graph, obtain the initial neighbor nodes corresponding to the new entity, aggregate the memory states of each initial neighbor node, and obtain the initial neighborhood context representation information. ;

[0173] Step S43: Obtain the associated entities of the new entity in the socio-semantic space, and encode the associated entities to obtain the embedding encoding of the associated entities. ;

[0174] Step S44: Concatenate the type embedding vector, the initial neighborhood context representation information, and the embedding encoding of the associated entities to obtain the second concatenated vector;

[0175] Step S45: Use a multilayer perceptron-based generator to perform information fusion processing on the second concatenation vector to obtain the initial memory state corresponding to the new entity.

[0176] Specifically, to address the cold start problem, the encoder designed an inductive entity initialization mechanism, such as... Figure 5 As shown. For a time... The first new entity to appear that has not been observed in the ternary space knowledge graph Traditional random or zero-vector initialization methods lose a significant amount of valuable prior information. Our encoder uses an initial representation generator... By leveraging the unique advantages of TSKG, an information-rich initial memory state can be generated for it. .

[0177] This generator aggregates information from the following three dimensions:

[0178] 1) Type Priority: New Entity The entity type itself is a strong prior. This information is conveyed through a learnable type embedding vector. To express.

[0179] 2) Initial Neighborhood Context: A new entity is always accompanied by at least one initial interaction event. Its initial neighbors... At this moment, it already possesses an evolved state of memory. We aggregate the memory states of all initial neighbors to obtain the initial neighborhood context representation. .

[0180] 3) Social-Semantic Concepts: TSKG's advantage lies in its ability to associate new entities with abstract concept nodes in the social-semantic space (such as the concept of 'new user'). The embedding of this concept node... Through global training, it contains common knowledge about all new entities of the same type.

[0181] These three pieces of information are concatenated and then processed by a generator implemented using a multilayer perceptron (MLP). Calculate the initial memory state:

[0182]

[0183] in, This indicates vector concatenation.

[0184] By using the above method, an information-driven, context-aware vector is used instead of an arbitrary initial value, which enables the model to have a powerful inductive learning ability and to naturally generalize to unseen entities.

[0185] In step S15, each dynamic embedding vector is concatenated to obtain a high-dimensional aggregated vector; and the high-dimensional aggregated vector is configured as a risk prediction head based on a multilayer perceptron to obtain the risk assessment result corresponding to the new delivery event.

[0186] For example, after obtaining the dynamic embedding vectors corresponding to each entity, aggregation processing can be performed to obtain the concatenated high-dimensional aggregated vector, which can then be used as the event feature vector. This information can be fed into a downstream predictive classifier. This predictive classifier is a standard multilayer perceptron (MLP), which learns high-order interactions between features through a series of nonlinear transformations and ultimately maps them to a scalar predicted value.

[0187] To obtain a risk score that conforms to the definition of probability, we pass the logit value output by the MLP through a sigmoid activation function. Compressing it to the interval [0,1], the formula is expressed as:

[0188]

[0189] in, This refers to the probability that the delivery event is a risky event as predicted by the model.

[0190] The model and risk prediction method provided by this invention are specifically designed to address the problems in existing technologies that treat the relationships between entities in a network as static snapshots within a specific time window. This leads to the problem that when facing the "time drift" problem where risk patterns evolve over time, the fixed model parameters cannot adapt to changes in data distribution, resulting in a sharp drop in prediction accuracy. Furthermore, the method fails completely when dealing with newly added "cold start" entities that lack historical data because the association cannot be effectively established.

[0191] This invention constructs a unique Three-Dimensional Knowledge Graph (TSKG) that deeply integrates information from three dimensions: physical, network, and socio-semantic, forming a risk association network that is far more comprehensive and profound than existing technologies. This enables the model to discover hidden risk paths across dimensions, such as associating an abnormal IP address (network space) with a group of high-risk categories (socio-semantic space) and a remote delivery point (physical space), thereby identifying complex and novel group fraud risks that traditional models cannot detect, greatly improving the breadth and depth of risk identification.

[0192] Based on this structure, the present invention's time-aware entity state update mechanism, designed to address "time drift," can capture in real time the evolution of the graph topology and the temporal dependence of node attributes. This makes the model's risk assessment capability no longer rigid, but dynamically adaptive and evolving, ensuring long-term stability and high accuracy in environments with constantly changing risk patterns. Addressing the "cold start" problem, the present invention's inductive representation generation mechanism, leveraging the rich global association information of the knowledge graph, can generate high-quality initial risk profiles for new entities without any historical behavior (such as a newly registered user). This expands the coverage of risk monitoring from existing entities to all entities, completely filling the monitoring blind spots of existing technologies.

[0193] The method of this invention can significantly improve the AUC and F1 scores of risk prediction, thereby enabling accurate interception of prohibited goods transportation, lost packages, financial fraud, and other activities; and significantly reducing direct asset losses. By proactively predicting instead of reactively responding, it reduces the significant manpower and resources invested in post-event investigations, customer complaint handling, and manual review, thus improving overall operational efficiency. Furthermore, the dynamic adaptation and cold-start capabilities of this invention enhance the enterprise's risk defense capabilities, enabling rapid response to emerging new risks.

[0194] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0195] It should be noted that although several modules or units of the device for performing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0196] Figure 7 A schematic diagram of an electronic device suitable for implementing embodiments of the present invention is shown. This electronic device is used to perform the methods described in the embodiments above.

[0197] It should be noted that, Figure 7 The electronic device 1000 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0198] like Figure 7As shown, the electronic device 1000 includes a Central Processing Unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1002 or programs loaded from storage section 1008 into Random Access Memory (RAM) 1003. The RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004. Furthermore, the electronic device 1000 also includes an FPGA device and a System-on-a-Chip (SoC) device.

[0199] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. Removable media 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1010 as needed so that computer programs read from them can be installed into storage section 1008 as needed.

[0200] In particular, according to embodiments of the present invention, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit (CPU) 1001, it performs various functions defined in the system of this application.

[0201] Specifically, the aforementioned electronic devices can be airborne intelligent electronic devices, such as airborne video processing equipment.

[0202] It should be noted that the storage medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein computer-readable program code is carried. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0203] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0204] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0205] It should be noted that, as another aspect, this application also provides a storage medium, which may be included in an electronic device or may exist independently without being assembled into the electronic device. The aforementioned storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to perform the methods described in the following embodiments. For example, the electronic device may perform... Figure 1 The steps of the method shown.

[0206] In one embodiment, this application provides a computer program product including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0207] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0208] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.

[0209] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is defined only by the appended claims.

Claims

1. A spatiotemporal delivery risk modeling method, characterized in that, The method includes: A ternary space knowledge graph is constructed based on the original postal data. The ternary space knowledge graph is used to describe the heterogeneous multi-relationship of the temporal fact flow. The ternary space includes: a physical space constructed based on the physical entity type set and the physical relation type set; a network space constructed based on the network entity type set and the network relation type set; and a social-semantic space constructed based on the social-semantic entity type set and the social-semantic relation type set. Retrieve currently pending new delivery events and create corresponding spatiotemporal delivery risk prediction tasks; Based on the timestamp of the new delivery event The system queries the ternary space knowledge graph to obtain contextual facts associated with the new delivery event; it also performs entity recognition on the new delivery event to determine the core entity corresponding to the new delivery event; and constructs a core entity set based on the core entity and contextual facts. Configure the core entity set and the ternary space knowledge graph as inputs to the dynamic encoder to obtain the dynamic embedding vectors of each entity output by the dynamic encoder based on the ternary space knowledge graph. Each dynamic embedding vector is concatenated to obtain a high-dimensional aggregated vector; the high-dimensional aggregated vector is then configured as a risk prediction head based on a multilayer perceptron to obtain the risk assessment results corresponding to new delivery events.

2. The method according to claim 1, characterized in that, A ternary space knowledge graph based on ternary space is constructed based on the original delivery data, including: The system is configured with a three-dimensional space: physical space, which represents the objective physical environment upon which delivery activities depend; cyberspace, which represents the digital information and virtual identity information that support the operation of delivery services; and socio-semantic space, which represents the abstract classification and conceptual definition of things, behaviors, and social attributes. The original delivery data is obtained, and standardized using a ternary space to obtain time-series fact data in quadruplicate form; wherein, the quadruplicate form includes: ; , These represent the head entity and the tail entity, respectively. Indicates the type of relationship between entities. Represents a timestamp; Relational data is extracted from the original delivery history data to construct a set of cross-spatial relationship types; A set of relationship types is constructed based on the entity relationship types and cross-space relationship types in the time-series fact data; among them, the entity relationship types in the time-series fact data include: the set of physical relationship types corresponding to physical space, the set of network relationship types corresponding to cyberspace, and the set of social-semantic relationship types corresponding to social-semantic space. Based on the entity types in the time-series fact data, an entity type set is constructed; the entity type set includes: the physical entity type set corresponding to the physical space, the network entity type set corresponding to the cyberspace, and the social-semantic entity type set corresponding to the social-semantic space. Based on the set of relation types and the set of entity types, a ternary spatial knowledge graph is constructed from the time-series fact data up to the time T corresponding to the original delivery data.

3. The method according to claim 1, characterized in that, The original delivery data includes: delivery information, user information, equipment information, and risk information.

4. The method according to any one of claims 1-3, characterized in that, The core entity set and the ternary space knowledge graph are configured as inputs to the dynamic encoder to obtain the dynamic embedding vectors of each entity output by the dynamic encoder based on the ternary space knowledge graph, including: Obtain the context facts corresponding to each entity in the core entity set, and configure the current time-series facts corresponding to each entity based on the context facts. ;in, , These represent the head entity and the tail entity, respectively. Indicates the type of relationship between entities. Represents a timestamp; Determine the current entity The entity currently interacting The latest memory state prior to the current temporal facts. ; Obtain the current time-series facts and the current entities The time interval between the last update And configure the corresponding timing coding; For the current entity The corresponding entity relationship type is encoded to obtain the relationship type embedding vector; The latest memory state, temporal encoding, and relation type embedding vector are concatenated to obtain the first concatenated vector; and a message generator based on a multilayer perceptron is used. Perform information fusion processing on the first concatenated vector to obtain the first fused message; Based on the first fusion message, the gating loop unit is used to process the current entity. Perform memory state update processing to obtain the current entity. Updated memory state; Get the current entity The corresponding set of neighboring entities is used to focus on the current entity using a heterogeneous graph attention network. The updated memory state and the memory states of each neighboring entity are aggregated to obtain the current entity. The corresponding dynamic embedding vector.

5. The method according to claim 4, characterized in that, Using heterogeneous graph attention networks to focus on current entities The updated memory state and the memory states of each neighboring entity are aggregated to obtain the current entity. The corresponding dynamic embedding vectors include: Get the current entity The corresponding set of neighboring entities, based on the current entity The updated memory state and the memory states of each associated neighboring entity are configured with attention weights. Based on the memory state of each neighboring entity, combined with the corresponding attention weight and the current entity... Relationship type transformation matrix corresponding to the relationship type, to obtain the current entity. The corresponding dynamic embedding vector.

6. The method according to claim 5, characterized in that, According to the current entity The updated memory state and the memory states of each associated neighboring entity are configured with attention weights, including: According to the current entity Updated memory state, memory state of neighboring entities, current entity The entity relationships with neighboring entities are used to determine the attention score based on the corresponding neighboring entity, including: in, Indicates attention score; This represents the function used to calculate the attention score; Represents the current entity Updated memory state; Represents the memory state of neighboring entities; Represents the current entity The relationship type embedding vector with the neighboring entity; The attention score is normalized to obtain the attention weight based on the neighboring entity.

7. The method according to claim 5, characterized in that, Based on the memory state of each neighboring entity, combined with the corresponding attention weight and the current entity... Relationship type transformation matrix corresponding to the relationship type, to obtain the current entity. The corresponding dynamic embedding vectors include: in, This represents the relation type transformation matrix corresponding to the relation type. Represents the memory state of neighboring entities; Indicates attention weight; Represents the current entity In relation The set of neighboring entities.

8. The method according to claim 4, characterized in that, The method further includes: When there are multiple currently interacting entities, obtain the first fusion message corresponding to each interacting entity; The first fusion messages are aggregated to obtain an aggregated message, and the current entity's memory state is updated based on the aggregated message.

9. The method according to claim 4, characterized in that, The method further includes: When the current entity is a new entity, the entity type corresponding to the new entity is encoded to obtain the type embedding vector. ; The initial neighbor nodes corresponding to the new entity are obtained based on the ternary spatial knowledge graph. The memory states of each initial neighbor node are aggregated to obtain the initial neighborhood context representation information. ; Obtain the related entities of the new entity in the socio-semantic space, and encode the related entities to obtain the embedding codes of the related entities. ; The type embedding vector, the initial neighborhood context representation information, and the embedding encoding of the associated entities are concatenated to obtain the second concatenated vector; The second concatenated vector is processed by information fusion using a multilayer perceptron-based generator to obtain the initial memory state corresponding to the new entity.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the spatiotemporal delivery risk modeling method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Risk prediction method, device and equipment based on knowledge graph and storage medium

    CN112365171A

  • Key personnel risk prediction method based on time sequence knowledge graph

    CN118052314A