API Call Method, Device, Electronic Device, Storage Medium, and Program Product

Automatically parsing API access requests through the low-code integration platform generates request parameters, solving the problems of low-efficiency and high cost of API calls in the low-code field, and achieving fast and secure API calls.

CN119917320BActive Publication Date: 2025-07-25MEIYUN ZHISHU TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510416084.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-25
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

In the prior art, the low-code field needs to waste time in the process of API calls on the connection adaptation between the data provider and the downstream data receiver, resulting in low efficiency and high cost.

Method used

The API access request is parsed through the low-code integration platform, automatically determine the data type of the request field and field value, generate the request parameter, and directly call the target API of the data receiver to avoid manual connection adaptation.

Benefits of technology

Improves API call efficiency, reduces costs, reduces manual operations, and ensures fast response and security of API call process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917320B_ABST
    Figure CN119917320B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data processing, and provides an API calling method, apparatus, electronic device, storage medium, and program product. The method includes: receiving an API access request sent by a data provider; parsing the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field; determining request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value; calling a target API of a data receiver based on the request input parameters to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute business logic matching the request input parameters. The present invention does not need to waste time on the connection adaptation between the data provider and the downstream data receiver, that is, the low-code integration platform only needs to parse the API access request to automatically generate request input parameters that can call the target API, thereby quickly realizing API calling, that is, improving the efficiency of API calling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular, to an API call method, device, electronic device, storage medium, and program product. Background Art

[0002] With the continuous development of enterprise digital construction, the business systems of enterprises can include various application systems such as research, production, supply, sales, and management. Therefore, in response to a business request, it may be necessary to call the APIs (Application Programming Interfaces) of multiple application systems. Since the time when customers go online to the system determines the application of mainstream technologies, even for applications developed for the same technology stack, their interface styles are inconsistent. For the client, when it initiates a business request, multiple servers need to respond. If the compatibility of the server with the API request is insufficient, problems such as failed calls, error reports, and incorrect return values will occur. Therefore, compatibility processing of API requests is required during the API call process.

[0003] Traditionally, in the high-code field, technologies such as method overloading, polymorphism, dynamic Json (JavaScript Object Notation) parsing, and direct reference to the Map (mapping) structure can be used to achieve compatibility as much as possible; however, the learning of code is very complex and mostly different, and a large amount of time needs to be spent on learning in order to implement service orchestration based on various codes. Therefore, for enterprises, the threshold for service orchestration through code is too high, which in turn leads to low service orchestration efficiency and high service orchestration costs. Therefore, a low-code processing method has been proposed currently.

[0004] Currently, in the low-code field, although there is no need to learn code, due to the free reference requirements between services, it is necessary to waste time on the connection adaptation between the data provider and the downstream data receiver, and this connection adaptation needs to be manually set to successfully call the target API of the data receiver. Therefore, the current API call solution has low efficiency and high costs. Summary of the Invention

[0005] The present invention aims to solve one of the technical problems existing in the prior art. For this purpose, the present invention proposes an API call method, which does not need to waste time on the connection adaptation between the data provider and the downstream data receiver, that is, the low-code integration platform only needs to parse the API access request, and can automatically generate the request input parameters for calling the target API, so as to quickly implement the API call, that is, improve the efficiency of the API call.

[0006] The present invention also provides an API call device, an electronic device, a storage medium, and a program product.

[0007] An API call method according to an embodiment of the first aspect of the present invention is applied to a low-code integration platform. The method includes:

[0008] Receiving an API access request sent by a data provider;

[0009] Parsing the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field;

[0010] Based on each request field, the field value corresponding to each request field, and the data type of each field value, determining request input parameters;

[0011] Invoking a target API of a data receiver based on the request input parameters to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute business logic matching the request input parameters.

[0012] According to the API call method of the embodiment of the present invention, receiving an API access request sent by a data provider, parsing the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field, and based on each request field, the field value corresponding to each request field, and the data type of each field value, determining request input parameters, so that the target API of the data receiver can be directly invoked based on the request input parameters to send the request input parameters to the data receiver, without wasting time on the connection adaptation between the data provider and the downstream data receiver. That is, the low-code integration platform only needs to parse the API access request to automatically generate request input parameters that can call the target API, thereby quickly implementing API calls, that is, improving the efficiency of API calls. In other words, the response speed of the API access request is improved, and this method does not require manual operation, thereby reducing the cost of API calls.

[0013] According to an embodiment of the present invention, the request parameters include Json data; the Json data includes at least one request field and the field value corresponding to each request field;

[0014] After parsing the request parameters in the API access request, it further includes:

[0015] Determining the target hierarchical structure of the Json data;

[0016] In the case where the target hierarchical structure does not match the preset request input parameter hierarchical structure, returning an exception prompt message of request parameter error to the data provider;

[0017] When the target hierarchical structure matches the pre-set request input parameter hierarchical structure, execute the step of determining the request input parameters based on each of the request fields, the field values corresponding to each of the request fields, and the data types of each of the field values.

[0018] According to an embodiment of the present invention, before parsing the request parameters in the API access request, it further includes:

[0019] Obtain an operation instruction acting on the interface configuration interface, and execute the operation instruction to determine the request input parameter hierarchical structure;

[0020] Based on the request input parameter hierarchical structure, set each input parameter field of the backend service API so that the input parameter hierarchical structure of the backend service API is the same as the request input parameter hierarchical structure; the backend service API is an API that responds to an API request matching the request input parameter hierarchical structure.

[0021] According to an embodiment of the present invention, the backend service API is determined based on the following method:

[0022] Based on the target integration process, determine the backend service that responds to the API access request of the data provider;

[0023] Based on the backend service, determine the backend service API;

[0024] Wherein, the target integration process is determined based on the following method:

[0025] Obtain a service orchestration instruction acting on the service orchestration interface, and execute the operations corresponding to the service orchestration instruction to perform service orchestration;

[0026] Based on the service orchestration processes determined by each service orchestration instruction, perform integration processing on at least two backend services to obtain a target integration process;

[0027] Wherein, the target integration process is used to set the connection relationship of the at least two backend services.

[0028] According to an embodiment of the present invention, after returning the exception prompt information of the request parameter error to the data provider, it further includes:

[0029] Determine the number of times the exception prompt information is returned;

[0030] Determine that the number of returns reaches a preset number threshold, and perform a fusing process on the API access request.

[0031] According to an embodiment of the present invention, the invoking the target API of the data receiver based on the request input parameters includes:

[0032] Determine the target API that best matches the request input parameters from multiple APIs;

[0033] If each input parameter field of the target API matches all the request fields in the request input parameters, call the target API based on the request input parameters;

[0034] If there are new request fields in the request input parameters that do not match each input parameter field of the target API, modify the input parameter fields of the target API based on the new request fields, and call the target API with the modified input parameter fields based on the request input parameters.

[0035] According to an embodiment of the present invention, the determining the target API that best matches the request input parameters from multiple APIs includes:

[0036] If there is an API associated with the request input parameters determined based on a number of stored mapping relationships, use the API associated with the request input parameters among the multiple APIs as the target API that best matches the request input parameters;

[0037] If there is no API associated with the request input parameters determined based on a number of stored mapping relationships, match the multiple APIs with the request input parameters to obtain the target API that best matches the request input parameters, and persist the mapping relationship between the request input parameters and the target API.

[0038] An API call device according to an embodiment of the second aspect of the present invention is deployed on a low-code integration platform, and the device includes:

[0039] A request receiving module, configured to receive an API access request sent by a data provider;

[0040] A parameter parsing module, configured to parse the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field;

[0041] An input parameter determining module, configured to determine request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value;

[0042] An API call module, configured to call the target API of the data receiver based on the request input parameters to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute business logic matching the request input parameters.

[0043] An electronic device according to an embodiment of the third aspect of the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the API calling method described in any one of the above is implemented.

[0044] A non-transitory computer-readable storage medium according to an embodiment of the fourth aspect of the present invention has a computer program stored thereon. When the computer program is executed by a processor, the API calling method described in any one of the above is implemented.

[0045] A computer program product according to an embodiment of the fifth aspect of the present invention includes a computer program. When the computer program is executed by a processor, the API calling method described in any one of the above is implemented.

[0046] One or more of the above technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0047] Receive an API access request sent by a data provider, parse the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field, and determine the request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value. Thus, the target API of the data receiver can be directly called based on the request input parameters, and the request input parameters can be sent to the data receiver, without wasting time on the connection adaptation between the data provider and the downstream data receiver. That is, the low-code integration platform only needs to parse the API access request to automatically generate the request input parameters that can call the target API, thereby quickly implementing the API call, that is, improving the efficiency of the API call. In other words, the response speed of the API access request is improved, and this method does not require manual operation, thus reducing the cost of the API call.

[0048] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. Description of the Drawings

[0049] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0050] Figure 1 It is a schematic flowchart of the API calling method provided by the embodiment of the present invention;

[0051] Figure 2 It is a schematic diagram of the service orchestration process provided by the embodiment of the present invention;

[0052] Figure 3 is a schematic structural diagram of an API calling device provided by an embodiment of the present invention;

[0053] Figure 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0054] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0055] The present invention provides the following embodiments. The API calling method provided by an embodiment of the present invention will be described below with reference to the accompanying drawings. The execution subject of the API calling method is a low-code integration platform; the low-code integration platform can be an API gateway device, or a server, or can also be a desktop computer, a laptop computer, etc., or can also be a user's terminal, including but not limited to a mobile phone, a tablet computer, a PC (Personal Computer) terminal, a vehicle-mounted terminal, and a household smart appliance, etc.

[0056] The low-code integration platform is used for service orchestration, that is, for application integration.

[0057] Figure 1 is a schematic flowchart of the API calling method provided by an embodiment of the present invention. As Figure 1 shown, the API calling method includes: step 110 to step 140.

[0058] Step 110, receiving an API access request sent by a data provider.

[0059] Here, the data provider can be a client or a server. For example, initially, an API access request sent by a client is received, and it requires multiple servers to respond. Based on this, to achieve the final response, an API access request sent by a certain server also needs to be received in the middle process.

[0060] Here, the API access request is used to call the API (Application Programming Interface) of the data receiver (server) to respond to the API access request and return response data to the data provider.

[0061] Step 120: Parse the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field.

[0062] Here, the request parameters include a request body, and at least one request field and the field value corresponding to each request field can be passed in the request body in the form of Json data or a form, etc.

[0063] For example, if the request parameters include Json data {"name":"John","age":"30","id":"12345"}, then the at least one request field obtained by parsing includes "name", "age", and "id", the field value corresponding to "name" is "John", the field value corresponding to "age" is "30", and the field value corresponding to "id" is "12345".

[0064] Step 130: Determine the request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value.

[0065] Considering that the request input parameters of the called API not only require the field values corresponding to each request field but also the data types of each field value, it is necessary to determine the data types of each field value. In a specific embodiment, the field value is automatically analyzed to obtain the data type corresponding to the field value; for example, when parsing the request parameters, only "name":"John" will be obtained, and based on this, its data type is determined to be String (string), while for "id":"12345", its data type will be determined to be Integer (integer). Further, according to the context information of the request parameters, the data types of each field value are determined. Further, according to the type of the field at the same level as the field value, the data type of the field value is determined.

[0066] Step 140: Call the target API of the data receiver based on the request input parameters to send the request input parameters to the data receiver.

[0067] Here, the data receiver is the server that provides the target API, which is used to respond to the API access request. The target API is the API that matches the request input parameters, that is, the target API can be called based on the request input parameters.

[0068] It should be understood that the backend service of the data receiver has done compatibility adaptation through means such as method overloading and Map parsing, so that no matter what kind of request input parameters, the target API can be called, that is, it supports non-fixed input parameters.

[0069] Among them, the request input parameter is used to instruct the data receiver to execute the business logic matching the request input parameter. That is, the request input parameter is used to instruct the data receiver to complete the response process.

[0070] The API call method provided by the embodiment of the present invention receives an API access request sent by a data provider, parses the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field, and determines the request input parameter based on each request field, the field value corresponding to each request field, and the data type of each field value. Thus, the target API of the data receiver can be directly called based on the request input parameter, and the request input parameter can be sent to the data receiver, without wasting time on the connection adaptation between the data provider and the downstream data receiver. That is, the low-code integration platform only needs to parse the API access request to automatically generate the request input parameter that can call the target API, thereby quickly implementing the API call, that is, improving the efficiency of the API call. In other words, the response speed of the API access request is improved, and this method does not require manual operation, thereby reducing the cost of the API call.

[0071] Based on any of the above embodiments, in this method, the request parameter includes Json data; the Json data includes at least one request field and the field value corresponding to each request field. That is, the request body in the request parameter passes at least one request field and the field value corresponding to each request field through the Json data.

[0072] Correspondingly, after parsing the request parameters in the API access request, this method further includes:

[0073] Determine the target hierarchical structure of the Json data;

[0074] When the target hierarchical structure does not match the pre-set request input parameter hierarchical structure, return an exception prompt message indicating a request parameter error to the data provider;

[0075] When the target hierarchical structure matches the pre-set request input parameter hierarchical structure, execute the step of determining the request input parameter based on each request field, the field value corresponding to each request field, and the data type of each field value.

[0076] In a specific embodiment, when the target hierarchical structure is inconsistent with the pre-set request input parameter hierarchical structure, the two do not match; if they are consistent, the two match.

[0077] It should be noted that each request field can be in different levels of the Json data. In order to call the target API, the target hierarchical structure of the Json data corresponding to the API access request should be determined and fixed, while the number of fields at the corresponding level can be uncertain, so as to support unfixed input parameters.

[0078] In an embodiment of the present invention, the target hierarchical structure of the Json data needs to match the hierarchical structure of the request input parameters preset by the low-code integration platform. If the data provider modifies the hierarchical structure in the request, it will be pre-judged here that the target hierarchical structure does not match the preset hierarchical structure of the request input parameters, thus returning an exception of incorrect request parameters. Furthermore, while completing the compatibility processing, the security of the API call is ensured, that is, the request is made according to the preset hierarchical structure of the request input parameters.

[0079] In addition, it should be noted that the low-code integration platform automatically converts at least one parsed request field and the field value corresponding to each request field, that is, it automatically matches the fields at the corresponding level and records the variable fields and their field values, so as to facilitate the subsequent determination of the request input parameters. During the storage process, at least one request field and the field value corresponding to each request field can be stored through dynamic Json, or can be stored through a Map structure.

[0080] For example, the Json data is as follows:

[0081] {

[0082] "status": "success",

[0083] "data": {

[0084] "user": {

[0085] "id": 12345,

[0086] "name": "John Doe",

[0087] "email": "john.doe@example.com",

[0088] "profile": {

[0089] "age": 30,

[0090] "gender": "male",

[0091] "address": {

[0092] "street": "123 Main St",

[0093] "city": "New York",

[0094] "state": "NY",

[0095] "zip": "10001"

[0096] }

[0097] },

[0098] "preferences": {

[0099] "notifications": true,

[0100] "newsletter": false

[0101] }

[0102] }

[0103] },

[0104] "message": "Request processed successfully"

[0105] }

[0106] Among them, "status" and "data" are fields at the same level, and "user" is a field at the next level of "data".

[0107] The API call method provided by the embodiment of the present invention parses the request parameters in the API access request. When the target hierarchical structure does not match the preset request parameter hierarchical structure, an exception prompt message indicating an error in the request parameters is returned to the data provider; when the target hierarchical structure matches the preset request parameter hierarchical structure, the above step 130 is executed, so as to ensure the security of the API call while completing the compatibility processing, that is, making a request according to the preset request parameter hierarchical structure.

[0108] Based on any of the above embodiments, before the above step 120, the method further includes:

[0109] Obtain an operation instruction acting on the interface configuration interface, and execute the operation instruction to determine the request parameter hierarchical structure;

[0110] Based on the request parameter hierarchical structure, set each input parameter field of the backend service API, so that the input parameter hierarchical structure of the backend service API is the same as the request parameter hierarchical structure; the backend service API is an API that responds to an API request matching the request parameter hierarchical structure.

[0111] Here, the interface configuration interface is used to manually set the request parameter hierarchical structure of the API, that is, the request parameter hierarchical structure is preset through the visual interface configuration interface.

[0112] It should be noted that through the interface configuration interface, the hierarchical structure of the request input parameters of the API is predefined in advance, and at the same time, it is ensured that the backend service API of the data recipient has the same hierarchical structure, so as to make compatibility adaptation in advance to support variable input parameters.

[0113] Furthermore, general request fields can be predefined in the hierarchical structure of the request input parameters, and it is ensured that the backend service of the data recipient has made compatibility adaptation through means such as method overloading and Map parsing, so as to support variable input parameters.

[0114] The API call method provided by the embodiment of the present invention obtains the operation instruction acting on the interface configuration interface and executes the operation instruction to determine the hierarchical structure of the request input parameters, so that the setting of the hierarchical structure of the request input parameters can be completed without code, that is, it is set through a visual graphical interface, without spending a lot of time learning code. The user only needs to focus on their own business needs, further reducing the development of redundant underlying code, helping to quickly and conveniently perform service orchestration, thereby lowering the threshold of service orchestration, improving the efficiency of service orchestration, and reducing the cost of service orchestration.

[0115] Based on any of the above embodiments, in this method, the backend service API is determined based on the following method:

[0116] Based on the target integration process, determine the backend service that responds to the API access request of the data provider;

[0117] Based on the backend service, determine the backend service API.

[0118] Here, the target integration process is used to indicate the connection relationship of the services, that is, the target integration process is used to indicate the connection relationship between the backend services of the data provider and the data recipient. Therefore, based on the target integration process, the backend service that responds to the API access request of the data provider can be determined, and then the backend service API corresponding to the backend service can be determined.

[0119] Among them, the target integration process is determined based on the following method:

[0120] Obtain the service orchestration instruction acting on the service orchestration interface, and execute the operation corresponding to the service orchestration instruction to perform service orchestration;

[0121] Based on the service orchestration process determined by each service orchestration instruction, integrate at least two backend services to obtain the target integration process;

[0122] Among them, the target integration process is used to set the connection relationship of the at least two backend services.

[0123] Here, the service orchestration interface is an interface for orchestrating orchestratable components, which is used for users to orchestrate components based on this service orchestration interface. Specifically, it is used for users to trigger service orchestration instructions on this service orchestration interface. This service orchestration interface is a drawing interface for the service orchestration process, that is, a modeling interface for orchestrating services.

[0124] This service orchestration interface may include, but is not limited to, one or more of the following: a flowchart drawing area, a component selection area, a connection selection area, a menu bar area, a quick operation area, an attribute configuration area, a debugging and version management panel, an interface configuration interface, etc. The embodiments of the present invention do not make specific limitations thereto.

[0125] Among them, the flowchart drawing area is used to draw a service orchestration flowchart. Specifically, it is used to draw a flowchart of the technical route selected by the business requirements. The flowchart drawing area is also used to visually configure the connection information of the service to which the API belongs, the API metadata definition, support inserting components, deleting components, connecting components, automatically generating connections, support text editing such as component basic information, input and output parameter definitions, and support operations such as component copying, deleting, and skipping.

[0126] Among them, the component selection area is used to place various components. In the component management area, there are connector components, technical components, logical components, and trigger components. For example, in the connector components, there are SaaS (Software as a Service) application connectors and enterprise self-built connectors; in the technical components, there are data source components, message components, ID (Identifier) generator components; in the logical components, there are parallel processing, conditional return, loop, and conditional judgment, etc.; in the trigger components, there are timing triggers, HTTP (HyperText Transfer Protocol) triggers, message triggers, etc. The components provided by the component management panel support being selected by the flowchart drawing area.

[0127] Among them, in the menu bar area, global variable configuration, component connection configuration, and component definition function options are provided for component assembly and connection configuration.

[0128] Among them, the quick operation area is used to place quick function options, and these quick function options are used to provide a quick editing function for the flowchart, thereby improving the editing efficiency of the flowchart, and supporting quick configuration instructions for the name, group management, and annotation description of the API service orchestration process.

[0129] Among them, the debugging and version management panel is used to respond to service orchestration test and management instructions, including online debugging of the API service orchestration process, viewing debugging logs, going live of the orchestration process, and rolling back historical versions.

[0130] Among them, the interface configuration interface is used to define the hierarchical structure of the input parameters of the API, which can support automatically adjusting the input parameters according to the request and intelligently identifying the request parameters, persisting the request parameters of the API, and forming different versions.

[0131] Among them, the attribute configuration area is used for attribute configuration, which can be used to configure the attributes of components or the attributes of connections.

[0132] Here, the service orchestration instruction is an instruction generated in response to the orchestration operation of the execution subject of the embodiments of the present invention by the user.

[0133] The service orchestration instruction can be triggered in all areas of the service orchestration interface. For example, in the flowchart drawing area, component drag instructions, component customization instructions, text editing instructions, component function operation instructions are triggered; in the component selection area, component replacement instructions, component click instructions, component configuration instructions, etc. are triggered; in the menu bar area, variable creation instructions, new configuration instructions, etc. are triggered; in the quick operation area, name modification instructions, group creation instructions, group selection instructions, etc. are triggered; in the debugging and version management panel, orchestration debugging instructions, version switching instructions, etc. are triggered.

[0134] The service orchestration instruction includes component operation instructions and other element operation instructions. The component operation instruction is used to operate the component to be operated. Specifically, the component operation instruction can be used to indicate the target component to be operated. For example, the indicated target component to be operated is the dragged component, the newly added component, the component to be connected, the component with content to be edited, the component with style content to be set, the component with attributes to be configured, etc. Of course, the component operation instruction can also be used to indicate other operation information, which will not be elaborated here. The other element operation instruction is used to operate other elements except components, and other elements such as connections, flowcharts, direction arrows, grids, alignment lines, etc.

[0135] It should be noted that the service orchestration instruction can be triggered by clicking on the display screen of the execution subject, or by an input device, which can include but is not limited to: mouse and keyboard, etc. For example, operation instructions are triggered according to various mouse events, or operation instructions are triggered according to keyboard shortcuts.

[0136] The service orchestration instruction can include but is not limited to one or more of the following: component drag instruction, connection drag instruction, component customization instruction, component connection instruction, connection direction determination instruction, text editing instruction, style operation instruction, component click instruction, connection click instruction, component movement instruction, flowchart click instruction, flowchart drag instruction, flowchart setting instruction, flowchart scaling instruction, function click instruction, function drag instruction, component attribute configuration instruction, connection attribute configuration instruction, etc.

[0137] Specifically, performing operations corresponding to component drag-and-drop instructions, component customization instructions, text editing instructions, style operation instructions, or component property configuration instructions can provide components for the orchestration service, that is, components selected for business requirements. Performing operations corresponding to connection line drag-and-drop instructions, connection line direction determination instructions, style operation instructions, or connection line property configuration instructions can connect components, that is, for determining the orchestration route.

[0138] Specifically, perform the step of obtaining service orchestration instructions acting on the service orchestration interface several times, and perform operations corresponding to the service orchestration instructions. Finally, determine the service orchestration process based on each service orchestration instruction. Based on the graph data of the service orchestration process, aggregate the services of each target server to obtain the target integration process. More specifically, determine the services of each target server indicated by the service orchestration process, and determine the connection relationship between the services indicated by the service orchestration process. Based on this connection relationship, aggregate the services of each target server to obtain the target integration process.

[0139] For ease of understanding, as Figure 2 shown, the service orchestration process includes a first service, a second service, and a third service. The first service and the second service are connected in parallel and then connected to the third service. Based on this service orchestration process, determine the first connection relationship between the first service and the second service, and determine the second connection relationship between the two and the third service. Thus, based on the first connection relationship and the second connection relationship, perform integration processing on the first service, the second service, and the third service to obtain the target integration process of the three.

[0140] The API call method provided by the embodiments of the present invention obtains service orchestration instructions acting on the service orchestration interface, performs operations corresponding to the service orchestration instructions to perform service orchestration; based on the service orchestration process determined by each service orchestration instruction, performs integration processing on at least two backend services to obtain the target integration process, and can complete API interoperability between multiple applications without code, that is, perform service orchestration through a visual graphical interface. There is no need to spend a lot of time learning code. Users only need to focus on their own business requirements, further reducing redundant code development at the bottom layer, helping to perform service orchestration quickly and conveniently, thereby reducing the threshold of service orchestration, improving the efficiency of service orchestration, and reducing the cost of service orchestration.

[0141] Based on any of the above embodiments, the component to be operated includes at least one of a service component, a data source component, and a message source component.

[0142] Among them, the data source may include, but is not limited to: mysql, oracle, SQLServer, etc.

[0143] The API call method provided by the embodiments of the present invention can orchestrate the services, data sources, and message sources of each server through the above methods to achieve interoperability between multiple enterprise systems.

[0144] Based on any of the above embodiments, after returning the exception prompt message with the wrong request parameters to the data provider, the method further includes:

[0145] Determine the number of times the exception prompt message is returned;

[0146] When it is determined that the number of returns reaches the preset number threshold, perform a fusing process on the API access request.

[0147] Here, the number of returns is used to represent the number of times the API access request cannot be responded to.

[0148] Here, the preset number threshold can be set according to actual needs, and the embodiments of the present invention do not make specific limitations on this.

[0149] It should be noted that if an API access request fails to respond continuously for multiple times, the API access request will be automatically fused, so as to avoid the need to determine whether it matches the target hierarchical structure and the pre-set request parameter hierarchical structure every time a request comes, thereby further improving stability and further increasing the response speed.

[0150] In one embodiment, determine whether the target hierarchical structure successfully matches the pre-set request parameter hierarchical structure. If it matches, resume the API access request.

[0151] The API call method provided by the embodiments of the present invention determines that the number of times the exception prompt message is returned reaches the preset number threshold, and performs a fusing process on the API access request, so as to avoid the need to determine whether it matches every time a request comes, thereby further improving stability and further increasing the response speed.

[0152] Based on any of the above embodiments, in this method, the step of calling the target API of the data receiver based on the request parameters includes:

[0153] Determine the target API that best matches the request parameters from multiple APIs;

[0154] If all the input parameter fields of the target API match the request fields in the request parameters, call the target API based on the request parameters;

[0155] If there are new request fields in the request parameters that do not match the input parameter fields of the target API, modify the input parameter fields of the target API based on the new request fields, and call the target API with the modified input parameter fields based on the request parameters.

[0156] It should be noted that if the target API of the data recipient responding to the API access request cannot be determined, it is necessary to poll and attempt multiple APIs to determine the target API that can be used to add the request input parameters. Or, if the downstream data recipient provides multiple backend services and it is uncertain which API in the orchestration to add the request input parameters to, the APIs of each downstream data recipient will be polled to match the degree of matching between the request input parameters and the multiple downstream APIs, and a complete match is required to determine the call and response relationship.

[0157] Specifically, if each input parameter field of the target API matches the request fields in the request input parameters, it means a complete match, and the target API can be directly called based on the request input parameters; if there are new request fields in the request input parameters that do not match each input parameter field of the target API, it means an incomplete match, so the input parameter fields of the target API need to be modified.

[0158] That is to say, if a downstream API with a complete match cannot be found, the input parameter fields will be modified according to the API with the highest degree of matching. Further, according to the position of the new request fields in the request input parameters, the same new request fields will be added to the target API to ensure consistency between the two.

[0159] Further, the mapping relationship between the request input parameters and the target API is persisted, so as to facilitate directly determining the target API that best matches the request input parameters subsequently and improving the efficiency of API calls.

[0160] It should be understood that considering that the integration flow needs to pre-define the input and output parameter structures in advance, it is extremely difficult to implement dynamic parameter processing in the prior art. However, the embodiments of the present invention can dynamically support input parameters, connect the data provider and the downstream data recipient, and improve the compatibility of low-code service orchestration for this scenario.

[0161] The API call method provided by the embodiments of the present invention determines the target API that best matches the request input parameters from multiple APIs. If each input parameter field of the target API matches the request fields in the request input parameters, the target API is called based on the request input parameters. If there are new request fields in the request input parameters that do not match each input parameter field of the target API, the input parameter fields of the target API are modified based on the new request fields, and the target API with modified input parameter fields is called based on the request input parameters, so as to support non-fixed input parameters. Even if the request input parameters corresponding to the API access request have not appeared before, the API call can be successfully completed; and it can dynamically support input parameters, connect the data provider and the downstream data recipient, and improve the compatibility of low-code service orchestration for this scenario.

[0162] Based on any of the above embodiments, in this method, determining the target API that best matches the request input parameter from multiple APIs includes:

[0163] If there is an API associated with the request input parameter determined based on a number of stored mapping relationships, the API associated with the request input parameter among the multiple APIs is used as the target API that best matches the request input parameter;

[0164] If it is determined based on a number of stored mapping relationships that there is no API associated with the request input parameter, the multiple APIs are matched with the request input parameter to obtain the target API that best matches the request input parameter, and the mapping relationship between the request input parameter and the target API is persisted.

[0165] Specifically, persisting the mapping relationship between the request input parameter and the target API means saving this mapping relationship to a non-volatile storage medium (such as a disk, a database, or a file system, etc.) to ensure that this mapping relationship can be directly obtained subsequently. For example, saving this mapping relationship from temporary storage (such as memory) to a non-volatile storage medium.

[0166] In a specific embodiment, the mapping relationship is persisted and efficiently called by storing the mapping relationship between the request input parameter and the target API in a database and establishing a fast index based on a hash table.

[0167] Since the fields and structures involved in the request input parameter are mostly fixed rather than dynamic most of the time, re-looping and matching the request input parameters that have been called historically during the next request will cause performance problems. Based on this, after the first normal call is completed, the mapping relationship between the request input parameter and the target API is persisted so that in the next call of the same type, the downstream API can be directly called to avoid resource consumption caused by repeated matching. That is, the determined request input parameter and the information about which backend service's API it corresponds to are saved for subsequent direct input parameter response.

[0168] For the API calling method provided by the embodiments of the present invention, if it is determined based on a number of stored mapping relationships that there is no API associated with the request input parameter, the multiple APIs are matched with the request input parameter to obtain the target API that best matches the request input parameter, and the mapping relationship between the request input parameter and the target API is persisted. If it is determined based on a number of stored mapping relationships that there is an API associated with the request input parameter, the API associated with the request input parameter among the multiple APIs is used as the target API that best matches the request input parameter. That is, after the first normal call is completed, the mapping relationship between the request input parameter and the target API is persisted so that in the next call of the same type, the target API can be directly called, thereby improving the efficiency of API calling and avoiding resource consumption caused by repeated matching.

[0169] Furthermore, the above API call method can also be implemented through the following embodiments.

[0170] Specifically, the low-code API call with high compatibility is closely combined with the connector definition module. More specifically, it involves the development of application connectors, including connector metadata definition, connector execution action development (including configuration development and orchestration development), and connector response configuration definition. By defining the execution actions of application connectors and orchestrating the request parameters, data conversion and authentication gaps in the call process are smoothed out, achieving the purpose of improving the efficiency of API microservice gateway orchestration development.

[0171] Specifically, the connection configuration definition is used to determine the connection configuration parameters when the API is called. The supported default connection configurations include connection address, connection protocol, proxy host, and port. It supports connector developers to add new connection configuration parameters, determine the field key, and then the caller configures the input parameters corresponding to the key.

[0172] In the connector, it is necessary to define the metadata of the high-compatibility API in advance, define the input parameter / output parameter structure hierarchy of the API. When multiple APIs are used for the same business implementation, it supports selection and system adaptation through URL (Uniform Resource Locator) and tag marking in service orchestration. The definition of such interfaces is called "execution action". The execution action supports configuration development and orchestration development. For configuration development, it refers to the native interface development of the API, and orchestration development is the preprocessing of this atomic interface. Advantageously, this preprocessing can complete the authentication information, data encryption, data masking, and data conversion logic of the atomic interface in the connector in advance during the request, reducing the risk of external exposure and improving the security of the connector interface.

[0173] Specifically, orchestration development supports visual orchestration by leveraging the built-in logic orchestration capabilities of the system, combined with logic processors and technology connectors, reducing the complexity of atomic service aggregation and improving usability.

[0174] In addition, private / public control capabilities are provided for the atomic interfaces of the connector, that is, the execution actions. The connector developer manages the externally exposed interfaces and private interfaces, improving the flexibility of interface management. Among them, private interfaces can be used in orchestration development to meet the needs of atomic interface aggregation of the connector. Public interfaces can be used in the integration flow to meet the aggregation needs of multi-application integration orchestration development.

[0175] The response configuration, as the unified response code management device for the atomic interfaces in the connector, plays the role of enterprise unified API response code management.

[0176] In the development interface of the connector, it supports previewing the effects of all atomic APIs of the connector. This innovation enables viewing the parameters and data structures when the API is called even without the connector being fully tuned, which can significantly improve the efficiency of connector development during the actual development process.

[0177] For the aggregated atomic services, the platform provides the ability to automatically generate APIs and API documentation. This innovation aims to improve the efficiency of API development. At the same time, it forms an associated verification between the internal logic orchestration of the atomic services and the externally exposed APIs to ensure that the online APIs can be called successfully, reducing the error debugging process and the complexity of error debugging.

[0178] In addition, it provides the ability to view the matching relationship results between upstream dynamic APIs and downstream service APIs, and supports Json echo for the input and output parameters of the APIs (viewing the actual Json format of the input and output parameters), which is convenient for validating interface parameters and improving the verification efficiency.

[0179] By means of a flexible input method for request input and output parameters, the efficiency of API development is improved. In the embodiments of the present invention, a highly compatible API call method for automatically generating request input parameters for service orchestration according to the Json of the upstream API is proposed. However, the method for quickly generating API request parameters is not limited to Map input parameters, TEXT input parameters, data table input parameters, referring to the input parameters of the previous node, importing Swagger document input parameters, and Swagger open interface input parameters, so as to achieve the quick entry of API input and output parameters and the compatibility with dynamic APIs. Specifically, as follows:

[0180] 1) Import Json in a specified format to automatically generate request input and output parameters in the logic orchestration. More than 10 data formats are provided, and the json content is automatically verified and matched.

[0181] 2) Through the text format, enter the parameter name, parameter type, and parameter description, and automatically match the format to enter the parameters at the specified level.

[0182] 3) By referring to the data table in the database, identify the specified fields in the data table as the data format, parameter type, and parameter description of the input parameters.

[0183] 4) By referring to the previous node, which generally contains parameters with an array structure or a common structure, copy the parameters of the previous node to the current node to achieve the quick entry of input and output parameters.

[0184] 5) By importing the prepared Swagger document, the input and output parameters of multiple API interfaces can be automatically generated. This type of document introduces a dependency package in the code and automatically generates it by editing the corresponding annotations, so as to utilize its component capabilities to generate a document in a specified format.

[0185] In addition, the input parameters support two methods: overwrite and append. Overwrite means erasing all the original parameters and generating a new parameter structure, while append allows users to append parameters under or after a specified node.

[0186] Specifically, in the case of an array type, the form of append is to add parameters to the array node. In the case of ordinary type parameters, new parameters are appended after them.

[0187] This platform provides the ability to manage the consistency of API paths, reasonably group atomic aggregation services, and meet the scenario requirements of quickly identifying the ownership of atomic services when integrating multiple business systems.

[0188] Specifically, after creating an API service, developers can manage the API by adding groups. The prefix of the call link is preset in the group, and the developer supplements the URL of the group and assembles the specific address of the interface to form the complete path of the API. In addition, when creating a group, authentication for the group of APIs is achieved by binding API credentials.

[0189] It should be particularly noted that there are two ways of API authentication in the industry, namely, authenticating a single API and authenticating an API group. Authenticating a single API will lead to the problem that the overall authentication management of the business system cannot align the authentication methods. The present invention selects the method of group authentication, manages the API through groups, and manages the authentication credentials of the groups to achieve the purpose of unified API access credentials for a specified system.

[0190] The API call device provided by the present invention will be described below. The API call device described below can be correspondingly referred to the API call method described above.

[0191] Figure 3 is a schematic structural diagram of the API call device provided by an embodiment of the present invention, as Figure 3 shown, the API call device includes: a request receiving module 310, a parameter parsing module 320, an input parameter determination module 330, and an API call module 340.

[0192] The request receiving module 310 is configured to receive an API access request sent by a data provider.

[0193] The parameter parsing module 320 is configured to parse the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field.

[0194] The input parameter determination module 330 is configured to determine request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value.

[0195] The API call module 340 is used to call the target API of the data receiver based on the request input parameters, so as to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute the business logic matching the request input parameters.

[0196] The API call device provided by the embodiment of the present invention receives an API access request sent by a data provider, parses the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field, and determines the request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value. Thus, it can directly call the target API of the data receiver based on the request input parameters to send the request input parameters to the data receiver, without wasting time on the connection adaptation between the data provider and the downstream data receiver. That is, the low-code integration platform only needs to parse the API access request to automatically generate the request input parameters that can call the target API, thereby quickly realizing the API call, that is, improving the efficiency of the API call. In other words, it improves the response speed of the API access request, and this method does not require manual operation, thus reducing the cost of the API call.

[0197] Based on any of the above embodiments, the request parameters include Json data; the Json data includes at least one request field and the field value corresponding to each request field; the device further includes:

[0198] The hierarchy determination module is used to determine the target hierarchy structure of the Json data;

[0199] The prompt return module is used to return an exception prompt message indicating an error in the request parameters to the data provider when the target hierarchy structure does not match the preset request input parameter hierarchy structure;

[0200] The step execution module is used to execute the step of determining the request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value when the target hierarchy structure matches the preset request input parameter hierarchy structure.

[0201] Based on any of the above embodiments, the device further includes:

[0202] The instruction acquisition module is used to acquire the operation instruction acting on the interface configuration interface and execute the operation instruction to determine the request input parameter hierarchy structure;

[0203] A field setting module, configured to set each input parameter field of the backend service API based on the hierarchical structure of the request input parameters, so that the hierarchical structure of the input parameters of the backend service API is the same as that of the request input parameters; the backend service API is an API that responds to an API request matching the hierarchical structure of the request input parameters.

[0204] Based on any of the above embodiments, the apparatus further includes: an API determination module; the API determination module is configured to:

[0205] Determine a backend service that responds to an API access request from the data provider based on a target integration process;

[0206] Determine the backend service API based on the backend service.

[0207] Wherein, the apparatus further includes: a process determination module, and the process determination module is configured to:

[0208] Obtain a service orchestration instruction acting on the service orchestration interface, and execute an operation corresponding to the service orchestration instruction to perform service orchestration;

[0209] Based on the service orchestration process determined by each service orchestration instruction, perform integration processing on at least two backend services to obtain a target integration process;

[0210] Wherein, the target integration process is used to set the connection relationship of the at least two backend services.

[0211] Based on any of the above embodiments, the apparatus further includes:

[0212] A frequency determination module, configured to determine the return frequency of the exception prompt message;

[0213] A request fusing module, configured to determine that the return frequency reaches a preset frequency threshold, and perform fusing processing on the API access request.

[0214] Based on any of the above embodiments, the API call module 340 is further configured to:

[0215] Determine the target API that best matches the request input parameters from multiple APIs;

[0216] If each input parameter field of the target API matches all the request fields in the request input parameters, call the target API based on the request input parameters;

[0217] If there are new request fields in the request input parameters that do not match each input parameter field of the target API, modify the input parameter fields of the target API based on the new request fields, and call the target API with modified input parameter fields based on the request input parameters.

[0218] Based on any of the above embodiments, the API call module 340 is further configured to:

[0219] If it is determined based on a plurality of stored mapping relationships that there is an API associated with the request input parameter, the API associated with the request input parameter among the multiple APIs is used as the target API that best matches the request input parameter;

[0220] If it is determined based on a plurality of stored mapping relationships that there is no API associated with the request input parameter, the multiple APIs are matched with the request input parameter to obtain the target API that best matches the request input parameter, and the mapping relationship between the request input parameter and the target API is persisted.

[0221] Figure 4 An example of the physical structure diagram of an electronic device is shown as Figure 4 shown. The electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440. Among them, the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440. The processor 410 may call the logical instructions in the memory 430 to execute an API call method, which includes: receiving an API access request sent by a data provider; parsing the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field; determining a request input parameter based on each request field, the field value corresponding to each request field, and the data type of each field value; calling a target API of a data receiver based on the request input parameter to send the request input parameter to the data receiver; the request input parameter is used to instruct the data receiver to execute a service logic that matches the request input parameter.

[0222] In addition, when the logical instructions in the above-mentioned memory 430 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0223] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the API call method provided by the above-mentioned various methods. The method includes: receiving an API access request sent by a data provider; parsing the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field; determining request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value; calling a target API of a data receiver based on the request input parameters to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute business logic matching the request input parameters.

[0224] In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the API call method provided by the above-mentioned various methods. The method includes: receiving an API access request sent by a data provider; parsing the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field; determining request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value; calling a target API of a data receiver based on the request input parameters to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute business logic matching the request input parameters.

[0225] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0226] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence, or the parts that contribute to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0227] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.

[0228] The above embodiments are only used to illustrate the present invention, rather than to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, those of ordinary skill in the art should understand that various combinations, modifications or equivalent replacements of the technical solutions of the present invention do not deviate from the spirit and scope of the technical solutions of the present invention, and should all be covered by the scope of the claims of the present invention.

Claims

1. An API call method, characterized in that, Applied to a low-code integration platform, the method includes: Receiving an API access request sent by a data provider; Parsing the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field; Determining request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value; Invoking the target API of the data receiver based on the request input parameters to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute business logic matching the request input parameters; The invoking the target API of the data receiver based on the request input parameters includes: Determining the target API that best matches the request input parameters from multiple APIs; If each input parameter field of the target API matches the request field in the request input parameters, invoking the target API based on the request input parameters; If there are new request fields in the request input parameters that do not match each input parameter field of the target API, modifying the input parameter fields of the target API based on the new request fields, and invoking the target API with modified input parameter fields based on the request input parameters; Wherein, if the target API of the data receiver for responding to the API access request cannot be determined, Performing a polling attempt on multiple APIs to determine a target API that can be used to add the request input parameters.

2. The API call method according to claim 1, wherein The request parameters include Json data; the Json data includes at least one request field and the field value corresponding to each request field; After parsing the request parameters in the API access request, it further includes: Determining the target hierarchical structure of the Json data; In the case where the target hierarchical structure does not match the preset request input parameter hierarchical structure, returning an exception prompt message of request parameter error to the data provider; In the case where the target hierarchical structure matches the preset request input parameter hierarchical structure, performing the step of determining request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value.

3. The API call method according to claim 2, wherein Before parsing the request parameters in the API access request, it further includes: Obtaining an operation instruction acting on the interface configuration interface and executing the operation instruction to determine the request input parameter hierarchical structure; Setting each input parameter field of the backend service API based on the request input parameter hierarchical structure so that the input parameter hierarchical structure of the backend service API is the same as the request input parameter hierarchical structure; the backend service API is an API that responds to an API request matching the request input parameter hierarchical structure.

4. The API call method according to claim 3, wherein The backend service API is determined based on the following method: Determining a backend service that responds to the API access request of the data provider based on a target integration process; Determining the backend service API based on the backend service; Wherein, the target integration process is determined based on the following method: Obtaining a service orchestration instruction acting on the service orchestration interface and executing the operations corresponding to the service orchestration instruction to perform service orchestration; Integrate at least two backend services based on the service orchestration process determined by each service orchestration instruction to obtain a target integration process; Among them, the target integration process is used to set the connection relationship of the at least two backend services.

5. The API call method according to claim 2, wherein After returning the exception prompt message with incorrect request parameters to the data provider, it further includes: Determine the number of times the exception prompt message is returned; Determine that the number of returns reaches the preset number threshold, and perform a circuit breaker process on the API access request.

6. The API call method according to claim 1, wherein The determining the target API that best matches the request input parameters from multiple APIs includes: If there is an API associated with the request input parameters determined based on a number of stored mapping relationships, use the API associated with the request input parameters among the multiple APIs as the target API that best matches the request input parameters; If there is no API associated with the request input parameters determined based on a number of stored mapping relationships, match the multiple APIs with the request input parameters to obtain the target API that best matches the request input parameters, and persist the mapping relationship between the request input parameters and the target API.

7. An API call device, characterized in that, Deployed on a low-code integration platform, the device includes: A request receiving module, configured to receive an API access request sent by a data provider; A parameter parsing module, configured to parse the request parameters in the API access request to obtain at least one request field and the field value corresponding to each request field; An input parameter determining module, configured to determine request input parameters based on each request field, the field value corresponding to each request field, and the data type of each field value; An API calling module, configured to call the target API of the data receiver based on the request input parameters to send the request input parameters to the data receiver; the request input parameters are used to instruct the data receiver to execute business logic matching the request input parameters; The calling the target API of the data receiver based on the request input parameters includes: Determine the target API that best matches the request input parameters from multiple APIs; If each input parameter field of the target API matches each request field in the request input parameters, call the target API based on the request input parameters; If there are new request fields in the request input parameters that do not match each input parameter field of the target API, modify the input parameter fields of the target API based on the new request fields, and call the target API with modified input parameter fields based on the request input parameters; Among them, if the target API of the data receiver that responds to the API access request cannot be determined, Perform a polling attempt on multiple APIs to determine a target API that can be used to add the request input parameters.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the API calling method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the API calling method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the API calling method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data service method and device and readable storage medium

    CN112256772A

  • Visual service orchestration method and device, equipment and medium

    CN114115852A