CN112749026A - API calling method and related device - Google Patents

API calling method and related device Download PDF

Info

Publication number
CN112749026A
CN112749026A CN202011624349.4A CN202011624349A CN112749026A CN 112749026 A CN112749026 A CN 112749026A CN 202011624349 A CN202011624349 A CN 202011624349A CN 112749026 A CN112749026 A CN 112749026A
Authority
CN
China
Prior art keywords
service
parameter
api
service platform
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011624349.4A
Other languages
Chinese (zh)
Inventor
柳东胜
李家凤
李胜强
唐云钊
吴昌武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202011624349.4A priority Critical patent/CN112749026A/en
Publication of CN112749026A publication Critical patent/CN112749026A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application discloses an API calling method and a related device, which are used for calling an API of an external platform. The method in the embodiment of the application comprises the following steps: acquiring a service instruction; analyzing the service instruction, and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter; acquiring parameter conversion scripts corresponding to the service platform, wherein each parameter conversion script corresponds to an API data format; converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script; and sending a corresponding call request to the service platform API according to the second service parameter.

Description

API calling method and related device
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an API calling method and a related device.
Background
An Application Programming Interface (API) is a predefined network Interface, through which the mutual communication between computer software can be realized, and data sharing is provided for various platforms, according to the data sharing performance between different software applications on a single or distributed platform.
In order to implement data intercommunication, when a self-server calls an API of an external platform, a Software Development Kit (SDK) with an API provider is often required to be installed so as to be compatible with communication data formats of both parties. When the server interfaces with multiple API providers, the SDK packages for these external platforms are installed on the server. If there is a compatibility problem between the own server and the SDK package, it must wait for the external platform to repair.
Disclosure of Invention
The embodiment of the application mainly provides an API calling method and a related device, which are used for optimizing the calling process of an external API.
A first aspect of the present application provides an API calling method, including:
acquiring a service instruction;
analyzing the service instruction, and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter;
acquiring parameter conversion scripts corresponding to the service platform, wherein each parameter conversion script corresponds to an API data format;
converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script;
and sending a corresponding call request to the service platform API according to the second service parameter.
Optionally, the first service parameter includes a common parameter and a difference parameter, the common parameter corresponds to multiple service platform APIs, and the difference parameter corresponds to a single service platform API.
Optionally, the method further comprises:
receiving a second service response returned by the service platform API;
acquiring a result conversion script corresponding to the service platform API;
and converting the second service response into the first service response by using the result conversion script.
Optionally, the method further comprises:
and fusing the first service parameters from a plurality of different service platforms to generate a service response corresponding to the service instruction.
Optionally, the analyzing the service instruction, and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter, includes:
and analyzing the first service parameter by using a preset parameter processor to confirm the first service parameter and the service platform related to the first service parameter, wherein the parameter processor stores the corresponding relation between the first service parameter of various service platforms and the service platform API.
Optionally, the sending, according to the second service parameter, a corresponding call request to the service platform API includes:
acquiring an interface caller corresponding to the second service parameter, wherein an API group corresponding to the second service parameter is stored in the caller, and the interface group comprises interface names of a plurality of service platform APIs;
and using the interface caller to send a call request corresponding to the second service parameter in parallel so as to call the service platform API.
A second aspect of the present application provides an API calling apparatus, including:
the first acquisition unit is used for acquiring a service instruction;
the analysis unit is used for analyzing the service instruction and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter;
a second obtaining unit, configured to obtain parameter conversion scripts corresponding to the service platform, where each parameter conversion script corresponds to one API data format;
the first conversion unit is used for converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script;
and the sending unit is used for sending a corresponding calling request to the service platform API according to the second service parameter.
Optionally, the apparatus further comprises:
the receiving unit is used for receiving a second service response returned by the service platform API;
a third obtaining unit, configured to obtain a result conversion script corresponding to the service platform API
And the second conversion unit is used for converting the second service response into the first service response by using the result conversion script.
Optionally, the apparatus further comprises:
and the fusion unit is used for fusing the first service parameters from a plurality of different service platforms to generate a service response corresponding to the service instruction.
A third aspect of the present application provides a computer device comprising:
a processor, a memory, the memory storing a computer program; the processor is connected with the memory; the processor, when executing a computer program stored in the memory, implements the method of any of the claims in the first aspect.
A fourth aspect of the present application provides a computer storage medium having instructions stored thereon, which when executed on a computer, cause the computer to perform the method of any of the first aspects.
According to the technical scheme, the embodiment of the application has the following advantages: in the scheme, a set of external interface system is arranged on the own server, when an external API is required to be called, parameters required to be acquired are firstly analyzed through a unified parameter processor, and data format change is carried out on the parameters according to different platforms so as to adapt to API access requirements of different platforms.
Drawings
FIG. 1 is a schematic diagram of one embodiment of an API call method in the present application;
FIG. 2 is a schematic diagram of one embodiment of an API call method in the present application;
FIG. 3 is a schematic diagram of one embodiment of an API call method in the present application;
FIG. 4 is a schematic diagram of one embodiment of an API call method in the present application;
FIG. 5 is a schematic diagram of one embodiment of an API-calling device in the present application;
FIG. 6 is a schematic diagram of one embodiment of a computer device in the present application.
Detailed Description
At present, the ERP products generally adopt the following two methods for interfacing external systems (such as e-commerce platform, logistics platform, etc.):
(1) docking using SDK provided by external system platform
(2) Self-using code package to interface different external system interface and analyzing interface return result
If the SDK is used for docking, the potential risk is high, although the workload of docking is reduced to a certain extent, the SDK is a black box with a very large authority in consideration of flexibility, expansibility and safety, wherein an interface basically has no expansibility, and once the SDK has a problem, the repair response period is very long, which causes uncontrollable. If a self-packaging interface mode is adopted, because the difference of the interfaces of each large external system is large, usually, a multi-socket system has to be adopted, and the access readability of different interfaces of different external systems is poor, the returned result is very troublesome to realize service analysis, and the butt joint workload is huge; with the increasing number of external systems to be connected, the increase of the difference can lead to the explosive growth of code amount, and the expansibility and maintainability are reduced, which is not beneficial to the continuous development of products.
The embodiment of the application provides an API calling method, which can unify the interface form and calling mode of each external system, enhance or combine the interfaces, redefine the interface entry and result according to the service requirement, enable the service docking to be more convenient, have shorter period and smaller workload, and is used for establishing a set of high-security API calling system which can be cut, is easy to understand and expand on a server of the own side. Referring to fig. 1, the API calling method of the present application includes:
101. acquiring a service instruction;
and the own server receives the service instruction and starts a task corresponding to the instruction so as to realize the corresponding service. Specific businesses, such as price inquiry, commodity purchase, log upload and the like, can be defined by self for different enterprises and individuals, and can be any behaviors related to data communication. One service instruction may include tasks for calling APIs of a plurality of different external platforms, and further include an instruction that needs to be sent to the APIs when calling the external APIs.
102. Analyzing the service instruction, and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter;
and the own server analyzes the service instruction to obtain a first service parameter required by realizing the service. The format of the first service parameters can be defined according to the data format of the own party, so that developers of the own party can develop matched software programs for the first service parameters, or the first service parameters are adapted to existing software programs of the own party. Preferably, the first business parameter may adopt a domain-driven development mode, which is convenient for developers to understand and edit, for example, the Price parameter represents the original Price of the commodity, and the Sku parameter represents the stock quantity of the commodity.
103. Acquiring a parameter conversion script corresponding to the service platform API;
and acquiring a parameter conversion script corresponding to the service platform API, and generally configuring a parameter conversion script for the data format of each service API for converting the data format of the type. In particular, if some external platforms employ the same data format as the first service parameter data format of the own server, it is not necessary to configure the parameter conversion script. In addition, there may be a case where the first service parameters of the APIs of the multiple platforms use the same data format, and at this time, the service platforms APIs with the same data format may share the same parameter conversion script.
104. Converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script;
and according to the data format of the first parameters, converting the data format of the first parameters by using the parameter conversion script obtained in the step 103 to obtain second service parameters meeting the requirement of the service platform API. The second service parameters are defined by the external service platforms, and if the interfaces of the external service platforms are required to be called, the data formats of the external service platforms are required to be adopted. For example, the Price parameter in the first service parameter is used to represent the Original Price of the commodity, the Price parameter in the service platform a is used to represent the Original Price of the commodity, the Price parameter in the service platform B is used to represent the Original Price of the commodity, the parameter conversion script corresponding to the service platform a is used to convert the Price parameter into the Price parameter, and the parameter conversion script corresponding to the service platform B is used to convert the Price parameter into the Original Price parameter. In addition, if the data formats of the first service parameter and the second service parameter are different, the data format conversion by the parameter conversion script is also required. For example, the first service parameter uses the interface document in the Json format, and the second service parameter uses the interface document in the XML format, so that the parameter conversion script corresponding to the service platform B is needed to implement the conversion process.
105. And sending a corresponding call request to the service platform API according to the second service parameter.
And sending corresponding calling requests to the API of each service platform according to the content of the second service parameters. For example, the call request of the prime cost parameter in step 104 is sent to the specified API of the service platform a, and the call request of the origin price parameter in step 104 is sent to the specified API of the service platform B. It should be noted that the two second parameter call examples listed in this embodiment are only used to help those skilled in the art understand the present solution, in practical applications, the second service parameter that can be sent by the own server may relate to any number of service platform APIs, and the number of API requests sent to each service platform may also vary, depending on the requirements of the service instruction.
Based on the embodiment shown in fig. 1, in another embodiment, a process of returning a service response by an external platform is also shown. Referring to fig. 2, the steps of this embodiment may include:
201. acquiring a service instruction;
202. analyzing the service instruction, and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter;
203. acquiring a parameter conversion script corresponding to the service platform API;
204. converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script;
205. according to the second service parameter, sending a corresponding call request to the service platform API;
206. receiving a second service response returned by the service platform API;
and receiving a second service response returned by the external service platform, wherein the content of the second service response is an operation result made by the API of the external service platform calling the relevant program in the API according to the second service parameter sent in step 205. The second service response is a response to the API call request by the external service platform, typically in the form of an interface document in XML or JSON format, but the specific data format or data form may be different from the second service parameters.
207. Acquiring a result conversion script corresponding to the service platform API;
and acquiring a result conversion script corresponding to the service platform, wherein the result conversion script is similar to the parameter conversion script, and a parameter conversion script is generally configured for each service API data format and is used for converting the type of data format. In addition, if there is a case where the same data format is used for the APIs of the multiple platforms to return the second service response, the service platform APIs with the same data format may share the same result conversion script.
208. Converting the second service response into a first service response by using the result conversion script;
and converting the second service parameter response into the first service response conforming to the own data format by using a result conversion script corresponding to the second service parameter. Similar to the operation principle of the parameter conversion script, if the data forms of the first service parameter and the second service parameter are different, the result conversion script also needs to transform the interface document form of the second service parameter.
209. And fusing the first service parameters from a plurality of different service platforms to generate a service response corresponding to the service instruction.
Step 209 is an optional step, and after the host server calls the APIs of the multiple external service platforms according to the service instruction, the host server may wait for each service platform to return the second service response and convert the second service response into the first service response, and then integrate the service responses as the execution result of the service instruction.
Based on the embodiment shown in fig. 1, a more specific implementation manner of the API calling method is also shown in the embodiment shown in fig. 3, which specifically includes:
301. acquiring a service instruction;
and the own server receives the service instruction and starts a task corresponding to the instruction so as to realize the corresponding service. Specific businesses, such as price inquiry, commodity purchase, log upload and the like, can be defined by self for different enterprises and individuals, and can be any behaviors related to data communication. One service instruction may include tasks for calling APIs of a plurality of different external platforms, and further include an instruction that needs to be sent to the APIs when calling the external APIs.
302. And analyzing the first service parameter by using a preset parameter processor to confirm the first service parameter and the service platform related to the first service parameter, wherein the parameter processor stores the corresponding relation between the first service parameter of various service platforms and the service platform API.
Presetting a parameter processor component, which stores first service parameters required to be called when each service instruction is executed and a service platform related to the first parameters. Preferably, these first parameters may be divided into common parameters and difference parameters. For example, the content of a certain business instruction is the price of the query commodity, which is 90 on the a platform; the price of the commodity on the platform B is 100; while the price of the commodity on the C platform is 95, but the C platform also provides a member discount price of 88; therefore, the commodity Price of non-member Price can be represented by common parameter of Price, and the member discount Price can be represented by difference parameter of Vip Price, the common parameter can call API and return response on a plurality of service platforms related by the service instruction, and the difference parameter only calls API and returns response on a specific service platform. The public parameters and the difference parameters are distinguished, so that the development and the expansion of own developers on the service are facilitated, the workload of the developers is reduced, and matched software programs do not need to be developed for the public parameters of different platforms respectively.
303. Acquiring a parameter conversion script corresponding to the service platform API;
the method comprises the steps of obtaining a parameter conversion script of a service platform, wherein the parameter conversion script corresponds to a data format of a service platform API and records a conversion relation between a first service parameter and a second service parameter of the service platform. The conversion relationship may include not only the parameter data format conversion, but also the conversion of the data format, for example, converting the parameter in the XML format into the JSON format for storage.
304. Converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script;
and converting the first service parameters originally adapted to the C into second service parameters adapted to the service platform API by using the parameter conversion script corresponding to the service platform API. It can be understood that there may exist some service platforms having the same data format as the own server, and the first service parameter may be directly used to call the API of such service platform, and it can be understood that these service platforms have completed the process of converting the first service parameter into the second service parameter, which is not in conflict with the solution of this embodiment.
305. Acquiring an interface caller corresponding to the second service parameter, wherein an API group corresponding to the second service parameter is stored in the caller, and the interface group comprises interface names of a plurality of service platform APIs;
and setting interface callers on the own server, wherein each interface caller is adapted to one API group, and storing the call flow of each interface of the interface group in the interface callers. The API group refers to a group formed by integrating a plurality of API objects, for example, the API for querying the commodity price of a plurality of different service platforms is set as a group, or the API for querying the commodity price, the inventory, and the tax rate of a single platform is set as a group, and the specific grouping rule may be defined by the developer, which is not limited herein.
306. Using the interface caller to send a call request corresponding to the second service parameter in parallel so as to call the service platform API;
and enabling the interface invoker according to the second service parameter, and sending a call request of the http protocol to each API of the service platform according to the configuration in the interface invoker, wherein the APIs of the service platform can belong to the same service platform or belong to a plurality of different service platforms. The interface caller has the function of integrating APIs closely related to calling processes, and is convenient to develop and maintain in the system. If the rule of a certain API needs to be changed, only the interface caller corresponding to the API can be maintained, and other interface callers normally operate. Preferably, the interface invoker can invoke the service platform APIs in a parallel manner, so as to improve the response speed.
Fig. 4 is a schematic flow diagram of the API calling method, and it can be seen that the embodiment shown in fig. 3 further improves the API calling method, integrates a part of the API calling flow, has low maintenance and upgrade difficulty compared with the existing API calling flow, and facilitates the field-driven development of technical personnel.
In the present invention, a preferred implementation of the script engine required for running the parameter conversion script and the result conversion script is to design a corresponding development script engine using a Domain Specific Language (DSL). Compared with some common script engines at present, the DSL adopted script engine has the following advantages:
1) can be cut down
The language feature can be enabled or customized features can be added according to the requirements of the use environment. For example, when a script from the outside of the system needs to be executed in the invention, the loop and the self-defined function mechanism in the script can be cancelled, and the server overload caused by dead loop in the script is avoided.
2) Safety feature
Many scripting engines provide direct access to the Class and Method mechanisms in the Java environment. When untrusted scripts need to be executed on the server, it is difficult to protect against malicious access to the scripts if such script engines are used. The script engine of the scheme can set the resources which can be accessed by the script according to the DSL, so that the security of the script engine is improved, and the resources which are not provided by the context environment of the script are invisible to the script.
3) Is easy to understand
DSL is a process-oriented language, and scripts written using DSL are easy to understand; no object-oriented properties are provided, so the runtime behavior of the script is also easily predictable. The variable scope relation is simple, a single runtime context is used, and the access mode of the variable is clear and unambiguous.
4) Easy expansion
In the invention, new characteristics can be added to the target engine from multiple levels such as constant values, system variables, data types, runtime functions, compile-time functions, parsers and the like. For example, packaging database tables as a hierarchy object may greatly simplify the way in which a database is accessed in a script, providing partial or complete variable type support for the execution of the script through external variable type declarations and runtime environment access controls.
Corresponding to the above method, fig. 5 also shows an API calling apparatus for implementing the API calling method. The device includes:
a first obtaining unit 501, configured to obtain a service instruction;
an analyzing unit 502, configured to analyze the service instruction, and determine a first service parameter included in the service instruction and a service platform API to which the first service parameter relates;
a second obtaining unit 503, configured to obtain parameter conversion scripts corresponding to the service platform, where each parameter conversion script corresponds to one API data format;
a first conversion unit 504, configured to convert the first service parameter into a second service parameter supported by the service platform API using the parameter conversion script;
a sending unit 505, configured to send a corresponding call request to the service platform API according to the second service parameter.
Optionally, the apparatus further comprises:
a receiving unit 506, configured to receive a second service response returned by the service platform API;
a third obtaining unit 507, configured to obtain a result conversion script corresponding to the service platform API
A second conversion unit 508, configured to convert the second service response into the first service response using the result conversion script.
Optionally, the apparatus further comprises:
a merging unit 509, configured to merge the first service parameters from multiple different service platforms, and generate a service response corresponding to the service instruction.
The present application further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, so that when the processor executes the computer program in the memory, the method corresponding to any one of the embodiments shown in fig. 1 to fig. 3 is implemented. Referring to fig. 6, the computer device may include one or more Central Processing Units (CPUs) 601 and a memory 605, where the memory 605 stores one or more applications or data. The memory 605 may be volatile storage or persistent storage, among other things. The program stored in the memory 605 may include one or more modules, each of which may include a sequence of instructions operating on a computer device. Still further, the central processor 601 may be arranged in communication with the memory 605 to execute a series of instruction operations in the memory 605 on the computer device 600. The computer apparatus 600 may also include one or more power supplies 602, one or more wired or wireless network interfaces 603, one or more input-output interfaces 604, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc. The central processing unit 601 can execute the corresponding operations in the embodiments shown in fig. 1 to fig. 3, and detailed descriptions thereof are omitted here
The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a computer, implements the method flow in any one of the embodiments shown in fig. 1 to 3.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. An API call method, comprising:
acquiring a service instruction;
analyzing the service instruction, and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter;
acquiring parameter conversion scripts corresponding to the service platform, wherein each parameter conversion script corresponds to an API data format;
converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script;
and sending a corresponding call request to the service platform API according to the second service parameter.
2. The API calling method of claim 1, wherein the first service parameter comprises a common parameter and a difference parameter, the common parameter corresponds to a plurality of service platform APIs, and the difference parameter corresponds to a single service platform API.
3. The API calling method of claim 1, further comprising:
receiving a second service response returned by the service platform API;
acquiring a result conversion script corresponding to the service platform API;
and converting the second service response into the first service response by using the result conversion script.
4. The API call method of claim 3, further comprising:
and fusing the first service parameters from a plurality of different service platforms to generate a service response corresponding to the service instruction.
5. The API calling method according to claim 4, wherein the parsing the service instruction and determining the first service parameter included in the service instruction and the service platform API to which the first service parameter relates includes:
and analyzing the first service parameter by using a preset parameter processor to confirm the first service parameter and the service platform related to the first service parameter, wherein the parameter processor stores the corresponding relation between the first service parameter of various service platforms and the service platform API.
6. The API calling method according to claim 5, wherein the sending a corresponding call request to the service platform API according to the second service parameter includes:
acquiring an interface caller corresponding to the second service parameter, wherein an API group corresponding to the second service parameter is stored in the caller, and the interface group comprises interface names of a plurality of service platform APIs;
and using the interface caller to send a call request corresponding to the second service parameter in parallel so as to call the service platform API.
7. An API calling apparatus, comprising:
the first acquisition unit is used for acquiring a service instruction;
the analysis unit is used for analyzing the service instruction and determining a first service parameter included in the service instruction and a service platform API related to the first service parameter;
a second obtaining unit, configured to obtain parameter conversion scripts corresponding to the service platform, where each parameter conversion script corresponds to one API data format;
the first conversion unit is used for converting the first service parameter into a second service parameter supported by the service platform API by using the parameter conversion script;
and the sending unit is used for sending a corresponding calling request to the service platform API according to the second service parameter.
8. The API-calling device of claim 7, wherein the device further comprises:
the receiving unit is used for receiving a second service response returned by the service platform API;
a third obtaining unit, configured to obtain a result conversion script corresponding to the service platform API
And the second conversion unit is used for converting the second service response into the first service response by using the result conversion script.
9. A computer device, comprising:
a processor, a memory, the memory storing a computer program; the processor is connected with the memory; the processor, when executing a computer program stored within the memory, implements the method of any of claims 1 to 6.
10. A computer storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 6.
CN202011624349.4A 2020-12-30 2020-12-30 API calling method and related device Pending CN112749026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011624349.4A CN112749026A (en) 2020-12-30 2020-12-30 API calling method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011624349.4A CN112749026A (en) 2020-12-30 2020-12-30 API calling method and related device

Publications (1)

Publication Number Publication Date
CN112749026A true CN112749026A (en) 2021-05-04

Family

ID=75650512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011624349.4A Pending CN112749026A (en) 2020-12-30 2020-12-30 API calling method and related device

Country Status (1)

Country Link
CN (1) CN112749026A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995813A (en) * 2022-06-28 2022-09-02 上海中汇亿达金融信息技术有限公司 Exchange API module and related exchange application platform
CN115174683A (en) * 2022-06-29 2022-10-11 广州鲁邦通智能科技有限公司 Request method and system for calling query interface

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256483A (en) * 2006-12-04 2008-09-03 Sap股份公司 Method and apparatus for persistent tool object
US20090216803A1 (en) * 2008-02-22 2009-08-27 Eugene Goldfarb Rule generation system adapted for an insurance claim processing system
CN108055337A (en) * 2017-12-22 2018-05-18 迈普通信技术股份有限公司 The method and apparatus that multiple service platform docks public platform
CN109145043A (en) * 2018-07-18 2019-01-04 上海汉得信息技术股份有限公司 A kind of multi-platform data interconnection method and equipment
CN110175030A (en) * 2019-05-31 2019-08-27 福建南威软件有限公司 A kind of API service gateway processes method
CN110933095A (en) * 2019-12-04 2020-03-27 锐捷网络股份有限公司 Message parsing method and device
CN111447195A (en) * 2020-03-23 2020-07-24 杭州趣维科技有限公司 Web interface design method for preventing request message from being tampered, attacked and replayed
CN111447141A (en) * 2020-03-27 2020-07-24 沈阳林科信息技术有限公司 Compatible access system based on API gateway and compatible access method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256483A (en) * 2006-12-04 2008-09-03 Sap股份公司 Method and apparatus for persistent tool object
US20090216803A1 (en) * 2008-02-22 2009-08-27 Eugene Goldfarb Rule generation system adapted for an insurance claim processing system
CN108055337A (en) * 2017-12-22 2018-05-18 迈普通信技术股份有限公司 The method and apparatus that multiple service platform docks public platform
CN109145043A (en) * 2018-07-18 2019-01-04 上海汉得信息技术股份有限公司 A kind of multi-platform data interconnection method and equipment
CN110175030A (en) * 2019-05-31 2019-08-27 福建南威软件有限公司 A kind of API service gateway processes method
CN110933095A (en) * 2019-12-04 2020-03-27 锐捷网络股份有限公司 Message parsing method and device
CN111447195A (en) * 2020-03-23 2020-07-24 杭州趣维科技有限公司 Web interface design method for preventing request message from being tampered, attacked and replayed
CN111447141A (en) * 2020-03-27 2020-07-24 沈阳林科信息技术有限公司 Compatible access system based on API gateway and compatible access method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995813A (en) * 2022-06-28 2022-09-02 上海中汇亿达金融信息技术有限公司 Exchange API module and related exchange application platform
CN114995813B (en) * 2022-06-28 2023-12-19 上海中汇亿达金融信息技术有限公司 Exchange API module and related exchange application platform
CN115174683A (en) * 2022-06-29 2022-10-11 广州鲁邦通智能科技有限公司 Request method and system for calling query interface
CN115174683B (en) * 2022-06-29 2023-10-13 广州鲁邦通智能科技有限公司 Request method and system for calling query interface

Similar Documents

Publication Publication Date Title
US10678522B1 (en) Compiler and method for compiling business rules for a serverless runtime environment
US9323647B2 (en) Request-based activation of debugging and tracing
US20060271911A1 (en) Generating executable objects implementing methods for an information model
JPH0827775B2 (en) Method and system for calling processing procedure from remote node
Mazzei et al. A full stack for quick prototyping of IoT solutions
US10379914B2 (en) System and method for achieving specific behaviors by intercepting file access calls in a mainframe rehosting platform
CN112749026A (en) API calling method and related device
CN114490268A (en) Full link monitoring method, device, equipment, storage medium and program product
CN115016784A (en) Low code application multiplexing method, application analysis system, equipment and storage medium
CN108681491B (en) File decoupling method and system
US20230118838A1 (en) Advanced agent instrumentation for opentelemetry implementations
US20150088866A1 (en) Accessing application services from forms
KR20180087901A (en) Integrated external interconnection system and method for web standard application development
US10853225B2 (en) Control method, apparatus, and non-transitory computer-readable storage medium for generating data body adjusted to second program by converting data type of parameter of first program
CN113535188A (en) Privatization deployment method and device
CN112650502A (en) Batch processing task processing method and device, computer equipment and storage medium
US20190244145A1 (en) Workflow integration
CN108089899B (en) Method and device for realizing query report
CN117056317B (en) Data processing method, device, equipment and computer readable storage medium
CN117312694B (en) Method, device and storage medium for constructing H5 application based on applet framework
CN110191141B (en) Service calling information processing method and device and computer system
US11947500B2 (en) Cloud migration for legacy on-premises process code
US20060010423A1 (en) Variable namespaces and scoping for variables in an object model
US20210029206A1 (en) Data Transmission Method and System
CN116541030A (en) High-multiplexing installation package manufacturing and installation system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination