Urban state prediction method, device and equipment based on space-time correlation mining
Through the combination of spatiotemporal data learning model and meta-learning algorithm, the problem of insufficient data during large-scale activities is solved, and the accuracy and efficiency of prediction are improved, especially in sparse data areas.
Patent Information
- Application Number
- CN202510122174.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-06-06
AI Technical Summary
The existing urban status prediction technology has insufficient prediction accuracy due to insufficient data during large-scale activities, especially when responding to large-scale activities or emergencies in remote areas, the prediction accuracy is not high, resulting in insufficient emergency response.
Using a spatial and temporal correlation mining method, the spatial and temporal data learning model (STDLM) combined with the meta-learning algorithm MAML, the spatial and temporal data is probabilistic inference, and the hidden relationships between different time and space tasks in cities are learned and mined, which improves the efficiency of multi-task learning and overcomes the problem of sparse data distribution.
Improve the accuracy and efficiency of urban state prediction, especially in the prediction performance of rare events and sparse data areas, and enhance the correlation of multi-task learning and the adaptability of the model.
Smart Images

Figure CN120106276A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of deep learning, and further to the field of city state prediction, and in particular to a method, device and equipment for city state prediction based on spatiotemporal correlation mining. Background Art
[0002] City state prediction is of great significance to the sustainable development of cities and the improvement of residents' quality of life. At present, the accuracy of most city state prediction studies depends on sufficient regional data and regular and orderly time nodes. However, if the city holds large-scale events, such as shopping festivals, concerts, etc., insufficient data may lead to unpredictable or inaccurate prediction results during the event. For example, during the Double Eleven shopping festival, the surge in sales caused by promotional activities may cause network system crashes or offline physical supply chain chaos. Similar problems may also occur in remote areas. When these areas deal with large-scale events or emergencies, they will have obvious deficiencies in emergency response due to low prediction accuracy and lack of response experience.
[0003] In order to further achieve the refinement and efficiency of urban state prediction, this paper proposes a spatio-temporal-data learning model (STDLM) based on the natural structured spatiotemporal characteristics of urban vital signs and spatiotemporal data. First, STDLM uses a model-independent meta-learning algorithm MAML (Model-Agnostic Meta-Learning) to perform probabilistic reasoning on spatiotemporal data to improve the accuracy of probability estimation of rare time in spatiotemporal and sparse areas in space; then, refer to the structure shared by different spatiotemporal training tasks to learn and mine the hidden associations between different spatiotemporal tasks in the city, further improve the efficiency of multi-task learning and overcome the sparse data distribution problem of single-task learning; finally, amortized inference of different spatiotemporal tasks in the city is used to regularize them to adapt to the unified spatiotemporal distribution, which can map the training data samples to the parameterized approximate posterior distribution. Summary of the invention
[0004] The present invention provides a method, device and equipment for predicting city status based on spatiotemporal association mining, which solves the technical problem of how to improve the performance of city status prediction by using data from different spatiotemporal regions.
[0005] According to a first aspect of the present disclosure, a method for predicting city status based on spatiotemporal association mining is provided. The method comprises:
[0006] The city status monitoring task is split into different time zones and different space zones to obtain M time subtasks and N space subtasks, where the time subtask T = {t j|j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, where M and N are both positive integers greater than 1;
[0007] Define each subtask as a spatiotemporal task, and collect corresponding spatiotemporal data for each spatiotemporal task to form a spatiotemporal dataset D i , where i represents the index of the spatiotemporal task, and i is a positive integer greater than 1;
[0008] The spatiotemporal dataset D i The data is input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal region, wherein the state of the specific spatiotemporal region refers to the spatiotemporal data within a specified time and space range.
[0009] According to the aspects and any possible implementations described above, an implementation is further provided, wherein the spatiotemporal data learning model includes a data processing module, an amortized network, and a generation model.
[0010] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the method further includes:
[0011] Initialize the model parameters θ of the meta-learning model based on the spatiotemporal dataset D i The meta-learning model is trained to update the initial model parameters θ′ applicable to all subtasks;
[0012] Based on the data corresponding to the N spatial subtasks, the initial model parameters θ′ of the meta-learning model are updated again using the distribution estimation method to obtain the model shared parameters δ corresponding to all spatial subtasks s ;
[0013] Based on the data corresponding to the M time subtasks, the initial model parameters θ′ of the meta-learning model are updated again using the distribution estimation method to obtain the model shared parameters δ corresponding to all time subtasks t ;
[0014] For the space mission parameter δ s and the time task parameter δ t Fusion is performed to obtain the fused shared parameter δ s / t ;
[0015] Based on spatiotemporal dataset D i The shared parameter δ is estimated using the point estimation method. s / t Update again to obtain the specific spatiotemporal task parameter δ and the corresponding optimized meta-learning model.
[0016] According to the above aspects and any possible implementation, an implementation is further provided, wherein the amortized network and the generative model are trained by the following steps:
[0017] The data corresponding to the N spatial subtasks and the data corresponding to the M temporal subtasks are alternately selected based on the permutation and combination method to form a training data set;
[0018] The training data set is input into the optimized meta-learning model to obtain the approximate posterior estimated distribution p(δ i |D i ,δ s / t );
[0019] The approximate posterior estimated distribution p(δ i |D i ,δ s / t ) is input into a neural network amortization model, and the neural network amortization model is trained to obtain an amortized network with parameter φ;
[0020] Based on the specific spatiotemporal task parameters δ obtained from the amortized network i and the shared parameter δ s / t , build a generative model.
[0021] According to the above aspects and any possible implementation, a further implementation is provided, wherein the spatiotemporal dataset D i Input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal area in the future city includes:
[0022] Based on the data processing module, the spatiotemporal data set D i Performing data processing to obtain preprocessed data, wherein the data processing module includes a linear component, a skip-LSTM module, a first fully connected layer including a feature fusion component, and a second fully connected layer;
[0023] The preprocessed data is input into an amortized network with parameter φ to obtain a specific spatiotemporal representation φ corresponding to the input spatiotemporal task i The approximate posterior distribution of :
[0024]
[0025] The approximate posterior distribution and the preprocessed data are input into a matrix with shared parameters δ s / t In the generative model, the state of specific spatiotemporal areas in the future city is predicted.
[0026] According to the above aspects and any possible implementation, a further implementation is provided, wherein the data processing module processes the spatiotemporal data set D i Perform data processing to obtain preprocessed data including:
[0027] Get the spatiotemporal dataset D i The data corresponding to the M time subtasks in the linear component are linearly analyzed on the historical time series therein, a specific target value is estimated, and the estimation result is input into the first fully connected layer;
[0028] Get the spatiotemporal dataset D i The data corresponding to the M time subtasks in the skip-LSTM module are extracted at different time intervals from the historical time series, the periodic pattern in the historical time series is learned, and the obtained time features are input into the second fully connected layer for processing;
[0029] The time features processed by the second fully connected layer are further used to extract temporal dependencies through the LSTM layer, and the extracted results are input into the first fully connected layer;
[0030] Get the spatiotemporal dataset D i The spatial features in the data corresponding to the N spatial subtasks in the spatial subtasks are input into the first fully connected layer;
[0031] Based on the feature fusion component, feature fusion is performed on the data received by the first fully connected layer to obtain preprocessed data, and the preprocessed data is input into the amortized network and the generation model respectively.
[0032] According to the above aspects and any possible implementation, an implementation is further provided, wherein the preprocessed data is input into an amortized network with a parameter φ to obtain a specific spatiotemporal representation φ corresponding to the input spatiotemporal task. i The approximate posterior distribution of includes:
[0033] The preprocessed data is input into an amortized network with parameter φ, ST feature extraction and pooling operations are performed on the preprocessed data, and the pooled data is randomly sampled to generate the mean and variance of the spatiotemporal representation under a specific time and space, and finally a specific spatiotemporal representation φ corresponding to the input spatiotemporal task is obtained. i The approximate posterior distribution of :
[0034]
[0035] According to the second aspect of the present disclosure, a city state prediction device based on time-space association mining is provided. The device includes: a subtask division module for dividing the city state monitoring task according to different time zones and different space zones to obtain M time subtasks and N space subtasks, wherein the time subtask T = {t j |j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, where M and N are both positive integers greater than 1;
[0036] The data collection module is used to define each subtask as a spatiotemporal task and collect the corresponding spatiotemporal data for each spatiotemporal task to form a spatiotemporal dataset D i , where i represents the index of the spatiotemporal task, and i is a positive integer greater than 1;
[0037] The state prediction module is used to transform the spatiotemporal dataset D i The data is input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal region, wherein the state of the specific spatiotemporal region refers to the spatiotemporal data within a specified time and space range.
[0038] According to a third aspect of the present disclosure, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.
[0039] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method according to the first aspect and / or the second aspect of the present disclosure is implemented.
[0040] In the present disclosure, the city status monitoring task is firstly split into different time zones and different space zones to obtain M time subtasks and N space subtasks, where the time subtask T = {t j |j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, M and N are both positive integers greater than 1; secondly, each subtask is defined as a spatiotemporal task, and the corresponding spatiotemporal data are collected for each spatiotemporal task to form a spatiotemporal dataset D i , where i represents the index of the spatiotemporal task and i is a positive integer greater than 1; finally, the spatiotemporal dataset D iInput into the spatiotemporal data learning model to predict the state of a specific spatiotemporal region, where the state of a specific spatiotemporal region refers to the spatiotemporal data within a specified time and space range. In this way, the problem of the difficulty in accurately predicting the state of a city due to limited reference data and complex dynamic spatiotemporal can be solved, further realizing the refinement and efficiency of the city state prediction, and improving the accuracy of probability estimation of rare time in space and space and sparse areas in space.
[0041] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0043] Figure 1 A flow chart of a city state prediction method based on spatiotemporal association mining provided by an embodiment of the present disclosure is shown;
[0044] Figure 2 A structural diagram of a city state prediction device based on spatiotemporal association mining provided by an embodiment of the present disclosure is shown;
[0045] Figure 3 A structural diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0047] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0048] In the present disclosure, the city status monitoring task is firstly split into different time zones and different space zones to obtain M time subtasks and N space subtasks, where the time subtask T = {t j |j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, M and N are both positive integers greater than 1; secondly, each subtask is defined as a spatiotemporal task, and the corresponding spatiotemporal data are collected for each spatiotemporal task to form a spatiotemporal dataset D i , where i represents the index of the spatiotemporal task and i is a positive integer greater than 1; finally, the spatiotemporal dataset D i Input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal region, where the state of a specific spatiotemporal region refers to the spatiotemporal data within a specified time and space range. In this way, the problem of the difficulty in accurately predicting the state of a city due to limited reference data and complex dynamic spatiotemporal can be solved, further realizing the refinement and efficiency of the city state prediction, and improving the accuracy of probability estimation of rare time in space and space and sparse areas in space.
[0049] Figure 1 A flow chart of a city state prediction method based on spatiotemporal association mining provided by an embodiment of the present disclosure is shown. Figure 1 As shown, the city state prediction method 100 based on spatiotemporal association mining may include the following steps:
[0050] S110, splitting the city status monitoring task into different time zones and different space zones to obtain M time subtasks and N space subtasks, wherein the time subtask T={t j |j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, where M and N are both positive integers greater than 1.
[0051] In some embodiments, the spatiotemporal data learning model includes a data processing module, an amortized network, and a generation model.
[0052] For example, the distribution of urban data in different time zones and different spatial regions varies greatly. In view of this feature, the entire urban status monitoring task is divided into subtasks according to different time zones and different spatial regions. Each subtask can be defined as a spatiotemporal task, which includes N spatial regions and M time nodes (time nodes include weekdays, weekends, large-scale events and festivals, etc.).
[0053] For example, static spatial data features include relevant functional structural features in a spatial area after a specified time, such as traffic distribution, functional building distribution, and population distribution, etc., which can be obtained by Xq express.
[0054] For example, given a time window of fixed interval t, the dynamic time data is written according to the city state characteristics Where q = (s k ,t j ) represents a specific spatial area within a specified time interval of the city state.
[0055] Based on the above definition, the input of the spatiotemporal data learning model (STDLM model) is defined as a spatiotemporal task r = (s k ,t j ), the output can be defined as (X q ,Y q ), where X q Represents static spatial prediction data, Y q Represents dynamic time prediction data.
[0056] S120, define each subtask as a spatiotemporal task, and collect corresponding spatiotemporal data for each spatiotemporal task to form a spatiotemporal dataset D i , where i represents the index of the spatiotemporal task, and i is a positive integer greater than 1.
[0057] In some embodiments, the method further comprises:
[0058] Initialize the model parameters θ of the meta-learning model based on the spatiotemporal dataset D i The meta-learning model is trained to update the initial model parameters θ′ applicable to all subtasks;
[0059] Based on the data corresponding to the N spatial subtasks, the initial model parameters θ′ of the meta-learning model are updated again using the distribution estimation method to obtain the model shared parameters δ corresponding to all spatial subtasks s ;
[0060] Based on the data corresponding to the M time subtasks, the initial model parameters θ′ of the meta-learning model are updated again using the distribution estimation method to obtain the model shared parameters δ corresponding to all time subtasks t ;
[0061] For the space mission parameter δ s and the time task parameter δ t Fusion is performed to obtain the fused shared parameter δ s / t ;
[0062] Based on spatiotemporal dataset D i The shared parameter δ is estimated using the point estimation method. s / tUpdate again to obtain the specific spatiotemporal task parameter δ and the corresponding optimized meta-learning model.
[0063] In some embodiments, the amortized network and the generative model are trained by the following steps:
[0064] The data corresponding to the N spatial subtasks and the data corresponding to the M temporal subtasks are alternately selected based on the permutation and combination method to form a training data set;
[0065] The training data set is input into the optimized meta-learning model to obtain the approximate posterior estimated distribution p(δ i |D i ,δ s / t );
[0066] The approximate posterior estimated distribution p(δ i |D i ,δ s / t ) is input into a neural network amortization model, and the neural network amortization model is trained to obtain an amortized network with parameter φ;
[0067] Based on the specific spatiotemporal task parameters δ obtained from the amortized network i and the shared parameter δ s / t , build a generative model.
[0068] Exemplarily, based on the space mission parameter δ s and the time task parameter δ t , by grouping instances by corresponding spatial region t or temporal region s in spatiotemporal training, alternately selecting spatial or temporal views, and then sampling the training data. The sampled data is used to form the posterior estimated distribution and further calculate p(δ i |D i ,δ s / t ). By alternating between different views during the training process, hidden relationships can be established between different spatial regions or time types through shared parameters. Even if the amount of data in some spatial or temporal regions is limited, it can make up for the problem of insufficient model training caused by missing information to a certain extent. The shared statistical structure of space and time is integrated during the training process, and the model has a shared parameter δ s / t , the specific spatiotemporal task parameter δ is obtained, which improves the accuracy of the estimation.
[0069] For example, the dynamic time series data and static regional features of each spatiotemporal task are used as the input of the neural network amortization model, and the output is the mean and variance of the spatiotemporal representation of the input corresponding to a specific time and space, and finally a spatiotemporal representation φ of the spatiotemporal task related to the input is formed. iThen, the parameters of the neural network are optimized by training instead of maintaining M+N different sets of distributions of task-specific parameters to improve model efficiency.
[0070] For a specific spatiotemporal task, the quality of the approximate posterior distribution can be evaluated by the KL-divergence between the true spatiotemporal data distribution and the approximate posterior estimated distribution. In the case of limited data, an accurate approximation of the posterior estimated distribution of the unobserved spatiotemporal region is obtained, and the model learning goal is to minimize the expected value of the KL-divergence in different spatiotemporal tasks.
[0071] The approximate posterior distribution q for a specific spatiotemporal task φ (δ i |D i ) is modeled as an amortized network with parameters φ. Based on the specific spatiotemporal task parameters δ sampled from the amortized network i , using a shared parameter δ s / t The generative model predicts the future state of each spatial and temporal region of the city. The optimal parameters φ and δ will be obtained during the model training process. s / t , so that the approximate posterior distribution q φ (δ i |D i ) is closer to the general posterior distribution p(y r |D r ).
[0072] S130, the spatiotemporal dataset D i The data is input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal area in the future city, wherein the state of the specific spatiotemporal area refers to the spatiotemporal data within a specified time and space range.
[0073] In some embodiments, the spatiotemporal dataset D i Input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal area in the future city includes:
[0074] Based on the data processing module, the spatiotemporal data set D i Performing data processing to obtain preprocessed data, wherein the data processing module includes a linear component, a skip-LSTM module, a first fully connected layer including a feature fusion component, and a second fully connected layer;
[0075] The preprocessed data is input into an amortized network with parameter φ to obtain a specific spatiotemporal representation φ corresponding to the input spatiotemporal task i The approximate posterior distribution of :
[0076]
[0077] The approximate posterior distribution and the preprocessed data are input into a matrix with shared parameters δ s / t In the generative model, the state of specific spatiotemporal areas in the future city is predicted.
[0078] In some embodiments, the data processing module processes the spatiotemporal data set D i Perform data processing to obtain preprocessed data including:
[0079] Get the spatiotemporal dataset D i The data corresponding to the M time subtasks in the linear component are linearly analyzed on the historical time series therein, a specific target value is estimated, and the estimation result is input into the first fully connected layer;
[0080] Get the spatiotemporal dataset D i The data corresponding to the M time subtasks in the skip-LSTM module are extracted at different time intervals from the historical time series, the periodic pattern in the historical time series is learned, and the obtained time features are input into the second fully connected layer for processing;
[0081] The time features processed by the second fully connected layer are further used to extract temporal dependencies through the LSTM layer, and the extracted results are input into the first fully connected layer;
[0082] Get the spatiotemporal dataset D i The spatial features in the data corresponding to the N spatial subtasks in the spatial subtasks are input into the first fully connected layer;
[0083] Based on the feature fusion component, feature fusion is performed on the data received by the first fully connected layer to obtain preprocessed data, and the preprocessed data is input into the amortized network and the generation model respectively.
[0084] In some embodiments, the preprocessed data is input into an amortized network with parameter φ to obtain a specific spatiotemporal representation φ corresponding to the input spatiotemporal task. i The approximate posterior distribution of includes:
[0085] The preprocessed data is input into an amortized network with parameter φ, ST feature extraction and pooling operations are performed on the preprocessed data, and the pooled data is randomly sampled to generate the mean and variance of the spatiotemporal representation under a specific time and space, and finally a specific spatiotemporal representation φ corresponding to the input spatiotemporal task is obtained. i The approximate posterior distribution of :
[0086]
[0087] For example, the spatiotemporal amortized network is part of the STDLM model. To capture sufficient temporal features, the temporal dependencies between adjacent time nodes in the historical data and the periodic patterns that may be hidden in the time series must be considered simultaneously. Therefore, the model uses a linear transformation component to obtain the basic estimate of the predicted state and uses a special layer to capture nonlinear temporal patterns. The extracted temporal features are combined with the static regional features through the feature fusion component to establish a spatiotemporal representation with complete information.
[0088] For example, the linear transformation model is implemented using a classical linear autoregression (AR) model, which captures the linear dependencies between the previous steps of the time series data history and obtains a rough estimate of the estimation target from it. A is the parameter of the AR model, H t is the dynamic urban spatiotemporal embedding at time t, b is the bias term, and the AR model can be expressed as:
[0089] H t =A[h 1 ,…,h t-1 ]+b;
[0090] For example, in the problem of city state prediction, multiple patterns of different periods may be hidden in the same time series data. Traditional time series models focus more on adjacent time periods and cannot model multiple periodic time patterns.
[0091] Therefore, the STDLM model uses the skip-LSTM module, which extracts and models historical time series at different time intervals, learns multiple periodic patterns in the sequence, and outputs time embeddings at different time intervals. The skip-LSTM module can be expressed as:
[0092] H t =LSTM skpi (x t ,h t-p )
[0093] Among them, p=1 means mining daily time model, p=7 means weekly, and p=30 means monthly.
[0094] For example, in order to fully utilize different features to obtain a more expressive spatiotemporal representation, two fully connected structures are used to integrate dynamic and static features. One receives the output of the skip-LSTM module, and the other is used to learn the embedding of multiple spatial features and then summarize them to output the final embedding of static features. This process balances the relative weights of different features, allowing the model to extract better feature representations from the data.
[0095] Exemplarily, the approximate posterior distribution and the preprocessed data are input into a matrix with shared parameters δ s / tAfter being incorporated into the generative model, the generative model learns the hidden correlations in different spatiotemporal tasks and completes the learning of meta-knowledge in spatiotemporal tasks through knowledge transfer, thereby predicting the state of specific spatiotemporal areas in future cities, thereby improving the learning efficiency and estimation accuracy of the model.
[0096] The following is a detailed description of the city state prediction method 100 based on spatiotemporal association mining provided by the embodiment of the present disclosure in conjunction with a specific embodiment, as shown below:
[0097] The city status monitoring task is split according to the time zone and space zone. Taking a large city as an example, its time zone is divided into 4 time periods (M=4), namely early morning (00:00-06:00), morning (06:00-12:00), afternoon (12:00-18:00) and night (18:00-24:00). At the same time, its space area is divided into 5 areas (N=5), namely the city center, the eastern industrial area, the western residential area, the southern commercial area and the northern educational area. Therefore, we get 4 time subtasks and 5 space subtasks.
[0098] For each spatiotemporal subtask, collect the corresponding spatiotemporal data. In order to predict the state of a specific spatiotemporal area in the city, select a specific time subtask and a specific space subtask. For example, for the time subtask "morning" and the space subtask "city center", we collect the historical traffic flow, population density, weather conditions and other spatiotemporal data of the area in the morning period to form the spatiotemporal data set D1. (During the construction process, data preprocessing operations can be performed, such as: cleaning the original data, removing outliers and missing values; standardizing or normalizing the data to improve the stability and efficiency of model training; and extracting features and reducing the dimension of the data according to actual needs.)
[0099] Initialize the model parameters θ of the meta-learning model, and use the point estimation method to estimate the shared parameters δ based on the spatiotemporal dataset D1 s / t Update to obtain the specific spatiotemporal task parameters δ and the corresponding optimized meta-learning model.
[0100] Based on the permutation and combination method, the data corresponding to the spatial subtask and the temporal subtask are alternately selected to form a training data set, and the training data set is input into the optimized meta-learning model to obtain the approximate posterior estimation distribution of the specific spatiotemporal task. The distribution is input into the neural network amortization model, and the amortized network is trained to obtain an amortized network with parameter φ. Based on the specific spatiotemporal task parameter δ obtained from the amortized network i and the shared parameter δ s / t , build a generative model.
[0101] A spatiotemporal data learning model is constructed, which includes a data processing module, an amortized network and a generative model. The data processing module is used to preprocess the spatiotemporal dataset D1, the amortized network is used to generate an approximate posterior distribution of a specific spatiotemporal representation, and the generative model predicts the future city state based on the distribution.
[0102] The spatiotemporal data set D1 is input into the spatiotemporal data learning model. The spatiotemporal data set D1 is preprocessed using the data processing module to obtain preprocessed data that integrates temporal features and spatial features.
[0103] The preprocessed data is input into the amortized network with parameter φ, ST feature extraction and pooling operations are performed on the data, and the pooled data is randomly sampled to generate the mean and variance of the spatiotemporal representation under a specific time and space, and finally a specific spatiotemporal representation φ corresponding to the input spatiotemporal task is obtained. i The approximate posterior distribution and the preprocessed data are input into a matrix with shared parameters δ s / t In the generative model, the state of this specific spatiotemporal area in the future city is predicted. Therefore, based on the input spatiotemporal dataset D1, we can predict the traffic flow, population density, etc. in the city center in the morning period within the next hour.
[0104] According to the embodiments of the present disclosure, the following technical effects are achieved:
[0105] First, the present disclosure improves the accuracy of rare event prediction. Since STDLM uses the MAML meta-learning algorithm for probabilistic reasoning, this means that the model can better capture the characteristics of rare events in spatiotemporal data. Therefore, the invention can provide more accurate probability estimates when dealing with rare events in spatiotemporal time, which is of great significance to urban planning, traffic management and other fields.
[0106] Secondly, the relevance of multi-task learning is enhanced. By learning and mining the hidden associations between different spatiotemporal tasks in a city, the present disclosure can improve the efficiency of multi-task learning. This means that when processing multiple related spatiotemporal tasks, the model can better utilize the shared information between tasks, thereby improving the overall learning effect and reducing the impact of data sparsity.
[0107] Then, the present disclosure also optimizes the data sample mapping capability. The amortized inference method is used to regularize different spatiotemporal tasks in the city, so that the model can adapt to the unified spatiotemporal distribution. This advantage is reflected in the model's ability to effectively map training data samples to parameterized approximate posterior distributions, thereby improving the generalization ability and robustness of the model.
[0108] Moreover, the model proposed in the present disclosure is highly adaptable. Since the present disclosure adopts a model-independent meta-learning algorithm, it has high adaptability. This means that the model can be applied to different types of spatiotemporal data without having to be adjusted for a specific model, greatly improving the coverage of practical application scenarios.
[0109] Finally, in order to solve the problem of sparse data distribution, this paper overcomes the problem of sparse data distribution in single-task learning to a certain extent by mining the hidden associations between different spatiotemporal tasks in the city. This plays an important role in improving the prediction performance of the model in sparse data areas.
[0110] In summary, the advantages of the present disclosure are mainly reflected in improving the accuracy of rare event prediction, enhancing the relevance of multi-task learning, optimizing data sample mapping capabilities, strong adaptability, and solving the problem of sparse data distribution, etc. These advantages make the present disclosure have high application value in the field of spatiotemporal data processing.
[0111] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0112] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.
[0113] Figure 2 The structure diagram of the city state prediction device based on spatiotemporal association mining provided by the embodiment of the present disclosure is shown as follows: Figure 2 As shown, the city state prediction device 200 based on spatiotemporal association mining may include:
[0114] The subtask division module 210 is used to divide the city status monitoring task into different time zones and different space zones to obtain M time subtasks and N space subtasks, wherein the time subtask T = {t j |j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, where M and N are both positive integers greater than 1;
[0115] The data collection module 220 is used to define each subtask as a spatiotemporal task and collect corresponding spatiotemporal data for each spatiotemporal task to form a spatiotemporal data set D i , where i represents the index of the spatiotemporal task, and i is a positive integer greater than 1;
[0116] The state prediction module 230 is used to convert the spatiotemporal data set D i The data is input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal region, wherein the state of the specific spatiotemporal region refers to the spatiotemporal data within a specified time and space range.
[0117] Understandably, Figure 2 Each module / unit in the city state prediction device 200 based on spatiotemporal association mining has the following features: Figure 1 The functions of the various steps in the city state prediction method 100 based on spatiotemporal association mining shown in the figure can achieve their corresponding technical effects, and for the sake of brevity, they will not be repeated here.
[0118] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0119] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0120] Figure 3 A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. The electronic device 300 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 300 may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0121] like Figure 3 As shown, the electronic device 300 may include a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 may also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0122] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0123] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer program product, including a computer program, which is tangibly contained in a computer-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0124] The various embodiments described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0125] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0126] In the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0127] It should be noted that the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute method 100 and achieve the corresponding technical effect achieved by the embodiments of the present disclosure executing the method. For the sake of brevity, they are not repeated here.
[0128] In addition, the present disclosure also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method 100 is implemented.
[0129] To provide interaction with a user, the above-described embodiments may be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0130] The embodiments described above can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0131] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0132] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0133] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A city state prediction method based on spatiotemporal association mining, characterized in that: include: The city status monitoring task is split into different time zones and different space zones to obtain M time subtasks and N space subtasks, where the time subtask T = {t j |j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, where M and N are both positive integers greater than 1; Define each subtask as a spatiotemporal task, and collect corresponding spatiotemporal data for each spatiotemporal task to form a spatiotemporal dataset D i , where i represents the index of the spatiotemporal task, and i is a positive integer greater than 1; The spatiotemporal dataset D i The data is input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal region, wherein the state of the specific spatiotemporal region refers to the spatiotemporal data within a specified time and space range.
2. The method according to claim 1, characterized in that The spatiotemporal data learning model includes a data processing module, an amortized network and a generation model.
3. The method according to claim 1, characterized in that The method further comprises: Initialize the model parameters θ of the meta-learning model based on the spatiotemporal dataset D i The meta-learning model is trained to update the initial model parameters θ′ applicable to all subtasks; Based on the data corresponding to the N spatial subtasks, the initial model parameters θ′ of the meta-learning model are updated again using the distribution estimation method to obtain the model shared parameters δ corresponding to all spatial subtasks s ; Based on the data corresponding to the M time subtasks, the initial model parameters θ′ of the meta-learning model are updated again using the distribution estimation method to obtain the model shared parameters δ corresponding to all time subtasks t ; For the space mission parameter δ s and the time task parameter δ t Fusion is performed to obtain the fused shared parameter δ s / t ; Based on spatiotemporal dataset D i The shared parameter δ is estimated using the point estimation method. s / t Update again to obtain the specific spatiotemporal task parameter δ and the corresponding optimized meta-learning model.
4. The method according to claim 2, characterized in that: The amortized network and the generative model are trained by the following steps: The data corresponding to the N spatial subtasks and the data corresponding to the M temporal subtasks are alternately selected based on the permutation and combination method to form a training data set; The training data set is input into the optimized meta-learning model to obtain the approximate posterior estimated distribution p(δ i |D i ,δ s / t ); The approximate posterior estimated distribution p(δ i |D i ,δ s / t ) is input into a neural network amortization model, and the neural network amortization model is trained to obtain an amortized network with parameter φ; Based on the specific spatiotemporal task parameters δ obtained from the amortized network i and the shared parameter δ s / t , build a generative model.
5. The method according to claim 4, characterized in that The spatiotemporal dataset D i Input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal area in the future city includes: Based on the data processing module, the spatiotemporal data set D i Performing data processing to obtain preprocessed data, wherein the data processing module includes a linear component, a skip-LSTM module, a first fully connected layer including a feature fusion component, and a second fully connected layer; The preprocessed data is input into an amortized network with parameter φ to obtain a specific spatiotemporal representation φ corresponding to the input spatiotemporal task i The approximate posterior distribution of : The approximate posterior distribution and the preprocessed data are input into a matrix with shared parameters δ s / t In the generative model, the state of specific spatiotemporal areas in the future city is predicted.
6. The method according to claim 5, characterized in that The data processing module processes the spatiotemporal data set D i Perform data processing to obtain preprocessed data including: Get the spatiotemporal dataset D i The data corresponding to the M time subtasks in the linear component are linearly analyzed on the historical time series therein, a specific target value is estimated, and the estimation result is input into the first fully connected layer; Get the spatiotemporal dataset D i The data corresponding to the M time subtasks in the skip-LSTM module are extracted at different time intervals from the historical time series, the periodic pattern in the historical time series is learned, and the obtained time features are input into the second fully connected layer for processing; The time features processed by the second fully connected layer are further used to extract temporal dependencies through the LSTM layer, and the extracted results are input into the first fully connected layer; Get the spatiotemporal dataset D i The spatial features in the data corresponding to the N spatial subtasks in the spatial subtasks are input into the first fully connected layer; Based on the feature fusion component, feature fusion is performed on the data received by the first fully connected layer to obtain preprocessed data, and the preprocessed data is input into the amortized network and the generation model respectively.
7. The method according to claim 5, characterized in that The preprocessed data is input into an amortized network with parameter φ to obtain a specific spatiotemporal representation φ corresponding to the input spatiotemporal task i The approximate posterior distribution of includes: The preprocessed data is input into an amortized network with parameter φ, ST feature extraction and pooling operations are performed on the preprocessed data, and the pooled data is randomly sampled to generate the mean and variance of the spatiotemporal representation under a specific time and space, and finally a specific spatiotemporal representation φ corresponding to the input spatiotemporal task is obtained. i The approximate posterior distribution of :
8. A city state prediction device based on spatiotemporal association mining, characterized in that: include: The subtask division module is used to divide the city status monitoring task into different time zones and different space zones to obtain M time subtasks and N space subtasks, where the time subtask T = {t j |j=1,2,…,M}, spatial subtask S={s k |k=1,2,…,N}, where M and N are both positive integers greater than 1; The data collection module is used to define each subtask as a spatiotemporal task and collect the corresponding spatiotemporal data for each spatiotemporal task to form a spatiotemporal dataset D i , where i represents the index of the spatiotemporal task, and i is a positive integer greater than 1; The state prediction module is used to transform the spatiotemporal dataset D i The data is input into the spatiotemporal data learning model to predict the state of a specific spatiotemporal region, wherein the state of the specific spatiotemporal region refers to the spatiotemporal data within a specified time and space range.
9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.