Intelligent parking lot parking space prediction method based on space-time Transform-LSTM

By using a spatiotemporal Transformer-LSTM-based approach, this method utilizes global millimeter-wave radar and multi-sensor data acquisition, combined with CNN, LSTM, and Transformer networks for parking space status assessment. This solves the problems of dynamic response and information processing lag in traditional parking management systems for parking space prediction, and achieves efficient parking space status prediction and management.

CN121600744APending Publication Date: 2026-03-03CCCC YANGTZE CONSTRUCTION & DEVELOPMENT GROUP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510752576.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-02-21
Filing Date
2025-06-06
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing parking management systems suffer from a lack of advanced data analysis capabilities, a lack of dynamic response capabilities, and lagging information processing in parking space prediction. As a result, they are unable to cope with dynamic changes in traffic flow, leading to low prediction accuracy and low parking space utilization.

Method used

A smart parking lot space prediction method based on spatiotemporal Transformer-LSTM is adopted. Data is collected by full-domain millimeter-wave radar and multiple sensors, spatiotemporal features are extracted using CNN and LSTM networks, and parking space status is evaluated by combining Transformer network. The model is updated in real time to improve prediction accuracy.

Benefits of technology

It enables accurate prediction of parking space status, timely response to changes in environment and traffic flow, and improves parking space management efficiency and user parking experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600744A_ABST
    Figure CN121600744A_ABST
Patent Text Reader

Abstract

The invention discloses a smart parking lot parking space prediction method based on space-time Transform-LSTM, and the method comprises the steps: 1), obtaining the data of a current smart parking lot, and carrying out the integration, and obtaining the feature data of the parking lot; 2) inputting the parking lot feature data into a parking space state evaluation model to obtain a parking space occupation state of the parking lot; and 3) outputting the parking space occupation state of the parking lot to a user interface of the parking management system in real time. The method has the advantages of being high in dynamic adjustment capability, capable of processing various kinds of advanced information and high in prediction accuracy, and the parking space management efficiency and the parking experience of a user can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of parking space prediction technology, specifically a smart parking space prediction method based on spatiotemporal Transformer-LSTM. Background Technology

[0002] Against the backdrop of accelerating urbanization, smart city construction has become an inevitable trend globally. Smart industrial parks, as a key component of the grand blueprint of smart cities, are undeniably important. Among them, parking management systems occupy a prominent position, and their efficient operation plays a crucial role in ensuring smooth daily traffic flow and continuous environmental improvement within the park. However, with the continuous growth of vehicle ownership, traditional parking management systems are gradually revealing their inadequacies in areas such as parking space prediction and resource optimization.

[0003] Currently, most modern parking management systems have significant shortcomings. On the one hand, they provide extremely limited information and lack accurate predictions. The root cause lies in the relatively outdated sensing technology, which can only process the most basic static data. This directly leads to low prediction efficiency and an inability to make timely and accurate predictions based on dynamic changes in the external environment, resulting in low parking space utilization. Specifically, existing technologies have significant deficiencies in the following key aspects:

[0004] 1. Lack of advanced data analysis capabilities: Existing parking management systems can only process basic static data such as whether parking spaces are occupied, and they are completely unable to analyze and predict more complex advanced data such as pedestrian flow and environmental changes.

[0005] 2. Lack of dynamic responsiveness: Traditional parking management systems often struggle to cope effectively with situations such as reduced traffic flow due to severe weather or a significant increase in traffic flow during holidays. Their pre-set thresholds cannot be adjusted in a timely manner, failing to adapt to dynamic changes in traffic volume.

[0006] 3. Information processing lag: When traffic volume is high, traditional parking management systems struggle to process information in a timely manner, making real-time parking space prediction impossible and severely impacting the efficiency of users finding parking spaces.

[0007] Therefore, how to develop a smart park parking space prediction method based on new technologies has become a key issue that urgently needs to be addressed by those skilled in the art. Summary of the Invention

[0008] The purpose of this invention is to provide a smart parking lot space prediction method based on spatiotemporal Transformer-LSTM, comprising the following steps:

[0009] 1) Utilize full-area millimeter-wave radar and multiple sensors to continuously track and collect parking lot full-area detection data and key road segment data within the past t time period, and use them as traffic operation status characteristics at different levels; the key road segments are those with an average daily traffic flow of greater than or equal to ε times;

[0010] 2) The central processing unit processes the parking lot's full-area detection data through spatial information rasterization to obtain the vehicle distribution in the parking lot at any given time.

[0011] By using CNN spatial feature convolution and long short-term memory network to extract the temporal pattern of vehicle distribution in parking lot, the full-domain spatiotemporal features of vehicle distribution in parking lot are obtained.

[0012] 3) Utilize a multi-channel long short-term memory network to extract the spatiotemporal features of traffic parameter statistics for each key road segment, and then fuse and reduce the dimensions to obtain the statistical fusion features of key traffic flow points within the parking lot;

[0013] 4) The spatiotemporal features of the entire domain and the statistical fusion features of key traffic flow points in the parking lot are jointly input into the Transformer network to train the operational features under different traffic conditions and the distribution differences in high-dimensional space, thereby obtaining the parking space status assessment model.

[0014] 5) Acquire current smart parking lot data and integrate it to obtain parking lot feature data;

[0015] 6) Input the parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status of the parking lot;

[0016] 7) Output the parking space occupancy status of the parking lot to the user interface of the parking management system in real time.

[0017] Furthermore, in step 1), the steps for collecting the parking lot's full-area detection data and key road sections over the past time period t include:

[0018] 1.1) Parking lot full-area detection data collected by full-area millimeter-wave radar or multi-camera continuous tracking technology, thereby dynamically describing the operating status of each vehicle in the parking lot; the operating status includes parking space number p and driving speed v;

[0019] 1.2) Environmental data (t, {E}) of key road sections in the smart parking lot over a past time period t is obtained through various environmental sensors and parking space monitoring sensors. K}); t represents the acquisition time, {E K} represents environmental parameters; environmental parameters include temperature, humidity, and light intensity.

[0020] Furthermore, step 2) involves extracting the spatiotemporal feature distribution of the entire parking lot, including:

[0021] 2.1) Spatial rasterization processing is performed on the parking lot detection data. The smart parking lot's full-area detection data is rasterized parking lot information X. t ,Right now:

[0022]

[0023] In the formula, L = parking lot length / l, S = parking lot width / l; l is the fixed space sliding window;

[0024] 2.2) Construct a CNN network with multiple CNN convolutional layers, and use the CNN network to extract the global detection data X. t The spatial features are used to obtain a spatial feature sequence;

[0025] The spatial features are shown below:

[0026]

[0027] In the formula: S(u, v) represents the positional eigenvalue of (u, v) in the spatial eigenvalue matrix, x s+u,l+v ψ represents the element value of the parking lot grid matrix, χ represents the convolution kernel, and χ represents a 0-1 variable that controls the range of the convolution by the convolution size n.

[0028] 2.3) Using the spatial feature sequence as input, it passes through the input gate i in the Long Short-Term Memory network. t Forgotten Gate t Output gate o t Information exchange between them, and the unit state θ t The iterative propagation of the spatial characteristic matrix S at time t t The temporal features are extracted to obtain the spatiotemporal features of the entire parking lot.

[0029] The Long Short-Term Memory (LSTM) network is shown below:

[0030] f t =σ(W f ·[F′ t-1 S t ]+b f (5)

[0031] i t =σ(W i ·[F′ t-1 S t ]+b i (6)

[0032] o t =σ(W t ·[F′ t-1 S t ]+b o (7)

[0033] θ t =f t ·θ t-1 +i t ·σ(W θ ·[F′ t-1 S t ]+b θ (8)

[0034] F′ t =o t ·tanh(θ t (9)

[0035] Among them, W f W i W t W θ Indicates the input gate i t Forgotten Gate t Output gate o t , unit state weight vector, b f b i b o b θ Indicates input gate i t Forgotten Gate t Output gate o t 1. Cell state bias term; σ() represents the activation function, F′ t-1 S represents the temporal features after LSTM processing; t Spatial features. t f t o t The outputs of the input gate, forget gate, and output gate are respectively; θ t This is the unit state.

[0036] Furthermore, in step 3), the steps of extracting the spatiotemporal characteristics of traffic parameter statistics for each key road segment using a multi-channel long short-term memory network include:

[0037] 3.1) Calculate the traffic parameters for each road segment of the parking lot and concatenate them sequentially into a traffic flow parameter vector, which will serve as the input to the multi-channel long short-term memory network; whereby the traffic flow parameter vector for road segment i of the parking lot is denoted as... These represent the traffic flow, time occupancy rate, and average vehicle speed of parking segment i within the time interval m*, respectively.

[0038] 3.2) A multi-channel long short-term memory network is used to extract the spatiotemporal features of traffic parameter statistics for each key road segment, obtaining the temporal features of each key road segment. Then, the temporal features of each key road segment are concatenated to obtain the feature set.

[0039] The temporal characteristics of key road segment i are denoted as follows:

[0040] 3.3) Features The input is fed into a fully connected feature fusion layer to obtain statistical fusion features of key traffic flow points within the parking lot, namely:

[0041]

[0042] in: W represents the statistical fusion feature. FC With b FC This represents the weight vector and bias term of the fully connected layer. σ is the activation function.

[0043] Furthermore, in step 4), the steps for training the Transformer network are as follows:

[0044] 4.1) Incorporate global spatiotemporal features Statistical characteristics splicing to form joint features

[0045] The combined input is fed into the Transformer network to incorporate global spatiotemporal features. Statistical characteristics splicing to form joint features As input;

[0046] 4.2) Combined features The input is fed into the Transformer layer of the Transformer network to obtain high-dimensional features. Right now:

[0047]

[0048] In the formula: W QTr W KTr W VTr Let d represent the weight vector. key Indicates the dimension of the key encoding. It is a feature after self-attention; Q Tr K Tr V Tr Encode the query position, key, and value; Att(Q Tr K Tr () represents the attention score;

[0049] 4.3) High-dimensional features The input to the Softmax layer of the Transformer network abstracts the risk state partitioning process as follows:

[0050]

[0051] In the formula: C is the risk status classification tree; F represents the probability values ​​for different categories, ranging from [0,1]; i F j High-dimensional features for different categories;

[0052] 4.4) Using parking space data as a sample j, the true risk status category y i And calculate the objective function. Right now:

[0053]

[0054] In the formula: N represents the number of training samples, y i This indicates the true risk status category of sample j. Let be the predicted risk category of the model for sample j.

[0055] 4.5) Determine the objective function If the condition is met, training ends and the parking space status assessment model is output; otherwise, the spatiotemporal features and statistical features of the entire domain are reacquired, and the process returns to step 4.1. min This is a preset threshold.

[0056] Furthermore, in step 5), the steps for adjusting the parameters of the parking space status assessment model include:

[0057] 5.1) Integrate external environmental factor data as input to the predictive model, that is:

[0058] E t =β1·W t +β2·A t (16)

[0059] Among them, E t W represents the environmental impact score at time t. t Indicates the corresponding weather conditions, A t β1 and β2 represent the impact of activities during the same period, respectively, and are the corresponding weight parameters.

[0060] 5.2) Feature selection is performed using machine learning algorithms, resulting in:

[0061] IG(Y, X) K )=H(Y)-H(Y|X K (17)

[0062] Among them, IG(Y, X) K () represents information gain, Y is the parking space status, X is... KIt is the k-th feature, H represents entropy, used to measure the amount of uncertainty reduced by feature Xk when predicting Y; H(Y) represents the information entropy of Y; H(Y|Xk) K ) represents a known feature X K Under the given conditions, the conditional entropy of Y;

[0063] 5.3) Construct a feature fusion model to initially predict parking space status using historical data, i.e.:

[0064] P t =f(W1E t +W2H t +b)(18)

[0065] Among them, P t E is the probability of a parking space being vacant at time t. t and H t W1 and W2 represent environmental characteristics and historical usage characteristics, respectively. W1 and W2 are weight matrices, b is the bias, and f is the activation function.

[0066] Furthermore, in step 6), the step of inputting parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status includes:

[0067] 6.1) Deploy a real-time data receiving module to collect data from parking space monitoring sensors, environmental sensors, and image acquisition devices;

[0068] 6.2) Input the data received in real time in step 6.1) into the prediction model to obtain:

[0069] P free (t)=σ(W p ·F t +b p (19)

[0070] Among them, P free (t) represents the probability of a parking space being vacant at time t, Ft represents the feature fusion output from the hybrid model, Wp and bp are used to predict the relationship between image data and environmental data as weights and biases; σ is the activation function that converts the linear output into a probability.

[0071] 6.3) Configure a real-time update mechanism and use an online learning strategy to update the parking space status assessment model:

[0072]

[0073]

[0074] Where, θ updated and θ current These are the updated and current parking space status evaluation model parameters, respectively, where α is the learning rate and L(X) is the learning rate.new Y new ;θ current X is the loss function, representing the gradient of the loss function with respect to the parameter θ. new and Y new It is the newly received data and its tags. This is the gradient symbol.

[0075] Furthermore, step 7), which involves outputting the parking space occupancy status of the parking lot to the user interface of the parking management system in real time, includes:

[0076] The user interface is used to provide parking space status information to parking lot managers and users.

[0077] The technical effectiveness of this invention is undeniable. It comprehensively utilizes a self-attention neural network (Transformer), a long short-term memory network (LSTM), and a convolutional neural network (CNN) to obtain comprehensive traffic flow data and key road segment parameter statistics by detecting parking lot image data. By analyzing time series data, it accurately predicts the occupancy status of parking spaces. Compared to traditional deep learning-based smart parking systems, the introduction of the Transformer model effectively improves prediction accuracy. This invention can respond promptly to changes in the surrounding environment and traffic flow. Furthermore, it features a real-time model update mechanism, continuously adjusting based on the input model parameters. This invention boasts strong dynamic adjustment capabilities, the ability to handle various advanced information types, and high prediction accuracy, significantly improving parking management efficiency and the user's parking experience. Attached Figure Description

[0078] Figure 1 This is a diagram illustrating the overall architecture of a smart park parking space prediction method. Detailed Implementation

[0079] The present invention will be further described below with reference to embodiments, but it should not be construed that the scope of the present invention is limited to the following embodiments. Various substitutions and modifications made based on ordinary technical knowledge and common practices in the art without departing from the above-described technical concept of the present invention should be included within the scope of protection of the present invention.

[0080] Example 1:

[0081] See Figure 1 The smart parking space prediction method based on spatiotemporal Transformer-LSTM includes the following steps:

[0082] 1) Utilize full-area millimeter-wave radar and multiple sensors to continuously track and collect parking lot full-area detection data and key road segment data within the past t time period, and use them as traffic operation status characteristics at different levels; the key road segments are those with an average daily traffic flow exceeding ε = 5000 times.

[0083] 2) The central processing unit processes the parking lot's full-area detection data through spatial information rasterization to obtain the vehicle distribution in the parking lot at any given time.

[0084] By using CNN spatial feature convolution and long short-term memory network to extract the temporal pattern of vehicle distribution in parking lot, the full-domain spatiotemporal features of vehicle distribution in parking lot are obtained.

[0085] 3) Utilize a multi-channel long short-term memory network to extract the spatiotemporal features of traffic parameter statistics for each key road segment, and then fuse and reduce the dimensions to obtain the statistical fusion features of key traffic flow points within the parking lot;

[0086] 4) The spatiotemporal features of the entire domain and the statistical fusion features of key traffic flow points in the parking lot are jointly input into the Transformer network to train the operational features under different traffic conditions and the distribution differences in high-dimensional space, thereby obtaining the parking space status assessment model.

[0087] 5) Acquire current smart parking lot data and integrate it to obtain parking lot feature data;

[0088] 6) Input the parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status of the parking lot;

[0089] 7) Output the parking space occupancy status of the parking lot to the user interface of the parking management system in real time.

[0090] Step 1), which involves collecting parking lot area detection data and key road segment data over the past time period t, includes the following steps:

[0091] 1.1) Parking lot full-area detection data collected by full-area millimeter-wave radar or multi-camera continuous tracking technology, thereby dynamically describing the operating status of each vehicle in the parking lot; the operating status includes parking space number p and driving speed v;

[0092] 1.2) Environmental data (t, {E}) of key road sections in the smart parking lot over a past time period t is obtained through various environmental sensors and parking space monitoring sensors. K}); t represents the acquisition time, {E K} represents environmental parameters; environmental parameters include temperature, humidity, and light intensity.

[0093] Step 2) involves extracting the spatiotemporal feature distribution of the entire parking lot, including the following steps:

[0094] 2.1) Spatial rasterization processing is performed on the parking lot detection data. The smart parking lot's full-area detection data is rasterized parking lot information X. t ,Right now:

[0095]

[0096] in,

[0097] In the formula, L = parking lot length / l, S = parking lot width / l; l is the fixed space sliding window;

[0098] 2.2) Construct a CNN network with multiple CNN convolutional layers, and use the CNN network to extract the global detection data X. t The spatial features are used to obtain a spatial feature sequence;

[0099] The spatial features are shown below:

[0100]

[0101]

[0102] In the formula: S(u, v) represents the positional eigenvalue of (u, v) in the spatial eigenvalue matrix, x s+u,l+v ψ represents the element value of the parking lot grid matrix, χ represents the convolution kernel, and χ represents a 0-1 variable that controls the range of the convolution by the convolution size n.

[0103] 2.3) Using the spatial feature sequence as input, it passes through the input gate i in the Long Short-Term Memory network. t Forgotten Gate t Output gate o t Information exchange between them, and the unit state θ t The iterative propagation of the spatial characteristic matrix S at time t t The temporal features are extracted to obtain the spatiotemporal features of the entire parking lot.

[0104] The Long Short-Term Memory (LSTM) network is shown below:

[0105] f t =σ(W f ·[F′ t-1 S t ]+b f (5)

[0106] i t =σ(W i ·[F′ t-1 S t ]+b i (6)

[0107] o t=σ(W t ·[F′ t-1 S t ]+b o (7)

[0108] θ t =f t ·θ t-1 +i t ·σ(W θ ·[F′ t-1 S t ]+b θ (8)

[0109] F′ t =o t ·tanh(θ t (9)

[0110] Among them, W f W i W t W θ Indicates the input gate i t Forgotten Gate t Output gate o t , unit state weight vector, b f b i b o b θ Indicates input gate i t Forgotten Gate t Output gate o t 1. Cell state bias term; σ() represents the activation function, F′ t-1 S represents the temporal features after LSTM processing; t Spatial features. t f t o t The outputs of the input gate, forget gate, and output gate are respectively; θ t This is the unit state.

[0111] Step 3), which involves using a multi-channel long short-term memory network to extract the spatiotemporal characteristics of traffic parameter statistics for each key road segment, includes the following steps:

[0112] 3.1) Calculate the traffic parameters for each road segment of the parking lot and concatenate them sequentially into a traffic flow parameter vector, which will serve as the input to the multi-channel long short-term memory network; whereby the traffic flow parameter vector for road segment i of the parking lot is denoted as... These represent the traffic flow, time occupancy rate, and average vehicle speed of parking segment i within the time interval m*, respectively.

[0113] 3.2) A multi-channel long short-term memory network is used to extract the spatiotemporal features of traffic parameter statistics for each key road segment, obtaining the temporal features of each key road segment. Then, the temporal features of each key road segment are concatenated to obtain the feature set.

[0114] The temporal characteristics of key road segment i are denoted as follows:

[0115] 3.3) Features The input is fed into a fully connected feature fusion layer to obtain statistical fusion features of key traffic flow points within the parking lot, namely:

[0116]

[0117] in: W represents the statistical fusion feature. FC With b FC This represents the weight vector and bias term of the fully connected layer. σ is the activation function.

[0118] In step 4), the steps for training the Transformer network are as follows:

[0119] 4.1) Incorporate global spatiotemporal features Statistical characteristics splicing to form joint features

[0120] The combined input is fed into the Transformer network to incorporate global spatiotemporal features. Statistical characteristics splicing to form joint features As input;

[0121] 4.2) Combined features The input is fed into the Transformer layer of the Transformer network to obtain high-dimensional features. Right now:

[0122]

[0123] In the formula: Let d represent the weight vector. key Indicates the dimension of the key encoding. It is a feature after self-attention; Q Tr K Tr V Tr Encode the query position, key, and value; Att(Q Tr K Tr () represents the attention score;

[0124] 4.3) High-dimensional features The input to the Softmax layer of the Transformer network abstracts the risk state partitioning process as follows:

[0125]

[0126] In the formula: C is the risk status classification tree; F represents the probability values ​​for different categories, ranging from [0,1]; i F j High-dimensional features for different categories;

[0127] 4.4) Using parking space data as a sample j, the true risk status category y i And calculate the objective function. Right now:

[0128]

[0129] In the formula: N represents the number of training samples, y i This indicates the true risk status category of sample j. Let be the predicted risk category of the model for sample j.

[0130] 4.5) Determine the objective function If the condition is met, training ends and the parking space status assessment model is output; otherwise, the spatiotemporal features and statistical features of the entire domain are reacquired, and the process returns to step 4.1. min This is a preset threshold.

[0131] Step 5) involves adjusting the parameters of the parking space status assessment model, including:

[0132] 5.1) Integrate external environmental factor data as input to the predictive model, that is:

[0133] E t =β1·W t +β2·A t (16)

[0134] Among them, E t W represents the environmental impact score at time t. t Indicates the corresponding weather conditions, A t β1 and β2 represent the impact of activities during the same period, respectively, and are the corresponding weight parameters.

[0135] 5.2) Feature selection is performed using machine learning algorithms, resulting in:

[0136] IG(Y, X) K )=H(Y)-H(Y|X K (17)

[0137] Among them, IG(Y, X) K () represents information gain, Y is the parking space status, X is... K It is the k-th feature, H represents entropy, used to measure the amount of uncertainty reduced by feature Xk when predicting Y; H(Y) represents the information entropy of Y; H(Y|Xk) K ) represents a known feature X K Under the given conditions, the conditional entropy of Y;

[0138] 5.3) Construct a feature fusion model to initially predict parking space status using historical data, i.e.:

[0139] P t =f(W1E t +W2H t +b)(18)

[0140] Among them, P t E is the probability of a parking space being vacant at time t. t and H t W1 and W2 represent environmental characteristics and historical usage characteristics, respectively. W1 and W2 are weight matrices, b is the bias, and f is the activation function.

[0141] Step 6), which involves inputting parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status, includes the following steps:

[0142] 6.1) Deploy a real-time data receiving module to collect data from parking space monitoring sensors, environmental sensors, and image acquisition devices;

[0143] 6.2) Input the data received in real time in step 6.1) into the prediction model to obtain:

[0144] P free (t)=σ(W p ·F t +b p (19)

[0145] Among them, P free F(t) represents the probability that a parking space is available at time t. t W represents the feature fusion output from the hybrid model. p and b p Weights and biases are used to predict the relationship between image data and environmental data; σ is an activation function used to convert linear outputs into probabilities.

[0146] 6.3) Configure a real-time update mechanism and use an online learning strategy to update the parking space status assessment model:

[0147]

[0148] Where, θ updatedand θ current These are the updated and current parking space status evaluation model parameters, respectively, where α is the learning rate and L(X) is the learning rate. new Y new ;θ current X is the loss function, representing the gradient of the loss function with respect to the parameter θ. new and Y bew It is the newly received data and its tags. This is the gradient symbol.

[0149] Step 7), which involves outputting the parking space occupancy status of the parking lot to the user interface of the parking management system in real time, includes:

[0150] The user interface is used to provide parking space status information to parking lot managers and users.

[0151] Example 2:

[0152] The smart parking space prediction method based on spatiotemporal Transformer-LSTM includes the following steps:

[0153] 1) Utilize full-area millimeter-wave radar and multiple sensors to continuously track and collect parking lot full-area detection data and key road segment data within the past t time period, and use them as traffic operation status characteristics at different levels;

[0154] 2) The central processing unit processes the parking lot's full-area detection data through spatial information rasterization to obtain the vehicle distribution in the parking lot at any given time.

[0155] By using CNN spatial feature convolution and long short-term memory network to extract the temporal pattern of vehicle distribution in parking lot, the full-domain spatiotemporal features of vehicle distribution in parking lot are obtained.

[0156] 3) Utilize a multi-channel long short-term memory network to extract the spatiotemporal features of traffic parameter statistics for each key road segment, and then fuse and reduce the dimensions to obtain the statistical fusion features of key traffic flow points within the parking lot;

[0157] 4) The spatiotemporal features of the entire domain and the statistical fusion features of key traffic flow points in the parking lot are jointly input into the Transformer network to train the operational features under different traffic conditions and the distribution differences in high-dimensional space, thereby obtaining the parking space status assessment model.

[0158] 5) Acquire current smart parking lot data and integrate it to obtain parking lot feature data;

[0159] 6) Input the parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status of the parking lot;

[0160] 7) Output the parking space occupancy status of the parking lot to the user interface of the parking management system in real time.

[0161] Example 3:

[0162] The smart parking space prediction method based on spatiotemporal Transformer-LSTM is the same as in Example 2. Further, in step 1), the step of collecting the parking lot's full-area detection data and key road sections over the past time period t includes:

[0163] 1.1) Parking lot full-area detection data collected by full-area millimeter-wave radar or multi-camera continuous tracking technology, thereby dynamically describing the operating status of each vehicle in the parking lot; the operating status includes parking space number p and driving speed v;

[0164] 1.2) Environmental data (t, {E}) of key road sections in the smart parking lot over a past time period t is obtained through various environmental sensors and parking space monitoring sensors. K}); t represents the acquisition time, {E K} represents environmental parameters; environmental parameters include temperature, humidity, and light intensity.

[0165] Example 4:

[0166] The method for predicting parking spaces in a smart parking lot based on spatiotemporal Transformer-LSTM has the same technical content as any one of embodiments 2-3. Further, step 2) involves extracting the spatiotemporal feature distribution of the entire parking lot, including:

[0167] 2.1) Spatial rasterization processing is performed on the parking lot detection data. The smart parking lot's full-area detection data is rasterized parking lot information X. t ,Right now:

[0168]

[0169] in,

[0170] In the formula, L = parking lot length / l, S = parking lot width / l; l is the fixed space sliding window;

[0171] 2.2) Construct a CNN network with multiple CNN convolutional layers, and use the CNN network to extract the global detection data X. t The spatial features are used to obtain a spatial feature sequence;

[0172] The spatial features are shown below:

[0173]

[0174] In the formula: S(u, v) represents the positional eigenvalue of (u, v) in the spatial eigenvalue matrix, xs+u,l+v ψ represents the element value of the parking lot grid matrix, χ represents the convolution kernel, and χ represents a 0-1 variable that controls the range of the convolution by the convolution size n.

[0175] 2.3) Using the spatial feature sequence as input, it passes through the input gate i in the Long Short-Term Memory network. t Forgotten Gate t Output gate o t Information exchange between them, and the unit state θ t The iterative propagation of the spatial characteristic matrix S at time t t The temporal features are extracted to obtain the spatiotemporal features of the entire parking lot.

[0176] The Long Short-Term Memory (LSTM) network is shown below:

[0177] f t =σ(W f ·[F′ t-1 S t ]+b f (5)

[0178] i t =σ(W i ·[F′ t-1 S t ]+b i (6)

[0179] o t =σ(W t ·[F′ t-1 S t ]+b o (7)

[0180] θ t =f t ·θ t-1 +i t ·σ(W θ ·[F′ t-1 S t ]+b θ (8)

[0181] F′ t =o t ·tanh(θ t (9)

[0182] Among them, W f W i W t W θ Indicates the input gate i t Forgotten Gate t Output gate o t , unit state weight vector, bf b i b o b θ Indicates input gate i t Forgotten Gate t Output gate o t 1. Cell state bias term; σ() represents the activation function, F′ t-1 S represents the temporal features after LSTM processing; t It is a spatial feature.

[0183] Example 5:

[0184] The method for predicting parking spaces in a smart parking lot based on spatiotemporal Transformer-LSTM has the same technical content as any one of embodiments 2-4. Further, in step 3), the step of extracting the spatiotemporal characteristics of traffic parameter statistics for each key road segment using a multi-channel long short-term memory network includes:

[0185] 3.1) Calculate the traffic parameters for each road segment of the parking lot and concatenate them sequentially into a traffic flow parameter vector, which will serve as the input to the multi-channel long short-term memory network; whereby the traffic flow parameter vector for road segment i of the parking lot is denoted as... These represent the traffic flow, time occupancy rate, and average vehicle speed of parking segment i within the time interval m*, respectively.

[0186] 3.2) A multi-channel long short-term memory network is used to extract the spatiotemporal features of traffic parameter statistics for each key road segment, obtaining the temporal features of each key road segment. Then, the temporal features of each key road segment are concatenated to obtain the feature set.

[0187] The temporal characteristics of key road segment i are denoted as follows:

[0188] 3.3) Features The input is fed into a fully connected feature fusion layer to obtain statistical fusion features of key traffic flow points within the parking lot, namely:

[0189]

[0190] in: W represents the statistical fusion feature. FC With b FC This represents the weight vector and bias term of the fully connected layer.

[0191] Example 6:

[0192] The smart parking space prediction method based on spatiotemporal Transformer-LSTM has the same technical content as any one of embodiments 2-5. Further, in step 4), the steps for training the Transformer network are as follows:

[0193] 4.1) Incorporate global spatiotemporal features Statistical characteristics splicing to form joint features

[0194] The combined input is fed into the Transformer network to incorporate global spatiotemporal features. Statistical characteristics splicing to form joint features As input;

[0195] 4.2) Combined features The input is fed into the Transformer layer of the Transformer network to obtain high-dimensional features. Right now:

[0196]

[0197]

[0198] In the formula: Let d represent the weight vector. key Indicates the dimension of the key encoding. It is a feature after self-attention; Q Tr K Tr V Tr Encode the query position, key, and value; Att(Q Tr K Tr () represents the attention score;

[0199] 4.3) High-dimensional features The input to the Softmax layer of the Transformer network abstracts the risk state partitioning process as follows:

[0200]

[0201] In the formula: C is the risk status classification tree; F represents the probability values ​​for different categories, ranging from [0,1]; i F j High-dimensional features for different categories;

[0202] 4.4) Using parking space data as a sample j, the true risk status category y i And calculate the objective function. Right now:

[0203]

[0204] In the formula: N represents the number of training samples, y i This indicates the true risk status category of sample j. Let be the predicted risk category of the model for sample j.

[0205] 4.5) Determine the objective function If the condition is met, training ends and the parking space status assessment model is output; otherwise, the spatiotemporal features and statistical features of the entire domain are reacquired, and the process returns to step 4.1. min This is a preset threshold.

[0206] Example 7:

[0207] The smart parking space prediction method based on spatiotemporal Transformer-LSTM has the same technical content as any one of embodiments 2-6. Further, in step 5), the step of adjusting the parameters of the parking space status evaluation model includes:

[0208] 5.1) Integrate external environmental factor data as input to the predictive model, that is:

[0209] E t =β1·W t +β2·A t (16)

[0210] Where Et represents the environmental impact score at time t, Wt represents the corresponding weather conditions, At represents the impact of activities during the same period, and β1 and β2 are the corresponding weight parameters.

[0211] 5.2) Feature selection is performed using machine learning algorithms, resulting in:

[0212] IG(Y, X) K )=H(Y)-H(Y|X K (17)

[0213] Where IG represents information gain, Y is the parking space status, Xk is the k-th feature, and H represents entropy, which measures the amount of uncertainty that feature Xk reduces when predicting Y.

[0214] 5.3) Construct a feature fusion model to initially predict parking space status using historical data, i.e.:

[0215] P t =f(W1E t +W2H t +b)(18)

[0216] Where Pt is the probability of parking space vacancy at time t, Et and Ht represent environmental features and historical usage features, respectively, W1 and W2 are weight matrices, b is the bias, and f is the activation function.

[0217] Example 8:

[0218] The smart parking lot space prediction method based on spatiotemporal Transformer-LSTM has the same technical content as any one of embodiments 2-7. Further, in step 6), the step of inputting parking lot feature data into the parking space status evaluation model to obtain the parking space occupancy status includes:

[0219] 6.1) Deploy a real-time data receiving module to collect data from parking space monitoring sensors, environmental sensors, and image acquisition devices;

[0220] 6.2) Input the data received in real time in step 6.1) into the prediction model to obtain:

[0221] P free (t)=σ(W p ·F t +b p (19)

[0222] Among them, P free F(t) represents the probability that a parking space is available at time t. t W represents the feature fusion output from the hybrid model. p and b p Weights and biases are used to predict the relationship between image data and environmental data; σ is an activation function used to convert linear outputs into probabilities.

[0223] 6.3) Configure a real-time update mechanism and use an online learning strategy to update the parking space status assessment model:

[0224]

[0225] Where, θ updated and θ current These are the updated and current parking space status evaluation model parameters, respectively, where α is the learning rate and L(X) is the learning rate. new Y new ;θ current X is the loss function, representing the gradient of the loss function with respect to the parameter θ. new and Y new It is the newly received data and its tags.

[0226] Example 9:

[0227] The smart parking lot space prediction method based on spatiotemporal Transformer-LSTM has the same technical content as any one of embodiments 2-8. Further, step 7), which involves outputting the parking space occupancy status of the parking lot to the user interface of the parking management system in real time, includes:

[0228] The user interface is used to provide parking space status information to parking lot managers and users.

[0229] Example 10:

[0230] The smart parking space prediction method based on spatiotemporal Transformer-LSTM includes the following steps:

[0231] 1) Use full-area millimeter-wave radar or multiple sensors to continuously track and collect parking lot full-area detection data and key road segment data within the past t time period, and use this as the traffic operation status characteristics at different levels.

[0232] 2) The central processing unit (CPU) processes the parking lot's full-area detection data through spatial information rasterization to obtain the vehicle distribution in the parking lot at each moment. Then, it extracts the temporal patterns through CNN spatial feature convolution and long short-term memory network to obtain the full-area spatiotemporal features of the vehicle distribution in the parking lot.

[0233] 3) Utilize a multi-channel long short-term memory network to extract the spatiotemporal features of traffic parameter statistics for each key road segment, and then fuse and reduce the dimensions to obtain the statistical fusion features of key traffic flow points within the parking lot;

[0234] 4) The spatiotemporal features and aggregated statistical features of the entire domain are jointly input into the Transformer network. The operational features under different traffic conditions are trained with large samples to obtain the parking space status assessment model in a high-dimensional space.

[0235] 5) Acquire current smart parking lot data and integrate it to obtain parking lot feature data;

[0236] 6) Input the parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status of the parking lot;

[0237] 7) Output the parking space occupancy status of the parking lot to the user interface of the parking management system in real time.

[0238] 2. The smart parking lot space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, in step 1), the parking lot full-area detection data is first collected by full-area millimeter-wave radar or multi-camera continuous tracking technology. This data can accurately depict and dynamically represent the operating status of each vehicle in the parking lot (including: parking space number p, driving speed v, etc.).

[0239] Secondly, environmental data (t, {E}) of key road sections in the smart parking lot over a past time period t is obtained through various environmental sensors and parking space monitoring sensors. K}), t represents the acquisition time, {E K} represents environmental parameters; environmental parameters include temperature, humidity, and light intensity;

[0240] The combined input of these two types of data can comprehensively and accurately reflect the traffic status of the parking lot, laying a solid information foundation for the parking space status assessment model.

[0241] Step 2) involves extracting the spatiotemporal feature distribution of the entire parking lot, including the following steps:

[0242] 2.1) First, the parking lot detection data is processed into a spatial raster. The smart parking lot's full-area detection data is the rasterized parking lot information X. t ,Right now:

[0243]

[0244] in,

[0245] In the formula, L = parking lot length / l, S = parking lot width / l; l is the fixed space sliding window; it is recommended that the value of l for the space sliding window be 5m-10m.

[0246] Raster Matrix X t The data is used as the basis for input into the subsequent CNN convolutional neural network; a set of time-series matrices can reflect the vehicle operation status within the parking lot area M, such as vehicle location information and operating speed information.

[0247] 2.2) Construct a CNN network with multiple CNN convolutional layers, and use the CNN network to extract the global detection data X. t The spatial features are used to obtain a spatial feature sequence;

[0248] The spatial features are shown below:

[0249]

[0250] In the formula: S(u, v) represents the positional eigenvalue of (u, v) in the spatial eigenvalue matrix, x s+u,l+v ψ represents the element value of the parking lot grid matrix, χ represents the convolution kernel, and χ represents a 0-1 variable that controls the range of the convolution by the convolution size n.

[0251] 2.3) Using the spatial feature sequence as input, it passes through the input gate i in the Long Short-Term Memory network. t Forgotten Gate t Output gate o t Information exchange between them, and the unit state θt The iterative propagation of the spatial characteristic matrix S at time t t Extracting temporal features from the data;

[0252] The Long Short-Term Memory (LSTM) network is shown below:

[0253] f t =σ(W f ·[F′ t-1 S t ]+b f (5)

[0254] i t =σ(W i ·[F′ t-1 S t ]+b i (6)

[0255] o t =σ(W t ·[F′ t-1 S t ]+b o (7)

[0256] θ t =f t ·θ t-1 +i t ·σ(W θ ·[F′ t-1 S t ]+b θ (8)

[0257] F′ t =o t ·tanh(θ t (9)

[0258] Among them, W f W i W t W θ Indicates the input gate i t Forgotten Gate t Output gate o t , unit state weight vector, b f b i b o b θ Indicates input gate i t Forgotten Gate t Output gate o t 1. Cell state bias term; σ() represents the activation function, F′ t-1 S represents the temporal features after LSTM processing; tThis represents the spatial characteristics. Ultimately, the spatiotemporal characteristics of the entire parking lot are obtained.

[0259] Step 3), which involves using a multi-channel long short-term memory network to extract the spatiotemporal characteristics of traffic parameter statistics for each key road segment, includes the following steps:

[0260] 3.1) Collective statistics of traffic parameters on key road sections

[0261] Taking any parking lot segment i as an example, calculate the traffic flow Q, time occupancy rate K, and average vehicle speed V within a time interval m* for that segment; then concatenate them sequentially into a set of traffic flow parameter vectors. This reflects the statistical description of traffic parameters for road segment i at time t. Traffic parameters for each road segment near the parking lot are processed according to the same time interval and splicing order, and used as model input.

[0262] 3.2) The spatiotemporal characteristics of traffic parameter statistics for each key road segment are extracted using a multi-channel long short-term memory network to obtain the temporal characteristics of each key road segment; wherein, the temporal characteristics of key road segment i are denoted as... The temporal features of each key road segment are concatenated to obtain the feature set.

[0263] 3.3) Features The input is fed into a fully connected feature fusion layer to obtain statistical fusion features of key traffic flow points within the parking lot, namely:

[0264]

[0265] in: W represents the statistical fusion feature. FC With b FC This represents the weight vector and bias term of the fully connected layer.

[0266] In step 4), the steps for training the Transformer network are as follows:

[0267] 4.1) Incorporate global spatiotemporal features Statistical characteristics splicing to form joint features

[0268] The combined input is fed into the Transformer network to incorporate global spatiotemporal features. Statistical characteristics splicing to form joint features As input;

[0269] 4.2) Combined features The input is fed into the Transformer layer of the Transformer network to obtain high-dimensional features. Right now:

[0270]

[0271] In the formula: Let d represent the weight vector. key Indicates the dimension of the key encoding. It is a feature after self-attention; Q Tr K Tr V Tr Encode the query position, key, and value; Att(Q Tr K Tr () represents the attention score;

[0272] 4.3) High-dimensional features The input to the Softmax layer of the Transformer network abstracts the risk state partitioning process as follows:

[0273]

[0274] In the formula: C is the risk status classification tree; F represents the probability values ​​for different categories, ranging from [0,1]; i F j High-dimensional features for different categories;

[0275] 4.4) Using parking space data as a sample j, the true risk status category y i And calculate the objective function. Right now:

[0276]

[0277] In the formula: N represents the number of training samples, y i This indicates the true risk status category of sample j. Let be the predicted risk category of the model for sample j.

[0278] 4.5) Determine the objective function If the condition is met, training ends and the parking space status assessment model is output; otherwise, the spatiotemporal features and statistical features of the entire domain are reacquired, and the process returns to step 4.1. min This is a preset threshold.

[0279] 6. The intelligent parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, in step 5), the step of adjusting the parameters of the parking space status evaluation model includes:

[0280] 5.1) Integrate external environmental factor data as input to the predictive model, that is:

[0281] E t =β1·W t +β2·A t (16)

[0282] Where Et represents the environmental impact score at time t, Wt represents the corresponding weather conditions, At represents the impact of activities during the same period, and β1 and β2 are the corresponding weight parameters.

[0283] 5.2) Feature selection is performed using machine learning algorithms, resulting in:

[0284] IG(Y, X) K )=H(Y)-H(Y|X K (17)

[0285] Where IG represents information gain, Y is the parking space status, Xk is the k-th feature, and H represents entropy, which measures the amount of uncertainty that feature Xk reduces when predicting Y.

[0286] 5.3) Construct a feature fusion model to initially predict parking space status using historical data, i.e.:

[0287] P t =f(W1E t +W2H t +b)(18)

[0288] Where Pt is the probability of parking space vacancy at time t, Et and Ht represent environmental features and historical usage features, respectively, W1 and W2 are weight matrices, b is the bias, and f is the activation function.

[0289] Step 6), which involves inputting parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status, includes the following steps:

[0290] 6.1) Deploy a real-time data receiving module to collect data from parking space monitoring sensors, environmental sensors, and image acquisition devices;

[0291] 6.2) Input the data received in real time in step 6.1) into the prediction model to obtain:

[0292] P free (t)=σ(W p ·F t +b p (19)

[0293] Among them, P free (t) represents the probability of a parking space being vacant at time t, Ft represents the feature fusion output from the hybrid model, Wp and bp are used to predict the relationship between image data and environmental data as weights and biases; σ is the activation function that converts the linear output into a probability.

[0294] 6.3) Configure a real-time update mechanism and use an online learning strategy to update the parking space status assessment model:

[0295]

[0296] Where, θ updated and θ current These are the updated and current parking space status evaluation model parameters, respectively, where α is the learning rate and L(X) is the learning rate. new Y new ;θ current X is the loss function, representing the gradient of the loss function with respect to the parameter θ. new and Y new It is the newly received data and its tags.

[0297] Step 7), which involves outputting the parking space occupancy status of the parking lot to the user interface of the parking management system in real time, includes:

[0298] The user interface provides parking space status information to parking lot managers and users. This interface is specifically designed to intuitively display current and predicted parking space occupancy.

Claims

1. A smart parking lot space prediction method based on spatiotemporal Transformer-LSTM, characterized in that, Includes the following steps: 1) Utilize full-area millimeter-wave radar and multiple sensors to continuously track and collect parking lot full-area detection data and key road segment data within the past t time period, and use them as traffic operation status characteristics at different levels; The key road sections are those with an average daily traffic volume of ε times or more; 2) The central processing unit processes the parking lot's full-area detection data through spatial information rasterization to obtain the vehicle distribution in the parking lot at any given time. By using CNN spatial feature convolution and long short-term memory network to extract the temporal pattern of vehicle distribution in parking lot, the full-domain spatiotemporal features of vehicle distribution in parking lot are obtained. 3) Utilize a multi-channel long short-term memory network to extract the spatiotemporal features of traffic parameter statistics for each key road segment, and then fuse and reduce the dimensions to obtain the statistical fusion features of key traffic flow points within the parking lot; 4) The spatiotemporal features of the entire domain and the statistical fusion features of key traffic flow points in the parking lot are jointly input into the Transformer network to train the operational features under different traffic conditions and the distribution differences in high-dimensional space, thereby obtaining the parking space status assessment model. 5) Acquire current smart parking lot data and integrate it to obtain parking lot feature data; 6) Input the parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status of the parking lot; 7) Output the parking space occupancy status of the parking lot to the user interface of the parking management system in real time.

2. The smart parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, Step 1), which involves collecting parking lot area detection data and key road segment data over the past time period t, includes the following steps: 1.1) Parking lot full-area detection data collected by full-area millimeter-wave radar or multi-camera continuous tracking technology, thereby dynamically describing the operating status of each vehicle in the parking lot; the operating status includes parking space number p and driving speed v; 1.2) Environmental data (t, {E}) of key road sections in the smart parking lot over a past time period t is obtained through various environmental sensors and parking space monitoring sensors. K }); t represents the acquisition time, {E K } represents environmental parameters; environmental parameters include temperature, humidity, and light intensity.

3. The intelligent parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, Step 2) involves extracting the spatiotemporal feature distribution of the entire parking lot, including the following steps: 2.1) Spatial rasterization processing is performed on the parking lot detection data. The smart parking lot's full-area detection data is rasterized parking lot information X. t ,Right now: in, In the formula, L = parking lot length / l, S = parking lot width / l; l is the fixed space sliding window; 2.2) Construct a CNN network with multiple CNN convolutional layers, and use the CNN network to extract the global detection data X. t The spatial features are used to obtain a spatial feature sequence; The spatial features are shown below: In the formula: S(u, v) represents the positional eigenvalue of (u, v) in the spatial eigenvalue matrix, x s+u,l+v ψ represents the element value of the parking lot grid matrix, χ represents the convolution kernel, and χ represents a 0-1 variable that controls the range of the convolution by the convolution size n. 2.3) Using the spatial feature sequence as input, it passes through the input gate i in the Long Short-Term Memory network. t Forgotten Gate t Output gate o t Information exchange between them, and the unit state θ t The iterative propagation of the spatial characteristic matrix S at time t t The temporal features are extracted to obtain the spatiotemporal features of the entire parking lot. The Long Short-Term Memory (LSTM) network is shown below: f t =σ(W f ·[F′ t-1 ,S t ]+b f ) (5) I t =σ(W i ·[F′ t-1 ,S t ]+b i ) (6) the t =σ(W t ·[F′ t-1 ,S t ]+b o ) (7) i t =f t ·i t-1 +i t ·σ(W θ ·[F t ′ -1 ,S t ]+b θ ) (8) F′ t =o t ·tanh(θ t ) (9) Among them, W f W i W t W θ Indicates the input gate i t Forgotten Gate t Output gate o t Unit state weight vector, b f b i b o b θ Indicates input gate i t Forgotten Gate t Output gate o t 1. Cell state bias term; σ() represents the activation function, F′ t-1 S represents the temporal features after LSTM processing; t For spatial features; i t f t o t The outputs of the input gate, forget gate, and output gate are respectively; θ t This is the unit state.

4. The intelligent parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, Step 3), which involves using a multi-channel long short-term memory network to extract the spatiotemporal characteristics of traffic parameter statistics for each key road segment, includes the following steps: 3.1) Calculate the traffic parameters for each road segment of the parking lot and concatenate them sequentially into a traffic flow parameter vector, which will serve as the input to the multi-channel long short-term memory network; whereby the traffic flow parameter vector for road segment i of the parking lot is denoted as... These represent the traffic flow, time occupancy rate, and average vehicle speed of parking segment i within the time interval m*, respectively. 3.2) A multi-channel long short-term memory network is used to extract the spatiotemporal features of traffic parameter statistics for each key road segment, obtaining the temporal features of each key road segment. Then, the temporal features of each key road segment are concatenated to obtain the feature set. The temporal characteristics of key road segment i are denoted as follows: 3.3) Features The input is fed into a fully connected feature fusion layer to obtain statistical fusion features of key traffic flow points within the parking lot, namely: in: W represents the statistical fusion feature. FC With b FC σ represents the weight vector and bias term of the fully connected layer; σ is the activation function.

5. The intelligent parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, In step 4), the steps for training the Transformer network are as follows: 4.1) Incorporate global spatiotemporal features Statistical characteristics splicing to form joint features The combined input is fed into the Transformer network to incorporate global spatiotemporal features. Statistical characteristics splicing to form joint features As input; 4.2) Combined features The input is fed into the Transformer layer of the Transformer network to obtain high-dimensional features. Right now: In the formula: Let d represent the weight vector. key Indicates the dimension of the key encoding. These are features following self-attention; Q Tr K Tr V Tr Encode the query position, key, and value; Att(Q Tr K Tr () represents the attention score; 4.3) High-dimensional features The input to the Softmax layer of the Transformer network abstracts the risk state partitioning process as follows: In the formula: C is the risk status classification tree; F represents the probability values ​​for different categories, ranging from [0,1]; i F j High-dimensional features for different categories; 4.4) Using parking space data as a sample j, the true risk status category y i And calculate the objective function. Right now: In the formula: N represents the number of training samples, y i This indicates the true risk status category of sample j. Let be the predicted risk category of the model for sample j. 4.5) Determine the objective function If the condition is met, training ends and the parking space status assessment model is output. If not, the spatiotemporal features and statistical features of the entire domain are reacquired, and the process returns to step 4.

1. φ min This is a preset threshold.

6. The intelligent parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, Step 5) involves adjusting the parameters of the parking space status assessment model, including: 5.1) Integrate external environmental factor data as input to the predictive model, that is: E t =β1·W t +β2·A t (16) Among them, E t W represents the environmental impact score at time t. t Indicates the corresponding weather conditions, A t β1 and β2 represent the impact of activities during the same period, respectively, and are the corresponding weighting parameters. 5.2) Feature selection is performed using machine learning algorithms, resulting in: IG(Y,X K )=H(Y)-H(Y|X K ) (17) Among them, IG(Y, X) K () represents information gain, Y is the parking space status, X is... K It is the k-th feature; H(Y) represents the information entropy of Y; H(Y|X) K ) represents a known feature X K Under the given conditions, the conditional entropy of Y; 5.3) Construct a feature fusion model to initially predict parking space status using historical data, i.e.: P t =f(W1E t +W2H t +b) (18) Among them, P t E is the probability of a parking space being vacant at time t. t and H t W1 and W2 represent environmental characteristics and historical usage characteristics, respectively. W1 and W2 are weight matrices, b is the bias, and f is the activation function.

7. The intelligent parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, Step 6), which involves inputting parking lot feature data into the parking space status assessment model to obtain the parking space occupancy status, includes the following steps: 6.1) Deploy a real-time data receiving module to collect data from parking space monitoring sensors, environmental sensors, and image acquisition devices; 6.2) Input the data received in real time in step 6.1) into the prediction model to obtain: P free (t)=σ(W p ·F t +b p ) (19) Among them, P free F(t) represents the probability that a parking space is available at time t. t W represents the feature fusion output from the hybrid model. p and b p Weights and biases are used to predict the relationship between image data and environmental data; σ is an activation function used to convert linear outputs into probabilities. 6.3) Configure a real-time update mechanism and use an online learning strategy to update the parking space status assessment model: Where, θ updated and θ current These are the updated and current parking space status evaluation model parameters, respectively, where α is the learning rate and L(X) is the learning rate. new Y new ;θ current X is the loss function, representing the gradient of the loss function with respect to the parameter θ. new and Y new It consists of newly received data and its tags; This is the gradient symbol.

8. The intelligent parking space prediction method based on spatiotemporal Transformer-LSTM according to claim 1, characterized in that, Step 7), which involves outputting the parking space occupancy status of the parking lot to the user interface of the parking management system in real time, includes: The user interface is used to provide parking space status information to parking lot managers and users.