Data analysis method and device based on double-time-sequence model, and electronic equipment
By fusing ARIMA and LSTM models into a dual time-series model, the problem of insufficient accuracy of machine learning algorithms in civil aviation data analysis is solved, enabling efficient flight revenue prediction and decision support, and improving the accuracy of airlines' operational strategy formulation and resource allocation.
Patent Information
- Application Number
- CN202511112361.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-11-21
AI Technical Summary
Existing machine learning algorithms struggle to guarantee the accuracy of data parsing when dealing with large-scale, complex, and fluctuating civil aviation data, resulting in low accuracy in flight revenue prediction decisions. This is especially true during special periods such as holidays, when it is difficult to capture the nonlinearity and complex patterns in the data.
A data parsing method based on a dual time series model is adopted. Through feature engineering, flight information and current ticket data are transformed into suitable features. The Autoregressive Integral Moving Average (ARIMA) model with a pre-set sliding window strategy is used to capture trend and seasonal features. The Long Short-Term Memory (LSTM) network model with a pre-set recursive parsing strategy is combined to capture long-term dependent features. Finally, the results are weighted and fused through a pre-set result fusion strategy to generate accurate flight revenue prediction results.
It improves the accuracy of flight revenue forecasting, provides a stable basis for decision-making, helps airlines optimize flight scheduling and dynamic pricing strategies, and enhances customer satisfaction.
Smart Images

Figure CN120996859A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a data parsing method and apparatus, and electronic device based on a dual-time-series model. Background Technology
[0002] With the booming development of the global civil aviation industry, airlines face increasingly fierce market competition and a complex operating environment. To stand out in this environment, airlines need sophisticated management, a key aspect of which is accurate forecasting of flight revenue. Previously, while traditional statistical methods and rudimentary machine learning algorithms have aided decision-making to some extent, their accuracy in analyzing large-scale, high-frequency flight data is often unsatisfactory. Especially during peak travel seasons and holidays, the nonlinearity and complex patterns of the data make it difficult for forecasting models to capture, directly impacting the accuracy of airline revenue management decisions.
[0003] In related technologies, machine learning algorithms, while capable of handling much larger datasets than traditional statistical methods when dealing with large-scale, complex, and variable data such as civil aviation data, do not perform as well as they would with high-dimensional, sparse data. For example, models such as random forests and gradient boosting decision trees experience significantly slower training speeds on large datasets, and their interpretability is poor, making it difficult to adapt to the unique seasonal and trend variations of civil aviation data. Furthermore, relying solely on statistical methods such as historical averages for flight revenue prediction, while simple to implement, ignores the dynamic patterns and long-term dependencies in the data, failing to meet the current high requirements for prediction accuracy.
[0004] With the acceleration of industrial modernization, the aviation industry is also moving towards digitalization and intelligence, striving to improve the accuracy of flight revenue forecasting through advanced data analysis technologies, thereby optimizing flight scheduling, dynamic pricing strategies, and enhancing customer satisfaction. However, existing technologies have not yet fully demonstrated their effectiveness in handling the specific scenario of flight revenue forecasting. Traditional machine learning algorithms struggle to guarantee the accuracy of data analysis in the face of airlines' massive amounts of data and frequently changing market environments, resulting in low decision-making accuracy.
[0005] There is currently no effective solution to the above problems. Summary of the Invention
[0006] This invention provides a data parsing method, apparatus, and electronic device based on a dual-time-series model, which at least solves the technical problem in related technologies where machine learning algorithms struggle to guarantee the accuracy of data parsing when faced with large-scale, complex, and changing data, leading to low decision-making accuracy.
[0007] According to one aspect of the present invention, a data parsing method based on a dual-time-series model is provided, comprising: receiving a data parsing request and obtaining flight information and current ticket data of a target flight from an aviation database, wherein the current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted; performing feature engineering processing based on the flight information and the current ticket data to obtain a first type of feature and a second type of feature, wherein the feature engineering processing includes: feature encoding, feature derivation, and feature construction; inputting the first type of feature into a first time-series model and outputting a first result, wherein the first time-series model is an autoregressive integral moving average model with a preset sliding window strategy, which obtains data prediction results for future time periods by identifying trend features and seasonal features of the input data; inputting the second type of feature into a second time-series model and outputting a second result, wherein the second time-series model is a long short-term memory network model with a preset recursive parsing strategy, which obtains data prediction results for the target time after the future time period by capturing long-term dependency features of the input data; fusing the first result and the second result based on a preset result fusion strategy, and using the fused result to execute business decisions for the target flight.
[0008] Further, the step of performing feature engineering processing based on the flight information and the current ticket data to obtain a first type of feature and a second type of feature includes: obtaining model data requirements, wherein the model data requirements include at least a first requirement and a second requirement, the first requirement being used to describe the content, structure, and format requirements of the first time series model for the input data, and the second requirement being used to describe the content, structure, and format requirements of the second time series model for the input data; performing classification analysis on the flight information and the current ticket data to obtain M types of feature information for the target flight, wherein M is a positive integer; and comparing the data with the features indicated by the model data requirements. The requirement feature category and the M types of feature information are used to derive N types of derived feature information, where N is a non-negative integer; numerical and non-numerical features in the M types of feature information and the N types of derived feature information are identified, and the non-numerical features are numerically encoded; the numerical features and the numerical encoding are integrated to obtain the feature code corresponding to the target flight, wherein the feature code contains M+N encoding elements; the feature code is element-filtered based on the first requirement to obtain the first type of feature, and the feature code is element-filtered based on the second requirement to obtain the second type of feature.
[0009] Further, the first time series model is generated through the following steps: obtaining the autoregressive integral moving average model; initializing the model parameters based on the sliding window strategy, wherein the model parameters include: autoregressive order, moving average order, and seasonality parameters; obtaining historical data of the target flight from the aviation database, wherein the historical data includes: historical flight information and historical ticket data; training the initialized autoregressive integral moving average model using the historical data, and adjusting the model parameters during the training process until the model evaluation index meets the expected performance requirements, thereby obtaining the first time series model, wherein the model evaluation index includes at least: mean squared error.
[0010] Furthermore, the feature elements of the first type of feature include at least: the departure date, flight number, departure airport code, arrival airport code, and daily revenue value of the target flight up to the day the data parsing requirement is submitted.
[0011] Further, the step of inputting the first type of features into the first time-series model and outputting the first result includes: matching a model calculation mode based on the flight number, the departure airport code, and the arrival airport code, wherein the model calculation mode is at least used to determine the observation period of the target flight, and the observation period is used to determine the number of features X used in each prediction, where X is a positive integer; determining a prediction range based on the current date and the departure date, wherein the prediction range is used to indicate the number of revenue days S in the future period to be predicted, where S is a positive integer; and performing S calculations using the daily revenue values within the observation period according to the model calculation mode and the prediction range to obtain the first result, wherein the first result contains S predicted revenue values.
[0012] Furthermore, the second time-series model includes the following architectural components: a forget gate, used to receive the previous hidden state and calculate the forget ratio based on the previous hidden state and the forget formula, wherein the forget ratio is used to characterize the degree of retention of the previous state in the current state calculation; an input gate, used to receive input data and calculate candidate information based on the input data and the input formula, wherein the candidate information is used to participate in the cell state update process; a cell state component, used to receive the previous cell state, the forget ratio, and the candidate information, and calculate the current cell state based on the previous cell state, the forget ratio, the candidate information, and the update formula; and an output gate, used to receive the current cell state and calculate the current hidden state based on the current cell state and the output formula.
[0013] Furthermore, the feature elements of the second type of feature include at least: the number of days from the current date to the departure date, the daily revenue value of the target flight up to the date the data parsing request is submitted, the holiday identifier and weekend identifier corresponding to the departure date.
[0014] Further, the step of inputting the second type of feature into the second time series model and outputting the second result includes: determining the calculation step size T of the second time series model, and determining the number of calculation steps S based on the number of days between the current date and the departure date, where T is a positive integer; constructing an input data sequence based on the calculation step size T, the number of calculation steps S, the daily profit value, the holiday identifier, and the weekend identifier, wherein the input data sequence contains S input data for the input gate to call; calling the forget gate, the input gate, the cell state element, and the output gate according to the recursive parsing strategy; performing S steps of recursive calculation based on the input data sequence to obtain the second result, wherein the second result records S predicted profit values.
[0015] Further, the step of fusing the first result and the second result based on a preset result fusion strategy includes: determining the first predicted revenue value corresponding to the target time in the first result and the second predicted revenue value corresponding to the target time in the second result, and calculating the difference between the first predicted revenue value and the second predicted revenue value; determining whether the departure date of the target flight date falls within a long holiday period based on the flight information, and obtaining a determination result; calculating the variance of all predicted revenue values in the second result; determining the fusion weight based on the difference, the determination result, and the variance value; and performing a weighted calculation on the first predicted revenue value and the second predicted revenue value based on the fusion weight to obtain the fusion result.
[0016] According to another aspect of the present invention, a data parsing apparatus based on a dual-time-series model is also provided, comprising: an acquisition unit, configured to receive a data parsing request and acquire flight information and current ticket data of a target flight from an aviation database, wherein the current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted; a first processing unit, configured to perform feature engineering processing based on the flight information and the current ticket data to obtain a first type of feature and a second type of feature, wherein the feature engineering processing includes: feature encoding, feature derivation, and feature construction; and a first input unit, configured to input the first type of feature into a first time-series model and output a first result. The results are as follows: the first time series model is an autoregressive integral moving average model with a preset sliding window strategy, which obtains data prediction results for future periods by identifying the trend and seasonal characteristics of the input data; the second input unit is used to input the second type of features into the second time series model and output the second result, wherein the second time series model is a long short-term memory network model with a preset recursive parsing strategy, which obtains data prediction results for the target time after the future period by capturing the long-term dependency characteristics of the input data; the second processing unit is used to fuse the first result and the second result based on a preset result fusion strategy, and use the fused result to execute the business decision of the target flight.
[0017] Further, the first processing unit includes: a first acquisition module, used to acquire model data requirements, wherein the model data requirements include at least a first requirement and a second requirement, the first requirement describing the content, structure, and format requirements of the first time series model for the input data, and the second requirement describing the content, structure, and format requirements of the second time series model for the input data; a classification module, used to perform classification analysis on the flight information and the current ticket data to obtain M types of feature information of the target flight, wherein M is a positive integer; and a derivation module, used to compare the requirement feature categories indicated by the model data requirements with the M types of feature information. The system performs a feature derivation process to obtain N types of derived feature information, where N is a non-negative integer. An encoding module is used to identify numerical and non-numerical features among the M types of feature information and the N types of derived feature information, and to numerically encode the non-numerical features. An integration module is used to integrate the numerical features and the numerical encoding to obtain the feature code corresponding to the target flight, wherein the feature code contains M+N encoding elements. A filtering module is used to filter the feature code based on the first requirement to obtain the first type of feature, and to filter the feature code based on the second requirement to obtain the second type of feature.
[0018] Furthermore, the data parsing device based on the dual time-series model further includes: a generation unit for generating the first time-series model, the generation unit comprising: a second acquisition module for acquiring the autoregressive integral moving average model; an initialization module for initializing the model parameters based on the sliding window strategy, wherein the model parameters include: autoregressive order, moving average order, and seasonality parameters; a third acquisition module for acquiring historical data of the target flight from the aviation database, wherein the historical data includes: historical flight information and historical ticket data; and a training module for training the initialized autoregressive integral moving average model using the historical data, and adjusting the model parameters during the training process until the model evaluation index meets the expected performance requirements, thereby obtaining the first time-series model, wherein the model evaluation index includes at least: mean squared error.
[0019] Furthermore, the feature elements of the first type of feature include at least: the departure date, flight number, departure airport code, arrival airport code, and daily revenue value of the target flight up to the day the data parsing requirement is submitted.
[0020] Further, the first input unit includes: a matching module, used to match a model calculation mode based on the flight number, the departure airport code, and the arrival airport code, wherein the model calculation mode is used to determine at least the observation period of the target flight, and the observation period is used to determine the number of features X used in each prediction, where X is a positive integer; a first determining module, used to determine a prediction range based on the current date and the departure date, wherein the prediction range is used to indicate the number of revenue days S in the future period to be predicted, where S is a positive integer; and a first calculation module, used to perform S calculations using the daily revenue values within the observation period according to the model calculation mode and the prediction range to obtain the first result, wherein the first result contains S predicted revenue values.
[0021] Furthermore, the second time-series model includes the following architectural components: a forget gate, used to receive the previous hidden state and calculate the forget ratio based on the previous hidden state and the forget formula, wherein the forget ratio is used to characterize the degree of retention of the previous state in the current state calculation; an input gate, used to receive input data and calculate candidate information based on the input data and the input formula, wherein the candidate information is used to participate in the cell state update process; a cell state component, used to receive the previous cell state, the forget ratio, and the candidate information, and calculate the current cell state based on the previous cell state, the forget ratio, the candidate information, and the update formula; and an output gate, used to receive the current cell state and calculate the current hidden state based on the current cell state and the output formula.
[0022] Furthermore, the feature elements of the second type of feature include at least: the number of days from the current date to the departure date, the daily revenue value of the target flight up to the date the data parsing request is submitted, the holiday identifier and weekend identifier corresponding to the departure date.
[0023] Further, the second input unit includes: a second determining module, used to determine the calculation step size T of the second time series model, and determine the number of calculation steps S based on the number of days between the current date and the takeoff date, where T is a positive integer; a construction module, used to construct an input data sequence based on the calculation step size T, the number of calculation steps S, the daily profit value, the holiday identifier, and the weekend identifier, wherein the input data sequence contains S input data for the input gate to call; a calling module, used to call the forget gate, the input gate, the cell state element, and the output gate according to a recursive parsing strategy; and a second calculation module, used to perform S steps of recursive calculation based on the input data sequence to obtain the second result, wherein the second result records S predicted profit values.
[0024] Further, the second processing unit includes: a third calculation module, used to determine the first predicted revenue value corresponding to the target time in the first result and the second predicted revenue value corresponding to the target time in the second result, and calculate the difference between the first predicted revenue value and the second predicted revenue value; a third determination module, used to determine whether the departure date of the target flight date falls within a long holiday period based on the flight information, and obtain a determination result; a fourth calculation module, used to calculate the variance of all predicted revenue values in the second result; a fourth determination module, used to determine the fusion weight based on the difference, the determination result, and the variance value; and a fifth calculation module, used to perform a weighted calculation on the first predicted revenue value and the second predicted revenue value based on the fusion weight, and obtain the fusion result.
[0025] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute any of the above-described data parsing methods based on a dual-time-series model.
[0026] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described data parsing methods based on a dual-time-series model.
[0027] This invention proposes a data parsing method based on a dual-time-series model. First, a data parsing request is received, and flight information and current ticket data for the target flight are obtained from an aviation database. The current ticket data refers to the daily booking records for the target flight up to the date the data parsing request is submitted. Then, feature engineering is performed on the flight information and current ticket data to obtain a first type of feature and a second type of feature. The feature engineering process includes feature encoding, feature derivation, and feature construction. The first type of feature is then input into a first time-series model, outputting a first result. The first time-series model is an autoregressive integral moving average model with a pre-set sliding window strategy, which obtains data prediction results for future time periods by identifying the trend and seasonal characteristics of the input data. The second type of feature is then input into a second time-series model, outputting a second result. The second time-series model is a long short-term memory network model with a pre-set recursive parsing strategy, which obtains data prediction results for the target time period after the future time period by capturing the long-term dependency characteristics of the input data. Finally, the first and second results are fused based on a pre-set result fusion strategy, and the fused result is used to execute business decisions for the target flight.
[0028] This invention employs a dual-time-series model fusion approach, utilizing feature engineering and targeted model applications to improve the accuracy of flight revenue prediction. This achieves the technical effect of data-driven, efficient decision-making. Specifically, the invention first performs detailed feature engineering on the collected flight information and current ticket data, including feature encoding, derivation, and construction, ensuring that all mined features accurately reflect the influencing factors of flight revenue. Then, an Autoregressive Integral Moving Average (ARIMA) model with a pre-set sliding window strategy is used to process the first type of features, capturing the trend and seasonal changes in the data and generating preliminary revenue predictions. Simultaneously, a Long Short-Term Memory (LSTM) network model with a pre-set recursive parsing strategy is used for the second type of features to accurately grasp the long-term dependencies of the data, resulting in more refined revenue predictions. Finally, a pre-set result fusion strategy intelligently weights and fuses the prediction results of the two models to obtain the final fusion result. This result is more comprehensive and stable, effectively guiding key business decisions such as dynamic pricing and resource allocation for flights. This solves the technical problem in related technologies where machine learning algorithms struggle to guarantee the accuracy of data parsing when faced with large-scale, complex, and fluctuating data, leading to low decision-making accuracy. Attached Figure Description
[0029] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0030] Figure 1This is a flowchart of an optional data parsing method based on a dual-time-series model according to an embodiment of the present invention;
[0031] Figure 2 This is a flowchart of an optional dual-time-series model revenue prediction algorithm according to an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram of an optional data parsing device based on a dual-time-series model according to an embodiment of the present invention;
[0033] Figure 4 This is a structural block diagram of an electronic device for performing a data parsing method based on a dual-time-series model according to an embodiment of the present invention. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0036] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0037] ARIMA, or Autoregressive Integrated Moving Average Model, is a statistical model used for time series forecasting. The ARIMA model captures trends, seasonality, and randomness in a dataset, and its predictive performance is optimized by adjusting the autoregressive (AR), integral (I), and moving average (MA) components. In flight revenue forecasting, the ARIMA model is primarily used to handle data with strong trends and seasonality to achieve short-term forecasts of flight revenue.
[0038] Long Short-Term Memory Network (LSTM) is a special type of Recurrent Neural Network (RNN) designed to address the vanishing or exploding gradient problems that traditional RNNs encounter when processing long sequences of data. By introducing forget gates, input gates, and output gates, the LSTM model can remember long-term dependent information while ignoring irrelevant information, making it highly suitable for handling long-term dependencies and nonlinear relationships in flight revenue prediction problems.
[0039] Feature engineering, a key step in data science, involves extracting, transforming, and constructing useful features from raw data to improve the performance of machine learning models. In this invention, feature engineering encompasses data preprocessing, feature derivation, and feature construction, with the aim of transforming flight information and ticket data into a form that the model can understand and extracting factors that significantly impact flight revenue.
[0040] The sliding window strategy is a commonly used data processing method in time series analysis. It constructs a series of overlapping subsequences by moving a fixed-length window across the time series data, serving as training or testing data for the model. This strategy captures trends across consecutive time points. In the application of the ARIMA model, the sliding window strategy helps the model learn the dynamic changes in historical returns, improving prediction accuracy.
[0041] Recursive parsing plays a crucial role in the prediction process of LSTM models. It refers to the model's ability to update its internal state based on predictions from previous time points and then use this updated state to predict the next time point. This strategy allows LSTM models to progressively accumulate and refine prediction information when dealing with flight revenue prediction problems, resulting in more consistent and dynamic predictions.
[0042] The following embodiments of the present invention can be applied to various systems / applications / devices that require flight revenue forecasting and dynamic business decision optimization, enabling flight revenue forecasting technology based on dual time-series model fusion. The present invention uses an ARIMA model to identify trend and seasonal revenue characteristics, and then an LSTM model to capture and predict long-term dependency characteristics. This better integrates complex patterns in historical data with dynamic changes in real-time data, thereby improving the accuracy and reliability of the prediction results.
[0043] This invention first performs feature engineering on flight information and current ticket data to ensure that all key features are effectively encoded and derived, providing high-quality data for the input of the dual-time-series model. Next, the ARIMA model, based on the statistical characteristics of historical revenue sequences, quickly identifies short-term trends and seasonal fluctuations in flight revenue, generating preliminary predictions. Meanwhile, the LSTM model delves deeper into long-term dependencies, particularly accurately predicting revenue changes during special periods such as holidays and peak tourist seasons, outputting more detailed prediction data. Finally, through a pre-defined result fusion strategy, considering the prediction differences between the two models, whether it is a long holiday, and the stability of the LSTM model's prediction results, the fusion weights are determined, achieving a weighted average of the prediction results to obtain the fused result. This result not only improves the accuracy of predictions but also provides airlines with a stable and reliable basis for decision-making.
[0044] The present invention will now be described in detail with reference to various embodiments.
[0045] Example 1
[0046] According to an embodiment of the present invention, a data parsing method based on a dual-time-series model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0047] Examples of embodiments of the present invention Figure 1 The data parsing method based on a dual time series model is shown. The main body of this method is the flight revenue management system. It combines dual time series model prediction technology for flight revenue prediction scenarios, especially for the problem of accurate parsing of large-scale, complex and variable data. By integrating the data parsing methods of ARIMA model and LSTM model, the specific steps are data acquisition, feature engineering processing, model training and prediction, and result fusion processing, so as to improve the accuracy of flight revenue prediction and assist airlines in optimizing business decisions.
[0048] In the implementation process, firstly, the flight revenue management system receives requests for flight revenue forecasting and extracts flight information and current ticket data for target flights from the aviation database. Next, feature engineering is performed on this data to generate first and second types of features suitable for input into the dual-time-series model. Subsequently, the ARIMA model identifies the trend and seasonal characteristics of the input data, while the LSTM model captures long-term dependency features, each outputting its own forecast results. Finally, the forecast results from the two models are weighted and fused according to a pre-defined fusion strategy, outputting a fused result. This result more accurately reflects the expected revenue of future flights, providing airlines with strong data support and helping them formulate optimal operating strategies in fierce market competition, achieving rational resource allocation and maximizing revenue goals.
[0049] Figure 1 This is a flowchart of an optional data parsing method based on a dual-time-series model according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0050] Step S101: Receive the data parsing request and obtain the flight information and current ticket data of the target flight from the aviation database. The current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted.
[0051] It should be noted that data analysis requests refer to specific instructions or requirements from airlines regarding flight revenue forecasts. This means that airlines want to obtain revenue forecasts for a specific flight in a specific period of the future to assist their operational decisions.
[0052] An aviation database is a centralized data warehouse used by airlines to store all information related to flights, including but not limited to detailed flight information (such as flight number, departure and arrival times, departure and arrival airports, etc.) and every ticket sales record related to that flight.
[0053] Target flights refer to specific flights selected by an airline for revenue forecasting. These can be flights that are about to depart or flights planned to operate at a future point in time. The selection of target flights is closely related to the airline's operational strategy, such as forecasting revenue for popular routes, peak seasons, or off-peak seasons, in order to better adjust pricing strategies, optimize route planning, or manage passenger demand.
[0054] Flight information covers the basic attributes and operational details of a flight, such as flight number, route, takeoff and landing time, aircraft type, and seat layout. Current ticket data refers to all booking records for the target flight up to the day the data analysis request is submitted, including booking date, booking amount, and number of tickets booked. It is the most direct and dynamic signal for flight revenue forecasting.
[0055] In this embodiment of the invention, flight information includes at least: flight number, departure date, departure time, arrival time, departure airport, and arrival airport; current ticket data includes at least: booking date and booking amount.
[0056] In this embodiment of the invention, in addition to the flight's own operational data, external data such as macroeconomic indices, tourism popularity, and destination weather forecasts can be combined to provide the model with richer contextual information. However, this requires more complex multi-source data fusion technology and model architecture, which can significantly improve the accuracy and practicality of predictions.
[0057] Step S102: Based on flight information and current ticket data, feature engineering is performed to obtain the first type of feature and the second type of feature. The feature engineering process includes feature encoding, feature derivation and feature construction.
[0058] In one optional embodiment, feature engineering may further include preprocessing, specifically missing value processing and outlier processing. For categorical features, a default value (e.g., -1) may be filled in to indicate that the value is missing or outlier. For numerical features, the most similar sample may be matched from the historical database, and the corresponding feature value in the sample may be used to fill in the value.
[0059] It should be noted that feature engineering is a crucial preprocessing step in data science, aiming to extract, transform, and construct features meaningful to machine learning models from raw data. In this embodiment of the invention, the purpose of feature engineering is to transform flight information and current ticket data into a form suitable for input into ARIMA and LSTM models, including but not limited to: feature encoding, feature derivation, and feature construction.
[0060] Specifically, because the features contain non-numeric special symbols, such as weekends and holidays, while the model actually needs numerical features, these data need to be converted into numerical form for encoding, facilitating later algorithm calculations. Feature encoding refers to converting non-numerical features into numerical ones for easier model processing. For example, converting dates into days until the target departure date, or converting unstructured text descriptions into binary or numerical codes. Feature encoding ensures that categorical features (such as airport codes, holiday status, etc.) are correctly identified and utilized by the model.
[0061] In one optional embodiment, if the feature values are comparable, they are converted into numerical values according to the relative size of the features to complete the quantization encoding process; if the feature values are not comparable and the number of feature categories is not too large, one-hot encoding is used.
[0062] Feature derivation refers to creating new features from original features to reveal the underlying structure or relationships in the data. For example, daily growth rates of passenger ticket sales or average ticket prices can be derived to reflect dynamic changes in market demand or the popularity of a flight route.
[0063] Feature construction refers to creating more indirect feature combinations by combining existing features through mathematical or logical operations. This can include feature permutations, sorting, multiplication, division, weighted averaging, etc., to capture the interaction between different features. For example, combining the busyness of take-off and landing airports with current ticket prices can assess the impact of ticket prices on passenger attractiveness.
[0064] In this embodiment of the invention, the first type of feature refers to the features used in the ARIMA model, which focuses on the time series characteristics of flight revenue, such as the revenue sequence of historical completed flights, departure and arrival dates, etc.; while the second type of feature is used in the LSTM model, which pays more attention to the long-term dependence and dynamic changes of flight revenue, such as flight number, number of days before departure, and attributes of departure and arrival dates (whether it is a holiday or a weekend), etc.
[0065] In one optional embodiment, the features used in the ARIMA time series model are: the departure dates of all completed target flights; the flight numbers of all completed target flights; the departure airport codes of all completed target flights; the arrival airport codes of all completed target flights; and the total revenue of all completed target flights (the sum of ticket bookings for all passengers on that flight).
[0066] In another optional embodiment, the features used by the LSTM time series model are: the departure dates of all completed target flights; the flight numbers of all completed target flights; the departure airport codes of all completed target flights; the arrival airport codes of all completed target flights; the number of days in advance d (d > n); the real-time revenue of each completed target flight up to d days prior (the sum of the ticket amounts of all passengers on that flight, for example: the real-time revenue of target flight XXX departing on January 15 as of January 10, where d = 5); the day of the week for the departure dates of all completed target flights; whether all completed target flights are during holidays; and whether all completed target flights are on weekends.
[0067] Further, the steps of performing feature engineering processing based on flight information and current ticket data to obtain the first type of features and the second type of features include: obtaining model data requirements, wherein the model data requirements include at least the first requirement and the second requirement, the first requirement being used to describe the content, structure, and format requirements of the input data for the first time series model, and the second requirement being used to describe the content, structure, and format requirements of the input data for the second time series model; classifying and analyzing the flight information and current ticket data to obtain M types of feature information for the target flight, wherein M is a positive integer; performing feature derivation by comparing the required feature categories indicated by the model data requirements with the M types of feature information to obtain N types of derived feature information, wherein N is a non-negative integer; identifying numerical and non-numerical features in the M types of feature information and the N types of derived feature information, and numerically encoding the non-numerical features; integrating the numerical features and numerical encoding to obtain the feature code corresponding to the target flight, wherein the feature code contains M+N encoding elements; filtering the feature code based on the first requirement to obtain the first type of features, and filtering the feature code based on the second requirement to obtain the second type of features.
[0068] It should be noted that the model data requirements define the specific requirements for input data for both the first time series model (ARIMA) and the second time series model (LSTM), including the content, structure, and format of the data. ARIMA's requirements may emphasize the continuity and periodicity of time series data, requiring input data to include continuous features such as historical revenue and flight dates; while LSTM may focus more on the relationship between current and historical states, requiring more contextual information, such as flight numbers, advance booking days, and holidays.
[0069] In feature engineering, classification analysis involves structuring flight information and current ticket data into several categories, collectively forming M types of feature information. These might include flight departure and arrival times, airports, flight numbers, and fare levels. This multi-category feature information forms the foundation of feature engineering, ensuring that the diversity of the original data is fully preserved and providing broad data support for subsequent feature derivation and model selection.
[0070] Feature derivation involves calculating and combining existing features to generate new, more predictive features. The N types of derived features constitute the derived feature set. Examples include average daily revenue calculated from historical revenue data and the weekly growth rate of bookings. Derived features can reveal potential relationships and patterns in the original data, enhancing the model's learning ability, particularly in capturing nonlinear relationships and time dependencies.
[0071] Numerical encoding involves converting non-numerical features into numerical representations so that the model can understand and process them. For example, one-hot encoding or label encoding can be used to convert categorical features such as airport codes or holiday status into binary vectors. Processing both numerical and non-numerical features ensures that all input features can be effectively parsed by the model, while feature derivation and numerical encoding improve the model's sensitivity to data and prediction accuracy.
[0072] Feature encoding is a feature representation consisting of M+N coded elements, formed by integrating and quantifying M types of feature information and N types of derived feature information. Each coded element represents a processed feature value, which is the direct input to the model's prediction. Feature encoding provides the model with a structured and numerical input, facilitating the model to learn the prediction patterns of flight revenue through mathematical operations. It also provides a standardized data format for subsequent model training and prediction.
[0073] Based on the first and second requirements, the M+N encoding elements in the feature encoding are filtered, retaining only the features most relevant to their respective models. For example, ARIMA might primarily focus on historical return sequences, while LSTM is more interested in historical booking patterns and holiday effects. Element filtering ensures the conciseness and relevance of the model input, avoids interference from irrelevant features in the model's predictions, and improves the model's training efficiency and prediction accuracy.
[0074] Step S103: Input the first type of features into the first time series model and output the first result. The first time series model is an autoregressive integral moving average model with a preset sliding window strategy. It obtains the data prediction results for future periods by identifying the trend characteristics and seasonal characteristics of the input data.
[0075] It should be noted that the ARIMA model is a statistical model used for predicting time series data, and is particularly suitable for predicting time series data with trend and seasonal characteristics. In this embodiment of the invention, the ARIMA model with a pre-set sliding window strategy is designed to handle the first type of feature, namely the sequence feature containing historical flight revenue data, which can reflect the changing pattern of revenue over time.
[0076] The ARIMA model is pre-configured with a sliding window strategy. A sliding window is a data preprocessing technique that divides the time series data into multiple consecutive subsequences by moving a fixed-length window over the data. Each subsequence serves as an observation window for the model, which helps the ARIMA model capture the influence of recent data while maintaining sensitivity to earlier data, thereby optimizing the prediction results.
[0077] The ARIMA model can identify and adjust for linear trends in time series, whether upward, downward, or stationary, all of which can be incorporated into the forecasting process. In flight revenue forecasting, the model captures directional changes in revenue over time through its autoregressive (AR) component, such as the shift between peak and off-peak seasons. Seasonality is a significant feature of flight revenue data, such as high demand during the summer holidays and a slump after Christmas. The ARIMA model identifies these cyclical patterns through its seasonal difference (S) and moving average (MA) components, ensuring that the forecast reflects revenue fluctuations at specific points in time.
[0078] This invention utilizes the statistical analysis capabilities of the ARIMA model to extract valuable trend and seasonal characteristics from historical flight revenue data, thereby predicting flight revenue for a specific future time period.
[0079] Another option is to use deep learning-based time series prediction models, such as convolutional recurrent neural networks (CRNNs), which combine the advantages of convolutional neural networks (CNNs) and recurrent neural networks (RNNs). CNNs are used to capture spatial patterns of features, while RNNs are used to handle long-term dependencies in time series, potentially showing better predictive performance in complex data patterns and nonlinear relationships.
[0080] Alternatively, variational autoencoders (VAEs) can be used in conjunction with time series prediction. VAEs can learn the latent representations of time series data, which helps reduce data dimensionality and extract key features. Or, gradient boosting-based decision tree algorithms can handle classification and regression problems as well as time series data. By constructing multiple decision trees and optimizing the residuals in each iteration, they can capture complex patterns in the data and improve the stability of predictions through ensemble learning.
[0081] To provide more accurate and reliable future revenue predictions, the first time-series model can optionally be generated through the following steps: obtaining an autoregressive integral moving average model; initializing the model parameters based on a sliding window strategy, wherein the model parameters include: autoregressive order, moving average order, and seasonality parameters; obtaining historical data of the target flight from an aviation database, wherein the historical data includes: historical flight information and historical ticket data; training the initialized autoregressive integral moving average model using the historical data, and adjusting the model parameters during the training process until the model evaluation metrics meet the expected performance requirements, thereby obtaining the first time-series model, wherein the model evaluation metrics include at least: mean squared error.
[0082] It's important to note that the sliding window strategy is a crucial step in initializing ARIMA model parameters. By setting a time window, the model can be trained and used to predict data for the next point in time based on historical data within that window. For example, if the time window is set to 30 days, the model will be trained using flight revenue data from the previous 30 days and then predict revenue for the 31st day. The length of the sliding window significantly impacts model performance and needs to be adjusted based on the characteristics of the data (such as periodicity and volatility).
[0083] Specifically, historical flight information includes, but is not limited to, flight number, departure date, and departure and arrival airports; historical ticket data includes, but is not limited to, booking date and ticket price. The extracted historical data is used to train the initialized ARIMA model.
[0084] During training, the model learns trend and seasonal characteristics based on historical revenue sequences. To optimize the model, the model parameters (autoregressive order p, moving average order q, seasonality parameter D) are adjusted during training—based on a preliminary analysis of the characteristics of historical data. For example, if flight revenue data exhibits a clear annual cycle, the seasonality difference order D might be set to 12 (12 months in a year). This continues until the model evaluation metric (such as mean squared error MSE) falls below a predetermined performance threshold, indicating that the model's predictive ability has reached the expected accuracy.
[0085] An optional formula for the ARIMA time series model in this embodiment of the invention can be expressed as follows (since the time series of flight revenue is relatively stable, the differencing process is not considered):
[0086]
[0087] Among them, Y t Y is the value of the time series at time point t. t-1 It represents the value of the time series at time point t-1, and so on; c is the constant term; autoregressive coefficients Y represents the current value of the time series at time point t. t Compared to its previous time point Y t-i The degree of linear relationship between the values, if This represents the past value Y. t-i For the current value Y t It has a positive impact, meaning that high past values tend to lead to relatively high current values; the larger the absolute value, the greater the impact, and vice versa; the moving average coefficient θ i Y represents the current value of the time series at time point t. t Compared to its previous time point Y t-i The degree of linearity of the error between them, if θ i >0 indicates that the past error ∈ t-iFor the current value Y t It has a positive impact, meaning that past errors will lead to a relatively higher current value; the larger the absolute value, the greater the impact, and vice versa. t This is random error.
[0088] Since the difference process is not considered, the parameters of the ARIMA time series model are: p in the above formula: represents the order of the autoregressive part, that is, the number of past observations used in the model to predict the current value; q in the above formula: represents the order of the moving average part, that is, the number of past error terms used in the model to predict the current value.
[0089] The model's input is the revenue of the target flight that has been completed from the current time t to time tm (in days; empirically, m = 35). The model's output is a set of predicted revenues from time t+1 to time t+n (in days) (the number of results n in the result set is determined using the parameter steps in the model). Therefore, the revenue at time t+n is the predicted revenue of the target flight after day n.
[0090] A specific example, after model training and experimental debugging, shows the final parameters of the ARIMA time series model as shown in Table 1:
[0091] Table 1
[0092]
[0093] The first type of feature consists of a carefully selected set of data fields used as input to the first time series model (ARIMA) to predict the future revenue of a target flight. Furthermore, the first type of feature elements include at least: the target flight's departure date, flight number, departure airport code, arrival airport code, and the daily revenue value of the target flight up to the date the data parsing requirement is submitted. These elements collectively constitute the foundational information for model training and prediction, especially the daily revenue value, which is crucial data for the ARIMA model to predict revenue.
[0094] To achieve a reasonable estimate of flight revenue within a specific future time period, the steps of inputting a first type of feature into a first time-series model and outputting a first result include: matching a model calculation mode based on the flight number, departure airport code, and arrival airport code, wherein the model calculation mode is used to determine at least the observation period of the target flight, and the observation period is used to determine the number of features X used in each prediction, where X is a positive integer; determining the prediction range based on the current date and departure date, wherein the prediction range is used to indicate the number of revenue days S in the future time period to be predicted, where S is a positive integer; and performing S calculations using the daily revenue values within the observation period according to the model calculation mode and the prediction range to obtain the first result, wherein the first result contains S predicted revenue values.
[0095] It's important to note that the matching model's calculation mode determines its data processing strategy based on flight numbers, departure airport codes, and arrival airport codes, particularly the observation period. The observation period refers to the number of consecutive historical data points the model considers when processing time-series data. For example, if historical data shows a consistent revenue trend every 30 days, the observation period might be set to 30 days so the model can accurately capture this trend and use it for prediction.
[0096] The observation period is determined based on the characteristics of historical data and directly affects the model's predictive performance. An observation period that is too short may fail to capture sufficient trend information, while an excessively long period may introduce unnecessary noise, affecting the model's accuracy. This invention, by observing historical data, can find an optimal period length that reflects the pattern of profit changes, thereby improving the performance of the predictive model.
[0097] The forecast range indicates the future time span the model uses to predict, defined as the revenue forecast from the current date to a specific number of days in the future. For example, the forecast range might be the revenue of a target flight over the next 30 days starting today. It should be set according to business needs and model capabilities to ensure that the forecast results both meet practical requirements and have sufficient accuracy.
[0098] The predicted revenue value is the output of the model, representing the predicted flight revenue for each day within the prediction range. The ARIMA model learns patterns in revenue changes by using historical daily revenue values within the observation period, and then predicts revenue for a certain number of days to come.
[0099] It should be noted that the forecast range is defined based on the current date and the departure date of the target flight, defining the number of days S to be forecasted. For example, if the current date is January 1, 2025, the departure date of the target flight is January 10, 2025, and the demand is to forecast revenue for the next 30 days, then the forecast range is from January 10, 2025 to February 8, 2025, a total of 30 days.
[0100] In a specific implementation scenario, suppose we want to predict the daily revenue of a specific flight (flight number: ABCD1234) for the next 30 days after its departure on January 10, 2025. First, we collect the daily revenue data for the flight over the past year, along with relevant information such as the flight number, departure airport code (XYZ), and arrival airport code (PQR). Analysis of the data reveals that the flight revenue exhibits a monthly cyclical change; therefore, we choose an observation period X = 30 days, indicating that the revenue information from the past 30 days will be used in the prediction. The prediction range S is set to 30 days, starting from January 10, 2023. The daily revenue values within the observation period (30 days) are input into the ARIMA model, and 30 predictions are performed to obtain the predicted daily revenue values from January 10 to February 8, 2023.
[0101] Step S104: Input the second type of features into the second time series model and output the second result. The second time series model is a long short-term memory network model with a pre-set recursive parsing strategy. It obtains the data prediction result of the target time after the future period by capturing the long-term dependency features of the input data.
[0102] It should be noted that the LSTM model is a special type of recurrent neural network (RNN) designed specifically to overcome the vanishing and exploding gradient problems in long-sequence data, and can effectively capture and preserve long-term dependency information. In this embodiment of the invention, the second type of feature—features containing long-term dynamic changes in flight revenue and contextual information related to a specific point in time—is input into the LSTM model.
[0103] LSTM controls the flow and retention of information through its internal "gate" mechanism (including input gate, forget gate, and output gate). The recursive parsing strategy allows the model to selectively remember and forget based on past states and new input information when processing sequential data, thereby better parsing long-term dependencies in the data.
[0104] In this embodiment of the invention, a significant advantage of the LSTM model is its ability to handle long-term dependencies in the data. For example, passenger booking behavior may be driven by a variety of long-term influencing factors such as advance booking time windows and holiday effects. LSTM can capture these long-term dependencies through its internal state and can maintain the memory of key information even when the time window expands, which is very effective for predicting the revenue of flights far from the departure date.
[0105] This invention utilizes a recursive analytical strategy based on an LSTM model to extract and leverage long-term patterns and dynamic changes in flight revenue data from the second type of features. This allows for the prediction of revenue at a future target time (e.g., n days before departure), helping airlines to more accurately estimate long-term revenue trends and providing support for longer-term capacity planning, fare strategy adjustments, and market analysis.
[0106] Another alternative, in the context of seeking to capture long-term dependent features to predict target time data in future periods, is the Gated Recurrent Unit (GRU) model, a simplified version of LSTM that retains the long-term memory capability of LSTM while reducing the number of parameters and computational complexity. It can provide similar prediction accuracy to LSTM while reducing training and running time.
[0107] Furthermore, the second temporal model includes the following architectural components: a forget gate, used to receive the previous hidden state and calculate the forget ratio based on the previous hidden state and the forget formula, wherein the forget ratio is used to characterize the degree of retention of the previous state in the current state calculation; an input gate, used to receive input data and calculate candidate information based on the input data and the input formula, wherein the candidate information is used to participate in the cell state update process; a cell state component, used to receive the previous cell state, the forget ratio, and the candidate information, and calculate the current cell state based on the previous cell state, the forget ratio, the candidate information, and the update formula; and an output gate, used to receive the current cell state and calculate the current hidden state based on the current cell state and the output formula.
[0108] It's important to note that the forget gate is a component of the LSTM network, and its function is to determine how much information from the cell state in the previous time step is retained in the current time step. The forget gate receives the hidden state from the previous step and the current input, and calculates the forgetting ratio using a forgetting formula to determine which information is discarded and which is retained. The forgetting ratio directly reflects the degree to which information from the previous step is retained in the current step's state computation, and is crucial for filtering out irrelevant or outdated information.
[0109] An alternative, forget gate formula is expressed as: f t =σ(W f ·[h t-1 ,x t ]+b f ); where f t The output of the forget gate determines the proportion of information from the previous state retained in the current state; W f This is the weight matrix of the forget gate, b f It is the bias term; σ is the activation function; h t-1 This is the output of step t-1; x t This is the input for step t.
[0110] Another point to note is that the input gate in an LSTM network receives the input data and calculates candidate information using the input formula, thus determining how much of the current input data will be stored in the cell state. This candidate information is intermediate data, used together with the output of the forget gate to update the cell state, ensuring that meaningful information is remembered by the model.
[0111] An alternative, the input gate formula is expressed as: i t =σ(W i ·[h t-1 ,x t ]+b i ); where i t The output of the input gate determines which pieces of information currently input will be added to the cell state; W i This is the weight matrix of the forget gate, b i It is a bias term.
[0112] Another point to note is that the cell state element is the core of LSTM, used to maintain and update the long-term state information of the model. The cell state element receives the cell state, forgetting ratio, and candidate information from the previous step, and calculates the cell state of the current step through an update formula. It not only considers the filtering of past information by the forgetting gate, but also incorporates the evaluation of the current input data by the input gate, ensuring that the cell state can reflect the continuity of the time series and long-term dependencies.
[0113] A specific formula for cellular state elements is expressed as follows: in, It represents the candidate cell state, indicating the currently input candidate update information; W C It is the weight matrix of the candidate states, b C It is a bias term; C t It represents the current cell state, which combines the previous state with the candidate information of the current input.
[0114] Another point to note is that the output gate in an LSTM network determines which information from the current cell state will be passed to the hidden state in the next step, thus affecting the model's output. The output gate receives the current cell state and calculates the hidden state using an output formula. The hidden state can be seen as a summary of the cell state, representing the model's understanding and summary of all processed information at the current time point, and is the direct basis for the model's predictions.
[0115] A specific output gate formula is expressed as: o t =σ(W o ·[h t-1 ,x t ]+b o );h t=o t ·tanh(C t ); where o t The output of the output gate determines the output of the current unit; W o It is the weight matrix of the candidate states, b o It is a bias term; h t It represents the current hidden state and is the output of the LSTM unit.
[0116] Another point to note is that the LSTM time series model also includes the following parameters: Hidden Units: the number of neurons in an LSTM unit; Learning Rate: the learning rate of the optimization algorithm, which determines the speed of parameter updates; Batch Size: the number of samples used to calculate gradients in each training iteration; Time Step: the length of the input sequence, affecting the number of time steps the model processes; Epochs: the number of training iterations.
[0117] Furthermore, the feature elements of the second type of feature include at least: the number of days from the current date to the departure date, the daily revenue value of the target flight up to the date the data analysis request is submitted, the holiday identifier and weekend identifier corresponding to the departure date; according to a specific scenario of the present invention embodiment, based on the tuple composed of the above features, for each time series sample, the input feature is the feature vector of the previous 10 days, and the output is the flight revenue of the 11th day. Specifically, the input data is in the form of a three-dimensional array, and samples are extracted in a sliding window manner, where the dimensions are the number of samples, the time step (10), and the number of features, respectively, and the output is the revenue value of the corresponding 11th day.
[0118] To achieve a second reasonable estimate of flight revenue within a specific future period, the steps of inputting a second type of feature into a second time-series model and outputting a second result include: determining the calculation step size T of the second time-series model and determining the number of calculation steps S based on the number of days between the current date and the departure date, where T is a positive integer; constructing an input data sequence based on the calculation step size T, the number of calculation steps S, the daily revenue value, holiday identifiers, and weekend identifiers, wherein the input data sequence contains S input data for the input gate to call; calling the forget gate, input gate, cell state element, and output gate according to the recursive parsing strategy; and performing S steps of recursive calculation based on the input data sequence to obtain the second result, wherein the second result records S predicted revenue values.
[0119] It's important to note that the calculation step size T, or the model's memory length, defines the number of days the LSTM model looks forward in each calculation. In other words, it determines how many days of historical revenue data the model uses to predict the next day's revenue. For example, if T is set to 10, the model will use data from the past 10 days to predict the revenue for day 11.
[0120] The number of prediction steps S is calculated based on the difference in days between the current date and the departure date to determine the number of prediction steps the LSTM model needs to perform. For example, if the current date is February 1st and the departure date is February 10th, then S = 9, meaning that the model needs to make 9 predictions from the current date until the departure date.
[0121] The recursive parsing strategy is the core computational logic of the LSTM model. By calling the forget gate, input gate, cell state element, and output gate, the model can update its hidden state and cell state at each time step, thereby gradually generating future profit predictions. S-step recursive computation refers to the model performing S consecutive calculations based on the number of calculation steps S. Each calculation is based on the previous hidden state and the data in the current input data sequence, and finally outputs S predicted profit values.
[0122] In a specific implementation scenario, assuming we want to predict the daily revenue of a flight within 20 days of its departure date, we can set the calculation step size T of the LSTM to 10, meaning that the model will consider the revenue data of the past 10 days each time it makes a prediction. We can set the calculation step S to 20, which means that we need to predict the revenue within 20 days including the departure date.
[0123] In practice, starting from the current date, a daily input data sequence is constructed, containing the revenue information for the past 10 days, as well as indicators of whether it is a holiday or weekend. For example, assuming the current date is February 1st, the input data sequence will contain the daily revenue values from January 22nd to February 1st, along with a marker indicating whether there were any holidays or weekends during those 10 days.
[0124] Next, the LSTM model, following a recursive parsing strategy, will continuously call its architectural components 20 times from February 1st to perform S-step recursive calculations, progressively predicting the daily revenue of the target flight from February 1st to February 20th. When predicting the revenue on February 2nd, the model will use the prediction results from February 1st and the input data sequence from January 23rd to February 2nd to update its internal state, thereby generating the revenue prediction for February 2nd. This process will continue until the revenue prediction for February 20th is completed.
[0125] Through this process, the LSTM model can not only predict flight revenue, but also dynamically adjust the prediction strategy based on real-time data and the impact of holidays and weekends, thereby improving the timeliness and accuracy of the prediction.
[0126] Step S105: Based on the preset result fusion strategy, the first result and the second result are fused, and the fused result is used to execute the business decision for the target flight.
[0127] It should be noted that the pre-defined result fusion strategy is a technique that integrates the results of multiple prediction models to achieve more accurate predictions. This strategy combines the prediction results of the first time series model (ARIMA) and the second time series model (LSTM), combining the strengths of both to improve prediction accuracy. The fusion strategy is based on a series of predefined rules and thresholds. For example, when the difference between the prediction results of two models is less than a certain threshold, the average or weighted average is used as the final prediction; while when the difference is large, especially when a specific event (such as a long holiday) occurs, one of the models will be given greater weight.
[0128] For example, suppose the ARIMA model predicts a steady trend in returns, while the LSTM captures the jump in returns as a long holiday approaches. When fusing the results, considering the sensitivity of the LSTM to nonlinear relationships, the fusion strategy might give the LSTM a higher weight to reflect the significant impact of the long holiday on returns.
[0129] In this embodiment of the invention, the advantages of two models are combined: ARIMA's ability to identify linear trends and seasonality, and LSTM's ability to capture long-term dependent features, to improve the overall accuracy of flight revenue prediction.
[0130] Furthermore, target flight business decisions based on fusion forecast results provide important guidance for airlines' future operations, including but not limited to adjustments to dynamic pricing strategies, optimization of flight frequencies and aircraft types, planning of promotional activities, and allocation of customer service resources. For example, if forecasts indicate a surge in demand for a particular flight during the upcoming holiday season, airlines can choose to raise fares for that flight, add extra flights, or offer additional services to attract high-end customers, thereby maximizing revenue.
[0131] Furthermore, the step of fusing the first result and the second result based on a preset result fusion strategy includes: determining the first predicted revenue value corresponding to the target time in the first result and the second predicted revenue value corresponding to the target time in the second result, and calculating the difference between the first predicted revenue value and the second predicted revenue value; determining whether the departure date of the target flight date falls within a long holiday period based on flight information, and obtaining a determination result; calculating the variance of all predicted revenue values in the second result; determining the fusion weight based on the difference, the determination result, and the variance value; and performing a weighted calculation on the first predicted revenue value and the second predicted revenue value based on the fusion weight to obtain the fusion result.
[0132] It should be noted that in the flight revenue prediction algorithm based on the dual time series model, the target time refers to the specific date on which the revenue needs to be predicted.
[0133] The first predicted return is the return value predicted by the ARIMA model at the target time. The ARIMA model is good at handling trends and periodic changes in time series, so the first predicted return value tends to reflect long-term trends and seasonal return predictions. The second predicted return value is the return value predicted by the LSTM model at the target time. The LSTM model can capture complex data patterns and long-term dependencies, so the second predicted return value can more accurately predict the impact of special dates or market fluctuations.
[0134] It should be noted that identifying long holiday markers refers to determining whether the departure date of the target flight falls within a long holiday period (such as Spring Festival, National Day, etc.) by analyzing flight information, as flight revenue during long holidays often exhibits a pattern drastically different from other periods. Calculating the variance of all predicted revenue values in the second result aims to assess the stability and dispersion of the LSTM model's prediction results; the magnitude of the variance reflects the volatility of the LSTM model when predicting the entire time series.
[0135] In one optional embodiment, the fusion strategy may refer to the following:
[0136] 1. If the absolute value of the difference between the first predicted return value O1 of the ARIMA time series model and the second predicted return value O2 of the LSTM time series model is ≤ d, then the final result f = (O1 + O2) / 2.
[0137] 2. If the absolute value of the difference between the first predicted return value O1 of the ARIMA time series model and the second predicted return value O2 of the LSTM time series model is greater than d, and the departure date of the target flight to be predicted is during a long holiday (Spring Festival, Labor Day, National Day), then the final result f = 0.2*O1 + 0.8*O2.
[0138] 3. If the absolute value of the difference between the first predicted return value O1 of the ARIMA time series model and the second predicted return value O2 of the LSTM time series model is greater than d, and the departure date of the target flight to be predicted is not during a long holiday, if the prediction result set of the LSTM time series model (R in the previous section) is greater than d, then... t+1 ...R t+n If the variance of ) is less than or equal to v, then the final result f = 0.6*O1 + 0.4*O2;
[0139] 4. If the absolute value of the difference between the first predicted return value O1 of the ARIMA time series model and the second predicted return value O2 of the LSTM time series model is greater than d, and the departure date of the target flight to be predicted is not during a long holiday, if the prediction result set of the LSTM time series model (R in the previous section) is greater than d, then... t+1...R t+n If the variance of ) is greater than v, then the final result is f = 0.7*O1 + 0.3*O2.
[0140] The data structure of the fusion result can be output as follows: [target flight number to depart in n days, predicted revenue of the target flight to depart in n days].
[0141] Through steps S101 to S105, a data parsing request is first received, and flight information and current ticket data of the target flight are obtained from the aviation database. The current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted. Feature engineering is then performed based on the flight information and current ticket data to obtain a first type of feature and a second type of feature. Feature engineering includes feature encoding, feature derivation, and feature construction. The first type of feature is then input into a first time-series model, outputting a first result. The first time-series model is an autoregressive integral moving average model with a pre-set sliding window strategy, which obtains data prediction results for future time periods by identifying the trend and seasonal characteristics of the input data. The second type of feature is then input into a second time-series model, outputting a second result. The second time-series model is a long short-term memory network model with a pre-set recursive parsing strategy, which obtains data prediction results for the target time period after the future time period by capturing the long-term dependency characteristics of the input data. Finally, the first and second results are fused based on a pre-set result fusion strategy, and the fused result is used to execute business decisions for the target flight.
[0142] In this embodiment of the invention, a dual-time-series model fusion approach is adopted. Through feature engineering and targeted model application, the accuracy of flight revenue prediction is improved, thereby achieving the technical effect of data-driven efficient decision-making. Specifically, this embodiment first performs detailed feature engineering on the collected flight information and current ticket data, including feature encoding, derivation, and construction, to ensure that all mined features accurately reflect the influencing factors of flight revenue. Then, an autoregressive integral moving average (ARIMA) model with a pre-set sliding window strategy is used to process the first type of features, capturing the trend and seasonal changes of the data and generating preliminary revenue predictions. At the same time, a long short-term memory (LSTM) network model with a pre-set recursive parsing strategy is used to target the second type of features, accurately grasping the long-term dependence of the data and obtaining more refined revenue predictions. Finally, the prediction results of the two models are intelligently weighted and fused through a preset result fusion strategy to obtain the final fusion result. This result is more comprehensive and stable, and can effectively guide key business decisions such as dynamic pricing and resource allocation for flights. This solves the technical problem in related technologies where machine learning algorithms cannot guarantee the accuracy of data parsing when faced with large-scale, complex, and changing data, resulting in low decision accuracy.
[0143] The present invention will now be described in conjunction with another specific embodiment.
[0144] Figure 2 This is a flowchart of an optional dual-time-series model revenue prediction algorithm according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes:
[0145] S1, Data Acquisition: Collect historical ticket data for the target flight;
[0146] S2, Feature Engineering: Performing data preprocessing, feature construction, training set generation, and other operations on the data in S1;
[0147] S3, Model Selection: This case selects the ARIMA model and the LSTM model as a dual time-series model for predicting future flight revenue;
[0148] S4, Model Training: Perform parameter setting, model training, and parameter adjustment to obtain the final optimal prediction model;
[0149] S5, Model Prediction: Use the model saved in S4 to predict the revenue of future target flights;
[0150] S6, Result Fusion: The results predicted by the two time series models are fused according to the rules to obtain the final flight revenue prediction result.
[0151] The invention will now be described in conjunction with another alternative embodiment.
[0152] Example 2
[0153] The data parsing device based on a dual-time-series model provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in Embodiment 1 above.
[0154] Figure 3 This is a schematic diagram of an optional data parsing device based on a dual-time-series model according to an embodiment of the present invention, such as... Figure 3 As shown, the device may include: an acquisition unit 31, a first processing unit 32, a first input unit 33, a second input unit 34, and a second processing unit 35.
[0155] The acquisition unit 31 is used to receive data parsing requests and obtain flight information and current ticket data of the target flight from the aviation database. The current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted.
[0156] The first processing unit 32 is used to perform feature engineering processing based on flight information and current ticket data to obtain first-class features and second-class features. The feature engineering processing includes feature encoding, feature derivation and feature construction.
[0157] The first input unit 33 is used to input the first type of features into the first time series model and output the first result. The first time series model is an autoregressive integral moving average model with a preset sliding window strategy, which obtains the data prediction results for future periods by identifying the trend characteristics and seasonal characteristics of the input data.
[0158] The second input unit 34 is used to input the second type of features into the second time series model and output the second result. The second time series model is a long short-term memory network model with a pre-set recursive parsing strategy. It obtains the data prediction result of the target time after the future time period by capturing the long-term dependency features of the input data.
[0159] The second processing unit 35 is used to perform fusion processing on the first result and the second result based on a preset result fusion strategy, and to use the fusion result to execute the business decision of the target flight.
[0160] The aforementioned data parsing device based on a dual-time-series model can first receive a data parsing request through the acquisition unit 31, and obtain flight information and current ticket data of the target flight from an aviation database. The current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted. Then, the first processing unit 32 performs feature engineering processing based on the flight information and current ticket data to obtain a first type of feature and a second type of feature. The feature engineering processing includes feature encoding, feature derivation, and feature construction. Finally, the first type of feature is input into the first time-series model through the first input unit 33, and a first result is output. The first time series model is an autoregressive integral moving average model with a pre-set sliding window strategy. It obtains data prediction results for future time periods by identifying the trend and seasonal characteristics of the input data. Then, the second type of features are input into the second time series model through the second input unit 34, and the second result is output. The second time series model is a long short-term memory network model with a pre-set recursive parsing strategy. It obtains data prediction results for the target time after the future time period by capturing the long-term dependency characteristics of the input data. Finally, the second processing unit 35 fuses the first and second results based on a preset result fusion strategy and uses the fused result to execute the business decision of the target flight.
[0161] In this embodiment of the invention, a dual-time-series model fusion approach is adopted. Through feature engineering and targeted model application, the accuracy of flight revenue prediction is improved, thereby achieving the technical effect of data-driven efficient decision-making. Specifically, this embodiment first performs detailed feature engineering on the collected flight information and current ticket data, including feature encoding, derivation, and construction, to ensure that all mined features accurately reflect the influencing factors of flight revenue. Then, an autoregressive integral moving average (ARIMA) model with a pre-set sliding window strategy is used to process the first type of features, capturing the trend and seasonal changes of the data and generating preliminary revenue predictions. At the same time, a long short-term memory (LSTM) network model with a pre-set recursive parsing strategy is used to target the second type of features, accurately grasping the long-term dependence of the data and obtaining more refined revenue predictions. Finally, the prediction results of the two models are intelligently weighted and fused through a preset result fusion strategy to obtain the final fusion result. This result is more comprehensive and stable, and can effectively guide key business decisions such as dynamic pricing and resource allocation for flights. This solves the technical problem in related technologies where machine learning algorithms cannot guarantee the accuracy of data parsing when faced with large-scale, complex, and changing data, resulting in low decision accuracy.
[0162] Further, the first processing unit includes: a first acquisition module, used to acquire model data requirements, wherein the model data requirements include at least a first requirement and a second requirement, the first requirement describing the content, structure, and format requirements of the first time series model for the input data, and the second requirement describing the content, structure, and format requirements of the second time series model for the input data; a classification module, used to classify and analyze flight information and current ticket data to obtain M types of feature information of the target flight, wherein M is a positive integer; a derivation module, used to perform feature derivation by comparing the requirement feature categories indicated by the model data requirements with the M types of feature information to obtain N types of derived feature information, wherein N is a non-negative integer; an encoding module, used to identify numerical and non-numerical features in the M types of feature information and the N types of derived feature information, and to perform numerical encoding on the non-numerical features; an integration module, used to integrate numerical features and numerical encoding to obtain feature codes corresponding to the target flight, wherein the feature codes contain M+N encoding elements; and a filtering module, used to filter elements of the feature codes based on the first requirement to obtain a first type of feature, and to filter elements of the feature codes based on the second requirement to obtain a second type of feature.
[0163] Furthermore, the data parsing device based on the dual time-series model also includes: a generation unit for generating a first time-series model, the generation unit comprising: a second acquisition module for acquiring an autoregressive integral moving average model; an initialization module for initializing model parameters based on a sliding window strategy, wherein the model parameters include: autoregressive order, moving average order, and seasonal parameters; a third acquisition module for acquiring historical data of the target flight from an aviation database, wherein the historical data includes: historical flight information and historical ticket data; and a training module for training the initialized autoregressive integral moving average model using historical data, and adjusting the model parameters during the training process until the model evaluation index meets the expected performance requirements, thereby obtaining the first time-series model, wherein the model evaluation index includes at least: mean squared error.
[0164] Furthermore, the feature elements of the first type of feature include at least: the departure date, flight number, departure airport code, arrival airport code, and the daily revenue value of the target flight up to the date the data parsing requirement is submitted.
[0165] Further, the first input unit includes: a matching module, used to match a model calculation pattern based on the flight number, departure airport code, and arrival airport code, wherein the model calculation pattern is used to determine at least the observation period of the target flight, and the observation period is used to determine the number of features X used in each prediction, where X is a positive integer; a first determining module, used to determine a prediction range based on the current date and departure date, wherein the prediction range is used to indicate the number of revenue days S in the future period to be predicted, where S is a positive integer; and a first calculation module, used to perform S calculations using the daily revenue values within the observation period according to the model calculation pattern and the prediction range, to obtain a first result, wherein the first result contains S predicted revenue values.
[0166] Furthermore, the second temporal model includes the following architectural components: a forget gate, used to receive the previous hidden state and calculate the forget ratio based on the previous hidden state and the forget formula, wherein the forget ratio is used to characterize the degree of retention of the previous state in the current state calculation; an input gate, used to receive input data and calculate candidate information based on the input data and the input formula, wherein the candidate information is used to participate in the cell state update process; a cell state component, used to receive the previous cell state, the forget ratio, and the candidate information, and calculate the current cell state based on the previous cell state, the forget ratio, the candidate information, and the update formula; and an output gate, used to receive the current cell state and calculate the current hidden state based on the current cell state and the output formula.
[0167] Furthermore, the feature elements of the second type of feature include at least: the number of days from the current date to the departure date, the daily revenue value of the target flight up to the date the data parsing request is submitted, the holiday identifier and weekend identifier corresponding to the departure date.
[0168] Further, the second input unit includes: a second determining module, used to determine the calculation step size T of the second time series model, and determine the number of calculation steps S based on the number of days between the current date and the takeoff date, where T is a positive integer; a construction module, used to construct an input data sequence based on the calculation step size T, the number of calculation steps S, the daily profit value, the holiday identifier, and the weekend identifier, wherein the input data sequence contains S input data for the input gate to call; a calling module, used to call the forget gate, the input gate, the cell state element, and the output gate according to the recursive parsing strategy; and a second calculation module, used to perform S steps of recursive calculation based on the input data sequence to obtain a second result, wherein the second result records S predicted profit values.
[0169] Further, the second processing unit includes: a third calculation module, used to determine the first predicted revenue value corresponding to the target time in the first result and the second predicted revenue value corresponding to the target time in the second result, and calculate the difference between the first predicted revenue value and the second predicted revenue value; a third determination module, used to determine whether the departure date of the target flight date falls within a long holiday period based on flight information, and obtain a determination result; a fourth calculation module, used to calculate the variance of all predicted revenue values in the second result; a fourth determination module, used to determine the fusion weight based on the difference, the determination result, and the variance value; and a fifth calculation module, used to perform weighted calculation on the first predicted revenue value and the second predicted revenue value based on the fusion weight, and obtain a fusion result.
[0170] The aforementioned data parsing device based on a dual-time-series model may also include a processor and a memory. The aforementioned acquisition unit 31, first processing unit 32, first input unit 33, second input unit 34, second processing unit 35, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0171] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, feature engineering is performed based on flight information and current ticket data to obtain a first type of feature and a second type of feature. The first type of feature is input into a first time-series model, outputting a first result. The second type of feature is input into a second time-series model, outputting a second result. The first and second results are fused based on a preset result fusion strategy, and the fused result is used to execute business decisions for the target flight.
[0172] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0173] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: receiving a data parsing request and obtaining flight information and current ticket data of the target flight from an aviation database, wherein the current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted; performing feature engineering processing based on the flight information and current ticket data to obtain a first type of feature and a second type of feature, wherein the feature engineering processing includes: feature encoding, feature derivation, and feature construction; inputting the first type of feature into a first time series model and outputting a first result, wherein the first time series model is an autoregressive integral moving average model with a preset sliding window strategy, which obtains data prediction results for future time periods by identifying the trend characteristics and seasonal characteristics of the input data; inputting the second type of feature into a second time series model and outputting a second result, wherein the second time series model is a long short-term memory network model with a preset recursive parsing strategy, which obtains data prediction results for the target time after the future time period by capturing the long-term dependency characteristics of the input data; fusing the first result and the second result based on a preset result fusion strategy, and using the fused result to execute business decisions for the target flight.
[0174] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the data parsing method based on any one of the above embodiments in the first embodiment.
[0175] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data parsing method based on the dual-time-series model of any one of the above embodiments.
[0176] Figure 4 This is a structural block diagram of an electronic device for executing a data parsing method based on a dual-time-series model according to an embodiment of the present invention, such as... Figure 4 As shown, the electronic device may include: one or more ( Figure 4 Only one of the following is shown: processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0177] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data parsing method and apparatus based on the dual-timing model in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned data parsing method based on the dual-timing model. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0178] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0179] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0180] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0181] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0182] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0183] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0184] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0185] If the integrated unit is implemented as 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0186] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A data parsing method based on a dual-time-series model, characterized in that, include: Receive data parsing requests and obtain flight information and current ticket data of the target flight from the aviation database. The current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is submitted. Based on the flight information and the current ticket data, feature engineering processing is performed to obtain a first type of feature and a second type of feature. The feature engineering processing includes feature encoding, feature derivation, and feature construction. The first type of feature is input into the first time series model, and the first result is output. The first time series model is an autoregressive integral moving average model with a preset sliding window strategy. It obtains the data prediction results for future periods by identifying the trend and seasonal characteristics of the input data. The second type of feature is input into the second time series model, and the second result is output. The second time series model is a long short-term memory network model with a pre-set recursive parsing strategy. It obtains the data prediction result of the target time after the future time period by capturing the long-term dependency features of the input data. The first result and the second result are fused based on a preset result fusion strategy, and the fused result is used to execute the business decision of the target flight.
2. The data parsing method according to claim 1, characterized in that, The steps of performing feature engineering processing based on the flight information and the current ticket data to obtain the first type of features and the second type of features include: Obtain model data requirements, wherein the model data requirements include at least a first requirement and a second requirement, wherein the first requirement is used to describe the content, structure and format requirements of the first time series model for the input data, and the second requirement is used to describe the content, structure and format requirements of the second time series model for the input data; The flight information and the current ticket data are classified and analyzed to obtain M types of feature information of the target flight, where M is a positive integer; By comparing the demand feature categories indicated by the model data demand with the M types of feature information, feature derivation is performed to obtain N types of derived feature information, where N is a non-negative integer; Identify the numerical and non-numerical features in the M-type feature information and the N-type derived feature information, and encode the non-numerical features numerically; By integrating the numerical features and the numerical coding, a feature code corresponding to the target flight is obtained, wherein the feature code contains M+N coding elements; Based on the first requirement, the feature code is filtered to obtain the first type of feature; based on the second requirement, the feature code is filtered to obtain the second type of feature.
3. The data parsing method according to claim 1, characterized in that, The first time series model was generated through the following steps: Obtain the autoregressive integral moving average model; The model parameters are initialized based on the sliding window strategy, wherein the model parameters include: autoregression order, moving average order, and seasonality parameter; Historical data of the target flight are obtained from the aviation database, wherein the historical data includes: historical flight information and historical ticket data; The autoregressive integral moving average model is trained using the historical data, and the model parameters are adjusted during the training process until the model evaluation index meets the expected performance requirements, thus obtaining the first time series model. The model evaluation index includes at least the mean squared error.
4. The data parsing method according to claim 1, characterized in that, The feature elements of the first type of feature include at least: the departure date, flight number, departure airport code, arrival airport code, and daily revenue value of the target flight up to the day the data parsing requirement is proposed; the step of inputting the first type of feature into the first time series model and outputting the first result includes: The model calculation mode is based on the flight number, the departure airport code and the arrival airport code. The model calculation mode is used to determine at least the observation period of the target flight. The observation period is used to determine the number of features X used in each prediction, where X is a positive integer. The forecast range is determined based on the current date and the departure date, wherein the forecast range is used to indicate the number of revenue days S in the future period to be forecasted, where S is a positive integer; Based on the model calculation mode and the prediction range, the daily revenue value within the observation period is used to perform S calculations to obtain the first result, wherein the first result contains S predicted revenue values.
5. The data parsing method according to claim 1, characterized in that, The second timing model includes the following architectural components: The forget gate is used to receive the previous hidden state and calculate the forget ratio based on the previous hidden state and the forget formula, wherein the forget ratio is used to characterize the degree to which the previous state is retained in the calculation of the current state. An input gate is used to receive input data and calculate candidate information based on the input data and the input formula, wherein the candidate information is used to participate in the cell state update process; A cell state element is used to receive the previous cell state, the forgetting ratio, and the candidate information, and to calculate the current cell state based on the previous cell state, the forgetting ratio, the candidate information, and the update formula. An output gate is used to receive the current step cell state and calculate the current step hidden state based on the current step cell state and the output formula.
6. The data parsing method according to claim 5, characterized in that, The feature elements of the second type of feature include at least: the number of days from the current date to the departure date, the daily revenue value of the target flight up to the date the data analysis requirement is submitted, the holiday identifier and weekend identifier corresponding to the departure date; the steps of inputting the second type of feature into the second time series model and outputting the second result include: Determine the calculation step size T of the second time series model, and determine the number of calculation steps S based on the number of days between the current date and the departure date, where T is a positive integer; An input data sequence is constructed based on the calculation step size T, the number of calculation steps S, the daily profit value, the holiday identifier, and the weekend identifier, wherein the input data sequence contains S input data that can be called by the input gate; The forget gate, the input gate, the cell state element, and the output gate are invoked according to the recursive parsing strategy; Based on the input data sequence, S-step recursive calculations are performed to obtain the second result, wherein S predicted profit values are recorded in the second result.
7. The data parsing method according to claim 1, characterized in that, The steps of fusing the first result and the second result based on a preset result fusion strategy include: Determine the first predicted return value corresponding to the target time in the first result and the second predicted return value corresponding to the target time in the second result, and calculate the difference between the first predicted return value and the second predicted return value. Based on the flight information, determine whether the departure date of the target flight falls within a long holiday period, and obtain a determination result; Calculate the variance of all predicted return values in the second result; The fusion weights are determined based on the difference, the determination result, and the variance value. The first predicted return value and the second predicted return value are weighted and calculated based on the fusion weights to obtain the fusion result.
8. A data parsing device based on a dual-time-series model, characterized in that, include: The acquisition unit is used to receive data parsing requests and obtain flight information and current ticket data of the target flight from the aviation database. The current ticket data refers to the daily booking records of the target flight up to the date the data parsing request is made. The first processing unit is configured to perform feature engineering processing based on the flight information and the current ticket data to obtain a first type of feature and a second type of feature, wherein the feature engineering processing includes: feature encoding, feature derivation and feature construction; The first input unit is used to input the first type of features into the first time series model and output the first result. The first time series model is an autoregressive integral moving average model with a preset sliding window strategy, which obtains the data prediction results for future periods by identifying the trend characteristics and seasonal characteristics of the input data. The second input unit is used to input the second type of features into the second time series model and output the second result. The second time series model is a long short-term memory network model with a pre-set recursive parsing strategy. It obtains the data prediction result of the target time after the future time period by capturing the long-term dependency features of the input data. The second processing unit is used to perform fusion processing on the first result and the second result based on a preset result fusion strategy, and to use the fusion result to execute the business decision of the target flight.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the data parsing method based on a dual-time-series model as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the data parsing method based on a dual-time-series model as described in any one of claims 1 to 7.
Citation Information
Cited By
Flight simulator predictive maintenance method based on machine learning
CN121479711A