An API calling method and apparatus
Patent Information
- Application Number
- CN202310246620.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-09
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-03-09
AI Technical Summary
现场运维人员,针对每一次版本变更需要做软件升级,软件升级会带来软件服务中断、软件升级时间过长等问题,这给现场运维人员带来一定程度的困扰和压力
[0036]In summary, the API calling method provided in this application is applied to a first system, which is connected to several second systems, and the first system maintains API customization packages developed for each connected second system. The method includes: receiving an API calling request sent by a target second system, wherein the API calling request carries the system unique identifier of the target second system and the target API information to be called; determining whether the path of the target function corresponding to the target API is registered on a specified functional component, wherein when an API customization package is uploaded, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component; if so, determining the target API customization package corresponding to the target second system based on the system unique identifier of the target second system; and calling the target function corresponding to the target API in the target API customization package to perform related business processing.
Smart Images

Figure CN116483477B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an API calling method and apparatus. Background Technology
[0002] An API (Application Programming Interface) is a set of conventions that connect different components of a software system, providing the ability for these components to access each other. An API is an abstract interface that needs to be implemented by software; that is, each API requires a concrete implementation in software code. When API functionality is simple and the number of APIs is small, the implementation and maintenance of the software code are relatively convenient. However, as the scale and complexity of software requirements increase dramatically, the size and complexity of the software code also rise accordingly. In particular, frequent changes in software requirements force developers to maintain the source code frequently, increasing development costs and reducing the return on investment in code.
[0003] Furthermore, suppose the software needs to interface with different third-party systems, such as mobile and telecommunications offices. These offices all need to access relevant resource data within this system, but different offices have their own API specifications. So, how can we develop software within this system that adapts to the API specifications of different offices? The current solution is to develop API implementations for all offices simultaneously within this system, based on their respective API specifications.
[0004] However, with the increasing number of service sites, each characterized by a large number and high complexity of APIs, the existing approach results in a continuously growing codebase within the system. This redundancy and bloat cause the software size to increase, failing to meet the design goal of lightweight software. Furthermore, when software requirements change, developers need to modify the source code, involving the entire process of "code adaptation," "packaging," "testing," and "acceptance," leading to long development cycles and low efficiency. If modifications to common code are involved, testing of the business logic across all service sites is also required, further increasing the workload for developers and related personnel. On-site maintenance personnel also face challenges due to the need for software upgrades with each version change, which can cause service interruptions and excessively long upgrade times, adding considerable inconvenience and pressure. Summary of the Invention
[0005] This application provides an API calling method and apparatus.
[0006] Firstly, this application provides an API calling method applied to a first system, wherein the first system is connected to several second systems, and the first system maintains an API customization package developed for each connected second system; the method includes:
[0007] Receive an API call request sent by the target second system, wherein the API call request carries the system unique identifier of the target second system and the target API information to be called;
[0008] Determine whether the path of the target function corresponding to the target API is registered on the specified functional component. When an API customization package is uploaded, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component.
[0009] If it exists, then based on the unique system identifier of the target second system, determine the target API customization package corresponding to the target second system;
[0010] Call the target function corresponding to the target API in the target API customization package to perform related business processing.
[0011] Optionally, the method further includes:
[0012] Receive API customization packages uploaded by users. One of these API customization packages is developed based on the API specification of the second system corresponding to the API customization package. The API customization package defines the API definition information of the second system and the functions corresponding to each API.
[0013] Create the microservice corresponding to the API customization package, and establish the association between the API customization package and its corresponding microservice;
[0014] On the specified functional component, perform API routing and / or authentication-free URL registration for the paths of the functions corresponding to each API in the API customization package, and maintain the mapping relationship between each API in the API customization package and its corresponding function.
[0015] Optionally, the step of calling the target function corresponding to the target API in the target API customization package to perform related business processing includes:
[0016] The API call request is sent to the target microservice corresponding to the target API customization package, so that the target microservice can call the target function corresponding to the target API to perform related business processing based on the target API information and the mapping relationship between each API and its corresponding target function in the target API customization package.
[0017] Optionally, the method further includes:
[0018] Based on the user-triggered deletion command of the target API customization package, the target API customization package is deleted, the target microservice corresponding to the target API customization package is deleted, and the API routing and / or authentication-free URL registration information of the function paths corresponding to each API in the target API customization package is deleted, as well as the target API information and the mapping relationship between each API in the target API customization package and its corresponding target function.
[0019] Secondly, this application provides an API calling device applied to a first system, wherein the first system is connected to a plurality of second systems, and the first system maintains an API customization package developed for each connected second system; the device includes:
[0020] The first receiving unit is used to receive an API call request sent by the target second system, wherein the API call request carries the system unique identifier of the target second system and the target API information to be called;
[0021] The judgment unit is used to determine whether the path of the target function corresponding to the target API is registered on the specified functional component. When an API customization package is uploaded, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component.
[0022] If a determining unit exists, the determining unit is used to determine the target API customization package corresponding to the target second system based on the system unique identifier of the target second system.
[0023] The invocation unit is used to invoke the target function corresponding to the target API in the target API customization package to perform related business processing.
[0024] Optionally, the device further includes:
[0025] The second receiving unit is used to receive API customization packages uploaded by users. Each API customization package is developed based on the API specification of the second system corresponding to the API customization package. The API customization package defines the API definition information of the corresponding second system and the functions corresponding to each API.
[0026] The creation unit is used to create the microservice corresponding to the API customization package and establish the association between the API customization package and its corresponding microservice.
[0027] The registration unit is used to perform API routing and / or authentication-free URL registration for the paths of the functions corresponding to each API in the API customization package on the specified functional component, and to maintain the mapping relationship between each API in the API customization package and its corresponding function.
[0028] Optionally, when calling the target function corresponding to the target API in the target API customization package to perform related business processing, the calling unit is specifically used for:
[0029] The API call request is sent to the target microservice corresponding to the target API customization package, so that the target microservice can call the target function corresponding to the target API to perform related business processing based on the target API information and the mapping relationship between each API and its corresponding target function in the target API customization package.
[0030] Optionally, the device further includes:
[0031] The deletion unit is used to delete the target API customized package based on the user-triggered deletion instruction of the target API customized package, delete the target microservice corresponding to the target API customized package, and delete the API routing and / or authentication-free URL registration information of the path of each API corresponding to the API in the target API customized package, as well as the target API information and the mapping relationship between each API in the target API customized package and its corresponding target function.
[0032] Thirdly, embodiments of this application provide an API calling device, which includes:
[0033] Memory, used to store program instructions;
[0034] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of the first aspects above, according to the obtained program instructions.
[0035] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method as described in any of the first aspects above.
[0036] In summary, the API calling method provided in this application is applied to a first system, which is connected to several second systems, and the first system maintains API customization packages developed for each connected second system. The method includes: receiving an API calling request sent by a target second system, wherein the API calling request carries the system unique identifier of the target second system and the target API information to be called; determining whether the path of the target function corresponding to the target API is registered on a specified functional component, wherein when an API customization package is uploaded, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component; if so, determining the target API customization package corresponding to the target second system based on the system unique identifier of the target second system; and calling the target function corresponding to the target API in the target API customization package to perform related business processing.
[0037] Using the API calling method provided in this application, a corresponding API customization package is pre-developed for each second system that needs to be connected. The first system, used in different scenarios, only needs to upload the API customization package corresponding to the second system that needs to be connected in the current scenario. The API development code of each second system is completely decoupled, minimizing software size and achieving lightweight software design. When the API specification of any second system changes, only the API customization package for that second system needs to be upgraded, without affecting the normal business operation of other second systems. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this application.
[0039] Figure 1 A detailed flowchart of an API calling method provided in an embodiment of this application;
[0040] Figure 2 This application provides a schematic diagram of an API access process as an embodiment of the present application.
[0041] Figure 3 This is a schematic diagram of the structure of an API calling device provided in an embodiment of this application;
[0042] Figure 4 This is a schematic diagram of the hardware architecture of an API calling device provided in an embodiment of this application. Detailed Implementation
[0043] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” as used in this application and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.
[0044] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."
[0045] For example, see Figure 1 The diagram shown is a detailed flowchart of an API (Application Programming Interface) invocation method provided in an embodiment of this application. This method is applied to a first system, which is connected to several second systems, and the first system maintains a customized API package developed for each connected second system. The method includes the following steps:
[0046] Step 100: Receive an API call request sent by the target second system, wherein the API call request carries the system unique identifier of the target second system and the target API information to be called.
[0047] In this embodiment of the application, the developers of the first system can pre-develop corresponding API customization packages for each second system that needs to access the first system, based on the API specification documents provided by each first system, and upload them to the first system.
[0048] Specifically, in the embodiments of this application, the first system receives an API customization package uploaded by the user. The API customization package is developed based on the API specification of the second system corresponding to the API customization package. The API customization package defines the API definition information of the second system and the functions corresponding to each API.
[0049] In other words, the first system supports uploading and deleting API custom packages. Users can select and upload specific custom packages based on their business needs. For example, if the first system needs to integrate with a third-party system A, it can upload the API development package corresponding to third-party system A. This API development package is developed based on the API specification document of third-party system A.
[0050] For example, the API customization package for third-party system A can contain JSON files, Python or Shell script files. The JSON file defines the API interface definition information (API specification, API interface information) of third-party system A, while the script file specifies the concrete implementation of the business processing (functions) of the API interfaces (that is, it contains the correspondence between each API interface and function (function path)).
[0051] Step 110: Determine whether the path of the target function corresponding to the target API is registered on the specified functional component.
[0052] When uploading an API customization package, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component.
[0053] In practical applications, after receiving the API customization package uploaded by the user, the first system creates the microservice corresponding to the API customization package and establishes the association between the API customization package and its corresponding microservice; and executes API routing and / or authentication-free URL registration for the paths of the functions corresponding to each API in the API customization package on the specified functional component, and maintains the mapping relationship between each API in the API customization package and its corresponding function.
[0054] In other words, the first system supports the creation, modification, deletion, and upgrading of services. Users create services by associating them with specified API customization packages according to their own business needs. During the service creation process, API routes (the address paths of each function in the API customization package) and authentication-free URLs (the URLs (address paths) of each function) are registered.
[0055] For example, the API customization package corresponding to third-party system A is API customization package 1, and the service created for API customization package 1 is microservice 1; then, the function 1 included in API customization package 1 corresponding to microservice 1, assuming its path address is address 1 (A / B / C), address 1 needs to perform API routing and registration of the authentication-free URL on the unified digital chassis (the designated functional component of the first system).
[0056] In this embodiment of the application, only API custom packages (the address paths of each function in the API custom package) that have been registered on the specified functional components can be called by the second system.
[0057] The process of storing the mapping relationship between the API interface information and script files of the API customization package into the database is also completed during the service creation process corresponding to the API customization package. One service corresponds to one API customization package, and service creation signifies that the API customization package has been actually used, preparing it for API calls from the second system.
[0058] Step 120: If it exists, determine the target API customization package corresponding to the target second system based on the system unique identifier of the target second system.
[0059] When a first system is connected to multiple second systems, the first system maintains multiple API customization packages. When the first system receives an API call request from a second system, it needs to parse the API call request, obtain the unique identifier of the second system carried in the API call request, and then determine the API customization package that the second system needs to use based on the unique identifier of the second system.
[0060] Step 130: Call the target function corresponding to the target API in the target API customization package to perform the relevant business processing.
[0061] In this embodiment of the application, when calling the target function corresponding to the target API in the target API customization package to perform related business processing, a preferred implementation is as follows:
[0062] The API call request is sent to the target microservice corresponding to the target API customization package, so that the target microservice can call the target function corresponding to the target API to perform related business processing based on the target API information and the mapping relationship between each API and its corresponding target function in the target API customization package.
[0063] When the second system calls the specified API, the API request is received by the service corresponding to the second system. The service queries the business logic processing script corresponding to the API and executes it, and finally sends the script execution result back to the second system.
[0064] Furthermore, in this embodiment of the application, based on the user-triggered deletion instruction of the target API customization package, the target API customization package is deleted, the target microservice corresponding to the target API customization package is deleted, and the API routing and / or authentication-free URL registration information of the function paths corresponding to each API in the target API customization package is deleted, as well as the mapping relationship between the target API information and each API in the target API customization package and its corresponding target function.
[0065] In other words, users can manage the various API customization packages maintained in the first system, as well as the services / configurations associated with each API customization package, according to their business needs. For example, suppose that due to business changes, third-party system B (the second system) no longer needs to connect to the first system, then the API customization package corresponding to third-party system B in the first system, as well as the services / configurations associated with that API customization package, can be deleted.
[0066] As can be seen from the above, when the API specification of a second system is modified or upgraded, only the API customization package of that second system needs to be modified or upgraded. This will not affect the API access function of other second systems. Moreover, in different application scenarios, the required API customization package can be selected and uploaded according to business needs (the third-party systems to be integrated), thereby decoupling the functional code of API calls of various third-party systems and improving code reusability.
[0067] The method for dynamically expanding API access capabilities provided in this application embodiment will be described in detail below with reference to specific application scenarios. For example, see [link to relevant documentation]. Figure 2 The diagram illustrates an API access process according to an embodiment of this application. Assuming that both site A and site B need to access this system, the system's developers can pre-develop corresponding custom packages A and B based on the API specification documents of site A and site B, respectively. Then, through the custom package management of the system's WEB UI, custom packages A and B are uploaded to the system. Furthermore, through service management, services corresponding to custom packages A and B are created (e.g., service A can call APIs / functions in custom package A, and service B can call APIs / functions in custom package B). Simultaneously, the mapping relationship between the API interface information and their corresponding functions in custom packages A and B is maintained in a database (DB). It should be noted that custom packages A and B can be maintained in a specified storage module; however, this embodiment does not impose specific limitations.
[0068] When this system receives an API call request from site-A, the control layer determines that the custom package to be called is custom package-A, and checks whether the path of the function corresponding to the API call is registered in the specified functional component. If it is determined that it is registered, the API call request is sent to service A corresponding to custom package-A. Service A calls the target function (execution function) in custom package-A, executes the business corresponding to the target function, obtains the execution result, and sends the execution result back to site-A. Similarly, the processing of API call requests sent by site-B is the same as the above process, and will not be repeated here.
[0069] For example, see Figure 3The diagram shown is a structural schematic of an API calling device provided in an embodiment of this application. The device is applied to a first system, which is connected to several second systems. The first system maintains an API customization package developed for each connected second system. The device includes:
[0070] The first receiving unit 30 is used to receive an API call request sent by the target second system, wherein the API call request carries the system unique identifier of the target second system and the target API information to be called;
[0071] The judgment unit 31 is used to determine whether the path of the target function corresponding to the target API is registered on the specified functional component. When an API customization package is uploaded, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component.
[0072] If the determining unit 32 exists, then the determining unit 32 is used to determine the target API customization package corresponding to the target second system based on the system unique identifier of the target second system.
[0073] Calling unit 33 is used to call the target function corresponding to the target API in the target API customization package to perform related business processing.
[0074] Optionally, the device further includes:
[0075] The second receiving unit is used to receive API customization packages uploaded by users. Each API customization package is developed based on the API specification of the second system corresponding to the API customization package. The API customization package defines the API definition information of the corresponding second system and the functions corresponding to each API.
[0076] The creation unit is used to create the microservice corresponding to the API customization package and establish the association between the API customization package and its corresponding microservice.
[0077] The registration unit is used to perform API routing and / or authentication-free URL registration for the paths of the functions corresponding to each API in the API customization package on the specified functional component, and to maintain the mapping relationship between each API in the API customization package and its corresponding function.
[0078] Optionally, when calling the target function corresponding to the target API in the target API customization package to perform related business processing, the calling unit 33 is specifically used for:
[0079] The API call request is sent to the target microservice corresponding to the target API customization package, so that the target microservice can call the target function corresponding to the target API to perform related business processing based on the target API information and the mapping relationship between each API and its corresponding target function in the target API customization package.
[0080] Optionally, the device further includes:
[0081] The deletion unit is used to delete the target API customized package based on the user-triggered deletion instruction of the target API customized package, delete the target microservice corresponding to the target API customized package, and delete the API routing and / or authentication-free URL registration information of the path of each API corresponding to the API in the target API customized package, as well as the target API information and the mapping relationship between each API in the target API customized package and its corresponding target function.
[0082] These units can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when one of these units is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these units can be integrated together to form a system-on-a-chip (SOC).
[0083] Furthermore, regarding the API calling device provided in this application embodiment, from a hardware perspective, the hardware architecture diagram of the API calling device can be found in [reference needed]. Figure 4 As shown, the API calling device may include: a memory 40 and a processor 41.
[0084] The memory 40 is used to store program instructions; the processor 41 calls the program instructions stored in the memory 40 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar, and will not be described again here.
[0085] Optionally, this application also provides an API calling device, including at least one processing element (or chip) for performing the above method embodiments.
[0086] Optionally, this application also provides a program product, such as a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the above-described method embodiments.
[0087] Here, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0088] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0089] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0090] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0091] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0092] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0093] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0094] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An API calling method, characterized in that, The method is applied to a first system, which is connected to several second systems, and the first system maintains API customization packages developed for each connected second system; the method includes: Receive an API call request sent by the target second system, wherein the API call request carries the system unique identifier of the target second system and the target API information to be called; Determine whether the path of the target function corresponding to the target API information is registered on the specified functional component. When an API customization package is uploaded, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component. If it exists, then based on the unique system identifier of the target second system, determine the target API customization package corresponding to the target second system; The target function corresponding to the target API information in the target API customization package is invoked to perform relevant business processing. Receive API customization packages uploaded by users. One of these API customization packages is developed based on the API specification of the second system corresponding to the API customization package. The API customization package defines the API definition information of the second system and the functions corresponding to each API. Create the microservice corresponding to the API customization package, and establish the association between the API customization package and its corresponding microservice; On the specified functional component, perform API routing and / or authentication-free URL registration for the paths of the functions corresponding to each API in the API customization package, and maintain the mapping relationship between each API in the API customization package and its corresponding function.
2. The method as described in claim 1, characterized in that, The steps for invoking the target function corresponding to the target API information in the target API customization package to perform related business processing include: The API call request is sent to the target microservice corresponding to the target API customization package, so that the target microservice can call the target function corresponding to the target API to perform related business processing based on the target API information and the mapping relationship between each API and its corresponding target function in the target API customization package.
3. The method as described in claim 2, characterized in that, The method further includes: Based on the user-triggered deletion command of the target API customization package, the target API customization package is deleted, the target microservice corresponding to the target API customization package is deleted, and the API routing and / or authentication-free URL registration information of the function paths corresponding to each API in the target API customization package is deleted, as well as the target API information and the mapping relationship between each API in the target API customization package and its corresponding target function.
4. An API calling device, characterized in that, The device is applied to a first system, which is connected to several second systems, and the first system maintains API customization packages developed for each connected second system; the device includes: The first receiving unit is used to receive an API call request sent by the target second system, wherein the API call request carries the system unique identifier of the target second system and the target API information to be called; The judgment unit is used to determine whether the path of the target function corresponding to the target API information is registered on the specified functional component. When an API customization package is uploaded, the path information of the functions corresponding to each API in the API customization package needs to be registered on the specified functional component. If a determining unit exists, the determining unit is used to determine the target API customization package corresponding to the target second system based on the system unique identifier of the target second system. The invocation unit is used to invoke the target function corresponding to the target API information in the target API customization package to perform related business processing; The second receiving unit is used to receive API customization packages uploaded by users. Each API customization package is developed based on the API specification of the second system corresponding to the API customization package. The API customization package defines the API definition information of the corresponding second system and the functions corresponding to each API. The creation unit is used to create the microservice corresponding to the API customization package and establish the association between the API customization package and its corresponding microservice. The registration unit is used to perform API routing and / or authentication-free URL registration for the paths of the functions corresponding to each API in the API customization package on the specified functional component, and to maintain the mapping relationship between each API in the API customization package and its corresponding function.
5. The apparatus as described in claim 4, characterized in that, When the target function corresponding to the target API information in the target API customization package is invoked to perform related business processing, the invocation unit is specifically used for: The API call request is sent to the target microservice corresponding to the target API customization package, so that the target microservice, based on the target API information and the mapping relationship between each API in the target API customization package and its corresponding target function, calls the target function corresponding to the target API information to perform related business processing.
6. The apparatus as claimed in claim 5, characterized in that, The device further includes: The deletion unit is used to delete the target API customized package based on the user-triggered deletion instruction of the target API customized package, delete the target microservice corresponding to the target API customized package, and delete the API routing and / or authentication-free URL registration information of the function paths corresponding to each API in the target API customized package, as well as the target API information and the mapping relationship between each API in the target API customized package and its corresponding target function.
7. An API calling device, characterized in that, The API calling device includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of claims 1-3 according to the obtained program instructions.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer to perform the steps of the method as described in any one of claims 1-3.
Citation Information
Patent Citations
Component registration method and device
CN108196900A
Method and device for processing service calling request, storage medium and computer equipment
CN112866177A