A flight plan merging and compression method based on a shift matrix
By constructing a two-dimensional flight schedule matrix to identify and merge flight schedule segments, the problem of duplicate records in periodic flight schedules is solved, achieving efficient data compression and improved system performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies, when processing periodic flight schedule data, contain a large number of duplicate records with similar structures but different time spans, leading to increased storage burden and low system processing efficiency. Traditional data compression methods lack an understanding of flight schedule structure.
A flight schedule merging and compression method based on the schedule matrix is adopted. By constructing a two-dimensional schedule matrix, continuous and structurally consistent flight schedule segments are identified and merged to reduce redundant records and retain operational attribute information.
It effectively reduced duplicate recordings, improved data expression efficiency and system processing performance, and enhanced the processing efficiency of the flight planning system.
Smart Images

Figure CN122133942A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for merging and compressing flight schedules based on a schedule matrix. Background Technology
[0002] With the rapid development of air transport, the volume of flight schedule data continues to grow, especially in periodic flight schedules, where there are a large number of duplicate records with similar structures but different time spans. These redundant records not only increase the storage burden but also affect the processing efficiency of the flight schedule system and the performance of subsequent scheduling, ticketing, and other systems. Traditional data compression methods are mostly based on text deduplication or field merging, lacking an understanding of the flight schedule structure, making it difficult to achieve effective structured compression. Summary of the Invention
[0003] To address the technical problems existing in the background art, this invention proposes a flight schedule merging and compression method based on the flight schedule matrix. This method can automatically identify and merge continuous and structurally consistent flight schedule segments while maintaining the semantic integrity of the flight schedule, thereby reducing redundancy and improving system efficiency.
[0004] This invention proposes a flight schedule merging and compression method based on a flight schedule matrix, the method comprising: S1. Obtain the original flight schedule data and group the flight schedule data according to the same operational attributes; S2. For each set of flight schedule data, construct a two-dimensional flight schedule matrix based on the range of start and end dates. The two dimensions of the flight schedule matrix correspond to consecutive natural weeks and Monday to Sunday in the natural week, respectively. Each cell in the flight schedule matrix represents the flight operation status for the corresponding date. S3. Traverse the dimensions corresponding to the natural week in the schedule matrix and compare the flight operation status of adjacent natural weeks: If the natural weeks are consecutive and the shift structure is the same, they are merged into one shift segment, and the start and end dates of the shift segment are updated while retaining the original shift structure. Otherwise, adjacent natural weeks will be divided into different shifts; S4. Output all flight periods to form a merged and compressed set of flight schedule records.
[0005] Preferably, the flight operation status includes three status values, wherein the first status value indicates that at least one original flight plan covers the natural day and the day is clearly marked as an operating day, the second status value indicates that no original flight plan covers the natural day and the day is clearly marked as a non-operating day, and the third status value indicates that the flight plan status for the date is unknown or the data is missing.
[0006] Preferably, in S3, the identical schedule structure means that the vectors corresponding to multiple natural weeks in the schedule matrix, which represent the weekly flight operation status, are exactly the same.
[0007] Preferably, in S3, the continuity of time means that the end date of the previous natural week is directly adjacent to the start date of the next natural week.
[0008] Preferably, the shift segments formed by merging in S3 retain all operational attribute information from the original operational attributes.
[0009] Preferably, the operational attributes include one or more of the following: flight number, departure and arrival airports, airline, aircraft type, and cabin class.
[0010] Preferably, in the two-dimensional shift matrix, the natural week is the column and Monday to Sunday are the rows.
[0011] Preferably, the original flight schedule data is stored in the form of a schedule code; the schedule code is represented in any of the following forms: a 7-bit binary number, a Boolean array, or a specific encoded string of length 7.
[0012] This invention effectively reduces duplicate records and improves data expression efficiency and system processing performance without altering the semantics of flight schedules. It is suitable for compressing periodic flight schedules, reducing duplicate records and improving data processing efficiency. Examples demonstrate that this method, by comparing natural weekly flight schedule vectors using a matrix structure, improves the merging and judgment process compared to the original... The complexity is reduced to . Attached Figure Description
[0013] Figure 1 This is a flowchart illustrating the implementation of a flight schedule merging and compression method based on a flight schedule matrix proposed in this invention. Detailed Implementation
[0014] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0015] Reference Figure 1 This invention proposes a flight schedule merging and compression method based on a flight schedule matrix. The core of this method lies in reducing redundant records and improving data processing efficiency through structured analysis and merging of flight schedule data. The method includes: S1. Obtain the raw flight schedule data and group it according to the same operational attributes. Each group represents the flight schedule for the same flight at different time periods while keeping the operational attributes unchanged. The operational attributes include one or more of the following: flight number, departure and arrival airports, airline, aircraft type, and cabin class.
[0016] For each set of flight schedule data, the core information includes the start date, end date, and schedule code. The schedule code indicates which days of the week the flight schedule operates, and its data representation is diverse, adaptable to different system storage formats. Specifically, the representation of the schedule code includes, but is not limited to, the following: 7-bit binary representation: Represented by a 7-bit binary number, where each bit (from least significant bit to most significant bit or in a pre-defined order) corresponds to Monday through Sunday, with 1 indicating a flight on that day and 0 indicating no flight. For example, the binary number 0110110 indicates that there are flights on Tuesday, Wednesday, Friday, and Saturday.
[0017] Specific encoded string format: Represented by a string of length 7, where each character corresponds to Monday through Sunday. The encoding rules can be defined according to the specific system. In this embodiment, the d-th character in the string (d is an integer from 1 to 7, where 1 represents Monday) can be used to indicate whether there is a flight scheduled for day d: if the character is equal to the numeric character d (i.e., (char)(d + '0')), it indicates that there is a flight scheduled for that day; otherwise, it indicates that there is no flight scheduled. For example, "1234567" indicates daily operation, and "1.3.5.7" indicates operation on Monday, Wednesday, Friday, and Sunday.
[0018] Boolean array form: using a Boolean array of length 7 The array represents the week, with each element corresponding to Monday through Sunday, where `true` indicates a flight is available and `false` indicates no flight is available. For example, the array `[true, false, true, false, true, false, false]` means that there are flights on Mondays, Wednesdays, and Fridays.
[0019] S2. For each set of flight schedule data, extract its earliest start date. With the latest end date The overall time range of the data set is determined, and then the time range is divided into several time periods in "natural week" units. Each period corresponds to a complete natural week, thereby constructing a two-dimensional schedule matrix. The two dimensions of the schedule matrix correspond to consecutive natural weeks and Monday to Sunday in a natural week, respectively. Each cell in the schedule matrix represents the flight operation status of the corresponding date.
[0020] It should be noted that when crossing months or years, the ISO8601 or the general definition of civil aviation in China shall still be used as the standard, with Monday to Sunday as a natural week.
[0021] In one embodiment, the two-dimensional shift matrix is represented in the form of columns from Monday to Sunday and rows of natural weeks, that is, one column represents one natural week, constructing a two-dimensional shift matrix of 7 rows and N columns.
[0022] In another embodiment, each row of the two-dimensional schedule matrix represents a natural week, and each column represents the week number, constructing an M-row, 7-column two-dimensional schedule matrix. This form is more convenient for calculating two-dimensional schedule matrices, and therefore, as a preferred embodiment, the two-dimensional matrix of this embodiment will be used as an example in the following description.
[0023] Specifically, with Starting from Monday of the week in question, Using the Sunday of the current week as the endpoint, the entire date range is divided into n consecutive natural weeks: , ..., .
[0024] For a two-dimensional shift matrix ,definition Each of them The shift vector corresponding to the w-th natural week is obtained by decoding the shift code. This indicates the flight operation status for week w and week d.
[0025] Let the date range of week w be: .
[0026] in: Let Monday be the date of the w-th natural week. Let be the date of the Sunday of the wth natural week.
[0027] Specifically, flight operation status includes three status values. The first status value indicates that at least one original flight schedule covers the calendar day, and the day is explicitly marked as an operating day, represented by "1". The second status value indicates that no original flight schedule covers the calendar day, and the day is explicitly marked as a non-operating day, represented by "0". The third status value indicates that none of the original flight schedules cover the calendar day, therefore it cannot be determined whether there is any flight schedule information for that day, and the flight schedule status for that date is unknown or data is missing, represented by "null". The specific representations are as follows:
[0028] Here, null represents a natural segmentation point, used to identify breaks in a matrix row, allowing different continuous coverage segments to be processed independently.
[0029] S3. Traverse the flight schedule matrix along the dimensions corresponding to the natural week, comparing the flight operation status of adjacent natural weeks. Specifically, for each set of flight schedule data... For the start date By the deadline Every day within: 1. Calculate the natural week to which this day belongs. ; 2. Calculate the day of the week corresponding to this day. , .
[0030] 3. According to The value of determines whether there is a flight plan: if there is a flight plan, then set . Otherwise, set (No flight schedule) or null (status unknown or data lost).
[0031] If the natural weeks are consecutive in time and have the same schedule structure, they are merged into one schedule segment, and the start and end dates of this schedule segment are updated, while retaining the original schedule structure and all operational attribute information in the original operational attributes. "Same schedule structure" means that multiple natural weeks have identical vectors in the schedule matrix representing the weekly flight operation status; "consecutive in time" means that the end date of the previous natural week is directly adjacent to the start date of the next natural week.
[0032] Specifically, for adjacent natural cycles w and w+1, if and only if: and At that time, make a judgment , They can be merged into the same shift, and the merged date range is: .
[0033] Since the entire cross-line merging process is completed at the matrix level, it avoids data conflicts caused by overlapping original plans when merging by plan segment in the traditional way.
[0034] If adjacent natural cycles satisfy any of the following conditions: (1) The class period vectors are different: ; (2) Time discontinuity: .
[0035] The natural week will then be divided into different shifts.
[0036] For example, the flight schedule from September 30th to November 4th is as follows:
[0037] Each row represents the schedule structure for the corresponding week.
[0038] in, , ; , ; because ,and ,therefore , If the merger conditions are met, they can be merged into .
[0039] in, However, since the dates are not consecutive, they are saved as separate shifts.
[0040] in, Although the dates are consecutive, the shift structure is different from... Because they are different, they are also saved as separate shifts.
[0041] S5. Output all flight periods to form a merged and compressed set of flight schedule records. This result can be directly used for application scenarios such as storage, display, scheduling calculation or ticketing in flight scheduling systems. It is suitable for data processing in flight scheduling systems, route visualization systems or online ticketing platforms.
[0042] This invention can effectively reduce duplicate records and improve data expression efficiency and system processing performance without changing the semantics of flight plans. It is suitable for the compression processing of periodic flight plans, and can reduce duplicate records and improve data processing efficiency.
[0043] For example, consider the following three sets of original flight schedule data: [{"forg":"INC","fdst":"HRB","fnumber":"LT4322","fday":".7","fstartdate":2025-08-10,"fenddate":2025-08-10} {"forg":"INC","fdst":"HRB","fnumber":"LT4322","fday":".2.4.6.","fstartdate":2025-08-12,"fenddate":2025-08-30}, {"forg":"INC","fdst":"HRB","fnumber":"LT4322","fday":"1.3.5.7","fstartdate":2025-08-11,"fenddate":2025-08-31}]
[0044] After compression using the method of this invention, it can be stored as: [{"forg":"INC","fdst":"HRB","fnumber":"LT4322","fday":"1234567","fstartdate":2025-08-10,"fenddate":2025-08-31}].
[0045] In this context, forg represents the IATA code of the departure airport, fdst represents the IATA code of the destination airport, fnumber represents the flight number, fday represents the flight code, fstartdate represents the start date, and fenddate represents the end date.
[0046] The above examples demonstrate that this method, by comparing the natural weekly shift vectors using a matrix structure, improves the merging judgment process compared to the original... The complexity is reduced to , where n is the number of natural weeks and k is the number of original flight schedules.
[0047] It should be noted that the processing flow of this invention can be implemented by software programs or embedded into a flight management system as an independent module. It is applicable to various programming languages and platform environments and has good versatility and scalability.
[0048] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for merging and compressing flight schedules based on a schedule matrix, characterized in that, The methods include: S1. Obtain the original flight schedule data and group the flight schedule data according to the same operational attributes; S2. For each set of flight schedule data, construct a two-dimensional flight schedule matrix based on the range of start and end dates. The two dimensions of the flight schedule matrix correspond to consecutive natural weeks and Monday to Sunday in the natural week, respectively. Each cell in the flight schedule matrix represents the flight operation status for the corresponding date. S3. Traverse the dimensions corresponding to the natural week in the schedule matrix and compare the flight operation status of adjacent natural weeks: If the natural weeks are consecutive and the shift structure is the same, they are merged into one shift segment, and the start and end dates of the shift segment are updated while retaining the original shift structure. Otherwise, adjacent natural weeks will be divided into different shifts; S4. Output all flight periods to form a merged and compressed set of flight schedule records.
2. The flight schedule merging and compression method based on the flight schedule matrix according to claim 1, characterized in that, The flight operation status includes three status values. The first status value indicates that at least one original flight plan covers the natural day and the day is clearly marked as an operating day. The second status value indicates that no original flight plan covers the natural day and the day is clearly marked as a non-operating day. The third status value indicates that the flight plan status for the date is unknown or the data is missing.
3. The flight schedule merging and compression method based on the flight schedule matrix according to claim 2, characterized in that, In S3, the identical schedule structure means that the vectors corresponding to multiple natural weeks in the schedule matrix, which represent the weekly flight operation status, are exactly the same.
4. The flight schedule merging and compression method based on the flight schedule matrix according to claim 3, characterized in that, In S3, the continuous time means that the end date of the previous natural week is directly adjacent to the start date of the next natural week.
5. The flight schedule merging and compression method based on the flight schedule matrix according to claim 2, characterized in that, The schedule segments formed by merging in S3 retain all operational attribute information from the original operational attributes.
6. The flight schedule merging and compression method based on the flight schedule matrix according to claim 5, characterized in that, The operational attributes include one or more of the following: flight number, departure and arrival airports, airline, aircraft type, and cabin class.
7. The flight schedule merging and compression method based on the flight schedule matrix according to claim 1, characterized in that, In the two-dimensional shift matrix, the natural week is the column, and Monday to Sunday are the rows.
8. The flight schedule merging and compression method based on the flight schedule matrix according to claim 1, characterized in that, The original flight schedule data is stored in the form of a schedule code; the schedule code can be represented in any of the following ways: a 7-bit binary number, a Boolean array, or a specific encoded string of length 7.