A method, apparatus, medium, and equipment for predicting parking space vacancy rate.
By constructing a spatial relationship map and environmental characteristics between parking lots, and combining a prediction model with historical vacancy rates and environmental information, the problem of predicting vacancy rates for multiple parking lots was solved, achieving more efficient and accurate prediction of parking space vacancy rates.
Patent Information
- Application Number
- CN202310493262.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2043-04-28
AI Technical Summary
Existing technologies cannot simultaneously consider the relationship between parking space vacancy rates and time within a region, as well as the spatial relationships between different parking lots, making it difficult to predict the future parking space vacancy rates of multiple parking lots.
A parking space vacancy rate prediction model is adopted, which includes a feature extraction network, a graph fusion network, and a result prediction network. It makes predictions by constructing a spatial relationship graph between parking lots and environmental features, combined with historical vacancy rates and environmental information.
It improves the efficiency and accuracy of parking space vacancy rate prediction, and can simultaneously consider the potential interaction between parking space vacancy rate and time, space and environment, providing more accurate vacancy rate prediction results for multiple parking lots.
Smart Images

Figure CN116758728B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, medium and device for predicting parking space vacancy rate. Background Technology
[0002] With the development of technology, artificial intelligence is advancing rapidly. Among them, machine learning models are widely used in the field of transportation big data.
[0003] Generally, machine learning models can be used to predict the parking space vacancy rate in a given area, allowing drivers to select parking spaces based on this prediction. However, the process of developing this model must consider not only the relationship between parking space vacancy rate and time within the area, but also the spatial relationships between different parking lots. Therefore, determining the future parking space vacancy rate of multiple parking lots simultaneously is a challenging problem.
[0004] Based on this, this application specification provides a method for predicting parking space vacancy rate. Summary of the Invention
[0005] This specification provides a method, apparatus, medium, and electronic device for predicting parking space vacancy rates, to at least partially solve the aforementioned problems existing in the prior art.
[0006] The following technical solution is adopted in this specification:
[0007] This specification provides a method for predicting parking space vacancy rates. The parking space vacancy rate prediction model includes: a feature extraction network, a graph fusion network, and a result prediction network; the method includes:
[0008] Determine the region to be predicted and the time to be predicted;
[0009] Obtain the parking space vacancy rate of each parking lot in the area to be predicted before the time to be predicted, and use it as the historical vacancy rate of each parking lot;
[0010] The historical vacancy rate of each parking lot is input into the feature extraction network to obtain a first feature; wherein, the first feature is used to characterize the relationship between the historical vacancy rate of each parking lot and time;
[0011] Construct a spatial relationship diagram between the parking lots within the area to be predicted;
[0012] The spatial relationship graph and the first feature are input into the graph fusion network to obtain the fused feature;
[0013] The fused features are input into the result prediction network to obtain the parking space vacancy rate of each parking lot in the prediction area at the time to be predicted.
[0014] Optionally, before inputting the spatial relationship graph and the first feature into the graph fusion network, the method further includes:
[0015] The historical vacancy rates of each parking lot are input into the feature extraction network to obtain a second feature; wherein, the second feature is used to characterize the similarity of the historical vacancy rates of each parking lot.
[0016] The spatial relationship graph and the first feature are input into the graph fusion network, specifically including:
[0017] The spatial relationship graph, the first feature, and the second feature are input into the graph fusion network.
[0018] Optionally, a spatial relationship diagram between parking lots within the area to be predicted is constructed, specifically including:
[0019] The spatial relationship graph is constructed using each parking lot in the area to be predicted as a node and the distance between each parking lot in the area to be predicted as the edge weight.
[0020] Optionally, the graph fusion network includes: an attention network and a graph convolutional network;
[0021] The spatial relationship graph, the first feature, and the second feature are input into the graph fusion network, specifically including:
[0022] The spatial relationship graph, the first feature, and the second feature are input into the attention network to obtain the attention-weighted output.
[0023] The output results and the historical usage rates of each parking lot are input into the graph convolutional network.
[0024] Optionally, the parking space vacancy rate prediction model further includes: an environmental feature extraction network;
[0025] Before inputting the fused features into the result prediction network, the method further includes:
[0026] Obtain environmental information of each parking lot in the area to be predicted before the time to be predicted, wherein the environmental information includes at least: weather information and holiday information;
[0027] The environmental information is input into the environmental feature extraction network to obtain environmental features;
[0028] The fused features are input into the result prediction network, specifically including:
[0029] The first feature, the fused feature, the environmental feature, and the historical vacancy rate of each parking lot are input into the result prediction network.
[0030] Optionally, the parking space vacancy rate prediction model is trained using the following method:
[0031] Obtain the parking space vacancy rate of each parking lot within a specified area at at least two historical time points;
[0032] Use the parking space vacancy rate of each parking lot at the latest historical time among the at least two historical times as a label, and use the parking space vacancy rate of each parking lot at other historical times as a sample;
[0033] The samples are input into the feature extraction network to obtain sample features; wherein, the sample features are used to characterize the relationship between the historical vacancy rate and time of each parking lot;
[0034] Construct a spatial relationship diagram between the parking lots within the specified area, as a sample spatial relationship diagram;
[0035] The sample spatial relationship graph and the sample features are input into the graph fusion network to obtain sample fusion features;
[0036] The sample fusion features are input into the result prediction network to obtain the predicted parking space vacancy rate of the specified area at the latest historical time.
[0037] The parking space vacancy rate prediction model is trained with the goal of minimizing the difference between the predicted parking space vacancy rate and the label.
[0038] This specification provides a device for predicting parking space vacancy rates. The parking space vacancy rate prediction model includes: a feature extraction network, a graph fusion network, and a result prediction network; including:
[0039] The determination module is used to determine the region to be predicted and the time to be predicted;
[0040] The acquisition module is used to acquire the parking space vacancy rate of each parking lot in the area to be predicted before the time to be predicted, as the historical vacancy rate of each parking lot;
[0041] The first input module inputs the historical vacancy rate of each parking lot into the feature extraction network to obtain a first feature; wherein, the first feature is used to characterize the relationship between the historical vacancy rate of each parking lot and time;
[0042] A construction module is used to construct a spatial relationship diagram between parking lots within the area to be predicted;
[0043] The second input module is used to input the spatial relationship graph and the first feature into the graph fusion network to obtain the fused feature;
[0044] The output module is used to input the fused features into the result prediction network to obtain the parking space vacancy rate of each parking lot in the prediction area at the time to be predicted.
[0045] Optionally, the first input module is specifically used to input the historical vacancy rate of each parking lot into the second feature extraction network to obtain a second feature; wherein the second feature is used to characterize the similarity of the historical vacancy rates of each parking lot; and to input the spatial relationship graph, the first feature, and the second feature into the graph fusion network.
[0046] Optionally, the construction module is specifically used to construct the spatial relationship graph using each parking lot in the area to be predicted as a node and the distance between each parking lot in the area to be predicted as the edge weight.
[0047] Optionally, the graph fusion network includes: an attention network and a graph convolutional network;
[0048] The second input module is specifically used to input the spatial relationship graph, the first feature, and the second feature into the attention network to obtain the attention-weighted output result; and to input the output result and the historical usage rate of each parking lot into the graph convolutional network.
[0049] Optionally, the parking space vacancy rate prediction model further includes: an environmental feature extraction network;
[0050] The device further includes: an environmental information input module;
[0051] The environmental information input module is specifically used to obtain the environmental information of each parking lot in the area to be predicted before the time to be predicted, as the environmental information of each parking lot, wherein the environmental information includes at least: weather information and holiday information; and input the environmental information of each parking lot into the environmental feature extraction network to obtain environmental features.
[0052] The output module is specifically used to input the first feature, the fused feature, the environmental feature, and the historical vacancy rate of each parking lot into the result prediction network.
[0053] Optionally, the device further includes: a training module;
[0054] The training module is specifically used to: obtain the parking space vacancy rate of each parking lot within a specified area at at least two historical time points; use the parking space vacancy rate of each parking lot at the latest historical time point as a label, and use the parking space vacancy rates of each parking lot at other historical time points as samples; input the samples into the feature extraction network to obtain sample features; wherein, the sample features are used to characterize the relationship between the historical vacancy rate of each parking lot and time; construct a spatial relationship graph among the parking lots within the specified area as a sample spatial relationship graph; input the sample spatial relationship graph and the sample features into the graph fusion network to obtain sample fusion features; input the sample fusion features into the result prediction network to obtain the predicted parking space vacancy rate of each parking lot within the specified area at the latest historical time point; and train the parking space vacancy rate prediction model with the optimization objective of minimizing the difference between the predicted parking space vacancy rate and the label.
[0055] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for predicting parking space vacancy rates.
[0056] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method for predicting parking space vacancy rates.
[0057] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0058] In the parking space vacancy rate prediction method provided in this specification, the parking space vacancy rates of each parking lot within the prediction area before the predicted time are input into the feature extraction network of the parking space vacancy rate prediction model to obtain a first feature characterizing the relationship between the parking space vacancy rate of each parking lot and time. The spatial relationship map of each parking lot within the prediction area and the first feature are then input into a graph fusion network to obtain a fusion feature characterizing the relationship between the parking space vacancy rate of each parking lot and time and space. This fusion feature is then input into the result prediction network of the parking space vacancy rate prediction model to obtain the parking space vacancy rate of each parking lot within the prediction area at the predicted time. Based on the relationship between parking space vacancy rate and time, the relationship between parking space vacancy rate and space, and the potential interaction between parking space vacancy rate and time and space, the prediction results of parking space vacancy rates for multiple parking lots within the prediction area are obtained simultaneously, improving the prediction efficiency and accuracy of the parking space vacancy rate. Attached Figure Description
[0059] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and their descriptions, serving to explain this specification and do not constitute an undue limitation thereof.
[0060] In the picture:
[0061] Figure 1 This is a flowchart illustrating a method for predicting parking space vacancy rate as described in this specification.
[0062] Figure 2 This is a schematic diagram of the parking space vacancy rate prediction model provided in this manual;
[0063] Figure 3 This manual provides a spatial relationship diagram of each parking lot.
[0064] Figure 4 A schematic diagram of a parking space vacancy rate prediction device provided in this specification;
[0065] Figure 5 The corresponding information provided in this specification Figure 1 A schematic diagram of an electronic device. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0067] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0068] Figure 1 This document provides a flowchart illustrating a method for predicting parking space vacancy rates, which may include the following steps:
[0069] S100: Determine the region to be predicted and the time to be predicted.
[0070] S102: Obtain the parking space vacancy rate of each parking lot in the area to be predicted before the time to be predicted, and use it as the historical vacancy rate of each parking lot.
[0071] The execution entity for this manual can be any computing device with computing capabilities (such as a server or terminal), which deploys a pre-trained parking space vacancy rate prediction model. This parking space vacancy rate prediction model includes: a feature extraction network, a graph fusion network, and a result prediction network, such as... Figure 2 As shown.
[0072] The computing device can then determine the area and time to be predicted. These can be derived from user input, meaning the user wants to know the parking space vacancy rate in the area at the predicted time. Alternatively, the area to be predicted can be the user's current location, and the predicted time can be the current moment. In other words, predictions can be made in real-time based on the user's driving route. The predicted area and time can also be pre-set, determined based on preset time thresholds and geographical regions.
[0073] Furthermore, in order to determine the relationship between the parking space vacancy rate and time for each parking lot within the prediction area using a parking space vacancy rate prediction model, the computing device can obtain the parking space vacancy rate of each parking lot within the prediction area before the prediction time, based on the prediction area and the prediction time, as the historical vacancy rate of each parking lot. For example, if the prediction area is District B of City A, and the prediction time is 18:30 on April 19th, then the computing device can obtain the parking space vacancy rate of each parking lot in District B of City A before 18:30 on April 19th. Assuming there are three parking lots X, Y, and Z in District B of City A, then the computing device can obtain the parking space vacancy rate of parking lot X at 18:29 on April 19th as follows: 20%; parking lot Y as: 30%; and parking lot Z as: 40%. At 18:24 on April 19th, the parking space vacancy rate of parking lot X is 19%; parking lot Y as: 20%; and parking lot Z as: 20%.
[0074] Specifically, when obtaining the parking space vacancy rate of each parking lot within the prediction area before the predicted time, the vacancy rate can be obtained based on a preset time interval. That is, starting from the predicted time, a sampling time is determined every preset time interval, and the parking space vacancy rate of each parking lot at the sampling time is obtained. For example, if the preset time interval is 5 minutes and the predicted time is 18:50, the parking space vacancy rates of each parking lot at 18:45, 18:40, etc., can be obtained.
[0075] It should be noted that there is no limit to the specific number of time intervals prior to the predicted time when the parking space vacancy rate of each parking lot within the prediction area should be obtained; it can be obtained as needed. For example, assuming the parking space vacancy rate prediction model requires the historical vacancy rates of each parking lot for five time intervals prior to the predicted time, then the historical vacancy rates of each parking lot for those five time intervals can be obtained. Furthermore, this parking space vacancy rate is determined based on all parking spaces in each parking lot and the available (vacant) parking spaces.
[0076] Furthermore, the parking space vacancy rate of each parking lot is calculated based on all parking spaces in each parking lot and the available (i.e., vacant) parking spaces.
[0077] S104: Input the historical vacancy rate of each parking lot into the feature extraction network to obtain a first feature; wherein, the first feature is used to characterize the relationship between the historical vacancy rate of each parking lot and time.
[0078] The computing device can then input the historical vacancy rate of each parking lot into the feature extraction network of the parking space vacancy rate prediction model to obtain the first feature used to characterize the relationship between the historical vacancy rate of each parking lot and time.
[0079] S106: Construct a spatial relationship diagram between the parking lots in the area to be predicted.
[0080] In one or more embodiments of this specification, after determining the area to be predicted and the time to be predicted in step S100 above, in order to determine the relationship between the parking space vacancy rate and space of each parking lot in the area to be predicted, a spatial relationship diagram between each parking lot in the area to be predicted can be constructed.
[0081] In constructing the spatial relationship graph, each parking lot within the area to be predicted can be used as a node, and the distance between the parking lots within the area to be predicted can be used as the edge weights. Continuing the example above, in District B of City A, there are three parking lots: X, Y, and Z. Assuming the distance from parking lot X to parking lot Y is 3km, the distance from parking lot X to parking lot Z is 5km, and the distance from parking lot Z to parking lot Y is 4km, then the following graph can be constructed: Figure 3 The spatial relationship diagram shown.
[0082] It should be noted that when constructing the spatial relationship graph, the distances between parking lots are actual travel distances, not straight-line distances. Based on an electronic map of the area to be predicted, the shortest road connecting two parking lots can be determined, resulting in a road topology map of the parking lots. Using this road topology map, the travel distance between two parking lots is determined, and this distance is used as the weight of the corresponding edge in the spatial relationship graph. Alternatively, travel time between parking lots can also be used as the edge weights in the spatial relationship graph.
[0083] Furthermore, when constructing this spatial relationship graph, an adjacency matrix can be used to represent the relationships between nodes (i.e., parking lots). The elements in the adjacency matrix represent the weights between two nodes. p represents the weight from node i to node j. ij p represents connectivity or proximity. ij The value should be normalized to between 0 and 1. Alternatively, a distance threshold can be set to establish edges only between nodes smaller than the distance threshold, thus obtaining a spatial relationship graph.
[0084] S108: Input the spatial relationship graph and the first feature into the graph fusion network to obtain the fused feature.
[0085] After obtaining a first feature representing the relationship between parking space vacancy rate and time for each parking lot in the prediction area and a spatial relationship map of each parking lot in the prediction area, the computing device can fuse the spatial relationship map with the first feature input map to obtain a fused feature representing the relationship between parking space vacancy rate and time and space for each parking lot.
[0086] The graph fusion network can include an attention network and a graph convolutional network. The attention network allows the parking space vacancy rate prediction model to selectively focus on key components. The graph convolutional network combines the features of the spatial relationship graph with the primary feature to output fused features.
[0087] The spatial relationship map and the first feature can then be input into an attention network to obtain an attention-weighted output. This output, along with the historical usage rates of each parking lot, can then be input into a convolutional network to obtain fused features.
[0088] It should be noted that when inputting the spatial relationship graph and the first feature into the attention network, since the spatial relationship graph actually represents an adjacency matrix, it is necessary to determine the dot product result of the first feature and the first feature, that is, to convert the first feature into a matrix form that is the same as the adjacency matrix represented by the spatial relationship graph, and then input the dot product result and the spatial relationship graph into the attention network.
[0089] S110: Input the fused features into the result prediction network to obtain the parking space vacancy rate of each parking lot in the area to be predicted at the time to be predicted.
[0090] Furthermore, the computing device can input the fusion features and the historical usage rate of each parking lot into the result prediction network to obtain the parking space vacancy rate of each parking lot in the prediction area at the time to be predicted.
[0091] Continuing with the previous example: the area to be predicted is District B of City A, and the time to be predicted is 18:30 on April 19th. The computing device can then obtain the parking space vacancy rate of each parking lot in District B of City A before 18:30 on April 19th. Assuming there are three parking lots, X, Y, and Z, in District B of City A, the computing device can obtain the parking space vacancy rate as follows: at 18:29 on April 19th, parking lot X has a vacancy rate of 20%, parking lot Y has a vacancy rate of 30%, and parking lot Z has a vacancy rate of 40%. At 18:24 on April 19th, parking lot X has a vacancy rate of 19%, parking lot Y has a vacancy rate of 20%, and parking lot Z has a vacancy rate of 20%. The parking space vacancy rates of each parking lot (i.e., the parking space vacancy rates of parking lot X at 18:29 on April 19th: 20%, parking lot Y: 30%, parking lot Z: 40%, and the parking space vacancy rates of parking lot X at 18:24 on April 19th: 19%, parking lot Y: 20%, and parking lot Z: 20%) and the fused features can be input into the result prediction network. Further assuming the predicted results are: the parking space vacancy rate of parking lot X at 18:30 on April 19th: 50%, the parking space vacancy rate of parking lot Y: 70%, and the parking space vacancy rate of parking lot Z: 40%.
[0092] based on Figure 1 The parking space vacancy rate prediction method provided in this specification involves inputting the parking space vacancy rates of each parking lot within the prediction area before the predicted time into the feature extraction network of the parking space vacancy rate prediction model to obtain a first feature characterizing the relationship between the parking space vacancy rate of each parking lot and time. The spatial relationship map of each parking lot within the prediction area and the first feature are then input into a graph fusion network to obtain a fusion feature characterizing the relationship between the parking space vacancy rate of each parking lot and time and space. This fusion feature is then input into the result prediction network of the parking space vacancy rate prediction model to obtain the parking space vacancy rate of each parking lot within the prediction area at the predicted time. Since the parking space vacancy rate is related not only to time but also to the spatial location of each parking lot—that is, the parking space vacancy rate differs depending on the time and spatial location—this method simultaneously obtains the parking space vacancy rate prediction results for multiple parking lots within the prediction area based on the relationship between parking space vacancy rate and time, the relationship between parking space vacancy rate and space, and the potential interaction between parking space vacancy rate and time and space. This improves the prediction efficiency and accuracy of the parking space vacancy rate prediction.
[0093] In one or more embodiments of this specification, since the parking space vacancy rates of each parking lot are the same at one time, the difference in parking space vacancy rates of each parking lot at the next time is generally not too large. Therefore, in order to improve the accuracy of the prediction results, the similarity of parking space vacancy rates of each parking lot at the same time before the time to be predicted can also be calculated to provide a hint to the model, so that the model can determine the similarity of parking space vacancy rates of each parking lot at the time to be predicted based on the similarity of parking space vacancy rates of each parking lot at the same time before the time to be predicted.
[0094] The feature extraction network can include a first feature extraction network and a second feature extraction network. The first feature extraction network is used to extract a first feature, which characterizes the relationship between the historical vacancy rate of each parking lot and time. The second feature extraction network is used to extract a second feature, which characterizes the similarity of the historical vacancy rates of each parking lot. The historical vacancy rates of each parking lot can be input into the first feature extraction network to obtain the first feature, and input into the second feature extraction network to obtain the second feature.
[0095] In one or more embodiments of this specification, the first feature extraction layer may be a gated recurrent unit (GRU), and the second feature extraction network may be a dynamic time warping (DTW).
[0096] The first feature extraction layer GRU includes two gates: the update gate z. t and r t , after inputting x t (i.e., the parking space vacancy rate of each parking lot at a time before the predicted time) and the reset gate r t and the previous hidden state h t-1 Combine and calculate candidate hidden states This represents the information that should be updated at the current moment. Then, it is used through the previous hidden state h. t-1 and the current candidate hidden state The weighted average value is used to obtain the hidden state h. t (i.e., the first feature), where the weights are the update gate z. t In this way, past and present information can be captured, enabling GRU to capture long-term dependencies in the input sequence (i.e., the parking space vacancy rate of each parking lot before the time to be predicted).
[0097] z t =σ(W z x t +U z h t-1 +b z )
[0098] r t =σ(W r x t +U r h t-1 +b r )
[0099]
[0100]
[0101] Where σ and tanh are the sigmoid and hyperbolic tangent activation functions, respectively, and W_, U_, and b_ are learnable weights and intercept terms.
[0102] In the second feature extraction network, the formula can be used. Calculate the similarity of historical vacancy rates between two nodes. Here, X and Y are the parking space vacancy rates of the two nodes before the predicted time, and d() is the Euclidean distance. We can find π such that the sum of the squared distances between the parking space vacancy rates of the two nodes before the predicted time is minimized, thus obtaining the minimum sum. The value of DTW(X, Y) is the square root of this minimum sum, which represents the similarity between the parking space vacancy rates of the two nodes in each parking lot before the predicted time.
[0103] In step S108 above, the first feature, the second feature, and the spatial relationship graph can be input into the graph fusion network to obtain the fused features. Specifically, the first feature, the second feature, and the spatial relationship graph can be input into the attention network of the graph fusion network to obtain the output result, and then the output result can be input into the graph convolutional network to obtain the fused features.
[0104] In this context, attention networks are used to selectively focus on specific parts of the input sequence when generating the output. The basic principle of an attention network is to weight each input element according to its importance to the output at a particular step. Therefore, the model can selectively focus on the most critical parts of the input while ignoring less critical parts. The attention calculation is shown below:
[0105]
[0106] Where Q can be the dot product of the first feature, K can be the second feature, and V can be the spatial relationship graph. kLet Q and K represent the dimensions. Dividing the product of Q and K by the square root of their dimensions helps stabilize the gradient during training. By using an attention network, the parking space vacancy rate prediction model can simultaneously focus on different aspects of the first feature, the second feature, and the spatial relationship graph, extracting temporal and spatial information, and finally obtaining the attention-weighted output. This improves the accuracy and comprehensiveness of the parking space vacancy rate prediction model.
[0107] Secondly, when using the GCN network, the spectral graph convolution method is employed. First, the normalized graph Laplacian matrix is calculated based on the fused features:
[0108]
[0109] Where, D = diag(d i ) is a degree matrix, d i =∑ j A ij It is the degree of the i-th node. The convolution operation is defined by the following formula:
[0110]
[0111] in, C0 = x,
[0112] To further simplify the calculation and avoid overfitting, a first-order approximation of the graph Laplacian is generally used to calculate the convolution. The final convolutional layer operation used is as follows:
[0113]
[0114] Where σ is the linear rectified function (ReLU).
[0115] Attention networks and GCN networks can effectively capture spatiotemporal dependencies and improve prediction accuracy. Furthermore, attention networks allow the parking space vacancy rate prediction model to selectively focus on important parts of the input sequence, thereby enhancing its generalization ability.
[0116] Furthermore, the parking space vacancy rate varies in different environments, meaning that the parking space vacancy rate of each parking lot is affected by the environment. Therefore, in one or more embodiments of this specification, the parking space vacancy rate prediction model further includes an environmental feature extraction network.
[0117] Before inputting the fused features into the result prediction network, the computing device can also acquire environmental information of each parking lot in the area to be predicted before the time to be predicted. This environmental information is then input into the environmental feature extraction network to obtain environmental features. Finally, the first feature, the fused features, the environmental features, and the historical vacancy rate of each parking lot are input into the result prediction network to obtain the parking space vacancy rate of each parking lot in the area to be predicted at the time to be predicted.
[0118] The environmental information includes at least weather information and holiday information.
[0119] Furthermore, in one or more embodiments of this specification, the environmental feature extraction network may be a GRU, and the result prediction network may be a multilayer perceptron (MLP).
[0120] Furthermore, in one or more embodiments of this specification, a training method for a parking space vacancy rate prediction model is also provided.
[0121] Specifically, the computing device first obtains the parking space vacancy rate of each parking lot within a specified area at at least two historical time points. The parking space vacancy rate at the latest historical time point is used as the label, and the vacancy rates at other historical time points are used as samples. These samples are then input into a feature extraction network to obtain sample features. A spatial relationship graph between the parking lots within the specified area is also constructed as the sample spatial relationship graph. The sample spatial relationship graph and the sample features are then input into a fusion network to obtain fused sample features. These fused features are then input into a result prediction network to obtain the predicted parking space vacancy rate for each parking lot within the specified area at the latest historical time point. Finally, the parking space vacancy rate prediction model is trained with the optimization objective of minimizing the difference between the predicted parking space vacancy rate and the label. That is, the parameters of the feature extraction network, the graph fusion network, and the result prediction network are adjusted.
[0122] The sample features are used to characterize the relationship between the historical vacancy rate and time of each parking lot.
[0123] It should be noted that when training the parking space vacancy rate prediction model, a single input sample can be the parking space vacancy rate of each parking lot at multiple historical moments.
[0124] In one or more embodiments of this specification, when the feature extraction network includes a first feature extraction network and a second feature extraction network, the graph fusion network includes an attention network and a graph convolutional network, and the parking space vacancy rate prediction model also includes an environmental feature extraction network, then the samples can first be input into the first feature extraction network to obtain first sample features, and then the samples can be input into the second feature extraction network to obtain second sample features. A sample spatial relationship graph of each parking lot within a specified area is then constructed. Then, the dot product result of the first sample features multiplied by the first sample features, the second sample features, and the sample spatial relationship graph are input into the attention network to obtain the attention-weighted sample output result, and the sample output result is input into the graph convolutional network to obtain the sample fusion features.
[0125] Furthermore, environmental information of each parking lot within a specified area can be obtained as sample environmental information. This sample environmental information is then input into an environmental feature extraction network to obtain sample environmental features.
[0126] Finally, the sample fusion features, sample environment features, first sample features, and sample input result prediction network are combined to obtain the predicted parking space vacancy rate for the specified area at the latest historical time. The parking space vacancy rate prediction model is trained with the optimization objective of minimizing the difference between the predicted parking space vacancy rate and the label.
[0127] The optimization objective is to minimize the difference between the predicted parking space vacancy rate and the label, and to adjust the parameters of the first feature extraction network, the second feature extraction network, the attention network, the graph convolutional network, the environmental feature extraction network, and the result prediction network.
[0128] In one or more embodiments of this specification, the predicted parking space vacancy rate of each parking lot within the prediction area can be published to the cloud. Users can obtain the prediction results through communication between the cloud and the computing device, eliminating the need for computation and storage on the computing device itself. This improves computational efficiency and saves storage space.
[0129] Furthermore, it can predict the parking space vacancy rate of each parking lot in the area to be predicted at multiple future times, so that users can plan their travel routes in advance according to their own travel needs and actual conditions, avoid wasting time and resources, and improve the traffic efficiency and quality of the area to be predicted.
[0130] Based on the parking space vacancy rate prediction method described above, this specification also provides a corresponding schematic diagram of a parking space vacancy rate prediction device, as shown in the embodiments. Figure 4 As shown.
[0131] Figure 4This is a schematic diagram of a parking space vacancy rate prediction device provided in an embodiment of this specification. The parking space vacancy rate prediction model includes: a feature extraction network, a graph fusion network, and a result prediction network; the device includes:
[0132] The determination module 402 is used to determine the region to be predicted and the time to be predicted.
[0133] The acquisition module 406 is used to acquire the parking space vacancy rate of each parking lot in the area to be predicted before the time to be predicted, as the historical vacancy rate of each parking lot.
[0134] The first input module 408 inputs the historical vacancy rate of each parking lot into the feature extraction network to obtain a first feature; wherein, the first feature is used to characterize the relationship between the historical vacancy rate of each parking lot and time;
[0135] Construction module 404 is used to construct a spatial relationship diagram between parking lots within the area to be predicted;
[0136] The second input module 410 is used to input the spatial relationship graph and the first feature into the graph fusion network to obtain the fused feature;
[0137] Output module 414 is used to input the fused features into the result prediction network to obtain the parking space vacancy rate of each parking lot in the prediction area at the time to be predicted.
[0138] Optionally, the first input module 408 is specifically used to input the historical vacancy rate of each parking lot into the second feature extraction network to obtain a second feature; wherein the second feature is used to characterize the similarity of the historical vacancy rates of each parking lot; and input the spatial relationship graph, the first feature, and the second feature into the graph fusion network.
[0139] Optionally, the construction module 404 is specifically used to construct the spatial relationship graph using each parking lot in the area to be predicted as a node and the distance between each parking lot in the area to be predicted as the weight of the edge.
[0140] Optionally, the graph fusion network includes: an attention network and a graph convolutional network;
[0141] The second input module 410 is specifically used to input the spatial relationship graph, the first feature, and the second feature into the attention network to obtain the attention-weighted output result; and to input the output result and the historical usage rate of each parking lot into the graph convolutional network.
[0142] Optionally, the parking space vacancy rate prediction model further includes: an environmental feature extraction network;
[0143] The device further includes: an environmental information input module 412;
[0144] The environmental information input module 412 is specifically used to acquire the environmental information of each parking lot in the area to be predicted before the time to be predicted, as the environmental information of each parking lot, wherein the environmental information includes at least: weather information and holiday information; and input the environmental information of each parking lot into the environmental feature extraction network to obtain environmental features.
[0145] The output module 414 is specifically used to input the first feature, the fused feature, the environmental feature, and the historical vacancy rate of each parking lot into the result prediction network.
[0146] Optionally, the device further includes: a training module 400;
[0147] The training module 400 is specifically used to: obtain the parking space vacancy rate of each parking lot in a specified area at at least two historical moments; use the parking space vacancy rate of each parking lot at the latest historical moment among the at least two historical moments as a label, and use the parking space vacancy rate of each parking lot at other historical moments as samples; input the samples into the feature extraction network to obtain sample features; wherein, the sample features are used to characterize the relationship between the historical vacancy rate of each parking lot and time; construct a spatial relationship graph among the parking lots in the specified area as a sample spatial relationship graph; input the sample spatial relationship graph and the sample features into the graph fusion network to obtain sample fusion features; input the sample fusion features into the result prediction network to obtain the predicted parking space vacancy rate of each parking lot in the specified area at the latest historical moment; and train the parking space vacancy rate prediction model with the optimization objective of minimizing the difference between the predicted parking space vacancy rate and the label.
[0148] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the parking space vacancy rate prediction method described above.
[0149] Based on the parking space vacancy rate prediction method described above, the embodiments in this specification also propose... Figure 3 The diagram shows a schematic structural representation of the electronic device. Figure 3 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to implement the parking space vacancy rate prediction method described above.
[0150] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0151] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0152] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0153] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0154] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0155] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0156] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0157] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0158] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0159] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0160] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0161] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0162] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0163] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0164] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0165] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0166] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this application.
Claims
1. A method for predicting parking space vacancy rate, characterized in that, The parking space vacancy rate prediction model includes: a feature extraction network, a graph fusion network, and a result prediction network; the method includes: Determine the region to be predicted and the time to be predicted; Obtain the parking space vacancy rate of each parking lot in the area to be predicted before the time to be predicted, and use it as the historical vacancy rate of each parking lot; The historical vacancy rate of each parking lot is input into the feature extraction network to obtain a first feature; wherein, the first feature is used to characterize the relationship between the historical vacancy rate of each parking lot and time; The historical vacancy rates of each parking lot are input into the feature extraction network to obtain a second feature; wherein, the second feature is used to characterize the similarity of the historical vacancy rates of each parking lot. Construct a spatial relationship diagram between the parking lots within the area to be predicted; The spatial relationship graph, the first feature, and the second feature are input into the graph fusion network to obtain the fused feature; The fused features are input into the result prediction network to obtain the parking space vacancy rate of each parking lot in the prediction area at the time to be predicted.
2. The method as described in claim 1, characterized in that, Constructing a spatial relationship diagram among the parking lots within the area to be predicted specifically includes: The spatial relationship graph is constructed using each parking lot in the area to be predicted as a node and the distance between each parking lot in the area to be predicted as the edge weight.
3. The method as described in claim 1, characterized in that, The graph fusion network includes: an attention network and a graph convolutional network; The spatial relationship graph, the first feature, and the second feature are input into the graph fusion network, specifically including: The spatial relationship graph, the first feature, and the second feature are input into the attention network to obtain the attention-weighted output. The output results and the historical usage rates of each parking lot are input into the graph convolutional network.
4. The method as described in claim 3, characterized in that, The parking space vacancy rate prediction model also includes: an environmental feature extraction network; Before inputting the fused features into the result prediction network, the method further includes: Obtain environmental information of each parking lot in the area to be predicted before the time to be predicted, wherein the environmental information includes at least: weather information and holiday information; The environmental information is input into the environmental feature extraction network to obtain environmental features; The fused features are input into the result prediction network, specifically including: The first feature, the fused feature, the environmental feature, and the historical vacancy rate of each parking lot are input into the result prediction network.
5. The method as described in claim 1, characterized in that, The parking space vacancy rate prediction model is trained using the following method: Obtain the parking space vacancy rate of each parking lot within a specified area at at least two historical time points; Use the parking space vacancy rate of each parking lot at the latest historical time among the at least two historical times as a label, and use the parking space vacancy rate of each parking lot at other historical times as a sample; The samples are input into the feature extraction network to obtain sample features; wherein, the sample features are used to characterize the relationship between the historical vacancy rate and time of each parking lot; Construct a spatial relationship diagram between the parking lots within the specified area, as a sample spatial relationship diagram; The sample spatial relationship graph and the sample features are input into the graph fusion network to obtain sample fusion features; The sample fusion features are input into the result prediction network to obtain the predicted parking space vacancy rate of the specified area at the latest historical time. The parking space vacancy rate prediction model is trained with the goal of minimizing the difference between the predicted parking space vacancy rate and the label.
6. A device for predicting parking space vacancy rate, characterized in that, The parking space vacancy rate prediction model includes: a feature extraction network, a graph fusion network, and a result prediction network; the device specifically includes: The determination module is used to determine the region to be predicted and the time to be predicted; The acquisition module is used to acquire the parking space vacancy rate of each parking lot in the area to be predicted before the time to be predicted, as the historical vacancy rate of each parking lot; The first input module inputs the historical vacancy rate of each parking lot into the feature extraction network to obtain a first feature; wherein, the first feature is used to characterize the relationship between the historical vacancy rate of each parking lot and time; The historical vacancy rates of each parking lot are input into the feature extraction network to obtain a second feature; wherein, the second feature is used to characterize the similarity of the historical vacancy rates of each parking lot. A construction module is used to construct a spatial relationship diagram between parking lots within the area to be predicted; The second input module is used to input the spatial relationship graph, the first feature, and the second feature into the graph fusion network to obtain the fused feature; The output module is used to input the fused features into the result prediction network to obtain the parking space vacancy rate of each parking lot in the prediction area at the time to be predicted.
7. The apparatus as claimed in claim 6, characterized in that, The construction module is specifically used to construct the spatial relationship graph using each parking lot in the area to be predicted as a node and the distance between each parking lot in the area to be predicted as the weight of the edge.
8. The apparatus as claimed in claim 6, characterized in that, The graph fusion network includes: an attention network and a graph convolutional network; The second input module is specifically used to input the spatial relationship graph, the first feature, and the second feature into the attention network to obtain the attention-weighted output result; and to input the output result and the historical usage rate of each parking lot into the graph convolutional network.
9. The apparatus as claimed in claim 8, characterized in that, The parking space vacancy rate prediction model also includes: an environmental feature extraction network; The device further includes: an environmental information input module; The environmental information input module is specifically used to obtain the environmental information of each parking lot in the area to be predicted before the time to be predicted, as the environmental information of each parking lot, wherein the environmental information includes at least: weather information and holiday information; and input the environmental information of each parking lot into the environmental feature extraction network to obtain environmental features. The output module is specifically used to input the first feature, the fused feature, the environmental feature, and the historical vacancy rate of each parking lot into the result prediction network.
10. The apparatus as claimed in claim 6, characterized in that, The device further includes: a training module; The training module is specifically used to: obtain the parking space vacancy rate of each parking lot within a specified area at at least two historical time points; use the parking space vacancy rate of each parking lot at the latest historical time point as a label, and use the parking space vacancy rates of each parking lot at other historical time points as samples; input the samples into the feature extraction network to obtain sample features; wherein, the sample features are used to characterize the relationship between the historical vacancy rate of each parking lot and time; construct a spatial relationship graph among the parking lots within the specified area as a sample spatial relationship graph; input the sample spatial relationship graph and the sample features into the graph fusion network to obtain sample fusion features; input the sample fusion features into the result prediction network to obtain the predicted parking space vacancy rate of each parking lot within the specified area at the latest historical time point; and train the parking space vacancy rate prediction model with the optimization objective of minimizing the difference between the predicted parking space vacancy rate and the label.
11. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1-5.
12. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1-5.
Citation Information
Patent Citations
Regional traffic prediction method and equipment
CN113643532A