Crime prediction method based on time-space point process
By combining spatiotemporal point processes and diffusion models, and utilizing human activity attention mechanisms and multi-head self-attention mechanisms, the problems of insufficient spatiotemporal dependence and excessive parameter assumptions in existing technologies have been solved, achieving higher accuracy and broader crime prediction, and improving police deployment and social stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHWEAT UNIV OF SCI & TECH
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-08
AI Technical Summary
Existing crime prediction technologies have significant limitations in capturing spatiotemporal dependencies, model generalization ability, and over-reliance on parameter assumptions, making it difficult to achieve accurate predictions in complex urban environments.
By combining spatiotemporal point processes and diffusion models, and through human activity attention mechanisms and stacked multi-head self-attention mechanisms, global and fine-grained spatiotemporal correlations are captured to generate the spatiotemporal dynamic evolution of criminal events.
It improves the accuracy and adaptability of crime prediction, enabling it to adapt to crime patterns in different regions and time periods, reduce the waste of police resources and the economic losses caused by crime, and enhance public safety and social stability.
Smart Images

Figure CN121998185A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, and in particular relates to a crime prediction method based on spatiotemporal point processes. Background Technology
[0002] Crime, as a pervasive social problem, has a devastating impact on individual well-being, community cohesion, and economic vitality. Therefore, accurately predicting the spatiotemporal dynamics of crime events to optimize police deployment and implement effective preventative measures has become a key focus of urban management and public safety research in various countries. Existing crime prediction technologies can be broadly categorized into four types: statistical models, machine learning models, deep learning models, and point-process models. While each model has its own advantages and application scenarios, they all possess significant limitations when addressing complex and dynamic urban crime phenomena.
[0003] Statistical models utilize historical crime data to identify high-crime areas through techniques such as regression analysis and heatmaps. While these models are relatively simple to compute, they are essentially descriptive and have limited ability to capture the dynamic contagion effects and complex spatiotemporal relationships of crime events, often resulting in predictions that lag behind actual changes. Machine learning models, on the other hand, predict crime by training on the relationship between historical data and geographical, socioeconomic, and other features. While these models can capture some nonlinear relationships, their performance heavily relies on the completeness of feature engineering and has weak generalization ability across different cities or communities. Furthermore, deep learning models, primarily based on convolutional neural networks and recurrent neural networks, offer a stronger ability to capture spatiotemporal patterns. Standard CNN / LSTM architectures are mainly designed for regular, equally spaced grid data or sequential data. However, crime events are essentially asynchronous and irregular point events occurring in continuous spatiotemporal space. Directly applying these models requires discretizing the data into coarse grids and time periods, leading to significant information loss and an inability to accurately represent the precise time, location, and complex interactions between individual events. Point process-based models are theoretical frameworks for modeling asynchronous event flows. Their core idea is that historical events can influence the occurrence of future events. This intuitively fits the "near repetition" and contagion phenomena of crime, making them theoretically suitable. However, they are inflexible and have limited expressive power in practice. They usually require strict parameterization assumptions and are difficult to characterize criminal activities in the real world.
[0004] Despite significant advancements in crime prediction technology, existing technologies still face several challenges: Insufficient capture of spatiotemporal dependencies: Existing models often struggle to capture the complex spatiotemporal correlations in criminal events, a limitation that is particularly pronounced in complex urban environments.
[0005] The models exhibit poor generalization ability: Many models (especially machine learning models that heavily rely on feature engineering and models trained on specific regional data) show weak generalization ability across different cities and social contexts. The learned patterns and characteristics of specific regions are difficult to adapt to the spatial heterogeneity and time-varying nature of crime patterns, limiting the universal applicability of the methods.
[0006] Over-reliance on parametric assumptions: Traditional point process models and other theoretical frameworks, for the sake of mathematical tractability, often make strong parametric assumptions (such as exponential form and fixed range of influence) about the impact patterns of events (e.g., spatiotemporal decay kernel functions). These simplified assumptions deviate from the complex evolution patterns of crime in real cities, resulting in insufficient model flexibility and large prediction bias. Summary of the Invention
[0007] To address the aforementioned issues, this invention proposes a crime prediction method based on spatiotemporal point processes. This method combines spatiotemporal point processes with a diffusion model, utilizing human activity-based attention mechanisms and stacked multi-head self-attention mechanisms to capture global crime dynamics and finer-grained spatiotemporal correlations, thereby improving the accuracy of crime prediction. This effectively solves the problems of insufficient spatiotemporal dependency capture, poor model generalization ability, and over-reliance on parameter assumptions in existing technologies.
[0008] To achieve the above objectives, the technical solution adopted by this invention is: a crime prediction method based on spatiotemporal point processes, comprising the following steps: S10, by performing temporal encoding and spatial embedding on each spatiotemporal sequence respectively, spatiotemporal features are extracted to achieve spatiotemporal feature encoding of criminal events; S20 utilizes the human activity attention mechanism to extract the global correlation of historical crime data, thereby achieving global dependency capture of spatiotemporal features; S30 utilizes a stacked multi-head self-attention mechanism to calculate the dependencies between feature elements, thereby achieving more fine-grained capture of spatiotemporal context dependencies. S40 uses the obtained spatiotemporal features as conditions to guide the diffusion model in modeling the spatiotemporal dynamic evolution of criminal events, and finally generates the time and latitude and longitude of the occurrence of the criminal events.
[0009] Furthermore, by performing temporal encoding and spatial embedding on each spatiotemporal sequence separately, spatiotemporal features are extracted to achieve spatiotemporal feature encoding of criminal events, including: Input layer: Input criminal incident information from the past few days; Spatiotemporal coding: Temporal coding: The input crime time is encoded using a fixed pattern position based on a periodic function to obtain temporal features; Spatial embedding: The spatial information of the crime is mapped into an embedding vector using a linear projection mechanism to obtain spatial features; Spatiotemporal features are obtained by adding and fusing the temporal and spatial features of each event.
[0010] Furthermore, information on crimes committed in the past few days includes the time, longitude, and latitude of the crime.
[0011] Furthermore, based on the characteristics of historical crime data, human activity features are extracted and established, and a self-attention mechanism is used to integrate human activity features into the crime prediction model.
[0012] Furthermore, human activity characteristics are based on the temporal and spatial distribution information of historical crime data, including: Historical crime data is preprocessed, and different time and space values in the data are segmented. The probability of each segment occurring in the global event data is calculated. Based on the segment in which each event is located, the activity level of each event in time and space is obtained. By using the temporal and spatial activity of each event as input features, it is mapped to three feature spaces: query, key, and value. The similarity score between input units is calculated to generate a weight matrix. The weight matrix is used to weight the input features so that the global dependencies of different time periods and different spatial segments are captured.
[0013] Furthermore, by utilizing a stacked multi-head self-attention mechanism, more fine-grained spatiotemporal context dependencies can be captured through iterative query-attention processes across multiple self-attention layers.
[0014] Furthermore, in the stacked multi-head self-attention layers, the first layer's multi-head self-attention mechanism is equipped with a mask, while subsequent layers are not masked.
[0015] Furthermore, the spatiotemporal features obtained through spatiotemporal encoding, incorporation of human activity characteristics, and weighting by stacked multi-head self-attention mechanisms serve as conditions to guide the diffusion model in modeling the spatiotemporal dynamic evolution of criminal events. In the reverse denoising process of the diffusion model, the model receives spatiotemporal feature conditions, a noisy sequence state, and current step information as input, predicts the noise components that should be removed from the input at the current step, and through multiple iterations of this denoising step, the model finally generates a completely new and complete spatiotemporal sequence of crimes at a future time, that is, obtains the time and latitude and longitude of the future crime event.
[0016] The beneficial effects of adopting this technical solution are: This invention combines human activity-based attention mechanisms with stacked multi-head self-attention mechanisms to simultaneously capture global crime dynamics and finer-grained spatiotemporal correlations, thereby effectively addressing the multi-layered spatiotemporal complexity of crime dynamics and capturing complex spatiotemporal dependencies.
[0017] This invention combines the significant paradigmatic fit between spatiotemporal point processes and diffusion models (structural fit between dynamic evolution mechanisms and state-space modeling) to construct a novel generative prediction framework. It encodes historical crime data using human activity-based attention mechanisms and stacked multi-head self-attention mechanisms, forming richly contextualized historical premises that guide the diffusion model to learn the evolutionary patterns of spatiotemporal crime events. The diffusion model itself possesses powerful distributed learning and generalization capabilities, significantly improving its adaptability and generalization performance to crime patterns across different regions and time periods. Simultaneously, the diffusion model learns evolutionary dynamics in a data-driven manner, without relying on the strong parameter assumptions of traditional spatiotemporal point processes, fundamentally avoiding model bias caused by simplified assumptions. This combination of techniques enables the crime prediction model to capture complex spatiotemporal dependencies while eliminating the limitations of strong parameter assumptions, significantly improving the accuracy and adaptability of crime prediction. Therefore, this invention has significant advantages at the social, economic, and technological levels. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of a crime prediction method based on spatiotemporal point processes according to the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings.
[0020] In this embodiment, see Figure 1 As shown, this invention proposes a crime prediction method based on spatiotemporal point processes, including the following steps: S10, by performing temporal encoding and spatial embedding on each spatiotemporal sequence respectively, spatiotemporal features are extracted to achieve spatiotemporal feature encoding of criminal events; S20 utilizes the human activity attention mechanism to extract the global correlation of historical crime data, thereby achieving global dependency capture of spatiotemporal features; S30 utilizes a stacked multi-head self-attention mechanism to calculate the dependencies between feature elements, thereby achieving more fine-grained capture of spatiotemporal context dependencies. S40 uses the obtained spatiotemporal features as conditions to guide the diffusion model in modeling the spatiotemporal dynamic evolution of criminal events, and finally generates the time and latitude and longitude of the occurrence of the criminal events.
[0021] As an optimization of the above embodiments, spatiotemporal feature encoding of criminal events is achieved by performing temporal encoding and spatial embedding on each spatiotemporal sequence, thereby extracting spatiotemporal features, including: Input layer: Input criminal event information from the past few days; criminal event information from the past few days includes: the time, longitude and latitude of the crime; specifically, each input sample is a B×L×T tensor, where B represents the number of sequences in the sample, L represents the event length of each sequence, and T represents the number of features; Spatiotemporal coding: Time coding: The input crime time B×L×1 is encoded using a fixed pattern position based on a periodic function to obtain the temporal features B×L×D; Spatial embedding: The crime spatial information B×L×T-1 is mapped to the spatial features of the embedding vector B×L×D using a linear projection mechanism, where D represents the processed feature dimension; The spatiotemporal features are obtained by adding and fusing the temporal and spatial features of each event.
[0022] By structuring and learning-friendly encoding the temporal and spatial information of crimes, the model can accurately depict the distribution and evolution patterns of events in continuous time and space, providing input representations for subsequent modeling.
[0023] As an optimization of the above embodiments, the human activity attention mechanism is used to extract global spatiotemporal characteristics and achieve global dependency capture.
[0024] Based on the characteristics of historical crime data, human activity features are extracted and established, and a self-attention mechanism is used to integrate human activity features into the crime prediction model.
[0025] Human activity characteristics are based on the temporal and spatial distribution information of historical crime data, including: Historical crime data is preprocessed, and different time and space values in the data are segmented. The probability of each segment occurring in the global event data is calculated. Based on the segment in which each event is located, the activity level of each event in time and space is obtained. By using the temporal and spatial activity of each event as input features, and mapping them to three feature spaces—query, key, and value—similarity scores between input units are calculated to generate weight matrices, all of which have a shape of B×L×L. These weight matrices are used to weight the input features; by weighting the temporal and spatial features of the inputs separately, B×L×D feature vectors are obtained, thus capturing global dependencies across different time periods and spatial segments. Since human activity features are derived from the temporal and spatial distribution information of the entire historical crime data, incorporating human activity features allows for a better global capture of temporal and spatial dependencies.
[0026] As an optimization of the above embodiments, considering that a single self-attention layer is difficult to capture the complex temporal and spatial dependencies of criminal events, the present invention utilizes a stacked multi-head self-attention mechanism to achieve finer-grained capture of spatiotemporal context dependencies by iterating the query-attention process of multiple self-attention layers.
[0027] In the stacked multi-head self-attention layers, the first layer's multi-head self-attention mechanism is equipped with a mask to prevent "peeking into the future" and to prevent the softmax function from assigning dependencies to future events; subsequent layers are unmasked to prevent them from compromising the dependencies captured by the first layer's multi-head self-attention mechanism. For the complex temporal and spatial dependencies of criminal events, this allows for the extraction of finer-grained spatiotemporal features, enabling the model to capture more subtle spatiotemporal relationships.
[0028] In this case, the number of stacked multi-head self-attention layers is generally set to 2, which can effectively achieve finer-grained capture.
[0029] As an optimization of the above embodiments, the spatiotemporal features obtained by spatiotemporal encoding, incorporating human activity characteristics, and weighting by stacked multi-head self-attention mechanisms are used as conditions to guide the diffusion model in modeling the spatiotemporal dynamic evolution of criminal events. In the reverse denoising process of the diffusion model, the model receives spatiotemporal feature conditions, a noisy sequence state, and current step information as input, predicts the noise components that should be removed from the input at the current step, and through multiple iterations of this denoising step, the model finally generates a completely new and complete spatiotemporal sequence of crimes at a future time, that is, obtains the time and latitude and longitude of the future crime event.
[0030] Output layer output format: The output is a three-dimensional spatiotemporal sequence with the same size as the input. After spatiotemporal separation, the time and latitude and longitude of the future crime event are obtained.
[0031] In summary, the model structure includes: a spatiotemporal encoding layer, a human activity attention layer, stacked multi-head self-attention layers, and a spatiotemporal diffusion module.
[0032] Compared with statistical models, machine learning models, deep learning models, and traditional spatiotemporal point process models, this invention demonstrates significant advantages in handling complex spatiotemporal dependencies, specifically in the following aspects: (1) Higher prediction accuracy: This invention captures the global spatiotemporal dependence of crime through the human activity attention mechanism, and achieves finer-grained capture of spatiotemporal context dependence through a stacked multi-head self-attention mechanism, demonstrating superior prediction performance when capturing complex, multi-layered crime patterns. According to experimental results, the method of this invention can reduce the mean squared error (RMSE) of crime in time by approximately 12.2%-57.1%, and the mean squared error (RMSE) in space by approximately 82.2%-95.3%.
[0033] (2) Better model generalization ability: The present invention exhibits good generalization ability in different social contexts, and can effectively predict crimes in different countries and regions and in different social backgrounds, and is applicable to diverse crime scenarios.
[0034] (3) Reducing the limitations of parameter assumptions: Traditional point process models and other theoretical frameworks often make strong parameter assumptions about the impact patterns of events in order to achieve mathematical tractability. These simplified assumptions deviate from the complex evolution patterns of crime in real cities, resulting in insufficient model flexibility and large prediction bias. This invention combines spatiotemporal point processes and diffusion models, learning spatiotemporal dynamics in each diffusion step, bypassing the abstract intensity function in spatiotemporal point processes, and fundamentally avoiding the limitations of parameter assumptions.
[0035] By improving the accuracy of crime prediction, this invention can effectively reduce various losses caused by crime: (1) Reduce waste of police resources This invention can more accurately predict the spatiotemporal distribution of crimes, helping the police to deploy and dynamically allocate police resources, reduce blind patrols and ineffective dispatches, and improve the efficiency of solving cases.
[0036] (2) Reduce direct economic losses caused by crime This invention provides a more intelligent crime prediction system that can provide early warnings of potential crimes in time and space, enabling businesses and residents to strengthen security measures in advance and avoid property losses.
[0037] 3. Social Impact This invention can provide accurate crime prediction in various crime scenarios, effectively reducing social panic and casualties caused by crime: (1) Safeguarding social stability: This invention helps to build a more proactive security and prevention system, reduce the incidence of street crime and violence, reduce serious crimes, and safeguard the stable development of society.
[0038] (2) Enhance public safety: This invention can enhance citizens’ sense of security and trust in law enforcement agencies, thereby increasing residents’ willingness to go out, boosting commercial activity and strengthening community cohesion.
[0039] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A crime prediction method based on spatiotemporal point processes, characterized in that, Including the following steps: S10, by performing time encoding and spatial embedding on each spatiotemporal sequence in historical crime data, spatiotemporal features are extracted to achieve spatiotemporal feature encoding of crime events; S20 utilizes the human activity attention mechanism to extract the global correlation of historical crime data, thereby achieving global dependency capture of spatiotemporal features; S30 utilizes a stacked multi-head self-attention mechanism to calculate the dependencies between feature elements, thereby achieving more fine-grained capture of spatiotemporal context dependencies. S40 uses the obtained spatiotemporal features as conditions to guide the diffusion model in modeling the spatiotemporal dynamic evolution of criminal events, and finally generates the time and latitude and longitude of the occurrence of the criminal events.
2. The crime prediction method based on spatiotemporal point processes according to claim 1, characterized in that, By performing temporal encoding and spatial embedding on each spatiotemporal sequence separately, spatiotemporal features are extracted to achieve spatiotemporal feature encoding of criminal events, including: Input layer: Input criminal incident information from the past few days; Spatiotemporal coding: Temporal coding: The input crime time is encoded using a fixed pattern position based on a periodic function to obtain temporal features; Spatial embedding: The spatial information of the crime is mapped into an embedding vector using a linear projection mechanism to obtain spatial features; Spatiotemporal features are obtained by adding and fusing the temporal and spatial features of each event.
3. The crime prediction method based on spatiotemporal point processes according to claim 2, characterized in that, Information on crimes committed in the past few days includes the time, longitude, and latitude of the crime.
4. The crime prediction method based on spatiotemporal point processes according to claim 1, characterized in that, Based on the characteristics of historical crime data, human activity features are extracted and established, and a self-attention mechanism is used to integrate human activity features into the crime prediction model.
5. The crime prediction method based on spatiotemporal point processes according to claim 4, characterized in that, Human activity characteristics are based on the temporal and spatial distribution information of historical crime data, including: Historical crime data is preprocessed, and different time and space values in the data are segmented. The probability of each segment occurring in the global event data is calculated. Based on the segment in which each event is located, the activity level of each event in time and space is obtained. By using the temporal and spatial activity of each event as input features, it is mapped to three feature spaces: query, key, and value. The similarity score between input units is calculated to generate a weight matrix. The weight matrix is used to weight the input features so that the global dependencies of different time periods and different spatial segments are captured.
6. The crime prediction method based on spatiotemporal point processes according to claim 1, characterized in that, By leveraging a stacked multi-head self-attention mechanism, more fine-grained spatiotemporal context dependencies can be captured through iterative query-attention processes across multiple self-attention layers.
7. A crime prediction method based on spatiotemporal point processes according to claim 6, characterized in that, In the stacked multi-head self-attention layers, the first layer's multi-head self-attention mechanism is equipped with a mask, while subsequent layers are unmasked.
8. The crime prediction method based on spatiotemporal point processes according to claim 1, characterized in that, The spatiotemporal features obtained through spatiotemporal encoding, incorporation of human activity characteristics, and weighting by stacked multi-head self-attention mechanisms serve as conditions to guide the diffusion model in modeling the spatiotemporal dynamic evolution of criminal events. In the reverse denoising process of the diffusion model, the model receives spatiotemporal feature conditions, a noisy sequence state, and current step information as input, predicts the noise components that should be removed from the input at the current step, and through multiple iterations of this denoising step, the model finally generates a completely new and complete spatiotemporal sequence of crimes for a future time period, that is, obtains the time and latitude and longitude of the crime event.