Track representation enhancement method based on dynamic subgraph

By constructing dynamic subgraphs to model user check-in trajectories with a knowledge graph and attention-based networks, the method addresses the limitations of existing methods in predicting user behavior by enhancing semantic understanding and improving prediction accuracy.

CN120316196APending Publication Date: 2025-07-15SOUTHEAST UNIV
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202510491781.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

When using knowledge graphs to predict semantic trajectory, existing methods fail to effectively model the spatial and temporal context of user trajectory and the dynamic semantic relationship between user behavior and urban environment, resulting in limited prediction accuracy.

Method used

By constructing a city knowledge graph based on spatiotemporal semantic quadruple, semantic subgraph sequences with user sign-in trajectory as the core are extracted, and attention aggregation network learning trajectory representation across subgraphs is used to enhance the spatiotemporal semantic representation of user trajectory.

Benefits of technology

The dynamic spatiotemporal semantics of user trajectories are explicitly portrayed, which improves the accuracy of semantic trajectory prediction, flexibly learns users' personalized preferences in different temporal and spatial scenarios, and enhances the quality of trajectory representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316196A_ABST
    Figure CN120316196A_ABST
Patent Text Reader

Abstract

The invention discloses a track representation enhancement method based on a dynamic subgraph. A historical sign-in track of the user is given, semantic track representation aims at learning low-dimensional vectors capable of revealing user behavior patterns and semantic intentions from user track data, and convenience is provided for subsequent prediction tasks. The method comprises the following steps: firstly, constructing a city knowledge graph based on a space-time semantic tetrad, and explicitly modeling the association between a user track and a space-time scene; secondly, extracting a semantic sub-graph sequence taking a user sign-in track as a core from the user sign-in track by using a relation perception dynamic sub-graph extraction mechanism; and then, learning representation of a sub-graph sequence based on an attention aggregation network of a cross-sub-graph, and further obtaining knowledge-enhanced user track representation. And finally, verifying the characterization quality based on a prediction module, and outputting K sign-in points which the user is most likely to be interested in as results. Through the modeling method of the dynamic subgraph sequence, time-space sensitive trajectory semantics are effectively modeled, and the accuracy of a prediction task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of urban computing and deep learning in computer technology, and particularly relates to a method for enhancing trajectory representation based on dynamic subgraphs. Background Art

[0002] In recent years, with the rapid development of mobile Internet and location-based social platforms, semantic trajectory prediction has become a hot research topic in the academic community. Semantic trajectory prediction refers to modeling and analyzing the travel patterns of users based on their historical movement trajectories and predicting the locations that users may visit next. Existing work often uses deep learning models to learn the sequential dependencies between user trajectories, and the quality of the trajectory representation learned by the model directly affects the accuracy of the prediction results. However, limited by the challenge of data sparsity, trajectory representation methods that only consider spatio-temporal information are difficult to comprehensively capture the diverse behavior patterns of users, which limits the accuracy of the prediction results. To alleviate this problem, researchers have proposed methods of enhancing the trajectory representation ability through external knowledge injection. External knowledge can not only supplement the semantic information of low-frequency points of interest, but also reveal the complex associations between user behavior and the urban environment, thus providing richer context information for semantic trajectory prediction.

[0003] In recent years, due to its advantages in semantic representation and relational reasoning, knowledge graph technology has gradually become an important technology in the field of semantic trajectory prediction. A knowledge graph represents various types of entities and their complex relationships in the form of a graph structure, and can effectively capture the multi-level semantic associations of spatial entities (such as points of interest, regions) in the urban environment. Some existing work enhances trajectory representation learning by introducing urban knowledge graphs, thereby improving prediction performance. However, although the existing methods have made some progress, they still have significant limitations when using knowledge graphs for semantic trajectory prediction and still need further research and improvement. On the one hand, some work directly models spatio-temporal trajectories as knowledge graphs, ignoring the advantages of knowledge graphs in representing multi-granularity semantic relationships and unable to model the spatio-temporal context of user trajectories in the knowledge graph; on the other hand, some work only simply concatenates the vector representations of external knowledge graphs and fails to deeply explore the relative semantic relationships between the urban spatio-temporal environment and user trajectories. These methods cannot effectively model the dynamic trajectories semantics that are user-sensitive and spatio-temporally sensitive, and cannot capture the dynamic preferences of user check-in behaviors in different spatio-temporal scenarios, which to a certain extent limits the prediction ability of subsequent models.

[0004] Therefore, there is an urgent need for a new technical method to solve this problem, deeply explore the semantic relationships between the urban environment and user check-in trajectories, and enhance the generalization ability of user trajectory representation in different spatio-temporal scenarios. Summary of the Invention

[0005] Objective of the Invention: The objective of the present invention is to propose a method for enhancing trajectory representation based on dynamic subgraphs, which focuses on solving the problem in traditional semantic trajectory representation methods that cannot model spatio-temporal sensitive dynamic semantics. By expanding the user check-in trajectory into a sequence of check-in subgraphs with multi-level associations, the spatio-temporal semantic information around the trajectory is enriched, the deep association between user preferences and spatio-temporal scenarios is further depicted, and the accuracy of the prediction results is improved. By constructing a dynamic subgraph structure to achieve spatio-temporal semantic enhancement of trajectory representation, a more accurate spatio-temporal intelligent analysis method is provided for mobile object behavior prediction.

[0006] Technical Solution: To achieve the objective of the present invention, the technical solution adopted by the present invention is: a knowledge-enhanced semantic trajectory prediction method, which includes the following steps:

[0007] Step 1, construct a city knowledge graph based on spatio-temporal semantic quadruples;

[0008] Step 2, extract a sequence of semantic subgraphs with the user check-in trajectory as the core;

[0009] Step 3, learn trajectory representation based on a cross-subgraph attention aggregation network;

[0010] Step 4, through a prediction module, convert the trajectory representation into a probability distribution of the possible locations that the user may visit at the next moment, and output the top K prediction results with the highest probabilities.

[0011] The specific content of the above Step 1 is as follows:

[0012] Step 101, design the relational expression form of the city knowledge graph, and use quadruples to model the association between user check-in behavior and spatio-temporal scenarios, where respectively represent the entity set, relationship set, and time feature set in the city knowledge graph, respectively represent the head entity and the tail entity, represents the relationship between entities, represents the time feature of this relationship;

[0013] Step 102, for the user check-in trajectory and external city data, construct a spatio-temporal relationship set

[0014] respectively according to the relationship predicates at the three levels of user trajectory, spatial location, and time series checkin Step 10201, based on the spatio-temporal check-in trajectory of the user, take the user and the check-in location as separate entities, and construct a user trajectory relationship quadruple (u, r d ), where u is the user, r checkin is the check-in relationship, c represents the check-in point, is a discrete time slice, Δt is the time window length, and t is the timestamp of the user's check-in;

[0015] Step 10202: Based on the longitude and latitude coordinate information of the region, points of interest, and check-in points, judge the relative position relationship and construct three quadruples of spatial position relationships, namely region inclusion (c i ,r locate ,a j ,t0), region adjacency (a i ,r nearby ,a j ,t0), and surrounding environment (p i ,r surround ,p j ,t0), where r locate ,r nearby ,r surround represent the region inclusion relationship, region adjacency relationship, and surrounding environment relationship respectively, and c i ,a j ,p i represent the i-th check-in point, the j-th region, and the i-th point of interest respectively. Since the relative position between the spatial point and the region is objectively invariant, the minimum value t0 in the set is taken as the time mark for all intrinsic relationships;

[0016] Step 10203: For the user trajectory, construct two temporal relationships regarding the check-in point c i , namely the quadruple of the first visit relationship (c i ,r pre ,c j ,Δt ij ) and the quadruple of the subsequent visit relationship (c i ,r next ,c m ,Δt ik ), where Δt ij =t j -t i , Δt im =t m -t i are both time intervals, and they are mapped to continuous vectors using piecewise linear coding. c i and c m represent the i-th and m-th check-in points respectively, and r pre ,r next represent the first visit relationship and the subsequent visit relationship respectively;

[0017] Step 103: Use the semantic-guided feature space alignment method to map the entities in the knowledge graph to a unified semantic embedding space;

[0018] Step 10301: Design a text template according to the entity type, and convert discrete attribute fields (such as ID, geographical coordinates, category labels) into natural language descriptions.

[0019] Step 10302: Invoke a large language model to extract text features and obtain high-dimensional dense vectors.

[0020] Step 10303: Use a fully connected layer to compress the high-dimensional semantic features into a shared low-dimensional semantic embedding space.

[0021] The specific content of Step 2 above is as follows:

[0022] Step 201: Extract a temporal correlation subgraph based on the time masking mechanism. Specifically, for each check-in point c i , only retain the nodes and edges with time stamp τ ≤ t i , construct a temporal context graph, and generate a time masking matrix through discrete time slice division.

[0023] Step 202: Execute a relation-aware neighbor sampling strategy, perform multi-hop neighbor expansion centered on the check-in point, extract user entities, region entities, and neighboring region entities, filter surrounding points of interest based on the Haversine distance threshold, and extract the predecessor and successor check-in points along the user's trajectory.

[0024] Step 203: Perform pruning based on the group importance evaluation strategy. For regional adjacent edges, calculate the importance according to the regional co-occurrence frequency. For surrounding points of interest, fuse the spatial attenuation factor and semantic similarity to dynamically filter low-correlation nodes.

[0025] Step 204: Arrange the subgraph G i = (V i , E i ) corresponding to each check-in point in chronological order, where V i , E i respectively represent the node set and edge set in the i-th check-in subgraph, forming a dynamic subgraph sequence {g1, G2,..., G n}, i ∈ 1, 2,..., n, where a single subgraph contains: user nodes, the current check-in point, region nodes, neighboring regions, surrounding POIs, and predecessor and successor nodes.

[0026] The specific content of Step 3 above is as follows:

[0027] Step 301: On the dynamic subgraph sequence {G1,..., G n}, design a hierarchical aggregator based on the relation type to generate a corresponding subgraph representation for each subgraph G i

[0028] Step 302: Calculate the cross-subgraph attention weights for the subgraph embedding sequence and capture multi-granularity dependencies using the multi-head attention mechanism.

[0029] Step 30201: Calculate the dynamic attention weights of the subgraphs based on spatio-temporal relationships and node types, introducing the time interval Δt ij and the joint decay coefficient of the geographical distance d ij , and then dynamically adjust the attention weights according to the relationship type r ij between subgraphs;

[0030] Step 30202: Use the multi-head attention mechanism to hierarchically aggregate the subgraph representations. First, generate context vectors {H (1) ,..., H (H)} using H independent attention heads, and then aggregate the multi-head outputs through a gating mechanism;

[0031] Step 303: Perform dynamic weight adjustment and residual enhancement on the output subgraph representations;

[0032] Step 30101: Add absolute position encoding to the attention output and superimpose the subgraph sequence representation H traj with the learnable position embedding PE(t);

[0033] Step 30102: Perform a residual connection on the representation after temporal enhancement and the representation after concatenating with the original subgraph, and regularize the feature distribution through layer normalization;

[0034] Step 30303: To avoid invalid or even incorrect connections in the cross-subgraph attention, construct a dynamic mask matrix M mask based on the reachability relationship between subgraphs to constrain the effective connection range of the adjacency matrix A:

[0035] Step 304: After completing the cross-subgraph modeling, further optimize the representation of the trajectory through strategies such as bidirectional context modeling, representation normalization, and interpretability constraints;

[0036] Step 30401: Use the bidirectional context modeling method to calculate the attention outputs of the trajectory in the forward and backward directions respectively. By calculating the forward attention H forward and the backward attention H backward respectively, and using a gating mechanism to fuse the information of the two, obtain the final bidirectional context representation H bi ;

[0037] Step 30402: After obtaining the bidirectional context information, perform representation normalization. Through L2 normalization, map the final trajectory feature H final to a unified scale;

[0038] Step 30403: Introduce an attention sparsity regularization term and add a sparsity constraint to the loss function.

[0039] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:

[0040] (1) Explicitly characterize the dynamic spatio-temporal semantics of user trajectories. Through the explicit modeling of the knowledge graph, the semantic richness of trajectory representations is effectively improved, providing a new paradigm for in-depth understanding of user check-in intentions and behavior patterns.

[0041] (2) Improve the accuracy of semantic trajectory prediction tasks. With the attention aggregation mechanism of dynamic subgraphs, the personalized preferences of users in different spatio-temporal scenarios are flexibly learned, enhancing the quality of trajectory representations and preparing for the prediction model to learn the spatio-temporal dependence laws of user behavior decisions. Description of the Drawings

[0042] Figure 1 Schematic diagram of the urban knowledge graph;

[0043] Figure 2 Flowchart of trajectory representation enhancement based on dynamic subgraphs. Detailed Embodiments

[0044] The present invention will be further illustrated below in conjunction with the drawings and specific embodiments.

[0045] The objective of the present invention is to propose a method for enhancing trajectory representation based on dynamic subgraphs, focusing on solving the problem that traditional semantic trajectory representation methods cannot model spatio-temporally sensitive dynamic semantics. By expanding user check-in trajectories into a sequence of check-in subgraphs with multi-level associations, the spatio-temporal semantic information around the trajectories is enriched, further depicting the deep association between user preferences and spatio-temporal scenarios, and improving the accuracy of prediction results. By constructing a dynamic subgraph structure to achieve spatio-temporal semantic enhancement of trajectory representations, a more accurate spatio-temporal intelligent analysis method for mobile object behavior prediction is provided. To this end, the specific implementation steps of the present invention include:

[0046] Step 1: Construct an urban knowledge graph based on spatio-temporal semantic quadruples;

[0047] The specific content of this step is as follows:

[0048] Step 101: Design the relationship expression form of the urban knowledge graph, using quadruples to explicitly model the correlation between user check-in behaviors and spatio-temporal scenarios, where respectively represent the entity set, relationship set, and time feature set in the urban knowledge graph, respectively represent the head entity and the tail entity, represents the relationship between entities, Represent the temporal characteristics of this relationship;

[0049] Step 102: For the user check-in trajectory and external city data, respectively construct a spatio-temporal relationship set according to the relationship predicates at three levels of the user trajectory spatial position time series

[0050] Step 10201: Based on the spatio-temporal check-in trajectory of the user, take the user and the check-in location as separate entities, and construct a quadruple of user trajectory relationships (u, r checkin , c, τ d ), where u is the user, r checkin is the check-in relationship, c represents the check-in point, is a discrete time slice, Δt is the time window length, and t is the time stamp of the user's check-in;

[0051] Step 10202: Based on the latitude and longitude coordinate information of the region, point of interest, and check-in point, judge the relative position relationship, and construct three quadruples of spatial position relationships, namely region inclusion (c i , r locate , a j , t0), region proximity (a i , r nearby , a j , t0) and surrounding environment (p i , r surround , p j , t0), where r locate , r nearby , r surround are the region inclusion relationship, region proximity relationship, and surrounding environment relationship respectively, c i , a j , p i represent the i-th check-in point, the j-th region, and the i-th point of interest respectively. Since the relative position between the spatial point and the region is objectively unchanged, the minimum value t0 in the T set is taken as the time mark. A similar treatment is also adopted in the following text, and it is agreed that t0 is used as the time mark for all fixed relationships;

[0052] Step 10203: For a user trajectory where the corresponding access time stamps are {t1, t2, t3,...}, two temporal relationships regarding the check-in point c i can be constructed, namely the quadruple of the first access relationship (c i , r pre , c j , Δt ij ) and the quadruple of the later access relationship (c​i , r next , c m , Δt ik ), where Δt ij = t j - t i , Δt im = t m - t i , both are time intervals, and they are mapped to continuous vectors using piecewise linear coding. c i and c m respectively represent the i-th and m-th check-in points, r pre , r next respectively represent the pre-visit relationship and the post-visit relationship;

[0053] Step 103, use the semantic-guided feature space alignment method to map the entities in the knowledge graph to a unified semantic embedding space;

[0054] Step 10301, design a text template according to the entity type, and convert discrete attribute fields (such as ID, geographical coordinates, category labels) into natural language descriptions;

[0055] Step 10302, call the large language model to extract text features and obtain high-dimensional dense vectors;

[0056] Step 10303, use a fully connected layer to compress the high-dimensional semantic features into a shared low-dimensional semantic embedding space.

[0057] Step 2, extract the semantic subgraph sequence with the user check-in trajectory as the core;

[0058] The specific content of this step is as follows:

[0059] Step 201, extract the temporal correlation subgraph based on the time masking mechanism. Specifically, for each check-in point c i , only retain the nodes and edges with time stamp τ ≤ t i , construct a temporal context graph, generate a time masking matrix through discrete time slice division, filter future information, and prevent data leakage;

[0060] Step 202, execute the relationship-aware neighbor sampling strategy, perform multi-hop neighbor expansion centered on the check-in point, extract user entities, regional entities, and neighboring regional entities, filter the surrounding points of interest based on the Haversine distance threshold, and extract the predecessor and successor check-in points along the user trajectory, ensuring the spatial correlation, environmental semantics, and temporal transition semantics within the subgraph.

[0061] Step 203: Pruning is performed based on the grouped importance evaluation strategy. For the adjacent sides of the region, the importance is calculated according to the region co-occurrence frequency. For the surrounding points of interest, the spatial decay factor and semantic similarity are fused to dynamically filter low-correlation nodes.

[0062] Step 204: The subgraph G corresponding to each check-in point i =(V i , E i ) is arranged in chronological order, where V i , E i respectively represent the node set and edge set in the i-th check-in subgraph, forming a dynamic subgraph sequence {G1, G2,..., G n}, i ∈ 1, 2,..., n. Each individual subgraph contains: user nodes, the current check-in point, region nodes, neighboring regions, surrounding POIs, and predecessor and successor nodes.

[0063] Step 3: Learn the trajectory representation based on the cross-subgraph attention aggregation network;

[0064] The specific content of this step is as follows:

[0065] Step 301: On the dynamic subgraph sequence {G1,..., G n}, a hierarchical aggregator based on the relationship type is designed to generate the corresponding subgraph representation for each subgraph G i

[0066]

[0067] where α r is the attention weight of the relationship type r, W r is the type-specific weight matrix, represents the neighbors connected by the relationship r. Then, the subgraph embedding sequence is stacked into a trajectory context matrix S ∈ R n×d , which is used as the input of the attention mechanism.

[0068] Step 302: Calculate the cross-subgraph attention weights for the subgraph embedding sequence and adopt the multi-head attention mechanism to capture multi-granularity dependencies.

[0069] Step 30201: Calculate the dynamic attention weights of the subgraphs based on the spatio-temporal relationship and node type. The joint decay coefficient of the time interval Δt ij and the geographical distance d ij is introduced: γ ij = exp(-λ t Δt ij - λ d d ij ), and then according to the relationship type r between the subgraphs​ij Dynamically adjust the attention weight A ij :

[0070]

[0071] where W R is the relationship type weight matrix, W Q , W K are respectively the trainable projection matrices, d k is the key vector dimension, type_embed(r ij ) is the type embedding vector of the relationship r ij ;

[0072] Step 30202, adopt the multi-head attention mechanism to hierarchically aggregate the sub-graph representations. First, use H independent attention heads to generate context vectors {H (1) ,..., H (H)}, and then aggregate the multi-head outputs through a gating mechanism:

[0073]

[0074] where β h is the adaptive gating weight, calculated by β h =σ(W g ·avg_pool(H (h) ))), W g , W h are the trainable projection matrices.

[0075] Step 303, perform dynamic weight adjustment and residual enhancement on the output sub-graph representations;

[0076] Step 30101, add absolute position encoding to the attention output, and superimpose the sub-graph sequence representation H traj with the learnable position embedding PE(t):

[0077]

[0078] where PE(t) is the absolute position encoding vector corresponding to the time step t, which can explicitly provide time position information to assist the model in better capturing the sequence evolution law.

[0079] Step 30102, perform a residual connection on the representation after temporal enhancement and the representation after splicing with the original sub-graph, and regularize the feature distribution through layer normalization operation:

[0080]

[0081] ​Among them, CONCAT(·) represents the splicing operation of subgraph embeddings, which helps to introduce structural information and original representations, and LayerNorm improves the convergence and stability of the model.

[0082] Step 30303, to avoid invalid or even incorrect connections in cross-subgraph attention, a dynamic mask matrix M is constructed based on the reachability relationship between subgraphs mask , which is used to constrain the effective connection range of the adjacency matrix A:

[0083] A ij = A ij ·M mask (i,j)

[0084] Step 304, after completing cross-subgraph modeling, the representation of the trajectory is further optimized through strategies such as bidirectional context modeling, representation normalization, and interpretability constraints;

[0085] Step 30401, using the bidirectional context modeling method, calculate the attention outputs of the trajectory in the forward and backward directions respectively. By calculating the forward attention H forward and the backward attention H backward , and adopting a gating mechanism to fuse the information of the two to obtain the final bidirectional context representation:

[0086] H bi = σ(W f H forward + W b H backward )

[0087] where W f and W b are the weight matrices for forward and backward fusion respectively, and σ(·) is the activation function.

[0088] Step 30402, after obtaining the bidirectional context information, perform representation normalization processing. Through L2 normalization operation, map the final trajectory feature H final to a unified scale:

[0089] E traj = L2_Norm(W o H final + b o )

[0090] where, W o and b o are the weights and bias terms of the linear mapping, and L2_Norm represents L2 norm normalization.

[0091] Step 30403, introduce an attention sparsity regularization term and add a sparsity constraint to the loss function:

[0092]

[0093] where A ij represents the elements of the attention matrix, and λ is the regularization coefficient.

[0094] Step 4: Use the prediction module to convert the trajectory representation into the probability distribution of the possible locations that the user may visit at the next moment, and output the top K prediction results with the highest probabilities.

Claims

1. A method for enhancing trajectory representation based on dynamic subgraphs; characterized in that, Including the following steps: Step 1, construct an urban knowledge graph based on spatio-temporal semantic quadruples; Step 2, extract a semantic subgraph sequence with the user's check-in trajectory as the core; Step 3, learn the trajectory representation based on a cross-subgraph attention aggregation network; Step 4, use a prediction module to transform the trajectory representation into a probability distribution of the possible locations that the user may visit at the next moment, and output the top K prediction results with the highest probabilities.

2. The method for enhancing trajectory characterization based on a dynamic subgraph according to claim 1, wherein: The said Step 1 includes the following sub-steps: Step 101, design the relational expression form of the urban knowledge graph, using a quadruple to show the correlation between the modeled user check-in behavior and the spatio-temporal scenario, where respectively represent the entity set, the relationship set, and the time feature set in the urban knowledge graph, respectively represent the head entity and the tail entity, represents the relationship between entities, represents the time feature of this relationship; Step 102: For the user check-in trajectory and external city data, construct a spatio-temporal relationship set according to the relational predicates at three levels of user trajectory, spatial location, and time series respectively Step 10201, based on the user's spatio-temporal check-in trajectory, regarding the user and the check-in location as separate entities, construct a quadruple of user trajectory relationships (u, r checkin , c, τ d ), where u is the user, r checkin is the check-in relationship, c represents the check-in point, is a discrete time slice, Δt is the time window length, and t is the timestamp of the user's check-in; Step 10202: Based on the longitude and latitude coordinate information of the area, points of interest, and check-in points, determine the relative position relationship, and construct three quadruples of spatial position relationships, namely area inclusion (c i , r locate , a j , t0), area proximity (a i , r nearby , a j , t0), and surrounding environment (p i , r surround , p j , t0), where r locate , r nearby , r surround represent area inclusion relationship, area proximity relationship, and surrounding environment relationship respectively, c i , a j , p i represent the i-th check-in point, the j-th area, and the i-th point of interest respectively; Since the relative position between the spatial point and the area is objectively unchanged, the minimum value t0 in the set is taken as the time mark for all inherent relationships; Step 10203: construct the user trajectory to obtain the check-in point c i The two temporal relations of are first access relation quadruple (c i ,r pre ,c j ,Δt ij ) and the post-visit relation quadruple (c i ,r next ,c m ,Δt ik ), where Δt ij =t j -t i , Δt im =t m -t i , are all time intervals, and are mapped into continuous vectors using piecewise linear coding, c i and c m Respectively represent the i-th and m-th check-in points, r pre ,r next They represent the first visit relationship and the last visit relationship respectively; Step 103, use a semantic-guided feature space alignment method to map the entities in the knowledge graph to a unified semantic embedding space; Step 10301, design a text template according to the entity type, and transform the discrete attribute fields into natural language descriptions; Step 10302, call a large language model to extract text features and obtain high-dimensional dense vectors; Step 10303, use a fully connected layer to compress the high-dimensional semantic features into a shared low-dimensional semantic embedding space.

3. The method for enhancing trajectory characterization based on a dynamic subgraph according to claim 2, wherein: The said Step 2 includes the following sub-steps: Step 201, extract the temporal correlation subgraph based on the time masking mechanism. Specifically, for each check-in point c i , only retain the nodes and edges with time stamp τ ≤ t i , construct a temporal context graph, and generate a time masking matrix through discrete time slice division; Step 202, execute a relationship-aware neighbor sampling strategy, perform multi-hop neighbor expansion centered on the check-in point, extract user entities, regional entities, and neighboring regional entities, filter the surrounding points of interest based on the Haversine distance threshold, and extract the predecessor and successor check-in points along the user's trajectory; Step 203, perform pruning based on a grouping importance evaluation strategy. For the regional adjacent edges, calculate the importance according to the regional co-occurrence frequency. For the surrounding points of interest, fuse the spatial attenuation factor and semantic similarity to dynamically filter low-correlation nodes; Step 204: Arrange the subgraphs G i =(V i , E i ) in chronological order, where V i , E i represent the node set and edge set in the i-th check-in subgraph respectively, forming a dynamic subgraph sequence {g1, G2,..., G n}, i ∈ 1, 2,..., n, where a single subgraph includes: user nodes, the current check-in point, area nodes, adjacent areas, surrounding POIs, and predecessor and successor nodes.

4. A method for enhancing trajectory representation based on dynamic subgraphs according to claim 3, characterized in that: The said Step 3 includes the following sub-steps: Step 301, on the dynamic subgraph sequence {g1,...,G n}, design a relationship type-based hierarchical aggregator to generate a corresponding subgraph representation for each subgraph G i ​ Step 302, for the subgraph embedding sequence, calculate the cross-subgraph attention weights, and use a multi-head attention mechanism to capture multi-granularity dependencies; Step 30201, calculate the dynamic attention weights of the subgraphs based on spatio-temporal relationships and node types, introduce the time interval Δt ij and the joint attenuation coefficient of the geographical distance d i, , and then dynamically adjust the attention weights according to the relationship type r ij between the subgraphs; Step 30202, hierarchically aggregate sub-chart representations using the multi-head attention mechanism. First, use H independent attention heads to generate context vectors {H (1) ,..., H (H)}, and then aggregate the multi-head outputs through a gating mechanism; Step 303, perform dynamic weight adjustment and residual enhancement on the output subgraph representation; Step 30101, add absolute position encoding to the attention output, and superimpose the sub-graph sequence representation H traj with the learnable position embedding PE(t); Step 30102, perform a residual connection on the representation after temporal enhancement and the representation after splicing with the original sub-graph, and regularize the feature distribution through layer normalization; Step 30303, to avoid invalid or even incorrect connections in cross-subgraph attention, a dynamic mask matrix M is constructed based on the reachability relationship between subgraphs mask , which is used to constrain the effective connection range of the adjacency matrix A: Step 304, after completing the cross-subgraph modeling, further optimize the trajectory representation through bidirectional context modeling, representation normalization, and interpretability constraint strategies; Step 30401, using the bidirectional context modeling method, calculate the attention outputs of the trajectory in the forward and backward directions respectively. By calculating the forward attention H forward and the backward attention H backward , and adopting a gating mechanism to fuse the information of the two to obtain the final bidirectional context representation H bi ; Step 30402, after obtaining the bidirectional context information, perform characterization normalization processing. Through L2 normalization operation, map the final trajectory feature H final to a unified scale; Step 30403, introduce an attention sparsity regularization term and add a sparsity constraint to the loss function.

Citation Information

Cited By

  • Track file construction method and system based on time sequence dependency graph and neural network

    CN120929463A

  • A Method and System for Constructing Trajectory Archives Based on Temporal Dependency Graphs and Neural Networks

    CN120929463B

  • Cross-language content generation method and device based on semantic enhanced knowledge graph

    CN121146099A

  • A cross-language content generation method and device based on a semantic enhanced knowledge graph

    CN121146099B

  • Multi-view interest point complementing method and system based on large language model driving

    CN121278193A