Intelligent service area traffic flow prediction model and application method

CN118736828APending Publication Date: 2024-10-01BEIJING GAOCHENG TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410817176.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

[0004]尽管已有多种车流量预测研究,仍存在未能针对服务区车流量的特点进行模型选择,包括服务区可获取数据类型多、车流量高峰期明显等特点问题

Benefits of technology

[0055] The beneficial effects of the present invention are: collecting various data in the service area, including historical traffic flow data, weather data, and main line flow data, preprocessing the collected multi-dimensional data, storing it in a database, and reading the database, Obtain historical traffic data, input multi-dimensional data into the CNN model, extract features from the data through the convolution layer and pooling layer, and input the extracted features into the Bi LSTM model for data prediction. After completing the prediction, introduce The Attent i on mechanism calculates the weight for each feature and result, and uses the weight to reversely influence the Bi LSTM model to determine the data with greater impact to optimize the model. Use the CNN-B i LSTM-Attent i on model to sort the data Carry out training to obtain the model's prediction results of traffic flow, and transfer it to the service area management and control platform to manage and control the service area. By predicting traffic flow, service area managers can make transportation organization, personnel dispatching and service facility arrangements in advance. , optimize service area operations and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736828A_ABST
    Figure CN118736828A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent service area traffic flow prediction model and an application method, which relate to the technical field of big data, collect various data of a service area, including historical traffic flow data, weather data and mainline flow data, pre-process the collected multi-dimensional data, store the pre-processed data in a database, read the database, and store the pre-processed data in the database. The method comprises the steps of obtaining historical flow data, inputting multi-dimensional data into a CNN model, performing feature extraction on the data through a convolutional layer and a pooling layer, inputting the extracted features into a BiLSTM model, performing data prediction, after prediction is completed, introducing an Attention mechanism, calculating a weight for each feature and a result, and reversely influencing the BiLSTM model through the weight so as to optimize the model. And training the sorted data by using a CNN-BiLSTM-Attention model to obtain a prediction result of the model on the traffic flow, and transmitting the prediction result to a service area management and control platform to manage and control the service area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and more specifically, to a smart service area traffic flow prediction model and an application method. Background Art

[0002] In the current rapidly developing information society, smart service areas, as an information-based upgrade of highway service areas, are gradually becoming an important research and application field. Traditional highway service areas mainly provide basic parking, refueling, catering and rest services, but with the development of science and technology and the diversification of user needs, the concept of smart service areas has emerged, aiming to improve service efficiency and user experience through high-tech means, while achieving optimal allocation of resources and sustainable development of the environment. The construction of smart service areas mainly focuses on the use of modern information technology, such as the Internet of Things, big data, cloud computing and artificial intelligence, to carry out intelligent transformation of the infrastructure of service areas. Through the application of these technologies, functions such as intelligent vehicle dispatching, intelligent monitoring, energy management, and intelligent navigation can be realized.

[0003] As one of the core parts of smart service areas, traffic flow prediction can help service area managers understand traffic flow trends in the future, so as to better optimize parking space allocation, reduce parking difficulty, reduce waiting time, and improve service quality.

[0004] Although there have been many studies on traffic flow prediction, there is still a problem of failing to select models based on the characteristics of service area traffic flow, including the large number of data types available in service areas and obvious traffic flow peak periods. Summary of the invention

[0005] In view of the technical problems existing in the prior art, the present invention provides a smart service area traffic flow prediction model and application method to solve the problems raised in the above background technology.

[0006] The technical solution of the present invention to solve the above technical problems is as follows: a smart service area traffic flow prediction model and application method, specifically comprising the following steps:

[0007] Step 101: collect various data of the service area, including historical traffic data, weather data, and main line traffic data, and pre-process the collected multi-dimensional data and store them in a database;

[0008] Step 102: read the database to obtain historical traffic data, input the multi-dimensional data into the CNN model, and extract features from the data through the convolution layer and the pooling layer;

[0009] Step 103: Input the features extracted in step 102 into the Bi LSTM model to perform data prediction;

[0010] Step 104: After the prediction is completed, the Attention mechanism is introduced to calculate the weight for each feature and result, and the weight is used to reversely influence the Bi LSTM model to optimize the model;

[0011] Step 105: Use the CNN-Bi LSTM-Attention model to train the sorted data, obtain the model's prediction result for vehicle flow, and transmit it to the service area management and control platform to manage the service area.

[0012] In a preferred embodiment, in step 101, various data of the service area are collected, including historical traffic data, weather data, and main line traffic data, and the collected data are pre-processed and stored in a database. The specific steps are as follows:

[0013] Step A1, data collection: using relevant detectors of the main line and the service area to collect various data of the service area, including historical vehicle flow data, weather data, and main line flow data, wherein the detectors include a main line speed detector, a main line flow detector, a service area flow detector, a meteorological environment detector, and a main line event detector;

[0014] Step A2, data preprocessing: cleaning and normalizing the collected data. The data cleaning is to clean each data set by using data processing tools to process missing values, outliers and duplicate values, and normalize the cleaned data;

[0015] Step A3, data storage: Create a database to store the preprocessed data, create indexes for key fields in the database, and design database tables according to data types and structures to improve data query performance.

[0016] In a preferred embodiment, in step 102, multi-dimensional data of the server is obtained by reading the database, inputting it into the CNN model, and performing high-dimensional and nonlinear feature extraction on the data through the convolution layer and the pooling layer to obtain relatively stable information. The specific steps are as follows:

[0017] Step B1: read multi-dimensional data of historical traffic flow data, weather data, and main line traffic data from the database, integrate and associate different types of data to ensure that they can be aligned in time, and segment the data according to time series, select each hour as a time window, and input the data in the time window as a sequence into the CNN model;

[0018] Step B2, CNN feature extraction: Design the CNN model architecture, including the input layer, convolution layer, pooling layer, fully connected layer and output layer, and determine the input dimension of the model to adapt to the input of multi-dimensional data, and perform feature extraction through the convolution layer and pooling layer in the CNN model;

[0019] The input layer is the starting point of the CNN model and is responsible for receiving raw data. In the prediction of service area traffic flow, it obtains various traffic volume and speed information from sensors and converts it into a form that CNN can process, that is, a three-dimensional tensor with height, width and depth.

[0020] In a preferred embodiment, the convolution layer is the core part of the CNN model, which extracts the features of the input data and extracts useful local features from the input data through convolution operations. In the convolution layer, the convolution kernel slides on the input data, calculates the dot product in the local area, and obtains the feature map. The specific calculation formula is as follows:

[0021]

[0022] Among them, y is a local feature point in the feature map, and the input layer is (l-1) layer; is a feature matrix with s features; the output layer is l; is the input data; f is the ReLU activation function.

[0023] In a preferred embodiment, the pooling layer is used to reduce the spatial size of the feature map, compress the data, reduce the number of parameters and the complexity of calculation, while maintaining the invariance of the features to extract significant features. The model adopts average pooling, and the specific calculation formula is as follows:

[0024]

[0025] Where p is the step size, (m,n) is the pooling window size, output[j,k] represents the value of the (j,k)th position in the output feature map, j and k represent the row and column indices in the output feature map, respectively, M and N represent the height and width of the pooling window, respectively, and F(j×p+m,k×p+n) represents the pixel value at the j(i×p+m,k×p+n)th position in the input feature map.

[0026] In a preferred embodiment, the fully connected layer converts the previously output high-level feature map into the final output. In the fully connected layer, each input node is connected to an output node.

[0027] In a preferred embodiment, in step 103, the data processed in step 102 is input into the Bi LSTM model to perform data prediction, and historical data is combined to improve the prediction accuracy of the model for time series data. The specific steps are as follows:

[0028] Step C1, BiLSTM model construction: Build a BiLSTM model, which consists of multiple bidirectional LSTM layers. Each BiLSTM layer contains a forward LSTM and a reverse LSTM, which are used to learn forward and reverse time series information respectively. When building the Bi LSTM model, the performance of the model is optimized by adjusting the number of neurons, stacking multiple BiLSTM layers, and adding regularization techniques.

[0029] The LSTM is the basic component of BiLSTM. Its main threshold structure includes input gate, forget gate and output gate. Its core is a Sigmoid neural network layer and a Poi ntwi se multiplication operation. The output of the Sigmoid layer is between 0 and 1. 0 means no amount is allowed to pass through, and 1 means any amount is allowed to pass through. With the help of this structure, new information is memorized and updated to solve the problem of long-term dependence.

[0030] Step C2, model training: connect the data at the current time point with the data at the previous time points as the input sequence of the BiLSTM model. During the training process, optimize the model parameters through the back propagation algorithm so that the model can better fit the data.

[0031] In a preferred embodiment, the neural unit of the LSTM single neuron structure is composed of a cell state, i.e., a long-term state and a short-term state, an input gate, a forget gate, and an output gate. Assume that the input of the Bi LSTM model is time series data, represented by a sequence X = {x1, x2, ..., x t}, the specific calculation formula is as follows:

[0032] h t =O t ·tanh(c t )

[0033] O t =σ(W o x t _U O h t-1 +b o )

[0034]

[0035] f t =σ(W f x t +U f h t-1 +b f )

[0036] i t =σ(Wi x t +U i h t-1 +b i )

[0037]

[0038] Among them, f t 、i t and O t They are the forget gate, input gate and output gate at time t respectively; and c t are the contents stored in the memory unit at time t; x t is the input vector at time t; h t is the output of the hidden layer; σ represents the Si gmoid function; W, U, and b are the weights in the calculation respectively;

[0039] Through these calculations, the BiLSTM model will take the sequence X as input and generate a hidden state sequence, which is then input into the output layer for prediction to obtain the final prediction result.

[0040] In a preferred embodiment, in step 104, after the prediction is completed, an Attention mechanism is introduced to calculate weights for each feature and result, and the BiLSTM model is reversely affected by the weights to determine the data with greater influence to optimize the model. The specific steps are as follows:

[0041] Step D1: Introduce the Attention mechanism through the three processes of scoring, weight calculation, and weighted summation.

[0042] The scoring is to calculate the importance score of the input part for the current task, which is achieved by constructing a matrix multiplication plus activation function. The specific calculation formula is as follows:

[0043] e i =r(q,x i )

[0044] Where r is the computation query q for each input x i The similarity, e i is the score vector;

[0045] The weight calculation is to convert the above score vector into a weight vector through the softmax function. The specific calculation formula is as follows:

[0046]

[0047] Among them, α i is the weight vector, e i is the score vector, ev represents the sum of the exponential values ​​of all elements in the score vector, and z represents the length of the score vector;

[0048] The weighted summation is to perform weighted summation on the weight vectors obtained above, and to perform weighted summation on the input vectors to generate a focused feature representation. The specific calculation formula is as follows:

[0049]

[0050] Among them, c represents the weighted feature representation, α i is the weight vector, λ represents the number of input features, x i Represents the i-th element in the input vector;

[0051] Step D2, adjust input data: The weighted feature representation c is used as the adjusted input and input into the Bi LSTM model for further prediction.

[0052] In a preferred embodiment, in step 105, the CNN-BiLSTM-Attention model is used to train the sorted data, obtain the prediction result of the model on the vehicle flow, and transmit it to the service area management and control platform to manage the service area. The specific steps are as follows:

[0053] Step E1: Analyze historical traffic flow data to understand traffic flow conditions in different time periods and under different circumstances, including peak hours and holidays, and set traffic flow thresholds according to the actual capacity of the service area;

[0054] Step E2, execution of control: When the traffic volume reaches the threshold, the platform is responsible for issuing control measures and submitting them to the service area manager for review. After the review is passed, the service area and related facilities are controlled. The control content mainly includes: main line traffic flow control, service area parking space control, service area operation control, and service area energy control.

[0055] The beneficial effects of the present invention are as follows: various data of the service area are collected, including historical traffic data, weather data, and main line traffic data, and the collected multi-dimensional data are pre-processed and stored in a database, and the database is read to obtain historical traffic data, and the multi-dimensional data is input into a CNN model, and features are extracted from the data through a convolution layer and a pooling layer, and the extracted features are input into a Bi LSTM model to perform data prediction, and after the prediction is completed, an Attention mechanism is introduced, and weights are calculated for each feature and result, and the Bi LSTM model is reversely affected by the weights to determine data with greater influence to optimize the model, and the CNN-Bi LSTM-Attention model is used to train the sorted data, and the prediction results of the model for traffic flow are obtained, and the results are transmitted to a service area management and control platform to manage the service area, and by predicting the traffic flow, the service area manager can make traffic organization, personnel dispatch and service facility arrangements in advance, optimize the service area operation, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a flow chart of the method of the present invention;

[0057] Figure 2 This is a diagram of the structure of a single neuron in the LSTM neural network;

[0058] Figure 3 This is the Bi LSTM model diagram;

[0059] Figure 4 This is the flow chart for predicting traffic flow in service areas. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0061] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" can explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0062] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. In order to enable any technician in the field to implement and use the present invention, the following description is given. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art will recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0063] Example 1

[0064] This embodiment provides Figure 1 A smart service area traffic flow prediction model and application method are shown, which specifically includes the following steps:

[0065] Step 101: collect various data of the service area, including historical traffic data, weather data, and main line traffic data, and pre-process the collected multi-dimensional data and store them in a database;

[0066] Step 102: read the database to obtain historical traffic data, input the multi-dimensional data into the CNN model, and extract features from the data through the convolution layer and the pooling layer;

[0067] Step 103: Input the features extracted in step 102 into the Bi LSTM model to perform data prediction;

[0068] Step 104: After the prediction is completed, the Attention mechanism is introduced to calculate the weight for each feature and result, and the weight is used to reversely influence the Bi LSTM model to optimize the model;

[0069] Step 105: Use the CNN-Bi LSTM-Attention model to train the sorted data, obtain the model's prediction result for vehicle flow, and transmit it to the service area management and control platform to manage the service area.

[0070] Preferably, in step 101, various data of the service area are collected, including historical vehicle flow data, weather data, and main line flow data, and the collected data are pre-processed and stored in a database. The specific steps are as follows:

[0071] Step A1, data collection: using relevant detectors of the main line and the service area to collect various data of the service area, including historical vehicle flow data, weather data, and main line flow data, wherein the detectors include a main line speed detector, a main line flow detector, a service area flow detector, a meteorological environment detector, and a main line event detector;

[0072] Step A2, data preprocessing: cleaning and normalizing the collected data. The data cleaning is to clean each data set by using data processing tools to process missing values, outliers and duplicate values, and normalize the cleaned data;

[0073] Step A3, data storage: Create a database to store the preprocessed data, create indexes for key fields in the database, and design database tables according to data types and structures to improve data query performance.

[0074] Preferably, in step 102, the multi-dimensional data of the server is obtained by reading the database, inputting it into the CNN model, and performing high-dimensional and nonlinear feature extraction on the data through the convolution layer and the pooling layer to obtain relatively stable information. The specific steps are as follows:

[0075] Step B1: read multi-dimensional data of historical traffic flow data, weather data, and main line traffic data from the database, integrate and associate different types of data to ensure that they can be aligned in time, and segment the data according to time series, select each hour as a time window, and input the data in the time window as a sequence into the CNN model;

[0076] Step B2, CNN feature extraction: Design the CNN model architecture, including the input layer, convolution layer, pooling layer, fully connected layer and output layer, and determine the input dimension of the model to adapt to the input of multi-dimensional data, and perform feature extraction through the convolution layer and pooling layer in the CNN model;

[0077] The input layer is the starting point of the CNN model and is responsible for receiving raw data. In the prediction of traffic flow in the service area, it obtains various traffic volume and speed information from sensors and converts it into a form that CNN can process, that is, a three-dimensional tensor with height, width and depth.

[0078] The convolution layer is the core part of the CNN model. It extracts the features of the input data and extracts useful local features from the input data through convolution operations. In the convolution layer, the convolution kernel slides on the input data, calculates the dot product in the local area, and obtains the feature map. The specific calculation formula is as follows:

[0079]

[0080] Among them, y is a local feature point in the feature map, and the input layer is (l-1) layer; is a feature matrix with s features; the output layer is l; is the input data; f is the ReLU activation function;

[0081] The pooling layer is used to reduce the spatial size of the feature map, compress the data, reduce the number of parameters and the complexity of calculation, while maintaining the invariance of the features to extract significant features. The model uses average pooling, and the specific calculation formula is as follows:

[0082]

[0083] Where p is the step size, (m,n) is the pooling window size, output[j,k] represents the value of the (j,k)th position in the output feature map, j and k represent the row and column indexes in the output feature map, respectively, M and N represent the height and width of the pooling window, respectively, and F(j×p+m,k×p+n) represents the pixel value at the j(i×p+m,k×p+n)th position in the input feature map;

[0084] The fully connected layer converts the previously output high-level feature map into the final output. In the fully connected layer, each input node is connected to the output node.

[0085] Preferably, in step 103, the data processed in step 102 is input into the Bi LSTM model to perform data prediction, and historical data is combined to improve the prediction accuracy of the model for time series data. The specific steps are as follows:

[0086] Step C1, BiLSTM model construction: Build a BiLSTM model, which consists of multiple bidirectional LSTM layers. Each BiLSTM layer contains a forward LSTM and a reverse LSTM, which are used to learn forward and reverse time series information respectively. When building the Bi LSTM model, the performance of the model is optimized by adjusting the number of neurons, stacking multiple BiLSTM layers, and adding regularization techniques.

[0087] The LSTM is the basic component of BiLSTM. Its main threshold structure includes input gate, forget gate and output gate. Its core is a Sigmoid neural network layer and a Poi ntwi se multiplication operation. The output of the Sigmoid layer is between 0 and 1. 0 means no amount is allowed to pass through, and 1 means any amount is allowed to pass through. With the help of this structure, new information is memorized and updated to solve the problem of long-term dependence.

[0088] Step C2, model training: connect the data at the current time point with the data at the previous time points as the input sequence of the BiLSTM model. During the training process, optimize the model parameters through the back propagation algorithm so that the model can better fit the data;

[0089] The structure of a single neuron of LSTM is as follows Figure 2 As shown in the figure, each LSTM neural unit is composed of a cell state, i.e., a long-term state and a short-term state, an input gate, a forget gate, and an output gate. Assume that the input of the Bi LSTM model is time series data, represented as a sequence X = {x1, x2, ..., x t}, the specific calculation formula is as follows:

[0090] h t =O t ·tanh(c t )

[0091] O t =σ(W o x t _U O h t-1 +b o )

[0092]

[0093] f t =σ(W f x t +U f h t-1 +b f )

[0094] i t =σ(W i x t +U i h t-1 +b i )

[0095]

[0096] Among them, f t 、i t and O t They are the forget gate, input gate and output gate at time t respectively; and c t are the contents stored in the memory unit at time t; x t is the input vector at time t; h t is the output of the hidden layer; σ represents the Si gmoid function; W, U, and b are the weights in the calculation respectively;

[0097] The BiLSTM model consists of two LSTM layers placed in parallel in the network, one for processing forward sequence information and the other for processing reverse sequence information. Figure 3 As shown in the figure, the input sequence is fed into two independent LSTM layers at the same time, one for processing the forward sequence and the other for processing the reverse sequence. The hidden states of the two LSTM layers capture the forward and backward information respectively, and the outputs are concatenated and merged at each time step to form the final output of that time step.

[0098] Through these calculations, the BiLSTM model will take the sequence X as input and generate a hidden state sequence, which is then input into the output layer for prediction to obtain the final prediction result.

[0099] Preferably, in step 104, after the prediction is completed, an Attention mechanism is introduced, and weights are calculated for each feature and result. The BiLSTM model is reversely affected by the weights to determine the data with greater influence to optimize the model. The Attention mechanism is an attention mechanism derived from the signal processing mechanism of human vision. The specific steps are as follows:

[0100] Step D1: Introduce the Attention mechanism through the three processes of scoring, weight calculation, and weighted summation.

[0101] The scoring is to calculate the importance score of the input part for the current task, which is achieved by constructing a matrix multiplication plus activation function. The specific calculation formula is as follows:

[0102] e i =r(q,x i )

[0103] Where r is the computation query q for each input x i The similarity, e i is the score vector;

[0104] The weight calculation is to convert the above score vector into a weight vector through the softmax function. The specific calculation formula is as follows:

[0105]

[0106] Among them, α i is the weight vector, e i is the score vector, e v represents the sum of the exponential values ​​of all elements in the score vector, and z represents the length of the score vector;

[0107] The weighted summation is to perform weighted summation on the weight vectors obtained above, and to perform weighted summation on the input vectors to generate a focused feature representation. The specific calculation formula is as follows:

[0108]

[0109] Among them, c represents the weighted feature representation, α i is the weight vector, λ represents the number of input features, x i Represents the i-th element in the input vector;

[0110] Step D2, adjust input data: The weighted feature representation c is used as the adjusted input and input into the Bi LSTM model for further prediction.

[0111] Preferably, in step 105, the sorted data is trained using a CNN-BiLSTM-Attention model, such as Figure 4 As shown in the figure, the model's prediction results for traffic flow are obtained and transmitted to the service area management and control platform to control the service area. The specific steps are as follows:

[0112] Step E1: Analyze historical traffic flow data to understand traffic flow conditions in different time periods and under different circumstances, including peak hours and holidays, and set traffic flow thresholds according to the actual capacity of the service area to ensure that the traffic flow does not exceed the carrying capacity of the service area to avoid congestion and affect traffic flow;

[0113] Step E2, execution of control: When the traffic volume reaches the threshold, the platform is responsible for issuing control measures and submitting them to the service area manager for review. After the review is passed, the service area and related facilities will be controlled;

[0114] The control contents mainly include: main line traffic flow control, service area parking space control, service area operation control, and service area energy control;

[0115] The main line traffic flow control: when it is predicted that the traffic volume will be high in the future, the main line will be controlled to ensure the stability of the speed on the ramp of the service area by inducing the speed of the main line traffic flow;

[0116] The parking space control in the service area: when it is predicted that the traffic volume will be high in the future, the parking spaces for vehicles will be managed, and the computing power of the parking guidance system will be increased to plan the parking spaces more accurately and ensure smooth parking of vehicles;

[0117] The said service area operation control: when it is predicted that the traffic volume will be high in the future, more human resources will be invested in refueling and cleaning vehicles in the service area, and more comprehensive management will be carried out;

[0118] The energy management and control of the service area: when it is predicted that the traffic volume will be low in the future, the lighting system and related peripheral facilities will be managed, and some facilities will be closed to save energy.

[0119] It should be noted that, in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0120] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.

[0121] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0122] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0124] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0125] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A smart service area traffic flow prediction model and application method, characterized in that: The specific steps include: Step 101: collect various data of the service area, including historical traffic data, weather data, and main line traffic data, and pre-process the collected multi-dimensional data and store them in a database; Step 102: read the database to obtain historical traffic data, input the multi-dimensional data into the CNN model, and extract features from the data through the convolution layer and the pooling layer; Step 103: Input the features extracted in step 102 into the BiLSTM model to perform data prediction; Step 104: After the prediction is completed, the Attention mechanism is introduced to calculate the weight for each feature and result, and the BiLSTM model is reversely influenced by the weight to optimize the model; Step 105: Use the CNN-BiLSTM-Attention model to train the sorted data, obtain the model's prediction result for vehicle flow, and transmit it to the service area management and control platform to manage the service area.

2. According to claim 1, a smart service area traffic flow prediction model and application method is characterized by: The step 101 collects various data of the service area, including historical traffic data, weather data, and main line traffic data, and pre-processes the collected multi-dimensional data and stores it in a database. The specific steps are as follows: Step A1, data collection: using detectors on the main line and service area to collect various data of the service area, including historical vehicle flow data, weather data, and main line flow data, the detectors include a main line speed detector, a main line flow detector, a service area flow detector, a meteorological environment detector, and a main line event detector; Step A2, data preprocessing: cleaning and normalizing the collected data. The data cleaning is to clean each data set by using data processing tools to process missing values, outliers and duplicate values, and normalize the cleaned data; Step A3, data storage: Create a database to store the preprocessed data, create indexes for key fields in the database, and design database tables based on data types and structures.

3. According to claim 2, a smart service area traffic flow prediction model and application method is characterized in that: In step 102, the database is read to obtain historical traffic data, the multi-dimensional data is input into the CNN model, and features are extracted from the data through the convolution layer and the pooling layer. The specific steps are as follows: Step B1, read multi-dimensional data of historical traffic flow data, weather data, and main line traffic data from the database, integrate and associate different types of data, and segment the data according to time series, select each hour as a time window, and input the data in the time window as a sequence into the CNN model; Step B2, CNN feature extraction: Design the CNN model architecture, including the input layer, convolution layer, pooling layer, fully connected layer and output layer, and determine the input dimension of the model, and perform feature extraction through the convolution layer and pooling layer in the CNN model; The convolution layer extracts local features from the input data through convolution operation. In the convolution layer, the convolution kernel slides on the input data, calculates the dot product in the local area, and obtains the feature map. The specific calculation formula is as follows: Among them, y is a local feature point in the feature map, and the input layer is (l-1) layers; W s l-1 is a feature matrix with s features; the output layer is l; is the input data; f is the ReLU activation function.

4. According to claim 3, a smart service area traffic flow prediction model and application method is characterized in that: The pooling layer is used to reduce the spatial size of the feature map and compress the data using average pooling. The specific calculation formula is as follows: Where p is the step size, (m,n) is the pooling window size, output[j,k] represents the value of the (j,k)th position in the output feature map, j and k represent the row and column indices in the output feature map, respectively, M and N represent the height and width of the pooling window, respectively, and F(j×p+m,k×p+n) represents the pixel value at the j(i×p+m,k×p+n)th position in the input feature map.

5. According to claim 4, a smart service area traffic flow prediction model and application method is characterized in that: In step 103, the data processed in step 102 is input into the BiLSTM model to perform data prediction. The specific steps are as follows: Step C1, BiLSTM model construction: Build a BiLSTM model consisting of multiple bidirectional LSTM layers. Each BiLSTM layer contains a forward LSTM and a reverse LSTM, which are used to learn the forward and reverse time series information respectively; Step C2, model training: connect the data at the current time point with the data at the previous time points as the input sequence of the BiLSTM model; where a single LSTM neuron is composed of a cell state, i.e., a long-term state and a short-term state, an input gate, a forget gate, and an output gate. Assume that the input of the BiLSTM model is time series data, represented by the sequence X = {x1, x2, ..., x t }, the specific calculation formula is as follows: h t =O t ·tanh(c t ) The t =σ(W o x t _U O h t-1 +b o ) f t =σ(W f x t +U f h t-1 +b f ) i t =σ(W i x t +U i h t-1 +b i ) Among them, f t 、i t and O t They are the forget gate, input gate and output gate at time t respectively; and c t are the contents stored in the memory unit at time t; x t is the input vector at time t; h t is the output of the hidden layer; σ represents the Sigmoid function; W, U, and b are the weights in the calculation.

6. A smart service area traffic flow prediction model and application method according to claim 5, characterized in that: In step 104, after the prediction is completed, the Attention mechanism is introduced to calculate the weight for each feature and result, and the BiLSTM model is reversely affected by the weight to optimize the model. The specific steps are as follows: Step D1: Introduce the Attention mechanism through three processes: scoring, weight calculation, and weighted summation. The scoring is to calculate the importance score of the input part for the current task, which is achieved by constructing a matrix multiplication plus activation function. The specific calculation formula is as follows: e i =r(q,x i ) Where r is the computation query q for each input x i The similarity, e i is the score vector; Step D2, adjust input data: According to the results of scoring, weight calculation, and weighted summation, the weighted feature representation is used as the adjusted input and input into the BiLSTM model for prediction.

7. A smart service area traffic flow prediction model and application method according to claim 6, characterized in that: The weight calculation is to convert the above score vector into a weight vector through the softmax function. The specific calculation formula is as follows: Among them, α i is the weight vector, e i is the score vector, e v represents the sum of the exponential values ​​of all elements in the score vector, and z represents the length of the score vector.

8. A smart service area traffic flow prediction model and application method according to claim 7, characterized in that: The weighted summation is to perform weighted summation on the obtained weight vectors, and to perform weighted summation on the input vectors to generate a focused feature representation. The specific calculation formula is as follows: Among them, c represents the weighted feature representation, α i is the weight vector, λ represents the number of input features, x i Represents the i-th element in the input vector.

9. A smart service area traffic flow prediction model and application method according to claim 8, characterized in that: In step 105, the CNN-BiLSTM-Attention model is used to train the sorted data to obtain the prediction result of the model on the vehicle flow, and the prediction result is transmitted to the service area control platform to control the service area. The specific steps are as follows: Step E1: Analyze historical traffic flow data to understand traffic flow conditions during peak hours and holidays, and set traffic flow thresholds based on actual capacity of the service area; Step E2, execution of control: When the traffic volume reaches the threshold, the platform is responsible for issuing control measures and submitting them to the service area manager for review. After the review is passed, the service area and related facilities will be subject to mainline traffic flow control, service area parking space control, service area operation control, and service area energy control.