Urban space-time probability prediction method and device based on collaborative certainty and diffusion model
By decomposing the urban spatiotemporal traffic prediction problem into mean and residual predictions, and utilizing a collaborative deterministic and diffusion model, the problem of insufficient accuracy and efficiency of traditional models in urban spatiotemporal traffic prediction is solved, achieving more efficient prediction and uncertainty reflection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies struggle to maintain both prediction accuracy and improve uncertainty modeling capabilities in urban spatiotemporal traffic forecasting. In particular, when faced with complex multi-peak distributions and spatiotemporal heterogeneity, traditional models struggle to capture the differences in fluctuation patterns between urban centers and suburbs, and their computational efficiency is insufficient to handle real-time data streams from large-scale urban IoT devices.
The problem of urban spatiotemporal traffic prediction is decomposed into two sub-problems: mean prediction and residual prediction. The mean prediction model is used to capture the main trends and perform adaptive scaling quantization. The residual prediction model is combined with positive noise addition and negative noise removal training to construct a collaborative deterministic and diffusion model to improve prediction accuracy.
It achieves improved uncertainty modeling capabilities while maintaining prediction accuracy. By decomposing the problem to reduce dimensionality, it improves the accuracy of residual prediction, which can more realistically reflect future uncertainties and adapt to the complex characteristics of urban spatiotemporal traffic data.
Smart Images

Figure CN122047589A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and apparatus for predicting urban spatiotemporal probabilities using a collaborative deterministic and diffusion model. Background Technology
[0002] Urban spatiotemporal prediction, as one of the core technologies for smart city construction, aims to accurately predict dynamic changes within a specific spatiotemporal range by integrating historical and real-time spatiotemporal traffic data, such as traffic flow, crowd movement, and cellular network traffic. This technology has significant application value in areas such as intelligent traffic management, public safety and security, and optimal allocation of urban resources. Taking traffic management as an example, accurate traffic flow prediction can effectively alleviate urban congestion; while refined crowd flow prediction can provide decision support for security and emergency evacuation during large-scale events. However, urban spatiotemporal traffic data exhibits multi-peak distribution characteristics, such as the bimodal distribution of traffic flow under normal and accident conditions, and also demonstrates spatiotemporal heterogeneity, such as the difference in fluctuation patterns between urban centers and suburbs. These characteristics pose significant challenges to traditional prediction methods.
[0003] With breakthroughs in deep learning technology, the current mainstream methods mainly adopt a probabilistic prediction paradigm. This paradigm focuses on constructing a conditional probability distribution p(y|x). Its advantage lies in its ability to quantify prediction uncertainty rather than provide a single prediction value. The model can evaluate the reliability of the results by outputting prediction quantiles or confidence intervals.
[0004] However, this paradigm's overemphasis on uncertainty modeling may lead to a decrease in the accuracy of capturing major patterns. Furthermore, in practical deployments, this paradigm faces efficiency bottlenecks, making it difficult to meet the computational and scalability requirements of real-time data streams from large-scale urban IoT devices. Additionally, urban spatiotemporal traffic data possesses complex dual characteristics, with deterministic patterns and random fluctuations often coupled. Traditional single-modeling frameworks struggle to capture both features simultaneously. Moreover, the multimodal distribution of the data exhibits dynamic heterogeneity in the spatiotemporal dimension; for example, the distribution differences in fluctuation patterns between urban centers and suburbs at different times require models with spatiotemporally adaptive probabilistic representation capabilities, which the aforementioned paradigms lack. Summary of the Invention
[0005] This invention provides a method and apparatus for urban spatiotemporal probability prediction using a collaborative deterministic and diffusion model, which addresses the shortcomings of existing technologies that cannot improve uncertainty modeling capabilities while maintaining prediction accuracy. By decomposing the complex probability prediction problem into two sub-problems—mean prediction and residual prediction—the problem is simplified and the dimensionality is reduced, thereby improving the accuracy of residual prediction and more realistically reflecting future uncertainties.
[0006] This invention provides a method for predicting urban spatiotemporal probability using a collaborative deterministic and diffusion model, comprising: acquiring urban spatiotemporal traffic data; wherein, the urban spatiotemporal traffic data is used to characterize traffic observation or measurement data for target attributes at target times and different locations in the city; inputting the urban spatiotemporal traffic data into a mean prediction model to obtain the predicted mean output by the mean prediction model; wherein, the mean prediction model is first trained based on historical spatiotemporal traffic data and the corresponding true mean data of historical spatiotemporal traffic data; performing adaptive scaling quantization on the urban spatiotemporal traffic data to obtain a fluctuation scale; based on the urban spatiotemporal traffic data, combined with a residual prediction model and the fluctuation scale, obtaining the predicted residual output by the residual prediction model; wherein, the residual prediction model is trained by positively adding noise to the difference estimate and negatively denoising it in combination with historical spatiotemporal traffic data, the difference estimate being based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the corresponding true mean data of historical spatiotemporal traffic data; and obtaining the spatiotemporal probability prediction result based on the predicted mean and the predicted residual.
[0007] According to the present invention, a method for predicting urban spatiotemporal probabilistics using a collaborative deterministic and diffusion model includes the following steps before inputting urban spatiotemporal traffic data into a residual prediction model: freezing the parameters of a trained mean prediction model and inputting historical spatiotemporal traffic data into the parameter-frozen mean prediction model to obtain a corresponding mean estimate; obtaining a difference estimate based on the mean estimate and the true mean data corresponding to the historical spatiotemporal traffic data; performing adaptive scaling quantization on the historical spatiotemporal traffic data to obtain a historical fluctuation scale; inputting the difference estimate and the historical fluctuation scale into the residual prediction model to be trained, and combining the historical fluctuation scale to perform forward iterative noise addition on the difference estimate to obtain a noisy residual; performing backward iterative denoising based on the noisy residual and the historical spatiotemporal traffic data, combined with a target probability distribution determined based on the historical fluctuation scale, to obtain a residual estimate; constructing a first loss function based on the initial noise added during forward iterative noise addition and the final noise removed during backward iterative denoising, and converging based on the first loss function to end the training.
[0008] According to the present invention, a method for predicting urban spatiotemporal probabilistics using a collaborative deterministic and diffusion model is provided. Based on denoised residuals and historical spatiotemporal traffic data, and combined with a target probability distribution determined based on historical fluctuation scales, reverse iterative denoising is performed to obtain a residual estimate. The method includes: concatenating the denoised residuals and historical spatiotemporal traffic data as initial reverse denoised data, and performing reverse iterative denoising according to a preset iterative denoising strategy to obtain a residual estimate; wherein the preset iterative denoising strategy is used to: for each reverse iteration, sample the residual of the corresponding reverse iteration step from the target probability distribution, and, combined with historical fluctuation scales, perform reverse denoising on the initial reverse denoised data or the reverse denoised data obtained in the previous reverse iteration to obtain the reverse denoised data of the corresponding reverse iteration step, repeating the iteration until the maximum number of reverse iterations is reached, and using the final obtained reverse denoised data as the residual estimate.
[0009] According to the present invention, a method for predicting urban spatiotemporal probabilities using a collaborative deterministic and diffusion model includes: sampling the residual of the corresponding reverse iteration step from the target probability distribution and combining it with historical fluctuation scales to perform reverse denoising on the initial reverse denoised data or the reverse denoised data obtained from a previous reverse iteration, thereby obtaining the reverse denoised data for the corresponding reverse iteration step. The method comprises: predicting the denoised noise for the corresponding reverse iteration step based on the initial reverse denoised data or the reverse denoised data obtained from a previous reverse iteration; sampling the residual of the corresponding reverse iteration step from the target probability distribution and determining the mean of the conditional probability distribution based on historical fluctuation scales, denoised noise, and the initial reverse denoised data or the reverse denoised data obtained from a previous reverse iteration; determining the noise scheduling parameters for the corresponding iteration step based on the noise scheduling parameter sequence during the forward iteration denoising process, thereby obtaining the variance of the conditional probability distribution; wherein the noise scheduling parameter sequence is used to characterize the noise intensity added to the corresponding iteration step during the forward iteration denoising process; and obtaining the reverse denoised data for the current iteration step based on the denoised noise, the mean of the conditional probability distribution, and the variance of the conditional probability distribution.
[0010] According to the present invention, a method for predicting urban spatiotemporal probabilistics using a collaborative deterministic and diffusion model includes inputting difference estimates and historical fluctuation scales into a residual prediction model to be trained. The difference estimates are then iteratively annotated using the historical fluctuation scales to obtain a noisy residual. The method comprises: inputting difference estimates and historical fluctuation scales into a residual prediction model to be trained; combining the historical fluctuation scales with a preset forward annotation strategy to iteratively annotate the difference estimates to obtain a noisy residual; wherein the forward annotation strategy is used to: for each forward iteration, sample the annotated noise corresponding to the forward iteration step from the standard normal distribution N(0, I), and, in conjunction with the historical fluctuation scales, annotate the initially input historical fluctuation scales or the annotated data obtained in the previous forward iteration to obtain the annotated data corresponding to the forward iteration step; repeating the iteration until the maximum number of forward iterations is reached; and using the final annotated data as the noisy residual.
[0011] According to the present invention, a method for predicting urban spatiotemporal probabilistics using a collaborative deterministic and diffusion model is provided. This method performs adaptive scaling quantization on urban spatiotemporal traffic data to obtain a fluctuation scale. The steps include: quantizing the fluctuation degree of different regional locations using Fast Fourier Transform based on the urban spatiotemporal traffic data to obtain the amplitude and phase of the frequency corresponding to each regional location; determining the residual signal components corresponding to each time point within the target time period based on the amplitude and phase of each frequency, combined with the corresponding conjugate frequency components; determining the variance of the residual sequence corresponding to each regional location based on the residual signal components corresponding to each time point; and obtaining the fluctuation scale based on the variance of the residual sequence corresponding to each regional location, combined with a random symbolic tensor. Each element in the random symbolic tensor is sampled from a Bernoulli distribution according to the target parameters.
[0012] According to the present invention, a method for predicting urban spatiotemporal probabilistics using a collaborative deterministic and diffusion model includes the following steps before inputting urban spatiotemporal traffic data into a mean prediction model: acquiring historical spatiotemporal traffic data and the corresponding ground mean data; for each iteration, inputting the historical spatiotemporal traffic data into the mean prediction model to be trained to obtain a mean prediction result; constructing a second loss function based on the mean prediction result and the corresponding ground mean data of the historical spatiotemporal traffic data, and performing backpropagation gradient updates on the mean prediction model to be trained based on the second loss function, and iterating again until a preset number of iterations is reached, at which point training ends.
[0013] This invention also provides a city spatiotemporal probability prediction device using a collaborative deterministic and diffusion model, comprising: a data acquisition module for acquiring city spatiotemporal flow data; wherein the city spatiotemporal flow data is used to characterize flow observation or measurement data for target attributes at target time and different locations in the city; a mean prediction module for inputting the city spatiotemporal flow data into a mean prediction model to obtain the predicted mean output by the mean prediction model; wherein the mean prediction model is first trained based on historical spatiotemporal flow data and the corresponding true mean data of historical spatiotemporal flow data; and a scaling module for scaling the city spatiotemporal flow data. The data undergoes adaptive scaling quantization to obtain the fluctuation scale. The residual prediction module, based on urban spatiotemporal traffic data, combines the residual prediction model and the fluctuation scale to obtain the prediction residual output by the residual prediction model. The residual prediction model is trained by positively adding noise to the difference estimate and negatively denoising it with historical spatiotemporal traffic data. The difference estimate is based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data. The probability prediction module obtains the spatiotemporal probability prediction result based on the prediction mean and the prediction residual.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the urban spatiotemporal probability prediction method of any of the above-described cooperative deterministic and diffusion models.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for predicting urban spatiotemporal probabilities using a cooperative deterministic and diffusion model as described above.
[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the urban spatiotemporal probability prediction method of any of the above-described cooperative deterministic and diffusion models.
[0017] This invention provides a method and apparatus for urban spatiotemporal probability prediction using a collaborative deterministic and diffusion model. By acquiring urban spatiotemporal traffic data and utilizing a mean prediction model, it captures macroscopic trends such as major trends and periodic patterns, thereby accurately predicting the mean and stabilizing the entire prediction process. This results in a more regular residual distribution. Furthermore, the invention employs adaptive scaling quantization of the urban spatiotemporal traffic data to predict a relative value with respect to the current level of fluctuation, which is then input into the mean prediction model. This makes the residual prediction model more sensitive and robust to changes in data under different states, avoiding instability or prediction failure caused by excessive fluctuations in certain regions or time periods. By using the residual prediction model to predict urban spatiotemporal traffic data, it accurately characterizes the complex characteristics of residuals, such as non-Gaussian and multimodal nature, improving the accuracy of residual prediction. Finally, by integrating the predicted mean and predicted residuals, a complete probability distribution is obtained, more realistically reflecting future uncertainties and providing users with a clear understanding of the risks associated with the prediction results. Additionally, by decomposing the complex probability prediction problem into two sub-problems—mean prediction and residual prediction—the problem is simplified and its dimensionality reduced. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is one of the flowcharts illustrating the urban spatiotemporal probability prediction method using the collaborative deterministic and diffusion model provided by this invention. Figure 2 This is the second flowchart illustrating the urban spatiotemporal probability prediction method using the collaborative deterministic and diffusion model provided by this invention. Figure 3 This is a schematic diagram of the urban spatiotemporal probability prediction device based on the collaborative deterministic and diffusion model provided by the present invention. Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0021] Figure 1 This is one of the flowcharts illustrating the urban spatiotemporal probability prediction method using the collaborative deterministic and diffusion models provided by this invention, such as... Figure 1 As shown, the method includes the following: S11, acquire urban spatiotemporal traffic data; where urban spatiotemporal traffic data is used to characterize the traffic observation or measurement data of target attributes at target time and different locations in the city; S12, input the urban spatiotemporal traffic data into the mean prediction model to obtain the predicted mean output by the mean prediction model; wherein, the mean prediction model is first trained based on historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data. S13, adaptive scaling quantization is performed on urban spatiotemporal flow data to obtain the fluctuation scale; S14. Based on urban spatiotemporal traffic data, combined with the residual prediction model and fluctuation scale, the predicted residual output by the residual prediction model is obtained. The residual prediction model is obtained by positively adding noise to the difference estimate and negatively denoising it in combination with historical spatiotemporal traffic data. The difference estimate is based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data. S15. Based on the predicted mean and predicted residual, the spatiotemporal probability prediction results are obtained.
[0022] It should be noted that the step number "S1N" in this manual does not represent the sequential order of the urban spatiotemporal probability prediction methods of the cooperative deterministic and diffusion models. The following details will explain this in conjunction with... Figure 2 This invention describes a method for predicting urban spatiotemporal probabilistics using a collaborative deterministic and diffusion model.
[0023] Step S11: Obtain urban spatiotemporal traffic data; wherein, urban spatiotemporal traffic data is used to characterize the traffic observation or measurement data of target attributes at target time and different locations in the city.
[0024] It should be added that urban spatiotemporal traffic data includes traffic flow data, population movement flow data, and cellular network traffic data, and is represented as a multidimensional tensor. ,in, Represents the length of time in a time series. This represents the number of different observation areas, i.e., spatial dimensions. The number of representative features, which characterize the flow of the corresponding data, such as vehicle flow, pedestrian flow, or cellular network flow.
[0025] Furthermore, urban spatiotemporal traffic data includes grid data type and graph structure data type. For grid data type, the spatial dimension K can be represented in two-dimensional form. ,in and These represent the height and width of the grid, respectively; for graph-structured data types, spatial dimensions... This represents the number of nodes in a graph structure that reside in the same spatial topology, denoted as . ,in, This represents the set of all nodes in a graph-structured urban spatiotemporal traffic data. This represents the set of edges connecting all nodes. Representation diagram The adjacency matrix.
[0026] Step S12: Input the urban spatiotemporal traffic data into the mean prediction model to obtain the predicted mean output by the mean prediction model; wherein, the mean prediction model is first trained based on historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data.
[0027] In this embodiment, the urban spatiotemporal traffic data is input into the mean prediction model to obtain the predicted mean output by the mean prediction model. This includes: inputting the urban spatiotemporal traffic data into the mean prediction model to extract regional spatial features, temporal features, and traffic features respectively and fusing them to obtain fused features; and performing nonlinear transformation on the fused features using a multilayer perceptron (MLP) to determine the traffic mean at each regional location to obtain the predicted mean.
[0028] It should be added that the mean prediction model can be selected based on the actual design requirements. For example, a deterministic model based on multilayer perceptron (MLP) (Spatio-Temporal Identity, or STID for short) can be selected. This model not only has good expressive ability to fit the main spatiotemporal patterns, but also has high computational efficiency, thereby avoiding a significant increase in training and inference costs. No further restrictions are made here.
[0029] In an optional embodiment, before inputting urban spatiotemporal traffic data into the mean prediction model, the method includes: acquiring historical spatiotemporal traffic data and the corresponding true mean data; for each iteration, inputting historical spatiotemporal traffic data into the mean prediction model to be trained to obtain a mean prediction result; constructing a second loss function based on the mean prediction result and the corresponding true mean data of historical spatiotemporal traffic data, and performing backpropagation gradient updates on the mean prediction model to be trained based on the second loss function, and iterating again until a preset number of iterations is reached, at which point training ends.
[0030] Furthermore, the second loss function is expressed as: in, This represents the second loss function; This indicates the mean prediction result; Represents historical spatiotemporal flow data; This represents the true mean value of historical spatiotemporal flow data.
[0031] In addition, when training the mean prediction model, the number of pre-training rounds can be set according to the actual design requirements. For example, in order to effectively capture the main spatiotemporal patterns, the number of pre-training rounds can be 50 rounds. No further limitation is made here.
[0032] Step S13: Perform adaptive scaling quantization on the urban spatiotemporal flow data to obtain the fluctuation scale.
[0033] Specifically, for urban spatiotemporal traffic data, adaptive scaling quantization is performed to obtain the fluctuation scale, including: quantifying the fluctuation degree of different regional locations using Fast Fourier Transform based on urban spatiotemporal traffic data to obtain the amplitude and phase of the frequency corresponding to each regional location; determining the residual signal components corresponding to each time point within the target time period based on the amplitude and phase of each frequency, combined with the corresponding conjugate frequency components; determining the variance of the residual sequence corresponding to each regional location based on the residual signal components corresponding to each time point; and obtaining the fluctuation scale based on the variance of the residual sequence corresponding to each regional location, combined with a random symbol tensor; wherein each element in the random symbol tensor is sampled from the Bernoulli distribution according to the target parameters.
[0034] It should be added that the target parameter can be sampled according to actual sampling requirements, such as 0.5, without further limitation here.
[0035] Furthermore, the amplitude and phase of the frequencies corresponding to each region are expressed as follows: in, Indicates the location of historical spatiotemporal flow data k Training data at the location The first one obtained by applying Fast Fourier Transform (FFT) The amplitude of each frequency component; Indicates the corresponding number The phase of each frequency component.
[0036] The residual signal components corresponding to each time point within the target time period are represented as follows: in, Indicates a point in time i The corresponding residual signal components; Indicates the corresponding to the first w The frequency of each component; and The conjugate frequency components are represented, obtained based on the corresponding frequency and phase, respectively. The set of indices representing the selected residual frequency components; Indicates the time series length of historical spatiotemporal flow data; Represents the maximum amplitude among all amplitudes, through Obtained by function.
[0037] It should be noted that for urban spatiotemporal traffic data, the residual distribution shows significant differences at different time points. For example, the fluctuation is smaller at night and larger during the day, and the uncertainty between weekdays and weekends is also different. Therefore, in order to effectively model this dynamic change pattern, time point information is introduced into the model as a condition variable to perform time-series residual modeling.
[0038] The variance of the residual sequence corresponding to each region location needs to be expanded in shape to match the residual tensor. The shape, in which This indicates the size of each batch, and P represents the prediction time step.
[0039] Accordingly, the variance is expressed as: in, This represents the variance of the residual sequence corresponding to region location k. .
[0040] The fluctuation scale is represented as: in, Indicates the scale of fluctuation; Represents a random symbol tensor.
[0041] It should be noted that residual fluctuations are bidirectional, including both positive and negative fluctuations.
[0042] To model this property, a randomized symbolic tensor is introduced. The corresponding fluctuation scale Q is obtained, and the fluctuation scale Q is used as the input of the residual prediction model to model the spatial differences in the residuals, so as to perform spatial residual modeling.
[0043] Furthermore, the residual distribution of urban spatiotemporal traffic data exhibits certain spatial patterns. For instance, in areas with frequent traffic accidents, data fluctuations are typically more pronounced and may trigger anomalous changes in adjacent areas, thus affecting the distribution characteristics. To effectively model this spatial dependence, a Q-factor is introduced into the residual prediction model to learn a unique spatial embedding representation for each region. Simultaneously, a scale-aware diffusion process is proposed to quantify the heterogeneity characteristics between regions, thereby enhancing the model's ability to distinguish the spatial fluctuation amplitude and achieving spatial residual modeling.
[0044] Step S14: Based on the urban spatiotemporal traffic data, combined with the residual prediction model and fluctuation scale, the predicted residual output by the residual prediction model is obtained; wherein, the residual prediction model is obtained by positively adding noise to the difference estimate and negatively denoising it in combination with historical spatiotemporal traffic data. The difference estimate is obtained based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data.
[0045] It should be noted that, based on urban spatiotemporal traffic data, combined with the residual prediction model and fluctuation scale, the predicted residuals output by the residual prediction model can be obtained by referring to the reverse iterative denoising process described below, which will not be repeated here.
[0046] In one optional embodiment, before inputting urban spatiotemporal traffic data into the residual prediction model, the method includes: freezing the parameters of the trained mean prediction model and inputting historical spatiotemporal traffic data into the parameter-frozen mean prediction model to obtain the corresponding mean estimate; obtaining the difference estimate based on the mean estimate and the true mean data corresponding to the historical spatiotemporal traffic data; performing adaptive scaling quantization on the historical spatiotemporal traffic data to obtain the historical fluctuation scale; inputting the difference estimate and the historical fluctuation scale into the residual prediction model to be trained, and combining the historical fluctuation scale to perform forward iterative noise addition on the difference estimate to obtain a noisy residual; performing backward iterative denoising based on the noisy residual and the historical spatiotemporal traffic data, combined with the target probability distribution determined based on the historical fluctuation scale, to obtain the residual estimate; constructing a first loss function based on the initial noise added during forward iterative noise addition and the final noise removed during backward iterative denoising, and converging based on the first loss function to end the training.
[0047] It should be added that when constructing the first loss function, it is also possible to combine it with the third loss function to construct the total loss function, so that the training ends when the total loss function converges. The third loss function can be constructed based on the residual estimate and the difference estimate.
[0048] Furthermore, the first loss function is expressed as: in, Represents the first loss function; This represents the initial noise added during the forward iterative noise addition, which is the initial forward iteration step of the forward iterative noise addition, and the noise added is sampled from the standard normal distribution N(0, I). This represents the noise that is denoised at the end of the reverse iterative denoising process. It is the denoised noise predicted in the last reverse iteration step of the reverse iterative denoising process. For details, please refer to the following text, which will not be repeated here.
[0049] Specifically, the difference estimate and historical fluctuation scale are input into the residual prediction model to be trained. The difference estimate is then subjected to forward iterative noise addition in combination with the historical fluctuation scale to obtain a noisy residual. This includes: inputting the difference estimate and historical fluctuation scale into the residual prediction model to be trained, and then performing forward iterative noise addition on the difference estimate in combination with the historical fluctuation scale according to a preset forward noise addition strategy to obtain a noisy residual. The forward noise addition strategy is used to: sample the noise added for the corresponding forward iteration step from the standard normal distribution N(0, I) for each forward iteration, and combine it with the historical fluctuation scale to perform forward noise addition on the initial input historical fluctuation scale or the forward noise added data obtained in the previous forward iteration to obtain the forward noise added data for the corresponding forward iteration step. This process is repeated until the maximum number of forward iterations is reached, and the final obtained forward noise added data is used as the noisy residual.
[0050] It should be added that, in order to further model the differences in residual distribution across regions, the forward iterative noise addition is represented as: in, This represents the positively noised data corresponding to the nth positive iteration step. n∈ [1, N ], N Indicates the maximum number of forward iterations; This represents the positively denoised data corresponding to the previous iteration step n-1, in the initial positive iteration denoising state; This represents the cumulative parameter of signal retention in step n. , This represents the trade-off parameter between signal fidelity and noise ratio in step n. , The noise scheduling parameters can be represented by a sequence of noise scheduling parameters. Once the corresponding iteration step is determined, the noise scheduling parameter sequence is used to characterize the noise intensity added during the forward iteration noise addition process, and it is an increasing sequence that can be configured in advance according to the actual required noise level and evolution mode. The scale of historical fluctuations can be obtained in the same way as described above, and no further limitations are made here; This represents the noise added during the forward iteration, which follows a standard normal distribution N(0, I).
[0051] It should be added that when n=1, Historical spatiotemporal flow data as the initial input .
[0052] In addition, based on the denoised residual and historical spatiotemporal flow data, and combined with the target probability distribution determined based on historical fluctuation scale, reverse iterative denoising is performed to obtain residual estimation. This includes: concatenating the denoised residual and historical spatiotemporal flow data as initial reverse denoised data, and performing reverse iterative denoising according to a preset iterative denoising strategy to obtain residual estimation; wherein, the preset iterative denoising strategy is used to: for each reverse iteration, sample the residual of the corresponding reverse iteration step from the target probability distribution, and combine it with the historical fluctuation scale to perform reverse denoising on the initial reverse denoised data or the reverse denoised data obtained in the previous reverse iteration to obtain the reverse denoised data of the corresponding reverse iteration step, repeat the iteration until the maximum number of reverse iterations is reached, and use the finally obtained reverse denoised data as residual estimation.
[0053] Furthermore, sampling the residual of the corresponding reverse iteration step from the target probability distribution and combining it with historical fluctuation scales, reverse denoising is performed on the initial reverse denoised data or the reverse denoised data obtained in the previous reverse iteration to obtain the reverse denoised data for the corresponding reverse iteration step. This includes: predicting the denoised noise for the corresponding reverse iteration step based on the initial reverse denoised data or the reverse denoised data obtained in the previous reverse iteration; sampling the residual of the corresponding reverse iteration step from the target probability distribution and determining the mean of the conditional probability distribution based on historical fluctuation scales, denoised noise, and the initial reverse denoised data or the reverse denoised data obtained in the previous reverse iteration; determining the noise scheduling parameters for the corresponding iteration step based on the noise scheduling parameter sequence during the forward iteration noise addition process to obtain the variance of the conditional probability distribution; wherein, the noise scheduling parameter sequence is used to characterize the noise intensity added to the corresponding iteration step during the forward iteration noise addition process; and obtaining the reverse denoised data for the current iteration step based on the denoised noise, the mean of the conditional probability distribution, and the variance of the conditional probability distribution.
[0054] It should be added that by determining the target probability distribution based on historical fluctuation scales, residual learning can be conditionally optimized. It possesses regional specificity.
[0055] Accordingly, the target probability distribution is expressed as: in, This represents the positively denoised data obtained from the forward iterative denoising process, i.e., the denoised residual.
[0056] Furthermore, reverse iterative denoising is expressed as: in, This represents the reverse denoising data obtained in the (n-1)th reverse iteration step; This represents the reverse denoising data obtained in the nth reverse iteration step; It represents the mean of the conditional probability distribution; Represents the variance of the conditional probability distribution; This indicates noise reduction.
[0057] It should be added that when n=N, The noisy residual corresponding to the initial reverse iteration step .
[0058] Furthermore, the mean of the conditional probability distribution is expressed as: The variance of a conditional probability distribution can be: It should be added that, during the reverse process, the residuals corresponding to the reverse iteration steps are sampled from the model's target probability distribution, and noise is gradually removed based on historical data. This process can be defined as a Markov process, i.e.: It is worth noting that since urban spatiotemporal traffic data contains both major spatiotemporal patterns and random disturbances, the spatiotemporal probability prediction results can be decomposed into prediction mean and prediction residuals using the aforementioned modeling framework based on mean and residual decoupling.
[0059] Since the residual distribution of urban spatiotemporal traffic data is neither independent and identically distributed nor follows a fixed distribution form (such as N(0,1)), it usually exhibits complex spatiotemporal dependencies and heterogeneity. Therefore, both temporal residual modeling and spatial residual modeling need to be considered in the modeling process. For details, please refer to the above text, which will not be repeated here.
[0060] Furthermore, factors such as sudden weather changes and public events can further lead to real-time variations in the residual distribution. Therefore, time-series residual modeling incorporates historical spatiotemporal flow data. With noise residual Concatenation can be used as input for inverse denoising or as input for the residual prediction model during application, thereby more effectively preserving conditional information during the training and inference of the residual prediction model. No noise is added.
[0061] Step S15: Obtain the spatiotemporal probability prediction result based on the predicted mean and predicted residual.
[0062] It should be added that the spatiotemporal probability prediction results are expressed as follows: in, This represents the spatiotemporal probability prediction result; This represents the predicted mean; This represents the predicted residual.
[0063] Accordingly, Represented as: In one alternative embodiment, experiments were conducted on five real-world datasets across four main categories during the specific validation process. These datasets have different spatiotemporal granularities and cover pedestrian traffic data (CrowdBJ), cellular network traffic data (CellularSH), vehicle traffic data (TaxiBJ and BikeDC), and traffic speed data (Los-Speed). Detailed descriptions of these datasets are shown in the table below.
[0064] Dataset City Time period Spatial division Time interval TaxiBJ Beijing 2014 / 03 / 01 - 2014 / 06 / 30 32 × 32 0.5 hours BikeDC Washington 2010 / 09 / 20 - 2010 / 10 / 20 20 × 20 0.5 hours CellularSH Shanghai 2014 / 08 / 01 - 2014 / 08 / 21 32 × 28 1 hour CrowdBJ Beijing 2018 / 01 / 01 - 2018 / 01 / 31 1010 1 hour Los-Speed Los Angeles 2012 / 03 / 01 - 2012 / 03 / 07 207 5 minutes Six widely accepted and representative probabilistic prediction models in the spatiotemporal domain were selected, including Dynamic Denoising Diffusion Variational Autoencoder (D3VAE), Spatiotemporal Graph Diffusion Model (DiffSTG), Time Grad, Conditional Spatial Diffusion Model (CSDI), Dynamic Diffusion Model (Dyffusion), and Neural Process Diffusion Model (NPDiff). Since some datasets have a grid structure, adjacency matrices were constructed based on their adjacency relationships to support baseline models with dependent graph structures. The final results were evaluated using three probabilistic metrics: Continuous Ranked Probability Score (CRPS), Quantile Interval Coverage Error (QICE), and Interval Score (IS). For QICE, the number of QI (Quantile Intervals) was set to 10, denoted as 𝑀QIs = 10; for IS, a confidence level of 90% was chosen, i.e., 𝛼 = 0.1.
[0065] Ultimately, this invention achieved optimal results on four datasets. The best results of various baseline models and the results of this invention's CoST are recorded in the table below.
[0066] In summary, this invention acquires urban spatiotemporal traffic data and utilizes a mean prediction model to capture macroscopic trends such as major trends and periodic patterns, thereby accurately predicting the mean and stabilizing the entire prediction process. This results in a more regular residual distribution. Furthermore, the invention performs adaptive scaling quantization on the urban spatiotemporal traffic data to predict a relative value with respect to the current level of fluctuation, which is then input into the mean prediction model. This makes the residual prediction model more sensitive and robust to changes in data under different conditions, avoiding instability or prediction failure caused by excessive fluctuations in certain regions or time periods. By using the residual prediction model to predict urban spatiotemporal traffic data, the invention accurately characterizes the complex characteristics of residuals, such as non-Gaussian and multimodal nature, improving the accuracy of residual prediction. Finally, by integrating the predicted mean and predicted residuals, a complete probability distribution is obtained, more realistically reflecting future uncertainties and providing users with a clear understanding of the risks associated with the prediction results. Additionally, by decomposing the complex probability prediction problem into two sub-problems—mean prediction and residual prediction—the problem is simplified and dimensionality reduced.
[0067] The urban spatiotemporal probability prediction device based on the cooperative deterministic and diffusion model provided by the present invention is described below. The urban spatiotemporal probability prediction device based on the cooperative deterministic and diffusion model described below can be referred to in correspondence with the urban spatiotemporal probability prediction method based on the cooperative deterministic and diffusion model described above.
[0068] Figure 3 A schematic diagram of a spatiotemporal probability prediction device for cities based on a cooperative deterministic and diffusion model is shown. The device includes: The data acquisition module 31 acquires urban spatiotemporal flow data; wherein, urban spatiotemporal flow data is used to characterize the flow observation or measurement data of target attributes at target time and different locations in the city; The mean prediction module 32 inputs urban spatiotemporal traffic data into the mean prediction model to obtain the predicted mean output by the mean prediction model; wherein, the mean prediction model is first trained based on historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data; The scaling module 33 performs adaptive scaling on urban spatiotemporal flow data to obtain the fluctuation scale; The residual prediction module 34, based on urban spatiotemporal traffic data, combines the residual prediction model and fluctuation scale to obtain the predicted residual output by the residual prediction model. The residual prediction model is obtained by positively adding noise to the difference estimate and negatively denoising it in combination with historical spatiotemporal traffic data. The difference estimate is based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data. The probability prediction module 35 obtains the spatiotemporal probability prediction results based on the prediction mean and prediction residual.
[0069] It should be noted that the specific principles of the embodiments of the present invention are the same as those of the method embodiments described above. For details, please refer to the method embodiments above. More detailed explanations will not be repeated here.
[0070] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communications bus 440. The processor 410 can call logic instructions in the memory 430 to execute a city spatiotemporal probability prediction method based on a cooperative deterministic and diffusion model. This method includes: acquiring city spatiotemporal traffic data; wherein the city spatiotemporal traffic data is used to characterize traffic observation or measurement data for target attributes at target times and different locations within the city; inputting the city spatiotemporal traffic data into a mean prediction model to obtain the predicted mean output by the mean prediction model; wherein the mean prediction model is first trained based on historical spatiotemporal traffic data and the corresponding true mean data of the historical spatiotemporal traffic data; performing adaptive scaling quantization on the city spatiotemporal traffic data to obtain a fluctuation scale; based on the city spatiotemporal traffic data, combining a residual prediction model and the fluctuation scale, obtaining the predicted residual output by the residual prediction model; wherein the residual prediction model is trained by positively adding noise to the difference estimate and negatively denoising it using historical spatiotemporal traffic data, the difference estimate being based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the corresponding true mean data of the historical spatiotemporal traffic data; and obtaining the spatiotemporal probability prediction result based on the predicted mean and the predicted residual.
[0071] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0072] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the urban spatiotemporal probability prediction method of the cooperative deterministic and diffusion model provided by the above methods. The method includes: acquiring urban spatiotemporal traffic data; wherein, the urban spatiotemporal traffic data is used to characterize the traffic observation or measurement data of target attributes at target time and different regional locations in the city; inputting the urban spatiotemporal traffic data into a mean prediction model to obtain the predicted mean output by the mean prediction model; wherein, the mean prediction model is based on a prior... The model is trained using historical spatiotemporal traffic data and the corresponding true mean values. Adaptive scaling is applied to the urban spatiotemporal traffic data to obtain the fluctuation scale. Based on the urban spatiotemporal traffic data, combined with the residual prediction model and the fluctuation scale, the predicted residuals output by the residual prediction model are obtained. The residual prediction model is trained by positively adding noise to the difference estimate and then negatively denoising it using historical spatiotemporal traffic data. The difference estimate is based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the corresponding true mean values. The spatiotemporal probability prediction result is obtained based on the predicted mean and the predicted residuals.
[0073] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for predicting urban spatiotemporal probabilistic models using the cooperative deterministic and diffusion models provided by the methods described above. This method includes: acquiring urban spatiotemporal traffic data; wherein the urban spatiotemporal traffic data is used to characterize traffic observation or measurement data for target attributes at target times and locations in different areas of the city; inputting the urban spatiotemporal traffic data into a mean prediction model to obtain a predicted mean output by the mean prediction model; wherein the mean prediction model is based on historical spatiotemporal traffic data and historical spatiotemporal flow... The data is trained using the mean and true values of the quantitative data. For urban spatiotemporal traffic data, adaptive scaling is performed to obtain the fluctuation scale. Based on the urban spatiotemporal traffic data, combined with the residual prediction model and the fluctuation scale, the prediction residual output by the residual prediction model is obtained. The residual prediction model is trained by positively adding noise to the difference estimate and then negatively denoising it using historical spatiotemporal traffic data. The difference estimate is based on the mean estimate obtained by using the mean prediction model to predict the mean of historical spatiotemporal traffic data and the corresponding mean and true values of the historical spatiotemporal traffic data. Based on the predicted mean and prediction residual, the spatiotemporal probability prediction result is obtained.
[0074] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0075] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting urban spatiotemporal probabilistics using a collaborative deterministic and diffusion model, characterized in that, include: Acquire urban spatiotemporal traffic data; wherein, the urban spatiotemporal traffic data is used to characterize the traffic observation or measurement data of target attributes at target time and different locations in the city; The urban spatiotemporal traffic data is input into the mean prediction model to obtain the predicted mean output by the mean prediction model; wherein, the mean prediction model is first trained based on historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data; The urban spatiotemporal traffic data is subjected to adaptive scaling quantization to obtain the fluctuation scale; Based on the urban spatiotemporal traffic data, combined with the residual prediction model and the fluctuation scale, the predicted residual output by the residual prediction model is obtained; wherein, the residual prediction model is obtained by positively adding noise to the difference estimate and negatively denoising it in combination with the historical spatiotemporal traffic data, and the difference estimate is based on the mean estimate obtained by using the mean prediction model to predict the mean of the historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data; Based on the predicted mean and the predicted residual, the spatiotemporal probability prediction result is obtained.
2. The urban spatiotemporal probability prediction method based on the collaborative deterministic and diffusion model according to claim 1, characterized in that, Before inputting the urban spatiotemporal traffic data into the residual prediction model, the following steps are included: The parameters of the trained mean prediction model are frozen, and historical spatiotemporal flow data are input into the mean prediction model after parameter freezing to obtain the corresponding mean estimate. Based on the mean estimate and the true mean data corresponding to the historical spatiotemporal flow data, the difference estimate is obtained; Adaptive scaling quantization is performed on the historical spatiotemporal flow data to obtain the historical fluctuation scale; The difference estimate and the historical fluctuation scale are input into the residual prediction model to be trained, so as to combine the historical fluctuation scale and perform positive iterative noise addition on the difference estimate to obtain the noisy residual. Based on the denoised residual and the historical spatiotemporal flow data, and combined with the target probability distribution determined based on the historical fluctuation scale, reverse iterative denoising is performed to obtain the residual estimate; Based on the initial noise added during forward iteration and the final noise removed during reverse iteration, a first loss function is constructed, and training ends when the first loss function converges.
3. The urban spatiotemporal probability prediction method based on the collaborative deterministic and diffusion model according to claim 2, characterized in that, Based on the noisy residual and the historical spatiotemporal flow data, and combined with the target probability distribution determined based on the historical fluctuation scale, reverse iterative denoising is performed to obtain the residual estimate, including: The noisy residual and the historical spatiotemporal traffic data are concatenated to form the initial reverse denoising data, and reverse iterative denoising is performed according to a preset iterative denoising strategy to obtain the residual estimate; wherein, the preset iterative denoising strategy is used for: For each backward iteration, the residual of the corresponding backward iteration step is sampled from the target probability distribution, and combined with the historical fluctuation scale, the initial backward denoised data or the backward denoised data obtained in the previous backward iteration is reverse denoised to obtain the backward denoised data of the corresponding backward iteration step. The iteration is repeated until the maximum number of backward iterations is reached, and the final reverse denoised data is used as the residual estimate.
4. The urban spatiotemporal probability prediction method based on the collaborative deterministic and diffusion model according to claim 3, characterized in that, The residuals corresponding to the reverse iteration step are sampled from the target probability distribution, and combined with the historical fluctuation scale, the initial reverse denoised data or the reverse denoised data obtained from the previous reverse iteration is reverse denoised to obtain the reverse denoised data corresponding to the reverse iteration step, including: Based on the initial reverse denoising data or the reverse denoising data obtained in the previous reverse iteration, predict the denoising noise for the corresponding reverse iteration step; The residual of the corresponding reverse iteration step is sampled from the target probability distribution, and the mean of the conditional probability distribution is determined by combining the historical fluctuation scale, the denoised noise, and the initial reverse denoised data or the reverse denoised data obtained in the previous reverse iteration. Based on the noise scheduling parameter sequence during the forward iterative noise addition process, the noise scheduling parameters for the corresponding iteration step are determined, and the variance of the conditional probability distribution is obtained; wherein, the noise scheduling parameter sequence is used to characterize the noise intensity added to the corresponding iteration step during the forward iterative noise addition process. Based on the denoised noise, the mean of the conditional probability distribution, and the variance of the conditional probability distribution, the reverse denoised data for the current iteration step is obtained.
5. The urban spatiotemporal probability prediction method based on the collaborative deterministic and diffusion model according to claim 2, characterized in that, The difference estimate and the historical fluctuation scale are input into the residual prediction model to be trained. The difference estimate is then subjected to forward iterative noise addition, incorporating the historical fluctuation scale, to obtain a noisy residual. This process includes: The difference estimate and the historical fluctuation scale are input into the residual prediction model to be trained. Based on the historical fluctuation scale, a preset forward noise-adding strategy is used to perform forward iterative noise addition on the difference estimate, resulting in a noisy residual. The forward noise-adding strategy is used for: For each forward iteration, the noise corresponding to the forward iteration step is sampled from the standard normal distribution N(0, I), and combined with the historical fluctuation scale, the historical fluctuation scale of the initial input or the forward noise data obtained in the previous forward iteration is forward noise-added to obtain the forward noise data corresponding to the forward iteration step. The iteration is repeated until the maximum number of forward iterations is reached, and the final forward noise-added data is used as the noise-added residual.
6. The urban spatiotemporal probability prediction method according to claim 1 using a collaborative deterministic and diffusion model, characterized in that, The urban spatiotemporal traffic data is subjected to adaptive scaling quantization to obtain the fluctuation scale, including: Based on the urban spatiotemporal traffic data, the fluctuation degree of different regional locations is quantified using fast Fourier transform to obtain the amplitude and phase of the frequency corresponding to each regional location. Based on the amplitude and phase of each frequency, and combined with the corresponding conjugate frequency components, the residual signal components corresponding to each time point within the target time period are determined. Based on the residual signal components corresponding to each time point, determine the variance of the residual sequence corresponding to each of the aforementioned regional locations; The fluctuation scale is obtained by combining the variance of the residual sequence corresponding to each of the aforementioned regions with a random symbolic tensor; wherein each element in the random symbolic tensor is sampled from a Bernoulli distribution according to the target parameter.
7. The urban spatiotemporal probability prediction method according to claim 1 using a collaborative deterministic and diffusion model, characterized in that, Before inputting the urban spatiotemporal traffic data into the mean prediction model, the following steps are included: Obtain historical spatiotemporal flow data and the corresponding mean true value data of the historical spatiotemporal flow data; For each iteration, the historical spatiotemporal traffic data is input into the mean prediction model to be trained to obtain the mean prediction result; Based on the mean prediction results and the true mean data corresponding to the historical spatiotemporal traffic data, a second loss function is constructed, and the mean prediction model to be trained is updated by back gradient based on the second loss function. The model is then iterated again until the preset number of iterations is reached, at which point the training ends.
8. A spatiotemporal probability prediction device for cities using a collaborative deterministic and diffusion model, characterized in that, include: The data acquisition module acquires urban spatiotemporal traffic data; wherein, the urban spatiotemporal traffic data is used to characterize the traffic observation or measurement data of target attributes at target time and different locations in the city; The mean prediction module inputs the urban spatiotemporal traffic data into the mean prediction model to obtain the predicted mean output by the mean prediction model; wherein, the mean prediction model is first trained based on historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data; The scale quantization module performs adaptive scale quantization on the urban spatiotemporal flow data to obtain the fluctuation scale; The residual prediction module, based on the urban spatiotemporal traffic data, combines the residual prediction model and the fluctuation scale to obtain the predicted residual output by the residual prediction model; wherein, the residual prediction model is obtained by positively adding noise to the difference estimate and negatively denoising it in combination with the historical spatiotemporal traffic data, and the difference estimate is based on the mean estimate obtained by using the mean prediction model to predict the mean of the historical spatiotemporal traffic data and the true mean data corresponding to the historical spatiotemporal traffic data; The probability prediction module obtains the spatiotemporal probability prediction result based on the prediction mean and the prediction residual.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the urban spatiotemporal probability prediction method of the cooperative deterministic and diffusion model as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the urban spatiotemporal probability prediction method of the cooperative deterministic and diffusion model as described in any one of claims 1 to 7.