Model construction method and apparatus, and device and storage medium
By obtaining spatiotemporal data and task parameters, performing standardized processing and network architecture optimization, the problem of automated learning of spatiotemporal graph modeling tasks is solved, the efficient and automated construction of target spatiotemporal prediction models for spatiotemporal data is achieved, and the efficiency of spatiotemporal graph modeling tasks is improved. efficiency and automation.
Patent Information
- Application Number
- PCT/CN2024/072301
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-21
- Filing Date
- 2024-01-15
- Publication Date
- 2024-08-29
AI Technical Summary
Existing technology cannot directly apply spatiotemporal data to automated learning of spatiotemporal graph modeling tasks, making it difficult to achieve efficient and automated implementation of spatiotemporal graph modeling tasks.
By obtaining spatiotemporal data and task parameters, performing standardized processing, building a search space for the target spatiotemporal prediction model, and conducting network architecture search and network parameter optimization, the target spatiotemporal prediction model is obtained.
It realizes the process of automating the construction of target spatiotemporal prediction model using spatiotemporal data, and improves the efficient and automated implementation of spatiotemporal graph modeling tasks.
Smart Images

Figure CN2024072301_29082024_PF_FP_ABST
Abstract
Description
Model construction method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to the Chinese invention patent application No. 202310181876.X filed on February 21, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of intelligent model technology, and in particular to a model construction method, apparatus, device and storage medium. Background Art
[0004] With the development of new-generation information technologies such as the Internet of Things, 5G, and mobile internet, spatiotemporal data, such as vehicle trajectory data, public travel data, and air quality monitoring data, has exploded in volume. This spatiotemporal data enables forecasting, effectively helping city managers make informed decisions for refined smart city management. Currently, automated spatiotemporal graph modeling methods based on deep learning can meet the vast number of modeling requirements in real-world projects. However, existing spatiotemporal graph modeling methods cannot directly apply spatiotemporal data to automated learning for spatiotemporal graph modeling tasks, thus failing to ensure efficient and automated implementation of these tasks.
[0005] Summary of the Invention
[0006] The present disclosure provides a model construction method, apparatus, equipment and storage medium to address the defect in the existing technology that spatiotemporal data cannot be directly applied to the automated learning of spatiotemporal graph modeling tasks, and realizes the process of automatically constructing a target spatiotemporal prediction model based on spatiotemporal data.
[0007] The present disclosure provides a model construction method, including: obtaining spatiotemporal data and task parameters required for model construction; based on the task parameters, standardizing the spatiotemporal data to obtain spatiotemporal graph data expressed in a standardized form; based on the spatiotemporal graph data and the task parameters, constructing a search space corresponding to a target spatiotemporal prediction model; based on the search space and the spatiotemporal graph data, performing a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model to obtain the target spatiotemporal prediction model.
[0008] According to a model construction method provided by the present disclosure, the spatiotemporal data includes time data and space data, and the task parameters include time granularity and space granularity; based on the task parameters, the spatiotemporal data is standardized to obtain spatiotemporal graph data expressed in a standardized form, including: based on the time granularity, the time data is processed to obtain a set of time samples with consistent granularity; based on the space granularity, the spatial data is processed to obtain a set of space samples with consistent granularity; based on the time sample set and the space sample set, the spatiotemporal graph data expressed in a standardized form is constructed.
[0009] According to a model construction method provided by the present disclosure, the spatiotemporal graph data expressed in a standardized manner is constructed based on the time sample set and the spatial sample set, including: taking each of the spatial sampling points in the spatial sample set as a node and the distance between each two nodes as an edge to construct a spatial graph; and / or taking each of the spatial sampling points in the spatial sample set as a node and the similarity between each two nodes as an edge to construct a spatial graph; based on the time sample set and at least one spatial graph, a time-varying sequence corresponding to each of the spatiotemporal graphs is constructed; based on at least one spatial graph and the time-varying sequence corresponding to each of the spatial graphs, at least one set of the spatiotemporal graph data is obtained.
[0010] According to a model construction method provided by the present disclosure, the network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed based on the search space and the spatiotemporal graph data to obtain the target spatiotemporal prediction model, including: when at least two groups of the spatiotemporal graph data are obtained, fusing at least two groups of the spatiotemporal graph data to obtain fused graph data; based on the search space and the fused graph data, the network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model.
[0011] According to a model building method provided by the present disclosure, the time data is processed based on the time granularity to obtain a time sample set with consistent granularity, including: processing the time data based on the time granularity to obtain an initial time sample set; when there is missing data at a time sampling point in the initial time sample set, obtaining a filling value based on the time sampling point; and supplementing the data of the initial time sample set with the filling value to obtain the time sample set.
[0012] According to a model building method provided by the present disclosure, obtaining the padding value based on the time sampling points includes: obtaining the padding value based on the temporal proximity of the time sampling points; or obtaining the padding value based on the spatial proximity of the time sampling points; or obtaining the padding value based on the similarity of the time sampling points.
[0013] According to a model construction method provided by the present disclosure, the search space corresponding to the target spatiotemporal prediction model is constructed based on the spatiotemporal graph data and the task parameters, including: extracting the spatiotemporal graph features of the spatiotemporal graph data; based on the spatiotemporal graph features and the task parameters, determining the network search architecture and at least one operator of the target spatiotemporal prediction model, wherein the network search architecture includes at least one of a single-chain search space, a fully connected graph search space, and a unit-type search space, and the operator includes at least one of a time operator, a spatial operator, an external factor operator, a normalization operator, and a pooling operator; based on the network search architecture and at least one of the operators, the search space corresponding to the target spatiotemporal prediction model is constructed.
[0014] The present disclosure also provides a model construction device, including: an acquisition module for acquiring spatiotemporal data and task parameters required for model construction; a standardization processing module for standardizing the spatiotemporal data based on the task parameters to obtain spatiotemporal graph data expressed in a standardized form; a space construction module for constructing a search space corresponding to a target spatiotemporal prediction model based on the spatiotemporal graph data and the task parameters; a model acquisition module for performing a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model based on the search space and the spatiotemporal graph data to obtain the target spatiotemporal prediction model.
[0015] The present disclosure also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the model building method described above is implemented.
[0016] The present disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described model building methods.
[0017] The model construction method, apparatus, equipment and storage medium provided by the present disclosure obtain spatiotemporal data, and after obtaining the task parameters required for model construction, the spatiotemporal data are standardized based on the task parameters to obtain spatiotemporal graph data expressed in a standardized form. Then, based on the spatiotemporal graph data and the task parameters, a search space corresponding to the target spatiotemporal prediction model is constructed. Finally, based on the search space and the spatiotemporal graph data, a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model. In this process, the spatiotemporal data are closely linked to the target spatiotemporal prediction model. After the spatiotemporal data are standardized, the target spatiotemporal prediction model is automatically constructed based on the task parameters and the spatiotemporal graph data expressed in a standardized form, thereby realizing the efficient and automated implementation of the spatiotemporal graph modeling task. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present disclosure or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] FIG1 is a schematic diagram of a flow chart of a model construction method provided by the present disclosure;
[0020] FIG2 is a schematic diagram of the knowledge conversion implementation principle of spatiotemporal data provided by the present disclosure;
[0021] FIG3 is an example diagram of a candidate network search architecture and preset operators provided by the present disclosure;
[0022] FIG4 is a schematic diagram of the principle of a multi-image fusion model provided by the present disclosure;
[0023] FIG5 is a second flow chart of the model building method provided by the present disclosure;
[0024] FIG6 is a schematic structural diagram of a model building device provided by the present disclosure;
[0025] FIG7 is a schematic structural diagram of an electronic device provided by the present disclosure. DETAILED DESCRIPTION
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the embodiments of the present disclosure.
[0027] With the development of next-generation information technologies such as the Internet of Things, 5G, and mobile internet, spatiotemporal data (e.g., vehicle trajectory data, public travel data, and air quality monitoring data) has exploded. This urban spatiotemporal big data can effectively help city managers understand the current state of a city's operations in real time, monitor its evolution, and accurately predict its future, thereby providing a basis for decision-making in the refined management of smart cities. For example, by analyzing spatiotemporal big data on urban traffic, it is possible to efficiently perceive traffic conditions in real time, explore operational patterns, and predict future traffic conditions, thereby providing guidance for urban transportation planning and management.
[0028] According to the spatiotemporal characteristics of urban tasks, urban spatiotemporal tasks can be further divided into spatiotemporal point modeling tasks (such as sales forecasting), spatiotemporal grid modeling tasks (such as grid traffic forecasting), spatiotemporal graph modeling tasks (such as road network traffic forecasting), and other types.
[0029] Among current approaches to spatiotemporal graph modeling, deep learning-based methods offer the best performance. However, deep learning model design typically requires experienced algorithm experts to design specialized models for the vast number of model requirements encountered in real-world projects, resulting in extremely high labor and time costs. Therefore, efficient and automated modeling is a key challenge in scaling spatiotemporal graph modeling. Automated network structure search is a method specifically designed for deep learning model networks that can automatically design optimal network structures for different learning tasks.
[0030] Currently, the commonly used methods for automated network structure search are as follows:
[0031] The first method is the Differentiable Architecture Search (DARTS) method based on gradient optimization. This method implements differentiable architecture search, but only provides a gradient-based network architecture optimization method. It does not optimize for the characteristics of spatiotemporal data, making it difficult to achieve good results in spatiotemporal data processing and unable to automatically complete spatiotemporal graph modeling tasks based on spatiotemporal data.
[0032] The second method is the Efficient Neural Architecture Search for Spatio-Temporal Prediction (AutoST) method for spatio-temporal grid tasks. This method is based on convolutional neural networks. However, this method is suitable for spatio-temporal grid modeling tasks. However, the connections between nodes in spatio-temporal graph modeling tasks are more complex than those of spatio-temporal grids, so it cannot be directly used.
[0033] The third method is the Neural Architecture Search for Predictions of Spatio-Temporal Graph (AutoSTG) for spatio-temporal graph modeling tasks. However, this method directly operates on spatio-temporal graphs and cannot effectively handle the problems of complex graphs and multi-graph information fusion.
[0034] None of the above-mentioned methods provide a basic knowledge conversion process for spatiotemporal data, and cannot directly apply spatiotemporal data to automatic machine learning for spatiotemporal graph modeling tasks.
[0035] Based on the above analysis, the present disclosure provides a model construction method that can be automatically implemented using a software algorithm. The software algorithm implementing this method can be implemented on any device with data processing capabilities, such as a smartphone, laptop, or server. The model construction method of an embodiment of the present disclosure is described below with reference to Figures 1-5.
[0036] In one embodiment, the model building method is implemented by the following steps:
[0037] Step 101: Acquire spatiotemporal data and task parameters required for model construction.
[0038] In this embodiment, spatiotemporal data refers to data collected based on the two dimensions of time and space, for example, vehicle trajectory data collected over a period of time, or air quality monitoring data collected over a period of time.
[0039] In this embodiment, task parameters are parameters required during model construction and can be customized according to user needs, such as sampling granularity when processing spatiotemporal data. The task parameters can be obtained in advance through a human-computer interaction device, for example, by inputting the task parameters through the device's touch screen.
[0040] Step 102 : Based on the task parameters, the spatiotemporal data is standardized to obtain spatiotemporal graph data expressed in a standardized form.
[0041] In this embodiment, after obtaining spatiotemporal data, the data is standardized, transforming the diverse spatiotemporal data into a standardized spatiotemporal graph. This standardization process enables knowledge transformation of the spatiotemporal data, facilitating the automated implementation of the target spatiotemporal prediction model and improving the efficiency of its construction.
[0042] In one embodiment, spatiotemporal data includes time data and spatial data, and task parameters include time granularity and spatial granularity. When the spatiotemporal data is standardized based on the task parameters to obtain spatiotemporal graph data expressed in a standardized form, the time data is processed based on the time granularity to obtain a set of time samples with consistent granularity; the spatial data is processed based on the spatial granularity to obtain a set of spatial samples with consistent granularity; and the spatiotemporal graph data expressed in a standardized form is constructed based on the time sample set and the spatial sample set.
[0043] In this embodiment, after acquiring the spatiotemporal data, when the spatiotemporal data is standardized, the granularity of the data is processed to process the spatiotemporal data into a spatiotemporal data sample set with consistent time granularity and consistent spatial granularity (i.e., a time sample set and a space sample set).
[0044] Specifically, task parameters include temporal and spatial granularity. Temporal granularity is the target granularity for sampling temporal data, determined based on needs and actual conditions. Spatial granularity is the target granularity for sampling spatial data, determined based on needs and actual conditions. By processing temporal data at the temporal granularity and spatial data at the spatial granularity, we obtain a set of temporal and spatial samples with consistent granularity.
[0045] In this embodiment, the initially acquired spatiotemporal data may also be sampled data, but the granularity of the initial spatiotemporal data differs from the target temporal and spatial granularity. Therefore, when processing the temporal data based on the temporal granularity, if the initial temporal data granularity is too large (i.e., fine-grained data is missing), it can be supplemented using methods such as spline interpolation. If the initial temporal granularity is small, it can be aggregated using methods such as downsampling and averaging to obtain a set of temporal samples divided at the target temporal granularity.
[0046] Similarly, when processing spatial data according to spatial granularity, if the initial spatial data granularity is too large (i.e., fine-grained data is missing), it can be supplemented by methods such as spline interpolation; if the initial spatial granularity is small, it can be aggregated by methods such as downsampling and averaging to obtain a set of spatial samples divided by the target spatial granularity.
[0047] Based on the above, in a specific example, the target spatiotemporal prediction model is tasked with predicting the air quality of a given area for the next hour, given a variety of spatiotemporal data, including historical air quality monitoring values, weather, and a set of regional point locations. During standardization, aggregation is performed based on 1-hour time intervals (temporal granularity) and regional point locations (spatial granularity). If the spatial granularity of the air quality monitoring values is larger than the given regional point locations (i.e., some areas have no monitoring stations and fine-grained data is missing), methods such as spline interpolation can be used to supplement them. If the temporal granularity of the air quality monitoring values is less than 1 hour, the average value of the 1-hour interval can be taken as the monitoring value at the hourly granularity.
[0048] In one embodiment, when standardization processing is performed based on time data, there may be missing data. For example, there are no monitoring stations in certain areas. In this case, the time data is processed based on the time granularity to obtain a time sample set with consistent granularity. The implementation process is as follows: based on the time granularity, the time data is processed to obtain an initial time sample set; when there is missing data at a time sampling point in the initial time sample set, a filling value is obtained based on the time sampling point; the initial time sample set is supplemented with data using the filling value to obtain a time sample set.
[0049] Similarly, when spatial data is processed based on spatial granularity to obtain a spatial sample set with consistent granularity, the implementation process is as follows: based on the spatial granularity, the spatial data is processed to obtain an initial spatial sample set; when there is missing data at a spatial sampling point in the initial spatial sample set, a filling value is obtained based on the spatial sampling point; the initial spatial sample set is supplemented with data using the filling value to obtain a spatial sample set.
[0050] In this embodiment, the filling value is obtained by the time sampling points in the initial time sample set, and the filling value is obtained by the spatial sampling points in the initial spatial sample set. Under the premise of ensuring the validity of the data, the final time sample set is made more complete, which is conducive to improving the construction efficiency of the target spatiotemporal prediction model.
[0051] In one embodiment, obtaining a filling value based on time sampling points can be achieved in the following ways: obtaining a filling value based on the temporal proximity of the time sampling points; or obtaining a filling value based on the spatial proximity of the time sampling points; or obtaining a filling value based on the similarity of the time sampling points.
[0052] Similarly, obtaining the filling value based on the spatial sampling points can be achieved in the following ways: obtaining the filling value based on the spatial proximity of the spatial sampling points; or obtaining the filling value based on the spatial proximity of the spatial sampling points; or obtaining the filling value based on the similarity of the spatial sampling points.
[0053] In this embodiment, the filling method based on time proximity is used to calculate the filling value. The formula is as follows:
[0054] in, represents the padding value; T is the window size determined based on proximity; i and j represent different positive integers; y i+j represents the i+jth sampling point (time sampling point or space sampling point); c t is the distance weight based on temporal proximity, for example, the value is 4.
[0055] In this embodiment, the filling method based on spatial proximity is used to calculate the filling value. The formula is as follows:
[0056] in, represents the filling value; N is the spatial neighborhood set; i and j represent different positive integers; y j represents the jth sampling point (time sampling point or space sampling point); dist represents the road network distance or Euler distance; c s is the distance weight based on spatial proximity.
[0057] In this embodiment, the similarity-based filling method may calculate the filling value by weighting according to the similarity (eg, cosine similarity, Pearson correlation coefficient, etc.) between sampling points (temporal sampling points or spatial sampling points).
[0058] In this embodiment, the filling values of the above-mentioned multiple filling methods can be integrated through a simple linear regression model to obtain a final filling value to fill the missing data.
[0059] In one embodiment, after obtaining a time sample set with consistent granularity and a space sample set with consistent granularity, spatiotemporal graph data expressed in a standardized manner is constructed based on the time sample set and the space sample set. The specific process is as follows: each spatial sampling point in the spatial sample set is used as a node, and the distance between each two nodes is used as an edge to construct a spatial graph; and / or, each spatial sampling point in the spatial sample set is used as a node, and the similarity between each two nodes is used as an edge to construct a spatial graph; based on the time sample set and at least one spatial graph, a time-varying sequence corresponding to each spatiotemporal graph is constructed; based on at least one spatial graph and the time-varying sequence corresponding to each spatial graph, at least one set of spatiotemporal graph data is obtained.
[0060] In this embodiment, the spatial sampling points in the spatial data are used as nodes of the spatial graph, and then the edges of the spatial graph are determined based on the nodes, the required spatial graph is constructed, and a standard spatiotemporal graph expression is output.
[0061] Specifically, the following two methods are provided to define edges to construct a spatial graph:
[0062] The first method constructs a graph based on the distance between nodes (e.g., spatial distance, road network distance, etc.). The edge feature is the distance value between two nodes, or a value of 0 or 1, where 0 indicates no connection between the two nodes and 1 indicates a connection between the two nodes.
[0063] The second method is to construct a graph based on similarity (e.g., time series similarity, spatial attribute similarity, semantic similarity, etc.). The edge feature is the similarity value between two nodes, or a value of 0 or 1, where 0 indicates that there is no connection between the two nodes and 1 indicates that there is a connection between the two nodes.
[0064] Of course, other methods can be used to determine the edges of the space-time graph according to actual conditions and needs.
[0065] In addition, the multiple construction methods provided above can be selected, each of which can output a corresponding spatiotemporal graph, thereby obtaining multiple spatiotemporal graphs corresponding to the same set of spatiotemporal data.
[0066] In this embodiment, after the spatial graph is obtained, the corresponding time-varying sequence can be obtained based on the time sample set and the spatial graph.
[0067] In a specific embodiment, the spatiotemporal graph data includes spatial graph information With time-varying series , where spatial graph information According to the characteristics of the target task, it can be divided into two categories: single space graph and multi-space graph.
[0068] For a single spatial graph, the standardized expression of spatial graph information is as follows:
[0069] in, is of size N v The set of points; is a set of edges, u and v represent different nodes, (u, v) represents the edge between points u and v; is the static characteristic of the point (D v is the dimension of the point static feature); is the static feature of the edge (expressed by the adjacency matrix, D e represents the dimension of the static characteristics of the edge); f uvj ∈F eRepresents the j-th attribute value of the edge from u to v. In particular, if this edge does not exist, it is filled with 0.
[0070] For multi-space graphs, the standardized expression of space graph information is as follows:
[0071] in, is of size N v The set of points; is the collection of edges; is the static characteristic of the point (D v is the dimension of the point static feature); is the static feature of the edge (expressed by the adjacency matrix, D e Represents the dimension of the static characteristics of the edge); N g Indicates the number of spatial graphs; represents the set of edges of the i-th spatial graph, u and v represent different nodes, and (u, v) represents the edge between points u and v; Indicates the jth attribute value of the edge from u to v in the i-th spatial graph. In particular, if this edge does not exist in the i-th spatial graph, the corresponding position is filled with 0. At the same time, if the number of attributes in the i-th spatial graph is less than D e The missing part is also filled with 0.
[0072] In this embodiment, the time-varying sequence refers to the reading of each point on the spatial graph that changes over time, which can generally be expressed using tensors. Indicates that T o is the number of time steps, D o The dimensions of the time series readings.
[0073] In one embodiment, as shown in FIG2 , the knowledge conversion process from spatiotemporal data to spatiotemporal graph data is as follows:
[0074] After obtaining the spatiotemporal data and task parameters, the spatiotemporal data is subjected to spatiotemporal processing. Specifically, the time data and space data are granularized to obtain a time sample set with consistent granularity and a space sample set with consistent granularity. The time sample set and the space sample set are collectively referred to as the spatiotemporal data sample set.
[0075] If there is missing data in the spatiotemporal data sample set, the missing data can be filled. Specifically, the filling can be based on time proximity, based on spatial proximity, or based on similarity.
[0076] Next, a spatiotemporal graph is constructed based on the spatiotemporal data sample set. Specifically, the spatiotemporal graph is constructed based on similarity and / or the spatiotemporal graph is constructed based on distance.
[0077] After the construction is completed, a standardized spatiotemporal graph expression is obtained, that is, the spatiotemporal graph data expressed in a standardized form is obtained.
[0078] Step 103: construct a search space corresponding to the target spatiotemporal prediction model based on the spatiotemporal graph data and task parameters.
[0079] In this embodiment, the spatiotemporal data is standardized to obtain spatiotemporal graph data, and then a search space corresponding to the target spatiotemporal prediction model can be constructed based on the standardized spatiotemporal graph data and task parameters.
[0080] In one embodiment, when constructing a search space corresponding to a target spatiotemporal prediction model based on spatiotemporal graph data and task parameters, the specific process is as follows: extracting spatiotemporal graph features of the spatiotemporal graph data; determining a network search architecture and at least one operator of the target spatiotemporal prediction model based on the spatiotemporal graph features and task parameters, wherein the network search architecture includes at least one of a single-chain search space, a fully connected graph search space, and a unit-type search space, and the operator includes at least one of a time operator, a spatial operator, an external factor operator, a normalization operator, and a pooling operator; based on the network search architecture and at least one operator, constructing a search space corresponding to the target spatiotemporal prediction model.
[0081] In this embodiment, the spatiotemporal graph features of the spatiotemporal graph data refer to features such as the number of nodes in the spatiotemporal graph. Task parameters include at least one of the following parameters: prediction step size, metric type (classification or regression), and number of prediction targets, input by the user. Based on the spatiotemporal graph features and task parameters, the network search architecture and at least one operator of the target spatiotemporal prediction model are determined.
[0082] In this embodiment, multiple candidate network search architectures and multiple operators are pre-set based on the spatiotemporal data characteristics. As shown in Figure 3, three candidate network search architectures are pre-set:
[0083] 1. Single-chain search space: In this network search architecture, graph nodes are sequentially connected through automatically selected operators (Operators, Ops). This architecture has a smaller search space and is suitable for simpler tasks. Input represents input, and Output represents output.
[0084] 2. Fully connected graph search space: In this network search architecture, graph nodes are fully connected using automatically selected operators. This architecture maximizes path connections, minimizes network depth, and is suitable for simpler tasks. Node1, Node2, ..., represent different graph nodes.
[0085] 3. Cell-type search space: A combination of single-chain (cells are connected sequentially) and fully connected (all nodes within a cell are connected), integrating the advantages of the above two. Here, Out represents the output of a cell.
[0086] In this embodiment, the areas above the horizontal line represent various built-in operators for dealing with complex and diverse spatiotemporal correlations, including:
[0087] Temporal Operator (T-op), specifically including at least one of the 1D Convolution (1D Conv) operator, Temporal Convolutional Network (TCN) operator, Long Short-term Memory (LSTM) operator, Gated Recurrent Neural Network (GRU) operator, Multi-Head Attention (MHA) operator, Label-based Convolution (Meta-Conv) operator, and Recurrent Neural Network (RNN) operator;
[0088] Spatial Operator (S-op), specifically including at least one of the Graph Convolutional Network (GCN) operator, the Graph Attention Network (GAT) operator, the Graph Multi-Head Attention (G-MHA) operator, and the Meta-GCN operator.
[0089] External Operator (E-op), specifically including the Dense operator;
[0090] Normalization operator, specifically including at least one of the BatchNorm operator and the LayerNorm operator;
[0091] The pooling operator (pooling) specifically includes one of the convolution pooling (ConvPool) operator and the maximum pooling (MaxPool) operator.
[0092] In this embodiment, a network search architecture and at least one operator of a target spatiotemporal prediction model are determined, and a search space of the target spatiotemporal prediction model is automatically constructed.
[0093] Step 104 : Based on the search space and the spatiotemporal graph data, a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model.
[0094] In this embodiment, a pre-set selection search algorithm is used to automatically search for network architectures and optimize network parameters, ultimately outputting the optimal model. Specifically, the search algorithm can adopt, according to actual conditions and needs, a network architecture search method based on gradient optimization (Differentiable Architecture Search, DARTS), a progressive neural architecture search (PNAS) algorithm, an optimization method based on random search, a network architecture search method based on reinforcement learning, a network architecture search method based on gradient optimization, or any other search algorithm that can implement this method.
[0095] Based on the spatiotemporal graph data obtained in the above embodiment and the search space of the target spatiotemporal prediction model, a search algorithm is used to implement network architecture search and network parameter optimization to obtain the best target spatiotemporal prediction model.
[0096] In one embodiment, if multiple sets of spatiotemporal graph data corresponding to the spatiotemporal data mentioned in the above embodiment are obtained, it is necessary to first use a multi-graph fusion module to fuse the multi-graph knowledge. Specifically, based on the search space and the spatiotemporal graph data, the network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed. When the target spatiotemporal prediction model is obtained, when at least two sets of spatiotemporal graph data are obtained, at least two sets of spatiotemporal graph data are fused to obtain fused graph data; based on the search space and the fused graph data, the network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model.
[0097] In this embodiment, the multi-graph fusion module includes multiple preset graph knowledge learners, each of which can be pre-set based on a graph convolutional neural network (GCN), a graph neural network (GNN) or a graph attention network (GAT).
[0098] As shown in Figure 4, assuming S sets of spatiotemporal graph data are obtained based on spatiotemporal data, S graph knowledge learners are used to learn each of these S sets of spatiotemporal graph data, obtaining the graph knowledge representations corresponding to each of the S sets of spatiotemporal graph data. Finally, a weighted average of the S graph knowledge representations is taken to obtain the fused graph data. Based on the search space and the fused graph data, a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model.
[0099] Based on the above embodiment, after obtaining the target spatiotemporal prediction model, the target spatiotemporal prediction model is used to complete the spatiotemporal graph prediction task. Specifically, the spatiotemporal graph prediction task refers to a dynamic sequence of a given spatiotemporal graph. and the corresponding spatial graph information Predicting the future dynamic sequence of space-time graphs Among them, D t are the feature dimensions of the output, T t are the number of output time steps respectively.
[0100] In this embodiment, in multivariate time series prediction problems, the sequence to be predicted is usually called the target variable, and other related observation sequences are covariates used to assist in the prediction of the target variable. In the above definition, the input dimension D o Contains target variables and covariates, output feature dimension D t is the dimension of the target variable.
[0101] In an overall embodiment, as shown in FIG5 , the model building method implementation process is as follows:
[0102] First, knowledge conversion occurs. Specifically, the input spatiotemporal data is standardized into spatiotemporal graph data. A variety of missing value imputation and spatiotemporal graph construction methods are pre-configured. Users input spatiotemporal data and task parameters, select a corresponding processing method (default settings can be pre-set), and ultimately output standardized spatiotemporal graph data. Furthermore, spatiotemporal graph features can be extracted from the spatiotemporal graph data.
[0103] Then, the search space is automatically constructed. Specifically, the selection space for the model structure is configured. To address the characteristics of spatiotemporal data, this method incorporates built-in components such as time operators, spatial operators, and external factor operators, and pre-sets three candidate network search architectures. The user enters task parameters such as prediction step size, indicator type (classification or regression), and the number of prediction targets to automatically construct the search space.
[0104] Finally, the user selects a search algorithm, automatically searches for network architecture, optimizes network parameters, and ultimately outputs the optimal target spatiotemporal prediction model.
[0105] The model construction method provided by the present disclosure obtains spatiotemporal data and the task parameters required for model construction, and then standardizes the spatiotemporal data based on the task parameters to obtain spatiotemporal graph data expressed in a standardized form. Then, based on the spatiotemporal graph data and the task parameters, a search space corresponding to the target spatiotemporal prediction model is constructed. Finally, based on the search space and the spatiotemporal graph data, a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model. In this process, the spatiotemporal data are closely linked to the target spatiotemporal prediction model. After the spatiotemporal data is standardized, the target spatiotemporal prediction model is automatically constructed based on the task parameters and the spatiotemporal graph data expressed in a standardized form, thereby realizing efficient and automated implementation of the spatiotemporal graph modeling task.
[0106] Furthermore, considering the large differences in spatiotemporal correlations among different spatiotemporal graph prediction tasks, this method accelerates the design and development of spatiotemporal graph models through an automated processing flow from spatiotemporal data to deep spatiotemporal graph models. For different types of spatiotemporal data, this method implements a knowledge conversion model for spatiotemporal data, standardizes it into spatiotemporal graph data, and provides a basis for spatiotemporal graph modeling tasks. In response to the complex and diverse spatiotemporal correlations, this method has built-in time operators, spatial operators, external factor operators and other operators, and pre-sets three candidate network search architectures, which can be automatically selected based on specific task conditions, and more comprehensively support the needs of spatiotemporal graph network structure search. At the same time, considering the problem of multi-graph fusion, a multi-graph fusion module is designed to fuse multiple groups of spatiotemporal graph data corresponding to the spatiotemporal data, and then construct the target spatiotemporal prediction model by fusing graph data.
[0107] The following describes the model building device provided by the embodiment of the present disclosure. The model building device described below and the model building method described above can be referenced to each other. As shown in Figure 6, the model building device includes:
[0108] Acquisition module 601, used to acquire spatiotemporal data and task parameters required for model construction;
[0109] A standardization processing module 602 is used to standardize the spatiotemporal data based on the task parameters to obtain spatiotemporal graph data expressed in a standardized form;
[0110] A space construction module 603 is used to construct a search space corresponding to the target spatiotemporal prediction model based on the spatiotemporal graph data and task parameters;
[0111] The model acquisition module 604 is used to perform network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model based on the search space and spatiotemporal graph data to obtain the target spatiotemporal prediction model.
[0112] In one embodiment, the standardization processing module 602 is used to process time data based on time granularity to obtain a time sample set with consistent granularity; process spatial data based on space granularity to obtain a space sample set with consistent granularity; and construct spatiotemporal graph data expressed in a standardized manner based on the time sample set and the space sample set; wherein the spatiotemporal data includes time data and space data, and the task parameters include time granularity and space granularity.
[0113] In one embodiment, the standardization processing module 602 is used to construct a spatial graph by taking each spatial sampling point in the spatial sample set as a node and the distance between each two nodes as an edge; and / or, construct a spatial graph by taking each spatial sampling point in the spatial sample set as a node and the similarity between each two nodes as an edge; construct a time-varying sequence corresponding to each spatiotemporal graph based on the time sample set and at least one spatial graph; and obtain at least one set of spatiotemporal graph data based on at least one spatial graph and the time-varying sequence corresponding to each spatial graph.
[0114] In one embodiment, the model acquisition module 604 is used to fuse at least two sets of spatiotemporal graph data to obtain fused graph data after obtaining at least two sets of spatiotemporal graph data; based on the search space and the fused graph data, perform network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model to obtain the target spatiotemporal prediction model.
[0115] In one embodiment, the standardization processing module 602 is used to process time data based on time granularity to obtain an initial time sample set; when there is missing data at a time sampling point in the initial time sample set, obtain a filling value based on the time sampling point; and supplement the data of the initial time sample set with the filling value to obtain a time sample set.
[0116] In one embodiment, the normalization processing module 602 is configured to obtain padding values based on temporal proximity of the time sampling points; or based on spatial proximity of the time sampling points; or based on similarity of the time sampling points.
[0117] In one embodiment, the spatial construction module 603 is used to extract spatiotemporal graph features of spatiotemporal graph data; based on the spatiotemporal graph features and task parameters, determine the network search architecture and at least one operator of the target spatiotemporal prediction model, wherein the network search architecture includes at least one of a single-chain search space, a fully connected graph search space, and a unit-type search space, and the operator includes at least one of a time operator, a spatial operator, an external factor operator, a normalization operator, and a pooling operator; based on the network search architecture and at least one operator, construct a search space corresponding to the target spatiotemporal prediction model.
[0118] FIG7 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG7 , the electronic device may include: a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other via the communication bus 704. The processor 701 may call the logic instructions in the memory 703 to execute a model construction method, which includes: obtaining spatiotemporal data and obtaining task parameters required for model construction; based on the task parameters, normalizing the spatiotemporal data to obtain spatiotemporal graph data expressed in a standardized form; based on the spatiotemporal graph data and the task parameters, constructing a search space corresponding to a target spatiotemporal prediction model; based on the search space and the spatiotemporal graph data, performing a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model to obtain the target spatiotemporal prediction model.
[0119] In addition, the logic instructions in the above-mentioned memory 703 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the embodiment of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0120] On the other hand, the present disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the model construction method provided by the above methods, which includes: obtaining spatiotemporal data and obtaining task parameters required for model construction; based on the task parameters, standardizing the spatiotemporal data to obtain spatiotemporal graph data expressed in a standardized form; based on the spatiotemporal graph data and task parameters, constructing a search space corresponding to the target spatiotemporal prediction model; based on the search space and the spatiotemporal graph data, performing network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model to obtain the target spatiotemporal prediction model.
[0121] On the other hand, the present disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned model construction methods, the methods including: obtaining spatiotemporal data, and obtaining task parameters required for model construction; based on the task parameters, standardizing the spatiotemporal data to obtain spatiotemporal graph data expressed in a standardized form; based on the spatiotemporal graph data and the task parameters, constructing a search space corresponding to the target spatiotemporal prediction model; based on the search space and the spatiotemporal graph data, performing a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model to obtain the target spatiotemporal prediction model.
[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0123] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.
Claims
1. A model building method, comprising: Obtain spatiotemporal data and task parameters required for model building; Based on the task parameters, the spatiotemporal data is standardized to obtain spatiotemporal graph data expressed in a standardized form; Based on the spatiotemporal graph data and the task parameters, construct a search space corresponding to a target spatiotemporal prediction model; Based on the search space and the spatiotemporal graph data, a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model.
2. The model building method according to claim 1, wherein: The spatiotemporal data includes time data and space data, and the task parameters include time granularity and space granularity; The step of standardizing the spatiotemporal data based on the task parameters to obtain spatiotemporal graph data expressed in a standardized form includes: Based on the time granularity, the time data is processed to obtain a set of time samples with consistent granularity; Based on the spatial granularity, the spatial data is processed to obtain a set of spatial samples with consistent granularity; Based on the time sample set and the space sample set, the spatiotemporal graph data expressed in a standardized manner is constructed.
3. The model building method according to claim 2, wherein: The step of constructing the spatiotemporal graph data in a standardized expression based on the time sample set and the space sample set includes: Taking each of the spatial sampling points in the spatial sample set as a node and the distance between every two nodes as an edge, a spatial graph is constructed; and / or, taking each of the spatial sampling points in the spatial sample set as a node and the similarity between every two nodes as an edge to construct a spatial graph; Based on the time sample set and at least one of the spatial graphs, each of the The time-varying sequence corresponding to the space-time graph; At least one set of the spatiotemporal graph data is obtained based on at least one of the spatial graphs and the time-varying sequence corresponding to each of the spatial graphs.
4. The model building method according to claim 3, wherein: The performing of network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model based on the search space and the spatiotemporal graph data to obtain the target spatiotemporal prediction model includes: When at least two sets of the space-time graph data are obtained, fusing the at least two sets of the space-time graph data to obtain fused graph data; Based on the search space and the fusion graph data, a network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model are performed to obtain the target spatiotemporal prediction model.
5. The model building method according to claim 2, wherein: The processing of the time data based on the time granularity to obtain a set of time samples with consistent granularity includes: Based on the time granularity, the time data is processed to obtain an initial time sample set; When there is data missing at a time sampling point in the initial time sample set, obtaining a filling value based on the time sampling point; The initial time sample set is supplemented with data using the padding value to obtain the time sample set.
6. The model building method according to claim 5, wherein: The obtaining of the padding value based on the time sampling point includes: Based on the temporal proximity of the time sampling points, obtaining a padding value; Alternatively, the padding value is obtained based on the spatial proximity of the time sampling points; Alternatively, the padding value is obtained based on the similarity of the time sampling points.
7. The model building method according to claim 1, wherein: The step of constructing a search space corresponding to a target spatiotemporal prediction model based on the spatiotemporal graph data and the task parameters includes: Extracting space-time graph features of the space-time graph data; Based on the spatiotemporal graph features and the task parameters, determine a network search architecture and at least one operator of the target spatiotemporal prediction model, wherein the network search architecture includes at least one of a single-chain search space, a fully connected graph search space, and a cell type search space, and the operator includes at least one of a time operator, a space operator, an external factor operator, a normalization operator, and a pooling operator; Based on the network search architecture and at least one of the operators, the search space corresponding to the target spatiotemporal prediction model is constructed.
8. A model building device, comprising: The acquisition module is used to obtain spatiotemporal data and task parameters required for model construction; A standardization processing module, used for standardizing the spatiotemporal data based on the task parameters to obtain spatiotemporal graph data expressed in a standardized form; A space construction module, used to construct a search space corresponding to a target space-time prediction model based on the space-time graph data and the task parameters; A model acquisition module is used to perform network architecture search and network parameter optimization corresponding to the target spatiotemporal prediction model based on the search space and the spatiotemporal graph data to obtain the target spatiotemporal prediction model.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the model building method according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the model building method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Block pedestrian flow prediction method and system based on space-time diagram convolutional neural network
CN111612206A
Task allocation method based on space-time crowdsourcing worker behavior prediction
CN112328914A
Modeling method and device for spatio-temporal data, electronic equipment and readable medium
CN112396231A
Traffic flow prediction method for training convolutional neural network by using dynamic space-time diagram
CN112669606A
Network structure search method and system oriented to ultra-large search space and medium
CN114065003A
Cited By
Water flow behavior prediction method and device in deepwater high-rise pile cap construction
CN119025831A
A method and device for predicting water flow behavior in deep-water high-pile cap construction
CN119025831B
Data traffic classification method and device, equipment and medium
CN119179946A
Equipment defect prediction and model training method and device, equipment and storage medium
CN119202608A
Device defect prediction and model training method and device, apparatus, and storage medium
CN119202608B
