Civil aviation passenger volume prediction method and device, storage medium and electronic equipment
Through a short-term prediction method based on time series algorithm, the daily historical data of civil aviation passenger volume is extracted and preprocessed, and the time loop neural network model is used to predict, which solves the problem of low accuracy in passenger volume prediction in the existing technology, and achieves more accurate short-term passenger volume prediction.
Patent Information
- Application Number
- CN202411792297.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the prediction of civil aviation passenger volume based on manual experience or long-term prediction models has the problem that the predicted passenger volume is low.
A short-term prediction method based on a time series algorithm is used to obtain the daily historical data of the preset historical time period, and data is preprocessed, date characteristics, number of passengers, weekend identification characteristics and holiday identification characteristics are extracted, and these characteristics are predicted using the time loop neural network model to generate daily prediction data.
It improves the accuracy of forecasting passenger volume in the short term, effectively makes up for changes in passenger volume caused by factors such as holidays, and helps airlines better manage capacity allocation and business system pressure.
Smart Images

Figure CN119761558A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, storage medium and electronic equipment for predicting civil aviation passenger volume. Background Art
[0002] Predicting civil aviation passenger volume can help airlines make scientific decisions on flight arrangements. However, civil aviation passenger volume is affected by various factors. Currently, civil aviation passenger volume forecasts are mostly based on long-term forecasts for the next year based on historical data from the same period, or analyzed through expert methods, and the accuracy of the predicted passenger volume is low.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, storage medium and electronic device for predicting civil aviation passenger volume, so as to at least solve the technical problem in the prior art that civil aviation passenger volume is predicted based on manual experience or long-term prediction models, resulting in low accuracy of the predicted passenger volume.
[0005] According to one aspect of an embodiment of the present invention, a method for predicting civil aviation passenger volume is provided, comprising: obtaining daily historical data of passenger volume corresponding to a preset historical time period; performing data preprocessing on the daily historical data to obtain target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; predicting a future target time period based on the target features of the daily historical data using a target prediction model to obtain daily prediction data of passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
[0006] Furthermore, the target prediction model includes at least a first prediction model for predicting domestic passenger volume, and the daily prediction data of the passenger volume corresponding to the target time period includes at least the daily prediction data of the domestic passenger volume, wherein the target prediction model predicts the future target time period based on the target features of the daily historical data to obtain the daily prediction data of the passenger volume corresponding to the target time period, including: processing the target features of the daily historical data through the embedding layer of the first prediction model to obtain a vector representation corresponding to the target features, and determining the target step size based on the target time period; processing the vector representation corresponding to the target features through the neural network layer of the first prediction model based on the target step size to obtain the initial daily prediction data of the domestic passenger volume corresponding to the target time period; processing the initial daily prediction data of the domestic passenger volume corresponding to the target time period through the output layer of the first prediction model to obtain the daily prediction data of the domestic passenger volume.
[0007] Furthermore, the target prediction model also includes a second prediction model for predicting the international passenger volume. The second prediction model has different model parameters from the first prediction model. The daily prediction data of the passenger volume corresponding to the target time period also includes daily prediction data of the international passenger volume. The target prediction model predicts the future target time period based on the target features of the daily historical data to obtain the daily prediction data of the passenger volume corresponding to the target time period, including: processing the target features of the daily historical data through the embedding layer of the second prediction model to obtain a vector representation corresponding to the target features, and determining the target step size based on the target time period; processing the vector representation corresponding to the target features through the neural network layer of the second prediction model based on the target step size to obtain the initial daily prediction data of the international passenger volume corresponding to the target time period; processing the initial daily prediction data of the international passenger volume corresponding to the target time period through the output layer of the second prediction model to obtain the daily prediction data of the international passenger volume.
[0008] Furthermore, data preprocessing is performed on the daily historical data to obtain target features of the daily historical data, including: performing missing value processing and outlier processing on the daily historical data to obtain processed daily historical data; performing data normalization processing on the number of passengers in the processed daily historical data to obtain normalized daily historical data; performing feature engineering processing on the normalized daily historical data to obtain target features of the daily historical data.
[0009] Furthermore, after obtaining the daily forecast data of the passenger volume corresponding to the target time period, the method also includes: obtaining the daily forecast data of the passenger volume corresponding to the first time period output by the third forecast model, wherein the third forecast model is a pre-trained long-term forecast model, and the first time period includes the target time period; based on the daily forecast data of the passenger volume corresponding to the target time period, correcting the daily forecast data of the passenger volume corresponding to the time period after the target time period in the first time period to obtain the corrected daily forecast data of the passenger volume.
[0010] Furthermore, a target prediction model is generated through the following steps: a sample data set is obtained, and the sample data set is divided into a training set, a validation set, and a test set, wherein the sample data set is obtained after data preprocessing of the initial sample data set; a time recurrent neural network is trained based on the training set, the validation set, and the test set to obtain a target prediction model.
[0011] Furthermore, the time recurrent neural network is trained based on the training set, the validation set and the test set to obtain a target prediction model, including: model training of the time recurrent neural network based on the training set to obtain an initial prediction model; predicting the verification samples in the validation set based on the initial prediction model to obtain prediction results corresponding to the verification samples; optimizing the initial prediction model based on the true labels corresponding to the verification samples, the prediction results and the test set until the training results meet the preset conditions to obtain the target prediction model.
[0012] According to another aspect of an embodiment of the present invention, a device for predicting civil aviation passenger volume is also provided, including: a first acquisition module, used to obtain daily historical data of passenger volume corresponding to a preset historical time period; a first processing module, used to perform data preprocessing on the daily historical data to obtain target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; a second processing module, used to predict a future target time period based on the target features of the daily historical data through a target prediction model, and obtain daily prediction data of passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
[0013] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned method for predicting the civil aviation passenger volume.
[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for predicting the civil aviation passenger volume when running.
[0015] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, which includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned civil aviation passenger volume prediction method when running.
[0016] In an embodiment of the present invention, a method for short-term prediction of passenger volume based on a time series algorithm is adopted. First, daily historical data of passenger volume corresponding to a preset historical time period is obtained; data preprocessing is performed on the daily historical data to obtain target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; a target prediction model is used to predict the future target time period based on the target features of the daily historical data to obtain daily prediction data of the passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
[0017] In the above process, the short-term prediction model (i.e., the target prediction model) obtained by training the time recurrent neural network based on the sample data set predicts the future target time period based on the target features of the daily historical data, thereby realizing the prediction of the passenger volume in the short-term time window. By adding weekend identification features and holiday identification features, it effectively compensates for the changes in passenger volume due to factors such as holidays in the short term, which may cause excessive system pressure and other phenomena, improves the prediction accuracy, helps airlines to allocate capacity and predict and manage business system pressure, and can effectively control the peak system pressure during special periods such as holidays.
[0018] It can be seen that through the technical solution of the present invention, the purpose of more accurate prediction of passenger volume in the short term is achieved, thereby achieving the technical effect of improving the prediction accuracy of passenger volume, and further solving the technical problem in the prior art of predicting civil aviation passenger volume based on manual experience or long-term prediction models, resulting in low accuracy of predicted passenger volume. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 is a flow chart of an optional method for predicting civil aviation passenger volume according to an embodiment of the present invention;
[0021] Figure 2 is a schematic diagram of an optional LSTM network structure according to an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of an optional LSTM unit state according to an embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of an optional forget gate of LSTM according to an embodiment of the present invention;
[0024] Figure 5 is a schematic diagram of an optional method for calculating an input gate and a unit state update value of an LSTM according to an embodiment of the present invention;
[0025] Figure 6 is a schematic diagram of an optional usage of an input gate of an LSTM according to an embodiment of the present invention;
[0026] Figure 7 is a schematic diagram of an optional output gate of an LSTM according to an embodiment of the present invention;
[0027] Figure 8 is a schematic diagram of an optional comparison between a predicted value and an actual value of domestic passenger travel volume according to an embodiment of the present invention;
[0028] Fig. 9 is a schematic diagram of an optional comparison between a predicted value and an actual value of international passenger travel volume according to an embodiment of the present invention;
[0029] Fig.10 is a schematic diagram of an optional future prediction result of domestic passenger travel volume according to an embodiment of the present invention;
[0030] Fig.11 is a schematic diagram of an optional future prediction result of international passenger travel volume according to an embodiment of the present invention;
[0031] Fig.12 is a schematic diagram of comparing the long-term and short-term prediction results of domestic passenger travel volume according to an optional embodiment of the present invention;
[0032] Fig.13 is a schematic diagram of comparing long-term and short-term prediction results of international passenger travel volume according to an optional embodiment of the present invention;
[0033] Fig.14 is a schematic diagram of an optional device for predicting civil aviation passenger volume according to an embodiment of the present invention;
[0034] Fig.15 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between the system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0038] Example 1
[0039] According to an embodiment of the present invention, an embodiment of a method for predicting civil aviation passenger volume is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] Figure 1 is a flowchart of an optional method for predicting civil aviation passenger volume according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0041] Step S101, obtaining daily historical data of the number of passengers corresponding to a preset historical time period.
[0042] Step S102, preprocessing the daily historical data to obtain target features of the daily historical data, wherein the target features include at least one of the following: date feature, passenger number feature, weekend identification feature, and holiday identification feature.
[0043] Step S103, predicting the future target time period based on the target features of the daily historical data through the target prediction model, and obtaining the daily prediction data of the passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training the time recurrent neural network based on the sample data set.
[0044] In the above steps, the application system, processor, electronic device and other devices can be used as the execution subject. For example, the civil aviation passenger volume prediction system can be used as the execution subject, and the daily historical data of the passenger volume corresponding to the preset historical time period (such as 6 months) can be obtained through the civil aviation passenger volume prediction system. The daily historical data can be the daily frequency passenger volume historical data, that is, the daily civil aviation travel passenger volume historical data, and the daily historical data at least includes the year, date (including the year), the number of domestic travelers corresponding to the date, and the number of international travelers corresponding to the date.
[0045] Optionally, after acquiring the data, data preprocessing is performed on the daily historical data to obtain target features of the daily historical data. In an optional embodiment, data preprocessing is performed on the daily historical data to obtain target features of the daily historical data, including: performing missing value processing and outlier processing on the daily historical data to obtain processed daily historical data; performing data normalization processing on the number of passengers in the processed daily historical data to obtain normalized daily historical data; performing feature engineering processing on the normalized daily historical data to obtain target features of the daily historical data.
[0046] Missing value processing can be detecting and processing missing values in the daily frequency passenger volume historical data, for example, deleting data containing missing values; outlier processing can be detecting and processing outliers in the daily frequency passenger volume historical data, for example, deleting data containing outliers.
[0047] Since the number of passengers (i.e., the number of domestic travelers and the number of international travelers) is too large relative to other dimensions, it will cause the feature weight to shift. Therefore, the number of passengers in the processed daily historical data is normalized. For example, the Min-Max normalization method is used to map the number of passengers to the interval (0, 100).
[0048] Optionally, select the date, number of passengers, weekend identification and holiday identification dimensions, and process the relevant data into features. Through data analysis of the original data set, the following feature annotations are performed: in the weekend identification, if the date is Tuesday, the weekend identification feature of this data is set to 0; if the date is Friday or Saturday, the weekend identification feature of this data is set to 20; other dates are set to 10. In the holiday identification, if the date is a traditional holiday, the holiday identification feature of this data is set to 5; if the last three days of the date are traditional holidays, the holiday identification feature of this data is set to 5; the rest of the dates are set to 0. Features processed by feature engineering include: date, weekend identification, holiday identification and the number of civil aviation passengers traveling (domestic and international).
[0049] Optionally, after data preprocessing, a target prediction model may be used to predict a future target time period (such as the next month) based on target features of daily historical data to obtain daily prediction data on the number of passengers corresponding to the target time period.
[0050] In an optional embodiment, the target prediction model includes at least a first prediction model for predicting domestic passenger volume, and the daily prediction data of the passenger volume corresponding to the target time period includes at least the daily prediction data of the domestic passenger volume, wherein the target prediction model predicts the future target time period based on the target features of the daily historical data to obtain the daily prediction data of the passenger volume corresponding to the target time period, including: processing the target features of the daily historical data through the embedding layer of the first prediction model to obtain a vector representation corresponding to the target features, and determining the target step size based on the target time period; processing the vector representation corresponding to the target features through the neural network layer of the first prediction model based on the target step size to obtain the initial daily prediction data of the domestic passenger volume corresponding to the target time period; processing the initial daily prediction data of the domestic passenger volume corresponding to the target time period through the output layer of the first prediction model to obtain the daily prediction data of the domestic passenger volume.
[0051] In an optional embodiment, the target prediction model also includes a second prediction model for predicting the international passenger volume, the second prediction model has different model parameters from the first prediction model, and the daily prediction data of the passenger volume corresponding to the target time period also includes the daily prediction data of the international passenger volume, wherein the target prediction model predicts the future target time period based on the target features of the daily historical data to obtain the daily prediction data of the passenger volume corresponding to the target time period, including: processing the target features of the daily historical data through the embedding layer of the second prediction model to obtain a vector representation corresponding to the target features, and determining the target step size based on the target time period; processing the vector representation corresponding to the target features through the neural network layer of the second prediction model based on the target step size to obtain the initial daily prediction data of the international passenger volume corresponding to the target time period; processing the initial daily prediction data of the international passenger volume corresponding to the target time period through the output layer of the second prediction model to obtain the daily prediction data of the international passenger volume.
[0052] Optionally, the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set, such as an LSTM model. Due to the differences in the influencing factors of domestic passenger volume and international passenger volume, domestic and international passenger volume are predicted separately. The target features of the daily historical data are processed by the embedding layer (Embedding layer) of the domestic passenger volume prediction model (i.e., the first prediction model) and the international passenger volume prediction model (i.e., the second prediction model) respectively to obtain the vector representation corresponding to the target feature, and the target step length is determined according to the target time period, and the vector representation corresponding to the target feature is processed by the neural network layer (LSTM layer) according to the target step length to obtain the initial daily prediction data of the domestic passenger volume and the initial daily prediction data of the international passenger volume corresponding to the target time period, and the initial daily prediction data of the domestic passenger volume and the initial daily prediction data of the international passenger volume corresponding to the target time period are processed by the output layer respectively to obtain the daily prediction data of the domestic passenger volume and the daily prediction data of the international passenger volume.
[0053] Figure 2 is a schematic diagram of an optional LSTM network structure according to an embodiment of the present invention, such as Figure 2 As shown in the figure, the box represented by A represents a neural network layer (composed of weights, biases, and activation functions), the multiplication and plus signs in the circle represent element-level operations, the arrows represent the flow of vectors, the intersecting arrows represent the concatenation of vectors, and the forked arrows represent the replication of vectors. t-1 represents the input information (i.e., features) of the previous moment, x t Represents the input information at the current moment, x t+1 Indicates the input information at the next moment. t-1 represents the hidden state at the previous moment, h tRepresents the hidden state passed to the next moment, h t+1 represents the hidden state at the next moment. σ represents the sigmoid function, and tanh represents the tanh function.
[0054] Figure 3 is a schematic diagram of an optional LSTM unit state according to an embodiment of the present invention, such as Figure 3 As shown in the figure, the core part of LSTM is the top conveyor belt-like part, which is generally called cell state. C t Indicates the current unit state, C t-1 represents the unit state at the previous moment, f t It is called the forget gate, which means C t-1 Which features of are used to calculate C t , f t is a vector, each element of which is in the range [0, 1]. Sigmoid is usually used as an activation function, and the output of sigmoid is a value between [0, 1]. It is the most important gate mechanism of LSTM, indicating f t and C t-1 The unit multiplication relationship between them.
[0055] Figure 4 is a schematic diagram of an optional forget gate of LSTM according to an embodiment of the present invention, such as Figure 4 As shown, f t It is expressed as follows:
[0056] f t =σ(W f [h t-1 , x t ]+b f )
[0057] Among them, W f is the weight, b f For bias.
[0058] Figure 5 is a schematic diagram of an optional method for calculating the input gate and unit state update value of LSTM according to an embodiment of the present invention, such as Figure 5 As shown, Represents the updated value of the unit state, which is determined by the input data x t and hidden node h t-1 The activation function of the unit state update value obtained through a neural network layer usually uses tanh. It is expressed as follows:
[0059]
[0060] i t It is called the input gate, which is the same as f t It is also a vector with elements between [0, 1], and is also composed of x t and h t-1 It is calculated by the sigmoid activation function and is expressed as follows:
[0061] i t =σ(W i [h t-1 , x t ]+b i )
[0062] Figure 6 is a schematic diagram of an optional usage of an input gate of an LSTM according to an embodiment of the present invention, such as Figure 6 As shown, t For control Which features of are used to update C t , usage and f t same.
[0063] Figure 7 is a schematic diagram of an optional output gate of an LSTM according to an embodiment of the present invention, such as Figure 7 As shown, in order to calculate the predicted value To generate the complete input for the next time slice, we need to calculate the output h of the hidden node t .h t By output gate o t and cell status C t Get, where o t The calculation method and f t and t The same is expressed as follows:
[0064] o t =σ(W o [h t-1 , x t ]+b o )
[0065] h t =o t *tanh(C t )
[0066] Based on the scheme defined by the above steps S101 to S103, it can be known that in an embodiment of the present invention, a method of short-term prediction of passenger volume based on a time series algorithm is adopted, firstly, the daily historical data of the passenger volume corresponding to a preset historical time period is obtained; the daily historical data is preprocessed to obtain the target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; the future target time period is predicted according to the target features of the daily historical data through a target prediction model, and the daily prediction data of the passenger volume corresponding to the target time period is obtained, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
[0067] It is easy to notice that in the above process, the short-term prediction model (i.e., the target prediction model) obtained by training the time recurrent neural network based on the sample data set predicts the future target time period based on the target features of the daily historical data, thereby realizing the prediction of the passenger volume in the short-term time window. By adding weekend identification features and holiday identification features, it effectively compensates for the changes in passenger volume due to factors such as holidays in the short term, which may cause excessive system pressure and other phenomena, improves the prediction accuracy, helps airlines to allocate capacity and predict and manage business system pressure, and can effectively control the peak pressure of the system during special periods such as holidays.
[0068] It can be seen that through the technical solution of the present invention, the purpose of more accurate prediction of passenger volume in the short term is achieved, thereby achieving the technical effect of improving the prediction accuracy of passenger volume, and further solving the technical problem in the prior art of predicting civil aviation passenger volume based on manual experience or long-term prediction models, resulting in low accuracy of predicted passenger volume.
[0069] In an optional embodiment, after obtaining the daily forecast data of the passenger volume corresponding to the target time period, the daily forecast data of the passenger volume corresponding to the first time period output by the third forecast model is obtained, wherein the third forecast model is a pre-trained long-term forecast model, and the first time period includes the target time period; based on the daily forecast data of the passenger volume corresponding to the target time period, the daily forecast data of the passenger volume corresponding to the time period after the target time period in the first time period is corrected to obtain the corrected daily forecast data of the passenger volume.
[0070] Optionally, by creating a short-term prediction model, the future prediction results of the long-term prediction model can be corrected in time according to recent data, so as to achieve a more accurate prediction of passenger travel volume in the short term. For example, the current month is June. After obtaining the daily prediction data of the passenger volume corresponding to the next month (i.e., July), the daily prediction data of the passenger volume corresponding to the next year output by the long-term prediction model is obtained. Based on the daily prediction data of the passenger volume corresponding to the next month, the daily prediction data of the passenger volume corresponding to the time period after July in the next year (e.g., August, September, etc.) is corrected to obtain the corrected daily prediction data of the passenger volume.
[0071] In an optional embodiment, a target prediction model is generated by the following steps: obtaining a sample data set, and dividing the sample data set into a training set, a validation set, and a test set, wherein the sample data set is obtained after data preprocessing of the initial sample data set; training a time recurrent neural network based on the training set, the validation set, and the test set to obtain a target prediction model.
[0072] In an optional embodiment, a time recurrent neural network is trained based on a training set, a validation set, and a test set to obtain a target prediction model, including: model training the time recurrent neural network based on the training set to obtain an initial prediction model; predicting a validation sample in the validation set based on the initial prediction model to obtain a prediction result corresponding to the validation sample; optimizing the initial prediction model based on the true label corresponding to the validation sample, the prediction result, and the test set until the training result meets a preset condition to obtain a target prediction model.
[0073] Optionally, first select the initial sample data, for example, select the daily domestic and international civil aviation passenger volume from 2017 to 2023 as the data set, and the original data consists of four columns: year, date (including year), number of domestic travelers on that date, and number of international travelers on that date. Then perform data preprocessing such as missing value processing, outlier processing, data normalization, feature engineering, etc. on the initial sample data set to obtain a sample data set. Then divide the sample data set into a training set, a validation set, and a test set. For example, select the data from January 1, 2017 to October 21, 2023 as the training set, randomly select one month of civil aviation passenger data as the validation set (mutually exclusive with the training set), and select the data from October 20, 2023 to November 18, 2023 as the test set.
[0074] Furthermore, the training set is used for model training, and the parameters of the LSTM model are adjusted, including the selection of window size, number of neurons, activation function, gradient optimization function, number of training iterations, number of batch training, and dropout layer. By observing the mean square error, when the mean square error no longer decreases significantly (that is, the training result meets the preset conditions), the optimization is stopped, and the current parameter combination is recorded as the model parameters to obtain the target prediction model.
[0075] Optionally, 5, 10, and 20 are used as time window parameters for training. After the control variable method test, the mean square errors of the test set of domestic travelers using time windows of 5, 10, and 20 are 27668.31, 19273.39, and 21431.57, respectively. Based on the mean square error, the time window of 10 is selected as the model parameter.
[0076] Optionally, 100, 200 and 300 are used as the number of model neurons for training. After the control variable method test, the mean square errors of the test set of domestic travelers using 100, 200 and 300 neurons are 23185.88, 19273.39 and 25826.34 respectively. Based on the mean square error, the number of neurons 200 is selected as the model parameter.
[0077] Optionally, the relu function and tanh function are used as activation functions for training. Compared with the tanh function, the relu function can effectively avoid gradient disappearance, and the calculation efficiency is also improved compared with the tanh function. After the control variable method test, the mean square error of the relu function and tanh function on the test set of domestic travelers is 19273.39 and 38276.95 respectively. Based on the mean square error, the relu function is selected as the activation function.
[0078] Optionally, use the default adam function as the gradient optimization function.
[0079] Optionally, 100, 200 and 300 are used as parameters for the number of training iterations for training. After the control variable method test, the mean square errors of the test set of domestic travelers with the number of iterations of 100, 200 and 300 are 21393.46, 19273.39 and 19957.98 respectively. Based on the mean square error, the number of iterations of 200 is selected as the model parameter.
[0080] Optionally, 32, 64 and 128 are used as parameters for batch training number for training. After the control variable method test, the mean square errors of the test set of domestic travelers using batch training numbers of 32, 64 and 128 are 25325.23, 19273.39 and 21181.45 respectively. Based on the mean square error, the batch training number of 64 is selected as the model parameter.
[0081] Optionally, through the analysis of the test set, sometimes the prediction line is too smooth and cannot effectively reflect the trend of the number of passengers traveling. Therefore, a dropout layer is added after the LSTM model, and the dropout ratio is selected as 0.3. After testing, the prediction accuracy of the model is effectively improved.
[0082] Optionally, the mean square error is used to evaluate the accuracy of the model. When the mean square error no longer decreases significantly, the optimization is stopped and the current parameter combination is recorded as the parameters of the model. The parameters are shown in Table 1.
[0083] Table 1
[0084] Parameter name Parameter meaning Optimal parameter values time_steps Time window size 10 units Number of neurons 200 activation Activation Function relu dropout Random dropout ratio for training 0.3 optimizer Gradient Optimization Function adam epochs Iterations 200 batch_size Batch size 64
[0085] Furthermore, the test set is used for comparative analysis. The test set is input into the loaded optimal model, and the predicted results of the model are compared with the actual results. Figure 8 is a schematic diagram of an optional comparison between a predicted value and an actual value of domestic passenger travel volume according to an embodiment of the present invention, such as Figure 8 As shown in the figure, the data on the number of domestic civil aviation passengers traveling from October 20, 2023 to November 18, 2023 predicted by the LSTM model is basically consistent with the actual data on the number of domestic civil aviation passengers traveling from October 20, 2023 to November 18, 2023; Fig. 9 is a schematic diagram of an optional comparison between the predicted value and the actual value of international passenger travel volume according to an embodiment of the present invention, such as Fig. 9 As shown in the figure, the international civil aviation passenger travel data predicted by the LSTM model from October 20, 2023 to November 18, 2023 is basically consistent with the actual international civil aviation passenger travel data from October 20, 2023 to November 18, 2023. After comparison, the number of travelers and trends predicted by the LSTM model are basically consistent with the actual situation, which can effectively correct the error of the long-term number of travelers.
[0086] Fig.10 is a schematic diagram of an optional future prediction result of domestic passenger travel volume according to an embodiment of the present invention, such as Fig.10 As shown, the LSTM model predicts the number of domestic civil aviation passengers from November 20, 2023 to December 19, 2023; Fig.11 is a schematic diagram of an optional future prediction result of international passenger travel volume according to an embodiment of the present invention, such as Fig.11 As shown, the LSTM model predicts the number of international civil aviation passengers traveling in the future from November 20, 2023 to December 19, 2023.
[0087] Fig.12 is a schematic diagram of comparing the long-term and short-term prediction results of domestic passenger travel volume according to an optional embodiment of the present invention, such as Fig.12 As shown, a comparison table of domestic travel passengers showing the actual value, short-term and long-term forecasts; Fig.13 is a schematic diagram of comparing the long-term and short-term prediction results of international passenger travel volume according to an optional embodiment of the present invention, such as Fig.13 As shown in the figure, a comparison table of international travelers after real value, short-term and long-term forecast is shown. After comparison, the number of travelers and trends predicted by the LSTM model are basically consistent with the actual situation, which can effectively correct the error of the long-term number of travelers.
[0088] Optionally, in the embodiment of the present invention, in view of the shortcomings of the long-term prediction results, a short-term model is used for optimization, which mainly includes the following contents:
[0089] (1) Add feature dimensions: Add holiday dimensions and week dimensions. By analyzing historical data, we can see that holidays have a greater impact on passenger travel volume and are the time points when peaks are likely to occur. In addition, travel volume on weekends is higher and travel volume on weekdays is lower. The relevant data is processed into features and entered into the model for joint training.
[0090] (2) Use deep learning algorithms: Deep learning algorithms can better explore data patterns and generally have better prediction performance and higher accuracy. For example, the time series model LSTM in deep learning can be used.
[0091] (3) Revise future forecast results based on real-time data: Create a short-term forecast model and timely revise future forecast results based on recent data to achieve a more accurate forecast of passenger travel volume in the short term.
[0092] (4) Domestic and international predictions are separated, and the corresponding feature values are different.
[0093] It can be seen that through the technical solution of the present invention, the purpose of more accurate prediction of passenger volume in the short term is achieved, thereby achieving the technical effect of improving the prediction accuracy of passenger volume, and further solving the technical problem in the prior art of predicting civil aviation passenger volume based on manual experience or long-term prediction models, resulting in low accuracy of predicted passenger volume.
[0094] Example 2
[0095] According to an embodiment of the present invention, an embodiment of a device for predicting the volume of civil aviation passengers is provided, wherein: Fig.14 is a schematic diagram of an optional device for predicting civil aviation passenger volume according to an embodiment of the present invention, such as Fig.14 As shown, the device includes: a first acquisition module 1401, used to obtain daily historical data of the passenger volume corresponding to a preset historical time period; a first processing module 1402, used to perform data preprocessing on the daily historical data to obtain target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; a second processing module 1403, used to predict the future target time period according to the target features of the daily historical data through a target prediction model, and obtain daily prediction data of the passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
[0096] It should be noted that the above-mentioned first acquisition module 1401, first processing module 1402 and second processing module 1403 correspond to steps S101 to S103 in the above-mentioned embodiment, and the examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
[0097] Optionally, the second processing module includes: a third processing module, used to process the target features of the daily historical data through the embedding layer of the first prediction model, obtain the vector representation corresponding to the target features, and determine the target step size based on the target time period; a fourth processing module, used to process the vector representation corresponding to the target features according to the target step size through the neural network layer of the first prediction model, and obtain the initial daily prediction data of the domestic passenger volume corresponding to the target time period; a fifth processing module, used to process the initial daily prediction data of the domestic passenger volume corresponding to the target time period through the output layer of the first prediction model, and obtain the daily prediction data of the domestic passenger volume.
[0098] Optionally, the second processing module also includes: a sixth processing module, used to process the target features of the daily historical data through the embedding layer of the second prediction model to obtain the vector representation corresponding to the target features, and determine the target step size based on the target time period; a seventh processing module, used to process the vector representation corresponding to the target features according to the target step size through the neural network layer of the second prediction model to obtain the initial daily prediction data of the international passenger volume corresponding to the target time period; an eighth processing module, used to process the initial daily prediction data of the international passenger volume corresponding to the target time period through the output layer of the second prediction model to obtain the daily prediction data of the international passenger volume.
[0099] Optionally, the first processing module includes: a ninth processing module, used to perform missing value processing and outlier processing on the daily historical data to obtain processed daily historical data; a tenth processing module, used to perform data normalization processing on the number of passengers in the processed daily historical data to obtain normalized daily historical data; an eleventh processing module, used to perform feature engineering processing on the normalized daily historical data to obtain target features of the daily historical data.
[0100] Optionally, the civil aviation passenger volume prediction device also includes: a second acquisition module, which is used to obtain the daily prediction data of the passenger volume corresponding to the first time period output by the third prediction model after obtaining the daily prediction data of the passenger volume corresponding to the target time period, wherein the third prediction model is a pre-trained long-term prediction model, and the first time period includes the target time period; a correction module, which is used to correct the daily prediction data of the passenger volume corresponding to the time period after the target time period in the first time period based on the daily prediction data of the passenger volume corresponding to the target time period, so as to obtain the corrected daily prediction data of the passenger volume.
[0101] Optionally, the civil aviation passenger volume prediction device also includes the following modules, which are used to generate a target prediction model through the following steps: a third acquisition module, used to acquire a sample data set and divide the sample data set into a training set, a validation set and a test set, wherein the sample data set is obtained after data preprocessing of the initial sample data set; a first training module, used to train the time recurrent neural network based on the training set, the validation set and the test set to obtain a target prediction model.
[0102] Optionally, the first training module includes: a second training module, used to perform model training on the time recurrent neural network based on the training set to obtain an initial prediction model; a prediction module, used to predict the verification samples in the verification set based on the initial prediction model to obtain the prediction results corresponding to the verification samples; an optimization module, used to optimize the initial prediction model based on the real labels corresponding to the verification samples, the prediction results and the test set until the training results meet the preset conditions to obtain the target prediction model.
[0103] Example 3
[0104] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned method for predicting the civil aviation passenger volume.
[0105] Example 4
[0106] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned civil aviation passenger volume prediction method when running.
[0107] Example 5
[0108] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Fig.15 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Fig.15 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors are used to run the programs, wherein the programs are set to execute the above-mentioned civil aviation passenger volume prediction method when running. When the processor executes the program, the following steps are implemented: obtaining the daily historical data of the passenger volume corresponding to the preset historical time period; performing data preprocessing on the daily historical data to obtain the target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; predicting the future target time period based on the target features of the daily historical data through a target prediction model, and obtaining the daily prediction data of the passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
[0109] Optionally, when executing the program, the processor also implements the following steps: processing the target features of the daily historical data through the embedding layer of the first prediction model to obtain a vector representation corresponding to the target features, and determining the target step size based on the target time period; processing the vector representation corresponding to the target features through the neural network layer of the first prediction model according to the target step size to obtain initial daily prediction data of the domestic passenger volume corresponding to the target time period; processing the initial daily prediction data of the domestic passenger volume corresponding to the target time period through the output layer of the first prediction model to obtain daily prediction data of the domestic passenger volume.
[0110] Optionally, when executing the program, the processor also implements the following steps: processing the target features of the daily historical data through the embedding layer of the second prediction model to obtain a vector representation corresponding to the target features, and determining the target step size based on the target time period; processing the vector representation corresponding to the target features through the neural network layer of the second prediction model according to the target step size to obtain initial daily prediction data of the international passenger volume corresponding to the target time period; processing the initial daily prediction data of the international passenger volume corresponding to the target time period through the output layer of the second prediction model to obtain daily prediction data of the international passenger volume.
[0111] Optionally, when executing the program, the processor also implements the following steps: performing missing value processing and outlier processing on the daily historical data to obtain processed daily historical data; performing data normalization on the number of passengers in the processed daily historical data to obtain normalized daily historical data; performing feature engineering processing on the normalized daily historical data to obtain target features of the daily historical data.
[0112] Optionally, the processor also implements the following steps when executing the program: after obtaining the daily forecast data of the passenger volume corresponding to the target time period, obtaining the daily forecast data of the passenger volume corresponding to the first time period output by the third forecast model, wherein the third forecast model is a pre-trained long-term forecast model, and the first time period includes the target time period; based on the daily forecast data of the passenger volume corresponding to the target time period, correcting the daily forecast data of the passenger volume corresponding to the time period after the target time period in the first time period to obtain the corrected daily forecast data of the passenger volume.
[0113] Optionally, when the processor executes the program, the following steps are also implemented: obtaining a sample data set, and dividing the sample data set into a training set, a validation set, and a test set, wherein the sample data set is obtained after data preprocessing of the initial sample data set; training a time recurrent neural network based on the training set, the validation set, and the test set to obtain a target prediction model.
[0114] Optionally, when the processor executes the program, the following steps are also implemented: model training of the time recurrent neural network is performed based on the training set to obtain an initial prediction model; prediction is performed on the verification samples in the verification set based on the initial prediction model to obtain prediction results corresponding to the verification samples; the initial prediction model is optimized based on the true labels corresponding to the verification samples, the prediction results and the test set until the training results meet the preset conditions to obtain the target prediction model.
[0115] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0116] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0117] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0118] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0122] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for predicting civil aviation passenger volume, characterized in that: include: Obtain daily historical data of passenger volume corresponding to a preset historical time period; Performing data preprocessing on the daily historical data to obtain target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; The target prediction model is used to predict the future target time period based on the target characteristics of the daily historical data to obtain daily prediction data of the passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
2. The method according to claim 1, characterized in that The target prediction model at least includes a first prediction model for predicting the domestic passenger volume, and the daily prediction data of the passenger volume corresponding to the target time period at least includes the daily prediction data of the domestic passenger volume, wherein the target prediction model predicts the future target time period according to the target characteristics of the daily historical data to obtain the daily prediction data of the passenger volume corresponding to the target time period, including: Processing the target features of the daily historical data through the embedding layer of the first prediction model to obtain a vector representation corresponding to the target features, and determining a target step size according to the target time period; Processing the vector representation corresponding to the target feature according to the target step size through the neural network layer of the first prediction model to obtain initial daily prediction data of the domestic passenger volume corresponding to the target time period; The initial daily forecast data of the domestic passenger volume corresponding to the target time period is processed through the output layer of the first forecast model to obtain the daily forecast data of the domestic passenger volume.
3. The method according to claim 2, characterized in that The target prediction model further includes a second prediction model for predicting the number of international passengers, wherein the second prediction model has different model parameters from the first prediction model, and the daily prediction data of the number of passengers corresponding to the target time period also includes daily prediction data of the number of international passengers, wherein the target prediction model predicts the future target time period according to the target features of the daily historical data, and obtains the daily prediction data of the number of passengers corresponding to the target time period, including: Processing the target feature of the daily historical data through the embedding layer of the second prediction model to obtain a vector representation corresponding to the target feature, and determining a target step size according to the target time period; Processing the vector representation corresponding to the target feature according to the target step size through the neural network layer of the second prediction model to obtain initial daily forecast data of the international passenger volume corresponding to the target time period; The initial daily forecast data of the international passenger volume corresponding to the target time period is processed through the output layer of the second forecast model to obtain the daily forecast data of the international passenger volume.
4. The method according to claim 1, characterized in that The daily historical data is preprocessed to obtain target features of the daily historical data, including: Performing missing value processing and outlier processing on the daily historical data to obtain processed daily historical data; Performing data normalization processing on the number of passengers in the processed daily historical data to obtain normalized daily historical data; Perform feature engineering processing on the normalized daily historical data to obtain target features of the daily historical data.
5. The method according to claim 1, characterized in that: After obtaining the daily forecast data of the number of passengers corresponding to the target time period, the method further includes: Obtaining daily forecast data of the passenger volume corresponding to a first time period output by a third forecast model, wherein the third forecast model is a pre-trained long-term forecast model, and the first time period includes the target time period; The daily forecast data of the passenger volume corresponding to the time period after the target time period in the first time period is corrected according to the daily forecast data of the passenger volume corresponding to the target time period to obtain the corrected daily forecast data of the passenger volume.
6. The method according to claim 1, characterized in that The target prediction model is generated by the following steps: Acquire the sample data set, and divide the sample data set into a training set, a validation set, and a test set, wherein the sample data set is obtained after data preprocessing of the initial sample data set; The time recurrent neural network is trained according to the training set, the validation set and the test set to obtain the target prediction model.
7. The method according to claim 6, characterized in that The time recurrent neural network is trained according to the training set, the validation set and the test set to obtain the target prediction model, including: Performing model training on the time recurrent neural network according to the training set to obtain an initial prediction model; Predicting the verification samples in the verification set according to the initial prediction model to obtain the prediction results corresponding to the verification samples; The initial prediction model is optimized according to the real label corresponding to the verification sample, the prediction result and the test set until the training result meets the preset conditions to obtain the target prediction model.
8. A device for predicting civil aviation passenger volume, characterized in that: include: The first acquisition module is used to obtain the daily historical data of the number of passengers corresponding to a preset historical time period; A first processing module is used to perform data preprocessing on the daily historical data to obtain target features of the daily historical data, wherein the target features include at least one of the following: date features, passenger number features, weekend identification features, and holiday identification features; The second processing module is used to predict the future target time period according to the target characteristics of the daily historical data through a target prediction model, and obtain the daily prediction data of the passenger volume corresponding to the target time period, wherein the target prediction model is a short-term prediction model obtained by training a time recurrent neural network based on a sample data set.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method for predicting the civil aviation passenger volume as described in any one of claims 1 to 7 when running.
10. An electronic device, characterized in that: The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the program is configured to execute the method for predicting the civil aviation passenger volume as described in any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Subway short-term passenger flow volume prediction method based on bidirectional long-term and short-term memory network
CN110348601A
Passenger flow prediction method and device, computer equipment and storage medium
CN110852476A
Training method of passenger flow volume prediction model and passenger flow volume prediction method and device
CN113657934A
Railway station passenger flow prediction method and device, and storage medium
CN113792907A
Rail transit passenger transport data processing method, system and device and storage medium
CN118674106A
Cited By
Civil aviation passenger transport demand hierarchical prediction method and system based on multi-source heterogeneous data
CN121526176A
A Hierarchical Prediction Method and System for Civil Aviation Passenger Demand Based on Multi-Source Heterogeneous Data
CN121526176B