Intelligent filtering method and device for near-term itinerary, electronic equipment and storage medium

By using a dynamic rule engine and a key spatiotemporal feature extraction mechanism, the problems of verification lag and coarse threshold control in traditional itinerary recommendation systems have been solved, enabling refined management of near-expiration itineraries and improving user experience and resource utilization efficiency.

CN122332646APending Publication Date: 2026-07-03BEIJING HESI HUIZHI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610426549.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-02
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Traditional trip recommendation and management systems suffer from issues such as delayed verification and lack of refined threshold control in terms of timeliness, resulting in poor user experience and wasted resources.

Method used

By introducing a dynamic rule engine and a key spatiotemporal feature extraction mechanism, the system receives user query conditions, generates an initial candidate set, extracts key spatiotemporal features, calls the dynamic rule engine to determine the target threshold, calculates the remaining effective time window, performs comparison filtering and reordering, constructs differentiated threshold configurations, and dynamically corrects them in combination with real-time context environment parameters, thereby achieving refined and real-time management.

Benefits of technology

It significantly improves the accuracy and intelligence of trip data processing, accurately filters high-risk near-expiration trips, optimizes recommendation sorting, improves the efficiency of obtaining effective trip information and recommendation conversion rate, and ensures a smooth user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332646A_ABST
    Figure CN122332646A_ABST
Patent Text Reader

Abstract

The application provides a kind of intelligent filtering method, device, electronic equipment and storage medium for imminent journey, in the method, by introducing dynamic rule engine and key space-time feature extraction mechanism, the fine, real-time management of imminent journey is realized, effectively solve the technical bottleneck of traditional system check lag and threshold control extensive, not only significantly improve the accuracy and intelligent level of journey data processing-Through based on journey type identification dynamic determination safety buffer time window, and combining residual effective time window is compared in real time, to accurately filter high-risk imminent journey and optimize recommended sorting, avoid the waste of resources or recommendation failure caused by static threshold;At the same time, relying on the adaptability and personalized service ability of difference threshold configuration, the acquisition efficiency and recommendation conversion rate of effective journey information are improved finally while guaranteeing the fluency of user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet data processing technology, and in particular to an intelligent filtering method, apparatus, electronic device, and storage medium for near-expiration schedules. Background Technology

[0002] In applications of corporate travel management (TMC), online travel agency (OTA), and various intelligent itinerary assistant platforms, users or company employees need to book complex itineraries that include multiple resources such as air tickets, train tickets, hotels, and car rentals. These itinerary elements (SKUs) are highly time-sensitive, and their inventory status is greatly affected by time. For example, a flight typically closes check-in and ticket sales 45 minutes before departure, and a train ticket may stop online refunds, changes, or bookings 30 minutes before departure. The scenarios involve not only recommendations and displays "before booking" but also itinerary management "after booking" but before travel. Especially with lengthy corporate approval processes, the awkward situation often arises where the original flight has already departed or expired by the time itinerary approval is granted.

[0003] Current itinerary recommendation and management systems primarily rely on backend inventory interfaces (GDS or direct airline connections) to ensure timely processing. This approach has the following main drawbacks: Validation lag and resource waste: Traditional recommendation engines, in the initial screening and re-ranking stages, mainly focus on price, duration, and preference matching, often ignoring the subtle difference between the "current time and the deadline." Real-time validation is usually treated as a "watchdog" in the final order placement step. This can lead to situations where users see their desired flights in the browsing list, but when they try to book, they are prompted that "tickets are no longer available," which greatly damages the user experience and also wastes the system's computing resources and recommendation slots.

[0004] Lack of fine-grained threshold control: Existing systems typically use hard-coded methods to set deadlines (e.g., uniformly set to 1 hour before departure), which cannot set differentiated dynamic thresholds for different modes of transportation (airplanes require security checks, which take a long time; high-speed rail only requires entering the station, which takes a short time; ride-hailing services are highly instantaneous). This results in filtering logic that is either too aggressive (falsely deleting available trips) or too lenient (missing invalid trips).

[0005] In summary, traditional itinerary recommendation and management suffer from technical problems such as verification lag and lack of refined threshold control. Summary of the Invention

[0006] In view of this, the purpose of the present invention is to provide an intelligent filtering method, device, electronic device and storage medium for near-expiration trips, so as to alleviate the technical problems of lagging verification and lack of fine threshold control in traditional trip recommendation and management.

[0007] In a first aspect, the present invention provides an intelligent filtering method for near-term travel, comprising: The system receives a retrieval request from a user with query conditions, performs a preliminary retrieval of the inventory data source based on the query conditions, generates an initial candidate set, and extracts the key spatiotemporal features of each trip element in the initial candidate set. The key spatiotemporal features include at least the trip type identifier and the absolute deadline. The dynamic rule engine is invoked to determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, and the target threshold is used as a safety buffer time window; Obtain the current real-time time and calculate the time difference between the current real-time time and the absolute cutoff time, which is used as the remaining valid time window; The remaining valid time window is compared with the safety buffer time window, and the trip elements in the initial candidate set are filtered and reordered according to the comparison results to obtain an optimized trip recommendation list.

[0008] Further, the itinerary elements in the initial candidate set are filtered and reordered based on the comparison results, including: If the remaining valid time window is less than the safety buffer time window, the travel elements corresponding to the remaining valid time window are directly removed from the initial candidate set. If the remaining valid time window is greater than the safety buffer time window but less than the preset warning threshold, the weight of the corresponding trip element is reduced in the ranking model, and a countdown label indicating the approaching deadline is added to the trip element in the trip recommendation list.

[0009] Furthermore, the dynamic rule engine is invoked to determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, including: Construct a hierarchical configuration table that includes a global default layer, a tenant-customized layer, and a specific SKU layer; Based on the current user's tenant identifier and the trip type identifier, execute the hierarchical matching logic: In the specific SKU layer, query whether there is an independent configuration for the identifier of the trip element. If it exists, use it as the target threshold. If not, query the tenant customization layer to see if there is a configuration for the tenant identifier and the trip type identifier. If there is, use it as the target threshold. If it still does not exist, then the general threshold in the global default layer is used as the target threshold.

[0010] Furthermore, the dynamic rule engine is invoked to determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, including: Obtain real-time contextual parameters of the departure point of the trip, wherein the real-time contextual parameters include: weather conditions or traffic control information; The obtained differential threshold is dynamically corrected based on the real-time context environment parameters, and then the corresponding target threshold is determined from the dynamically corrected differential threshold based on the trip type identifier.

[0011] Furthermore, the method also includes: Based on the absolute deadline of the trip elements, an expiration check task is delivered to the distributed delayed message queue. When the time reaches the absolute deadline, the consumer process is activated to query the order status corresponding to the trip element; If an order is detected to be approved but not booked, it is considered to be at risk of expiration and the risk handling process is triggered.

[0012] Furthermore, triggering the risk management process includes: Extract the departure and destination information of the original expired itinerary; Call the search interface to retrieve available alternative routes after the current time; Generate a link to suggest replacement trips that includes the available alternative trips, and push it to the user's terminal via multiple channels.

[0013] Furthermore, the key spatiotemporal features also include: the geographical location features of the departure point of the trip, and calculating the time difference between the current real-time time and the absolute cutoff time, including: Perform time zone analysis on the geographical location features to determine the target time zone offset corresponding to the departure point of the trip; Based on the target time zone offset, the absolute cutoff time is converted into a standard timestamp, and the current real-time time is aligned with the standard timestamp in the time zone. The time difference is calculated based on the aligned time data.

[0014] Secondly, the present invention also provides an intelligent filtration device for near-term travel, comprising: The preliminary retrieval and extraction unit is used to receive a retrieval request from a user carrying query conditions, perform a preliminary retrieval of the inventory data source according to the query conditions, generate an initial candidate set, and extract the key spatiotemporal features of each trip element in the initial candidate set, wherein the key spatiotemporal features include at least the trip type identifier and the absolute deadline time. The determining unit is used to call the dynamic rule engine, determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, and use the target threshold as a safety buffer time window; The calculation unit is used to obtain the current real-time time and calculate the time difference between the current real-time time and the absolute cutoff time point as the remaining effective time window; The comparison unit is used to compare the remaining valid time window with the safety buffer time window, and filter and reorder the trip elements in the initial candidate set according to the comparison result to obtain an optimized trip recommendation list.

[0015] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method described in the first aspect.

[0016] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method described in the first aspect.

[0017] This invention provides an intelligent filtering method for near-expiry trips, comprising: receiving a user's retrieval request with query conditions; performing a preliminary retrieval of inventory data sources based on the query conditions to generate an initial candidate set; and extracting key spatiotemporal features of each trip element in the initial candidate set, wherein the key spatiotemporal features include at least a trip type identifier and an absolute deadline; invoking a dynamic rule engine to determine a corresponding target threshold from a preset differentiated threshold configuration based on the trip type identifier, and using the target threshold as a safety buffer time window; obtaining the current real-time time, calculating the time difference between the current real-time time and the absolute deadline as the remaining effective time window; comparing the remaining effective time window with the safety buffer time window, and filtering and reordering the trip elements in the initial candidate set based on the comparison result to obtain an optimized trip recommendation list. As described above, the intelligent filtering method for near-expiry trips of this invention achieves refined and real-time management of near-expiry trips by introducing a dynamic rule engine and a key spatiotemporal feature extraction mechanism. This effectively solves the technical bottlenecks of traditional systems, such as lagging verification and coarse threshold control. It significantly improves the accuracy and intelligence of trip data processing—by dynamically determining the safety buffer time window based on the trip type identifier and comparing it in real time with the remaining valid time window, it accurately filters high-risk near-expiry trips and optimizes the recommendation ranking, avoiding resource waste or recommendation failures caused by static thresholds. At the same time, relying on differentiated threshold configuration, it greatly enhances the adaptability and personalized service capabilities of the trip recommendation system, ultimately improving the efficiency of obtaining effective trip information and the recommendation conversion rate while ensuring a smooth user experience. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating an intelligent filtering method for near-expiration travel arrangements provided in an embodiment of the present invention; Figure 2 A schematic diagram of an intelligent filtration device for near-expiration processes provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Traditional itinerary recommendation and management systems suffer from lag in validation and lack refined threshold control.

[0022] Based on this, the intelligent filtering method for near-expiry trips in this invention introduces a dynamic rule engine and a key spatiotemporal feature extraction mechanism to achieve refined and real-time management of near-expiry trips. This effectively solves the technical bottlenecks of traditional systems, such as lagging verification and coarse threshold control. It not only significantly improves the accuracy and intelligence level of trip data processing—by dynamically determining the safety buffer time window based on the trip type identifier and comparing it in real time with the remaining valid time window, high-risk near-expiry trips are accurately filtered and the recommendation ranking is optimized, avoiding resource waste or recommendation failures caused by static thresholds; at the same time, relying on differentiated threshold configuration, the adaptability and personalized service capabilities of the trip recommendation system are greatly enhanced. Ultimately, while ensuring a smooth user experience, the efficiency of obtaining effective trip information and the recommendation conversion rate are improved.

[0023] To facilitate understanding of this embodiment, a detailed description of an intelligent filtering method for near-expiration travel disclosed in this embodiment of the invention will be provided first.

[0024] Example 1: According to an embodiment of the present invention, an embodiment of an intelligent filtering method for near-expiration schedules is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0025] Figure 1 This is a flowchart of an intelligent filtering method for near-expiration travel according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps: Step S102: Receive the user's retrieval request with query conditions, perform a preliminary retrieval of the inventory data source according to the query conditions, generate an initial candidate set, and extract the key spatiotemporal features of each trip element in the initial candidate set. The key spatiotemporal features include at least the trip type identifier and the absolute deadline time. In this step, the system first acts as the interface between the user and the underlying data source. After the user enters their departure point, destination, and travel time on the front-end interface, the system receives the search request. To achieve efficient searching, the system typically uses an adapter pattern to connect to multiple inventory data sources (such as the GDS global distribution system, airline direct connection interfaces, 12306 interface, etc.). The initial search returns a massive amount of raw itinerary data (SKUs, i.e., itinerary elements in the initial candidate set), which often contains noise and is inconsistently formatted.

[0026] To support subsequent intelligent filtering, the system must perform feature engineering on this raw data. Specifically, the system parses the metadata of each trip element and extracts "key spatiotemporal features." The "trip type identifier" distinguishes the attributes of the resource, such as whether it's a "domestic flight," "international flight," "high-speed rail," or "hotel." The "absolute cutoff time" is the critical point at which the trip element expires, such as the scheduled departure time of a flight, the departure time of a high-speed rail, the latest check-in time of a hotel, or the last check-in time for tickets. Extracting these features transforms unstructured business rules into a computer-computable mathematical model.

[0027] Step S104: Invoke the dynamic rule engine, determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, and use the target threshold as a safety buffer time window; After obtaining the trip type identifier, the system needs to determine whether the trip is "in time". Traditional hard-coding methods cannot adapt to complex business scenarios, so this invention designs a dynamic rule engine. This engine does not rely on fixed constants, but maintains a hot-updateable configuration library.

[0028] The system performs a matching query in the configuration database based on the "trip type identifier" extracted in step S102. For example, for the "domestic flight" type, the system may match a preset threshold (such as 45 minutes). This matched value is the "target threshold." This invention directly defines this target threshold as a "safety buffer time window." This means that users must complete their booking at least 45 minutes before flight departure, otherwise they will face the risk of being unable to check in. Through this dynamic invocation method, the system achieves decoupling between business rules and code logic, allowing operators to adjust rules without restarting the service.

[0029] Step S106: Obtain the current real-time time and calculate the time difference between the current real-time time and the absolute cutoff time, which will be used as the remaining valid time window; To determine whether the current itinerary is in a "near-expiration" state, the system needs a real-time reference frame. The system obtains the high-precision real-time time of the server via NTP (Network Time Protocol). Subsequently, the system performs a subtraction operation: subtracting the "current real-time time" from the "absolute cutoff time".

[0030] It's important to note that these two times are only comparable if they are within the same time zone standard. The calculated time difference represents the user's actual remaining operating time, which this invention defines as the "remaining valid time window." For example, if a flight departs at 10:00 and the current time is 09:20, then the remaining valid time window is 40 minutes.

[0031] Step S108: Compare the remaining valid time window with the safety buffer time window, and filter and reorder the trip elements in the initial candidate set according to the comparison results to obtain the optimized trip recommendation list.

[0032] This is a crucial step in the decision output. The system compares the "remaining effective time window" calculated in step S106 with the "safety buffer time window" obtained in step S104.

[0033] If the remaining valid time window is less than the safety buffer time window, it indicates that the trip is already in a high-risk state, and the user will not have enough time to complete the booking or travel; if the remaining valid time window is greater than the safety buffer time window, it indicates that the trip is safe. Based on the comparison results, the system "prunes" and "sorts" the initial candidate set. It removes high-risk invalid trips or downgrades their weight, ultimately generating a recommendation list containing only "available and safe" trips and returning it to the user. This step fundamentally eliminates the possibility of users seeing "ghost flights" (i.e., flights that are unbookable at the last minute), improving the accuracy of recommendations.

[0034] Through the above steps, this invention constructs a closed-loop system from data access, rule matching, time calculation to final decision-making, realizing intelligent and real-time trip recommendation.

[0035] The above provides a brief overview of the intelligent filtering method for near-expiration travel of the present invention. The specific details involved are described in detail below.

[0036] In an optional embodiment of the present invention, a dynamic rule engine is invoked to determine the corresponding target threshold from a preset differentiated threshold configuration based on the trip type identifier, specifically including the following steps: (1) Construct a hierarchical configuration table that includes a global default layer, a tenant-customized layer, and a specific SKU layer; This embodiment designs a hierarchical rule model to adapt to the complex business needs of corporate travel (TMC). The model comprises a three-layer architecture: Global Default Layer: Sets a general security threshold that applies to all scenarios without special configuration. For example, it defines a default security buffer time of 25 minutes for all "domestic high-speed rail" routes.

[0037] Tenant Customization Layer: Targeted to specific enterprise customers (tenants). For example, a large enterprise (tenant ID: Alibaba) has signed a VIP agreement with a ticketing platform, granting it fast-track access and shorter booking deadlines. This layer allows configuration of specific thresholds for that tenant ID (e.g., 15 minutes for domestic high-speed rail).

[0038] SKU-specific layer: This layer targets specific resource instances. For example, thresholds can be configured independently of general rules for a particular early morning flight or a flight on a specific busy route.

[0039] (2) Based on the current user's tenant identifier and trip type identifier, execute the hierarchical matching logic: In a specific SKU layer, query whether there is an independent configuration for the identifier of the trip element. If it exists, use it as the target threshold. If not, query the tenant customization layer to see if there is a configuration for the tenant identifier and trip type identifier. If it exists, use it as the target threshold. If it still does not exist, then the universal threshold in the global default layer is used as the target threshold.

[0040] Specifically, when the system needs to determine the target threshold, the following priority logic is executed: SKU-specific query: The system first checks whether a unique configuration exists for a specific flight based on the unique identifier (SKU_ID) of the itinerary element. If it exists (e.g., the flight requires a 60-minute advance arrival time due to special security requirements), it is directly used as the target threshold.

[0041] Tenant-customized layer query: If no match is found for a specific SKU layer, the system will then query based on the current user's "Tenant ID" and "Trip Type ID". If the tenant has special configurations for this type of trip (e.g., Alibaba employees can book high-speed rail tickets in just 15 minutes), these will be used as the target threshold.

[0042] Global default layer call: If there are no matching items in the above two layers, the general threshold in the global default layer is called as a fallback solution.

[0043] In an optional embodiment of the present invention, a dynamic rule engine is invoked to determine the corresponding target threshold from a preset differentiated threshold configuration based on the trip type identifier, specifically including the following steps: (1) Obtain the real-time contextual parameters of the departure point of the trip, wherein the real-time contextual parameters include: weather conditions or traffic control information; Specifically, the system not only relies on static business rules but also incorporates real-time external environmental data. The system accesses data from meteorological services or traffic management departments via API interfaces. For example, the system may detect a red alert for heavy rain at the departure point of the trip, or that the airport has issued a flow control notice.

[0044] (2) The obtained differential threshold is dynamically corrected according to the real-time context environment parameters, and then the corresponding target threshold is determined from the dynamically corrected differential threshold based on the trip type identifier.

[0045] Specifically, when severe weather or traffic control is detected, the system triggers a dynamic correction algorithm. For example, the original safe buffer time for "domestic flights" is 45 minutes, but the system automatically adds a "correction factor" (such as adding 30 minutes) based on the current rainstorm warning level. In this way, the original 45 minutes is corrected to 75 minutes.

[0046] The above "dynamic correction" can also be upgraded from a simple "threshold + fixed number of minutes" to a nonlinear weighted correction model based on multidimensional environmental factors.

[0047] This algorithm not only considers a single weather factor, but also introduces risk coefficients and congestion indices, and converts them into time correction amounts, thus demonstrating the "intelligence" and "refinement" of the algorithm.

[0048] The dynamic threshold correction algorithm based on environmental factor weighting is as follows: Core design concept: We abandon the traditional, crude approach of setting the corrected threshold as the original threshold plus a fixed constant.

[0049] A composite calculation model based on "environmental risk coefficient × basic threshold + traffic congestion delay" is adopted. That is:

[0050] in, and These are coefficients that change dynamically in real time, enabling the system to adaptively increase the safety buffer time window according to the severity of the situation. This represents the threshold for differentiation.

[0051] In practice, the real-time environmental parameters are first quantized and mapped: First, unstructured environmental parameters (weather, traffic) are converted into numerical factors that can be calculated by computers.

[0052] Weather condition correction factor ( Calculation of ) The system maintains a "weather risk mapping table." It considers not only weather phenomena but also visibility and wind speed, as detailed below:

[0053] in, This represents the baseline risk value for weather codes, a benchmark risk value set based on the type of weather phenomenon. It represents the inherent hazard level of a certain weather condition under "standard conditions" and is a constant obtained from a lookup table. The system internally maintains a "weather code-risk value mapping table." Visibility level is a tiered, quantified numerical value. Visibility distance (unit: meters) is typically divided into several levels and assigned corresponding scores. Wind force level is a quantified numerical value based on wind speed. It converts real-time wind speed (unit: meters per second or wind speed class) into a risk score. This represents the attenuation coefficient, a weighting factor. It determines the proportion of the two dynamic factors, "visibility and wind speed," in the total risk and is a constant that can be manually configured or tuned by machine learning. The optimal value is usually determined through historical data analysis (e.g., analyzing the relationship between rainy day car accident rates and visibility).

[0054] Traffic control / congestion correction factor ( and Calculation of ) Connect to Gaode / Baidu traffic APIs to obtain real-time traffic conditions around your departure point.

[0055] Algorithm logic: Coefficient part ( ): Based on the congestion delay index (K value, an "input parameter" that can be obtained through a public interface).

[0056] K<1.5 (Unobstructed):

[0057] 1.5≤K<2.5 (slow-moving):

[0058] K≥2.5 (Congestion):

[0059] Fixed delay part ( ): For specific traffic control events (such as temporary road closures or large-scale event control).

[0060] If a controlled event exists: =Preset control duration (e.g., 30 minutes) Execution of the dynamic correction model: Substitute the quantified parameters into the comprehensive correction formula.

[0061]

[0062] Threshold boundary control (safety fallback): To prevent the algorithm from calculating extremely unreasonable times, a maximum correction upper limit is introduced.

[0063]

[0064] For example, setting a maximum threshold The time limit is set to no more than 120 minutes. Even if the algorithm calculates a time limit of 150 minutes, it is forcibly limited to 120 minutes to avoid over-filtering and resulting in no recommended trips. The final dynamic correction result is... .

[0065] During the recommendation phase, the system filters based on this revised threshold. This means that in heavy rain, the system will more strictly filter out flights that seem feasible but might actually cause passengers to miss their flights due to weather conditions. This mechanism significantly improves the safety and robustness of itinerary recommendations, demonstrating the system's proactive risk management capabilities.

[0066] In an optional embodiment of the present invention, the itinerary elements in the initial candidate set are filtered and reordered according to the comparison results, specifically including the following steps: (1) If the remaining effective time window is less than the safety buffer time window, the travel elements corresponding to the remaining effective time window are directly removed from the initial candidate set; (2) If the remaining effective time window is greater than the safety buffer time window but less than the preset warning threshold, the weight of the corresponding trip element is reduced in the ranking model, and a countdown label nearing the deadline is added to the trip element in the trip recommendation list.

[0067] Specifically, the system first determines whether the remaining valid time window is less than the safe buffer time window. If the determination is yes, meaning the remaining time is insufficient to support the booking process for this type of trip (for example, a domestic flight requires 45 minutes' advance notice, but only 30 minutes remain), the system executes hard filtering logic, directly removing the trip element from the initial candidate set. This approach avoids invalid data consuming computing resources and display space.

[0068] Secondly, if the remaining valid time window is greater than the safety buffer time window, the trip is theoretically bookable. However, to handle unforeseen circumstances and provide users with early warnings, the system also introduces a "preset warning threshold." The warning threshold is usually greater than the safety buffer time window (for example, if the safety buffer is 45 minutes, the warning threshold is set to 60 minutes). If the remaining valid time window is greater than the safety buffer time but less than the preset warning threshold, the trip is considered to be on the "critical edge."

[0069] In this situation, the system does not directly remove the trip, but instead implements a soft de-weighting logic. Specific methods include: reducing the weight of the corresponding trip element in the ranking model, causing it to rank lower in the list; and simultaneously adding a countdown timer label (e.g., "Only 55 minutes left to book") to the trip recommendation list. This tiered processing mechanism ensures both the purity of the recommendation list and preserves users' choice in emergency situations, achieving refined operation.

[0070] In an optional embodiment of the present invention, the management scope is extended from "pre-booking recommendations" to "full lifecycle monitoring after booking," addressing the common "zombie orders" problem in corporate travel. The method further includes the following steps: (1) Based on the absolute deadline of the trip elements, deliver an expiration check task to the distributed delayed message queue; Specifically, unlike the traditional timed polling mechanism, this embodiment adopts an event-driven architecture based on a "delayed message queue". When a process is created or its status changes to "approved", the system calculates the time point at which the check needs to be triggered (usually the deadline itself) based on the process's "absolute deadline", and delivers a check task to a distributed delayed message queue (such as RocketMQ's timed messages or RabbitMQ's dead-letter queue).

[0071] The system maintains a state machine for each itinerary. Key states include: Draft, Pending_Approval, Approved, Booked, Ticketed, and Expired.

[0072] (2) When the time reaches the absolute deadline, the consumer process is awakened to query the order status corresponding to the itinerary elements; The advantage of this architecture lies in its low power consumption. The consumer process remains in a dormant state until the task expires, and is only awakened by the operating system or message broker when the time actually arrives. At this point, the process queries the database for the latest status of the task.

[0073] (3) If an order is detected to be approved but not booked, it is considered to be overdue and the risk handling process is triggered.

[0074] If the query results show that the trip has passed its deadline, but the order status is still "approved" and "not booked" (meaning the user missed the trip), the system determines it as an "expiration risk." At this point, the system no longer remains silent but proactively intervenes, triggering subsequent remedial procedures. This delayed queue-based monitoring method, compared to full polling, significantly saves computing resources and is particularly suitable for monitoring scenarios with massive numbers of trips.

[0075] In an optional embodiment of the present invention, triggering the risk management process specifically includes the following steps: (1) Extract the departure and destination information of the original expired itinerary; Specifically, the system first analyzes the original itinerary's intent. It extracts core geographical information from expired itineraries, namely the "origin" and "destination".

[0076] (2) Call the search interface to retrieve available alternative routes after the current time; Specifically, based on the extracted OD information, the system immediately calls the search service interface, using the "current time" as the new departure time base, to retrieve available alternative resources. For example, if the original flight from Beijing to Shanghai at 10:00 AM has expired, the system will search for flights from Beijing to Shanghai in the afternoon.

[0077] (3) Generate a link to suggest alternative trips and push it to the user terminal through multiple channels.

[0078] Specifically, the system encapsulates the retrieved alternatives into a structured message card and generates a "one-click order completion" link with pre-filled parameters. This link is then pushed to the user through multiple channels, including app push notifications, SMS, and email. Users can directly access the booking page by clicking the link, without needing to re-enter complex travel information. This closed-loop design transforms passive "error reports" into proactive "solutions," significantly mitigating business losses for the company.

[0079] For expired approval forms that have not responded for a long time, the system will perform an "automatic closure" operation to release the frozen amount of the company's travel budget and record the log for auditing purposes.

[0080] In an optional embodiment of the present invention, the key spatiotemporal features further include: the geographical location features of the departure point of the trip, and calculating the time difference between the current real-time time and the absolute cutoff time, specifically including the following steps: (1) Analyze the geographical location features to determine the target time zone offset corresponding to the departure point of the trip; Specifically, travel data typically includes the geocode of the departure point (such as the airport's three-letter code or latitude and longitude). The system has a built-in time zone database (such as the TZ Database) that parses the geocode to determine the location's time zone and its offset relative to Coordinated Universal Time (UTC). For example, it parses "Beijing" as UTC+8 and "New York" as UTC-5.

[0081] (2) Based on the target time zone offset, convert the absolute cutoff time point into a standard timestamp, and align the current real-time time with the standard timestamp in the time zone; To eliminate calculation errors caused by time zone differences, the system standardizes all times. Using the parsed target time zone offset, the system converts the "absolute cutoff time" (usually stored as local time) into a Unix timestamp without time zone attributes. Simultaneously, the "current real-time time" obtained by the system is also converted to a timestamp of the same standard.

[0082] (3) Calculate the time difference based on the aligned time data.

[0083] After both time data are under the same standard (UTC Timestamp), the system performs a subtraction operation. This avoids logical loopholes such as "negative remaining time" or "incorrect calculation result" caused by local time jumps during cross-time zone travel, such as flying from China to the United States, ensuring the absolute accuracy of time difference calculation.

[0084] This invention aims to solve the following core problems: First, the contradiction of "what you see is not what you use" in the recommendation list is resolved. By embedding a time-sliding window-based verification layer into the recommendation engine's calculation logic, it is ensured that before a massive number of SKUs enter the user's view, the system has already performed millisecond-level comparisons based on the current absolute time and the business deadline of the SKU, thereby cleaning up near-expiration invalid data at the source.

[0085] Secondly, it addresses the issue of inflexible time threshold adaptation across different business scenarios. Unlike traditional one-size-fits-all approaches, this invention constructs a configurable rule engine that allows for the dynamic definition of differentiated secure booking time windows for different categories such as airlines, railways, hotels, and conference tickets, and even for different suppliers (e.g., different cut-off times for low-cost carriers and full-service airlines), enabling refined management.

[0086] Finally, this invention addresses the business risks posed by "approved but unbooked" zombie trips. For enterprise-level scenarios, the system needs to proactively identify trip segments that, while procedurally compliant (approved), are physically invalid (expired). This invention aims to establish a proactive early warning mechanism that not only informs users of expired trips but also, through intelligent analysis of the original trip intent, proactively generates rebooking options based on "same departure and arrival points and similar times" or suggests closing the application to release budget, thus forming a closed-loop business process.

[0087] The present invention has the following significant beneficial effects: 1. Significantly improves user booking success rate and experience: By implementing a sliding window verification process at the beginning of the recommendation layer, the possibility of users seeing "ghost flights" (i.e., flights that are unbookable at the last minute) is fundamentally eliminated. What users see is what they get, avoiding the frustration of errors occurring at the payment stage, and greatly improving product usability and user satisfaction.

[0088] 2. Achieving Flexible and Automated Management of Business Rules: The introduction of a dynamic rule engine breaks the deadlock of traditional hard-coded thresholds. Enterprises can flexibly adjust the "safe booking window" based on different transportation characteristics, supplier agreements, and even weather conditions. This differentiated configuration ensures risk control while maximizing sales opportunities (e.g., avoiding the mistaken cancellation of near-expiration but still bookable high-speed rail tickets).

[0089] 3. Significantly reduce hidden costs and risks associated with corporate travel: Proactive monitoring of "approved but unbooked" dormant trips. By promptly closing expired applications, companies can quickly release frozen budgets and improve cash flow efficiency. Simultaneously, proactive booking suggestions reduce additional travel expenses such as rebooking fees and delay charges incurred by employees due to missed flights.

[0090] 4. Reduce operational and customer service pressure: Automated filtering and early warning mechanisms replace manual review. Precise filtering on the recommendation side reduces customer complaints due to "booking failure"; automatic early warning on the backend reduces the workload of customer service staff manually notifying users of expired flights, significantly reducing operational labor costs.

[0091] Example 2: This invention also provides an intelligent filtering device for near-expiry trips. This intelligent filtering device for near-expiry trips is mainly used to execute the intelligent filtering method for near-expiry trips provided in Embodiment 1 of this invention. The intelligent filtering device for near-expiry trips provided in this invention will be described in detail below.

[0092] Figure 2 This is a schematic diagram of an intelligent filtration device for near-expiration processes according to an embodiment of the present invention, as shown below. Figure 2As shown, the device mainly includes: a preliminary retrieval and extraction unit 10, a determination unit 20, a calculation unit 30, and a comparison unit 40, wherein: The preliminary retrieval and extraction unit 10 is used to receive a retrieval request from a user carrying query conditions, perform a preliminary retrieval of the inventory data source according to the query conditions, generate an initial candidate set, and extract the key spatiotemporal features of each trip element in the initial candidate set. The key spatiotemporal features include at least the trip type identifier and the absolute deadline time. The determination unit 20 is used to call the dynamic rule engine, determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, and use the target threshold as a safety buffer time window; Calculation unit 30 is used to obtain the current real-time time and calculate the time difference between the current real-time time and the absolute cutoff time as the remaining valid time window; The comparison unit 40 is used to compare the remaining valid time window with the safety buffer time window, and filter and reorder the trip elements in the initial candidate set according to the comparison results to obtain an optimized trip recommendation list.

[0093] The intelligent filtering device for near-expiry trips of this invention achieves refined and real-time management of near-expiry trips by introducing a dynamic rule engine and a key spatiotemporal feature extraction mechanism. This effectively solves the technical bottlenecks of traditional systems, such as lagging verification and coarse threshold control. It significantly improves the accuracy and intelligence of trip data processing—by dynamically determining the safety buffer time window based on the trip type identifier and comparing it in real time with the remaining valid time window, it accurately filters high-risk near-expiry trips and optimizes the recommendation ranking, avoiding resource waste or recommendation failures caused by static thresholds. At the same time, relying on differentiated threshold configuration, it greatly enhances the adaptability and personalized service capabilities of the trip recommendation system, ultimately improving the efficiency of obtaining effective trip information and the recommendation conversion rate while ensuring a smooth user experience.

[0094] Optionally, the comparison unit is also used to: if the remaining valid time window is less than the safety buffer time window, directly remove the trip element corresponding to the remaining valid time window from the initial candidate set; if the remaining valid time window is greater than the safety buffer time window but less than the preset warning threshold, reduce the weight of the corresponding trip element in the ranking model and add a countdown label nearing the deadline to the trip element in the trip recommendation list.

[0095] Optionally, the determining unit is also used to: construct a hierarchical configuration table containing a global default layer, a tenant customization layer, and a specific SKU layer; and execute hierarchical matching logic based on the current user's tenant identifier and trip type identifier: query whether there is an independent configuration for the identifier of the trip element in the specific SKU layer; if it exists, use it as the target threshold; if it does not exist, query whether there is a configuration for the tenant identifier and trip type identifier in the tenant customization layer; if it exists, use it as the target threshold; if it still does not exist, call the general threshold in the global default layer as the target threshold.

[0096] Optionally, the determining unit is further configured to: obtain real-time contextual parameters of the trip's departure point, wherein the real-time contextual parameters include: weather conditions or traffic control information; dynamically correct the obtained differential thresholds based on the real-time contextual parameters, and then determine the corresponding target threshold from the dynamically corrected differential thresholds based on the trip type identifier.

[0097] Optionally, the device is also used to: deliver an expiration check task to a distributed delayed message queue based on the absolute deadline of the trip element; when the time reaches the absolute deadline, the consumer process is awakened and queries the order status corresponding to the trip element; if the order status is detected as approved but not booked, it is determined to be an expiration risk and the risk handling process is triggered.

[0098] Optionally, the device is also used to: extract the origin and destination information of the original expired trip; call the search interface to retrieve available alternative trips after the current time; generate a supplementary order suggestion link containing available alternative trips, and push it to the user terminal through multiple channels.

[0099] Optionally, the key spatiotemporal features also include: the geographical location features of the departure point of the trip. The calculation unit is also used to: perform time zone analysis on the geographical location features to determine the target time zone offset corresponding to the departure point of the trip; convert the absolute cutoff time point into a standard timestamp based on the target time zone offset, and align the current real-time time with the standard timestamp in time zone; and calculate the time difference based on the aligned time data.

[0100] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0101] like Figure 3As shown in the embodiment of this application, an electronic device 600 includes a processor 601, a memory 602, and a bus. The memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 via the bus. The processor 601 executes the machine-readable instructions to perform the steps of the intelligent filtering method for near-expiration schedules as described above.

[0102] Specifically, the memory 602 and processor 601 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 601 runs the computer program stored in the memory 602, it can execute the above-mentioned intelligent filtering method for near-expiration schedules.

[0103] The processor 601 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 601 or by instructions in software form. The processor 601 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 602, and processor 601 reads the information from memory 602 and, in conjunction with its hardware, completes the steps of the above method.

[0104] Corresponding to the above-described intelligent filtering method for near-expiry travel, this application also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to perform the steps of the above-described intelligent filtering method for near-expiry travel.

[0105] The intelligent filtering device for near-expiration processes provided in this application embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.

[0106] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0107] For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. 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 a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive 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 a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0108] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0109] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0110] If the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the intelligent filtering method for near-expiration schedules described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0111] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0112] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A smart filtering method for near-expiration travel, characterized in that, include: The system receives a retrieval request from a user with query conditions, performs a preliminary retrieval of the inventory data source based on the query conditions, generates an initial candidate set, and extracts the key spatiotemporal features of each trip element in the initial candidate set. The key spatiotemporal features include at least the trip type identifier and the absolute deadline. The dynamic rule engine is invoked to determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, and the target threshold is used as a safety buffer time window; Obtain the current real-time time and calculate the time difference between the current real-time time and the absolute cutoff time, which is used as the remaining valid time window; The remaining valid time window is compared with the safety buffer time window, and the trip elements in the initial candidate set are filtered and reordered according to the comparison results to obtain an optimized trip recommendation list.

2. The method according to claim 1, characterized in that, Based on the comparison results, the itinerary elements in the initial candidate set are filtered and reordered, including: If the remaining valid time window is less than the safety buffer time window, the travel elements corresponding to the remaining valid time window are directly removed from the initial candidate set. If the remaining valid time window is greater than the safety buffer time window but less than the preset warning threshold, the weight of the corresponding trip element is reduced in the ranking model, and a countdown label indicating the approaching deadline is added to the trip element in the trip recommendation list.

3. The method according to claim 1, characterized in that, The dynamic rules engine is invoked to determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, including: Construct a hierarchical configuration table that includes a global default layer, a tenant-customized layer, and a specific SKU layer; Based on the current user's tenant identifier and the trip type identifier, execute the hierarchical matching logic: In the specific SKU layer, query whether there is an independent configuration for the identifier of the trip element. If it exists, use it as the target threshold. If not, query the tenant customization layer to see if there is a configuration for the tenant identifier and the trip type identifier. If there is, use it as the target threshold. If it still does not exist, then the general threshold in the global default layer is used as the target threshold.

4. The method according to claim 1, characterized in that, The dynamic rules engine is invoked to determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, including: Obtain real-time contextual parameters of the departure point of the trip, wherein the real-time contextual parameters include: weather conditions or traffic control information; The obtained differential threshold is dynamically corrected based on the real-time context environment parameters, and then the corresponding target threshold is determined from the dynamically corrected differential threshold based on the trip type identifier.

5. The method according to claim 1, characterized in that, The method further includes: Based on the absolute deadline of the trip elements, an expiration check task is delivered to the distributed delayed message queue. When the time reaches the absolute deadline, the consumer process is activated to query the order status corresponding to the trip element; If an order is detected to be approved but not booked, it is considered to be at risk of expiration and the risk handling process is triggered.

6. The method according to claim 5, characterized in that, Triggering the risk management process includes: Extract the departure and destination information of the original expired itinerary; Call the search interface to retrieve available alternative routes after the current time; Generate a link to suggest replacement trips that includes the available alternative trips, and push it to the user's terminal via multiple channels.

7. The method according to claim 1, characterized in that, The key spatiotemporal features also include: the geographical location features of the departure point of the trip, and calculating the time difference between the current real-time time and the absolute cutoff time, including: Perform time zone analysis on the geographical location features to determine the target time zone offset corresponding to the departure point of the trip; Based on the target time zone offset, the absolute cutoff time is converted into a standard timestamp, and the current real-time time is aligned with the standard timestamp in the time zone. The time difference is calculated based on the aligned time data.

8. A smart filtration device for near-expiration filtration, characterized in that, include: The preliminary retrieval and extraction unit is used to receive a retrieval request from a user carrying query conditions, perform a preliminary retrieval of the inventory data source according to the query conditions, generate an initial candidate set, and extract the key spatiotemporal features of each trip element in the initial candidate set, wherein the key spatiotemporal features include at least the trip type identifier and the absolute deadline time. The determining unit is used to call the dynamic rule engine, determine the corresponding target threshold from the preset differentiated threshold configuration based on the trip type identifier, and use the target threshold as a safety buffer time window; The calculation unit is used to obtain the current real-time time and calculate the time difference between the current real-time time and the absolute cutoff time point as the remaining effective time window; The comparison unit is used to compare the remaining valid time window with the safety buffer time window, and filter and reorder the trip elements in the initial candidate set according to the comparison result to obtain an optimized trip recommendation list.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the method of any one of claims 1 to 7.