An API orchestration method and system
By creating integrated workflows and configuration components, callable APIs are generated, solving the scalability and monitoring challenges of system integration, enabling cross-system data exchange and sharing, and improving business efficiency and API reliability.
Patent Information
- Application Number
- CN202511195369.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-08-26
AI Technical Summary
In existing technologies, system integration methods suffer from poor scalability, high maintenance costs, and a lack of unified standards and protocols, leading to data redundancy and inconsistency, making it difficult to monitor uniformly and to detect and respond to system failures in a timely manner.
By creating an integrated workflow as a process container, configuring input components, data processing components, and output components, generating callable APIs, building a scenario-based process container template library, setting an adaptive component recommendation mechanism, and conducting multi-dimensional testing and verification as well as API call statistics.
It reduces the complexity of system integration, improves business efficiency and scalability, enhances the reliability and stability of APIs, reduces error rates, and enables cross-system data exchange and sharing.
Smart Images

Figure CN120705206B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing and interface orchestration, in particular to an API orchestration method and system. BACKGROUND
[0002] With the advancement of enterprise digital transformation, the number of company applications is increasing, and is in orderly expansion and adjustment. There are complex business association relationships between systems, which generates a large number of integration needs. Effective system integration can break down data silos, realize cross-system data exchange and sharing, and is of great significance to improving the business efficiency and decision-making accuracy of enterprises, and helps enterprises better cope with market changes and competition.
[0003] Currently, when dealing with system integration needs, the main method is point-to-point integration. Under this method, each application system needs to establish independent connections with other related systems. For example, if system A has business associations with systems B, C and D, it needs to establish connections with these three systems respectively. Moreover, the integration between different systems often lacks unified standards and protocols, and each connection needs to be configured and managed separately. In terms of monitoring, since each system is an independent connection and interface, the monitoring points are scattered, and only the status of each connection can be viewed separately.
[0004] However, this point-to-point integration method has obvious shortcomings. First, it has poor scalability and high maintenance cost. There is a high degree of coupling between systems, and when a system's business needs are added or adjusted, all the associated integration connections need to be re-established or modified. With the increase in integration points, the integration path and interface will increase exponentially, the complexity of integration will increase dramatically, the maintenance workload will increase significantly, and errors are likely to occur. Second, it may lead to data redundancy and inconsistency, increasing the complexity of data management. Third, it lacks unified standards and protocols, which may lead to interface incompatibility and data format inconsistency. Finally, it lacks centralized monitoring and visualization, making it difficult to view the monitoring status of all systems, data flow and interface working status, and when system failures or data problems occur, it is difficult to discover and take effective measures in a timely manner. SUMMARY
[0005] In order to break down data silos, build a one-stop hybrid integration platform, realize cross-system data exchange and sharing, and improve business efficiency, the present application provides an API orchestration method and system.
[0006] In a first aspect, the present application provides an API orchestration method, comprising:
[0007] creating an integration workflow as a process container;
[0008] configuring an input component in the integrated workflow to receive data of a data source, the input component including an offline input component and a real-time input component;
[0009] adding a data processing component in the integrated workflow, the data processing component including a data conversion component, a data filtering component, and a data rule engine;
[0010] configuring an output component in the integrated workflow to transmit processed data to a target interface;
[0011] generating a callable API based on the integrated workflow.
[0012] By adopting the above scheme, an integrated workflow is created as a process container to build a unified integration platform and reduce the complexity of integration; the input component is configured to receive data of a data source, which can flexibly select an input mode according to the timeliness requirement of a business to meet the data acquisition requirement of different scenarios; the data processing component including a data conversion component, a data filtering component, and a data rule engine is added to convert, filter, and aggregate the input data and process the data according to a specified rule; the output component is configured to transmit the processed data to a target interface to realize cross-system data exchange and sharing; and the callable API is generated based on the integrated workflow to improve API reuse and business efficiency.
[0013] Preferably, the method further comprises:
[0014] building 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 direction;
[0015] when the integrated workflow is created as a process container, designing a business scenario selection template and receiving a selected business scenario, selecting a scenario-based process container template conforming to the business scenario from the scenario-based process container template library to recommend;
[0016] setting a scenario-based adaptive component recommendation mechanism to actively recommend an input component adaptive to a preset business scenario data source, a data processing component associated with the adaptive input component, and an output component associated with the adaptive input component;
[0017] when the integrated workflow is created according to the recommended scenario-based process container template, actively triggering the recommendation of the input component adaptive to the preset business scenario data source in the process of configuring the input component in the integrated workflow; when the input component is configured according to the recommended input component adaptive to the preset business scenario data source, actively triggering the recommendation of the data processing component associated with the adaptive input component in the process of adding the data processing component in the integrated workflow, and actively triggering the recommendation of the output component associated with the adaptive input component in the process of configuring the output component in the integrated workflow.
[0018] By adopting the above scheme, the scenario-based process container template library is constructed and a suitable template is recommended when creating a process container, so that the user can quickly build an integrated workflow according to the preset number of nodes, business scenarios and data flow direction, and the efficiency of creating a workflow is improved; the scenario-based adaptive component recommendation mechanism is set, and appropriate components are actively recommended during the configuration of input components, data processing components and output components, thereby reducing the workload of manually selecting components by the user, reducing the error probability, further improving the efficiency and accuracy of API arrangement, and better adapting to different business scenario requirements.
[0019] Preferably, it further comprises:
[0020] After the API is generated, a test verification process is performed; the test verification selects any one of single test, timing test and stress test;
[0021] After the verification test passes, the generated API is released to support user calling; otherwise, an API error alert is generated.
[0022] By adopting the above scheme, the generated API is tested and verified in multiple ways to ensure that its function and performance meet the requirements before being released, thereby improving the reliability and stability of the API, and at the same time, errors in the API generation process can be found and alerted in a timely manner.
[0023] Preferably, the test verification process comprises:
[0024] 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 each component functions independently, and node linkage verification cases for testing whether the data flow between each component combination is correct when multiple nodes cooperate;
[0025] A test report recording whether the test in different dimensions is successful or not and the test failure type is obtained, including: input component function verification failure type, data processing component function verification failure type, output component function verification failure type and component combination data flow verification failure type; different dimension test failure types are counted, and preset optimization strategies of corresponding components or component combinations matched with different dimension test failure types are obtained based on the different dimension test failure types;
[0026] According to the matched preset optimization strategy, the corresponding component or component combination is optimized.
[0027] By adopting the above scheme, the single-node function verification case and the node linkage verification case are generated and automatically executed to test the function of the components in the API orchestration and the data flow conversion between the component combinations from different dimensions, and then a test report containing multiple failure types is obtained; based on the failure types, the matched component or component combination optimization strategy is obtained and optimization is completed to solve the problems existing in the API orchestration system and improve the reliability of the API.
[0028] Preferably, it further comprises:
[0029] For the generated API, the API interface call situation is counted and displayed, and the API interface call situation includes the number of calls, the call volume trend change, the number of successful calls, the successful call response time and the number of failed calls.
[0030] By adopting the above scheme, the API interface call situation is counted and displayed in multiple dimensions to assist in understanding the usage, performance and running stability of the API, and potential problems are found in time.
[0031] Preferably, it further comprises:
[0032] For the counted API interface call situation, it is determined whether there is a preset call phenomenon, and the existing preset call phenomenon and its type are obtained; the preset call phenomenon includes: the call volume weekly growth rate is greater than the preset growth rate, the call failure rate is greater than the preset failure rate and lasts for a preset duration, and the successful call response time is greater than the preset response time;
[0033] For the obtained existing preset call phenomenon and its type, the process container and component optimization strategy matching the current preset call phenomenon type are obtained; the process container and component optimization strategy includes: the process container copy increase optimization strategy matching the call volume weekly growth rate greater than the preset growth rate, the component test and repair optimization strategy matching the call failure rate greater than the preset failure rate and lasting for a preset duration, and the data processing component optimization strategy matching the successful call response time greater than the preset response time;
[0034] According to the matched process container and component optimization strategy, the optimization of the corresponding process container and component is completed.
[0035] By adopting the above scheme, the API interface call situation is counted and analyzed to determine whether there is a preset call phenomenon, and then the process container and component optimization strategy matching the preset call phenomenon are obtained, and finally the optimization of the corresponding process container and component is completed to ensure the efficient and stable operation of the API.
[0036] Preferably, it further comprises:
[0037] In the process of configuring the input component in the integrated workflow, a custom token authentication component is arranged before the input component to obtain a group token and pass it to the input component, or the Token value is directly injected into the input component through environment variable configuration.
[0038] By using the above scheme, when configuring the input component in the integrated workflow, the group token is obtained by using the custom token authentication component or the Token value is injected through environment variable configuration, the integration with the group identity authentication system is realized, the single sign-on function during system integration is enhanced, and the security of data transmission is ensured.
[0039] Preferably, in the process of creating the integrated workflow as a process container, the development and encapsulation of the sub-container corresponding to the workflow are arranged, and when creating the main container corresponding to the integrated workflow, the existing sub-container corresponding to the sub-workflow is directly imported to complete the creation of the nested integrated workflow.
[0040] By using the above scheme, the creation of the nested integrated workflow is realized, the existing sub-workflow can be reused, the development efficiency of the integrated workflow is improved, and the workload of repeated development is reduced.
[0041] Preferably, the data rule engine supports custom rule development, and the custom rule realizes data processing logic through a script language or a preset function library.
[0042] By using the above scheme, the diversified and personalized data processing needs of users are met, the rules suitable for the actual business situation are developed according to the actual business situation, and the pertinence and effectiveness of data processing are improved.
[0043] In a second aspect, the application provides an API arrangement system, comprising:
[0044] A workflow creation module is configured to create an integrated workflow as a process container.
[0045] A workflow configuration module is configured to configure an input component in the integrated workflow to receive data of a data source, wherein the input component includes an offline input component and a real-time input component; add a data processing component in the integrated workflow, wherein the data processing component includes a data conversion component, a data filtering component and a data rule engine; and configure an output component in the integrated workflow to transmit processed data to a target interface.
[0046] An API management module is configured to generate a callable API based on the integrated workflow.
[0047] By adopting the above scheme, the integrated workflow is created as a process container, the connection of multiple systems and technologies is uniformly managed, the integration process is simplified, and the workload of development and maintenance is reduced; the configured input component can flexibly select a data input mode according to business requirements, and meet different timeliness requirements; the data processing component is added to perform conversion, filtering and other operations on the input data, and process the data according to specified rules; the output component is configured to transmit the processed data to a target interface, and realize cross-system data exchange and sharing; and the API is generated based on the integrated workflow, so as to break the data island and improve business efficiency.
[0048] In summary, the present application has the following beneficial effects:
[0049] 1. By creating an integrated workflow, configuring input and output components and data processing components, the connection of multiple systems and technologies is simplified, the complexity of integration is reduced, and the input, processing and output components can be flexibly configured according to business requirements, supporting integration tasks of different scales and complexities, improving scalability and flexibility; the API is generated based on the integrated workflow, the integration process is automated, manual intervention is reduced, the error rate is reduced, and business efficiency is improved;
[0050] 2. The generated API is comprehensively and diversely tested and verified to guarantee the functional integrity, stability and reliability of the API; specifically, the functions of each component in the API arrangement and the data flow of the component combination are tested and verified, the failure types are accurately matched with optimization strategies according to the test report, thereby optimizing the component or component combination, and improving the quality and stability of the API arrangement;
[0051] 3. The overall situation of API interface calling is intuitively presented, which helps to discover possible problems in the API calling process in time; abnormal calling phenomena are detected according to the API interface calling situation, and then the optimization strategy matched therewith is obtained, the process container and the component are optimized, and the stable and efficient operation of the API is guaranteed. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 The flowchart of the API arrangement method described in the specific embodiment;
[0053] Figure 2 The structural schematic diagram of the API arrangement system described in the specific embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0055] The application mainly adopts the scheme of creating an integrated workflow to generate a callable API, so as to reduce the complexity of system integration, improve business efficiency and scalability. The application is further described in detail below.
[0056] As shown in Figure 1 The application discloses an API arrangement method, which includes creating an integrated workflow, configuring an input component, adding a data processing component, configuring an output component and generating a callable API.
[0057] The integrated workflow is created as a process container to provide a basic framework for subsequent data processing and flow transfer. The input component in the integrated workflow receives data from a data source, and a suitable data input method is selected according to different requirements. The data processing component is added to convert, filter and perform other operations on the data, so as to ensure the accuracy and availability of the data. The output component is configured to transmit the processed data to a target interface to achieve effective output of the data. The integrated workflow is used to generate a callable API, which facilitates the calling and integration between different systems. The application simplifies the system integration process, improves the data processing efficiency and realizes the beneficial effects of data flow sharing between systems. Each step is described in detail below.
[0058] S1. Create an integrated workflow as a process container.
[0059] Specifically, the integrated workflow is created by entering the integrated workflow interaction page and creating a new application. The new application serves as a process container and can be designed with a visual interface for easy operation and management. For example, in some integration platforms, a user can quickly create a new integrated workflow by simple drag-and-drop and configuration operations.
[0060] S2. Configure an input component in the integrated workflow to receive data from a data source.
[0061] Specifically, the 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 and select input components in the integrated workflow.
[0062] The offline input component includes API input, Oracle input, MySQL input, Dream input, WebService input, dynamic table input, library table synchronization input, etc. Taking the API input as an example, target API information is configured to obtain corresponding data. When configuring the target API information, the URL of the API, the request mode and other parameters need to be specified; for example, when data needs to be obtained from a specific API, the user can input the URL of the API in the API input component and select an appropriate request mode such as GET or POST. Or taking the database input as an example, the data source related information needs to be configured first, and then the target table is selected; for example, for the MySQL database input, the connection address, username, password and other information of the database are configured, and then the table to obtain data is selected.
[0063] The real-time input component includes Oracle / MySQL / Dream / kafka / RabbitMQ / MQTT real-time input components. The data source information is configured on the data source side, and the table or topic to be listened to is configured on the component side; for example, for the Kafka real-time input component, the server address, port and other information of the Kafka data source need to be configured on the Kafka data source side, and the topic to be listened to is configured on the component side, so that the data under the topic can be obtained in real time by using the component.
[0064] In addition, if it is during system integration, single sign-on is needed, integration with the group identity authentication system is needed, the custom token authentication component of the integration workflow needs to be used, that is, the custom token authentication component is set before the input component in the process of configuring the input component in the integration workflow, so as 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.
[0065] S3, adding a data processing component in the integration workflow.
[0066] Specifically, the data processing conversion is converted by the integrated workflow data processing component to the input data in the integrated workflow, such as: conventional data processing conversion (such as: data merging, data grouping, data deduplication, data sorting, data filtering, data cleaning conversion, data dictionary conversion, data encryption, data desensitization, data summary calculation, field name mapping, field value mapping, field value merging, field value calculation, column split multiple rows, column split multiple columns, column to row, row to column, row by row split 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 JavaBean, executing Shell scripts, etc.), logic processing (such as: start, end, variable setting, self-increment setting, parallel processing, Try / Catch processing, timer, loop container, sub-process, debugging log, etc.), and built-in diversified data rule engine, providing data processing for the field of data integration.
[0067] Correspondingly, the data processing components that can be added include: data conversion components, data filtering components, and data rule engines, etc. to support adding data processing components in the integrated workflow. Among them, the data conversion component can perform format conversion, field mapping, etc. on the data. For example, when the data field names are inconsistent between different systems, the field name mapping component can be used to map the field name in one system to the field name in another system. Among them, the data filtering component can filter the data according to the set conditions, reducing unnecessary data processing. For example, when processing task data, the filtering condition can be set to only keep the tasks and plans of the second level and below.
[0068] The data rule engine has multiple data rules built-in, 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, and general desensitization), data completion rules (such as: character replacement, phone number completion to 11 digits, character length completion to a specified length, etc.), data conversion rules (such as: field string to number, remove both ends of space, cut characters after symbol, cut characters before symbol, replace string 1.0, time integer to string, uppercase and lowercase conversion, amount to uppercase, string cutting, remove space, date formatting, MD5 encryption, field value to global variable or other field value, string cutting between two characters, cutting specified start and end characters, removing both ends of ASCII encoded characters and spaces, string replacement to new string 2.0, cutting specified length of string, string true,false to boolean type, field data type conversion, JSON character to data stream field, time formatting to ISO8601 standard UTC format, character set conversion, Unicode character decoding rule, date change n days, etc.), data generation rules (such as: generate 6-bit random number, current time, random time, random Chinese name, random email address, generate 24-bit unique, generate 32-bit globally unique UUID, constant plus random number, add or subtract current date, add or subtract current month, add or subtract current year, add or subtract current date by seconds, generate offset time, get today's date, etc.), data quality rules (such as: NULL value detection, empty string detection, minimum length detection, detect whether the mobile phone number is legal, detect whether the ID number is legal, detect whether the email is legal, detect whether it is a number, etc.), other business rules (such as: all variables are appended to the last line of the data stream, string splitting, etc.), etc.
[0069] In addition, the data rule engine also supports custom rule development, which realizes data processing logic through a script language or a pre-built function library.
[0070] S4, configuring an output component in the integrated workflow to transmit the processed data to a target interface.
[0071] Specifically, the output component controls the data flow of the integrated workflow, and can transmit the processed data to a target interface; configurable output components include API output, database output component, and message output component, etc., to support users to configure and select output components in the integrated workflow.
[0072] For API output, the target API address and output parameter mapping need to be configured to pass the data flow in the process to the API; when the processed data needs to be sent to another API, the address of the target API and the mapping relationship of the output parameters can be configured in the API output component. Among them, the database output component includes: Oracle output, MySQL output, Dream output, dynamic table output, library table synchronization output, etc., and the target data source and table configuration information need to be selected; for example, for Oracle database output, the Oracle database and the corresponding table to which the data is written need to be selected. Among them, the message output component includes: Kafka output, Elasticsearch output, and the target data source needs to be selected to configure the topic or index; for example, for Kafka message output, the user needs to select the Kafka data source and configure the topic to send messages.
[0073] S5, generating an invocable API based on the integrated workflow.
[0074] Specifically, when generating an invocable API based on the integrated workflow, there is no need to write interface code again. Based on the workflow, relevant information is configured, the workflow configuration is retained, a DSL description file is automatically generated by the system, and an API interface is directly created.
[0075] Through the above embodiments, through the unified management of the integrated workflow, each component can be conveniently configured and adjusted, data input, processing and output of different data sources are realized, and the following will take the application example of integrating the agile collaborative management system applet into the ACM system. Among them, the agile collaborative management system is an internal task management system of an enterprise, mainly used for the management of work plan tasks, etc., and has a multi-level task structure; the ACM system is a management system of an enterprise, and the specific implementation steps are as follows:
[0076] In the AIP integration platform, first, an integrated application named "Agile-ACM" integration is created.
[0077] Add the configuration 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 information parameter: Authorization: {Authorization} (pass the authentication Token through the variable); API input parameter: projectCode: {projectCodeVar} (pass the project code through the variable); field selection: select the API field data set that needs to be received, including project data (project), task data (taskPos), and deliverable data (delvPos); data structure: the API return data is an object of Map<String, Object>, containing three data sets: project: project data, containing projectCode, projectName, etc. fields; taskPos: task data, containing task_id, task_name, planLevel, status, etc. fields; delvPos: deliverable data, containing delvId, delvName, delvStatus, task_id (associated task ID), etc. fields; online test configuration: set the test parameter projectCode as xxx-xxx, and verify whether the API return data structure meets the expectation.
[0078] Add configuration data processing components, including: time processing: in the API input component, output field side, find the start (planStartTime) and completion (planEndTime) time fields of the task, bind the data conversion rule of the two fields, select the "date change n days" rule, specify the date format yyyy-MM-dd HH:mm:ss, set the parameter value to 5, at this time the processing of the task start and completion time delay requirement can be completed; data filtering processing: after pulling the data through the API input component, first filter the data to reduce unnecessary data processing and improve efficiency. Add a data filter component, add conditions to the filter condition page, configure the condition field that needs to be filtered, the task plan field here is planLevel, set the operator to ">", and set the comparison value to 1 according to the requirement to filter out tasks and plans at the second level and below; field mapping processing: after filtering out the target task data, the field needs to be mapped according to the requirement, add a field name mapping component, and perform a mapping operation on the field that needs to be processed in the field mapping configuration page. Map the task_id field to the project_task_id field, and map the task_name field to the project_task_name field; task name adding system identifier processing: add a field value merging component, click the field configuration page, select the task name field (project_task_name) according to the requirement, splice and add the system identifier, complete the mapping of a field value, and process the task name; project task completion rate calculation processing: the task completion record is in complete_pct, 100 indicates that the task represented by the data has been completed, the total number of complete_pct=100 is the number of completed tasks, and the task completion rate under the project is the total number of tasks under the project divided by the total number of tasks. Use the data summary calculation component to calculate the completed task number complete_num and the total number all_num; at this time, according to the completed task number and the total task number obtained, add a field value calculation component in the field configuration page, select field A=complete_num, field B=all_num, select the calculation symbol as A / B, and set the calculation result as remark according to the requirement. At this time, the calculation of the task completion rate under the project is completed, and saved to the remark field.
[0079] Add a configuration 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 data row in the stream data; authentication method: Token authentication; header parameter: Authorization: {Authorization} (pass the authentication Token through a variable).
[0080] Save the workflow configuration, and the system automatically generates a DSL description file; create an API based on the relevant information of the workflow configuration, including the API name, URL request method, etc. to directly create an API interface. In addition, the workflow can be selected for running or single-step debugging, and the correctness is verified according to the log output. After the workflow is verified to be correct, an API interface is created based on the relevant information of the workflow configuration.
[0081] In one specific embodiment, to reduce the configuration workload of users and improve the creation efficiency of integrated workflows, a suitable process container template and component are automatically recommended according to the business scenario of the user, and the method further comprises:
[0082] A scenario-based process container template library is constructed; 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 direction; for example, a process container template for an e-commerce business scenario presets nodes such as order processing, inventory management, and logistics tracking, as well as corresponding data flow directions.
[0083] When creating an integrated workflow as a process container, a business scenario selection template is designed and the selected business scenario is received, and a scenario-based process container template that meets the business scenario is selected from the scenario-based process container template library for recommendation. For example, when the integrated workflow created by the user is for e-commerce order processing, the process container template for the e-commerce business scenario is automatically recommended for the user to select.
[0084] A scenario-based adaptive component recommendation mechanism is set, which actively recommends input components that are adapted to the preset business scenario data source, data processing components associated with the adapted input components, and output components; wherein the input components that are adapted to the preset business scenario data source, the data processing components associated with the adapted input components, and the output components are obtained by analyzing and statistics of user selection of input components, processing components, and output components under historical preset business scenario conditions, or by using a deep learning algorithm to analyze user habits of user selection of input components, data processing components, and output components under historical preset business scenario conditions, and generate a TOPk recommended combination.
[0085] In the condition that the integration workflow creation is completed according to the recommended scenario-based process container template, the input component recommendation adapted to the preset business scenario data source is actively triggered in the process of configuring the input component in the integration 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.
[0086] In the condition that the input component configuration is completed according to the recommended input component adapted to the preset business scenario data source, the data processing component recommendation associated with the adapted input component is actively triggered in the process of adding the data processing component in the integration workflow, and the output component recommendation associated with the adapted input component is actively triggered in the process of configuring the output component in the integration workflow; for example, when the API input component is selected, the associated data processing components such as the data filtering component and the field name mapping component are recommended according to the data characteristics of the component, and the corresponding output component such as the API output component is recommended.
[0087] In addition, in the process of creating the integration workflow as a process container, in addition to setting the scenario-based process container template library, in order to further improve the efficiency of creating the integration workflow, the development and encapsulation of the corresponding sub-containers of the workflow are constructed, and when the corresponding main container of the integration workflow is created, the existing sub-containers corresponding to the sub-workflows are directly imported to complete the creation of the nested integration workflow.
[0088] In one specific embodiment, in order to ensure the quality and stability of the generated API, reduce the possibility of errors in actual use, and improve the reliability and usability of the system, a test verification process is performed to timely discover problems existing in the API and the integration workflow, and targeted optimization is performed according to the information provided by the test report, and the method further comprises:
[0089] After the API is generated, a test verification process is performed; wherein the test verification selects any one of single test, timing test, and stress test; after the verification test passes, the generated API is released to support user calling; otherwise, an API error warning is generated. Specifically, the execution of the test verification process includes: if the single test is selected, test cases are generated based on the generated API and the case test is automatically executed, API information and corresponding test case information of the test case are recorded, and a test result is obtained. If the timing test is selected, test plan configuration scheduling time information is added based on the test case, and timing scheduling of the API is completed; if the stress test is selected, a large number of users are simulated to access the generated API interface at the same time, and indexes such as load capacity, performance bottleneck, and stability of the API interface are tested, and it is judged whether the indexes meet the requirements.
[0090] In order to find out the problems existing in the API and the integration workflow, and to provide targeted optimization according to the information provided by the test report, a multi-dimensional test case is generated based on the generated API for the test verification process, including: a single node function verification test case for testing whether each component functions normally, and a node linkage verification test case for testing whether the data flow between the component combinations is correct when multiple nodes cooperate; for example: for an input component, a single node function verification test case can test whether it can normally receive data from the data source; for a data processing flow in which multiple components are combined, a node linkage verification test case can test whether the data flow between the components is correct.
[0091] The test report records the success or failure of different dimension tests and the types of test failures, including: input component function verification failure type, data processing component function verification failure type, output component function verification failure type, and component combination data flow verification failure type; statistics of different dimension test failure types, based on different dimension test failure types, the corresponding component or component combination preset optimization strategy matched therewith is obtained; for example: if the input component function verification fails in the test report, the input component function verification failure type corresponds to the optimization strategy of the input component.
[0092] According to the matched preset optimization strategy, the corresponding component or component combination optimization is completed.
[0093] In one specific embodiment, the performance and stability of the API are ensured, the needs of different business scenarios are met, the adaptability and expansibility of the system are improved, the API usage trends and existing problems are discovered in time by counting the API interface call conditions; the process container and the components are optimized according to the preset call phenomenon and the corresponding optimization strategy; the method further comprises:
[0094] For the generated API, the API interface call conditions are counted and displayed, including the number of calls, the change of the call amount trend, the number of successful calls, the successful response time of the call, and the number of failed calls. For example, by setting a statistical function in the integration platform, the API call conditions are recorded in real time, and are displayed in the form of charts or reports, so that users can intuitively understand the usage of the API.
[0095] In addition, to provide a more intuitive view of API calls, multi-dimensional analysis and recording of API call details will be conducted, including: API call volume ranking (e.g., statistics on the top 10 API interfaces with the highest call volume, including interface information such as the percentage of call counts; statistics on the top 10 interfaces sorted by average response time, including interface information, response time, etc.; statistics on the top 10 API interfaces sorted by number of failures, including interface information under the corresponding system), real-time throughput curves, and abnormal alarm lists, etc.
[0096] In addition, based on the statistical API interface call data, it is determined whether there are any pre-defined call phenomena, and the existing pre-defined call phenomena and their types are obtained. The pre-defined call phenomena include: the weekly growth rate of call volume is greater than the pre-defined growth rate, the call failure rate is greater than the pre-defined failure rate and continues for a pre-defined duration, and the call success response time is greater than the pre-defined response time, etc.
[0097] For the existing preset call phenomena and their types, corresponding optimization strategies for process containers and components that match the current existing preset call phenomenon types are obtained; the optimization strategies for process containers and components include: process container replica increase optimization strategy that matches the weekly growth rate of call volume greater than the preset growth rate, component testing and repair optimization strategy that matches the call failure rate greater than the preset failure rate and continues for a preset duration, and data processing component optimization strategy that matches the call success response time greater than the preset response time.
[0098] Based on the matched process container and component optimization strategy, complete the optimization of the corresponding process container and component; for example, if the weekly growth rate of call volume is greater than the preset growth rate, increase the number of process container replicas to improve the system's processing capacity; if the call failure rate is greater than the preset failure rate and continues for a preset duration, test and repair the relevant components.
[0099] like Figure 2 As shown, an API orchestration system includes:
[0100] Workflow creation module 101 is used to create integrated workflows as process containers;
[0101] The workflow configuration module 102 is used to configure input components in the integrated workflow to receive data from a data source, the input components including offline input components and real-time input components; to add data processing components in the integrated workflow, the data processing components including data transformation components, data filtering components and a data rule engine; and to configure output components in the integrated workflow to transmit the processed data to the target interface.
[0102] API management module 103 generates callable APIs based on the integrated workflow.
[0103] In one embodiment, the system further comprises:
[0104] The API testing module 104 performs a test verification procedure after the API is generated; the test verification selects any one of a single test, a timing test, and a stress test; after the verification test passes, the generated API is released to support user calls; otherwise, an error alert is generated for the current generated API.
[0105] In one embodiment, the system further comprises:
[0106] The workflow creation recommendation module 105 is configured 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 direction; when the integrated workflow is created as a process container, a business scenario selection template is designed and a selected business scenario is received, a scenario-based process container template that meets the business scenario is selected from the scenario-based process container template library to be recommended.
[0107] The workflow configuration recommendation module 106 is configured to set a scenario-based adaptive component recommendation mechanism, actively recommend an input component that is adapted to a preset business scenario data source, a data processing component that is associated with the adapted input component, and an output component; under the condition that the integrated workflow is created according to the recommended scenario-based process container template, the input component that is adapted to the preset business scenario data source is actively triggered for recommendation in 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 adapted to the preset business scenario data source, the data processing component that is associated with the adapted input component is actively triggered for recommendation in the process of adding the data processing component in the integrated workflow, and the output component that is associated with the adapted input component is actively triggered for recommendation in the process of configuring the output component in the integrated workflow.
[0108] In one specific embodiment, the API management module 103 in the system is further configured to, for the generated API, count and display API interface calling conditions, including calling times, calling amount trend changes, calling success times, calling success response times, and calling failure times; and determine, for the counted API interface calling conditions, whether there is a preset calling phenomenon, and obtain the preset calling phenomenon and its type. The preset calling phenomenon includes a calling amount weekly growth rate greater than a preset growth rate, a calling failure rate greater than a preset failure rate and lasting for a preset time length, and a calling success response time length greater than a preset response time length. For the obtained preset calling phenomenon and its type, a process container and a component optimization strategy corresponding to the current preset calling phenomenon type are obtained. The process container and the component optimization strategy include a process container copy increase optimization strategy corresponding to the calling amount weekly growth rate greater than the preset growth rate, a component test and repair optimization strategy corresponding to the calling failure rate greater than the preset failure rate and lasting for the preset time length, and a data processing component optimization strategy corresponding to the calling success response time length greater than the preset response time length. The optimization of the corresponding process container and the component is completed according to the matched process container and the component optimization strategy.
[0109] The application further discloses a computer readable storage medium.
[0110] Specifically, the computer readable storage medium stores a computer program capable of being loaded and executed by the processor to perform the API arrangement method, and the computer readable storage medium includes various storage medium capable of storing program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0111] The application further discloses a computer device.
[0112] Specifically, the computer device includes a memory and a processor, and the memory stores a computer program capable of being loaded and executed by the processor to perform the API arrangement method.
[0113] The above are preferred embodiments of the application, and are not intended to limit the protection scope of the application. Any feature disclosed in the specification (including the abstract and the drawings) can be replaced by other equivalent or similar features, unless specifically stated. That is, each feature is only an example of a series of equivalent or similar features, unless specifically stated.
Claims
1. An API orchestration method, characterized by, The method comprises the following steps: creating an integration workflow as a process container; the integration workflow is a logical framework designed through a visual interface for managing data processing and flow; the process container is an execution environment encapsulating and running the integration workflow; configuring input components in the integration workflow to receive data from data sources, the input components including offline input components and real-time input components; adding data processing components in the integration workflow, the data processing components including data conversion components, data filtering components, and data rule engines; configuring output components in the integration workflow to transmit processed data to target interfaces; generating an API that can be called based on the integration workflow, including automatically generating a DSL description file and creating an API interface that can be called by external systems; after the API is generated, performing a test verification process; the test verification process can use any of a single test, a timed test, and a stress test; after the verification test passes, publishing the generated API to support user calls; otherwise, generating an error alert for the current generated API; for the generated API, counting and displaying API interface call conditions, including the number of calls, call volume trend changes, the number of successful calls, successful response times, and the number of failed calls; The method further comprises the following steps: for the counted API interface call conditions, determining whether there are preset call phenomena, obtaining the existing preset call phenomena and their types; the preset call phenomena include: a weekly call volume growth rate greater than a preset growth rate, a call failure rate greater than a preset failure rate and lasting for a preset duration, and a successful call response time greater than a preset response time; for the obtained existing preset call phenomena and their types, corresponding to the process container and component optimization strategies that match the current preset call phenomenon types; the process container and component optimization strategies include: process container copy increase optimization strategies that match the weekly call volume growth rate greater than the preset growth rate, component test and repair optimization strategies that match the call failure rate greater than the preset failure rate and lasting for the preset duration, and data processing component optimization strategies that match the successful call response time greater than the preset response time; optimizing the corresponding process container and components according to the matched process container and component optimization strategies.
2. The API orchestration method of claim 1, wherein, The method further comprises the following steps: building a scenario-based process container template library; each scenario-based process container template corresponds to an integration workflow that includes a preset number of workflow nodes, a preset application business scenario, and a preset data flow direction; when creating an integration workflow as a process container, designing a business scenario selection template and receiving a selected business scenario, selecting a scenario-based process container template that matches the business scenario from the scenario-based process container template library for recommendation; setting up a scenario-based adaptive component recommendation mechanism to actively recommend input components that match preset business scenario data sources, data processing components associated with the input components, and output components; In the case of completing the integration workflow creation according to the recommended scenario-based process container template, the input component recommendation suitable for the preset business scenario data source is triggered actively in the process of configuring the input component in the integration workflow; in the case of completing the input component configuration according to the recommended input component suitable for the preset business scenario data source, the data processing component recommendation associated with the suitable input component is triggered actively in the process of adding the data processing component in the integration workflow, and the output component recommendation associated with the suitable input component is triggered actively in the process of configuring the output component in the integration workflow.
3. The API orchestration method of claim 1, wherein, The execution test verification process comprises: Based on the generated API, multi-dimensional test cases are generated and case tests are performed; the multi-dimensional test cases comprise: single-node function verification cases for testing whether each component functions normally independently, and node linkage verification cases for testing whether the data flow between each component combination is correct when multiple nodes cooperate; A test report recording whether the tests of different dimensions are successful or not and the test failure types is obtained, including: input component function verification failure types, data processing component function verification failure types, output component function verification failure types, and component combination data flow verification failure types; different dimension test failure types are counted, and a preset optimization strategy matched with the corresponding component or component combination is obtained based on the different dimension test failure types; According to the matched preset optimization strategy, the corresponding component or component combination is optimized.
4. The API orchestration method of claim 1, wherein, Further comprising: In the process of configuring the input component in the integration workflow, a custom token authentication component is set before the input component to obtain a group token and pass it to the input component; Or the Token value is directly injected into the input component through environment variable configuration.
5. The API orchestration method of claim 1, wherein, Further comprising: In the process of creating an integration workflow as a process container, the development and encapsulation of the sub-containers corresponding to the workflow are set, and when the main container corresponding to the integration workflow is created, the existing sub-containers corresponding to the sub-workflows are directly imported to complete the creation of the nested integration workflow.
6. The API orchestration method of claim 1, wherein, The data rule engine supports custom rule development, and the custom rule realizes data processing logic through a script language or a preset function library.
7. An API orchestration system, characterized by, Comprise: A workflow creation module for creating an integration workflow as a process container; The integration workflow is a logical framework for managing data processing and flow designed through a visual interface; the process container is an execution environment for encapsulating and running the integration workflow; A workflow configuration module for configuring an input component in the integration workflow to receive data from a data source, the input component comprising an offline input component and a real-time input component; adding a data processing component in the integration workflow, the data processing component comprising a data conversion component, a data filtering component and a data rule engine; configuring an output component in the integration workflow to transmit processed data to a target interface; An API management module for generating a callable API based on the integration workflow, comprising automatically generating a DSL description file and creating an API interface that can be called by external systems through the system; An API test module is configured to perform a test verification process after the API is generated; the test verification process is selected from any one of a single test, a timing test, and a stress test; After the verification test is passed, the generated API is released to support user calls; otherwise, an API error alert is generated; The API management module is further configured to count and display API interface call conditions, including the number of calls, the trend of the number of calls, the number of successful calls, the response time of successful calls, and the number of failed calls; The API management module is further configured to determine whether there is a preset call phenomenon based on the API interface call conditions, and obtain the preset call phenomenon and its type; The preset call phenomenon includes a weekly growth rate of the number of calls greater than a preset growth rate, a failure rate greater than a preset failure rate and lasting for a preset duration, and a successful response time greater than a preset response time; the process container and the component optimization strategy corresponding to the type of the preset call phenomenon are obtained based on the obtained preset call phenomenon and its type; the process container and the component optimization strategy include a process container copy increase optimization strategy corresponding to the weekly growth rate of the number of calls greater than the preset growth rate, a component test and repair optimization strategy corresponding to the failure rate greater than the preset failure rate and lasting for the preset duration, and a data processing component optimization strategy corresponding to the successful response time greater than the preset response time; and the optimization of the corresponding process container and component is completed according to the matched process container and component optimization strategy.
Citation Information
Patent Citations
System for dynamically arranging real-time data integration workflow
CN117557081A
Production information integration system based on visual configuration
CN119536170A