US-12619642-B1 - Adaptive API integration framework with automated scenario simulation and self-healing mechanism
Abstract
Systems and methods described herein involve application programming interface (API) management of information retrieval, which can include generating descriptions for each API on an API list, the generating the descriptions involving executing queries on the API list based on API documentation or API specifications; executing natural language processing to extract input examples and corresponding meanings, and output examples and corresponding meanings for the each API in the API list; and generating the descriptions for the each API on the API list from the input examples and corresponding meanings and the output examples and corresponding meanings. Generating an API execution scenario can involve providing the generated descriptions and user query history to a machine learning algorithm configured to extract similar APIs to the user query history to generate the API execution scenario comprising the extracted similar APIs. Such API execution scenarios are then subsequently executed in response to user queries.
Inventors
- Takuya HABARA
- Naohiro Kohmu
- Sudhanshu Gaur
Assignees
- HITACHI, LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20250428
Claims (16)
- 1 . A method for application programming interface (API) management of information retrieval, comprising: generating descriptions for each API on an API list, the generating the descriptions comprising: executing queries on the API list based on API documentation or API specifications; executing natural language processing to extract input examples and corresponding meanings, and output examples and corresponding meanings for the each API in the API list; and generating the descriptions for the each API on the API list from the input examples and corresponding meanings and the output examples and corresponding meanings; generating an API execution scenario that defines ones of the APIs in the API list to execute, the generating the API execution scenario comprising providing the generated descriptions and user query history to a machine learning algorithm configured to extract similar APIs to the user query history to generate the API execution scenario comprising the extracted similar APIs; and executing the generated API execution scenario in response to user queries facilitated by user query handling.
- 2 . The method of claim 1 , wherein the generated descriptions and the generated API execution scenario are dynamically updated in response to modifications or additions to the API list.
- 3 . The method of claim 1 , wherein the generating the descriptions comprises: comparing the input examples and the output examples of the each API in the API list to identify APIs in the API list having similar values to the input examples and the output examples; and grouping the identified APIs as related APIs.
- 4 . The method of claim 3 , wherein the generating the API execution scenario comprises utilizing the grouped related APIs, executing reinforcement learning models trained on past execution patterns to determine dependencies between the grouped related APIs.
- 5 . The method of claim 1 , wherein the generating the API execution scenario comprises determining a combination of ones of the extracted similar APIs and execution order from the ones of the extracted similar APIs to generate the API execution scenario.
- 6 . The method of claim 5 , wherein the generating the API execution scenario comprises referencing the user query history for success rates and execution times to determine the combination of the ones of the extracted similar APIs.
- 7 . The method of claim 1 , further comprising executing a self-correction process comprising: upon detecting an anomaly from monitoring API execution status: identifying APIs from the executed API execution scenario causing the anomaly; and generating another API execution scenario that omits the identified APIs causing the anomaly for the execution.
- 8 . The method of claim 1 , further comprising facilitating the user query handling, the facilitating the user query handling comprising recording user queries, query execution results, execution logs, and success/failure information as the user query history.
- 9 . A system for application programming interface (API) management of information retrieval, comprising: a processor, configured to: generate descriptions for each API on an API list, the generating the descriptions by: executing queries on the API list based on API documentation or API specifications; executing natural language processing to extract input examples and corresponding meanings, and output examples and corresponding meanings for the each API in the API list; and generating the descriptions for the each API on the API list from the input examples and corresponding meanings and the output examples and corresponding meanings; generate an API execution scenario that defines ones of the APIs in the API list to execute, by providing the generated descriptions and user query history to a machine learning algorithm configured to extract similar APIs to the user query history to generate the API execution scenario comprising the extracted similar APIs; and execute the generated API execution scenario in response to user queries facilitated by user query handling.
- 10 . The system of claim 9 , wherein the generated descriptions and the generated API execution scenario are dynamically updated in response to modifications or additions to the API list.
- 11 . The system of claim 9 , wherein the processor is configured to generate the descriptions by: comparing the input examples and the output examples of the each API in the API list to identify APIs in the API list having similar values to the input examples and the output examples; and grouping the identified APIs as related APIs.
- 12 . The system of claim 11 , wherein the processor is configured to generate the API execution scenario by utilizing the grouped related APIs, executing reinforcement learning models trained on past execution patterns to determine dependencies between the grouped related APIs.
- 13 . The system of claim 9 , wherein the processor is configured to generate the API execution scenario by determining a combination of ones of the extracted similar APIs and execution order from the ones of the extracted similar APIs to generate the API execution scenario.
- 14 . The system of claim 13 , wherein the processor is configured to generate the API execution scenario by referencing the user query history for success rates and execution times to determine the combination of the ones of the extracted similar APIs.
- 15 . The system of claim 9 , wherein the processor is further configured to execute a self-correction process comprising: upon detecting an anomaly from monitoring API execution status: identifying APIs from the executed API execution scenario causing the anomaly; and generating another API execution scenario that omits the identified APIs causing the anomaly for the execution.
- 16 . The system of claim 9 , wherein the processor is configured to facilitate the user query handling, by recording user queries, query execution results, execution logs, and success/failure information as the user query history.
Description
BACKGROUND Field The present disclosure is generally directed to Application Programming Interfaces (APIs), and more specifically, to adaptive API integration frameworks. Related Art Many companies are engaging in digital transformation. Digital transformation is an initiative that aims to improve operational efficiency and create added value by leveraging digital technologies. The core of digital transformation lies in integrating various systems and the data sharing. In addition to data from relational databases (RDB), time-series databases and object storage, there is also data obtained via APIs. By combining various sources of data, it becomes possible to utilize data across different business areas. For example, in the railway industry, different business systems are used depending on the type of operation. In vehicle manufacturing, Enterprise Resource Planning (ERP) systems, Product Lifecycle Management (PLM) systems, and Manufacturing Execution Systems (MES) are employed. For railway operations, automatic train control systems and train operation management systems are used, while maintenance operations rely on rolling stock condition monitoring systems and infrastructure condition monitoring systems. Data from these systems can be obtained from databases such as Relational Databases (RDBs), files such as Comma-Separated Values (CSVs) and Extended Markup Language (XMLs), or through APIs uniquely defined by each business system. Although the railway industry is used as an example, various business systems and APIs exist across multiple operations in other industries as well. This invention focuses on data acquisition through APIs. Users aim to leverage the data from these systems to improve their operations. A data utilization platform is required to provide consistent data handling and system integration with these systems. Generally, each system has numerous APIs, and different data can be retrieved by specifying different endpoints and execution parameters. Since the endpoints and parameters are diverse, users often struggle to determine how to execute the APIs to obtain the desired data. They must carefully read manuals and go through trial and error to acquire the required data, which presents a significant challenge. Furthermore, in some cases, the desired data cannot be obtained through a single API execution but requires a combination of multiple API executions. An example of this is data integration in maintenance operations. For instance, if a user wants to track changes in the condition of a railway vehicle since the last maintenance, they must extract relevant API execution candidates related to maintenance data, railway vehicle operation data, and vehicle condition data and then determine the sequence in which these APIs should be executed. In the related art, there are systems and methods for determining the execution order of multiple APIs. Such systems and methods allow users to select multiple APIs and specify a call order relation between them based on API specifications or usage history. It then determines the execution order of the APIs, considering factors such as parallel execution, error rates, and latency, to improve efficiency and reduce execution costs. In another related art implementation, there are systems and methods for integrating and managing API executions in a gateway device. Such related art systems and methods facilitate a client device to set execution types for multiple APIs, registering them as an API service. It supports executing APIs in parallel or in series without requiring direct API calls from the client. By managing API execution through a gateway, it minimizes traffic and optimizes service execution. SUMMARY In the above related art implementations for executing multiple APIs, such implementations determine the call order based on API specifications or predefined scenarios, enabling efficient data utilization. However, the selection of APIs and the creation of scenarios are static processes that require manual intervention by the user. In example implementations described herein, by utilizing LLMs to generate API execution scenarios, it becomes possible to enable automated and dynamic API execution, addressing the limitations of conventional methods. Example implementations described herein can facilitate automated API integration and scenario generation. Instead of manually reading through API manuals and experimenting with various endpoints and parameters, the system in example implementations described herein leverages natural language processing and machine learning algorithms to dynamically generate API descriptions and execution scenarios. This automation not only saves time but also reduces errors in the API selection process. Example implementations described herein can facilitate enhanced efficiency and reduced costs. By analyzing historical user queries, execution logs, and performance data, the system in example implementations described here