Human Context Trajectory Generation Method Based on Intent-Switching Dual-Clock GRU

CN122673404APending Publication Date: 2026-09-01SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610877616.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

[0004]传统单时钟序列普遍难以刻画“稳定移动—意图切换”的行为切换过程,当未结合上下文节点信息时,切换事件的触发依据更多依赖局部速度变化,容易产生过平滑或突变失真的问题,难以反映真实人类在语义环境驱动下的决策变化过程

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122673404A_ABST
    Figure CN122673404A_ABST
Patent Text Reader

Abstract

This invention provides a method for generating human contextual trajectories based on an intent-switching dual-clock GRU, belonging to the technical field of trajectory generation. The method includes: constructing a semantic anchor point map based on urban road network and functional area data; extracting temporal features to obtain a context vector; and constructing feasible region constraints. An input vector is constructed based on the context vector, and the input vector is updated with dual-clock states to obtain a dual-clock fused state. An unconstrained semantic relevance score is calculated based on the joint semantic state. The unconstrained semantic relevance score is corrected, and the corrected semantic score is constrained and normalized using feasible region constraints to obtain a constrained candidate distribution. A diversity gating coefficient is determined based on the dual-clock fused state and the context vector, and a perturbation is applied to the constrained candidate distribution to obtain the final sampling distribution. This application achieves the technical effect of alleviating the lack of explicit modeling of context nodes when only latitude and longitude sequences are used as the core modeling object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of trajectory generation technology, and in particular to a method for generating human context trajectories based on an intent-switched dual-clock GRU. Background Technology

[0002] Human movement trajectory generation is a fundamental technology in smart city governance, traffic simulation, public safety simulation, and location data sharing. Existing methods can be broadly categorized into statistical and deep generation methods. Statistical methods, represented by Markov chains and their variants, primarily rely on state transition probabilities. Deep generation methods, represented by RNNs, LSTMs, GRUs, VAEs, GANs, and diffusion methods, mainly learn the next location distribution through historical sequences. While these methods have made some progress in trajectory continuity modeling, their core modeling object is usually still a "point-to-point coordinate sequence," focusing primarily on the numerical changes in latitude, longitude, and time, lacking a structured representation of the semantic environment surrounding the trajectory points.

[0003] Existing trajectory generation technologies suffer from a lack of semantic context. Real-world human movement is not solely determined by geometric location but is simultaneously influenced by surrounding point-of-interest (POI) types, regional functions, destination, and time-of-use semantics. Traditional methods represent trajectories as a single coordinate stream, resulting in numerically continuous but semantically incomplete and uninterpretable outputs, hindering their ability to support refined urban scenarios. Furthermore, they typically only append a small number of POI statistical features at the input stage or perform semantic annotation in post-processing, failing to consider contextual information as a core constraint in the trajectory generation process. The lack of a stable context node system and interactive edge weighting mechanism limits the semantic consistency and scenario usability of the generated trajectories. Some methods prioritize road network accessibility but primarily focus on geometric legitimacy; others emphasize sequence fitting accuracy while neglecting accessibility and semantic scenario consistency.

[0004] Traditional single clock sequences are generally difficult to depict the behavioral switching process of "stable movement - intention switching". When the context node information is not combined, the triggering of the switching event depends more on local speed changes, which can easily lead to problems of oversmoothing or abrupt distortion, and it is difficult to reflect the decision-making changes of real humans driven by semantic environment.

[0005] However, the existing technology has the following problems: it only uses latitude and longitude sequences as the core modeling object and lacks explicit modeling of context nodes. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a method for generating human context trajectories based on intention-switched dual-clock GRU, so as to alleviate the technical problem of only using latitude and longitude sequences as the core modeling object and lacking explicit modeling of context nodes.

[0007] In a first aspect, embodiments of this application provide a method for generating human contextual trajectories based on an intent-switching dual-clock GRU, the method comprising: Step S1: Construct a semantic anchor point map based on urban road network and functional area data, extract the temporal features of the semantic anchor point map to obtain the context vector, and construct feasible domain constraints. Step S2: Construct an input vector based on the context vector, and perform dual-clock state update on the input vector to obtain a dual-clock fused state; Step S3: Determine the joint semantic state based on the dual-clock fusion state and the context vector, and calculate the unconstrained semantic relevance score of each candidate anchor point in the semantic anchor graph according to the joint semantic state; Step S4: Correct the unconstrained semantic relevance score to obtain the corrected semantic score. Then, constrain the corrected semantic score using the feasible region constraint and normalize it to obtain the constrained candidate distribution. Step S5: Determine the diversity gating coefficients based on the dual-clock fusion state and the context vector, apply the diversity gating coefficients to the constrained candidate distribution to obtain the final sampling distribution, and generate the next trajectory point based on the final sampling distribution to output the human context trajectory.

[0008] In one implementation of the first aspect, the extraction of temporal features from the semantic anchor graph to obtain a context vector includes: A graph neural network is used to aggregate the local context graph to obtain the aggregated local context graph. , , in, For a moment Next The context node in the first Layer node representation, For context nodes The neighborhood group, The weight of the neighboring nodes, Center trajectory point to context node Influence weight, For a trainable parameter matrix, For activation functions; The aggregated local context graph and the weighted neighborhood context nodes construct a context vector. , , in, For a moment Context semantic vector, For the first The weights of each context node's contribution to the semantics of the current position. For a moment At that time, the total number of context nodes within the retrieval radius.

[0009] In one implementation of the first aspect, the input vector is updated using a dual-clock state to obtain a dual-clock fused state, including: The input vector is used to calculate the intention switching trigger gate. , , in, For a moment The input vector at that time, For trainable weight matrix, For a moment The fast clock state at that time For a moment The slow clock state at that time For bias terms; The fast clock state is updated based on the intent-based switching trigger gate. The update form of the fast clock state is as follows: ; The slow clock state is updated based on the stated intent to switch the trigger gate. The update format for the slow clock state is as follows: , in, Input for semantic context; The update forms of the fast clock state and the slow clock state are fused with the intention switching trigger gate to obtain a dual-clock fused state. , , in, It is a non-linear mapping function.

[0010] In one implementation of the first aspect, the modified semantic score is constrained and normalized using the feasible region constraint to obtain a constrained candidate distribution, including: A time-segmented transition prior correction is added to the unconstrained semantic relevance score to obtain the corrected semantic score. , , in, To start from the current anchor point During the period Transfer to candidate anchor point The prior probability, These are the prior weighting coefficients. It is a numerically stable term; Convert the feasible region constraint into a mask. The candidate distribution after constraint is obtained by normalizing the mask. , , in, Indicates candidate anchor points Accessible under current transportation methods and time windows. It indicates that something is unreachable.

[0011] In one implementation of the first aspect, the step of applying a perturbation to the constrained candidate distribution using the diversity gating coefficient to obtain the final sampled distribution includes: The diversity gating coefficient is determined based on the dual-clock fusion state and the context vector. , , in, In a state of fusion, For context vectors, Encoding for time context, For trainable parameters, For the Sigmoid function; The final sampling distribution is obtained by perturbing the constrained candidate distribution using the diversity gating coefficient. , , in, It is zero-mean random noise.

[0012] In one implementation of the first aspect, step S5 further includes determining a joint loss based on location reconstruction loss, intent switching gate supervision loss, feasible region constraint loss, and context consistency loss, to optimize the training phase of outputting the human context trajectory. Represented as: , in, For position loss, To prevent loss of monitoring by switching doors, For physical accessibility loss, This is the context consistency loss.

[0013] In one implementation of the first aspect, step S5 further includes constructing an event discrimination feature vector based on the kinematic change features and contextual semantic features of the semantic anchor graph, to perform event discrimination on the output human context trajectory, wherein the event discrimination feature vector... Represented as, , in, For the change in velocity, The absolute value of the change in direction. For continuous stay duration, This represents the change in distance from the current point to the center of the historical destination direction. For local trajectory curvature, Aggregate the context vector for the context nodes in the neighborhood of the current location.

[0014] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0015] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the human context trajectory generation method based on intent-switching dual-clock GRU provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Please see Figure 1The diagram shown is a flowchart illustrating the human context trajectory generation method based on intention-switched dual-clock GRU provided in an embodiment of the present invention.

[0020] To facilitate understanding of this embodiment, a method for generating human context trajectories based on an intent-switching dual-clock GRU, as disclosed in this embodiment of the invention, will first be described in detail, including: Step S1: Construct a semantic anchor point map based on urban road network and functional area data, extract the temporal features of the semantic anchor point map to obtain the context vector, and construct feasible domain constraints. Step S2: Construct an input vector based on the context vector, and perform dual-clock state update on the input vector to obtain a dual-clock fused state; Step S3: Determine the joint semantic state based on the dual-clock fusion state and the context vector, and calculate the unconstrained semantic relevance score of each candidate anchor point in the semantic anchor graph according to the joint semantic state; Step S4: Correct the unconstrained semantic relevance score to obtain the corrected semantic score. Then, constrain the corrected semantic score using the feasible region constraint and normalize it to obtain the constrained candidate distribution. Step S5: Determine the diversity gating coefficients based on the dual-clock fusion state and the context vector. The diversity gating coefficient is used to apply a perturbation to the constrained candidate distribution to obtain the final sampling distribution. The next trajectory point is generated based on the final sampling distribution to output the human context trajectory.

[0021] Specifically, this invention constructs a semantic anchor point graph and feasible region constraints, and then separates the modeling of stable movement and behavior switching through an intent switching gate and a dual-clock GRU to obtain a fused state. Subsequently, based on this state, the semantic scores of candidate anchor points are calculated. After feasible region hard mask filtering and diversity gating perturbation, trajectory points that conform to physical and semantic constraints are generated. This decouples and unifies the behavioral mechanism and spatial constraints, improving the interpretability, consistency, and behavioral realism of trajectory evolution. It alleviates the over-smoothing and abrupt distortion of traditional models. The endogenous feasible region mask pre-shields unreachable nodes at the probabilistic level, ensuring the physical rationality of the trajectory. Semantic anchor point guidance makes the path automatically biased towards the functional area matching the time period, enhancing the spatiotemporal semantic consistency. Controllable diversity perturbation can generate multiple reasonable alternative routes under the same origin and destination, which has both data augmentation and scenario inference value. It alleviates the technical problem of only using latitude and longitude sequences as the core modeling object and lacking explicit modeling of context nodes.

[0022] Specifically, in this embodiment of the invention, a semantic anchor graph is constructed based on urban road network and functional area data. The key positions of the semantic anchor graph are defined as anchor nodes, the passable relationships between each anchor node are defined as edges, and attributes are recorded on the edges.

[0023] Understandably, semantic anchor graphs are not used directly for complex reasoning, but rather serve as a spatial semantic foundation in the generation process, ensuring a basic understanding of "where it is reasonable to go".

[0024] Specifically, key locations in embodiments of the present invention include subway entrances, bus stops, residential areas, office areas, and commercial districts.

[0025] Specifically, the attributes of the embodiments of the present invention include distance, average travel time, and accessibility by mode of transportation.

[0026] Specifically, in this embodiment of the invention, historical trajectory sequences are mapped to semantic anchor sequence and temporal features are extracted. An input vector is constructed for each moment, and the input vector includes at least the current position encoding, velocity change, direction change, dwell time, and time context (such as hourly segment, weekday / weekend marker).

[0027] Specifically, in this embodiment of the invention, the change in velocity is expressed as... The change in direction is expressed as The changes in velocity and direction are used to determine whether the trajectory is in a stable movement phase or an intentional switching phase.

[0028] Specifically, this embodiment of the invention introduces "context node" aggregation features based on the temporal features of the semantic anchor sequence, for each time point's current position. Search radius inner context node set And construct a local context graph. Local context graph Represented as: , in, Includes context nodes and center trajectory point nodes. It includes the adjacent edges between context nodes and the associated edges from the context nodes to the central trajectory point.

[0029] Specifically, in this embodiment of the invention, the context node is initially set to... The center trajectory point is The local context graph is aggregated using a graph neural network, and the aggregated local context graph is represented as follows: , in, For a moment Next The context node in the first Layer node representation, For context nodes The neighborhood group, The weight of the neighboring nodes, Center trajectory point to context node Influence weight, For a trainable parameter matrix, This is the activation function.

[0030] Specifically, in this embodiment of the invention, after aggregating the local context graph, the neighboring context nodes are represented and weighted and aggregated into a context vector. Context vector Represented as: , in, For a moment Context semantic vector, For the first The contribution weights of each context node to the semantics of the current position, the contribution weights Represented as: , in, To assign attention scores, a joint representation of "latitude and longitude points + context node context" is obtained, and then... It is incorporated into the input characteristics at that moment and used as one of the inputs of the dual-clock GRU.

[0031] Specifically, in terms of spatial constraints, this embodiment of the invention pre-computes a candidate set of feasible regions for the current anchor point. Transportation and time interval The feasible region is defined as follows: , Understandably, the feasible region is used as a hard constraint mask during subsequent generation to eliminate unreachable candidate points, thereby suppressing predictions that involve "passing through walls," "teleporting," or not meeting the speed limit.

[0032] Specifically, to improve early training stability, this embodiment of the invention also statistically analyzes anchor-level time-segmented priors from historical data, that is, priors transferred from anchor points at different time periods. to anchor point The normalized transition frequency, the prior only serves as a weak guide and does not replace the learning backbone. Its role is to reduce meaningless jumps during cold starts and enhance the semantic continuity of the trajectory.

[0033] Specifically, this invention maps trajectories to a sequence of semantic anchor points and constructs input features for each moment, using changes in velocity and direction to distinguish between stable movement and intent switching phases. Simultaneously, it retrieves context nodes surrounding the current location and constructs a local context graph. Through a graph neural network, it aggregates the features of neighboring context nodes, generates a context semantic vector through attention weighting, and forms a joint representation. This approach can more accurately characterize complex trajectory patterns, improve the accuracy and rationality of trajectory prediction or completion, and alleviate the technical problem of relying solely on latitude and longitude sequences as the core modeling object and lacking explicit modeling of context nodes.

[0034] Specifically, after completing step S1 in this embodiment of the invention, the output semantic anchor graph representation, trajectory behavior feature sequence, feasible region constraint matrix, and time-segmented transition prior are used as inputs for intention switching trigger gate calculation and dual-clock state update in step S2.

[0035] Specifically, step S2 performs intent switching trigger gate calculation and dual-clock state update. The goal of this step is to first determine at each time whether the current behavior has changed from "stable movement to policy switching" activity mode, and then drive the state evolution at different time scales according to the judgment result.

[0036] Specifically, in this embodiment of the invention, the trajectory behavior feature sequence output in step S1 is used to construct an input vector, which is represented as follows: , in, Encode the anchor point at the current location. and These represent the changes in velocity and direction, respectively. As a characteristic of staying, Encoding for time context, This is the context node vector.

[0037] Specifically, embodiments of the present invention utilize the input vector to calculate the intent switching trigger gate. Intended to switch trigger gate Represented as: , in, For trainable weight matrix, For a moment The fast clock state at that time For a moment The slow clock state at that time This is a bias term.

[0038] Understandably, when If the value is less than the threshold, it indicates that the current movement is in a local inertial phase. A value greater than the threshold indicates a possible change in behavior, such as temporary stop, detour, or destination adjustment.

[0039] Specifically, in this embodiment of the invention, at the state update level, the fast clock branch is updated at every moment to model short-term continuous displacement patterns. The update form of the fast clock branch is expressed as follows: .

[0040] Specifically, the slow clock branch is scheduled by a trigger gate and is significantly updated only when the switching signal is enhanced. It is used to model cross-stage decisions and long-term behavioral intentions. The update form of the slow clock branch is represented as follows: , in, The semantic context input consists of the current location semantic anchor, time period transition prior, and historical slow variables.

[0041] Understandably, the intention switching trigger gate calculation and dual-clock state update rely mainly on fast state fine tracking in the "stable segment" and automatically activate slow state for policy re-evaluation in the "switching segment", thereby avoiding the over-smoothing or abrupt distortion problems common in single clocks.

[0042] Specifically, in this embodiment of the invention, to form a unified generation state, the dual-clock state is fused with the trigger gate information to obtain a dual-clock fused state. , in, It is a non-linear mapping function.

[0043] Specifically, this invention constructs an input vector and calculates the intent switching trigger gate by combining the historical states of fast and slow clocks to determine whether the current movement is stable or in a behavior switching phase. The fast clock branch is continuously updated at each moment, focusing on modeling short-term continuous displacement patterns, while the slow clock branch is scheduled by the trigger gate and only updated when the switching signal strengthens. This is used to capture cross-stage decisions and long-term intentions, and incorporates semantic anchors, time-period priors, and historical slow variables. Finally, the dual clock states and gating information are nonlinearly fused to form a unified generation state. Through the coordination of fast and slow clocks and gating scheduling, fine tracking of the trajectory is maintained in the stable phase, and policy re-evaluation is automatically introduced in the switching phase. This avoids over-smoothing or abrupt distortion caused by a single clock, improves the smoothness and accuracy of predictions under complex movement patterns, and alleviates the technical problem of only using latitude and longitude sequences as the core modeling object and lacking explicit modeling of context nodes.

[0044] Specifically, the dual-clock fusion state in this embodiment of the invention retains both short-term continuous motion information and phased intent information, which can be used as input for "semantic anchor guidance and feasible domain constraint generation" in subsequent step S3. The output of step S2 includes the intent switching sequence. Fast clock hidden state sequence Slow clock hidden state sequence and fusion state sequence .

[0045] Specifically, step S3 uses semantic anchor points to guide and feasible domain constraints to generate the next trajectory point. The goal of this step is to first determine the next candidate node that is "semantically more reasonable" based on the fusion state obtained in step two, and then complete the legalization screening through physical reachability constraints, and finally output the executable next position distribution.

[0046] Specifically, in this embodiment of the invention, the context vector obtained in step S1 and the dual-clock fusion state obtained in step S2 are used to determine the joint semantic state at the current time. The joint semantic state is represented as follows: , in, It is in a dual-clock fusion state. For context vectors, For the current anchor point Embedded representation.

[0047] It is understandable that the joint semantic state representation of candidate scores depends simultaneously on motion evolution information, context node semantic context, and current position semantics.

[0048] Specifically, in this embodiment of the invention, given the joint semantic state, the joint semantic state is used as input during the candidate anchor point scoring stage to obtain an unconstrained semantic relevance score, which is expressed as: , in, Indicates time For candidate anchor points semantic matching score Candidate anchor points semantic embedding, These are trainable parameters.

[0049] Understandably, unconstrained semantic relevance scores are obtained through joint semantic states. Explicitly introduce context vectors This allows the semantics of surrounding context nodes to directly participate in the next hop decision.

[0050] Specifically, to maintain consistency in time-period statistics, this embodiment of the invention incorporates time-period transition prior corrections into the semantic scores. , in, To start from the current anchor point During the period Transfer to candidate anchor point The prior probability, These are the prior weighting coefficients. It is a numerically stable term.

[0051] Understandably, prior corrections are used to reduce unnecessary jumps during cold starts and low-frequency periods.

[0052] Specifically, in this embodiment of the invention, the feasible region constraint obtained in step S1 is converted into a mask. The mask is normalized to obtain the constrained candidate distribution, which is expressed as: , in, Indicates candidate anchor points Accessible under current transportation methods and time windows. It indicates that something is unreachable.

[0053] Understandably, the normalized mask ensures that unreachable candidates are directly filtered at the probabilistic level, suppressing unreasonable results such as "wall-penetrating" and "teleporting".

[0054] Specifically, after obtaining the candidate distribution, this embodiment of the invention outputs the anchor point or coordinate prediction for the next time step and performs a lightweight feasible region projection. If the sampling point is located near the boundary or deviates from the road centerline due to local noise, the sampling point is projected to the nearest passable path segment to ensure the trajectory's topological validity and geometric continuity. The output includes the constrained candidate distribution. The next position prediction sequence and the projected trajectory points provide direct input for the diversity control and training optimization in the next step.

[0055] Specifically, this invention integrates dual clock states, context node context vectors, and current anchor point embedding to form a joint semantic state. This integrates motion evolution, surrounding semantics, and current position information. Based on the state, candidate anchor points are semantically scored, and time-segmented transition priors are introduced for correction to enhance stability in low-frequency periods. The feasible region is converted into a mask to filter unreachable candidates. After normalization, a physically valid candidate distribution is obtained. Semantic preferences, time-segmented statistical patterns, and spatial reachability constraints are deeply integrated to suppress unreasonable jumps. At the same time, projection correction ensures the topological validity and geometric continuity of the generated trajectory, alleviating the technical problem of only using latitude and longitude sequences as the core modeling object and lacking explicit modeling of context nodes.

[0056] Specifically, the goal of step S5 is to generate multiple reasonable paths under the same origin and destination conditions while maintaining physical reachability and semantic consistency, and to stably train the entire system through a unified loss function.

[0057] Specifically, in this embodiment of the invention, a gated noise variable is introduced based on the obtained constrained candidate distribution. And through diversity gating coefficients Controlling its intensity of action to form a perturbed sampling distribution, and to reflect the context node constraints, will... Determined by the dual-clock fusion state and the context vector. , in, For a moment The intensity of diversity In a state of fusion, For context vectors, Encoding for time context, For trainable parameters, This is the Sigmoid function.

[0058] Specifically, in this embodiment of the invention, under the condition of obtaining the diversity gating coefficients, the constraint distribution output in step S3 is... By applying a slight perturbation, the final sampling distribution is obtained: , in, Zero-mean random noise, The candidate probability after introducing diversity.

[0059] It is understood that step S5 only introduces randomness at the local path selection level, without violating feasible region constraints and global behavioral semantics.

[0060] Specifically, this invention fuses the state, context vector, and time context encoding using dual clocks. It adaptively calculates diversity gating coefficients using trainable parameters and the Sigmoid function. Then, it uses these coefficients to perform weighted interpolation of the feasible region constraint distribution and zero-mean random noise, forming a final sampling distribution that introduces only local minor perturbations. This generates multiple reasonable and physically valid diverse trajectories for the same starting point and ending point, improving the richness of multimodal outputs, ensuring the stability of the training process, and alleviating the technical problem of only using latitude and longitude sequences as the core modeling object and lacking explicit modeling of context nodes.

[0061] Specifically, to ensure that the generated trajectory still conforms to real-world behavior patterns, this embodiment of the invention employs a joint loss for end-to-end optimization during the training phase. The joint loss consists of location reconstruction loss, intent switching gate supervision loss, feasible region constraint loss, and context consistency loss, and is expressed as follows: , in, The position loss is used to constrain the spatiotemporal deviation between the predicted trajectory and the true trajectory; The intention switching gate supervision loss is used to calibrate the response of the trigger gate at the moment of behavior phase transition; This is the physical reachability loss, used to penalize candidate outputs that violate connectivity or velocity boundaries; This is the context consistency loss.

[0062] Specifically, position loss Represented as: , in, To predict latitude and longitude points, These are the actual latitude and longitude points.

[0063] Specifically, the intention to switch gate supervision loss Represented as: , in, The output switching gate value, The label is for monitoring (1 indicates switching, 0 indicates stable movement).

[0064] Specifically, physical accessibility loss Represented as: , , , , in, The candidate index with the highest sampling probability. This refers to road network distance or geographical distance. The time interval between adjacent moments. For a moment The speed limit corresponding to each mode of transportation.

[0065] Specifically, context consistency loss Represented as: , in, This is the context vector obtained by aggregating the context nodes after looking back at the predicted location. This is the context vector corresponding to the actual trajectory at that moment.

[0066] Understandably, this is used to ensure that the semantics of the context nodes surrounding the generated point are consistent with the actual distribution.

[0067] It is understood that the embodiments of the present invention can achieve a stable balance between "authenticity, interpretability, and accessibility" by using joint loss.

[0068] Specifically, in the inference phase, the present invention first identifies whether the current segment is stable or switching based on the trigger gate sequence, then samples based on constraint distribution and diversity gating, and outputs the final trajectory and corresponding switching event description.

[0069] Specifically, in order to generate an interpretable output, the switching threshold is obtained in this embodiment of the invention. Then, by combining kinematic change features with contextual semantic features, event discrimination is performed, and an event discrimination feature vector is constructed: , in, For the change in velocity, The absolute value of the change in direction. For continuous stay duration, This represents the change in distance from the current point to the center of the historical destination direction. For local trajectory curvature, Aggregate the context vector for the context nodes in the neighborhood of the current location.

[0070] Specifically, in this embodiment of the invention, after obtaining the event discrimination feature vector, an event label is generated using a two-level mechanism of "gating priority + rule discrimination". .

[0071] Level 1 discrimination is the switch-triggered discrimination: , in, To switch thresholds, Indicates stable movement. This indicates that the system has entered a switching state.

[0072] when When this occurs, the process proceeds to the secondary event type determination stage. To enhance interpretability, explicit rules are used for determination. Stay Enhancement Events: , in, Low speed threshold, This is the threshold for dwell time.

[0073] Detour switching event: , in, For the turning threshold, This is the curvature threshold.

[0074] Destination adjustment event: , in, The destination direction offset threshold. This is the threshold for velocity increment.

[0075] If none of the above rules are met, it is recorded as a general switching event: , The final output at each time step: , in,( (This is for predicting latitude and longitude points.) This is the contextual semantic vector of the predicted latitude and longitude point. To switch intensity, To switch the marker, This is an interpretable event label.

[0076] It is understandable that the goal is to achieve a combined output of "trajectory generation result + switching event description".

[0077] Specifically, this invention achieves a stable balance between realism, interpretability, and reachability by constructing a joint loss function during the training phase. During the inference phase, a two-level mechanism is used to generate interpretable event labels, which not only generates accurate trajectories but also simultaneously outputs human-readable behavioral stages and event descriptions, thereby enhancing the interpretability of trajectory prediction and alleviating the technical problem of only using latitude and longitude sequences as the core modeling object and lacking explicit modeling of context nodes.

[0078] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the scope of protection of the present application.

Claims

1. A method for generating human contextual trajectories based on an intent-switching dual-clock GRU, characterized in that, include: Step S1: Construct a semantic anchor point map based on urban road network and functional area data, extract the temporal features of the semantic anchor point map to obtain the context vector, and construct feasible domain constraints. Step S2: Construct an input vector based on the context vector, and perform dual-clock state update on the input vector to obtain a dual-clock fused state; Step S3: Determine the joint semantic state based on the dual-clock fusion state and the context vector, and calculate the unconstrained semantic relevance score of each candidate anchor point in the semantic anchor graph according to the joint semantic state; Step S4: Correct the unconstrained semantic relevance score to obtain the corrected semantic score. Then, constrain the corrected semantic score using the feasible region constraint and normalize it to obtain the constrained candidate distribution. Step S5: Determine the diversity gating coefficients based on the dual-clock fusion state and the context vector. The diversity gating coefficient is used to apply a perturbation to the constrained candidate distribution to obtain the final sampling distribution. The next trajectory point is generated based on the final sampling distribution to output the human context trajectory.

2. The method for generating human contextual trajectories based on intent-switching dual-clock GRU according to claim 1, characterized in that, The step of extracting the temporal features of the semantic anchor graph to obtain the context vector includes: A graph neural network is used to aggregate the local context graph to obtain the aggregated local context graph. , , in, For a moment Next The context node in the first Layer node representation, For context nodes The neighborhood group, The weight of the neighboring nodes, Center trajectory point to context node Influence weight, For a trainable parameter matrix, For activation functions; The aggregated local context graph and the weighted neighborhood context nodes construct a context vector. , , in, For a moment Context semantic vector, For the first The weights of each context node's contribution to the semantics of the current position. For a moment At that time, the total number of context nodes within the retrieval radius.

3. The human context trajectory generation method based on intention-switching dual-clock GRU according to claim 2, characterized in that, The input vector is updated using a dual-clock state to obtain a dual-clock fused state, including: The input vector is used to calculate the intention switching trigger gate. , , in, For a moment The input vector at that time, For trainable weight matrix, For a moment The fast clock state at that time For a moment The slow clock state at that time For bias terms; The fast clock state is updated based on the intent-based switching trigger gate. The update form of the fast clock state is as follows: ; The slow clock state is updated based on the stated intent to switch the trigger gate. The update format for the slow clock state is as follows: , in, Input for semantic context; The update forms of the fast clock state and the slow clock state are fused with the intention switching trigger gate to obtain a dual-clock fused state. , , in, It is a non-linear mapping function.

4. The human context trajectory generation method based on intention-switching dual-clock GRU according to claim 3, characterized in that, After constraining and normalizing the modified semantic scores using the feasible region constraints, a constrained candidate distribution is obtained, including: A time-segmented transition prior correction is added to the unconstrained semantic relevance score to obtain the corrected semantic score. , , in, To start from the current anchor point During the period Transfer to candidate anchor point The prior probability, These are the prior weighting coefficients. It is a numerically stable term; Convert the feasible region constraint into a mask. The candidate distribution after constraint is obtained by normalizing the mask. , , in, Indicates candidate anchor points Accessible under current transportation methods and time windows. It indicates that something is unreachable.

5. The human context trajectory generation method based on intention-switching dual-clock GRU according to claim 4, characterized in that, The step of applying a perturbation to the constrained candidate distribution using the diversity gating coefficient to obtain the final sampling distribution includes: The diversity gating coefficient is determined based on the dual-clock fusion state and the context vector. , , in, In a state of fusion, For context vectors, Encoding for time context, For trainable parameters, For the Sigmoid function; The final sampling distribution is obtained by perturbing the constrained candidate distribution using the diversity gating coefficient. , , in, It is zero-mean random noise.

6. The method for generating human contextual trajectories based on intention-switching dual-clock GRU according to claim 5, characterized in that, Step S5 further includes determining a joint loss based on location reconstruction loss, intent switching gate supervision loss, feasible region constraint loss, and context consistency loss to optimize the training phase output of the human context trajectory. Represented as: , in, For position loss, To prevent loss of monitoring by switching doors, For physical accessibility loss, This is the context consistency loss.

7. The method for generating human contextual trajectories based on intent-switching dual-clock GRU according to claim 6, characterized in that, Step S5 further includes constructing an event discrimination feature vector based on the kinematic change features and contextual semantic features of the semantic anchor graph, in order to perform event discrimination on the output human context trajectory. Represented as, , in, For the change in velocity, The absolute value of the change in direction. For continuous stay duration, This represents the change in distance from the current point to the center of the historical destination direction. For local trajectory curvature, Aggregate the context vector for the context nodes in the neighborhood of the current location.