API arrangement method and system
By creating integrated workflows through API orchestration methods and configuring input and output components and data processing components, the problems of poor system integration scalability and high maintenance costs are solved, cross-system data exchange and sharing are achieved, and business efficiency and API stability are improved.
Patent Information
- Application Number
- CN202511195369.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-08-26
AI Technical Summary
The existing system integration methods have problems such as poor scalability, high maintenance costs, lack of unified standards and protocols, data redundancy and inconsistency, and lack of centralized monitoring and visualization, which makes it difficult to uniformly view system status and respond to failures in a timely manner.
Adopting the API orchestration method, we create an integrated workflow as a process container, configure the input component to receive data from the data source, add data processing components for conversion and filtering, configure the output component to transmit to the target interface, generate a callable API, and optimize the integration process through the scenario-based process container template library and adaptive component recommendation mechanism.
It reduces the complexity and maintenance costs of system integration, improves business efficiency and scalability, ensures the functional integrity and stability of the API, and enables cross-system data exchange and sharing.
Smart Images

Figure CN120705206A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing and interface orchestration, and specifically to an API orchestration method and system. Background Art
[0002] As enterprises advance their digital transformation, the number of systems they use continues to grow, with a steady stream of expansion and adjustments underway. Complex business relationships exist between these systems, creating a significant demand for integration. Effective system integration can break down data silos and enable cross-system data exchange and sharing. This is crucial for improving business efficiency and decision-making accuracy, helping companies better respond to market changes and competition.
[0003] Currently, a point-to-point approach is primarily used to address system integration needs. In this approach, each application system requires independent connections to other related systems. For example, if system A has business relationships with systems B, C, and D, connections must be established with each of these three systems separately. Furthermore, integration between these different systems often lacks unified standards and protocols, requiring each connection to be configured and managed individually. Regarding monitoring, since each system has independent connections and interfaces, monitoring points are dispersed, and the status of each connection can only be viewed separately.
[0004] However, this point-to-point integration approach has significant shortcomings. First, it suffers from poor scalability and high maintenance costs. Systems are highly coupled with each other. When adding or adjusting business requirements for a system, all associated integration connections need to be re-established or modified. As integration points increase, the number of integration paths and interfaces increases exponentially, dramatically increasing integration complexity, significantly increasing maintenance workload, and being error-prone. Second, it can lead to data redundancy and inconsistency, increasing the complexity of data management. Furthermore, the lack of unified standards and protocols can lead to interface incompatibility and inconsistent data formats. Finally, the lack of centralized monitoring and visualization makes it difficult to uniformly view the monitoring status, data flows, and interface status of all systems. When system failures or data issues occur, it's difficult to promptly detect and implement effective countermeasures. Summary of the Invention
[0005] In order to break data silos, build a one-stop hybrid integration platform, realize cross-system data exchange and sharing, and improve business efficiency, this application provides an API orchestration method and system.
[0006] In a first aspect, the present application provides an API orchestration method, comprising: Create integrated workflows as process containers; Configuring an input component in the integration workflow to receive data from a data source, the input component including an offline input component and a real-time input component; Adding a data processing component to the integrated workflow, wherein the data processing component includes a data conversion component, a data filtering component and a data rule engine; configuring an output component in the integration workflow to transmit the processed data to a target interface; A callable API is generated based on the integration workflow.
[0007] By adopting the above solution, an integrated workflow is created as a process container, a unified integration platform is built, and the complexity of integration is reduced; input components are configured to receive data from the data source, and the input method can be flexibly selected according to the business requirements for timeliness to meet the data acquisition needs of different scenarios; data processing components including data conversion, filtering components and data rule engines are added to convert, filter, and aggregate the input data and process the data according to specified rules; output components are configured to transmit the processed data to the target interface to realize cross-system data exchange and sharing; callable APIs are generated based on the integrated workflow to improve API reuse and enhance business efficiency.
[0008] Preferably, it also includes: Build a scenario-based process container template library; the integrated workflow corresponding to each scenario-based process container template includes: the preset number of workflow nodes, the preset application business scenario, and the preset data flow direction; When creating an integrated workflow as a process container, design a business scenario selection template and receive the selected business scenario. Then, select a scenario-based process container template that meets the business scenario from the scenario-based process container template library and recommend it. Set up a scenario-based adaptive component recommendation mechanism to proactively recommend input components that are suitable for the preset business scenario data source, as well as data processing components and output components associated with the suitable input components; Under the condition that the integrated workflow is created according to the recommended scenario-based process container template, the input component recommendation that is compatible with the preset business scenario data source is actively triggered during the process of configuring the input component in the integrated workflow; under the condition that the input component configuration is completed according to the recommended input component that is compatible with the preset business scenario data source, the data processing component recommendation associated with the compatible input component is actively triggered during the process of adding the data processing component in the integrated workflow, and the output component recommendation associated with the compatible input component is actively triggered during the process of configuring the output component in the integrated workflow.
[0009] By adopting the above solution, building a scenario-based process container template library and recommending suitable templates when creating process containers, users can quickly build integrated workflows based on the preset number of nodes, business scenarios, and data flows, thereby improving the efficiency of workflow creation. A scenario-based adaptive component recommendation mechanism is set up to actively recommend appropriate components during the configuration of input components, data processing components, and output components, reducing the workload of users in manually selecting components, reducing the probability of errors, further improving the efficiency and accuracy of API orchestration, and better adapting to the needs of different business scenarios.
[0010] Preferably, it also includes: After the API is generated, a test verification process is executed; the test verification can be performed using any of the test methods: single test, timed test, and stress test; After the verification test passes, the generated API is published to support user calls; otherwise, an error warning of the currently generated API is generated.
[0011] By adopting the above solution, the generated API is tested and verified in multiple ways to ensure that its functions and performance meet the requirements before it is released, which improves the reliability and stability of the API. At the same time, errors in the API generation process can be discovered and warned in a timely manner.
[0012] Preferably, the execution test verification process includes: Generate multi-dimensional test cases based on the generated API and execute test cases; the multi-dimensional test cases include: single-node function verification cases for testing whether the independent functions of each component are normal, and node linkage verification cases for testing whether the data flow between the components of multi-node collaboration is correct; Obtain test reports that record the success or failure of tests in different dimensions and the types of test failures, including: the types of input component function verification failures, data processing component function verification failures, output component function verification failures, and data flow verification failures between component combinations; compile statistics on test failure types in different dimensions, and obtain preset optimization strategies for corresponding components or component combinations based on the test failure types in different dimensions; According to the matched preset optimization strategy, complete the optimization of the corresponding components or component combinations.
[0013] By adopting the above solution, single-node function verification cases and node linkage verification cases are generated and tested automatically, comprehensively detecting the functions of components in API orchestration and the data flow between component combinations from different dimensions, and then obtaining test reports containing multiple failure types; based on the failure type, matching component or component combination optimization strategies are obtained and optimized, thus solving problems in the API orchestration system in a targeted manner and improving the reliability of the API.
[0014] Preferably, it also includes: For the generated API, the API interface call status is counted and displayed. The API interface call status includes the number of calls, call volume trend changes, number of successful calls, successful call response time and number of call failures.
[0015] By adopting the above solution, the generated API can be statistically analyzed and displayed in multiple dimensions to help understand the API usage, performance, and operational stability, and to promptly identify potential problems.
[0016] Preferably, it also includes: Based on the statistical API interface call situation, determine whether there is a preset call phenomenon, and obtain the existing preset call phenomenon and its type; the preset call phenomenon includes: the weekly growth rate of call volume is greater than the preset growth rate, the call failure rate is greater than the preset failure rate and lasts for a preset period of time, and the call success response time is longer than the preset response time; For the acquired existing preset call phenomena and their types, corresponding process container and component optimization strategies that match the current preset call phenomenon types are acquired; the process container and component optimization strategies include: a process container replica increase optimization strategy that matches a weekly call volume growth rate greater than a preset growth rate, a component testing and repair optimization strategy that matches a call failure rate greater than a preset failure rate and lasting for a preset duration, and a data processing component optimization strategy that matches a call success response time greater than a preset response time. According to the matched process container and component optimization strategy, complete the optimization of the corresponding process container and components.
[0017] By adopting the above solution, the statistical API interface call situation is analyzed to determine whether there is a preset call phenomenon, and then the matching process container and component optimization strategy is obtained, and finally the optimization of the corresponding process container and components is completed to ensure the efficient and stable operation of the API.
[0018] Preferably, it also includes: During the configuration of the input component in the integrated workflow, a custom token authentication component is set before the input component to obtain the group token and pass it to the input component; or the token value is directly injected into the input component through environment variable configuration.
[0019] By adopting the above solution, when configuring the input component in the integration workflow, a custom token authentication component is used to obtain the group token or the token value is injected through the environment variable configuration to achieve integration with the group identity authentication system, enhance the single sign-on function during system integration, and ensure the security of data transmission.
[0020] Preferably, in the process of creating an integrated workflow as a process container, the development and packaging of the sub-container corresponding to the workflow is set. When creating the main container corresponding to the integrated workflow, the sub-container corresponding to the existing sub-workflow is directly imported to complete the creation of the nested integrated workflow.
[0021] By adopting the above solution, the creation of nested integrated workflows is realized, existing sub-workflows can be reused, the development efficiency of integrated workflows is improved, and the workload of repeated development is reduced.
[0022] Preferably, the data rule engine supports the development of custom rules, and the custom rules implement data processing logic through scripting language or preset function library.
[0023] By adopting the above solution, users' diverse and personalized data processing needs can be met, and rules suitable for themselves can be developed based on actual business conditions, thereby improving the pertinence and effectiveness of data processing.
[0024] In a second aspect, the present application provides an API orchestration system, including: Workflow creation module, used to create integrated workflows as process containers; A workflow configuration module is configured to configure input components in the integrated workflow to receive data from a data source, the input components including an offline input component and a real-time input component; add data processing components in the integrated workflow, the data processing components including a data conversion component, a data filtering component, and a data rule engine; and configure output components in the integrated workflow to transmit processed data to a target interface; The API management module generates a callable API based on the integrated workflow.
[0025] By adopting the above solution, an integrated workflow is created as a process container to unify the management of the connections between multiple systems and technologies, simplify the integration process, and reduce the workload of development and maintenance; the configured input components can flexibly select data input methods according to business needs to meet different timeliness requirements; data processing components are added to convert and filter input data and process data according to specified rules; output components are configured to transmit processed data to the target interface to achieve cross-system data exchange and sharing; and callable APIs are generated based on the integrated workflow to break data silos and improve business efficiency.
[0026] In summary, this application has the following beneficial effects: 1. By creating integrated workflows and configuring input, output, and data processing components, the connection between multiple systems and technologies is simplified, reducing integration complexity. Input, processing, and output components can be flexibly configured according to business needs, supporting integration tasks of varying scales and complexities, improving scalability and flexibility. Based on the integrated workflow, callable APIs are generated to automate the integration process, reduce manual intervention, lower error rates, and improve business efficiency. 2. Conduct comprehensive and diverse testing and verification of generated APIs to ensure their functional integrity, stability, and reliability. This includes testing and verifying the data flow of each component function and component combination in the API orchestration. Accurately match optimization strategies based on failure types identified in test reports to optimize components or component combinations, thereby improving the quality and stability of API orchestration. 3. Visually present the overall situation of API interface calls, which helps to promptly discover possible problems in the API calling process; detect abnormal calls based on the API interface call situation, and then obtain matching optimization strategies to optimize process containers and components to ensure stable and efficient operation of the API. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flowchart of the API arrangement method described in a specific embodiment; Figure 2 Schematic diagram of the structure of the API orchestration system described in a specific embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0029] This application mainly adopts the solution of creating an integrated workflow to generate a callable API, which reduces the complexity of system integration, improves business efficiency and scalability. The following is a further detailed description of this application.
[0030] like Figure 1 As shown, an embodiment of the present application discloses an API orchestration method, including: creating an integrated workflow, configuring input components, adding data processing components, configuring output components, and generating a callable API.
[0031] Among them, an integrated workflow is created as a process container to provide a basic framework for subsequent data processing and circulation; input components are configured in the integrated workflow to receive data from the data source, and appropriate data input methods are selected according to different needs; data processing components are added to perform operations such as conversion and filtering on the data to ensure data accuracy and availability; output components are configured to transmit processed data to the target interface to achieve effective data output; a callable API is generated based on the integrated workflow to facilitate calls and integration between different systems, achieving the beneficial effects of simplifying the system integration process, improving data processing efficiency, and realizing data circulation and sharing between systems. Each step will be explained in detail below.
[0032] S1. Create an integrated workflow as a process container.
[0033] Specifically, you create an integrated workflow by accessing the integrated workflow interface and creating a new application. This new application, serving as a process container, can utilize a visual interface for easy operation and management. For example, on some integration platforms, users can quickly create a new integrated workflow by simply dragging and dropping and configuring it.
[0034] S2. Configure an input component in the integration workflow to receive data from a data source.
[0035] Specifically, data input is controlled by the integrated workflow input component. The integrated workflow provides multiple ways of data input, mainly including offline input and real-time input, and provides configurable offline input components and real-time input components to support users to configure the selected input components in the integrated workflow.
[0036] Among them, offline input components include: API input, Oracle input, MySQL input, DAMO input, WebService input, dynamic table input, library-table synchronization input, etc. Taking API input as an example, configure the target API information to obtain the corresponding data. When configuring the target API information, you need to specify parameters such as the API URL and request method. For example, when you need to obtain data from a specific API, you can enter the API URL in the API input component and select the appropriate request method, such as GET or POST. Or taking database input as an example, you need to first configure the data source related information and then select the target table. For example, for MySQL database input, configure the database connection address, user name, password and other information, and then select the table from which to obtain data.
[0037] Real-time input components include Oracle, MySQL, DAMO, Kafka, RabbitMQ, and MQTT. Configure the data source information on the data source side, and the table or topic to be monitored on the component side. For example, for the Kafka real-time input component, you need to configure the Kafka server address, port, and other information on the Kafka data source side, and configure the topic to be monitored on the component side. The component then retrieves data from that topic in real time.
[0038] In addition, if single sign-on is required during system integration to achieve integration with the group identity authentication system, it is necessary to use a custom token authentication component of the integration workflow. That is, when configuring the input component in the integration workflow, set a custom token authentication component before the input component to obtain the group token and pass it to the input component; or directly inject the token value into the input component through environment variable configuration.
[0039] S3. Add a data processing component to the integrated workflow.
[0040] Specifically, the data processing and conversion is carried out by the integrated workflow data processing component to convert, filter, aggregate and perform other operations on the input data in the integrated workflow, such as: conventional data processing and conversion (such as: data merging, data grouping, data deduplication, data sorting, data filtering, data cleaning and conversion, data dictionary conversion, data encryption, data desensitization, data summary calculation, field name mapping, field value mapping, field value merging, field value calculation, column splitting into multiple rows, column splitting into multiple columns, column to row, row to column, row-by-row splitting output, sequence generation, etc.), format conversion (such as: JSON converter, XML to JSON, JSON to XML, etc.), script processing (such as: executing SQL scripts, executing Java scripts, executing Java rules, calling JavaBeans, executing Shell scripts, etc.), logical processing (such as: start, end, variable setting, auto-increment setting, parallel processing, Try / Catch processing, timer, loop container, sub-process, debug log, etc.), and built-in diverse data rule engines to provide field-specific data processing for data integration.
[0041] Accordingly, addable data processing components include: data conversion components, data filtering components, and data rule engines, etc., to support the addition of data processing components in the integrated workflow. Among them, the data conversion component can perform operations such as format conversion and field mapping on the data. For example, when the data field names between different systems are inconsistent, the field name mapping component can be used to map the field names in one system to the field names in another system. Among them, the data filtering component can filter the data according to the set conditions to reduce unnecessary data processing. For example, when processing task data, you can set filtering conditions to only retain tasks and plans at the second level and below.
[0042] Among them, the data rule engine has built-in diverse data rules, including data desensitization rules (such as: email desensitization, mobile phone number desensitization, card number desensitization, ID number desensitization, name desensitization, address information desensitization, license plate number desensitization, general desensitization, etc.), data completion rules (such as: character replacement, phone number completion to 11 digits, character length completion to specified length, etc.), data conversion rules (such as: field string to number, clear spaces at both ends, truncate characters after the symbol, truncate characters before the symbol, replace string 1.0, time integer to string, letter case conversion, amount to uppercase, string truncation, clear space characters, date formatting, MD5 encryption, field value replacement with global variable or other field value, string truncation value between two characters, truncate string with specified start and end positions, remove ASCII encoded characters and spaces at both ends, string replacement with new string 2.0, truncate string of specified length, convert string true, false to boolean type, Field data type conversion, conversion of JSON characters to fields in the data stream, time formatting to ISO8601 standard UTC format, character set conversion, Unicode character decoding rules, date change by n days, etc.), data generation rules (such as generating a 6-digit random number, current time, randomly generated time, randomly generated Chinese name, randomly generated email address, generating a 24-bit unique number, generating a 32-bit globally unique UUID, adding a constant to generate a random number, adding and subtracting the current date, adding and subtracting the month of the current date, adding and subtracting the current year, adding and subtracting the second of the current date, generating offset time, obtaining the current day's cut date, etc.), data quality rules (such as NULL value detection, empty string detection, minimum length detection, detecting whether a mobile phone number is legal, detecting whether an ID number is legal, detecting whether an email address is legal, detecting whether it is a number, etc.), and other business rules (such as appending all variables to the last line of the data stream, string segmentation, etc.).
[0043] In addition, the data rule engine also supports the development of custom rules, which implement data processing logic through scripting languages or preset function libraries.
[0044] S4. Configuring an output component in the integration workflow to transmit the processed data to a target interface.
[0045] Specifically, the output component controls the data flow of the integrated workflow and can transmit the processed data to the target interface; configurable output components are provided, including: API output, database output component, and message output component, etc., to support users to configure the selected output components in the integrated workflow.
[0046] For API output, you need to configure the target API address and output parameter mapping to pass the data flow in the process to the API; when you need to send the processed data to another API, you can configure the mapping relationship between the target API address and output parameters in the API output component. Among them, the database output components include: Oracle output, MySQL output, DAMO output, dynamic table output, library-table synchronization output, etc., and you need to select the target data source and table and other configuration information; for example, for Oracle database output, you need to select the Oracle database and the corresponding table to which the data will be written. Among them, the message output components include: Kafka output and Elasticsearch output, and you need to select the target data source and configure the topic or index; for example: for Kafka message output, users need to select the Kafka data source and configure the topic to which the message will be sent.
[0047] S5. Generate a callable API based on the integrated workflow.
[0048] Specifically, when generating a callable API based on an integrated workflow, there is no need to write interface code. Based on the workflow, configure relevant information, retain the workflow configuration, and the system automatically generates a DSL description file to directly create the API interface.
[0049] Through the above embodiment, through the unified management of integrated workflows, it is possible to easily configure and adjust various components to achieve data input, processing, and output from different data sources. The following example uses the integration of the Agile Collaboration Management System applet into the ACM system. The Agile Collaboration Management System is an enterprise's internal task management system, primarily used for the management of work schedule tasks, and has a multi-level task structure. The ACM system is the enterprise's management system. The specific implementation steps are as follows: In the AIP integration platform, first create an integration application named "Agile-ACM" integration.
[0050] Add and configure the API input component, including: Component Type: API Input; Request Method: GET, API URL: http: / / 127.0.0.1:8765 / api / plan / task / {projectCode} / all / query; Authentication Method: Token Authentication; Header Parameters: Authorization: {Authorization} (pass the authentication token through a variable); API Input Parameters: projectCode: {projectCodeVar} (pass the project code through a variable); Field Selection: Select the API field data set to be received, including project data (project), task data (taskPos), and deliverable data (delvPos); Data Structure: API return data is a Map<String,Object> The object contains three data sets: project: project data, including fields such as projectCode and projectName; taskPos: task data, including fields such as task_id, task_name, planLevel, and status; delvPos: deliverable data, including fields such as delvId, delvName, delvStatus, and task_id (associated task ID); online test configuration: set the test parameter projectCode to xxx-xxx to verify whether the data structure returned by the API meets expectations.
[0051] Add and configure data processing components, including: Time processing: In the API input component, on the output field side, find the start (planStartTime) and completion (planEndTime) time fields of the task, bind the two fields to the data conversion rules, select the "Date change n days" rule, specify the date format yyyy-MM-dd HH:mm:ss, and set the parameter value to 5. At this time, the processing of the task start and completion time delay requirements can be completed; Data filtering processing: After pulling the data through the API input component, filter the data first to reduce unnecessary data processing and thus improve efficiency. Add a data filter component, add new conditions on the filter condition page, and configure the condition fields that need to be filtered. Here, the task plan field is planLevel, set the operator to ">", set the comparison value to 1 according to the requirements, and filter out the tasks and plans of the second level and below; field mapping processing: after filtering out the target task data, map the fields according to the requirements, add a field name mapping component, and perform a mapping operation on the fields that need to be processed on the field mapping configuration page, map the task_id field to the project_task_id field, and map the task_name field to project_task_name; task name adding system identification processing: add a field value merge component, click the field configuration page, select the task name field (project_task_name) according to the requirements, splice and add the system identification to complete the mapping of a field value , processing of task names; calculation and processing of task completion rate under the project: task completion status is recorded in complete_pct, 100 means that the task represented by this data has been completed, the total number of complete_pct=100 is the number of completed tasks, divided by the total number of tasks under the project, it is the task completion rate under the project, use the data summary calculation component to calculate the number of completed tasks complete_num and the total number of tasks all_num respectively; at this time, according to the obtained number of completed tasks and the total number of tasks, add a field value calculation component, in the field configuration page, select the calculated field A=complete_num, field B=all_num, select the calculation symbol as A / B, and set the calculation result to remark as required. At this time, the calculation of the task completion rate under the project is completed and saved in the remark field.
[0052] Add and configure the API output component. Component type: API output; Request method: POST; API URL: http: / / xxx.xx.xxx.xx:19036 / api / plan / task / intgr / {projectCode} / update; Output data: Only output the Data rows in the stream data; Authentication method: Token authentication; Header information parameter: Authorization: {Authorization} (the authentication token is passed through a variable).
[0053] Save the workflow configuration and the system will automatically generate a DSL description file. Create an API and directly create the API interface based on the workflow configuration information, including the API name and URL request method. In addition, you can choose to run or single-step debug in the workflow and verify the correctness based on the log output. Once the workflow is verified, the API interface is created based on the workflow configuration information.
[0054] In a specific embodiment, in order to reduce the user's configuration workload and improve the efficiency of creating integrated workflows, a method is designed to automatically recommend appropriate process container templates and components based on the user's business scenario. The method further includes: Build a scenario-based process container template library; the integrated workflow corresponding to each scenario-based process container template includes: a preset number of workflow nodes, a preset application business scenario, and a preset data flow direction; for example, a process container template for an e-commerce business scenario has preset nodes such as order processing, inventory management, logistics tracking, and corresponding data flows.
[0055] When creating an integrated workflow as a process container, the system designs a business scenario and selects a template. After receiving the selected business scenario, the system recommends a scenario-specific process container template from the scenario-specific process container template library. For example, if a user creates an integrated workflow for e-commerce order processing, the system automatically recommends a process container template for the e-commerce business scenario.
[0056] A scenario-based adaptive component recommendation mechanism is set up to actively recommend input components that are compatible with the preset business scenario data source, and data processing components and output components associated with the compatible input components; wherein, the input components that are compatible with the preset business scenario data source, and the data processing components and output components associated with the compatible input components are obtained based on the analysis and statistics of users' selection of input components, processing components and output components under historical preset business scenario conditions, or by using deep learning algorithms to analyze and obtain user habits of users' selection of input components, data processing components and output components under historical preset business scenario conditions, and generate a TOPk recommendation combination.
[0057] Under the condition that the integrated workflow is created according to the recommended scenario-based process container template, the input component recommendation that is suitable for the preset business scenario data source is actively triggered during the configuration of the input component in the integrated workflow; for example: in the e-commerce business scenario, if the data source is the API of the e-commerce platform, the system will recommend the API input component.
[0058] Under the condition that the input component configuration is completed according to the recommended input component that is suitable for the preset business scenario data source, the data processing component recommendation associated with the suitable input component is actively triggered during the process of adding the data processing component in the integrated workflow, and the output component recommendation associated with the suitable input component is actively triggered during the process of configuring the output component in the integrated workflow; for example: after the API input component is selected, the related data processing components, such as data filtering components, field name mapping components, etc., and the corresponding output components, such as API output components, are recommended based on the data characteristics of the component.
[0059] In addition, when creating an integrated workflow as a process container, in addition to setting the scenario-based process container template library settings, in order to further improve the efficiency of creating an integrated workflow, the development and packaging of the sub-container corresponding to the workflow is constructed. When creating the main container corresponding to the integrated workflow, the sub-container corresponding to the existing sub-workflow is directly imported to complete the creation of a nested integrated workflow.
[0060] In a specific embodiment, to ensure the quality and stability of the generated API, reduce the possibility of errors in actual use, and improve the reliability and availability of the system, problems in the API and integration workflow are promptly discovered by executing a test verification process, and targeted optimization is performed based on the information provided in the test report. The method further includes: After the API is generated, a test verification process is executed; wherein, the test verification selects any one of the test methods of single test, scheduled test, and stress test; after the verification test passes, the generated API is released to support user calls; otherwise, an error warning of the currently generated API is generated. Specifically, the execution of the test verification process includes: if a single test is selected, based on the generated API, a test case is generated and the case test is automatically executed, the API information of the test case and the corresponding test case information are recorded, and the test results are obtained. If a scheduled execution case test is selected, the test plan configuration scheduling time and other information are added based on the test case to complete the scheduled scheduling of the API; if a stress test is selected, a large number of users are simulated to access the generated API interface at the same time, and its load capacity, performance bottlenecks, stability and other indicators are tested to determine whether the indicators meet the requirements.
[0061] In order to discover problems in API and integration workflows, and perform targeted optimization based on the information provided by the test report, a test verification process is designed based on the generated API, multi-dimensional test cases are generated, and case tests are performed. The multi-dimensional test cases include: single-node function verification cases for testing whether the independent functions of each component are normal, and node linkage verification cases for testing whether the data flow between component combinations during multi-node collaboration is correct; for example, for input components, single-node function verification cases can test whether they can normally receive data from the data source; for data processing processes where multiple components are combined, node linkage verification cases can test whether the data flow between components is correct.
[0062] Obtain a test report that records the success or failure of tests in different dimensions and the types of test failures, including: the type of input component function verification failure, the type of data processing component function verification failure, the type of output component function verification failure, and the type of data flow verification failure between component combinations; count the test failure types in different dimensions, and obtain the preset optimization strategies for the corresponding components or component combinations based on the test failure types in different dimensions; for example: if the test report shows that the input component function verification failed, the input component function verification failure type corresponds to the optimization strategy that matches the input component.
[0063] According to the matched preset optimization strategy, complete the optimization of the corresponding components or component combinations.
[0064] A specific embodiment ensures API performance and stability, meets the needs of different business scenarios, improves system adaptability and scalability, and promptly identifies API usage trends and existing problems by counting API call statistics. The process container and components are optimized based on preset call phenomena and corresponding optimization strategies. The method also includes: For generated APIs, collect and display API call statistics, including the number of calls, call volume trends, number of successful calls, successful call response times, and number of failed calls. For example, by setting up a statistics function in the integration platform, API call status can be recorded in real time and displayed in the form of charts or reports, allowing users to intuitively understand API usage.
[0065] In addition, in order to more intuitively view the situation of API calls, multi-dimensional analysis and recording of API call details will be carried out, including: API call volume TOP ranking (such as: statistics of the 10 API interfaces with the highest call volume, including interface information such as the proportion of call times; statistics of the top 10 interfaces sorted by average response time, including interface information, response time, etc.; statistics of the top 10 API interfaces sorted by the number of failures, including interface information under the corresponding system), real-time throughput curve, abnormal alarm list and other information.
[0066] In addition, for the statistical API interface call situation, determine whether there is a preset call phenomenon, and obtain the existing preset call phenomenon and its type; the preset call phenomenon includes: the weekly growth rate of call volume is greater than the preset growth rate, the call failure rate is greater than the preset failure rate and lasts for a preset period of time, and the call success response time is longer than the preset response time, etc. For the acquired existing preset call phenomena and their types, corresponding process container and component optimization strategies that match the current preset call phenomenon types are acquired; the process container and component optimization strategies include: a process container replica increase optimization strategy that matches a weekly call volume growth rate greater than a preset growth rate, a component testing and repair optimization strategy that matches a call failure rate greater than a preset failure rate and lasting for a preset duration, and a data processing component optimization strategy that matches a call success response time greater than a preset response time. According to the matched process container and component optimization strategy, complete the optimization of the corresponding process container and components; for example: if the weekly growth rate of call volume is greater than the preset growth rate, increase the number of copies of the process container to improve the processing capacity of the system; if the call failure rate is greater than the preset failure rate and lasts for the preset time, test and repair the relevant components.
[0067] like Figure 2 As shown, an API orchestration system includes: The workflow creation module 101 is used to create an integrated workflow as a process container; The workflow configuration module 102 is used to configure input components in the integrated workflow to receive data from data sources, the input components including offline input components and real-time input components; add data processing components in the integrated workflow, the data processing components including data conversion components, data filtering components, and data rule engines; and configure output components in the integrated workflow to transmit processed data to a target interface. The API management module 103 generates a callable API based on the integrated workflow.
[0068] In a specific embodiment, the system further includes: The API testing module 104 executes a test verification process after the API is generated; the test verification selects any test method among single test, timed test, and stress test; after the verification test passes, the generated API is released to support user calls; otherwise, an error warning of the currently generated API is generated.
[0069] In a specific embodiment, the system further includes: The workflow creation recommendation module 105 is used to build a scenario-based process container template library. Each scenario-based process container template corresponds to an integrated workflow including a preset number of workflow nodes, a preset application business scenario, and a preset data flow. When creating an integrated workflow as a process container, a business scenario selection template is designed and received. The scenario-based process container template that meets the business scenario is selected from the scenario-based process container template library and recommended. The workflow configuration recommendation module 106 is used to set up a scenario-based adaptive component recommendation mechanism, actively recommending input components that are compatible with the preset business scenario data source, and data processing components and output components associated with the compatible input components; under the condition that the integrated workflow creation is completed according to the recommended scenario-based process container template, actively triggering the recommendation of input components that are compatible with the preset business scenario data source during the process of configuring the input components in the integrated workflow; under the condition that the input component configuration is completed according to the recommended input components that are compatible with the preset business scenario data source, actively triggering the recommendation of data processing components associated with the compatible input components during the process of adding data processing components in the integrated workflow, and actively triggering the recommendation of output components associated with the compatible input components during the process of configuring the output components in the integrated workflow.
[0070] In a specific embodiment, the API management module 103 in the system is further used to count and display the API interface call status for the generated API, and the API interface call status includes the number of calls, the trend change of the call volume, the number of successful calls, the successful call response time, and the number of failed calls; it is also used to determine whether there is a preset call phenomenon based on the counted API interface call status, and obtain the existing preset call phenomenon and its type; the preset call phenomenon includes: the weekly growth rate of call volume is greater than the preset growth rate, the call failure rate is greater than the preset failure rate and continues for a preset time, and the successful call response time is greater than the preset response time; for the obtained existing preset call phenomenon and its type, the process container and component optimization strategy that matches the current existing preset call phenomenon type is obtained; the process container and component optimization strategy includes: a process container copy addition optimization strategy that matches the weekly growth rate of call volume greater than the preset growth rate, a component testing and repair optimization strategy that matches the call failure rate greater than the preset failure rate and continues for a preset time, and a data processing component optimization strategy that matches the successful call response time is greater than the preset response time; according to the matched process container and component optimization strategy, the optimization of the corresponding process container and component is completed.
[0071] The embodiment of the present application also discloses a computer-readable storage medium.
[0072] Specifically, the computer-readable storage medium stores a computer program that can be loaded by a processor and executes the above-mentioned API arrangement method. The computer-readable storage medium includes, for example: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0073] The embodiment of the present application also discloses a computer device.
[0074] Specifically, the computer device includes a memory and a processor, and the memory stores a computer program that can be loaded by the processor and execute the above-mentioned API arrangement method.
[0075] The above are all preferred embodiments of the present application and are not intended to limit the scope of protection of this application. Unless otherwise stated, any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features. In other words, unless otherwise stated, each feature is merely an example of a series of equivalent or similar features.
Claims
1. A method for arranging an API, characterized in that: include: Create integrated workflows as process containers; Configuring an input component in the integration workflow to receive data from a data source, the input component including an offline input component and a real-time input component; Adding a data processing component to the integrated workflow, wherein the data processing component includes a data conversion component, a data filtering component and a data rule engine; configuring an output component in the integration workflow to transmit the processed data to a target interface; A callable API is generated based on the integration workflow.
2. The API arrangement method according to claim 1, characterized in that: Also includes: Build a scenario-based process container template library; The integrated workflow corresponding to each scenario-based process container template includes: the preset number of workflow nodes, the preset application business scenario, and the preset data flow direction; When creating an integrated workflow as a process container, design a business scenario selection template and receive the selected business scenario. Then, select a scenario-based process container template that meets the business scenario from the scenario-based process container template library and recommend it. Set up a scenario-based adaptive component recommendation mechanism to proactively recommend input components that are suitable for the preset business scenario data source, as well as data processing components and output components associated with the suitable input components; Under the condition that the integrated workflow is created according to the recommended scenario-based process container template, the input component recommendation that is compatible with the preset business scenario data source is actively triggered during the process of configuring the input component in the integrated workflow; under the condition that the input component configuration is completed according to the recommended input component that is compatible with the preset business scenario data source, the data processing component recommendation associated with the compatible input component is actively triggered during the process of adding the data processing component in the integrated workflow, and the output component recommendation associated with the compatible input component is actively triggered during the process of configuring the output component in the integrated workflow.
3. The API arrangement method according to claim 1, characterized in that: Also includes: After the API is generated, a test verification process is performed; The test verification can be performed by any test method including single test, timed test and stress test; After the verification test passes, the generated API is published to support user calls; otherwise, an error warning of the currently generated API is generated.
4. The API arrangement method according to claim 3, characterized in that: The execution test verification process includes: Generate multi-dimensional test cases based on the generated API and execute test cases; the multi-dimensional test cases include: single-node function verification cases for testing whether the independent functions of each component are normal, and node linkage verification cases for testing whether the data flow between the components of multi-node collaboration is correct; Obtain test reports that record the success or failure of tests in different dimensions and the types of test failures, including: the types of input component function verification failures, data processing component function verification failures, output component function verification failures, and data flow verification failures between component combinations; compile statistics on test failure types in different dimensions, and obtain preset optimization strategies for corresponding components or component combinations based on the test failure types in different dimensions; According to the matched preset optimization strategy, complete the optimization of the corresponding components or component combinations.
5. The API arrangement method according to claim 1, characterized in that: Also includes: For the generated API, the API interface call status is counted and displayed. The API interface call status includes the number of calls, call volume trend changes, number of successful calls, successful call response time and number of call failures.
6. The API arrangement method according to claim 5, characterized in that: Also includes: Based on the statistical API interface call situation, determine whether there is a preset call phenomenon, and obtain the existing preset call phenomenon and its type; The preset call phenomena include: the weekly growth rate of call volume is greater than the preset growth rate, the call failure rate is greater than the preset failure rate and lasts for a preset period of time, and the call success response time is longer than the preset response time; For the acquired existing preset call phenomena and their types, corresponding process container and component optimization strategies that match the current preset call phenomenon types are acquired; the process container and component optimization strategies include: a process container replica increase optimization strategy that matches a weekly call volume growth rate greater than a preset growth rate, a component testing and repair optimization strategy that matches a call failure rate greater than a preset failure rate and lasting for a preset duration, and a data processing component optimization strategy that matches a call success response time greater than a preset response time. According to the matched process container and component optimization strategy, complete the optimization of the corresponding process container and components.
7. The API arrangement method according to claim 1, characterized in that: Also includes: During the configuration of the input component in the integrated workflow, a custom token authentication component is set before the input component to obtain the group token and pass it to the input component; Or inject the Token value directly into the input component through environment variable configuration.
8. The API arrangement method according to claim 1, characterized in that: Also includes: When creating an integrated workflow as a process container, set up the development and packaging of the sub-container corresponding to the workflow. When creating the main container corresponding to the integrated workflow, directly import the sub-container corresponding to the existing sub-workflow to complete the creation of the nested integrated workflow.
9. The API arrangement method according to claim 1, characterized in that: The data rule engine supports the development of custom rules, and the custom rules implement data processing logic through scripting language or preset function library.
10. An API orchestration system, characterized in that: include: Workflow creation module, used to create integrated workflows as process containers; A workflow configuration module is configured to configure input components in the integrated workflow to receive data from a data source, the input components including an offline input component and a real-time input component; add data processing components in the integrated workflow, the data processing components including a data conversion component, a data filtering component, and a data rule engine; and configure output components in the integrated workflow to transmit processed data to a target interface; The API management module generates a callable API based on the integrated workflow.
Citation Information
Patent Citations
System for dynamically arranging real-time data integration workflow
CN117557081A
Production information integration system based on visual configuration
CN119536170A
Global service integration platform
CN119759330A
Service arranging and scheduling method based on event driving
CN120013163A
System and method for performing end-to-end simulation and testing of an IoT application
US20220365868A1