Ticket buying recommendation method and system
By obtaining the user's departure and departure date in the train ticket query system, querying and preprocessing the train data of ticketed destinations, and sorting and recommendations based on the destination popularity and user preferences, the problem that the existing system cannot meet user needs when ticket sources are tight is solved, and a higher ticket purchase success rate and travel flexibility are achieved.
Patent Information
- Application Number
- CN202411773185.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-21
AI Technical Summary
The existing train ticket query system cannot meet users' travel needs during times of tight ticket sources, lacks intelligent recommendation functions, and cannot quickly find the right train.
By obtaining the user's departure and departure date, querying the first train data of all destinations with tickets, pre-processing and sorting, and combining the destination popularity and user preferences, the most suitable trains are recommended.
It improves the success rate of ticket purchase, increases travel flexibility, optimizes users' ticket purchase experience, and effectively makes use of limited ticket sources.
Smart Images

Figure CN119671680A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a ticket purchase recommendation method and system. Background Art
[0002] In the existing train ticket query system, users usually need to manually enter information such as the departure place, destination, and departure date. The existing ticket purchase system mainly relies on users to enter specific departure places and destinations to query train numbers. This method may result in no tickets when the ticket supply is tight. Users' needs are often flexible. During holidays or leisure time, they are more concerned about whether they can travel rather than a specific destination. Therefore, the existing ticket purchase system cannot meet the travel needs of users during periods of tight ticket supply, lacks intelligent recommendation functions, and cannot meet the needs of users to quickly find suitable train numbers. Summary of the invention
[0003] In order to solve the technical problems existing in the background technology, the present invention proposes a ticket purchase recommendation method and system.
[0004] A ticket purchase recommendation method proposed by the present invention comprises:
[0005] Get the departure place and departure date that the user needs to query, and query the first train data of all destinations with tickets based on the departure place and departure date;
[0006] Preprocessing the first train number data to obtain second train number data;
[0007] Obtain the destination popularity corresponding to all destinations with tickets, and sort the second train data according to the preset recommendation strategy to obtain the third train data;
[0008] The third train data is pushed to the user end to complete the ticket purchase recommendation.
[0009] Preferably, the preprocessing specifically includes:
[0010] For the train data with the same destination in the first train data, the corresponding train length and fare are obtained;
[0011] The train with the shortest journey or the lowest fare among the train data for the same destination is retained;
[0012] The train number data retained in the first train number data is used as the second train number data.
[0013] Preferably, the destination popularity refers to the number of searches corresponding to the destination in the system.
[0014] Preferably, the preset recommendation strategy specifically includes:
[0015] The driving time, destination heat and fare of each train in the second train data are standardized to map the driving time, destination heat and fare to a range of 0-1 to obtain a driving time mapping value, a destination heat mapping value and a fare mapping value;
[0016] Obtain the weights corresponding to the driving time, destination popularity and fare, and calculate the comprehensive weighted score of each destination based on the driving time mapping value, destination popularity mapping value, fare mapping value and the weights corresponding to the driving time, destination popularity and fare;
[0017] The second train data are sorted in descending order according to the comprehensive weighted scores to obtain the third train data.
[0018] Preferably, the driving time, destination heat and fare of each train in the second train data are standardized to map the driving time, destination heat and fare to a range of 0-1 to obtain a driving time mapping value, a destination heat mapping value and a fare mapping value, specifically including:
[0019] The driving time mapping value calculation process is specifically as follows:
[0020] T = (Tmax-t) / (Tmax-Tmin);
[0021] Among them, T is the driving time mapping value; Tmax is the preset maximum driving time; Tmin is the preset minimum driving time; t is the driving time corresponding to the train number;
[0022] The destination heat map value calculation process is specifically as follows:
[0023] H = (Hmax-h) / (Hmax-Hmin);
[0024] Wherein, H is the destination heat mapping value; Hmax is the maximum destination heat of the preset destination; Hmin is the minimum destination heat of the preset destination; h is the current destination heat;
[0025] The fare mapping value calculation process is specifically as follows:
[0026] F = (Fmax-f) / (Fmax-Fmin);
[0027] Among them, F is the fare-to-duration mapping value; Fmax is the maximum fare of the preset destination; Fmin is the minimum fare of the preset destination; and f is the fare of the current destination.
[0028] Preferably, the calculating of the comprehensive weighted score of each destination specifically includes:
[0029] S=ω 1T+ω 2 H+ω 3 F;
[0030] Among them, T is the driving time mapping value; H is the destination heat mapping value; F is the fare time mapping value; ω 1 is the weight corresponding to the travel duration; ω 2 is the weight corresponding to the destination heat; ω 3 is the weight corresponding to the fare.
[0031] Preferably, the weights corresponding to the travel time, destination popularity and fare are as follows: the weight corresponding to the travel time is 50%, the weight corresponding to the destination popularity is 30%, and the weight corresponding to the fare is 20%.
[0032] The present invention provides a ticket purchase recommendation system, comprising:
[0033] The data query module is used to obtain the departure place and departure date that the user needs to query, and query the first train data of all destinations with tickets based on the departure place and departure date;
[0034] A data preprocessing module, used for preprocessing the first train number data to obtain the second train number data;
[0035] The data processing module is used to obtain the destination popularity corresponding to all the destinations with tickets, and sort the second train data according to the preset recommendation strategy to obtain the third train data;
[0036] The data recommendation module is used to push the third train data to the user end to complete the ticket purchase recommendation.
[0037] In the present invention, the proposed ticket purchase recommendation method and system obtain the departure place and departure date that the user needs to query, and query the first train data of all destinations with tickets based on the departure place and departure date; pre-process the first train data to obtain the second train data; obtain the destination popularity corresponding to all destinations with tickets, sort the second train data according to the preset recommendation strategy to obtain the third train data; push the third train data to the user end to complete the ticket purchase recommendation. The user does not need to care about the specific destination, the system automatically recommends the ticket plan, which greatly improves the success rate of ticket purchase. Users can choose high-popularity destinations according to their personal preferences, or destinations that are close to them and have cheap fares, to increase travel flexibility. Users can directly find ticket plans through intelligent recommendation and screening under limited ticket sources, which optimizes the user's ticket purchase experience. The system can make more effective use of limited ticket sources and improve overall resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1A schematic diagram of the structure of an implementation of a ticket purchase recommendation method and system proposed by the present invention;
[0039] Figure 2 A schematic diagram of the structure of an implementation of a ticket purchase recommendation method and system proposed by the present invention. DETAILED DESCRIPTION
[0040] Reference Figure 1 and Figure 2 The present invention proposes a ticket purchase recommendation method, comprising the following steps:
[0041] S1. Obtain the departure place and departure date that the user needs to query, and query the first train data of all destinations with tickets based on the departure place and departure date.
[0042] In this embodiment, the user only needs to enter the departure place and departure date, and the system will automatically query all destinations and find the destinations with tickets.
[0043] In this embodiment, the remaining tickets are monitored in real time. According to the departure place and departure date input by the user, the train data from the departure place to all cities on the user's departure date are immediately queried. If there are trains with remaining tickets from the departure place to the destination city, the shortest journey length and the lowest fare among the trains with tickets are recorded, and all the destinations with tickets after the query from the departure place to all cities are displayed.
[0044] S2. Preprocess the first train number data to obtain second train number data.
[0045] In this embodiment, the preprocessing specifically includes: obtaining the corresponding train length and ticket price for the train data with the same destination in the first train data; retaining the train with the shortest train length or the lowest ticket price in the train data with the same destination; and using the train data retained in the first train data as the second train data.
[0046] S3. Obtain the destination heat corresponding to all the destinations with tickets, and sort the second train data according to the preset recommendation strategy to obtain the third train data.
[0047] In this embodiment, the destination popularity specifically refers to the number of searches corresponding to the destination in the system.
[0048] In this embodiment, the preset recommendation strategy specifically includes: standardizing the travel time, destination popularity and ticket price of each train in the second train data to map the travel time, destination popularity and ticket price to the range of 0-1, and obtain the travel time mapping value, destination popularity mapping value and ticket price mapping value; obtaining the weights corresponding to the travel time, destination popularity and ticket price, and calculating the comprehensive weighted score of each destination based on the travel time mapping value, destination popularity mapping value, ticket price mapping value and the weights corresponding to the travel time, destination popularity and ticket price; sorting the second train data in order of the comprehensive weighted score from high to low to obtain the third train data.
[0049] In this embodiment, the driving time mapping value calculation process is specifically as follows:
[0050] T = (Tmax-t) / (Tmax-Tmin);
[0051] Among them, T is the driving time mapping value; Tmax is the preset maximum driving time; Tmin is the preset minimum driving time; t is the driving time corresponding to the train number. The shorter the time, the larger the value after mapping.
[0052] The destination heat map value calculation process is as follows:
[0053] H = (Hmax-h) / (Hmax-Hmin);
[0054] Among them, H is the destination heat mapping value; Hmax is the maximum destination heat of the preset destination; Hmin is the minimum destination heat of the preset destination; h is the current destination heat. The more searches, the larger the value after mapping.
[0055] The specific calculation process of fare mapping value is as follows:
[0056] F = (Fmax-f) / (Fmax-Fmin);
[0057] Among them, F is the fare-duration mapping value; Fmax is the maximum fare of the preset destination; Fmin is the minimum fare of the preset destination; and f is the fare of the current destination. The lower the fare, the larger the value after mapping.
[0058] In this embodiment, the comprehensive weighted score of each destination is calculated, specifically including:
[0059] S=ω 1 T+ω 2 H+ω 3 F;
[0060] Among them, T is the driving time mapping value; H is the destination heat mapping value; F is the fare time mapping value; ω 1is the weight corresponding to the travel duration; ω 2 is the weight corresponding to the destination heat; ω 3 is the weight corresponding to the fare.
[0061] Specifically, the weights corresponding to the travel time, destination popularity and fare are as follows: the weight corresponding to the travel time is 50%, the weight corresponding to the destination popularity is 30%, and the weight corresponding to the fare is 20%.
[0062] S4. Push the third train data to the user terminal to complete the ticket purchase recommendation.
[0063] In this embodiment, the system will recommend a direct destination with tickets to the user, and display the ticketed train information from the departure point to the destination, including the earliest departure time, earliest arrival time, lowest fare, lowest fare seat, etc. The third train data can be the top 50 destinations with higher recommendation scores.
[0064] Specifically, it also includes: after the user selects any destination, the detailed train list is displayed, and all available trains from the departure point to the destination are fully displayed, and the user can then purchase the ticket. When the user selects the destination to purchase a ticket, the user can filter the destination by travel time, such as destinations that can be reached within 1 hour, destinations that can be reached within 1-2 hours, etc.; for users who are more sensitive to price, it is also supported to filter the recommended options by price, such as destinations within 100 yuan, destinations between 100-200 yuan, etc. to filter the destination by price.
[0065] Reference Figure 1 and Figure 2 The present invention proposes a ticket purchase recommendation system, comprising:
[0066] The data query module is used to obtain the departure place and departure date that the user needs to query, and query the first train data of all destinations with tickets based on the departure place and departure date;
[0067] A data preprocessing module, used for preprocessing the first train number data to obtain the second train number data;
[0068] The data processing module is used to obtain the destination popularity corresponding to all the destinations with tickets, and sort the second train data according to the preset recommendation strategy to obtain the third train data;
[0069] The data recommendation module is used to push the third train data to the user end to complete the ticket purchase recommendation.
[0070] 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 ticket purchase recommendation method, characterized in that: include: Get the departure place and departure date that the user needs to query, and query the first train data of all destinations with tickets based on the departure place and departure date; Preprocessing the first train number data to obtain second train number data; Obtain the destination popularity corresponding to all destinations with tickets, and sort the second train data according to the preset recommendation strategy to obtain the third train data; The third train data is pushed to the user end to complete the ticket purchase recommendation.
2. The ticket purchase recommendation method according to claim 1, characterized in that: The pre-processing specifically includes: For the train data with the same destination in the first train data, the corresponding train length and fare are obtained; The train with the shortest journey or the lowest fare among the train data for the same destination is retained; The train number data retained in the first train number data is used as the second train number data.
3. The ticket purchase recommendation method according to claim 1, characterized in that: The destination popularity specifically refers to the number of searches corresponding to the destination in the system.
4. The ticket purchase recommendation method according to claim 1, characterized in that: The preset recommendation strategy specifically includes: The driving time, destination heat and fare of each train in the second train data are standardized to map the driving time, destination heat and fare to a range of 0-1 to obtain a driving time mapping value, a destination heat mapping value and a fare mapping value; Obtain the weights corresponding to the driving time, destination popularity and fare, and calculate the comprehensive weighted score of each destination based on the driving time mapping value, destination popularity mapping value, fare mapping value and the weights corresponding to the driving time, destination popularity and fare; The second train data are sorted in descending order according to the comprehensive weighted scores to obtain the third train data.
5. The ticket purchase recommendation method according to claim 4, characterized in that: The driving time, destination heat and fare of each train in the second train data are standardized to map the driving time, destination heat and fare to a range of 0-1 to obtain a driving time mapping value, a destination heat mapping value and a fare mapping value, specifically including: The driving time mapping value calculation process is specifically as follows: T = (Tmax-t) / (Tmax-Tmin); Among them, T is the driving time mapping value; Tmax is the preset maximum driving time; Tmin is the preset minimum driving time; t is the driving time corresponding to the train number; The destination heat map value calculation process is specifically as follows: H = (Hmax-h) / (Hmax-Hmin); Wherein, H is the destination heat mapping value; Hmax is the maximum destination heat of the preset destination; Hmin is the minimum destination heat of the preset destination; h is the current destination heat; The fare mapping value calculation process is specifically as follows: F = (Fmax-f) / (Fmax-Fmin); Among them, F is the fare-to-duration mapping value; Fmax is the maximum fare of the preset destination; Fmin is the minimum fare of the preset destination; and f is the fare of the current destination.
6. The ticket purchase recommendation method according to claim 5, characterized in that: The calculation of the comprehensive weighted score for each destination includes: S = ω1T + ω2H + ω3F; Among them, T is the driving time mapping value; H is the destination heat mapping value; F is the fare time mapping value; ω1 is the weight corresponding to the travel time; ω2 is the weight corresponding to the destination heat; ω3 is the weight corresponding to the fare.
7. The ticket purchase recommendation method according to claim 4, characterized in that: The weights corresponding to the driving time, destination popularity and fare are specifically: the weight corresponding to the driving time is 50%, the weight corresponding to the destination popularity is 30%, and the weight corresponding to the fare is 20%.
8. A ticket purchase recommendation system, characterized in that: include: The data query module is used to obtain the departure place and departure date that the user needs to query, and query the first train data of all destinations with tickets based on the departure place and departure date; A data preprocessing module, used for preprocessing the first train number data to obtain the second train number data; The data processing module is used to obtain the destination popularity corresponding to all the destinations with tickets, and sort the second train data according to the preset recommendation strategy to obtain the third train data; The data recommendation module is used to push the third train data to the user end to complete the ticket purchase recommendation.