A method and apparatus for statistical analysis of flight data
By using a target system independent of the mainframe system, flight data and passenger booking data are received, flight inventory data is corrected based on flight plan data and divided according to flight segments, the problem that the mainframe system cannot meet the needs of flight data statistics is solved, and efficient flight data statistics and migration support are achieved.
Patent Information
- Application Number
- CN202210718823.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-06-23
AI Technical Summary
Existing mainframe systems, due to their centralized architecture, cannot effectively meet the statistical needs of flight data because they cannot meet the demands of technological development.
A method and apparatus for flight data statistics are provided. The target system is independent of the mainframe system. It receives flight data and passenger booking data, corrects flight inventory data based on flight plan data, divides and counts flight segment details and passenger data according to flight segments, and realizes independent flight data statistics.
It enables the fulfillment of flight data statistics needs without relying on mainframe systems, supports the migration of mainframe systems to open platforms, and improves the efficiency and accuracy of data statistics.
Smart Images

Figure CN115098558B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for flight data statistics. Background Technology
[0002] Airlines typically store flight data on mainframe systems, and flight statistics are generated by these mainframes. These statistics are then provided to airlines, airports, and agents within the controllable flight range for subsequent analysis. For example, when flight statistics are flight sales status statistics, these statistics can be used to analyze flight sales trends.
[0003] Mainframe systems are widely used in various fields due to their high availability, reliability, and maintainability. However, due to rapid technological advancements, centralized architecture mainframe systems are gradually failing to meet the demands of flight data statistics. Summary of the Invention
[0004] To address the aforementioned technical issues, this application provides a flight data statistics method that can reduce reliance on large mainframe systems.
[0005] To achieve the above objectives, the technical solutions provided in this application are as follows:
[0006] This application provides a flight data statistics method, which is applied to a target system and includes:
[0007] Receives flight data and passenger booking data from multiple flights transmitted by a mainframe system; the flight data includes flight schedule data and flight inventory data;
[0008] The flight inventory data of the target flight is corrected based on the flight schedule data of the target flight, and the corrected flight inventory data of the target flight is determined as the basic flight data of the target flight; the target flight refers to each of multiple flights.
[0009] The basic flight data of the target flight is divided into segments to obtain detailed segment data for each segment of the target flight.
[0010] The passenger booking data of the target flight is divided into segments, the segment passenger data of each segment of the target flight is obtained, and the segment details data and the segment passenger data of each segment of the target flight are adjusted to correspond to each segment.
[0011] The system collects various status data from the passenger data of each segment of the target flight.
[0012] This application embodiment also provides a flight data statistics device, which is applied to a target system, and the device includes:
[0013] The data access module is used to receive flight data and passenger booking data from multiple flights transmitted by the mainframe system; the flight data includes flight schedule data and flight inventory data.
[0014] The basic data acquisition module is used to correct the flight inventory data of the target flight based on the flight plan data of the target flight, and determine the corrected flight inventory data of the target flight as the basic flight data of the target flight; the target flight is each of multiple flights;
[0015] The detailed data acquisition module is used to divide the basic flight data of the target flight according to the flight segments and acquire the detailed data of each flight segment of the target flight.
[0016] The first integrated data module is used to divide the passenger booking data of the target flight according to the flight segment, obtain the segment passenger data of each flight segment of the target flight, and adjust the segment details data and the segment passenger data of each flight segment of the target flight to correspond to each flight segment.
[0017] The second integrated data module is used to statistically analyze various status data in the passenger data of each segment of the target flight.
[0018] This application also provides an electronic device, including:
[0019] One or more processors;
[0020] Storage device, on which one or more programs are stored,
[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the flight data statistics method as described above.
[0022] This application also provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the flight data statistics method as described in any of the preceding claims.
[0023] As can be seen from the above technical solution, this application has the following beneficial effects:
[0024] This application provides a method and apparatus for flight data statistics, which is applied to a target system. The target system is independent of the mainframe system and can receive flight data and passenger booking data for multiple flights transmitted from the mainframe system. The flight data includes flight schedule data and flight inventory data. Each of the multiple flights is identified as the target flight. Based on the flight schedule data of the target flight and the corresponding flight inventory data, the basic flight data of the target flight is obtained. Furthermore, the basic flight data and passenger booking data of the target flight are divided according to flight segments, and the segment details data and segment passenger data for each segment of the target flight are obtained respectively. The segment details data and segment passenger data of each segment of the target flight are adjusted to correspond to each segment. Then, various status data in the segment passenger data of each segment of the target flight can be statistically analyzed. Therefore, using a target system independent of the mainframe system to perform flight data statistics can meet the requirements of migrating from a mainframe system to an open platform. Attached Figure Description
[0025] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0026] Figure 1 A schematic diagram illustrating an exemplary application scenario provided in this application embodiment;
[0027] Figure 2 A flowchart illustrating a flight data statistics method provided in this application embodiment;
[0028] Figure 3 A schematic diagram illustrating another exemplary application scenario provided by an embodiment of this application;
[0029] Figure 4 This is a schematic diagram of the structure of a flight data statistics device provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure. To facilitate understanding and explanation of the technical solutions provided by the embodiments of this application, the background technology of the embodiments of this application will first be described below.
[0032]
Method Implementation Examples
[0033] Airlines typically store flight data on mainframe systems, and flight statistics are generated by these mainframes. These statistics are then provided to airlines, airports, and agents within the controllable flight range for subsequent analysis. For example, when flight statistics are flight sales status statistics, these statistics can be used to analyze flight sales trends.
[0034] Mainframe systems are widely used in various fields due to their high availability, reliability, and maintainability. However, due to rapid technological advancements, centralized architecture mainframe systems are gradually failing to meet the demands of flight data statistics.
[0035] Based on this, this application provides a flight data statistics method applied to a target system. The target system is independent of the mainframe system and can receive flight data and passenger booking data from multiple flights transmitted from the mainframe system. The flight data includes flight schedule data and flight inventory data. Each of the multiple flights is identified as the target flight. Based on the flight schedule data of the target flight and the corresponding flight inventory data, the basic flight data of the target flight is obtained. Furthermore, the basic flight data and passenger booking data of the target flight are divided according to flight segments, and the segment details data and segment passenger data of each segment of the target flight are obtained respectively. The segment details data and segment passenger data of each segment of the target flight are adjusted to correspond to each segment. Then, various status data in the segment passenger data of each segment of the target flight can be statistically analyzed. Therefore, using a target system independent of the mainframe system to perform flight data statistics can meet the requirements of migrating from a mainframe system to an open platform.
[0036] To facilitate understanding of the flight data statistics method provided in the embodiments of this application, the following is combined with... Figure 1 The example scenario is shown below. See also... Figure 1 As shown in the figure, this figure is a schematic diagram of an exemplary application scenario provided in the embodiments of this application.
[0037] This flight data statistics method is applied to a target system. The target system is an open system independent of the mainframe system. In this embodiment, the flight data statistics are performed by the target system instead of the mainframe system. The target system includes at least a data access module, a basic data acquisition module, a detailed data acquisition module, and an integrated data module.
[0038] In this embodiment, the mainframe system transmits flight data and passenger booking data for multiple flights to the target system in real time. The flight data includes flight schedule data and flight inventory data. The target system's data access module receives the flight data and passenger booking data transmitted from the mainframe system.
[0039] For ease of explanation, each of the multiple flights will be designated as the target flight. The following explanation will use the target flight as an example. After the target system receives the flight data and passenger booking data for the target flight, the basic data acquisition module corrects the target flight's flight inventory data based on the target flight's flight schedule data, and determines the corrected target flight's flight inventory data as the target flight's basic flight data.
[0040] Furthermore, the detailed data acquisition module divides the basic flight data of the target flight according to flight segments, obtaining detailed data for each flight segment. The data integration module includes a first data integration module and a second data integration module. The first data integration module divides the passenger booking data of the target flight according to flight segments, obtaining passenger data for each flight segment. It then adjusts the detailed data and passenger data for each flight segment to correspond to each segment.
[0041] Finally, after obtaining the passenger data for each segment of the target flight, the second data integration module compiles various status data from the passenger data for each segment of the target flight. The types and specific content of the status data are determined based on the actual situation and are not limited here.
[0042] Those skilled in the art will understand that Figure 1 The schematic diagram shown is merely one example in which embodiments of this application can be implemented. The scope of application of the embodiments of this application is not limited by any aspect of this framework.
[0043] To facilitate understanding of this application, the following description, in conjunction with the accompanying drawings, illustrates a flight data statistics method provided by an embodiment of this application.
[0044] See Figure 2 As shown, this figure is a flowchart of a flight data statistics method provided in an embodiment of this application. As an optional example, this method can be applied to... Figure 1 The target system is shown. (As shown in the image) Figure 2 As shown, the method may include S201-S205:
[0045] S201: Receives flight data and passenger booking data for multiple flights transmitted from the mainframe system; the flight data includes flight schedule data and flight inventory data.
[0046] Since the core transaction systems for different flights still reside on the mainframe system, real-time synchronization of data from the mainframe system is necessary to ensure that the data received by the target system remains consistent with the mainframe data. Therefore, the target system receives flight data and passenger booking data from multiple flights transmitted from the mainframe system in real time.
[0047] As an optional example, the data access module in the target system receives flight data and passenger booking data from multiple flights transmitted from the mainframe system. These multiple flights may be different flights of the same airline, or different flights of different airlines. In specific implementation, the data access module of the target system can use the TUMS protocol and transmit the flight schedule data, flight inventory data, and passenger booking data from the mainframe system to the message middleware in real time via transparent transmission, labeling these three types of data in the message header.
[0048] Flight data includes data related to specific flights, such as flight schedule data and flight inventory data. Flight schedule data contains basic information about the flight at the time of creation, such as the airline, flight number, and flight day. Flight inventory data also includes basic information such as the airline, flight number, and flight day. Furthermore, flight inventory data is updated when bookings or cancellations occur, thus also reflecting flight booking status.
[0049] In practical applications, after a flight schedule is created and activated, the mainframe system generates flight schedule data and flight inventory data for that flight. For example, the flight schedule data might be: Flight XX of Airlines XX is scheduled to fly on XX / XX / XX / XX. If Flight XX of Airlines XX has a total of 250 seats scheduled to fly on XX / XX / XX / XX, the flight inventory will be 250 seats when the flight schedule data is first generated. As the number of passenger bookings increases, the flight inventory will decrease.
[0050] Passenger booking data contains detailed information about a passenger's booking for a specific flight. It clearly reflects the various statuses of the passenger and their flight booking, including at least the passenger booking record, airline, flight number, flight date, and segment creation step number. The passenger booking record (PNR) reflects the passenger's itinerary, the number of seats occupied, and other passenger information. Passenger booking records are represented by a booking record number, typically a six-digit combination of numbers and letters. The segment creation step number is the sequence number of the passenger's flight booking, indicating the order in which the passenger booked the flight. Furthermore, based on the mapping between the segment creation step number and the passenger's flight booking time, the specific flight booking time can also be obtained. Passenger booking data can include the passenger's flight booking time.
[0051] It is understandable that flight data and passenger booking data differ for different flights.
[0052] Flight data and passenger booking data serve as the foundation for subsequent statistical status data, making their stability and integrity during transmission crucial. The data access module not only transmits flight data and passenger booking data from multiple flights but also compensates for data loss during transmission. For example, data compensation can be achieved using the full dataset from a data warehouse. This improves the stability and integrity of the data transmission process.
[0053] S202: Based on the flight schedule data of the target flight, the flight inventory data of the target flight is corrected, and the corrected flight inventory data of the target flight is determined as the basic flight data of the target flight; the target flight is each of the multiple flights.
[0054] After the target system's data access module receives flight data and passenger booking data from multiple flights, it sends these data to the data processing module. In this embodiment, the data processing module includes at least a basic data acquisition module, a detailed data acquisition module, and an integrated data module. Flight data is distributed to a flight data service for processing; specifically, the flight data is sent to the basic data acquisition module. Passenger booking data is distributed to a passenger service for processing; specifically, the passenger booking data is sent to the integrated data module.
[0055] As an alternative example, the data processing module uses Java's Collections Framework (JCF) and relies on a clustered deployment approach. This not only provides sufficient processing performance for the data processing module but also improves its availability.
[0056] For ease of explanation, each of the multiple flights will be designated as the target flight. The following explanation will use the target flight as an example; in practical applications, various relevant data from multiple flights can be obtained.
[0057] Flight schedule data is customized flight plan data for a specific flight, while flight inventory data is the actual flight data after the flight schedule takes effect. In practice, due to various reasons, the flight days in the scheduled flight data and the flight days in the flight inventory data may differ for the same flight. Therefore, it is necessary to correct the flight inventory data for the target flight. Specifically, after receiving the flight data of the target flight, the basic data acquisition module corrects the target flight's flight inventory data based on the target flight's flight schedule data, and uses the corrected target flight's flight inventory data as the target flight's basic flight data. It is understood that the flight days in the target flight's flight schedule data and the flight days in the corrected flight inventory data are the same.
[0058] In one possible implementation, this application provides a specific implementation method for correcting the flight inventory data of a target flight based on the flight plan data of the target flight, and determining the corrected flight inventory data of the target flight as the basic flight data of the target flight. Please refer to A1-A6 below for details.
[0059] As an optional example, after obtaining the basic flight data of the target flight based on the flight schedule data and flight inventory data, the airline, flight number, and flight day data from the basic flight data are retrieved and stored in the basic data table of the database, using the airline, flight number, and flight day as primary keys. This database is independent of the mainframe system. For example, the database could be a PostgreSQL enterprise database, which is highly stable and powerful, capable of handling high concurrency.
[0060] In addition, since the target system receives flight data and passenger booking data from multiple flights transmitted by the mainframe system in real time, it will also receive new flight data and passenger booking data transmitted by the mainframe as time progresses. For details on whether to insert new flight data into the basic data table, please refer to B1-B4 below.
[0061] S203: Divide the basic flight data of the target flight into segments and obtain detailed segment data for each segment of the target flight.
[0062] A flight may consist of multiple segments. After obtaining the basic flight data of the target flight, the basic flight data of the target flight is divided according to the segments, and the segment details of each segment of the target flight are obtained.
[0063] For example, when a target flight's route involves three or more airports, such as airport A, airport B, and airport C, the route is ABC. This route has three segments: segment AB, segment AC, and segment BC. Since all three segments can be booked by passengers, to ensure that passenger booking data corresponds to the basic flight data, the basic flight data is broken down into segment details.
[0064] The airline, flight number, and flight day are the same in the target flight's segment details and basic flight data. However, the segment details also include the departure and arrival airports, unlike the basic flight data. In other words, the segment details must include at least the airline, flight number, flight day, departure airport, and arrival airport. For example, the airline, flight number, and flight day are the same in segments AB, AC, and BC. However, the departure and arrival airports differ between segments.
[0065] As an alternative example, this step can be performed by the detail data acquisition module in the target system.
[0066] In some embodiments, the segment details data for a target flight also includes the first flight date data. Since some flights have long time spans, for example, if the target flight's route is ABC, departing from airport A on February 1st and arriving at airport C on February 2nd, the first flight date data for this flight is February 1st. Therefore, the first flight date data for segment BC is also February 1st. Based on this, to facilitate the correspondence between flight data and passenger data, the segment details data stores the first flight date data for each segment.
[0067] As an optional example, after obtaining the segment details data for each segment of the target flight, the airline, flight number, flight day, departure airport, and arrival airport from the segment details data are used as primary keys, while data such as the inaugural flight date are stored as non-primary key content in a detail data table in the database. Thus, after each flight is executed according to S202-S203, the detail data table stores flight data for various airlines, flight numbers, flight days, departure airports, and arrival airports. For example, the primary key of one data row in the detail data table might be Airline a, Flight number aa, February 1st, Airport A, and Airport C. The primary key of another data row in the detail data table might be Airline b, Flight number bb, February 1st, Airport A, and Airport C.
[0068] In addition, since the target system receives flight data and passenger booking data from multiple flights transmitted by the mainframe system in real time, it will also receive new flight data and passenger booking data transmitted by the mainframe as time progresses. New flight segment details are obtained based on the new flight data. For details on whether to insert the new flight segment details into the details data table, please refer to C1-C3 below.
[0069] S204: Divide the passenger booking data of the target flight into segments, obtain the segment passenger data of each segment of the target flight, and adjust the segment details data and segment passenger data of each segment of the target flight to correspond to each segment.
[0070] As an optional example, this step can be performed by the integration data module in the target system.
[0071] Since passengers may book tickets for different segments of a flight, to correspond with the segment details, it is necessary to divide the passenger booking data of the target flight by segment to obtain the segment passenger data for each segment of the target flight. For example, if the target flight route is ABC, and a passenger has booked tickets for segments AB and BC, then the passenger booking data needs to be divided into segments AB and BC. If the passenger has booked tickets for segment AC, then after dividing the passenger booking data by segment, the passenger segment passenger data for that passenger is the passenger booking data for single segment AC.
[0072] Furthermore, after dividing the passenger booking data of the target flight into segments, it is also necessary to adjust the segment details data and segment passenger data of each segment of the target flight to correspond to each segment.
[0073] In practical implementation, as an optional example, after obtaining the segment passenger data for each segment of the target flight, to distinguish the segment passenger data of different passengers, the passenger booking record, airline, flight number, flight day, departure airport, arrival airport, and segment creation step number in the segment passenger data are used as primary keys and stored in the integrated data table in the database. During the process of storing the segment passenger data of each segment of the target flight in the integrated data table, the segment passenger data of each segment of the target flight in the integrated data table corresponds to the segment detail data of each segment of the target flight in the detailed data table for each segment. Thus, after each flight is executed according to S202-S204, the integrated data table stores various airlines, various flight numbers, various flight days, various departure airports, various arrival airports, various passenger booking records, and passenger booking data under various segment creation step numbers.
[0074] It is understood that passenger booking data is based on the actual booking details of the passenger. For ease of understanding, three application scenarios are illustrated below. This application embodiment is not limited to these three application scenarios and can be determined based on the actual situation of the passenger booking data.
[0075] In the first example, when the target flight's route is ABC, if a passenger simultaneously books and pays for both segment AB and segment BC on the same target flight, then only one passenger booking record is obtained. In this case, the passenger booking record, airline, flight number, and segment creation step number in the passenger data for segment AB and segment BC are identical. If segment AB and segment BC are on the same flight day, then the flight day in the passenger data for segment AB and segment BC is also identical.
[0076] In the second example, when the target flight's route is ABC, if a passenger simultaneously books and pays for both segment AB of the target flight and segment BC of another flight, then only one passenger booking record is obtained. In this case, the passenger booking record and segment creation step number in the passenger data for segment AB and segment BC are the same. However, the flight numbers in the passenger data for segment AB and segment BC are different. If the two flights belong to the same airline, then the airline in the passenger data for segment AB and segment BC is the same. If segment AB and segment BC are on the same flight day, then the flight day in the passenger data for segment AB and segment BC is also the same.
[0077] In the third example, when the target flight's route is ABC, if a passenger books and pays for flight segment AB of the target flight, and then books and pays for flight segment BC of the target flight after a preset time, the passenger booking record and creation step number in the passenger data for flight segments AB and BC will be different. However, the airline and flight number in the passenger data for flight segments AB and BC will be the same. If flight segments AB and BC are on the same flight day, the flight day in the passenger data for flight segments AB and BC will also be the same. It is understandable that if, after the preset time, the passenger books and pays for flight segment BC of another flight, the flight number in the passenger data for flight segments AB and BC will be different. In this case, whether the airline in the passenger data for flight segments AB and BC is the same can be determined based on the actual situation of the flight number.
[0078] It is understandable that the departure and arrival airports for different flight segments in the above three application scenarios are determined based on the actual situation, and will not be elaborated here.
[0079] In addition, from a time perspective, passenger booking data includes historical booking data and current booking data for relevant passengers. Both historical and current booking data can be divided into segment passenger data for multiple flight segments.
[0080] As an optional example, the target system stores the basic flight data of the target flight, the detailed data of each segment of the target flight, and the passenger data of each segment of the target flight in the database independently.
[0081] S205: Statistics on various status data in the passenger data of each segment of the target flight.
[0082] After acquiring passenger data for each segment of the target flight, adjusting the segment details and passenger data for each segment of the target flight to correspond to each segment, the various status data in the passenger data for each segment of the target flight are statistically analyzed, and the various status data in the passenger data for each segment are stored in the integrated data table of the database according to the segment.
[0083] The status data can include flight status and flight sales status. Flight status includes status such as "application for booking has begun," "waitlist booking," "booking confirmed," "booking reconfirmed," "booking secured," and "booking cancelled." Flight sales status includes status such as "tickets have been issued," "tickets have been refunded," and "waiting status."
[0084] At this point, the detailed data table uses airline, flight number, flight day, departure airport, and arrival airport as primary keys, storing flight data for various airlines, flight numbers, flight days, departure airports, and arrival airports. The integrated data table uses airline, flight number, flight day, departure airport, arrival airport, passenger booking records, and flight segment creation step number as primary keys, storing passenger booking data for various airlines, flight numbers, flight days, departure airports, arrival airports, passenger booking records, and passenger booking data for various flight segment creation step numbers, along with corresponding status data.
[0085] For example, a data row in the detailed data table might contain the airline, flight number, flight day, airport A, and airport B. After mapping the segment details of each segment of flight xx in the detailed data table to the segment passenger data of each segment of flight xx in the integrated data table, if there are 5 passengers who booked tickets under airline, flight number, flight day, airport A, and airport B in the integrated data table, each passenger has their own booking record and segment creation step number, then the integrated data table will have 5 corresponding data rows X1-X5. The airline, flight number, flight day, departure airport, and arrival airport for these 5 data rows X1-X5 will all be airline, flight number, flight day, airport A, and airport B, respectively; only the passenger booking record and segment creation step number will differ.
[0086] See Table 1, which is a schematic integrated data table. The five data rows in Table 1 from top to bottom are X1, X2, X3, X4, and X5.
[0087] Table 1 Integrated Data Table
[0088]
[0089] Furthermore, as shown in Table 1, for example, the status data includes three status statistics: whether a ticket has been issued, whether a ticket has been refunded, and whether the passenger is waiting. Then, each of the five data rows X1-X5 in the integrated data table above corresponds to specific status data. For example, each data row is represented by Xi, where i is [1,5]. The corresponding status data are Data1i, Data2i, and Data3i, where Data1i is the first status data corresponding to Xi, specifically whether a ticket has been issued. Data2i is the second status data corresponding to Xi, specifically whether a ticket has been refunded. Data3i is the third status data corresponding to Xi, specifically whether the passenger is waiting. The specific status data is shown in Table 3. For example, in the first data row X1, the status data corresponding to the passenger are "Yes, No, No". That is, Data11 is "Yes", Data21 is "No", and Data31 is "No".
[0090] It should be noted that the integrated data table shown in Table 1 does not list flight status. Table 1 is only used as an example and is not limited to this in practice.
[0091] Understandably, the integrated data table stores passenger booking data as segment-specific passenger data for each flight segment, and also compiles various status data. Instead of storing passenger booking data as basic flight data or flight details, this consolidates all status data for the same flight segment, significantly reducing the time required for user queries and allowing users to quickly retrieve relevant statistical data based on status data, greatly improving query efficiency. Furthermore, the status data is not linked to flight data; when modifications to status data are needed, only the integrated data module's processing needs to be modified, without requiring any changes to the flight data or other modules.
[0092] Based on the above S201-S205, this application embodiment provides a flight data statistics method, which is applied to a target system. The target system is independent of the mainframe system and can receive flight data and passenger booking data for multiple flights transmitted from the mainframe system. The flight data includes flight schedule data and flight inventory data. Each of the multiple flights is identified as the target flight. Based on the flight schedule data of the target flight and the corresponding flight inventory data, the basic flight data of the target flight is obtained. Furthermore, the basic flight data and passenger booking data of the target flight are divided according to flight segments, and the segment details data and segment passenger data for each segment of the target flight are obtained respectively. The segment details data and segment passenger data of each segment of the target flight are adjusted to correspond to each segment. Then, various status data in the segment passenger data of each segment of the target flight can be statistically analyzed. Therefore, using a target system independent of the mainframe system to perform flight data statistics can meet the requirements of migrating the mainframe system to an open platform.
[0093] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0094] It should be noted that the names of the messages or information exchanged between the multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0095] It should be noted that although the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0096] It should be noted that computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] In one possible implementation, this application embodiment provides a specific implementation method for correcting the flight inventory data of the target flight based on the flight schedule data of the target flight in S202, and determining the corrected flight inventory data of the target flight as the basic flight data of the target flight, including:
[0098] A1: Obtain the first flight day included in the flight schedule data of the target flight and the second flight day included in the flight inventory data of the target flight.
[0099] As an optional example, when correcting the flight inventory data of a target flight based on its flight schedule data, the airlines in the target flight's flight schedule data and the airlines in the flight inventory data are consistent, and the flight numbers in the target flight's flight schedule data and the flight numbers in the flight inventory data are also consistent. In this case, the main comparison is whether the flight days in the target flight's flight schedule data and the flight days in the target flight's flight inventory data are consistent.
[0100] The first flight day represents the planned flight date range of the target flight. In practical applications, the first flight day is calculated based on the effective date range and frequency of the target flight. For example, if the effective date range of the target flight is from January 1st to March 31st, and the frequency is Monday, Tuesday, and Wednesday of each week, then the specific date corresponding to the first flight day can be determined. In this embodiment, the first flight day can be represented by Date1. The database basic data table stores the flight inventory data of the target flight, and all flight days of the target flight are retrieved from the database basic data table. In this embodiment, the second flight day can be represented by Date2. It can be understood that Date1 and Date2 are different sets of flight days under the same airline and the same flight number.
[0101] A2: When the first target flight day belongs to the first flight day and does not belong to the second flight day, add the flight plan data corresponding to the first target flight day to the flight inventory data; the first target flight day is each day within the preset date range.
[0102] Determine a reasonable preset date range. The preset date range can be set with reference to the scheduled flight date range of the target flight, and is generally greater than or equal to the scheduled flight date range of the target flight. For example, the preset date range could be January 1 to March 31, or December 1 to April 15.
[0103] For ease of description, each day within the preset date range will be referred to as the first target flight day. In this embodiment, the first target flight day can be represented by Date.
[0104] Based on this, it can be determined whether a certain flight day in the first flight day is consistent with a certain flight day in the second flight day by checking whether the first target flight day belongs to the first flight day and whether it belongs to the second flight change day.
[0105] When Date ∈ Date1 and Date ≠ Date2, it means the first target flight day already exists in the flight schedule data, but is not yet stored in the flight inventory data. Since flight schedule data is generated faster than flight inventory data, the flight schedule data corresponding to the first target flight day is added to the flight inventory data at this time, and the subsequent detailed data acquisition module continues processing. For example, if Date is January 15th, Date1 includes January 15th, but Date2 does not. Therefore, the records for January 15th in Date1 and Date2 are inconsistent.
[0106] A3: When the first target flight day does not belong to the first flight day but belongs to the second flight day, delete the flight inventory data corresponding to the first target flight day from the flight inventory data.
[0107] If Date is not in Date1 and Date is in Date2, it means that the first target flight day does not exist in the flight schedule data, but it does exist in the flight inventory data. Since flight schedule data is generated faster than flight inventory data, it is possible that the first target flight day has been deleted from the flight schedule data, but has not yet been synchronized in the flight inventory data. In this case, the flight inventory data corresponding to the first target flight day will be deleted from the flight inventory data.
[0108] A4: When the first target flight day belongs to both the first flight day and the second flight day, compare the flight schedule data and the flight inventory data of the target flight to see if they are consistent. If they are inconsistent, update the flight inventory data.
[0109] When Date∈Date1 and Date∈Date2, we can see that in addition to the airline and flight number being the same in the target flight's flight schedule data and flight inventory data, both the target flight's flight schedule data and flight inventory data also include the same flight day Date. In this case, when comparing the target flight's flight schedule data and flight inventory data for consistency, the comparison mainly focuses on data other than the airline, flight number, and flight day, such as route and aircraft type. If they are inconsistent, the corresponding flight data in the basic data table is updated, and the subsequent detailed data retrieval module continues processing; if they are consistent, the processing ends.
[0110] A5: When the first target flight day does not belong to the first flight day and does not belong to the second flight day, the flight inventory data will not be processed.
[0111] When Date is not ∈ Date1 and Date is not ∈ Date2, this situation is not considered and the flight inventory data is not processed.
[0112] A6: The corrected flight inventory data for the target flight will be used as the base flight data for the target flight.
[0113] The corrected flight inventory data and flight schedule data for the target flight correspond to each other and are basically consistent. The base flight data for the target flight is determined to be flight inventory data, and in this case, the base flight data is the corrected flight inventory data.
[0114] Based on the content of A1-A6, it can be seen that the flight inventory data of the target flight can be corrected based on the flight schedule data of the target flight, and the resulting basic flight data of the target flight is relatively accurate.
[0115] In one possible implementation, this application provides a specific method for whether to insert new flight data into the basic data table, specifically including:
[0116] B1: Receives data on the flights to be inserted from the mainframe system in real time.
[0117] The data machine for the flight to be inserted is the new flight data transmitted to the mainframe system.
[0118] B2: When it is determined that the database contains flight data for the flight to be inserted based on the airline and flight number in the flight data to be inserted, determine whether the second target flight day belongs to the third flight day included in the flight data of the flight to be inserted in the database; the second target flight day is each flight day in the flight data to be inserted.
[0119] When the database contains flight data for the flight to be inserted based on the airline and flight number, it indicates that the database already stores some flight data with the same flight number. In this case, it is determined directly based on the flight date whether the data for the flight to be inserted needs to be stored in the database.
[0120] In this embodiment of the application, the third flight day can be represented by Date3, and the second target flight day can be represented by Date`.
[0121] B3: When the second target flight day belongs to the third flight day, compare the flight data to be inserted with the flight data of the flight to be inserted stored in the database. If they are inconsistent, update the flight data of the flight to be inserted stored in the database.
[0122] When Date` ∈ Date3, it indicates that the third flight day includes the second target flight day. At this point, it's determined whether the flight data to be inserted matches the flight data stored in the database. Specifically, this involves comparing data other than the flight day, airline, and flight number. If they don't match, the flight data stored in the database is updated, and the subsequent detailed data retrieval module continues processing; otherwise, the process ends.
[0123] B4: When the second target flight day does not belong to the third flight day, add the flight data to be inserted to the flight data of the flight to be inserted in the database.
[0124] When Date' is not ∈ Date3, it means that the third flight day does not include the second target flight day. In this case, the flight data to be inserted is added to the flight data of the flight to be inserted in the database, and the subsequent detailed data acquisition module continues to process it.
[0125] Understandably, since flight data includes both flight schedule data and flight inventory data, in practice, the flight schedule data and flight inventory data are processed separately according to methods B1-B4, and finally added to the corresponding data in the database. This will not be elaborated further here. Then, based on the updated flight schedule data of the flight to be inserted, the updated flight inventory data of the flight to be inserted is corrected to obtain the updated basic flight data of the flight to be inserted. The basic flight data is then transmitted to the detailed data acquisition module for further processing.
[0126] In one possible implementation, based on the content of B1-B4, after executing B1-B4, this application embodiment provides a specific implementation method for whether to insert new flight segment detail data into the detail data table, specifically including:
[0127] C1: Based on the flight data of the flight to be inserted, obtain the detailed data of each segment of the flight to be inserted.
[0128] After receiving the flight data of the flight to be inserted, the flight data of the flight to be inserted is divided according to the flight segment to obtain the detailed data of the flight segment to be inserted for each flight segment.
[0129] C2: When the second target flight day belongs to the fourth flight day, compare the details of the segments to be inserted for each segment of the flight to be inserted with the details of the segments of the flight to be inserted stored in the database. If they are inconsistent, update the details of the segments of the flight to be inserted stored in the database. The fourth flight day is the flight day included in the details of the segments of the flight to be inserted stored in the database.
[0130] In this embodiment, the fourth flight day is represented by Date4. When Date`∈Date4, the detailed data of each segment of the flight to be inserted is compared with the detailed data of each segment of the flight to be inserted stored in the database. Specifically, the comparison mainly focuses on whether other data besides the flight day, airline, and flight number are consistent. If they are inconsistent, the detailed data of each segment of the flight to be inserted stored in the database is updated; if they are consistent, the processing ends.
[0131] C3: When the second target flight day does not belong to the fourth flight day, add the detailed data of each segment of the flight to be inserted to the segment detailed data of each segment of the flight to be inserted to the database.
[0132] If Date' is not ∈ Date4, add the detailed data of each segment of the flight to be inserted to the corresponding segment detail data of the flight to be inserted in the database. As an optional example, if the detailed data of each segment of the flight to be inserted is stored in a detail data table, then simply add the detailed data of each segment of the flight to be inserted to the corresponding position in the detail data table.
[0133] It is understandable that whether the second target flight day belongs to the fourth flight day and whether the second target flight day belongs to the third flight day are mutually exclusive. If the second target flight day belongs to the third flight day, then the second target flight day also belongs to the fourth flight day.
[0134] It is also understandable that the processing method for new passenger booking data transmitted from the mainframe system is similar to that for flight data, so it will not be elaborated here.
[0135] See Figure 3 , Figure 3 This is a schematic diagram illustrating another exemplary application scenario provided by an embodiment of this application. For example... Figure 3 As shown, the target system may further include an operational data module, a query data module, and a user call scenario module. The data processing module includes an operational data module, a basic data acquisition module, a detailed data acquisition module, and an integrated data module.
[0136] Understandably, the data processing module primarily processes flight schedule data, flight inventory data, and passenger booking data to obtain basic flight data and detailed flight data. It then divides the detailed flight data and passenger booking data by flight segment to obtain segment detailed data and segment passenger data. All data is stored in the database.
[0137] The operation data module receives flight schedule data, flight inventory data, and passenger booking data transmitted from the data access module. It uses a message middleware to handle these three types of data and distributes them to different services for further processing based on the message type. These services include flight data services and passenger services. Specifically, through identifiers in the data message header, the data processing module configures different processing service names for different types of data and distributes the corresponding messages to the configured services, ensuring that each service processes the corresponding data. It is evident that using a message middleware not only reduces the coupling between different modules but also acts as a buffer, mitigating potential problems caused by performance differences between modules.
[0138] The user-invoking scenario module is used to interact with users in conjunction with other software. Users input user information and request data through the user-invoking module. In response to the user's input, the user-invoking scenario module sends the user information and request data to the query module for retrieval.
[0139] The data query module verifies the received user information and request data. If the verification is successful, it retrieves the request data from the database and, based on the retrieved request data, obtains the corresponding statistical data. This summarized statistical data is then returned to the user-invoking scenario module. The user-invoking scenario module then outputs the statistical data to the user.
[0140] Therefore, based on Figure 3 The target system shown in this application provides a specific implementation method for the target system to respond to a user's query, obtain the user's requested data, and return the user's requested data to the user when the user queries flight status statistics. The implementation method includes:
[0141] D1: In response to the input user data and request data, validate the user data and request data.
[0142] User data can be understood as user attributes, such as the user's airline, account number, and account configuration level. Request data refers to the key parameters of request status statistics, such as flight sales status statistics, including information like airline, flight number, flight day, and departure and arrival airports.
[0143] As an optional example, such as Figure 3 As shown, this step can be implemented by the user calling the scenario module and the data query module.
[0144] D2: After successfully verifying the user data and request data, combine the request data with the segment details of each segment in each flight to obtain the segment to be queried.
[0145] The requested data is primarily used to locate flight data in the detailed data table. After successful verification of the user data and the requested data, the requested data is compared with the segment details of each flight stored in the detailed data table of the database to obtain the requested flight segment. Therefore, the requested flight segment, airline, flight number, flight day, etc., are all determined.
[0146] As an optional example, such as Figure 3 As shown, this step can be implemented by the data query module. When the verification of user data and request data fails, the data query module can return a failure message to the user-calling scenario module, which in turn outputs a failure message to the user.
[0147] D3: Combine the various status data in the flight segment to be queried and the passenger data of the flight segment to be queried to obtain various status statistics data corresponding to the flight segment to be queried.
[0148] Based on the various status data in the passenger data of the flight segment to be queried and the flight segment passenger data of the flight segment to be queried, obtain the various status statistics corresponding to the flight segment to be queried. Among them, the various status statistics corresponding to the flight segment to be queried are the status statistics of all passenger data rows corresponding to the flight segment, airline, flight number, and flight day after the flight segment, airline, flight number, and flight day are determined.
[0149] For example, if a user's query segment is one of the segments in Table 1, the corresponding passenger data rows in Table 1 are 5 rows. Then, the status statistics for "Ticket Issued?" are: 3 tickets issued, 2 not issued. The status statistics for "Refund Issued?" are: 2 refunds, 3 not refunded. The status statistics for "Waiting?" are: 5 not waiting.
[0150] As an optional example, such as Figure 3 As shown, this step can be implemented by the data query module.
[0151] D4: Outputs various status statistics for the flight segment to be queried.
[0152] Output various status statistics for the flight segment to be queried to the user. As an optional example, such as... Figure 3 As shown, this step can be achieved by the query module first returning various status statistics data corresponding to the flight segment to be queried to the user's calling scenario module, and then the user calling scenario module returning various status statistics data corresponding to the flight segment to be queried to the user.
[0153] In some possible implementations, the data integration module can be omitted, and passenger booking data can be stored in the basic data acquisition module or the detailed data acquisition module. The statistical functions can then be moved to the data query module. This allows for real-time querying of status statistics when the amount of data being queried is small.
[0154] [Device Example]
[0155] Based on the flight data statistics method provided in the above-described embodiments, this application also provides a flight data statistics device, which will be described below with reference to the accompanying drawings.
[0156] See Figure 4 As shown in the figure, this is a schematic diagram of the structure of a flight data statistics device provided in an embodiment of this application. This device is applied to the target system. Figure 4 As shown, the flight data statistics device includes:
[0157] The data access module 401 is used to receive flight data and passenger booking data of multiple flights transmitted from the mainframe system; the flight data includes flight schedule data and flight inventory data.
[0158] The basic data acquisition module 402 is used to correct the flight inventory data of the target flight based on the flight plan data of the target flight, and determine the corrected flight inventory data of the target flight as the basic flight data of the target flight; the target flight is each of multiple flights;
[0159] The detailed data acquisition module 403 is used to divide the basic flight data of the target flight according to the flight segments and acquire the detailed data of each flight segment of the target flight.
[0160] The first integrated data module 404 is used to divide the passenger booking data of the target flight according to the flight segment, obtain the segment passenger data of each flight segment of the target flight, and adjust the segment details data and the segment passenger data of each flight segment of the target flight to correspond to each flight segment.
[0161] The second integrated data module 405 is used to statistically analyze various status data in the passenger data of each segment of the target flight.
[0162] In one possible implementation, the device further includes:
[0163] The first data query module is used to verify the user data and the request data in response to the input user data and request data.
[0164] The second data query module is used to obtain the query segment by combining the request data and the segment details data of each segment in each flight after the user data and the request data have been successfully verified.
[0165] The third data query module is used to combine the various status data in the flight segment to be queried and the passenger data of the flight segment to be queried to obtain various status statistics data corresponding to the flight segment to be queried.
[0166] The fourth data query module is used to output various status statistics corresponding to the flight segment to be queried.
[0167] In one possible implementation, the basic data acquisition module 402 includes:
[0168] The acquisition submodule is used to acquire the first flight day included in the flight plan data of the target flight and the second flight day included in the flight inventory data of the target flight;
[0169] A submodule is added to add the flight schedule data corresponding to the first target flight day to the flight inventory data when the first target flight day belongs to the first flight day and does not belong to the second flight day; the first target flight day is each day within a preset date range;
[0170] The deletion submodule is used to delete the flight inventory data corresponding to the first target flight day from the flight inventory data when the first target flight day does not belong to the first flight day but belongs to the second flight day;
[0171] The comparison submodule is used to compare the flight schedule data of the target flight with the flight inventory data of the target flight when the first target flight day belongs to both the first flight day and the second flight day. If they are inconsistent, the flight inventory data is updated.
[0172] The processing submodule is used to not process the flight inventory data when the first target flight day does not belong to the first flight day and does not belong to the second flight day;
[0173] The determination submodule is used to determine the corrected flight inventory data of the target flight as the basic flight data of the target flight.
[0174] In one possible implementation, the device further includes:
[0175] The storage module is used to independently store the basic flight data of the target flight, the detailed data of each segment of the target flight, and the passenger data of each segment of the target flight in the database.
[0176] In one possible implementation, both the flight schedule data and the flight inventory data include the airline, flight number, and flight day, and the device further includes:
[0177] The receiving module is used to receive the data of the flight to be inserted transmitted by the mainframe system in real time.
[0178] The judgment module is used to determine whether a second target flight day belongs to a third flight day included in the flight data of the flight to be inserted in the database when it is determined that the database stores flight data of the flight to be inserted based on the airline and flight number in the flight data to be inserted; the second target flight day is each flight day in the flight data to be inserted;
[0179] The first comparison module is used to compare the flight data to be inserted with the flight data of the flight to be inserted stored in the database when the second target flight day belongs to the third flight day. If they are inconsistent, the flight data of the flight to be inserted stored in the database is updated.
[0180] The first addition module is used to add the flight data to be inserted into the flight data of the flight to be inserted in the database when the second target flight day does not belong to the third flight day.
[0181] In one possible implementation, the device further includes:
[0182] The acquisition module is used to acquire detailed data of each segment of the flight to be inserted based on the flight data of the flight to be inserted.
[0183] The second comparison module is used to compare the detailed data of each segment of the flight to be inserted with the detailed data of each segment of the flight to be inserted stored in the database when the second target flight day belongs to the fourth flight day. If they are inconsistent, the detailed data of each segment of the flight to be inserted stored in the database is updated. The fourth flight day is the flight day included in the detailed data of each segment of the flight to be inserted stored in the database.
[0184] The second adding module is used to add the detailed data of each segment of the flight to be inserted to the segment details data of each segment of the flight to be inserted to the database when the second target flight day does not belong to the fourth flight day.
[0185] In one possible implementation, the segment details data includes at least the airline, flight number, flight day, departure airport, and arrival airport; the segment passenger data includes at least the passenger booking record, airline, flight number, flight day, departure airport, arrival airport, and segment creation step number.
[0186] refer to Figure 5 The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0187] like Figure 5 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 707 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0188] Typically, the following devices can be connected to I / O interface 705: input devices 704 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 704 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0189] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 706, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.
[0190] According to one or more embodiments of this disclosure, a method for statistical analysis of flight data is provided, the method being applied to a target system, the method comprising:
[0191] Receives flight data and passenger booking data from multiple flights transmitted by a mainframe system; the flight data includes flight schedule data and flight inventory data;
[0192] The flight inventory data of the target flight is corrected based on the flight schedule data of the target flight, and the corrected flight inventory data of the target flight is determined as the basic flight data of the target flight; the target flight refers to each of multiple flights.
[0193] The basic flight data of the target flight is divided into segments to obtain detailed segment data for each segment of the target flight.
[0194] The passenger booking data of the target flight is divided into segments, the segment passenger data of each segment of the target flight is obtained, and the segment details data and the segment passenger data of each segment of the target flight are adjusted to correspond to each segment.
[0195] The system collects various status data from the passenger data of each segment of the target flight.
[0196] Optionally, the method further includes:
[0197] In response to the input user data and request data, the user data and request data are validated.
[0198] After successfully verifying the user data and the request data, the flight segment to be queried is obtained by combining the request data and the segment details of each segment in each flight.
[0199] By combining the various status data in the flight segment to be queried and the passenger data of the flight segment to be queried, various status statistics data corresponding to the flight segment to be queried are obtained;
[0200] Output the various status statistics corresponding to the flight segment to be queried.
[0201] Optionally, the step of correcting the flight inventory data of the target flight based on the flight schedule data of the target flight, and determining the corrected flight inventory data of the target flight as the basic flight data of the target flight, includes:
[0202] Obtain the first flight day included in the flight schedule data of the target flight and the second flight day included in the flight inventory data of the target flight;
[0203] When the first target flight day belongs to the first flight day but not to the second flight day, the flight schedule data corresponding to the first target flight day is added to the flight inventory data; the first target flight day is each day within a preset date range;
[0204] When the first target flight day does not belong to the first flight day but belongs to the second flight day, the flight inventory data corresponding to the first target flight day will be deleted from the flight inventory data;
[0205] When the first target flight day belongs to both the first flight day and the second flight day, compare the flight schedule data of the target flight with the flight inventory data of the target flight to see if they are consistent. If they are inconsistent, update the flight inventory data.
[0206] When the first target flight day does not belong to the first flight day and does not belong to the second flight day, the flight inventory data is not processed;
[0207] The corrected flight inventory data for the target flight is determined as the basic flight data for the target flight.
[0208] Optionally, the method further includes:
[0209] The basic flight data of the target flight, the detailed data of each segment of the target flight, and the passenger data of each segment of the target flight are stored independently in the database.
[0210] Optionally, both the flight schedule data and the flight inventory data include the airline, flight number, and flight day, and the method further includes:
[0211] Receive the data of the flight to be inserted from the main host system in real time;
[0212] When it is determined that the database stores flight data for the flight to be inserted based on the airline and flight number in the flight data to be inserted, it is determined whether the second target flight day belongs to the third flight day included in the flight data for the flight to be inserted in the database; the second target flight day is each flight day in the flight data to be inserted.
[0213] When the second target flight day belongs to the third flight day, compare whether the flight data to be inserted and the flight data of the flight to be inserted stored in the database are consistent. If they are inconsistent, update the flight data of the flight to be inserted stored in the database.
[0214] When the second target flight day does not belong to the third flight day, the flight data to be inserted is added to the flight data of the flight to be inserted in the database.
[0215] Optionally, the method further includes:
[0216] Based on the flight data of the flight to be inserted, obtain the detailed data of each segment of the flight to be inserted.
[0217] When the second target flight day belongs to the fourth flight day, compare the details of the segments to be inserted for each segment of the flight to be inserted with the details of the segments of the flight to be inserted stored in the database. If they are inconsistent, update the details of the segments of the flight to be inserted stored in the database. The fourth flight day is the flight day included in the details of the segments of the flight to be inserted stored in the database.
[0218] When the second target flight day does not belong to the fourth flight day, the detailed data of each segment of the flight to be inserted is added to the segment detailed data of each segment of the flight to be inserted in the database.
[0219] Optionally, the detailed data of the flight segment includes at least the airline, flight number, flight day, departure airport, and arrival airport; the passenger data of the flight segment includes at least the passenger booking record, airline, flight number, flight day, departure airport, arrival airport, and flight segment creation step number.
[0220] According to one or more embodiments of this disclosure, the [Apparatus Embodiment] provides an apparatus for a method embodiment, the apparatus being applied to a target system, comprising:
[0221] The data access module is used to receive flight data and passenger booking data from multiple flights transmitted by the mainframe system; the flight data includes flight schedule data and flight inventory data.
[0222] The basic data acquisition module is used to correct the flight inventory data of the target flight based on the flight plan data of the target flight, and determine the corrected flight inventory data of the target flight as the basic flight data of the target flight; the target flight is each of multiple flights;
[0223] The detailed data acquisition module is used to divide the basic flight data of the target flight according to the flight segments and acquire the detailed data of each flight segment of the target flight.
[0224] The first integrated data module is used to divide the passenger booking data of the target flight according to the flight segment, obtain the segment passenger data of each flight segment of the target flight, and adjust the segment details data and the segment passenger data of each flight segment of the target flight to correspond to each flight segment.
[0225] The second integrated data module is used to statistically analyze various status data in the passenger data of each segment of the target flight.
[0226] Optionally, the device further includes:
[0227] The first data query module is used to verify the user data and the request data in response to the input user data and request data.
[0228] The second data query module is used to obtain the query segment by combining the request data and the segment details data of each segment in each flight after the user data and the request data have been successfully verified.
[0229] The third data query module is used to combine the various status data in the flight segment to be queried and the passenger data of the flight segment to be queried to obtain various status statistics data corresponding to the flight segment to be queried.
[0230] The fourth data query module is used to output various status statistics corresponding to the flight segment to be queried.
[0231] Optionally, the basic data acquisition module 402 includes:
[0232] The acquisition submodule is used to acquire the first flight day included in the flight plan data of the target flight and the second flight day included in the flight inventory data of the target flight;
[0233] A submodule is added to add the flight schedule data corresponding to the first target flight day to the flight inventory data when the first target flight day belongs to the first flight day and does not belong to the second flight day; the first target flight day is each day within a preset date range;
[0234] The deletion submodule is used to delete the flight inventory data corresponding to the first target flight day from the flight inventory data when the first target flight day does not belong to the first flight day but belongs to the second flight day;
[0235] The comparison submodule is used to compare the flight schedule data of the target flight with the flight inventory data of the target flight when the first target flight day belongs to both the first flight day and the second flight day. If they are inconsistent, the flight inventory data is updated.
[0236] The processing submodule is used to not process the flight inventory data when the first target flight day does not belong to the first flight day and does not belong to the second flight day;
[0237] The determination submodule is used to determine the corrected flight inventory data of the target flight as the basic flight data of the target flight.
[0238] Optionally, the device further includes:
[0239] The storage module is used to independently store the basic flight data of the target flight, the detailed data of each segment of the target flight, and the passenger data of each segment of the target flight in the database.
[0240] Optionally, both the flight schedule data and the flight inventory data include the airline, flight number, and flight day, and the device further includes:
[0241] The receiving module is used to receive the data of the flight to be inserted transmitted by the mainframe system in real time.
[0242] The judgment module is used to determine whether a second target flight day belongs to a third flight day included in the flight data of the flight to be inserted in the database when it is determined that the database stores flight data of the flight to be inserted based on the airline and flight number in the flight data to be inserted; the second target flight day is each flight day in the flight data to be inserted;
[0243] The first comparison module is used to compare the flight data to be inserted with the flight data of the flight to be inserted stored in the database when the second target flight day belongs to the third flight day. If they are inconsistent, the flight data of the flight to be inserted stored in the database is updated.
[0244] The first addition module is used to add the flight data to be inserted into the flight data of the flight to be inserted in the database when the second target flight day does not belong to the third flight day.
[0245] Optionally, the device further includes:
[0246] The acquisition module is used to acquire detailed data of each segment of the flight to be inserted based on the flight data of the flight to be inserted.
[0247] The second comparison module is used to compare the detailed data of each segment of the flight to be inserted with the detailed data of each segment of the flight to be inserted stored in the database when the second target flight day belongs to the fourth flight day. If they are inconsistent, the detailed data of each segment of the flight to be inserted stored in the database is updated. The fourth flight day is the flight day included in the detailed data of each segment of the flight to be inserted stored in the database.
[0248] The second adding module is used to add the detailed data of each segment of the flight to be inserted to the segment details data of each segment of the flight to be inserted to the database when the second target flight day does not belong to the fourth flight day.
[0249] Optionally, the detailed data of the flight segment includes at least the airline, flight number, flight day, departure airport, and arrival airport; the passenger data of the flight segment includes at least the passenger booking record, airline, flight number, flight day, departure airport, arrival airport, and flight segment creation step number.
[0250] According to one or more embodiments of this disclosure, the [Device Embodiment] provides a device for the method embodiment, including one or more processors;
[0251] Storage device, on which one or more programs are stored,
[0252] When the one or more programs are executed by the one or more processors, the one or more processors implement the flight data statistics method as described above.
[0253] According to one or more embodiments of this disclosure, the [Storage Medium Embodiment] provides a computer-readable storage medium for the method embodiment, having a computer program stored thereon, wherein the program, when executed by a processor, implements the flight data statistics method as described above.
[0254] It should be noted that the modules described in the embodiments of this disclosure can be implemented in software or hardware. Furthermore, the names of the modules do not necessarily limit the functionality of the unit itself.
[0255] It should be noted that the term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description.
[0256] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0257] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0258] It should be noted that although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
[0259] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0260] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A method for statistical analysis of flight data, characterized in that, The method is applied to a target system independent of a mainframe system, and the method includes: Receives flight data and passenger booking data from multiple flights transmitted by a mainframe system; the flight data includes flight schedule data and flight inventory data; The flight inventory data of the target flight is corrected based on the flight schedule data of the target flight, and the corrected flight inventory data of the target flight is determined as the basic flight data of the target flight; the target flight refers to each of multiple flights. The basic flight data of the target flight is divided into segments to obtain detailed segment data for each segment of the target flight. The passenger booking data of the target flight is divided into segments, the segment passenger data of each segment of the target flight is obtained, and the segment details data and the segment passenger data of each segment of the target flight are adjusted to correspond to each segment. Statistically analyze the various status data in the passenger data of each segment of the target flight; The step of correcting the flight inventory data of the target flight based on the flight schedule data of the target flight, and determining the corrected flight inventory data of the target flight as the basic flight data of the target flight, includes: obtaining a first flight day included in the flight schedule data of the target flight and a second flight day included in the flight inventory data of the target flight; when the first target flight day belongs to the first flight day but not to the second flight day, adding the flight schedule data corresponding to the first target flight day to the flight inventory data; the first target flight day is each day within a preset date range; when the first target flight day does not belong to the first flight day but belongs to the second flight day, deleting the flight inventory data corresponding to the first target flight day from the flight inventory data; when the first target flight day belongs to both the first flight day and the second flight day, comparing whether the flight schedule data and the flight inventory data of the target flight are consistent, and updating the flight inventory data if they are inconsistent; when the first target flight day does not belong to either the first flight day or the second flight day, not processing the flight inventory data; and determining the corrected flight inventory data of the target flight as the basic flight data of the target flight.
2. The method according to claim 1, characterized in that, The method further includes: In response to the input user data and request data, the user data and request data are validated. After successfully verifying the user data and the request data, the flight segment to be queried is obtained by combining the request data and the segment details of each segment in each flight. By combining the various status data in the flight segment to be queried and the passenger data of the flight segment to be queried, various status statistics data corresponding to the flight segment to be queried are obtained; Output the various status statistics corresponding to the flight segment to be queried.
3. The method according to claim 1, characterized in that, The method further includes: The basic flight data of the target flight, the detailed data of each segment of the target flight, and the passenger data of each segment of the target flight are stored independently in the database.
4. The method according to claim 3, characterized in that Both the flight schedule data and the flight inventory data include the airline, flight number, and flight day. The method further includes: Receive the data of the flight to be inserted from the main host system in real time; When it is determined that the database stores flight data for the flight to be inserted based on the airline and flight number in the flight data to be inserted, it is determined whether the second target flight day belongs to the third flight day included in the flight data for the flight to be inserted in the database; the second target flight day is each flight day in the flight data to be inserted. When the second target flight day belongs to the third flight day, compare whether the flight data to be inserted and the flight data of the flight to be inserted stored in the database are consistent. If they are inconsistent, update the flight data of the flight to be inserted stored in the database. When the second target flight day does not belong to the third flight day, the flight data to be inserted is added to the flight data of the flight to be inserted in the database.
5. The method according to claim 4, characterized in that, The method further includes: Based on the flight data of the flight to be inserted, obtain the detailed data of each segment of the flight to be inserted. When the second target flight day belongs to the fourth flight day, compare the details of the segments to be inserted for each segment of the flight to be inserted with the details of the segments of the flight to be inserted stored in the database. If they are inconsistent, update the details of the segments of the flight to be inserted stored in the database. The fourth flight day is the flight day included in the details of the segments of the flight to be inserted stored in the database. When the second target flight day does not belong to the fourth flight day, the detailed data of each segment of the flight to be inserted is added to the segment detailed data of each segment of the flight to be inserted in the database.
6. The method according to claim 1, characterized in that, The detailed data for the flight segment includes at least the airline, flight number, flight day, departure airport, and arrival airport; the passenger data for the flight segment includes at least the passenger booking record, airline, flight number, flight day, departure airport, arrival airport, and flight segment creation step number.
7. A flight data statistics device, characterized in that, The device is applied to a target system independent of a mainframe system, and the device includes: The data access module is used to receive flight data and passenger booking data from multiple flights transmitted by the mainframe system; the flight data includes flight schedule data and flight inventory data. The basic data acquisition module is used to correct the flight inventory data of the target flight based on the flight plan data of the target flight, and determine the corrected flight inventory data of the target flight as the basic flight data of the target flight; the target flight is each of multiple flights; The detailed data acquisition module is used to divide the basic flight data of the target flight according to the flight segments and acquire the detailed data of each flight segment of the target flight. The first integrated data module is used to divide the passenger booking data of the target flight according to the flight segment, obtain the segment passenger data of each flight segment of the target flight, and adjust the segment details data and the segment passenger data of each flight segment of the target flight to correspond to each flight segment. The second integrated data module is used to statistically analyze various status data in the passenger data of each segment of the target flight. The basic data acquisition module includes: The acquisition submodule is used to acquire the first flight day included in the flight plan data of the target flight and the second flight day included in the flight inventory data of the target flight; A submodule is added to add the flight schedule data corresponding to the first target flight day to the flight inventory data when the first target flight day belongs to the first flight day and does not belong to the second flight day; the first target flight day is each day within a preset date range; The deletion submodule is used to delete the flight inventory data corresponding to the first target flight day from the flight inventory data when the first target flight day does not belong to the first flight day but belongs to the second flight day; The comparison submodule is used to compare the flight schedule data of the target flight with the flight inventory data of the target flight when the first target flight day belongs to both the first flight day and the second flight day. If they are inconsistent, the flight inventory data is updated. The processing submodule is used to not process the flight inventory data when the first target flight day does not belong to the first flight day and does not belong to the second flight day; The determination submodule is used to determine the corrected flight inventory data of the target flight as the basic flight data of the target flight.
8. An electronic device, characterized in that, include: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the flight data statistics method as described in any one of claims 1-6.
9. A computer-readable medium, characterized in that, It stores a computer program, wherein the program, when executed by a processor, implements the flight data statistics method as described in any one of claims 1-6.
Citation Information
Patent Citations
Passenger loss time prediction method and device
CN111784049A
Flight data processing method and device, equipment and storage medium
CN113312420A