Business interface call arrangement method and system of ticket selling system

By adopting the DAG configuration and real-time health monitoring interface call method in the intelligent ticket sales system, the interface interaction bottleneck between the RAG system and SGUI was solved, which improved the flexibility and reliability of process orchestration and reduced operation and maintenance costs and interruption rate.

CN122240706APending Publication Date: 2026-06-19TRAVELSKY TECHNOLOGY LIMITED

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TRAVELSKY TECHNOLOGY LIMITED
Filing Date
2026-03-13
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In the intelligent air ticket sales scenario, the interface interaction between the RAG system and SGUI suffers from rigid process orchestration, simplistic exception handling, chaotic dependency management, and insufficient observability. Existing technologies have failed to deeply adapt to the characteristics of the air ticket business, resulting in low system flexibility, poor reliability, and low operational efficiency.

Method used

The business process template is configured using a directed acyclic graph (DAG) to monitor the health status of interfaces in real time, generate a topology sorting call sequence, call interfaces in sequence based on the health routing strategy, and collect full-link trajectory data simultaneously to achieve dynamic anomaly handling and full-link visual traceability.

Benefits of technology

Significantly shortens the business process change cycle, improves the success rate of interface calls, reduces the business interruption rate, improves operation and maintenance efficiency, and enhances system agility, reliability, and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240706A_ABST
    Figure CN122240706A_ABST
Patent Text Reader

Abstract

This application discloses a business interface call orchestration method and system for an airline ticket sales system, belonging to the field of computer technology. The method includes configuring a business process template containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph; continuously monitoring the health indicators of each business interface and updating the health status information of each business interface; when the retrieval enhancement generation system initiates a business request, generating a topologically ordered call sequence based on the business process template and health status information; calling each business interface in sequence based on a health routing strategy, and executing corresponding exception handling or degradation strategies according to the call results; and synchronously collecting, storing, and displaying the entire call trajectory data during the process of calling each business interface in sequence based on the health routing strategy and executing corresponding exception handling or degradation strategies according to the call results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and specifically relates to a business interface call orchestration method and system for an air ticket sales system. Background Technology

[0002] Currently, in intelligent air ticket sales scenarios, the integration of Retrieval-Augmented Generation (RAG) systems with traditional Standard Graphical User Interface (SGUI) systems faces core technical bottlenecks. For example, current interface interaction models suffer from rigid process orchestration, simplistic exception handling, chaotic dependencies, and insufficient observability. Furthermore, existing general-purpose API gateways and other technologies are not optimized for such business scenarios and lack deep adaptation capabilities to the characteristics of air ticket business (such as cabin class codes and real-time inventory). Summary of the Invention

[0003] To address the aforementioned problems, this application provides a method and system for orchestrating business interface calls in an airline ticket sales system. The method includes: Configure a business process template containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, continuously monitor the health indicators of each business interface and update the health status information of each business interface. When the retrieval enhancement generation system initiates a business request, it generates a topology-ordered call sequence based on the business process template and health status information; based on the health routing strategy, it calls each business interface in sequence, and executes the corresponding exception handling or degradation strategy according to the call result; During the process of calling various business interfaces in sequence based on the health routing strategy and executing corresponding exception handling or degradation strategies according to the call results, the call trajectory data of the entire link is collected, stored and displayed synchronously.

[0004] In this embodiment of the application, a business process template containing multiple business interface nodes and their dependencies is configured in the form of a directed acyclic graph, including: Configure a business process template containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, including: Based on interface attributes and parameter mapping rules, in response to template selection operations for the process template library, the selected basic template data is loaded into the visualization canvas; Receive the interface attributes and parameter mapping rules configured for specific business interface nodes in the current process through a graphical interface; In response to drag-and-drop connection operations between nodes, corresponding node dependency metadata is generated, and a graph theory detection algorithm is called to perform cyclic dependency verification on the current dependency graph; if the verification passes, the dependency is locked. Based on the configured interface attributes and dependencies, a versioned business process template is generated and deployed to the production environment's process engine.

[0005] In this embodiment of the application, the continuous monitoring of health indicators of each service interface and the updating of the health status information of each service interface include: Periodically collect response time, success rate, and error code distribution of each business interface as health indicators; Based on health indicators, calculate the health score of each interface according to the preset scoring rules, and classify the interface status into normal, warning and fault levels according to the health score. Maintain a list of backup interfaces for specified business interfaces, including address, priority and health score. When the main interface is in a fault state, automatically switch to the backup interface with the highest health score and update the health status information of each business interface. The formula for calculating the health score is as follows: Health score = 100 - (response time deduction + success rate deduction + error code deduction).

[0006] In this embodiment of the application, when the retrieval enhancement generation system initiates a business request, it generates a topology-sorted call sequence based on the business process template and health status information, including: The directed acyclic graph structure corresponding to the business process template is analyzed. In the directed acyclic graph structure, the nodes represent business interfaces, and the edges represent the dependencies and data flow between interfaces. Based on the directed acyclic graph structure, the Kahn algorithm is used to perform topological sorting of all business interface nodes to generate a linear call sequence that conforms to the dependency relationship.

[0007] In this embodiment of the application, the health routing policy is specifically as follows: For the business interface to be called, obtain the real-time health status of its main interface and backup interface list; If the main interface is in a normal state, then the main interface will be called directly. If the main interface is in an alert state, call traffic will be allocated between the main interface and the backup interface according to the preset weight ratio. If the main interface is in a faulty state, the backup interface with the highest health score will be selected from the backup interface list for invocation.

[0008] In this application embodiment, the exception handling or degradation strategy specifically includes: For network timeout errors, perform interval retries, and if the retries fail after reaching a preset number of retries, switch to a backup interface; For parameter errors, no retry is performed; instead, a structured error message containing the error reason and correction suggestions is directly returned to the retrieval enhancement generation system. For specific business logic errors, a limited number of retries are performed. If the retries still fail, a preset degradation process is triggered.

[0009] In this embodiment of the application, during the process of sequentially calling each business interface based on a health routing strategy and executing corresponding exception handling or degradation strategies according to the call results, the entire call trajectory data is simultaneously collected, stored, and displayed, including: Each time a business interface is called, the trajectory data is recorded in a structured manner. The trajectory data includes at least the session identifier, node information, request parameters, return result, call time, health score, and exception handling actions. Write trajectory data into the search engine database to support fast retrieval by at least one dimension, including user ID, interface name, error code, and time range; The system uses a visual interface to display the complete call chain data of a single business request in a timeline format, and generates periodic statistical analysis reports on interface call metrics.

[0010] This application also provides a business interface call orchestration system for an airline ticket sales system, the system comprising: The process definition module is used to visually define and manage business process templates containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, continuously monitor the health indicators of each business interface and update the health status information of each business interface. The execution scheduling module is used to generate a topology-sorted call sequence based on the business process template and health status information when the retrieval enhancement generation system initiates a business request; based on the health routing strategy, it calls each business interface according to the call sequence, and executes the corresponding exception handling or degradation strategy according to the call result; The trajectory storage module is used to synchronously collect and store the entire call trajectory data during the process of sequentially calling various business interfaces based on the health routing strategy and executing corresponding exception handling or degradation strategies according to the call results.

[0011] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as described in the above embodiments.

[0012] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in the above embodiments.

[0013] At the process orchestration level, this application adopts a DAG visualization definition and template reuse mechanism, which significantly shortens the business process change cycle and greatly improves business response efficiency. At the call stability level, it effectively improves the interface call success rate and significantly reduces the business interruption rate through real-time monitoring of interface health, hierarchical routing and differentiated intelligent retry mechanism. At the operation and maintenance management level, the full-link trajectory tracing and multi-dimensional fast query function improve the efficiency of problem investigation by orders of magnitude and significantly reduce the overall operation and maintenance cost.

[0014] Furthermore, this application can break through the technical barriers to the deep integration of the search enhancement generation system (RAG) and SGUI, thereby improving the agility, reliability, and maintainability of the intelligent ticket sales system.

[0015] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating a business interface call orchestration method for an airline ticket sales system provided in an embodiment of this application.

[0018] Figure 2 This application provides a flowchart illustrating the workflow of a business interface calling an orchestration system for an intelligent air ticket sales system.

[0019] Figure 3 This is a schematic diagram of a business interface calling an orchestration system for an intelligent air ticket sales system, provided as an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] The term “comprising” and its variations as used herein are open-ended inclusions, meaning “including but not limited to”; the term “based on” means “at least partially based on”; and the term “one embodiment” means “at least one embodiment”.

[0022] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0023] With the deepening application of artificial intelligence technology in vertical industries, the integration of Retrieval-Augmented Generation (RAG) technology with traditional business systems has shown great potential. In scenarios such as intelligent air ticket sales, users can input their needs through natural language, which is then parsed and intent-recognized by the RAG system. This drives the backend Standard Graphical User Interface (SGUI) system to complete specific business operations such as flight search, fare calculation, and ticket booking. In this process, efficient and accurate interface interaction between the RAG system and the SGUI is a core element for successful business implementation.

[0024] For example, in a complete ticket service process, "flight query → fare calculation → inventory verification → order reservation" requires sequentially calling multiple business interfaces of SGUI, and there are strict parameter dependencies and execution logic dependencies between these interfaces (for example, fare calculation must be based on a specific flight number returned by the flight query).

[0025] However, the current interface interaction mode between the RAG system and SGUI has significant technical bottlenecks, which restrict the system's flexibility, reliability, and operational efficiency. These bottlenecks are manifested in the following aspects: First, the business process orchestration is rigid and lacks flexibility. Existing systems mostly use hard-coded methods to predefine interface call chains and sequences. When business processes need adjustment (e.g., adding "baggage allowance confirmation" or "member-exclusive discount verification" interfaces) or needing to integrate differentiated interfaces from new airlines, developers must modify the core business logic code, retest, and re-deploy. This model results in lengthy adaptation cycles, typically exceeding a week, making it impossible to quickly respond to market changes and business innovation needs. For example, when an airline launched new member benefits requiring a pre-verification interface, the traditional system, due to modifications and deployment delays, prevented members from enjoying booking services normally for three days, severely impacting user experience and business opportunities.

[0026] Secondly, the exception handling mechanism is simplistic and lacks intelligent recovery capabilities. When faced with exceptions such as API call timeouts, temporary service unavailability (e.g., temporary failures of the TravelSky API), or unexpected results, existing solutions typically employ a simple fixed number of retries (e.g., two retries by default) or directly terminate the process and return an error. This rigid strategy cannot be dynamically adjusted based on the real-time health status of the API, the type of exception, and the importance of the business. Statistics show that under traditional integration models, the business interruption rate due to various API exceptions is as high as 5%, with issues related to temporary failures of external systems (such as TravelSky) accounting for over 60%. This not only reduces service availability but also results in potential revenue losses.

[0027] Secondly, the chaotic management of interface dependencies easily leads to logical errors. Complex business processes rely on precise parameter passing and state dependencies between interfaces (for example, the order pre-order interface can only be called after the inventory verification interface confirms "sufficient inventory"). The current system lacks a visual definition and automated runtime verification mechanism for such dependencies. Dependency logic is often scattered throughout the code, making it highly susceptible to logical errors such as "pre-ordering without verifying inventory" or "parameter passing errors." These errors are highly concealed, with an average troubleshooting time exceeding 2 hours, significantly increasing system debugging and maintenance costs.

[0028] Finally, the call process lacks observability, making problem tracing difficult. The complete trajectory of the API call, including key data such as request parameters, return results, response time, and exception information, is not systematically recorded and correlated. When complex anomalies occur, such as "user payment is successful but no order is generated in the backend," it becomes extremely difficult for operations and maintenance personnel to quickly and accurately reconstruct the complete call chain at the time of the failure, and to locate the root cause of the problem (e.g., whether a key parameter was missing from the API or whether data packet loss occurred at the network level), thus prolonging the fault recovery time.

[0029] Existing general-purpose API gateways or interface adaptation technologies primarily focus on common functions such as protocol conversion, routing, basic rate limiting, and authentication, without being optimized for the specific collaborative scenario of "RAG+SGUI". In particular, existing general-purpose API gateways or interface adaptation technologies lack a deep understanding and adaptation capability for the characteristics of the air ticket business domain (such as the strict enumeration constraints of cabin class codes and the strong real-time variability of flight inventory), and also fail to solve core issues such as dynamic orchestration of the aforementioned business processes, intelligent anomaly handling, dependency management, and end-to-end tracing.

[0030] Therefore, developing a business interface call orchestration system and method that can dynamically orchestrate business processes, intelligently handle call exceptions, clearly manage dependencies, and provide end-to-end visual traceability is of urgent technical necessity and significant application value for breaking down the technical barriers to the deep integration of RAG systems and SGUI, and improving the agility, reliability, and maintainability of intelligent ticket sales systems.

[0031] To address the aforementioned technical issues, this application proposes a business interface call orchestration system and method for an air ticket sales system, which aims to break down the technical barriers to the deep integration of RAG systems and SGUI, thereby improving the agility, reliability, and maintainability of the intelligent air ticket sales system.

[0032] The following are explanations of terms used in this application: Natural Language (NL): Natural language refers to the language humans use in daily life, such as Chinese, English, and Arabic. It is an important tool for people to exchange ideas and transmit information. It has unique properties in contrast to formal language.

[0033] Retrieval-Augmented Generation (RAG) is an artificial intelligence approach that integrates retrieval and generative techniques. It is designed to enhance the performance of large language models when handling tasks that require external knowledge or specific information.

[0034] ETERM SELLING (SGUI): This solution aims to create a front-end graphical software platform covering the sales processes of travel agents (CRS) and airlines (ICS). It primarily encompasses core business functions for agent distribution and airline ticket sales, sales management, reporting, electronic itineraries, ancillary services, and auxiliary queries. It provides a quasi-verification entry point for independently controllable, secure, and reliable core applications under a new open architecture, thus replacing the front-end booking and sales functions of Eterm. This will help China TravelSky become a leading international information service provider, offering a safe and efficient information service system for China's civil aviation industry and promoting its high-quality and healthy development.

[0035] A Directed Acyclic Graph (DAG) is a directed graph without loops. If there is a non-directed acyclic graph where a path from point A to B via point C returns to A (forming a cycle), changing the direction of the edge from C to A to A to C transforms it into a directed acyclic graph. The number of spanning trees in a directed acyclic graph is equal to the product of the in-degrees of its nodes with non-zero in-degrees.

[0036] Kahn's algorithm is a topological sorting algorithm used to sort directed acyclic graphs (DAGs). Essentially, Kahn's algorithm involves repeatedly removing vertices with an in-degree of 0 until all vertices in the graph have been visited.

[0037] Figure 1 This application provides a flowchart illustrating a business interface call orchestration method for an airline ticket sales system, as shown in the embodiments below. Figure 1 As shown, the method includes: S1. Configure a business process template containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, continuously monitor the health indicators of each business interface and update the health status information of each business interface. S2. When the retrieval enhancement generation system initiates a business request, it generates a topology-sorted call sequence based on the business process template and health status information; based on the health routing strategy, it calls each business interface in sequence, and executes the corresponding exception handling or degradation strategy according to the call result. S3. During the process of calling each business interface in sequence based on the health routing strategy and executing the corresponding exception handling or degradation strategy according to the call result, the call trajectory data of the entire link is collected, stored and displayed synchronously.

[0038] The business interface call orchestration method for the ticket sales system provided in this application significantly shortens the business process change cycle and greatly improves business response efficiency by adopting a DAG visual definition and template reuse mechanism at the process orchestration level. At the call stability level, it effectively improves the interface call success rate and significantly reduces the business interruption rate through real-time monitoring of interface health, hierarchical routing, and differentiated intelligent retry mechanisms. At the operation and maintenance management level, the full-link trajectory tracing and multi-dimensional rapid query functions improve the efficiency of problem investigation by orders of magnitude and significantly reduce the overall operation and maintenance cost.

[0039] Furthermore, this application can break through the technical barriers to the deep integration of the search enhancement generation system (RAG) and SGUI, thereby improving the agility, reliability, and maintainability of the intelligent ticket sales system.

[0040] In this embodiment of the application, a business process template containing multiple business interface nodes and their dependencies is configured in the form of a directed acyclic graph, including the following steps: S10. In response to a template selection operation for the process template library, load the selected basic template data into the visualization canvas. S20. Receive the interface attributes and parameter mapping rules configured for specific business interface nodes in the current process through the graphical interface. S30. In response to the drag-and-drop connection operation between nodes, generate the corresponding node dependency metadata and call the graph theory detection algorithm to perform cyclic dependency verification on the current dependency graph; if the verification passes, lock the dependency relationship. S40. Based on the configured interface attributes and dependencies, generate versioned business process templates and deploy the business process templates to the production environment's process engine.

[0041] Based on the above embodiments, continuously monitoring the health indicators of each business interface and updating the health status information of each business interface includes the following steps: S50: Periodically collect response time, success rate, and error code distribution of each business interface as health indicators.

[0042] S60. Based on health indicators, calculate the health score of each interface according to the preset scoring rules, and classify the interface status into normal, warning and fault levels according to the health score.

[0043] S70. Maintain a list of backup interfaces for specified business interfaces, including address, priority and health score. When the main interface is in a fault state, automatically switch to the backup interface with the highest health score and update the health status information of each business interface.

[0044] The formula for calculating the health score is as follows: Health score = 100 - (response time deduction + success rate deduction + error code deduction).

[0045] In this application, the health routing strategy is as follows: for the business interface to be called, obtain the real-time health status of its main interface and backup interface list; if the main interface status is normal, directly call the main interface; if the main interface status is warning, allocate call traffic between the main interface and backup interface according to the preset weight ratio; if the main interface status is faulty, select the backup interface with the highest health score from the backup interface list for calling.

[0046] Based on the above embodiments, when the retrieval enhancement generation system initiates a business request, it generates a topology sorting call sequence based on the business process template and health status information, including the following steps: S80. Parse the directed acyclic graph structure corresponding to the business process template. In the directed acyclic graph structure, the nodes represent business interfaces, and the edges represent the dependencies and data flow between interfaces. S90. Based on the directed acyclic graph structure, the Kahn algorithm is used to perform topological sorting of all business interface nodes to generate a linear call sequence that conforms to the dependency relationship.

[0047] In this application, the exception handling strategy is as follows: for network timeout errors, interval retries are performed, and if the retries fail after reaching a preset number of times, the system switches to a backup interface; for parameter errors, no retries are performed, and structured error information containing the error cause and correction suggestions is directly returned to the retrieval enhancement generation system; for specific business logic errors, a limited number of retries are performed, and if the retries still fail, a preset degradation process is triggered.

[0048] Based on the above embodiments, during the process of sequentially calling various business interfaces based on a health routing strategy and executing corresponding exception handling or degradation strategies according to the call results, the call trajectory data of the entire link is collected, stored, and displayed synchronously, including the following steps: S100. During each business interface call, record the trajectory data in a structured manner. The trajectory data includes at least the session identifier, node information, request parameters, return result, call time, health score, and exception handling action.

[0049] S200. Write the trajectory data into the search engine database to support fast retrieval by at least one dimension, including user ID, interface name, error code, and time range.

[0050] S300 uses a visual interface to display the complete call chain trajectory data of a single business request in a timeline format, and generates periodic statistical analysis reports on interface call metrics.

[0051] Figure 2 A flowchart illustrating the workflow of a business interface calling an orchestration system for an intelligent air ticket sales system, as provided in this application embodiment, is shown below. Figure 2 As shown, after SGUI receives the natural language command input by the user, the RAG engine performs vector retrieval and large model inference to parse the technical intent, which in turn triggers the dynamic process definition module to automatically generate an executable process according to preset rules. Then, the intelligent scheduler breaks down the task according to the system load and resource status and distributes it to the specific business system for execution through the API interface. The entire process is monitored by the end-to-end monitoring system to collect data for visualized operation and maintenance.

[0052] The natural language instructions input by the user can be directed acyclic graphs (DAGs) with logical order. This application uses RAG technology to lower the threshold for process creation, and parses the unstructured natural language input by the user in real time and converts it into structured process definition suggestions to achieve dynamic process definition, intelligent execution scheduling, and end-to-end monitoring.

[0053] Each SGUI interface corresponds to a DAG node, and the node attributes can be configured as follows: interface name (e.g., "flight query interface"), request method (GET / POST), timeout (default 3 seconds, customizable), number of retries (default 2), list of backup interfaces (e.g., "main interface: TravelSky interface, backup interface: airline direct connection interface"), and parameter mapping rules (e.g., convert "departure city=Beijing" to "dep_city=PEK").

[0054] This application establishes dependencies between nodes (such as "fare calculation node" depending on "flight query node"), and the system automatically verifies the legality of dependencies (such as detecting and prohibiting circular dependencies of "flight query node depending on fare calculation node"), generating a visual dependency graph (supporting zooming and node highlighting) for easy viewing by operations and maintenance personnel.

[0055] The system includes pre-set templates for commonly used flight booking processes, covering eight core scenarios such as "flight search - fare calculation - booking" and "order search - cancellation / change - refund". These templates support one-click reuse, modification, and saving. For example, the "flight booking template" defaults to a chain of nodes: "flight search → fare calculation → inventory verification → order pre-booking". Users can add a "baggage allowance confirmation" node as needed. Once configured, the template can be directly called without coding, reducing the process change adaptation cycle to within one day.

[0056] The interface health monitoring module is used to monitor the running status of the SGUI interface in real time, providing data support for intelligent scheduling. Its core mechanism includes: multi-dimensional health indicator collection: collecting three core indicators of the interface at regular intervals (default 5 seconds / time): Response time: Records the time elapsed from sending a request to receiving a response, accurate to milliseconds.

[0057] Success rate: The percentage of calls that return a "success" status code (e.g., 200) in the last 100 calls.

[0058] Error code distribution: Categorize and statistically analyze error types (such as "Parameter Error 400", "Service Unavailable 503", "Timeout Error").

[0059] The health score (out of 100) is calculated based on the indicators. The scoring formula is: Health score = 100 - (points deducted for response time exceeding 2 seconds + points deducted for success rate below 95% + points deducted for error codes). Among them, 10 points are deducted for every second of response time exceeding the limit, 20 points are deducted for every 5% decrease in success rate, and 5 points are deducted for each "Service Unavailable 503" error.

[0060] Preferably, the interface level is predefined into three levels based on the health score: normal (80-100 points), warning (60-79 points), and fault (60 points and below).

[0061] The health score is categorized into three levels: Normal and Fault. Normal health score indicates that the interface is running stably and should be called first. Fault-fault health score indicates that the interface response is delayed or the success rate is low, triggering SMS / email alerts to notify operations and maintenance personnel to investigate. Fault-fault health score indicates that the interface frequently reports errors or times out, is marked as "unavailable," and automatically triggers a backup interface switchover.

[0062] The interface call orchestration system provided in this application maintains a backup interface pool for each core interface (such as flight query and order reservation), and records the address, priority (e.g., priority 1 for direct connection interfaces with airlines, priority 2 for third-party interfaces), and health score of the backup interfaces. When the health status of the main interface changes to "failure", the backup interface with the highest health score is automatically selected as the temporary main interface, and the switching time is ≤500 milliseconds.

[0063] Furthermore, the intelligent execution scheduling module implements dynamic scheduling based on the DAG process and interface health status, including a three-level execution logic of "dependency resolution - health routing - exception retry".

[0064] Specifically, the dependency resolution process includes: after receiving the call request from the upper-layer module (such as the retrieval enhancement business reasoning module), automatically resolving the dependency relationship of the DAG process, and using the Kahn algorithm to generate a topological order (such as "flight query → fare calculation → inventory verification → order pre-positioning") to ensure execution in the order of dependencies and avoid logical errors.

[0065] The execution process of health routing includes: dynamically selecting the calling object based on the interface health score; when the main interface health status is "normal", the main interface is called 100%; when the main interface health status is "warning", a weight allocation strategy is adopted to distribute traffic pressure; preferably, the main interface call weight is 80% and the backup interface call weight is 20%; when the main interface health status is "fault", the best interface in the backup interface pool is called 100%.

[0066] Based on the above embodiments, the business interface call orchestration system of the air ticket sales system provided in this application performs differentiated processing for different types of interface anomalies.

[0067] For interface exceptions such as "network timeout error", retry is performed after a 2-second interval, for a total of 2 retries. If the retry fails, a backup interface will be switched.

[0068] For interface exceptions with "parameter error", such as "departure date format error", no retry will be made, and a structured error message (including the error reason and correction suggestions) will be returned directly.

[0069] For API exceptions such as "Insufficient Inventory," a retry interval of 5 seconds is used, with one retry to avoid misjudgments caused by real-time inventory changes. A fallback process is triggered if the retry fails. For example, in one example, for an API exception like "Insufficient Inventory," after a 5-second retry interval and one retry, a user-friendly message is returned: "Insufficient economy class inventory for the current flight. Would you recommend a flight on an adjacent date?"

[0070] The business interface call orchestration system provided in this application for the air ticket sales system improves the interface call success rate to over 99.5% and reduces the business interruption rate to below 0.5%.

[0071] Furthermore, the end-to-end trajectory management module in this application can realize full-dimensional data recording and traceability during the interface call process. Specifically, the end-to-end trajectory management module features structured trajectory data acquisition, efficient storage and multi-dimensional querying, and trajectory visualization and analysis.

[0072] The trajectory data is collected in a structured manner, recording key information for each API call in real time to form a standardized trajectory log. In one example, the standardized trajectory log includes: basic information (session ID (associated with the user session), process template ID, node ID, API name, call time (accurate to milliseconds)), and business data: request parameters (sensitive information is anonymized, such as ID card numbers replaced with ""). The system displays the following information: health score, whether to retry, whether to switch to a backup interface, and error code (if it fails). The return result (JSON format), time elapsed, and status information are also displayed.

[0073] This application uses Elasticsearch to store trajectory logs, sharded daily (index name format: interface-trace-yyyy.MM.dd), supporting over 1000 log entries per second. It provides multi-dimensional query functions: querying "a user's interface call records for the past 3 days" by user ID, querying "flight query interface call details for today" by interface name, and querying "call trajectories related to 503 errors" by error code, with a query response time of ≤1 second.

[0074] Develop a trajectory details page that displays the API call sequence, request / return data for each node, and exception handling process in a timeline format (e.g., "2024-10-01 09:05:30 Flight query main API timed out, successfully switched to backup API"). Generate a trajectory analysis report weekly, statistically analyzing API call metrics (average timeout, success rate, number of backup API switches) to provide data support for API optimization (e.g., "Flight query API average timeout is 1.2 seconds, a decrease of 0.3 seconds from last week, showing significant optimization effect").

[0075] This directed acyclic graph constitutes an automated business sub-process module that can be identified, scheduled, and executed by the system. Within this automated business sub-process module, a "Baggage Allowance Confirmation Node" is added by selecting the "Flight Booking" preset template. The interface address (e.g., " / sgui / api / baggage / check"), timeout (3 seconds), and backup interface (airline direct connection) for this node are configured, and a dependency relationship is established between the "Baggage Allowance Confirmation Node and the Fare Calculation Node". The process version control sub-module generates a new version V1.1, automatically verifies the legality of dependencies (no circular dependencies), and marks it as "Test". After testing and verification (no exceptions after 100 calls), it switches to the "Official" state and is published to the process template library.

[0076] Furthermore, the interface health monitoring module periodically (every 5 seconds) collects health indicators for the "Flight Query Interface": response time 1.5 seconds, success rate 99%, no error codes, and a health score of 95 points, marked as "normal". If the "China TravelSky Fare Calculation Interface" experiences a sudden failure, and the health score drops to 50 points (marked as "failure"), the system automatically triggers an SMS alarm and selects the "China Southern Airlines Direct Connection Interface" from the backup interface pool as the temporary main interface.

[0077] The Retrieval Enhancement Generation System (RAG) initiates a "Flight Booking" process call request. The intelligent execution scheduling module parses the V1.1 version of the DAG process and generates a topological order: "Flight Inquiry → Fare Calculation → Baggage Allowance Confirmation → Inventory Verification → Order Reservation". The business interface call orchestration system executes the interface call according to this topological order.

[0078] For example, in this embodiment of the application, the "Flight Inquiry Interface" (the main interface is healthy and normal) is called to obtain the flight number CA185; the "Fare Calculation Interface" (the main interface is faulty, so the switch is made to the backup interface) is called, the flight number CA185 is passed in, and the economy class ticket price of 1200 yuan is obtained; the "Baggage Quota Confirmation" and "Inventory Verification" interfaces are executed in sequence, and both are successfully called; the "Order Reservation Interface" is called to complete the order reservation.

[0079] Meanwhile, the end-to-end trajectory management module collects trajectory data for each API call in real time. For example, in this embodiment, the trajectory data for the API call is: "2024-10-01, 10:10:00, call to fare calculation API, request parameter: flight_no=CA185, return result: price=1200, time taken: 800ms, health score: 50, switch to backup API". This trajectory data is stored in Elasticsearch. After this process is completed, a trajectory details link is generated to support subsequent queries by operations and maintenance personnel.

[0080] Of course, if an interface call fails, the problem can be quickly located through trajectory data. For example, in this embodiment of the application, if the "inventory verification interface returns 'insufficient inventory', then a degradation process is triggered."

[0081] This application also provides a specific embodiment in which the front-end interface is built using Vue.js + ECharts. ECharts is responsible for rendering the DAG canvas, supporting node dragging, line drawing, and scaling. Node icons are distinguished according to the interface type. For example, the flight query interface uses an "airplane" icon, and the fare calculation interface uses a "RMB" icon.

[0082] It's important to note that Vue.js is a "view layer framework," while Vuex is a "state management library" specifically designed for Vue.js. This application uses Vuex to manage the state of workflow templates to ensure data synchronization between components.

[0083] Accordingly, the backend of this application uses Python's networkx library to parse the DAG structure and calls the is_directed_acyclic_graph() function to check for circular dependencies. If a circular dependency exists, an error message is returned.

[0084] For example, in this embodiment of the application, if a circular dependency is detected: flight query → fare calculation → flight query, please adjust the dependency relationship.

[0085] In addition, this application adopts a MySQL database stored procedure template and designs three core tables: The first core table: template_info: stores basic template information (template_id, template_name, version, status, create_time).

[0086] The second core table: template_node: stores node configuration information (node_id, template_id, interface_name, request_method, timeout, retry_count, backup_interfaces, param_mapping).

[0087] The third core table: template_dependency: stores the dependency relationships (dependency_id, template_id, pre_node_id, next_node_id), where pre_node_id is the predecessor node ID and next_node_id is the successor node ID.

[0088] After configuring the template, the template information is synchronized to Redis via a RESTful API for quick retrieval by the intelligent execution scheduling submodule. When calling the API, the upper-level module passes in the `template_id` and business parameters (such as departure city and date) to trigger process execution.

[0089] In this embodiment, the implementation of the interface health monitoring module includes: collecting health indicators, calculating health scores, and managing the backup interface pool.

[0090] The health indicator collection task includes: developing a scheduled task based on the Python Celery framework, configured to execute every 5 seconds. The logic for this task includes: calling the health check API (e.g., / sgui / api / health), recording the response time (calculated using time.perf_counter()); analyzing the results of the last 100 calls and calculating the success rate (number of successful calls / total number of calls × 100%); and categorizing and statistically analyzing the occurrence of error codes such as "400", "503", and "timeout".

[0091] This application develops a scheduled task based on the Python Celery framework, configured to execute every 5 seconds. The task logic includes: calling an API health check (e.g., / sgui / api / health), recording the response time (calculated using time.perf_counter()), analyzing the results of the last 100 calls, calculating the success rate (number of successful calls / total number of calls × 100%), and, if categorizing and analyzing error codes such as "400", "503", and "timeout", calculating a health score: a scoring function is written to implement the scoring formula logic, adding or subtracting scores based on response time, success rate, error codes, and other indicators. Finally, a backup API pool is managed. For example, a Redis hash structure is used to store the backup API pool, with the key being interface_backup:{interface_name} and the value being a list of backup APIs (in JSON format).

[0092] Example: { "main_interface":"https: / / xxx / flight / query", "backup_interfaces": [ {"url":"https: / / xxs / flight / query","priority":1,"health_score":95}, {"url":"https: / / xss / flight / query","priority":2,"health_score":90} ] } Based on the above embodiments, when the health score of the main interface is less than 60, the backup interface is selected according to priority and the main interface address in Redis is updated.

[0093] In this embodiment, the intelligent execution scheduling submodule can realize topology sorting generation, healthy routing implementation, and intelligent retries and degradation.

[0094] For example, in a specific instance, the specific steps involved in generating a topological sort include: The topological sorting is implemented based on the Kahn algorithm. The in-degree (number of predecessor nodes) of all nodes is counted. Nodes with an in-degree of 0 are added to the queue. Nodes are dequeued one by one, and their outgoing edges are deleted (reducing the in-degree of successor nodes). If the in-degree of a successor node becomes 0, it is added to the queue. The above steps are repeated until a complete sort is generated.

[0095] For example, in a specific instance, the steps involved in implementing health routing include: The system selects the calling object based on the interface health status and queries the interface health status and backup interface pool in Redis. If the main interface health status is "normal", the main interface is called; if the main interface health status is "warning", the call is allocated according to weight using random numbers (e.g., 80% main interfaces, 20% backup interfaces); if the main interface health status is "faulty", the best interface in the backup interface pool is called.

[0096] For example, in a specific case, the specific steps for developing an exception handling function to implement strategies for different error types, including intelligent retries and degradation, include: If the network times out: record the number of retries, retry after a 2-second interval, and switch to the backup interface after two failed retries.

[0097] If the parameters are incorrect: a structured error message is returned (e.g., {"code":400,"msg":"Departure date format is incorrect, it should be YYYY-MM-DD","suggestion":"Please check the date format"}).

[0098] If inventory is insufficient: retry once every 5 seconds, and if it fails, call the "Flight Recommendation Interface" to generate a downgrade response.

[0099] For example, in a specific instance, the steps of the end-to-end trajectory management submodule include: embedding data collection logic into the interface call function using a Python decorator, and using the `desensitize` function during database data collection to de-identify sensitive information (such as replacing ID card numbers with "..."). (”).

[0100] Elasticsearch Index Design: Create ES indexes to store call logs.

[0101] Trajectory Query and Analysis: Develop a query API that supports multi-dimensional filtering, generate weekly analysis reports, call indicators through statistical interfaces, and draw trend charts using Matplotlib.

[0102] This application also provides a business interface call orchestration system for an air ticket sales system. The system includes a process definition module, an execution scheduling module, and a trajectory storage module, and the process definition module, the execution scheduling module, and the trajectory storage module are sequentially connected in communication.

[0103] The process definition module is used to visually define and manage business process templates containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, continuously monitor the health indicators of each business interface and update the health status information of each business interface.

[0104] It's important to note that a Directed Acyclic Graph (DAG) refers to a directed graph without any loops. For example, in one instance, there exists a non-directed acyclic graph where starting from point A, moving to point B, passing through point C, and returning to point A, forming a cycle. If the direction of the edge from point C to point A is changed to from point A to point C, it becomes a directed acyclic graph, and the number of spanning trees in the DAG is equal to the product of the in-degrees of the nodes with non-zero in-degrees.

[0105] The execution scheduling module is used to generate a topology-ordered call sequence based on the business process template and health status information when the retrieval enhancement generation system initiates a business request; based on the health routing strategy, it calls each business interface according to the call sequence, and executes the corresponding exception handling or degradation strategy according to the call result.

[0106] The trajectory storage module is used to synchronously collect and store the entire call trajectory data during the process of sequentially calling various business interfaces based on the health routing strategy and executing corresponding exception handling or degradation strategies according to the call results.

[0107] For example, in a specific example, the process definition module provided in this application visually defines and manages the call process containing multiple business interface nodes in the form of a directed acyclic graph. It can transform complex business processes that originally needed to be hard-coded in the program (e.g., "first query flights → then verify fares → then check seats → finally generate PNR") into processes that can be completed by dragging, connecting, and configuring nodes (each node represents a business interface, such as flight query interface and fare calculation interface) through a visual interface, thereby realizing the "configuration" and "de-coding" of business logic.

[0108] Preferably, each business interface corresponds to a node in a directed acyclic graph, with configurable node attributes: interface name (e.g., "flight query interface"), request method (GET / POST), timeout (default 3 seconds, customizable), number of retries (default 2), list of backup interfaces (e.g., "main interface: TravelSky interface, backup interface: airline direct connection interface"), and parameter mapping rules (e.g., converting "departure city = Beijing" to "dep"). - city=PEK”).

[0109] Then, dependencies between nodes are established by dragging and dropping (e.g., the "fare calculation node" depends on the "flight query node"). The system automatically verifies the legality of the dependencies (e.g., detects and prohibits circular dependencies where the "flight query node depends on the fare calculation node") and generates a visual dependency graph (supporting zooming and node highlighting) for easy viewing by operations and maintenance personnel.

[0110] Furthermore, the process definition module is also used to monitor the health status of each business interface in real time, calculate health scores, manage the backup interface pool, and send health status information to the execution scheduling module. The execution scheduling module receives business requests from the retrieval enhancement generation system, dynamically parses dependencies, selects interfaces, executes calls, and handles exceptions based on the process templates provided by the dynamic process visualization definition module and the health status information provided by the interface health monitoring module. The trajectory storage module is used to collect, store, and visualize the trajectory data of each interface call executed by the intelligent execution scheduling module throughout the entire process in real time.

[0111] At the process orchestration level, this application adopts a DAG visualization definition and template reuse mechanism, which significantly shortens the business process change cycle and greatly improves business response efficiency. At the call stability level, it effectively improves the interface call success rate and significantly reduces the business interruption rate through real-time monitoring of interface health, hierarchical routing and differentiated intelligent retry mechanism. At the operation and maintenance management level, the full-link trajectory tracing and multi-dimensional fast query function improve the efficiency of problem investigation by orders of magnitude and significantly reduce the overall operation and maintenance cost.

[0112] Furthermore, by calling the orchestration system through the business interface of the ticket sales system, this application can also break through the technical barriers of deep integration between the search enhancement generation system (RAG) and SGUI, thereby improving the agility, reliability, and maintainability of the intelligent ticket sales system.

[0113] Based on the above embodiments, the process definition module in this application includes a node configuration unit, a dependency visualization unit, and a process template library unit. The node configuration unit is used to configure node attributes for each business interface. Node attributes include at least the interface address, request method, timeout, number of retries, parameter mapping rules, and a list of alternative interfaces. The dependency visualization unit is used to establish dependencies between nodes through a graphical drag-and-drop method, automatically perform dependency validity checks to prevent circular dependencies, and generate a visual dependency graph. The process template library unit is used to store and reuse preset business process templates, supporting modification, version control, and release of the templates.

[0114] In addition, the process definition module includes an indicator collection unit, a health scoring unit, and a backup interface management unit. The indicator collection unit periodically collects the response time, success rate, and error code distribution of each business interface. The health scoring unit calculates the health score of each interface based on response time, success rate, and error code distribution according to preset deduction rules, and classifies the interface status into normal, warning, and fault levels based on the score. The backup interface management unit maintains a list of backup interfaces for specified business interfaces, including address, priority, and health score, and automatically switches to the backup interface with the highest health score when the primary interface is in a fault state.

[0115] Furthermore, the health score calculation formula for the health score unit is: Health score = 100 - (Response time deduction + Success rate deduction + Error code deduction).

[0116] Specifically, 10 points will be deducted for every second the response time exceeds the benchmark, 20 points will be deducted for every 5 percentage points the success rate falls below the benchmark, and 5 points will be deducted for each service unavailability error.

[0117] In this embodiment, the execution scheduling module includes a topology sorting unit, a health routing unit, and an exception handling unit. The topology sorting unit receives a service request, parses the retrieval enhancement generation structure of the corresponding process template, and generates an interface call sequence that conforms to the dependency relationship using a topology sorting algorithm. The health routing unit dynamically selects the call target based on the interface status provided by the interface health monitoring module: when the main interface is in normal condition, the main interface is called; when the main interface is in warning condition, traffic is allocated between the main interface and the backup interface according to a preset weight; when the main interface is in fault condition, the backup interface is called. The exception handling unit executes differentiated processing strategies for different types of call exceptions. These strategies include at least: retrying network timeout errors at intervals and switching interfaces after retry failure; directly returning structured error information for parameter errors; and performing limited retries and triggering a degradation process for business logic errors.

[0118] Furthermore, the degradation process triggered by the exception handling unit includes: when the flight inventory verification interface returns an insufficient inventory error and is confirmed after retry, the flight recommendation interface is called to obtain flight information for adjacent dates, and the recommendation information is returned as a degradation response.

[0119] In this embodiment, the trajectory storage module includes a trajectory acquisition unit, a trajectory visualization unit, and a trajectory data collection unit. The trajectory acquisition unit is used to structurally record the session ID, node information, request parameters, return results, time consumption, health score, and exception handling actions for each interface call. The trajectory storage and query unit is used to write the trajectory data into a search engine database and supports fast retrieval by at least one dimension: user ID, interface name, error code, and time range. The trajectory visualization unit is used to display the details of the complete call chain in a timeline format and generate a statistical analysis report of the interface call metrics.

[0120] In addition, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as described in the above embodiments.

[0121] Based on the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in the above embodiments.

[0122] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0123] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for orchestrating business interface calls in an airline ticket sales system, characterized in that, The method includes: Configure a business process template containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, continuously monitor the health indicators of each business interface and update the health status information of each business interface. When the retrieval enhancement generation system initiates a business request, it generates a topology-sorted call sequence based on the business process template and the health status information; based on the health routing strategy, it calls each business interface in sequence and executes the corresponding exception handling strategy according to the call result; During the process of sequentially calling each business interface based on the health routing strategy and executing corresponding exception handling or degradation strategies according to the call results, the call trajectory data of the entire link is collected, stored and displayed synchronously.

2. The method according to claim 1, characterized in that, Configure a business process template containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, including: In response to a template selection operation in the process template library, the selected basic template data is loaded into the graphical interface; Receive the interface attributes and parameter mapping rules configured for specific business interface nodes in the current process through the graphical interface; Based on the interface attributes and parameter mapping rules, in response to drag-and-drop connection operations between nodes, corresponding node dependency metadata is generated, and a graph theory detection algorithm is called to perform cyclic dependency verification on the current dependency graph; if the verification passes, the dependency relationship is locked. Based on the configured interface attributes and dependencies, a versioned business process template is generated, and the business process template is deployed to the production environment's process engine.

3. The method according to claim 1, characterized in that, Continuously monitor the health metrics of each business interface and update the health status information of each business interface, including: The response time, success rate, and error code distribution of each business interface are collected periodically as the health indicators. Based on the health indicators, calculate the health score of each interface according to the preset scoring rules, and classify the interface status into normal, warning and fault levels according to the health score. Maintain a list of backup interfaces for specified business interfaces, including address, priority and health score. When the main interface is in a fault state, automatically switch to the backup interface with the highest health score and update the health status information of each business interface. The formula for calculating the health score is as follows: Health score = 100 - (response time deduction + success rate deduction + error code deduction).

4. The method according to claim 1, characterized in that, When the retrieval enhancement generation system initiates a business request, it generates a topology sorting call sequence based on the business process template and the health status information, including: The directed acyclic graph structure corresponding to the business process template is parsed, wherein the nodes in the directed acyclic graph structure represent business interfaces, and the edges represent the dependencies and data flow between interfaces; Based on the aforementioned directed acyclic graph structure, the Kahn algorithm is used to perform topological sorting of all business interface nodes, generating a linear call sequence that conforms to the dependency relationship.

5. The method according to claim 3, characterized in that, The specific health routing strategy is as follows: For the business interface to be called, obtain the real-time health status of its main interface and backup interface list; If the main interface is in a normal state, then the main interface is called directly; If the main interface status is an early warning, then call traffic is allocated between the main interface and the backup interface according to the preset weight ratio; If the main interface is in a fault state, the backup interface with the highest health score is selected from the backup interface list and invoked.

6. The method according to claim 5, characterized in that, The specific exception handling strategy is as follows: For network timeout errors, retry at intervals is performed, and if the retry fails after reaching a preset number of retries, the system switches to the backup interface. For parameter errors, no retry is performed; instead, a structured error message containing the error cause and correction suggestions is directly returned to the search enhancement generation system. For specific business logic errors, a limited number of retries are performed. If the retries still fail, a preset degradation process is triggered.

7. The method according to claim 1, characterized in that, During the process of sequentially calling various business interfaces based on a health routing strategy and executing corresponding exception handling or degradation strategies according to the call results, the entire call trajectory data is simultaneously collected, stored, and displayed, including: Each time a business interface is called, the trajectory data is recorded in a structured manner. The trajectory data includes at least the session identifier, node information, request parameters, return result, call time, health score, and exception handling action. The trajectory data is written into the search engine database to support fast retrieval by at least one dimension, including user ID, interface name, error code, and time range. The system uses a visual interface to display the complete call path data of a single business request in a timeline format, and generates periodic statistical analysis reports on interface call metrics.

8. A business interface call orchestration system for an airline ticket sales system, characterized in that, The system includes: The process definition module is used to visually define and manage business process templates containing multiple business interface nodes and their dependencies in the form of a directed acyclic graph, continuously monitor the health indicators of each business interface and update the health status information of each business interface. The execution scheduling module is used to generate a topology-sorted call sequence based on the business process template and the health status information when the retrieval enhancement generation system initiates a business request; based on the health routing strategy, it calls each business interface according to the call sequence, and executes the corresponding exception handling or degradation strategy according to the call result; The trajectory storage module is used to synchronously collect and store the entire call trajectory data during the process of sequentially calling various business interfaces based on the health routing strategy and executing corresponding exception handling or degradation strategies according to the call results.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 7.