API interface control method and device, computer equipment and storage medium

By creating target interface wrappers, integrating API interfaces, using module loading mechanisms and central registries in software projects, the problems of redundancy, difficulty in maintenance and poor reusability in API interface control are solved, achieving a more efficient, maintainable and Reusable API interface control.

CN119336314APending Publication Date: 2025-01-21PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411454573.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing API interface control methods have problems such as redundancy in interface declaration, difficulty in maintenance and poor interface reusability in complex software projects.

Method used

Centralized control is achieved by creating a target interface wrapper, identifying and integrating the required API interfaces, using the module loading mechanism to obtain the API modules, and registering the interfaces to the central registry.

Benefits of technology

It improves the efficiency, maintainability and reusability of API interface control, reduces duplication of work, simplifies the maintenance and search process, and promotes the reuse of API interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336314A_ABST
    Figure CN119336314A_ABST
Patent Text Reader

Abstract

The invention discloses an API interface control method and device, computer equipment and a storage medium, and relates to the technical field of research and development management and the field of financial science and technology. Based on the target interface wrapper, determining each API interface required in a target software project, and integrating each API interface into a corresponding API module; obtaining all the API modules in the target software project by using a module loading mechanism; all the API interfaces in all the API modules in the target software project are registered to a central registry, and all the API interfaces in the target software project are controlled through the central registry; therefore, the efficiency, the maintainability and the reusability of API interface control in the target software project can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of R&D management technology and financial technology, and in particular to an API interface control method, device, computer equipment and computer-readable storage medium. Background Art

[0002] At present, with the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually transforming to Fintech, and API interface control technology is no exception. For example, API interface control technology can be applied to the banking service integration scenario in the field of Fintech. That is, through API interface control technology, various banking services (such as account inquiries, transfers, payments, etc.) can be integrated into a unified platform, which enables customers to access multiple banking services through a single interface, and banks can also control and maintain these services more efficiently. However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on API interface control technology.

[0003] Currently, with the development of Internet technology, software projects are becoming more and more complex, and the number of API interfaces involved has increased dramatically. The traditional API interface control method is usually to split the interface according to functional modules, and declare and define the interface of each module in a separate file. Although this method realizes the modularization of code to a certain extent, there are the following problems in actual application:

[0004] 1. Redundant interface declarations: In complex software projects, there are a large number of API interfaces, and each API interface needs to be declared and defined separately, resulting in a lot of duplication of work;

[0005] 2. Difficulty in maintenance: Since there is no unified standard for API interface declaration, it is difficult for maintenance personnel to quickly identify the parameters and modules of the API interface, which increases the difficulty of code maintenance;

[0006] 3. Poor interface reusability: When performing API interface simulation (mock), a set of API interfaces needs to be redefined, which not only causes configuration duplication, but may also lead to configuration inconsistency.

[0007] Based on this, how to provide an API interface control method, device, computer equipment and computer-readable storage medium to improve the efficiency, maintainability and reusability of API interface control in software projects is a problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0008] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide an API interface control method, apparatus, computer equipment and computer-readable storage medium, aiming to solve the problem of how to improve the efficiency, maintainability and reusability of API interface control in software projects.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] In a first aspect, the present invention provides an API interface control method, which includes:

[0011] Create a target interface wrapper;

[0012] Based on the target interface wrapper, determine each API interface required in the target software project, and integrate each of the API interfaces into a corresponding API module;

[0013] Using a module loading mechanism to obtain all of the API modules in the target software project;

[0014] All the API interfaces in each of the API modules in the target software project are registered in a central registry, and each of the API interfaces in the target software project is controlled through the central registry.

[0015] In a second aspect, the present invention provides an API interface control device, comprising:

[0016] Creation unit, used to create the target interface wrapper;

[0017] A determination unit, configured to determine each API interface required in the target software project based on the target interface wrapper, and integrate each of the API interfaces into a corresponding API module;

[0018] An acquisition unit, configured to acquire all the API modules in the target software project using a module loading mechanism;

[0019] A registration unit is used to register all the API interfaces in each of the API modules in the target software project into a central registration table, and control each of the API interfaces in the target software project through the central registration table.

[0020] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the API interface control method as described above when executing the computer program.

[0021] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program implements the API interface control method as described above when executed by a processor.

[0022] Compared with the prior art, the present invention provides an API interface control method, apparatus, computer equipment and computer-readable storage medium, wherein a target interface wrapper is created; based on the target interface wrapper, each API interface required in a target software project is determined, and each API interface is integrated into a corresponding API module; a module loading mechanism is used to obtain all the API modules in the target software project; all the API interfaces in each API module in the target software project are registered in a central registry, and each API interface in the target software project is controlled through the central registry; thus, the present invention can improve the efficiency, maintainability and reusability of API interface control in a target software project through measures such as standardized interface definition, modular integration, automated acquisition and centralized registration. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 A schematic diagram of an application environment of an API interface control method provided by an embodiment of the present invention.

[0025] Figure 2 A flowchart of an API interface control method provided by one embodiment of the present invention.

[0026] Figure 3 A schematic diagram of a program module of an API interface control device provided by an embodiment of the present invention.

[0027] Figure 4 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention.

[0028] Figure 5 Another structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0031] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0032] As used in the present specification and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0033] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0034] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0035] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0036] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0037] An API interface control method provided by an embodiment of the present invention can be applied in Figure 1 In the application environment shown, the client and the server communicate through the network. The client includes but is not limited to PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud computing devices, personal digital assistants (PDAs) and other computer devices. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0038] See also Figure 2 An embodiment of the present invention provides an API interface control method, wherein the method comprises the following steps:

[0039] S100, creating a target interface wrapper;

[0040] S200, based on the target interface wrapper, determining each API interface required in the target software project, and integrating each of the API interfaces into a corresponding API module;

[0041] S300, using a module loading mechanism to obtain all the API modules in the target software project;

[0042] S400: register all the API interfaces in the API modules in the target software project to a central registry, and control each of the API interfaces in the target software project through the central registry.

[0043] In specific implementation, this embodiment achieves the technical effect of improving the efficiency, maintainability and reusability of API (Application Programming Interface) interface control in the target software project through the following process:

[0044] 1. Create a target interface wrapper (S100): Through a unified interface wrapper, the declaration method of the API interface can be standardized, making the definition of the API interface more consistent and standardized, which can reduce the redundancy of the API interface definition, improve the definition efficiency, and make it easier to perform type deduction on the API interface in the editor, thereby improving development efficiency;

[0045] 2. Define API interfaces and integrate them into modules (S200): Integrate API interfaces according to functional modules so that related API interfaces are kept together. This not only helps to classify and control API interfaces, but also facilitates maintenance and search. At the same time, this modular definition method also facilitates the reuse of API interfaces, because the same type of API interfaces can be referenced in different software projects or modules.

[0046] 3. Obtaining API modules using a module loading mechanism (S300): Automatically obtaining all API modules in a software project through a module loading mechanism can reduce the workload of manual control and maintenance of API modules and improve control efficiency. At the same time, the automated acquisition process also reduces the possibility of errors and improves the stability of the software project.

[0047] 4. Registering the API interface to the central registry (S400): All API interfaces are uniformly registered in the central registry, which can realize centralized control and make it easier to find, update and maintain the API interface. In addition, the existence of the central registry also facilitates the monitoring of the usage of the API interface, which is helpful for the optimization and upgrade of the API interface. The unified registration mechanism also facilitates the reuse of the API interface, because developers can easily find and reference the existing API interface in different software projects.

[0048] In summary, the method of this embodiment improves the control efficiency of API interfaces in software projects, enhances the maintainability of code, and improves the reusability of API interfaces through standardized interface definition, modular integration, automated acquisition, and centralized registration, thereby bringing a better development and maintenance experience to software projects.

[0049] Furthermore, in one embodiment, the API interface control method, wherein the step S100, creating a target interface wrapper, specifically comprises the steps of:

[0050] Get the interface wrapper schema;

[0051] A target interface wrapper is constructed according to the interface wrapper architecture.

[0052] In specific implementation, this embodiment can achieve unified and standardized API interface control by obtaining the interface wrapper architecture and constructing the target interface wrapper according to the interface wrapper architecture, improve the maintainability and scalability of the code, promote code reuse, simplify the API interface calling process, and make the development of the overall software project more efficient and orderly.

[0053] The specific implementation process of the steps in this embodiment is roughly as follows:

[0054] 1. Determine the API interface specifications:

[0055] Determine the data exchange format (such as JSON, XML, etc.), communication protocol (such as HTTP, gRPC, etc.) and data model of the API interface;

[0056] Determine unified error handling and logging mechanisms, etc.;

[0057] 2. Build the architecture framework:

[0058] Determine the class and method structure of the interface wrapper, including base classes or interfaces and subclasses that inherit or implement them;

[0059] Implement middleware or decorator patterns to handle cross-aspect concerns such as authentication, logging, and error handling;

[0060] 3. Write the interface wrapper code:

[0061] According to the architecture framework, write specific interface wrapper code to implement functions such as data request, parameter mapping, and result encapsulation;

[0062] Use the template method pattern or strategy pattern to provide a unified calling method for different types of API requests;

[0063] 4. Integration and testing:

[0064] Integrate the generated target interface wrapper into the target software project and perform unit testing and integration testing to ensure that the API interface behavior meets expectations;

[0065] Test the error handling capabilities of the target interface wrapper to ensure that it can respond correctly in abnormal situations;

[0066] 5. Deployment and documentation:

[0067] Deploy the target interface wrapper that passes the test to the production environment;

[0068] Write detailed API documentation, including descriptions of each API interface, request parameters, response formats, and usage examples, to facilitate developers’ use and maintenance;

[0069] Through the above process, this embodiment can ensure the quality and performance of the target interface wrapper, while improving the usability and maintainability of subsequent API interfaces.

[0070] Further, in one embodiment, the API interface control method, wherein the step S200, based on the target interface wrapper, determines each API interface required in the target software project, and integrates each of the API interfaces into a corresponding API module, specifically comprises the steps of:

[0071] Determine the functional requirements of the target software project;

[0072] Based on the functional requirements, determining various API interfaces required in the target software project using the target interface wrapper;

[0073] Integrate each of the API interfaces into the API module corresponding to the target software project.

[0074] In specific implementation, this embodiment determines the functional requirements of the target software project, then uses the target interface wrapper to determine the required API interface, and integrates it into the corresponding API module, so as to achieve standardization and modularization of technical effects and improve the maintainability and scalability of the code; such a process ensures that the API interface closely corresponds to the project requirements, enhances the flexibility and reusability of the system, simplifies the subsequent testing and deployment processes, and facilitates team collaboration and continuous integration; in addition, clear module division helps new team members understand and get started with software projects more quickly, thereby accelerating the development process.

[0075] The specific implementation process of the steps in this embodiment is roughly as follows:

[0076] 1. Demand analysis:

[0077] Communicate with stakeholders of the target software project, including customers, users, development team, and maintenance team, to determine the specific functional requirements of the target software project;

[0078] Analyze business processes and determine which functions can be implemented through API interfaces;

[0079] 2. Interface definition:

[0080] Design API interface specifications based on the functional requirements of the target software project, including request methods, paths, parameters, request body, and response body formats;

[0081] Use the target interface wrapper template or framework to define the prototypes of each API interface required in the target software project, ensuring that they follow a unified coding standard and style;

[0082] 3. Modular design:

[0083] Group the defined API interfaces according to their functional characteristics or business logic to create different API modules;

[0084] Define clear responsibilities and boundaries for each API module to facilitate subsequent maintenance and expansion;

[0085] 4. Interface implementation:

[0086] Implement specific business logic and data processing according to the defined API interface specifications;

[0087] Encapsulate these logics in the target interface wrapper to ensure that the caller of the API interface does not need to care about the specific implementation details;

[0088] 5. Integration and testing:

[0089] Integrate the implemented API interface into the corresponding API module and integrate it into the target software project;

[0090] Perform unit tests and integration tests on each API interface to ensure that they work as expected and collaborate well with other system components;

[0091] 6. Documentation and deployment:

[0092] Write detailed documentation for each API interface, including instructions for use, parameter descriptions, response formats, and examples;

[0093] Deploy the tested API module to the production environment for the front-end or other services to call;

[0094] Through the above process, this embodiment can ensure that the development of the API interface is orderly and closely aligned with the functional requirements of the target software project, while also facilitating future maintenance and expansion.

[0095] Furthermore, in one embodiment, the API interface control method, wherein the step S300, using a module loading mechanism to obtain all the API modules in the target software project, specifically comprises the steps of:

[0096] Configure module packaging tools;

[0097] All the API modules in the target software project are acquired using the module loading mechanism of the module packaging tool.

[0098] Furthermore, the API interface control method, wherein the module loading mechanism of the module packaging tool is used to obtain all the API modules in the target software project, specifically comprises the steps of:

[0099] Building a module loading script through the module loading mechanism of the module packaging tool;

[0100] The module loading script is used to collect all the API modules in the target software project.

[0101] In specific implementation, this embodiment configures the module packaging tool and uses its module loading mechanism to build a module loading script, and then uses the module loading script to automatically collect all API modules in the target software project, which can significantly improve the construction efficiency and modular control capabilities of the target software project; such a process realizes automated module identification and loading, ensures that the dependencies between modules of the code are correctly handled, and simplifies the deployment process, making the maintenance and updating of API modules more convenient, and also facilitates hot plugging and on-demand loading, thereby optimizing the efficiency of resource utilization; in addition, it also helps to keep the code neat and organized, making the structure of the target software project clearer, facilitating team collaboration and sustainable development of code.

[0102] The specific implementation process of the steps in this embodiment is roughly as follows:

[0103] 1. Select module packaging tool:

[0104] Choose the appropriate module packaging tool based on the needs of the target software project;

[0105] 2. Configure module packaging tool:

[0106] Install the selected module packaging tool and its related plug-ins and dependencies;

[0107] Create a configuration file (such as webpack.config.js) in the target software project, set the entry file, output path, module parsing rules, plug-ins, etc.;

[0108] 3. Define the module loading mechanism:

[0109] In the configuration file of the module bundler, use the module loading mechanism (such as Webpack's require.context()) to automatically discover and load the API module;

[0110] Specify the directory, file type (such as .js or .ts) and exclusion rules for collecting API modules;

[0111] 4. Write a module loading script:

[0112] Write a module loading script based on the module packaging tool's API, which defines how to load and package the API module;

[0113] 5. Testing and Adjustment:

[0114] Run the module packaging tool to check whether the module loading script can correctly collect all API modules in the target software project;

[0115] Adjust configuration and scripts based on test results to ensure no API modules are missed or included incorrectly;

[0116] 6. API module collection:

[0117] Use module loading scripts to automatically collect all API modules in the target software project;

[0118] Through the above process, this embodiment can ensure that the loading and packaging process of all API modules in the target software project is automated and efficient, while facilitating the control and maintenance of the modular structure of the target software project.

[0119] Further, in one embodiment, the API interface control method, wherein the step S400, registering all the API interfaces in each of the API modules in the target software project to a central registry, and controlling each of the API interfaces in the target software project through the central registry, specifically comprises the steps of:

[0120] Create a central registry;

[0121] Registering all the API interfaces in each of the API modules in the target software project to the central registry;

[0122] Based on the central registry, centralized control of each of the API interfaces in the target software project is achieved.

[0123] Furthermore, in the API interface control method, the step of creating a central registry specifically includes the following steps:

[0124] Design the registry schema;

[0125] The code is constructed according to the registry architecture to generate a central registry.

[0126] In specific implementation, this embodiment designs a registry architecture, builds code based on the registry architecture to generate a central registry, and then registers all API interfaces in each API module in the target software project to the central registry, thereby achieving centralized control of each API interface in the target software project, thereby ensuring unified control and convenient search of the API interface, and improving the maintainability and scalability of the API interface; in addition, the centralized central registry helps to monitor the usage and performance of the API interface, simplifies version control and permission control, and also facilitates the implementation of advanced functions such as load balancing and failover, thereby enhancing the stability and reliability of the system.

[0127] The specific implementation process of the steps in this embodiment is roughly as follows:

[0128] 1. Design the registry architecture:

[0129] Determine the data structure of the central registry, including the name, path, description, version, and other metadata of the API interface;

[0130] Design the API interface of the central registry to allow API modules to register and unregister their own API interfaces; that is, each API module can:

[0131] 11) Register API interface: Add your own API interface information in the central registry, which usually involves recording the detailed information of the API interface, such as path, method, parameters, return type, document description, version, etc., in the central registry;

[0132] 12) Deregister API interfaces: When API interfaces are no longer needed or have become obsolete, the records of these API interfaces can be deleted from the central registry;

[0133] 2. Build a central registry:

[0134] Write code to implement the central registry based on the designed registry architecture; this may include database models, registry services, and storage logic;

[0135] Implement a persistence mechanism for the central registry to ensure stable storage of registration information;

[0136] 3. Registration API interface:

[0137] For each API module in the target software project, traverse all the API interfaces it contains;

[0138] Write registration logic for each API endpoint and add its details to the central registry;

[0139] 4. Achieve centralized control:

[0140] Implement API interface query, update, delete and other control functions in the central registry;

[0141] Design and implement a control interface or provide API endpoints for administrators to control the API interface;

[0142] 5. Integration and testing:

[0143] Integrate the central registry into the target software project and ensure that all API modules can correctly register their own API interfaces;

[0144] Conduct tests to verify that the central registry can accurately record information of all API interfaces and that control functions can work properly;

[0145] 6. Deployment and monitoring:

[0146] Deploy the target software project containing the central registry to the production environment;

[0147] Implement monitoring mechanisms to track the registration status and performance indicators of API interfaces to ensure stable operation of the system;

[0148] Through the above process, this embodiment can create a central registry, which can not only record the information of all API interfaces of the target software project, but also provide centralized control functions, thereby improving the maintainability of the API interface and the manageability of the target software project.

[0149] It can be seen from the above method embodiments that the API interface control method provided by the present invention includes: creating a target interface wrapper; based on the target interface wrapper, determining each API interface required in the target software project, and integrating each API interface into the corresponding API module; using the module loading mechanism to obtain all the API modules in the target software project; registering all the API interfaces in each API module in the target software project to the central registry, and controlling each API interface in the target software project through the central registry. In this way, the efficiency, maintainability and reusability of API interface control in the target software project can be improved through the method of the present invention.

[0150] It can be understood that the API interface control method provided in the embodiment of the present invention can be applied to API interface control scenarios related to the field of financial technology. Specifically, the API interface control function can be integrated into the corresponding banking service integration scenarios of financial institutions (such as banks) to support the corresponding property management, shopping, interactive games, resource transfer and other functions of banking services, so that customers can access multiple banking services through a single interface of the bank, and the bank can also manage and maintain these services more efficiently.

[0151] Of course, the API interface control method provided in the embodiment of the present invention can also be applied to various scenarios in the field of financial technology to achieve the effects of improving efficiency, enhancing security, promoting data integration and improving user experience. The following are some typical application scenarios:

[0152] 1. Payment Gateway:

[0153] In the payment gateway application scenario, the API interface control method provided in the embodiment of the present invention can be used to integrate multiple payment methods (such as credit cards, debit cards, electronic wallets, etc.) and provide a unified payment interface for merchants and consumers;

[0154] 2. Personal financial management:

[0155] In the personal financial management application scenario, the API interface control method provided by the embodiment of the present invention can be used to integrate the user's bank account, investment account, loan account and other information to provide a comprehensive financial view;

[0156] 3. Risk assessment and management:

[0157] Fintech companies can use the API interface control method provided in the embodiment of the present invention to integrate different data sources, such as credit scores, transaction records, etc., to conduct risk assessment and management;

[0158] 4. Financial services automation:

[0159] The API interface control method provided by the embodiment of the present invention can realize the automation of financial services, such as automatic investment, intelligent budget planning, etc.

[0160] 5. Compliance Check:

[0161] Compliance is an important issue in financial services. The API interface control method provided in the embodiment of the present invention can help financial institutions automate the compliance inspection process and ensure that all transactions and operations comply with relevant laws and regulations.

[0162] 6. Customer Relationship Management (CRM):

[0163] Through the API interface control method provided in the embodiment of the present invention, financial technology companies can integrate financial services with CRM systems to provide more personalized customer services;

[0164] 7. Blockchain technology integration:

[0165] In the field of financial technology, blockchain technology is gaining more and more attention; the API interface control method provided in the embodiment of the present invention can be used to integrate blockchain technology into financial services, such as cryptocurrency transactions, smart contract execution, etc.

[0166] 8. Financial risk detection:

[0167] Fintech companies can use the API interface control method provided in the embodiment of the present invention to integrate different data sources, including transaction data, user behavior data, etc., to achieve more effective financial risk detection;

[0168] 9. Multi-channel services:

[0169] Financial institutions can provide multi-channel services, such as mobile applications, web applications, self-service terminals, etc., through the API interface control method provided in the embodiment of the present invention to meet the needs of different customers;

[0170] As described above, the API interface control method provided by the embodiment of the present invention can bring higher flexibility, better customer experience and stronger competitiveness to application scenarios related to the financial technology field; specifically, by centrally controlling and maintaining the API interface of the software project, financial technology companies can ensure data consistency, improve service reliability, enhance security, and provide a better user experience; in addition, the API interface control method provided by the embodiment of the present invention can also help reduce maintenance costs, speed up the launch of new products, and improve the ability to respond to market changes.

[0171] It should be understood that, although the present application provides method operation steps as described in the embodiments or flowcharts, more or less operation steps may be included based on conventional or non-creative labor, and these operation steps are not necessarily performed in sequence according to the embodiment or flowchart. The order of steps listed in the embodiment or flowchart is only one way of executing the order of many steps, and does not represent the only execution order. It should be noted that there is not necessarily a certain order between the above steps. A person of ordinary skill in the art can understand from the description of the embodiment of the present invention that in different embodiments, the above steps may have different execution orders, that is, they may be executed in parallel, or they may be executed in exchange, etc. Moreover, at least a part of the steps in the embodiment or flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but may be executed in turn, alternately or synchronously with other steps or at least a part of the sub-steps or stages of other steps.

[0172] Based on the above method embodiment, please refer to Figure 3 Another embodiment of the present invention further provides an API interface control device, wherein the device comprises:

[0173] A creation unit 11, used for creating a target interface wrapper;

[0174] A determination unit 12, configured to determine each API interface required in the target software project based on the target interface wrapper, and integrate each of the API interfaces into a corresponding API module;

[0175] An acquisition unit 13 is used to acquire all the API modules in the target software project using a module loading mechanism;

[0176] The registration unit 14 is used to register all the API interfaces in each of the API modules in the target software project into a central registration table, and control each of the API interfaces in the target software project through the central registration table.

[0177] Furthermore, in one embodiment, in the API interface control device, the creation unit 11 is specifically used to:

[0178] Get the interface wrapper schema;

[0179] A target interface wrapper is constructed according to the interface wrapper architecture.

[0180] Further, in one embodiment, in the API interface control device, the determining unit 12 is specifically configured to:

[0181] Determine the functional requirements of the target software project;

[0182] Based on the functional requirements, determining various API interfaces required in the target software project using the target interface wrapper;

[0183] Integrate each of the API interfaces into the API module corresponding to the target software project.

[0184] Furthermore, in one embodiment, in the API interface control device, the acquisition unit 13 is specifically used to:

[0185] Configure module packaging tools;

[0186] All the API modules in the target software project are acquired using the module loading mechanism of the module packaging tool.

[0187] Furthermore, the API interface control device, wherein the use of the module loading mechanism of the module packaging tool to obtain all the API modules in the target software project specifically includes:

[0188] Building a module loading script through the module loading mechanism of the module packaging tool;

[0189] The module loading script is used to collect all the API modules in the target software project.

[0190] Furthermore, in one embodiment, in the API interface control device, the registration unit 14 is specifically used to:

[0191] Create a central registry;

[0192] Registering all the API interfaces in each of the API modules in the target software project to the central registry;

[0193] Based on the central registry, centralized control of each of the API interfaces in the target software project is achieved.

[0194] Furthermore, in the API interface control device, the step of creating a central registry specifically includes:

[0195] Design the registry schema;

[0196] The code is constructed according to the registry architecture to generate a central registry.

[0197] It should be noted that in the embodiment of the device of the present invention, the information interaction, execution process and other contents between the above-mentioned units are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the aforementioned method embodiment part and will not be repeated here.

[0198] It can be understood that the API interface control device provided in the embodiment of the present invention can be applied to API interface control scenarios related to the field of financial technology. Specifically, the API interface control function can be integrated into the corresponding banking service integration scenarios of financial institutions (such as banks) to support the corresponding property management, shopping, interactive games, resource transfer and other functions of banking services, so that customers can access multiple banking services through a single interface of the bank, and the bank can also manage and maintain these services more efficiently.

[0199] Of course, the API interface control device provided in the embodiment of the present invention can also be applied to various scenarios in the field of financial technology to achieve the effects of improving efficiency, enhancing security, promoting data integration and improving user experience. The following are some typical application scenarios:

[0200] 1. Payment Gateway:

[0201] In the payment gateway application scenario, the API interface control device provided by the embodiment of the present invention can be used to integrate multiple payment methods (such as credit cards, debit cards, electronic wallets, etc.) and provide a unified payment interface for merchants and consumers;

[0202] 2. Personal financial management:

[0203] In the personal financial management application scenario, the API interface control device provided by the embodiment of the present invention can be used to integrate the user's bank account, investment account, loan account and other information to provide a comprehensive financial view;

[0204] 3. Risk assessment and management:

[0205] Fintech companies can use the API interface control device provided by the embodiment of the present invention to integrate different data sources, such as credit scores, transaction records, etc., to perform risk assessment and management;

[0206] 4. Financial services automation:

[0207] The API interface control device provided by the embodiment of the present invention can realize the automation of financial services, such as automatic investment, intelligent budget planning, etc.

[0208] 5. Compliance Check:

[0209] Compliance is an important issue in financial services. The API interface control device provided in the embodiment of the present invention can help financial institutions automate the compliance inspection process to ensure that all transactions and operations comply with relevant laws and regulations.

[0210] 6. Customer Relationship Management (CRM):

[0211] Through the API interface control device provided by the embodiment of the present invention, financial technology companies can integrate financial services with CRM systems to provide more personalized customer services;

[0212] 7. Blockchain technology integration:

[0213] In the field of financial technology, blockchain technology is gaining more and more attention; the API interface control device provided by the embodiment of the present invention can be used to integrate blockchain technology into financial services, such as cryptocurrency transactions, smart contract execution, etc.

[0214] 8. Financial risk detection:

[0215] Fintech companies can use the API interface control device provided by the embodiment of the present invention to integrate different data sources, including transaction data, user behavior data, etc., to achieve more effective financial risk detection;

[0216] 9. Multi-channel services:

[0217] Financial institutions can provide multi-channel services, such as mobile applications, web applications, self-service terminals, etc., through the API interface control device provided by the embodiment of the present invention to meet the needs of different customers;

[0218] As described above, the API interface control device provided by the embodiment of the present invention can bring higher flexibility, better customer experience and stronger competitiveness to application scenarios related to the financial technology field; specifically, by centrally controlling and maintaining the API interface of the software project, financial technology companies can ensure data consistency, improve service reliability, enhance security, and provide a better user experience; in addition, the API interface control device provided by the embodiment of the present invention can also help reduce maintenance costs, speed up the launch of new products, and improve the ability to respond to market changes.

[0219] Based on the above method embodiment, another embodiment of the present invention further provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the functions or steps on the service side of the API interface control method in any of the above method embodiments are implemented.

[0220] Based on the above method embodiment, another embodiment of the present invention further provides a computer device, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the functions or steps of the client side of the API interface control method in any of the above method embodiments are implemented.

[0221] Those skilled in the art will understand that Figure 4 and Figure 5 The structural schematic diagram shown in the figure is only a schematic diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0222] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.

[0223] Among them, the memory includes a readable storage medium, an internal memory, etc., wherein the internal memory can be the memory of a computer device, and the internal memory provides an environment for the operation of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium can be a hard disk of a computer device, and in other embodiments, it can also be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on a computer device. Further, the memory can also include both an internal storage unit of a computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of a computer program, etc. The memory can also be used to temporarily store data that has been output or is to be output.

[0224] Based on the above method embodiments, another embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the API interface control method in any of the above method embodiments is implemented. The computer-readable storage medium may be non-volatile or volatile.

[0225] It should be noted that the above-mentioned functions or steps that can be implemented by the computer-readable storage medium or computer device, and the technical effects brought about by the functions / steps, can be found in the relevant descriptions in the aforementioned method embodiments. To avoid repetition, they will not be described one by one here.

[0226] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM). The disclosed memory components or memories of the operating environments described herein are intended to comprise one or more of these and / or any other suitable types of memory.

[0227] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, in the embodiment of the device of the present invention, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0228] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0229] In the embodiments provided by the present invention, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0230] 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 on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0231] It should be noted that if software tools or components other than those of the Company appear in the embodiments of the present application, they are only used for illustration and do not represent actual use. The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the above embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. An API interface control method, characterized in that: include: Create a target interface wrapper; Based on the target interface wrapper, determine each API interface required in the target software project, and integrate each of the API interfaces into a corresponding API module; Using a module loading mechanism to obtain all of the API modules in the target software project; All the API interfaces in each of the API modules in the target software project are registered in a central registry, and each of the API interfaces in the target software project is controlled through the central registry.

2. The API interface control method according to claim 1, characterized in that: The step of creating a target interface wrapper comprises: Get the interface wrapper schema; A target interface wrapper is constructed according to the interface wrapper architecture.

3. The API interface control method according to claim 1, characterized in that: The step of determining each API interface required in the target software project based on the target interface wrapper, and integrating each of the API interfaces into a corresponding API module, comprises: Determine the functional requirements of the target software project; Based on the functional requirements, determining various API interfaces required in the target software project using the target interface wrapper; Integrate each of the API interfaces into the API module corresponding to the target software project.

4. The API interface control method according to claim 1, characterized in that: The using a module loading mechanism to obtain all the API modules in the target software project includes: Configure module packaging tools; All the API modules in the target software project are acquired using the module loading mechanism of the module packaging tool.

5. The API interface control method according to claim 4, characterized in that: The method of using the module loading mechanism of the module packaging tool to obtain all the API modules in the target software project includes: Building a module loading script through the module loading mechanism of the module packaging tool; The module loading script is used to collect all the API modules in the target software project.

6. The API interface control method according to any one of claims 1 to 5, characterized in that: The step of registering all the API interfaces in each of the API modules in the target software project into a central registry, and controlling each of the API interfaces in the target software project through the central registry, comprises: Create a central registry; Registering all the API interfaces in each of the API modules in the target software project to the central registry; Based on the central registry, centralized control of each of the API interfaces in the target software project is achieved.

7. The API interface control method according to claim 6, characterized in that: The creation of a central registry comprises: Design the registry schema; The code is constructed according to the registry architecture to generate a central registry.

8. An API interface control device, characterized in that: include: Creation unit, used to create the target interface wrapper; A determination unit, configured to determine each API interface required in the target software project based on the target interface wrapper, and integrate each of the API interfaces into a corresponding API module; An acquisition unit, configured to acquire all the API modules in the target software project using a module loading mechanism; A registration unit is used to register all the API interfaces in each of the API modules in the target software project into a central registration table, and control each of the API interfaces in the target software project through the central registration table.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the API interface control method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the API interface control method according to any one of claims 1 to 7 is implemented.