Method and system for analyzing historical flight frequency of user
By acquiring and preprocessing the user's flight data, the problem of difficulty in obtaining the overall industry flight frequency data in the prior art is solved, and more accurate user flight frequency analysis is achieved, and the accuracy of passenger value judgment is improved.
Patent Information
- Application Number
- CN202411127455.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-29
AI Technical Summary
The existing technology is difficult to obtain user flight frequency data in the overall industry, resulting in deviations in passenger analysis and difficult to meet the needs of accurate analysis.
By obtaining the user's flight data within the preset time period, preprocessing and validity verification, supplementing the missing data, and finally superimposing the number of flights of the user based on the flight data set to obtain the user's flight frequency.
It improves the accuracy of flight frequency estimates, helps the industry to better conduct user analysis, and reduces deviations in passenger value judgments.
Smart Images

Figure CN119048140A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flight information processing, and in particular to a method and system for analyzing a user's historical flight frequency. Background Art
[0002] The user's flight frequency is a very important basic data for the civil aviation industry. It can be used to determine the travel frequency of passengers and then analyze the value of passengers.
[0003] However, for each airline and airport, all they have are data about their own airline or airport. It is difficult to obtain data for the entire industry. Considering that the distribution concentration of airlines and airports in China is relatively low, this will lead to large deviations in the analysis of passengers, making it difficult to meet the needs of accurate analysis. Summary of the invention
[0004] In order to solve the technical problems existing in the background technology, the present invention proposes a method and system for analyzing the historical flight frequency of a user.
[0005] The present invention proposes a method for analyzing a user's historical flight frequency, comprising the following steps:
[0006] S1. Acquire a flight data set related to the same user according to a preset path within a preset time period. The flight data set is a collection of the user's historical flight records. A single flight data includes flight number, flight segment, departure time, arrival time, flight status, departure airport, and arrival airport.
[0007] S2, preprocessing the flight data set to obtain a first type of flight data set;
[0008] S3, obtaining the user's positioning data, sorting the first type of flight data set in chronological order, and performing validity verification and missing segment supplementation on the first type of flight data set based on the user's positioning data to obtain a second type of flight data set;
[0009] S4. Perform a superposition calculation on the number of flights of the same user based on the second type of flight data set to obtain the flight frequency of the user within a preset time period.
[0010] Preferably, the preset path specifically includes:
[0011] According to the user's identity information, the user's ticket purchase data within a preset time period is obtained from the flight sales database, and the flight data is extracted from the ticket purchase data;
[0012] Obtain the check-in data of the user within a preset time period from the flight check-in database according to the user's identity information, and extract the boarding data from the check-in data;
[0013] The manual attention data of the user within a preset time period is obtained from the flight attention database according to the user's identity information, and the flight data is extracted from the manual attention data.
[0014] Preferably, step S1 specifically includes:
[0015] Acquire the flight data of the same user corresponding to each path according to the preset path within the preset time period;
[0016] The flight data of the same user corresponding to each path are merged to form a flight data set related to the same user.
[0017] Preferably, the preprocessing specifically includes:
[0018] Duplicate flights are eliminated by departure time. When there are multiple sets of flight data for the same departure time, a complete set of flight data is retained;
[0019] The flight data set after duplicate flights are eliminated is sorted by departure time, and the data with departure time on the same day are analyzed according to a preset infeasible strategy, and the flight data that meets the preset infeasible strategy is eliminated to obtain a first type of flight data set.
[0020] Preferably, the preset infeasible strategy specifically includes:
[0021] When the departure times are on the same day and the actual available interval between connecting flights at the same airport is less than t0 minutes, the flight to be connected is considered an infeasible flight;
[0022] When the departure time is on the same day and the arrival time of the previous flight is later than the boarding deadline of the next segment, the flight to be boarded is an unavailable flight;
[0023] When the departure time is on the same day and the arrival airport of the previous flight and the departure airport of the next flight are not the same airport, determine whether the interval time T between the arrival time of the previous flight and the departure time of the next flight is lower than the sum of the journey time t2 and the set buffer time t2; when the interval time T is lower than the sum of the journey time t2 and the set buffer time t2, the next flight is an unfeasible flight.
[0024] Preferably, the flight status includes but is not limited to normal use, cancellation, and unfinished; step S3 specifically includes:
[0025] sorting the first type of flight data set in chronological order;
[0026] The validity of the first type of flight data set is checked according to the flight status. When the flight status is canceled or incomplete, the corresponding flight data is invalid and the corresponding flight data is deleted;
[0027] Within a preset time period, obtain the user's location data and extract city information from the location data;
[0028] Arrange the extracted city information in date order to construct a city sequence diagram;
[0029] Compare the city sequence diagram with the first type of flight data set after validity verification in time sequence;
[0030] When the city sequence diagram is completely consistent with the first type of flight data set after validity verification, the first type of flight data set after validity verification is collected as the second type of flight data set;
[0031] When there is a missing segment in the comparison between the first type of flight data set after validity verification and the city sequence diagram, obtain the city information corresponding to the missing segment, and determine whether the straight-line distance between the city information corresponding to the missing segment reaches the distance threshold;
[0032] When the straight-line distance between the city information corresponding to the missing segments reaches the distance threshold, the missing city information is supplemented to the first type of flight data set after validity verification to obtain the second type of flight data set;
[0033] When the straight-line distance between the city information corresponding to the missing segment does not reach the distance threshold, the first type of flight data set after validity verification is collected as the second type of flight data set.
[0034] Preferably, the step of supplementing the missing city information of the first type of flight data set after validity verification to obtain the second type of flight data set specifically includes:
[0035] When there is a direct flight between the cities corresponding to the missing segments, a segment is added to the first type of flight data set after validity verification to obtain a second type of flight data set;
[0036] When there is no direct flight between the city information corresponding to the missing segment, two flight segments are added to the first type of flight data set after validity verification to obtain the second type of flight data set.
[0037] Preferably, step S4 specifically includes:
[0038] The second type of flight data set is segmented according to the flight segments, and within a preset time period, the number of segmented segments is superimposed and calculated, and the result of the superimposed calculation of the number of segmented segments is used as the flight frequency of the user within the preset time period.
[0039] The present invention proposes a system for analyzing a user's historical flight frequency, comprising:
[0040] The data acquisition module is used to acquire the flight data set related to the same user according to the preset path within the preset time period. The flight data set is a collection of the user's historical flight records. A single flight data includes flight number, flight segment, departure time, arrival time, flight status, departure airport, and arrival airport;
[0041] A first processing module, used for preprocessing the flight data set to obtain a first type of flight data set;
[0042] A second processing module is used to obtain the user's positioning data, sort the first type of flight data set in chronological order, and perform validity verification and missing segment supplementation on the first type of flight data set based on the user's positioning data to obtain a second type of flight data set;
[0043] The data generation module is used to perform superposition calculation on the number of flights of the same user based on the second type of flight data set to obtain the flight frequency of the user within a preset time period.
[0044] In the present invention, the proposed method and system for analyzing the historical flight frequency of a user obtains the flight data set related to the same user according to the preset path within a preset time period; pre-processes the flight data set to obtain a first type of flight data set; sorts the first type of flight data set in chronological order, and performs validity verification on the first type of flight data set to obtain a second type of flight data set; and performs superposition calculation on the number of flights of the same user based on the second type of flight data set to obtain the flight frequency of the user within the preset time period. Through multi-channel and multi-dimensional data, data cross-analysis is performed to improve the accuracy of flight frequency estimation, thereby helping users in the industry to better perform user analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of the work flow structure of a method for analyzing a user's historical flight frequency proposed by the present invention;
[0046] Figure 2 A schematic diagram of the system architecture of a system for analyzing a user's historical flight frequency proposed by the present invention. DETAILED DESCRIPTION
[0047] Reference Figure 1 and Figure 2 The present invention proposes a method for analyzing a user's historical flight frequency, comprising the following steps:
[0048] S1. Within a preset time period, obtain a flight data set related to the same user according to a preset path. The flight data set is a summary of the user's historical flight records. A single flight data includes flight number, flight segment, departure time, arrival time, flight status, departure airport, and arrival airport.
[0049] In this embodiment, the preset path specifically includes: obtaining the user's ticket purchase data within a preset time period from the flight sales database according to the user's identity information, and extracting the boarding data from the ticket purchase data; obtaining the user's check-in data within the preset time period from the flight check-in database according to the user's identity information, and extracting the boarding data from the check-in data; obtaining the user's manual attention data within the preset time period from the flight attention database according to the user's identity information, and extracting the boarding data from the manual attention data.
[0050] In this embodiment, step S1 specifically includes:
[0051] Acquire the flight data of the same user corresponding to each path according to the preset path within the preset time period;
[0052] The flight data of the same user corresponding to each path are merged to form a flight data set related to the same user.
[0053] In this embodiment, the flight data is acquired through multiple preset paths to ensure the integrity and authenticity of the flight data, thereby improving the accuracy of data analysis.
[0054] S2. Preprocess the flight data set to obtain a first type of flight data set.
[0055] In this embodiment, the preprocessing specifically includes:
[0056] Duplicate flights are eliminated by departure time. When there are multiple sets of flight data for the same departure time, a complete set of flight data is retained;
[0057] The flight data set after duplicate flights are eliminated is sorted by departure time, and the data with departure time on the same day are analyzed according to a preset infeasible strategy, and the flight data that meets the preset infeasible strategy is eliminated to obtain a first type of flight data set.
[0058] In this embodiment, the preset infeasible strategy specifically includes: when the departure time is the same day and the actual available interval time of connecting flights at the same airport is less than t0 minutes, the flight to be connected is an infeasible flight; when the departure time is the same day and the arrival time of the previous flight is later than the boarding deadline of the subsequent section, the flight to be boarded is an infeasible flight; when the departure time is the same day and the arrival airport of the previous flight and the departure airport of the subsequent flight are not the same airport, determine whether the interval time T between the arrival time of the previous flight and the departure time of the subsequent flight is less than the sum of the journey time t2 and the set buffer time t2; when the interval time T is less than the sum of the journey time t2 and the set buffer time t2, the subsequent flight is an infeasible flight.
[0059] S3. Acquire the user's positioning data, sort the first type of flight data set in chronological order, and perform validity verification and supplement missing segments on the first type of flight data set based on the user's positioning data to obtain a second type of flight data set.
[0060] In this embodiment, the flight status includes but is not limited to normal use, cancellation, and incomplete; step S3 specifically includes: sorting the first type of flight data set in chronological order; performing validity check on the first type of flight data set according to the flight status, when the flight status is canceled or incomplete, the corresponding flight data is invalid, and the corresponding flight data is deleted; within a preset time period, obtaining the user's positioning data, and extracting city information from the positioning data; arranging the extracted city information in date order to construct a city sequence diagram; comparing the city sequence diagram with the first type of flight data set after validity check in chronological order; when the city sequence diagram is compared with the first type of flight data set after validity check, the city information is compared with the first type of flight data set after validity check. When the data sets are completely consistent, the first type of flight data after validity verification is combined into a second type of flight data set; when there is a missing segment when comparing the first type of flight data set after validity verification with the city sequence diagram, the city information corresponding to the missing segment is obtained, and it is determined whether the straight-line distance between the city information corresponding to the missing segment reaches the distance threshold; when the straight-line distance between the city information corresponding to the missing segment reaches the distance threshold, the missing city information is supplemented to the first type of flight data set after validity verification to obtain the second type of flight data set; when the straight-line distance between the city information corresponding to the missing segment does not reach the distance threshold, the first type of flight data after validity verification is combined into a second type of flight data set.
[0061] In this embodiment, the first type of flight data set after validity verification is supplemented with missing city information to obtain a second type of flight data set, specifically including: when there is a direct flight between the city information corresponding to the missing segments, one flight segment is supplemented into the first type of flight data set after validity verification to obtain the second type of flight data set; when there is no direct flight between the city information corresponding to the missing segments, two flight segments are supplemented into the first type of flight data set after validity verification to obtain the second type of flight data set.
[0062] In this embodiment, the method for constructing the city sequence graph is specifically as follows:
[0063] Sort the flights obtained after step S2 according to their departure dates. The following is an example: Beijing-Shanghai on May 25; Shanghai-Chengdu on May 30; Chengdu-Guangzhou on June 1; Shenzhen-Beijing on June 10.
[0064] Insert the cities corresponding to the location data obtained in step S3 into the above sorting in order. In particular, if a city has location data for consecutive dates, only the earliest time of the earliest date is taken. The following is an example of the information obtained by location for the same user: Beijing on May 24; Chengdu on May 27; Shanghai on May 28; Beijing on June 16.
[0065] Arrange the above information in chronological order. For flights and locations that appear on the same date, sort them in chronological order. The city sequence of the above user is Beijing-Beijing-Shanghai-Chengdu-Shanghai-Shanghai-Chengdu-Guangzhou-Shenzhen-Beijing-Beijing;
[0066] After removing duplicate cities, the final city order is: Beijing-Shanghai-Chengdu-Shanghai-Chengdu-Guangzhou-Shenzhen-Beijing.
[0067] For cities in adjacent sorting, if the straight-line distance between cities exceeds the distance threshold, and if the airport closest to the current city (including the current city airport) has no existing flight itinerary connected, it is necessary to supplement the missing segments and increase the corresponding number of flights when counting the number of flights.
[0068] Specifically, for each missing segment, if there is a direct flight between two cities, it will be added once in the statistics; if there is no direct flight, it will be added twice.
[0069] S4. Perform a superposition calculation on the number of flights of the same user based on the second type of flight data set to obtain the flight frequency of the user within a preset time period.
[0070] In this embodiment, step S4 specifically includes:
[0071] The second type of flight data set is segmented according to the flight segments, and within a preset time period, the number of segmented segments is superimposed and calculated, and the result of the superimposed calculation of the number of segmented segments is used as the flight frequency of the user within the preset time period.
[0072] Reference Figure 1 and Figure 2 The present invention proposes a system for analyzing a user's historical flight frequency, comprising:
[0073] The data acquisition module is used to acquire the flight data set related to the same user according to the preset path within the preset time period. The flight data set is a collection of the user's historical flight records. A single flight data includes flight number, flight segment, departure time, arrival time, flight status, departure airport, and arrival airport;
[0074] A first processing module, used for preprocessing the flight data set to obtain a first type of flight data set;
[0075] A second processing module is used to obtain the user's positioning data, sort the first type of flight data set in chronological order, and perform validity verification and missing segment supplementation on the first type of flight data set based on the user's positioning data to obtain a second type of flight data set;
[0076] The data generation module is used to perform superposition calculation on the number of flights of the same user based on the second type of flight data set to obtain the flight frequency of the user within a preset time period.
[0077] In the specific working process of the method and system for analyzing the historical flight frequency of a user of this embodiment, within a preset time period, a flight data set related to the same user is obtained according to a preset path, the flight data set is a summary set of the user's historical flight records, and a single flight data includes flight number, flight segment, departure time, arrival time, flight status, departure airport, and arrival airport; the flight data set is preprocessed to obtain a first type of flight data set; the user's positioning data is obtained, the first type of flight data set is sorted in chronological order, and the first type of flight data set is validated and supplemented with missing segments based on the user's positioning data to obtain a second type of flight data set; the number of flights of the same user is superimposed and calculated based on the second type of flight data set to obtain the user's flight frequency within the preset time period.
[0078] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for analyzing a user's historical flight frequency, It is characterized in that The following steps are involved: S1. Acquire a flight data set related to the same user according to a preset path within a preset time period. The flight data set is a collection of the user's historical flight records. A single flight data includes flight number, flight segment, departure time, arrival time, flight status, departure airport, and arrival airport. S2, preprocessing the flight data set to obtain a first type of flight data set; S3, obtaining the user's positioning data, sorting the first type of flight data set in chronological order, and performing validity verification and missing segment supplementation on the first type of flight data set based on the user's positioning data to obtain a second type of flight data set; S4. Perform a superposition calculation on the number of flights of the same user based on the second type of flight data set to obtain the flight frequency of the user within a preset time period.
2. The method for analyzing a user's historical flight frequency according to claim 1, It is characterized in that The preset path specifically includes: According to the user's identity information, the user's ticket purchase data within a preset time period is obtained from the flight sales database, and the flight data is extracted from the ticket purchase data; Obtain the check-in data of the user within a preset time period from the flight check-in database according to the user's identity information, and extract the boarding data from the check-in data; The manual attention data of the user within a preset time period is obtained from the flight attention database according to the user's identity information, and the flight data is extracted from the manual attention data.
3. The method for analyzing the user's historical flight frequency according to claim 2, It is characterized in that Step S1 specifically includes: Acquire the flight data of the same user corresponding to each path according to the preset path within the preset time period; The flight data of the same user corresponding to each path are merged to form a flight data set related to the same user.
4. The method for analyzing a user's historical flight frequency according to claim 1, It is characterized in that The pre-processing specifically includes: Duplicate flights are eliminated by departure time. When there are multiple sets of flight data for the same departure time, a complete set of flight data is retained; The flight data set after duplicate flights are eliminated is sorted by departure time, and the data with departure time on the same day are analyzed according to a preset infeasible strategy, and the flight data that meets the preset infeasible strategy is eliminated to obtain a first type of flight data set.
5. The method for analyzing the user's historical flight frequency according to claim 4, It is characterized in that The preset infeasible strategies specifically include: When the departure times are on the same day and the actual available interval between connecting flights at the same airport is less than t0 minutes, the flight to be connected is considered an infeasible flight; When the departure time is on the same day and the arrival time of the previous flight is later than the boarding deadline of the next segment, the flight to be boarded is an unavailable flight; When the departure time is on the same day and the arrival airport of the previous flight and the departure airport of the next flight are not the same airport, determine whether the interval time T between the arrival time of the previous flight and the departure time of the next flight is lower than the sum of the journey time t2 and the set buffer time t2; when the interval time T is lower than the sum of the journey time t2 and the set buffer time t2, the next flight is an unfeasible flight.
6. The method for analyzing a user's historical flight frequency according to claim 1, It is characterized in that The flight status includes but is not limited to normal use, cancellation, and unfinished; step S3 specifically includes: sorting the first type of flight data set in chronological order; The validity of the first type of flight data set is checked according to the flight status. When the flight status is canceled or incomplete, the corresponding flight data is invalid and the corresponding flight data is deleted; Within a preset time period, obtain the user's location data and extract city information from the location data; Arrange the extracted city information in date order to construct a city sequence diagram; Compare the city sequence diagram with the first type of flight data set after validity verification in time sequence; When the city sequence diagram is completely consistent with the first type of flight data set after validity verification, the first type of flight data set after validity verification is collected as the second type of flight data set; When there is a missing segment in the comparison between the first type of flight data set after validity verification and the city sequence diagram, obtain the city information corresponding to the missing segment, and determine whether the straight-line distance between the city information corresponding to the missing segment reaches the distance threshold; When the straight-line distance between the city information corresponding to the missing segments reaches the distance threshold, the missing city information is supplemented to the first type of flight data set after validity verification to obtain the second type of flight data set; When the straight-line distance between the city information corresponding to the missing segment does not reach the distance threshold, the first type of flight data set after validity verification is collected as the second type of flight data set.
7. The method for analyzing a user's historical flight frequency according to claim 6, It is characterized in that The step of supplementing the missing city information of the first type of flight data set after validity verification to obtain the second type of flight data set specifically includes: When there is a direct flight between the cities corresponding to the missing segments, a segment is added to the first type of flight data set after validity verification to obtain a second type of flight data set; When there is no direct flight between the city information corresponding to the missing segment, two flight segments are added to the first type of flight data set after validity verification to obtain the second type of flight data set.
8. The method for analyzing a user's historical flight frequency according to claim 1, It is characterized in that Step S4 specifically includes: The second type of flight data set is segmented according to the flight segments, and within a preset time period, the number of segmented segments is superimposed and calculated, and the result of the superimposed calculation of the number of segmented segments is used as the flight frequency of the user within the preset time period.
9. A system for analyzing a user's historical flight frequency, It is characterized in that include: The data acquisition module is used to acquire the flight data set related to the same user according to the preset path within the preset time period. The flight data set is a collection of the user's historical flight records. A single flight data includes flight number, flight segment, departure time, arrival time, flight status, departure airport, and arrival airport; A first processing module, used for preprocessing the flight data set to obtain a first type of flight data set; A second processing module is used to obtain the user's positioning data, sort the first type of flight data set in chronological order, and perform validity verification and missing segment supplementation on the first type of flight data set based on the user's positioning data to obtain a second type of flight data set; The data generation module is used to perform superposition calculation on the number of flights of the same user based on the second type of flight data set to obtain the flight frequency of the user within a preset time period.
