Time sequence multi-scale abnormal trajectory detection method and system based on POI risk propagation

By using grid-based risk feature analysis based on risk propagation and multi-temporal scale feature fusion, the problems of uncertainty in trajectory-POI association and insufficient temporal feature characterization in existing methods are solved, thereby improving the accuracy and adaptability of abnormal trajectory detection.

CN122020437APending Publication Date: 2026-05-12BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2025-12-03
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing abnormal trajectory detection methods ignore the correlation uncertainty caused by the interleaved distribution of trajectories and POIs and the spatial diffusion effect of POI risks when fusing POIs, and fail to effectively characterize the temporal features of trajectories at different scales, resulting in low detection accuracy.

Method used

By dividing the target area into grids, grid-based risk feature analysis based on risk propagation is performed. Combined with multi-temporal and spatiotemporal scale feature representation of the trajectory, feature fusion is carried out using multilayer perceptron and Transformer coding network to construct a comprehensive spatiotemporal reasoning model for abnormal trajectory detection.

Benefits of technology

It has achieved the correlation between trajectory semantics and regional risks, improved the accuracy of abnormal trajectory detection and the ability to adapt to complex urban scenarios, and can identify short-term sudden and long-term gradual abnormal behaviors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020437A_ABST
    Figure CN122020437A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of abnormal trajectory detection, and provides a time sequence multi-scale abnormal trajectory detection method and system based on POI risk propagation. According to the method, a target area is divided into grids, grid risk feature analysis based on risk propagation is carried out, and grid risk feature representation is determined; and dividing the trajectory into trajectory fragments of multiple spatial and temporal scales, and fusing the features of the trajectory fragments of multiple spatial and temporal scales according to the retention time of the trajectory in each grid and grid risk feature representation to obtain a multi-scale fused trajectory comprehensive anomaly feature. Therefore, the method solves the problem that the association between the trajectory semantics and the risk degree of the region is insufficient, and realizes the association of the trajectory point, the POI and the region risk; the problem of insufficient description of local detail features of the track under different scales is solved, and abnormal track detection considering local and global features is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of anomaly trajectory detection technology, and in particular to a temporal multi-scale anomaly trajectory detection method and system based on POI risk propagation. Background Technology

[0002] Anomaly trajectories typically refer to trajectories that deviate from normal behavioral patterns, such as prolonged periods of stillness, lingering, or detours. Anomaly trajectory detection, as a core task in spatiotemporal data mining, aims to identify trajectories that significantly deviate from normal behavioral patterns from large-scale trajectory data. These anomalies may reflect traffic congestion, urban infrastructure malfunctions, suspicious individual behavior, or even be early warning signs of threats to public safety.

[0003] Traditional methods for detecting anomalous trajectories, such as those based on distance, density, or statistical models, focus on analyzing the spatiotemporal geometric features of the trajectory (e.g., speed, direction, shape) or the statistical significance of data distribution, while giving less consideration to the rich semantic information contained within the trajectory. This limitation makes it difficult for traditional methods to achieve ideal results in identifying anomalies related to specific location functions, individual behavioral intentions, or complex scene contexts. Points of Interest (POIs), as functional nodes in geospatial space carrying specific semantic information (e.g., restaurants, shopping malls, office buildings, subway stations), can inject rich contextual information and semantic connotations into trajectory data. By associating trajectories with POIs, it is helpful to analyze more deeply the activity types, travel purposes, and behavioral patterns reflected by the trajectories, thus making semantic-based definition and detection of trajectory anomalies possible. For example, a trajectory may be spatially continuous and have normal speed, but if the sequence of POIs it visits is logically inconsistent with the normal pattern (e.g., going directly from a train station to a remote park and then entering a military-controlled area), or if there is prolonged lingering behavior at certain types of POIs (e.g., banks) during non-business hours, then the trajectory can be considered an anomalous trajectory based on POI semantics.

[0004] Currently, the key challenges facing anomaly trajectory detection using POI integration are twofold. First, in characterizing regional risk, existing methods represent regional risk through single POI matching. Specifically, this treats POIs as isolated functional nodes and associates them based on the distance between trajectory points and POIs, ignoring the uncertainty of association caused by the interleaved distribution of trajectories and POIs. Furthermore, it fails to consider the spatial diffusion effect of POI risk, resulting in insufficient correlation between trajectory semantics and the degree of regional risk. Second, anomalous behavior typically occurs in one or more parts of the trajectory. Existing methods process time-series data using averaging, which ignores the temporal features of trajectories at different scales, performing only feature mean pooling on each scale segment. This results in insufficient characterization of local details of the trajectory, leading to low accuracy of the anomaly trajectory detection model.

[0005] Therefore, there is an urgent need to provide a technical solution that addresses the shortcomings of existing technologies. In characterizing regional risks, this approach involves multi-POI aggregation to depict regional risks, i.e., introducing a POI risk propagation mechanism and designing a grid-based risk representation method based on risk propagation to establish the relationship between trajectories, POIs, and regional risks. Regarding trajectory feature representation, this approach involves temporal feature representation of trajectory segments, i.e., extracting temporal features of trajectory segments at different scales, taking into account both local and global trajectory features. Summary of the Invention

[0006] The purpose of this application is to provide a temporal multi-scale anomaly trajectory detection method and system based on POI risk propagation, so as to solve or alleviate the problems existing in the above-mentioned prior art.

[0007] To achieve the above objectives, this application provides the following technical solution: This application provides a temporal multi-scale anomaly trajectory detection method based on POI risk propagation. The method divides the target area into grids, performs grid risk feature analysis based on risk propagation, and determines the grid risk feature representation. The trajectory is divided into trajectory segments with multiple spatiotemporal scales, and the residence time of the trajectory in each grid is considered. and grid risk characteristics representation Features of trajectory segments at multiple spatiotemporal scales are fused to obtain multi-scale fused trajectory comprehensive anomaly features. .

[0008] Preferably, the semantic encoding of the raster POI is spatiotemporally periodically fused to obtain a spatiotemporal semantic feature vector of the raster POI with fused spatiotemporal information. Risk aggregation based on grid neighborhoods and risk propagation, according to the spatiotemporal semantic feature vectors of grid POIs. The regional risks of the grid and its neighborhood are aggregated to obtain the grid risk feature vector. Based on the grid risk feature vector Using police incident data, a multi-layer sensor is used to supervise and train the grid risk feature representation. .

[0009] Preferably, the one-hot vector encoded for each POI type is projected into a POI feature vector, and all POI feature vectors in each raster are aggregated to form a raster POI semantic code. Spatiotemporal periodic encoding of the raster is performed, embedding the periodic time of the raster. Spatial embedding and raster POI semantic encoding By fusing multiple layers of perceptrons, a grid POI spatiotemporal semantic feature vector with fused spatiotemporal information is obtained. .

[0010] Preferably, according to the formula: The regional risk of the aggregated grid and its neighborhood; where, The raster risk feature vector represents the risk of the current raster aggregation neighborhood region. Represents a non-linear activation function. Represents the spatiotemporal semantic feature vector of the current raster POI The linear transformation matrix of the grid risk characteristics, This represents the spatiotemporal semantic feature vector of the current raster POI. The linear transformation matrix of the grid risk characteristics of the neighborhood; Indicates the current grid's first... Spatiotemporal semantic feature vectors of POIs in each neighborhood; This indicates the number of neighbors of the current grid cell.

[0011] Preferably, the dwell time of the trajectory in each grid is considered. and grid risk characteristics representation Regional risk exposure detection is performed on the trajectory to obtain the risk exposure fusion features of each grid cell traversed by the trajectory. To determine the sequence of feature vectors of the trajectory The trajectory is divided into trajectory segments with multiple spatiotemporal scales, and the feature vector sequence of the trajectory is used as the basis for the division. The dynamic features of trajectory segments at different spatiotemporal scales are determined; the dynamic features of trajectory segments at multiple spatiotemporal scales are encoded using a cross-scale Transformer encoding network to obtain a multi-scale trajectory feature vector sequence. ; and for multi-scale trajectory feature vector sequences Attention pooling is performed to obtain multi-scale fusion of trajectory anomaly features. ;in, In the formula, For the trajectory at scale The number of non-overlapping trajectory segments in the subdivision, where L is the total number of feature vectors of the trajectory at multiple scales. All are positive integers. These represent the trajectory feature vectors at different scales.

[0012] Preferably, the dwell time of the trajectory in each grid cell is... By forming a vector representation using a multilayer perceptron, the dwell time encoding of the trajectory in the grid is obtained. Encode the dwell time of the trajectory in the raster. Representation of grid risk characteristics By performing fusion, the risk exposure fusion features of the trajectory in the grid are obtained. Risk exposure characteristics of lattices using bidirectional long short-term memory networks. Constructed feature vector sequence The process is performed to obtain the feature vector sequence of the trajectory. ;in, , A positive integer representing the number of grid cells the trajectory passes through. Preferably, the trajectory is divided into Non-overlapping segments, and at scale Below, according to spatiotemporal scale The feature vector sequences of the combined trajectories Each trajectory segment is encoded using a Long Short-Term Memory (LSTM) network to obtain the scale. Feature vector of the lower trajectory segment ;in, In the formula, This represents the number of grid cells the trajectory passes through. It is a positive integer; The Transformer encoder encodes and integrates the initial feature vectors of all trajectory segments according to the spatiotemporal scale to obtain the dynamic features of trajectory segments at different spatiotemporal scales.

[0013] Preferably, according to the formula: Determine the trajectory feature vector Weighted weights In the formula, For learnable parameter vectors, For the trajectory at multiple scales, the first Each trajectory feature vector; , This represents the number of all trajectory feature vectors across multiple scales. It is a positive integer.

[0014] Preferably, a comprehensive spatiotemporal inference model is constructed for time-series multi-scale anomaly trajectory detection based on POI risk propagation; wherein, the loss function of the comprehensive spatiotemporal inference model is: In the formula, To integrate the focus loss of the spatiotemporal reasoning model, To account for the risk entropy loss of the spatiotemporal reasoning model, The overall loss of the spatiotemporal reasoning model; This is a hyperparameter, and its value is... ; A positive integer representing the number of grid cells the trajectory passes through; For the integrated spatiotemporal reasoning model based on grid risk feature vectors Predicted grid risk entropy It is the true risk entropy under corresponding spatiotemporal conditions calculated through historical risk events; Indicates the focus parameter, Indicates the category-balanced weighting factor. To integrate spatiotemporal reasoning models for real categories The estimated probability.

[0015] This embodiment also provides a temporal multi-scale anomaly trajectory detection system based on POI risk propagation, including: The grid risk analysis unit is configured to divide the target area into grids, perform grid risk feature analysis based on risk propagation, and determine the grid risk feature representation. ; The multi-scale anomaly detection unit is configured to divide the trajectory into trajectory segments with multiple spatiotemporal scales and to detect anomalies based on the dwell time of the trajectory in each grid cell. and grid risk characteristics representation Features of trajectory segments at multiple spatiotemporal scales are fused to obtain multi-scale fused trajectory comprehensive anomaly features. .

[0016] Beneficial effects: The temporal multi-scale anomaly trajectory detection method and system based on POI risk propagation provided in this application divides the target area into grids, performs grid risk feature analysis based on risk propagation, and determines the grid risk feature representation. The trajectory is divided into trajectory segments with multiple spatiotemporal scales, and the residence time of the trajectory in each grid is considered. and grid risk characteristics representation Features of trajectory segments at multiple spatiotemporal scales are fused to obtain multi-scale fused trajectory comprehensive anomaly features. Therefore, a grid-based risk representation method based on risk propagation addresses the problem of insufficient correlation between trajectory semantics and regional risk levels, achieving the association between trajectory points, POIs, and regional risks. Anomaly trajectory detection based on temporal multi-scale feature fusion solves the problem of insufficient characterization of local trajectory details at different scales, achieving trajectory detection that takes into account both local and global features.

[0017] This paper constructs a raster representation system for risk propagation based on POI risk by integrating spatiotemporally periodic raster POI semantic encoding, raster domain risk aggregation based on risk propagation, and raster risk feature representation based on police incident data supervision. By mapping discrete POI information to a raster spatial range through raster POI semantic encoding, the matching bias problem caused by uneven POI distribution is solved. Spatiotemporally periodic embedding encoding captures the spatiotemporal dynamic changes of risk, effectively reflecting the risk situation of the region at different times. Simultaneously, raster neighborhood risk aggregation realizes the modeling of the spatial diffusion effect of POI risk, breaking through the traditional isolated POI modeling paradigm. It propagates the static risk of a single POI to surrounding areas based on spatial autocorrelation, forming a continuous risk field. By introducing real-world risk event data as a supervision signal through police incident data, the risk feature representation is closely linked to the actual security situation. This rasterized risk representation method retains the semantic information of POIs while integrating spatial risk propagation and spatiotemporal dynamic changes, providing high-quality regional risk feature input for subsequent trajectory anomaly detection.

[0018] This paper utilizes an anomaly trajectory detection framework based on temporal multi-scale feature fusion. By systematically integrating three key components—regional risk exposure detection, local anomaly capture, and risk perception—an anomaly trajectory detection method capable of simultaneously perceiving microscopic anomaly details and macroscopic behavioral patterns is constructed. Regional risk exposure detection captures the dwell time of trajectories in high-risk areas and the cumulative risk effect, identifying potential anomalies caused by prolonged exposure to high-risk areas. Temporal multi-scale local anomaly capture analyzes trajectory behavior patterns across short-term, medium-term, and long-term spatiotemporal scales, enabling the detection of both sudden anomalies and gradual behavioral deviations. By introducing scale encoding vectors and cross-scale attention mechanisms, trajectory features at different spatiotemporal scales are aligned and fused, allowing the model to consider both local and global trajectory features. This better understands how short-term high-risk or long-term low-risk events evolve into anomalies, thereby enhancing the model's adaptability to anomaly trajectory detection tasks for public security applications. Attached Figure Description

[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. Wherein: Figure 1 This is a flowchart illustrating a temporal multi-scale anomaly trajectory detection method based on POI risk propagation, according to some embodiments of this application. Figure 2 This is a framework diagram of a grid-based risk feature analysis based on risk propagation, provided according to some embodiments of this application; Figure 3This is a framework diagram of anomaly trajectory detection based on temporal multi-scale feature fusion provided according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of a temporal multi-scale anomaly trajectory detection system based on POI risk propagation, according to some embodiments of this application. Detailed Implementation

[0020] The present application will now be described in detail with reference to the accompanying drawings and embodiments. Various examples are provided by way of explanation and not by way of limitation. In fact, those skilled in the art will understand that modifications and variations can be made to the present application without departing from the scope or spirit of the present application. For example, a feature shown or described as part of one embodiment may be used in another embodiment to produce yet another embodiment. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.

[0021] Existing environmental criminology research, by quantifying the spatial superposition effect of environmental factors, posits that risk sources diffuse to surrounding areas through spatial proximity, forming a risk clustering effect in specific regions. Therefore, when a trajectory traverses or frequently enters areas with high-risk semantic combinations over a prolonged period, even if its speed, direction, and other geometric characteristics appear normal, it may still imply a potential security threat or abnormal intent. Based on this, this embodiment deconstructs the anomaly of a trajectory into two dimensions: first, the risk intensity of the area where the trajectory is located; and second, the comprehensive degree of anomaly in the trajectory's behavior at different spatiotemporal scales.

[0022] This embodiment provides a temporal multi-scale anomaly trajectory detection method based on POI risk propagation. It uses a grid as the basic unit, introduces a POI risk propagation mechanism, and models the relationship between the grid and POIs within its neighborhood and regional risks. This effectively characterizes regional risk features and solves the problem of insufficient regional risk correlation caused by isolated POI modeling. Simultaneously, by preserving local temporal features through a multi-scale anomaly perception mechanism, it considers both local and global trajectory features to determine abnormal trajectory behavior at different scales. Through coupled modeling of regional risks and trajectory behavior, it improves the model's adaptability to complex urban scenarios and the accuracy of anomaly detection.

[0023] like Figures 1 to 3 As shown, this temporal multi-scale anomaly trajectory detection method based on POI risk propagation includes: Step S101: Divide the target area into grids, perform grid risk feature analysis based on risk propagation, and determine the grid risk feature representation. .

[0024] Existing methods generally treat Points of Interest (POIs) as independent functional nodes, directly assigning static risk labels to POIs based on their category attributes to determine whether visits to those locations are abnormal. While intuitive and easy to implement, this approach neglects the correlation between POI risk attributes and their surrounding environment, leading to risk assessments that deviate from the true security situation. The safety or risk attributes of a POI are not solely determined by its own label but are influenced by its environment and spatiotemporal context. Although risk terrain modeling methods quantify the correlation between POI density and crime, their spatial analysis units are typically at the community or block scale, making it difficult to capture the local diffusion effect of POI risk. Insufficient correlation between trajectories, POIs, and regional risk easily leads to false positives and false negatives in practical applications.

[0025] The risk characteristics of Points of Interest (POIs) are often influenced by multiple factors: spatially, the distribution of adjacent POIs constitutes the semantic field of regional security posture; temporally, the alternation of day and night and the cyclical changes of holidays alter the baseline of normal behavior in their respective areas. From the perspective of public safety and social governance, abnormal behavior is highly correlated with the risk level of its location, and the lack of regional risk characteristic modeling will lead to the model's over-reliance on the semantic labels of POIs. For example, in isolated POI modeling, visits to banks late at night might be marked as high-risk behavior, but if the bank is near a police station, it might be considered a reasonable situation of using an ATM. This isolated modeling approach not only weakens the model's adaptability to complex urban scenarios but also leads to systematic biases in trajectory anomaly detection results.

[0026] Therefore, in this embodiment, the risk attributes of POIs are considered as a continuous field with spatial diffusion characteristics, rather than discrete points or the regions where POIs are located. Specifically, the impact of each POI on regional risk diffuses to surrounding areas, and the risk effects of different POIs spatially superimpose to form the overall risk situation of a region. Based on this, this embodiment uses a grid as the basic analysis unit, extending the risk characteristics of POIs to their surrounding grid areas through a spatial propagation mechanism. This not only reflects the risk attributes of the POI itself but also captures the continuous spatial distribution characteristics of risk. Due to the spatial smoothing effect of grid processing, this embodiment can effectively alleviate the matching deviation problem caused by the interleaved distribution of trajectory points and POIs, thereby establishing the relationship between trajectory points, POIs, and regional risk.

[0027] In this embodiment, the interaction between trajectory dynamic behavior and POI is analyzed. By coupling the modeling of regional risk and trajectory behavior, the accuracy of anomaly detection is improved from the perspective of the correlation between regional risk and trajectory behavior. This solves the problem of insufficient correlation of regional risk caused by isolated modeling of POI, and improves the model's adaptability to complex urban scenarios and the accuracy of anomaly detection.

[0028] In regional risk modeling, a POI risk propagation mechanism is introduced to extend the risk characteristics of POIs to their surrounding areas. A raster risk feature representation model is constructed using grids and their neighboring POIs, fusing all POI information within the region on a grid-by-grid basis. This is essentially a raster risk feature learning framework based on POI risk propagation, integrating three types of multi-source information: POI type, spatiotemporal factors, and police incident data, to explicitly model regional risks. Specifically, the target area is divided into grids, and raster risk feature analysis based on risk propagation is conducted. POI information is used to characterize the risk features of the grids, while a risk propagation mechanism is introduced to obtain an accurate representation of regional risk features. Thus, the degree of trajectory anomaly is viewed as a comprehensive manifestation of the target's exposure to regional risks and behavior at different scales. More fundamentally, it reflects that the unexpected exposure of abnormal trajectories in high-risk areas is significantly higher than normal behavior patterns, rather than simply relying on static judgments based on POI semantic labels matched from sampling points.

[0029] In a specific example, when fusing spatiotemporally periodic raster POI semantic encoding, spatiotemporally periodic fusion is performed on the raster POI semantic encoding to obtain a raster POI spatiotemporal semantic feature vector that integrates spatiotemporal information. .

[0030] First, raster POI semantic encoding is performed. POI data typically consists of location information and descriptive text information. The location of a POI can be easily mapped to a corresponding raster. However, due to the heterogeneity of POI spatial distribution, the type and number of POIs in each raster will differ.

[0031] The role of the raster POI semantic encoding module is to effectively represent the features of all POIs in the raster. In this process, existing methods typically utilize language models such as Word2Vec and BERT to encode the POI names and descriptive text, integrating external language knowledge to enrich the risk features related to the POIs. However, the textual information used to describe POIs is often simple and lacks sufficient contextual information (e.g., "XX Bank," "YY Bar"), limiting the effectiveness of deep language models. Furthermore, these models increase model complexity and introduce noise interference, resulting in lower discriminative power and interpretability of the POI feature representation. Therefore, this embodiment employs a more efficient and compact semantic representation strategy. Specifically, firstly, each POI type is encoded as a one-hot vector; then, a trainable parameter matrix is ​​used to project these high-dimensional sparse one-hot vectors onto a low-dimensional dense feature vector; finally, for each raster, all POI feature vectors are aggregated to form the base vector for the raster risk feature representation. In this way, not only is the semantic region between POI categories preserved, but the data sparsity problem can also be effectively alleviated, enabling the learned feature representation to adaptively capture the potential risk correlation between POI types during end-to-end training.

[0032] Due to the uneven distribution of POIs, the number of POIs in different grids will vary. To address this, this embodiment employs a "fill-and-mark" strategy. For each grid cell, a special empty mark (represented as 0) is used to fill the POI sequence to a fixed, predetermined length. Correspondingly, a binary mask vector is generated to distinguish between the actual POIs and the filled positions. Thus, through mask-weighted averaging, the empty entries are ignored, and only valid POIs are considered, thereby eliminating potential noise and preserving the integrity of the POI representation in the grid. This effectively ensures that all grid input dimensions are the same, while preventing invalid entries from interfering with model training.

[0033] Specifically, according to the formula: Perform raster POI semantic encoding; where, Represents the semantic encoding of raster POIs. Indicates that the grid contains One-hot vectors of POIs This indicates that the one-hot vector is embedded through the embedding function. The resulting POI semantic encoding; As an indicator function, it represents when hour ,when hour .

[0034] Then, spatiotemporal periodic encoding is performed on the semantic encoding of the raster POIs. Because social production and life have significant dynamics and periodicity, regional risks also exhibit this characteristic, such as increased nighttime crime rates and increased pedestrian traffic in commercial areas on weekends. To effectively capture the dynamics and periodicity of regional risks within different raster areas and time periods, this embodiment combines spatial semantics with temporal context to perform periodic spatiotemporal embedding encoding. By constructing a time-sensitive risk representation, the risk level that changes over time is fitted.

[0035] In this embodiment, a multi-frequency sinusoidal time coding method is employed to model recurring time patterns (e.g., rhythms related to daily, weekly, or holiday periods). Specifically, a set of harmonic functions with learnable frequency parameters is used to project time into a high-dimensional space, enabling the model to identify periodic trends in risk. The periodic time embedding of the raster is as follows: In the formula, This represents the periodic time embedding (specific timestamp) of the raster. This is a frequency parameter vector used to control the temporal resolution of the encoding. Each pair of sine and cosine outputs captures a specific periodic pattern to model the change of risk state over time.

[0036] In this embodiment, spatiotemporal information is incorporated into the semantic encoding of raster POIs to express the periodicity of spatiotemporal risks. Specifically, the raster coordinates are... By mapping linear transformations to the same dimensional space as the temporal embedding, the spatial embedding of the raster is obtained. The details are as follows: Subsequently, the raster POI semantics were encoded. Spatial embedding and periodic time embedding Fusion is achieved through a multilayer perceptron, specifically as follows: in, The spatiotemporal semantic encoding of raster POIs, which integrates spatiotemporal information, includes not only the POI information in the raster but also reflects the spatiotemporal dynamics of risk.

[0037] After the above analysis, POI information can be used to uniformly represent the risk characteristics of the raster, but the spatial propagation of risk has not yet been considered. Therefore, in another specific example, risks within the raster neighborhood are aggregated based on risk propagation. Specifically, raster neighborhood risk aggregation based on risk propagation is performed according to the spatiotemporal semantic feature vector of the raster POI. The regional risks of the grid and its neighborhood are aggregated to obtain the grid risk feature vector. .

[0038] Anomaly behavior is not only related to the risk level of the area, but also closely related to the target's exposure and behavioral patterns in that area. In trajectory anomaly detection, existing methods neglect the temporal characteristics of trajectories at different scales and fail to adequately characterize local trajectory details, resulting in low accuracy of anomaly trajectory detection models. In traditional trajectory analysis, methods that accumulate global features can blur or even average out anomaly features. For example, a trajectory with a short stay across multiple high-risk blocks might be misjudged as normal due to its short stay in high-risk areas. Multi-scale trajectory anomaly detection methods, which analyze trajectories from different spatiotemporal resolutions by downsampling or dividing the trajectory into segments of different scales, ignore the temporal characteristics of the trajectory sampling sequence. While they compress features of trajectory segments using methods like mean pooling, they fail to adequately characterize local trajectory details and cannot effectively capture both short-term anomalies and long-term regions simultaneously, thus limiting the accuracy of anomaly trajectory detection models.

[0039] Points of Interest (POIs) are not isolated functional nodes; the distribution of adjacent POIs constitutes the semantic field of the security situation in this area. By fusing spatiotemporally periodic raster POI semantic encoding, POI information is used to uniformly represent the risk characteristics of the raster, but the spatial propagation of risk has not yet been considered. In this embodiment, by aggregating the regional risks of the raster and its neighborhood, the spatial diffusion characteristics of local risks are captured, comprehensively modeling the spatial dependencies between adjacent areas and the impact of context on regional risks.

[0040] Because the grid network covers a large area, explicitly constructing a graph neural network and performing computations is inefficient. Therefore, in this embodiment, a graph convolution approximation method is used. After performing mean pooling on adjacent grid cells, a linear transformation and nonlinear activation are applied to aggregate the regional risks of the grid cells and their neighborhoods, capturing the spatial diffusion characteristics of local risks. Specifically, according to the formula: Aggregate the regional risks of the grid and its neighborhood to capture the spatial diffusion characteristics of local risks; where, The raster risk feature vector represents the risk of the current raster aggregation neighborhood region. Represents a non-linear activation function. Represents the spatiotemporal semantic feature vector of the current raster POI The linear transformation matrix of the grid risk characteristics, Represents the spatiotemporal semantic feature vector of the current raster POI The linear transformation matrix of the grid risk characteristics of the neighborhood; Represents the spatiotemporal semantic feature vector of the current raster POI The The spatiotemporal semantic feature vector of the raster POI in the nth neighborhood, that is, the nth POI of the current raster. Spatiotemporal semantic feature vectors of grid POIs in each neighborhood; It represents the number of neighbors of the current grid, characterizing the spatial propagation range of the risk.

[0041] During the aggregation process, the aggregation operation only requires mean pooling and nonlinear transformation, making it well-suited for large-scale city modeling without diminishing the expressive power of features. Mean aggregation can smooth outliers and inconsistent risk signals from scattered or erroneous neighborhood data, thereby enhancing stability during training and inference. By generating spatially modulated risk representations, it reflects not only the inherent characteristics of the central grid but also the aggregation risk of its neighboring areas. This is achieved through the number of neighbors of the current grid. It depicts the spatial spread of risk, through time Raster risk feature vectors of lower-aggregated neighborhood region risks As a grid-based risk feature representation that is aware of the neighborhood context, it integrates its own risk attributes and regional risk attributes, effectively characterizing the spatial propagation effect of risk.

[0042] To further enhance the model's ability to represent grid risk features, this embodiment adopts grid risk feature representation supervised by police incident data. By introducing real-world risk signal supervision into the representation learning process and introducing an auxiliary learning task through risk event regression, the model's ability to represent grid risk features is further enhanced. This enables the model to learn the impact of POIs on regional risks from real historical risk events, rather than simply fitting risks based on POI semantics and contextual information in abnormal trajectory samples.

[0043] For a given time interval of a raster, define a regression target using crime data. This represents the risk entropy calculated based on the proportion of key personnel in the recorded data within the grid. In this way, the intensity of local risk can be directly measured through continuous monitoring signals. In this process, a lightweight multilayer perceptron, denoted as... Applied to grid risk feature vectors To predict the raster risk entropy reflected by POI information. , denoted as: In this embodiment, the learning process, which integrates spatiotemporally periodic raster POI semantic encoding, raster domain risk aggregation based on risk propagation, and raster risk feature representation assisted by police data supervision, all operates within a multi-task learning framework, using a smooth... or A loss function is used to ensure stable gradient propagation and robust fitting to risk trends.

[0044] Therefore, by integrating spatiotemporally periodic raster POI semantic encoding, raster domain risk aggregation based on risk propagation, and raster risk feature representation based on police incident data supervision, a raster representation system for risk propagation based on POIs is constructed. By mapping discrete POI information to a raster spatial range through raster POI semantic encoding, the matching bias problem caused by uneven POI distribution is solved. Spatiotemporally periodic embedding encoding captures the spatiotemporal dynamic changes of risk, effectively reflecting the risk situation of the region at different times. Simultaneously, raster neighborhood risk aggregation realizes the modeling of the spatial diffusion effect of POI risk, breaking through the traditional isolated POI modeling paradigm, and propagating the static risk of a single POI to the surrounding area based on spatial autocorrelation, forming a continuous risk field. By introducing real-world risk event data as a supervision signal through police incident data, the risk feature representation is closely linked to the actual security situation. This rasterized risk representation method retains the semantic information of POIs and integrates spatial risk propagation and spatiotemporal dynamic changes, providing high-quality regional risk feature input for subsequent trajectory anomaly detection.

[0045] Step S102: Divide the trajectory into trajectory segments with multiple spatiotemporal scales, and determine the trajectory's dwell time in each grid cell. and grid risk characteristics representation Features of trajectory segments at multiple spatiotemporal scales are fused to obtain multi-scale fused trajectory comprehensive anomaly features. .

[0046] In this embodiment, a grid-based risk representation method based on risk propagation addresses the problem of insufficient correlation between trajectory semantics and the risk level of a region, achieving the association between trajectory points, POIs, and regional risks. Anomaly trajectory detection based on temporal multi-scale feature fusion solves the problem of insufficient characterization of local trajectory details at different scales, achieving trajectory detection that takes into account both local and global features.

[0047] Anomaly behavior typically manifests in one or more parts of the overall trajectory. Determining anomaly depends not only on the risk level of the area the target traverses but also on the combined local and global characteristics of the trajectory. In this embodiment, trajectory behavior characteristics are characterized through analysis of the trajectory's exposure to regional risks and its multi-scale behavioral patterns. This modeling of the interaction between the trajectory and regional risks is done in a time-sensitive manner, rather than performing simple linear operations on the grid risks of the trajectory. Specifically, this includes: trajectory regional risk exposure detection, temporal multi-scale local anomaly capture, and multi-scale feature fusion-based anomaly perception.

[0048] In a specific example, during risk exposure detection in a trajectory area, the dwell time of the trajectory in each grid cell is considered. and grid risk characteristics representation Regional risk exposure detection is performed on the trajectory to obtain the risk exposure fusion features of each grid cell traversed by the trajectory. To determine the sequence of feature vectors of the trajectory .

[0049] In this embodiment, the understanding of abnormal trajectories focuses not only on their spatiotemporal location but also on their exposure to regional risks, considering the impact of high-risk areas on trajectory anomalies. Prolonged stays in high-risk areas typically indicate increased risk exposure, suggesting potentially harmful behavior or danger to the target, such as loitering, scouting, or pickpocketing. To capture this dynamic characteristic, this embodiment combines the regional risk characteristics of the grid with the trajectory's dwell time to perform fine-grained quantification of the overall trajectory's exposure intensity within regional risks.

[0050] The impact of regional risk on trajectories is not only reflected in the accumulation of risk in the regions where each trajectory point is located, but also exhibits a strong sequence dependency. That is, the level of exposure in the early stages affects the subsequent accumulation of risk, while the travel time modulates the overall level of risk exposure. For example, briefly passing through a high-risk area may be normal, but staying in the same area for a long time, especially after experiencing a series of other risk exposures, may indicate an increased degree of trajectory anomaly. To model this risk accumulation and context-sensitive risk propagation, this embodiment adopts a multi-layered architecture that combines linear feature transformation with sequential modeling.

[0051] First, dwell time is encoded. To capture the non-linear relationship between duration and risk exposure, the dwell time of the trajectory in each grid is encoded. The vector representation is formed through MLP, denoted as: In the formula, This represents the encoding of the trajectory's dwell time within the raster. Indicates the time spent staying Multilayer perceptron mapped to a high-dimensional feature space.

[0052] Secondly, the dwell time is fused with the grid risk features. In this process, another multilayer perceptron is used to generate the fused features of grid risk and dwell time. Specifically, it is recorded as: in, This indicates that the grid risk characteristics are represented. and stay time coding To splice; The risk exposure fusion feature integrates the risk of the previous location of the trajectory point and the dwell time information in this grid.

[0053] Finally, in order to model the regional risk exposure characteristics of the trajectory and capture its cumulative effect, this embodiment processes the sequence using a bidirectional long short-term memory network. Specifically: in, , A positive integer representing the number of grid cells the trajectory passes through.

[0054] Therefore, through risk exposure detection in the trajectory area, the results obtained This constructs a sequence of feature vectors that aggregate trajectory contextual information. Each feature vector represents a trajectory point rich in spatiotemporal exposure semantics. This not only preserves the instantaneous risk of the trajectory passing through each grid but also includes the evolution of risk exposure along the trajectory. Therefore, the trajectory is transformed from a raw sequence of geographic coordinates into a feature sequence containing risk accumulation and dissipation, enhancing the model's ability to detect subtle but meaningful anomalies in the trajectory sequence.

[0055] In another specific example, when capturing local anomalies based on temporal multi-scale methods, the trajectory is divided into trajectory segments with multiple spatiotemporal scales, and the feature vector sequence of the trajectory is used as the basis for the detection. Determine the dynamic characteristics of trajectory segments at different spatiotemporal scales. .

[0056] In this embodiment, trajectory anomalies typically manifest as multiple local anomalies within the trajectory, rather than an overall trajectory anomaly. These local anomalies are not uniformly distributed across the overall trajectory and may encompass short-term suspicious behaviors across multiple regions or time periods. Their cumulative effect reflects the overall degree of anomaly in the trajectory. To characterize these multi-granularity anomaly features, this embodiment divides the time series into segments and uses a unified Transformer model to enhance the capture of both local and global features. To this end, this embodiment introduces a Patch mechanism to design a multi-scale local anomaly capture module, dividing the trajectory into multi-scale segments and performing temporal hierarchical modeling of their local features.

[0057] In the trajectory segmentation process, this embodiment uses three spatiotemporal scales measured by the previous quantity. Each scale is used to capture the impact of risk exposure levels on abnormal behavior within different spatiotemporal ranges. The spatiotemporal scales are... This indicates that it includes short-term spatiotemporal scales. Mid-term spatiotemporal scale and long-term spatiotemporal scale For a given scale The segment length of the trajectory is At this point, the trajectory is divided into There are non-overlapping segments, among which... In the formula, Given the number of grid cells in the trajectory, the trajectory feature vector sequences are combined according to the spatiotemporal scale at different scales. .

[0058] To model the dynamic evolution of trajectory behavior at different scales, an LSTM network is used to encode and integrate each trajectory segment. The final state output of the LSTM is used as the initial representation of the trajectory segment. Then, a linear transformation layer projects this initial representation into a unified semantic space to facilitate cross-scale comparison and integration. Specifically, according to the formula: Determine the first The first scale Preliminary feature vectors of each trajectory segment ;in, Indicates the first The first scale A sequence of feature vectors for each trajectory segment. ; Indicates a linear projection layer. This represents the hidden feature vector of the final output of the LSTM network.

[0059] Next, a Transformer encoder is used to encode and integrate all trajectory segments, modeling the interaction relationships between trajectory segments within the same scale. The self-attention mechanism in the Transformer enables the model to associate different trajectory segments and identify recurring patterns, outliers, or contextual dependencies across multiple trajectory segments within the same scale. Specifically, according to the formula: The initial feature vectors of the trajectory segments are encoded and integrated according to spatiotemporal scales; among them, Indicates the spatiotemporal scale Below, trajectory fragments incorporating contextual information. Dynamic feature representation.

[0060] Therefore, by combining feature representations of multi-scale trajectory segments with hierarchical Transformer encoding, we can effectively capture and balance the need for fine-grained local behavior with the ability to model long-range dependencies, enhance sensitivity to anomalous trajectory segments, and maintain robustness to local noise.

[0061] In another specific example, during anomaly detection through multi-scale feature fusion, a cross-scale Transformer encoding network is used to encode the dynamic features of trajectory segments at multiple spatiotemporal scales, resulting in a multi-scale trajectory feature vector sequence. ; and for multi-scale trajectory feature vector sequences The trajectory feature vectors in the data are weighted to obtain multi-scale fused comprehensive trajectory anomaly features. .

[0062] In this embodiment, a cross-scale Transformer encoding network is used to integrate trajectory dynamic features from multiple spatiotemporal scales, enabling the model to simultaneously identify short-term sudden anomalies and persistent suspicious behaviors, thus comprehensively modeling both short-term anomalies and long-term trend changes in the trajectory. This requires effectively aligning trajectory features at different scales to uniformly represent anomalous behavior signals at different scales. Specifically, this is achieved by introducing scale encoding vectors. As a unique identifier for each spatiotemporal scale, it is added to the feature vector of the trajectory segment to preserve the semantics of the specific scale while achieving comparability across scales.

[0063] Then, the feature vector sequences of trajectory segments at all spatiotemporal scales are input into the Transformer encoder to encode the trajectory features at different scales. Specifically, according to the formula, The dynamic feature representations of trajectory segments across all spatiotemporal scales are effectively integrated to form a multi-scale trajectory feature representation sequence: In the formula, For trajectory In scale The number of non-overlapping trajectory segments in the subdivision. This represents the number of all feature vectors of the trajectory across multiple scales. All are positive integers. These represent the trajectory feature vectors at different scales.

[0064] Each trajectory feature vector Each encapsulates information from other trajectory segments across all scales. To aggregate these trajectory segment feature representations into a fixed-length estimated feature representation, this embodiment employs an attention pooling mechanism, using trajectory feature vectors... The weighted sum serves as a global representation of trajectory features, enabling the model to automatically focus on the trajectory segments with the most significant anomalies when forming the overall trajectory representation. The attention weights are calculated using the following formula: That is, determine the trajectory feature vector. Weighted weights ;in, A learnable parameter vector; taking values ​​of ; For the trajectory at multiple scales, the first Each trajectory feature vector; L represents the number of all feature vectors of the trajectory across multiple scales. It is a positive integer.

[0065] Furthermore, trajectory comprehensive anomaly features based on multi-scale feature fusion for: In the formula, Trajectory feature vector The weighted weights.

[0066] Finally, the feature representations of trajectory segments at different scales are processed through a multi-layer perceptron and a linear classification layer to obtain the anomaly score of the trajectory, i.e.: in, This represents a logarithmic function that includes a binary classification task (normal vs. abnormal).

[0067] Therefore, this paper utilizes an anomaly trajectory detection framework based on temporal multi-scale feature fusion. By systematically integrating three key components—regional risk exposure detection, local anomaly capture, and risk perception—an anomaly trajectory detection method capable of simultaneously perceiving microscopic anomaly details and macroscopic behavioral patterns is constructed. Regional risk exposure detection captures the dwell time and risk accumulation effect of trajectories in high-risk areas, identifying potential anomalies caused by prolonged exposure to high-risk areas. Temporal multi-scale local anomaly capture analyzes trajectory behavior patterns across short-term, medium-term, and long-term spatiotemporal scales, enabling the detection of both sudden anomalies and gradual behavioral deviations. By introducing scale encoding vectors and cross-scale attention mechanisms, trajectory features at different spatiotemporal scales are aligned and fused, allowing the model to consider both local and global trajectory features. This better understands how short-term high-risk or long-term low-risk events evolve into anomalies, thereby enhancing the model's adaptability to anomaly trajectory detection tasks for public security applications.

[0068] In this embodiment, a comprehensive spatiotemporal inference model for trajectory anomaly detection is constructed through grid-based risk feature analysis based on risk propagation and anomaly trajectory detection based on temporal multi-scale feature fusion. In large-scale trajectory data, the vast majority of trajectories follow conventional or similar behavioral patterns, while the number of anomalous trajectories is significant. This imbalance can easily cause the classifier to converge to a trivial solution that predicts the majority of classes. To address this, this embodiment uses a multi-task learning loss function to provide effective guidance for learning grid-based risk feature representations while acknowledging the classification imbalance.

[0069] The primary supervision signal used in model training comes from Focal Loss, a variant of cross-entropy loss. It reduces the weight of easily distinguishable samples during training by dynamically scaling the factor, thus quickly focusing the model on difficult-to-distinguish samples and preventing the model from being dominated by a large number of normal trajectories. The Focal Loss function is defined as follows: in, To integrate spatiotemporal reasoning models for real categories The estimated probability of whether the trajectory itself is normal or abnormal. This represents the focusing parameter, used to reduce the loss of easily classified samples; This represents the category-balanced weighting factor; for exception classes, For the normal class, This is to ensure that the model remains sensitive to underrepresented outlier classes during training.

[0070] Meanwhile, to ensure that the learned risk embeddings have semantic meaning and can predict real-world risk conditions, an auxiliary regression loss is added based on historical audit data, and risk entropy is used to supervise the representation of raster risk. in, For the integrated spatiotemporal reasoning model based on grid risk feature vectors Predicted grid risk entropy It is the true risk entropy under corresponding spatiotemporal conditions calculated through historical risk events.

[0071] The overall loss function of the model consists of two parts: focus loss and risk entropy loss, specifically: In the formula, The hyperparameter is used to balance the contribution of auxiliary tasks and is set to 0.5 in the experiment. Using the above loss function, the raster risk feature representation that integrates POI information and the trajectory comprehensive anomaly representation that integrates multi-scale features can be jointly optimized. This allows the final trajectory feature representation to better integrate regional risk features in anomaly detection tasks and simultaneously capture both local and global features of the trajectory.

[0072] In this embodiment, in the modeling of trajectory behavior anomalies, temporal multi-scale spatiotemporal context information is introduced. Based on the fusion of temporal multi-scale features, the anomaly trajectory detection extracts the temporal features of trajectory segments at different scales. The anomaly trajectory detection based on the fusion of temporal multi-scale features is designed to model the behavioral features of the trajectory in different spatiotemporal ranges, taking into account both the local and global features of the trajectory.

[0073] Abnormal trajectories are understood as the cumulative degree of exposure of a target to regional risks at different scales during spatiotemporal movement. Regarding the degree of risk exposure, this embodiment uses the time the trajectory spends in the grid as a key indicator to construct a risk exposure detection model, thereby characterizing the dynamic changes in risk exposure during trajectory movement.

[0074] Regarding abnormal behavior, considering the temporal attributes of trajectory data, this embodiment extracts temporal features from trajectory segments at different scales, comprehensively analyzing the interaction patterns between trajectories and regional risks from short-term, medium-term, and long-term scales, taking into account both local and global features of the trajectory. Through temporal multi-scale trajectory behavior anomaly detection, not only can obvious abnormal behaviors be identified, but also progressive behavioral deviations can be captured, thereby improving the accuracy of the abnormal trajectory detection model.

[0075] like Figure 4 As shown, this embodiment also provides a temporal multi-scale anomaly trajectory detection system based on POI risk propagation, the system comprising: The grid risk analysis unit 401 is configured to divide the target area into grids, perform grid risk feature analysis based on risk propagation, and determine the grid risk feature representation. ; The multi-scale anomaly detection unit 402 is configured to divide the trajectory into trajectory segments with multiple spatiotemporal scales and to detect anomalies based on the dwell time of the trajectory in each grid cell. and grid risk characteristics representation Features of trajectory segments at multiple spatiotemporal scales are fused to obtain multi-scale fused trajectory comprehensive anomaly features. .

[0076] The temporal multi-scale anomaly trajectory detection system based on POI risk propagation provided in this embodiment can implement the steps and processes of the temporal multi-scale anomaly trajectory detection method based on POI risk propagation in any of the above embodiments, and achieve the same technical effect, which will not be described in detail here.

[0077] In the description of this invention, it should be understood that the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0078] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A temporal multi-scale anomaly trajectory detection method based on POI risk propagation, characterized in that, include: The target area is divided into grids, and grid risk feature analysis based on risk propagation is performed to determine the grid risk feature representation. ; The trajectory is divided into trajectory segments with multiple spatiotemporal scales, and the residence time of the trajectory in each grid is considered. and grid risk characteristics representation Features of trajectory segments at multiple spatiotemporal scales are fused to obtain multi-scale fused trajectory comprehensive anomaly features. .

2. The method according to claim 1, characterized in that, Spatiotemporal periodic fusion of raster POI semantic encoding yields spatiotemporal semantic feature vectors of raster POIs with fused spatiotemporal information. ; Risk aggregation based on grid neighborhoods, using the spatiotemporal semantic feature vectors of grid POIs. The regional risks of the grid and its neighborhood are aggregated to obtain the grid risk feature vector. ; Based on the grid risk feature vector Using police incident data, a multi-layer sensor is used to supervise and train the grid risk feature representation. .

3. The method according to claim 2, characterized in that, The one-hot vector encoded for each POI type is projected into a POI feature vector, and all POI feature vectors in each raster are aggregated to form a raster POI semantic encoding. ; Spatiotemporal periodic encoding of the raster is performed, embedding the periodic time of the raster. Spatial embedding and raster POI semantic encoding By fusing multiple layers of perceptrons, a grid POI spatiotemporal semantic feature vector with fused spatiotemporal information is obtained. .

4. The method according to claim 2, characterized in that, According to the formula: Regional risks of aggregated grids and their neighborhoods; In the formula, The raster risk feature vector represents the risk of the current raster aggregation neighborhood region. Represents a non-linear activation function. Represents the spatiotemporal semantic feature vector of the current raster POI The linear transformation matrix of the grid risk characteristics, Represents the spatiotemporal semantic feature vector of the current raster POI The linear transformation matrix of the grid risk characteristics of the neighborhood; Indicates the current grid cell's first... Spatiotemporal semantic feature vectors of POIs in each neighborhood; This indicates the number of neighbors of the current grid cell.

5. The method according to claim 1, characterized in that, Based on the dwell time of the trajectory in each grid and grid risk characteristics representation Regional risk exposure detection is performed on the trajectory to obtain the risk exposure fusion features of each grid cell traversed by the trajectory. To determine the sequence of feature vectors of the trajectory ; The trajectory is divided into trajectory segments with multiple spatiotemporal scales, and based on the feature vector sequence of the trajectory... Determine the dynamic characteristics of trajectory segments at different spatiotemporal scales. ; Dynamic features of trajectory segments across multiple spatiotemporal scales are obtained through a cross-scale Transformer encoding network. Encoding is performed to obtain a multi-scale trajectory feature vector sequence. ; and for multi-scale trajectory feature vector sequences Attention pooling is performed to obtain multi-scale fusion of trajectory anomaly features. ;in, In the formula, For the trajectory at scale The number of non-overlapping trajectory segments in the subdivision, where L is the total number of feature vectors of the trajectory at multiple scales. All are positive integers. These represent the trajectory feature vectors at different scales.

6. The method according to claim 5, characterized in that, The dwell time of the trajectory in each grid cell By forming a vector representation using a multilayer perceptron, the dwell time encoding of the trajectory in the grid is obtained. ; Encode the dwell time of the trajectory in the raster. Representation of grid risk characteristics By performing fusion, the risk exposure fusion features of the trajectory in the grid are obtained. ; Risk exposure characteristics of lattices using bidirectional long short-term memory networks Constructed feature vector sequence The process is performed to obtain the feature vector sequence of the trajectory. ;in, , A positive integer representing the number of grid cells the trajectory passes through.

7. The method according to claim 5, characterized in that, Divide the trajectory into Non-overlapping segments, and at scale Below, according to spatiotemporal scale The feature vector sequences of the combined trajectories Each trajectory segment is encoded using a Long Short-Term Memory (LSTM) network to obtain the scale. Feature vector of the lower trajectory segment ;in, In the formula, This represents the number of grid cells the trajectory passes through. It is a positive integer; The Transformer encoder encodes and integrates the initial feature vectors of all trajectory segments according to spatiotemporal scales to obtain the dynamic features of trajectory segments at different spatiotemporal scales. .

8. The method according to claim 5, characterized in that, According to the formula: Determine the trajectory feature vector Weighted weights ; In the formula, For learnable parameter vectors, For the trajectory at different scales, the first Each trajectory feature vector; L represents the number of all trajectory feature vectors across multiple scales. It is a positive integer.

9. The method according to claim 1, characterized in that, Also includes: A comprehensive spatiotemporal inference model is constructed for time-series multi-scale anomaly trajectory detection based on POI risk propagation; the loss function of the comprehensive spatiotemporal inference model is: In the formula, To integrate the focus loss of the spatiotemporal reasoning model, To account for the risk entropy loss of the spatiotemporal reasoning model, The overall loss of the spatiotemporal reasoning model; This is a hyperparameter, and its value is... ; A positive integer representing the number of grid cells the trajectory passes through; For the integrated spatiotemporal reasoning model based on grid risk feature vectors Predicted grid risk entropy It is the true risk entropy under corresponding spatiotemporal conditions calculated through historical risk events; Indicates the focus parameter, Indicates the category-balanced weighting factor. To integrate spatiotemporal reasoning models for real categories The estimated probability.

10. A temporal multi-scale anomaly trajectory detection system based on POI risk propagation, comprising: The grid risk analysis unit is configured to divide the target area into grids, perform grid risk feature analysis based on risk propagation, and determine the grid risk feature representation. ; The multi-scale anomaly detection unit is configured to divide the trajectory into trajectory segments with multiple spatiotemporal scales and to detect anomalies based on the dwell time of the trajectory in each grid cell. and grid risk characteristics representation Features of trajectory segments at multiple spatiotemporal scales are fused to obtain multi-scale fused trajectory comprehensive anomaly features. .