Management method and system based on API interface
By receiving API requests and querying the configuration information database, determining configuration files and target channels, and automatically managing API interfaces, the problem of low management efficiency of API interfaces in the existing technology is solved, and development efficiency is improved and costs are reduced.
Patent Information
- Application Number
- CN202411184291.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-20
AI Technical Summary
The existing technology cannot effectively manage API interfaces, resulting in low efficiency and high repetition of information exchange between different systems and platforms, requiring manual participation, increasing costs and time.
By receiving API requests, querying the configuration information library, determining the configuration file and target channel, and forwarding it to the API interface of the backend service through the target channel, performing corresponding operations, and realizing the automated management of the API interface.
Improve development efficiency, simplify the use and management of API interfaces, reduce development time and cost, and realize convenient calls to different requests and interfaces.
Smart Images

Figure CN119166244A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information engineering technology, and in particular to a management method and system based on an API interface. Background Art
[0002] In the current operation of the financial system platform, due to the large-scale advancement of business and the strong demand for financing, the company's funds can no longer meet the needs of business development, and it is urgent to expand diversified financing channels such as banks. In this context, finding out how to quickly connect with multiple banks directly and avoid the high cost and low efficiency caused by connecting with each bank separately has become an urgent core pain point that needs to be solved.
[0003] All kinds of enterprises are using different IT software for business management, such as ERP, CRM, procurement systems, etc. These systems bring great convenience to enterprises, but also cause a lot of troubles. Due to the inconsistency of the needs and technologies of various funding parties, the docking efficiency is low and the duplication is high. One of the most troublesome problems for enterprises is the information exchange between different systems and platforms. Many enterprises often need manual participation when dealing with such problems. For example, the encryption methods of API interfaces between different banks are different, and the transmission protocols are different, which leads to a lot of manpower and material resources when calling API interfaces. This problem directly leads to reduced efficiency of enterprise docking and increased labor costs. At present, there is no effective technical means for the management of API interfaces. How to solve the management problem of API interfaces has become a technical problem that needs to be solved urgently.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a management method and system based on an API interface, aiming to solve the problem that the API interface cannot be effectively managed at present.
[0006] To achieve the above object, the present invention provides a management method based on an API interface, and the management method based on an API interface comprises the following steps:
[0007] Receive the API request sent by the caller;
[0008] Querying corresponding configuration information from a configuration information library obtained from an input interface according to the API request;
[0009] Determine a configuration file corresponding to the API request according to the configuration information;
[0010] Determine a target channel based on the configuration file, and forward the API request to a corresponding API interface in a backend service through the target channel;
[0011] Respond to the API request and perform corresponding operations through the API interface.
[0012] In some embodiments, querying the configuration information library obtained from the input interface according to the API request for corresponding configuration information includes:
[0013] Obtaining a request uniform resource locator, request metadata, and request body included in the API request;
[0014] Determine query parameters and path parameters according to the request uniform resource locator;
[0015] Determine the configuration items corresponding to each configuration information in the configuration information library obtained from the input interface;
[0016] Determine a target configuration item that matches the query parameter, the path parameter, the request metadata, and the request body among the configuration items corresponding to each configuration information;
[0017] Configuration information is determined according to the target configuration item.
[0018] In some embodiments, determining the configuration file corresponding to the API request according to the configuration information includes:
[0019] Obtain a unique request identifier corresponding to the API request;
[0020] Determine the API source type of each configuration file corresponding to the configuration information;
[0021] Determine the matching degree between the API request and each configuration file based on the unique request identifier and the API source type;
[0022] A configuration file with the greatest matching degree is determined based on the matching degree.
[0023] In some embodiments, determining the degree of match between the API request and each configuration file based on the unique request identifier and the API source type includes:
[0024] Determine a first identifier corresponding to the unique request identifier;
[0025] Determine a second identifier corresponding to the API source type;
[0026] A degree of matching is determined based on the first identifier and the second identifier.
[0027] In some embodiments, determining the target channel based on the configuration file includes:
[0028] Parsing the configuration file to obtain parameter information, wherein the parameter information at least includes an interface path, a request method, a request header, and a request body;
[0029] Matching a number of channels that meet the requirements based on the parameter information;
[0030] Determine the network parameters of each channel, API design parameters, server request processing speed, and client data processing capabilities;
[0031] A target channel is screened out from the channels that meet the requirements according to the network parameters of each channel, the API design parameters, the request processing speed of the server, and the data processing capability of the client.
[0032] In some embodiments, responding to the API request through the API interface and performing corresponding operations includes:
[0033] Verifying the API request through the API interface;
[0034] After the API request is verified, resource processing is performed based on the request method corresponding to the API request through the API interface, and a response result is generated;
[0035] The response result is fed back to the client in the backend service through the API interface, so that the client performs corresponding operations based on the response result.
[0036] In addition, to achieve the above purpose, the present invention also proposes a management system based on an API interface, and the management system based on an API interface includes:
[0037] The receiving module is used to receive the API request sent by the caller;
[0038] A query module, used to query corresponding configuration information from the configuration information library obtained from the input interface according to the API request;
[0039] A reading module, used to determine a configuration file corresponding to the API request according to the configuration information;
[0040] A screening module, used to determine a target channel based on the configuration file, and forward the API request to a corresponding API interface in a backend service through the target channel;
[0041] The execution module is used to respond to the API request through the API interface and perform corresponding operations.
[0042] In some embodiments, the query module is used to obtain the request uniform resource locator, request metadata and request body included in the API request;
[0043] Determine query parameters and path parameters according to the request uniform resource locator;
[0044] Determine the configuration items corresponding to each configuration information in the configuration information library obtained from the input interface;
[0045] Determine a target configuration item that matches the query parameter, the path parameter, the request metadata, and the request body among the configuration items corresponding to each configuration information;
[0046] Configuration information is determined according to the target configuration item.
[0047] In some embodiments, the reading module is used to obtain a unique request identifier corresponding to the API request;
[0048] Determine the API source type of each configuration file corresponding to the configuration information;
[0049] Determine the matching degree between the API request and each configuration file based on the unique request identifier and the API source type;
[0050] A configuration file with the greatest matching degree is determined based on the matching degree.
[0051] In some embodiments, the reading module is used to determine a first identifier corresponding to the unique request identifier;
[0052] Determine a second identifier corresponding to the API source type;
[0053] A degree of matching is determined based on the first identifier and the second identifier.
[0054] The present invention receives an API request sent by a caller; queries corresponding configuration information from a configuration information library obtained from an input interface according to the API request; determines a configuration file corresponding to the API request according to the configuration information; determines a target channel based on the configuration file, and forwards the API request to a corresponding API interface in a backend service through the target channel; responds to the API request through the API interface and performs corresponding operations, and can call different channels and interfaces for different requests, thereby improving development efficiency; at the same time, clear and accurate interface configuration information and convenient interface management also enable developers to quickly understand and use the API interface, thereby reducing development time and cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flow chart of a first embodiment of a management method based on an API interface of the present invention;
[0056] Figure 2This is a structural block diagram of the first embodiment of the management system based on the API interface of the present invention.
[0057] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0059] The embodiment of the present invention provides a management method based on an API interface. Figure 1 , Figure 1 This is a flow chart of a first embodiment of a management method based on an API interface of the present invention.
[0060] In this embodiment, the management method based on the API interface includes the following steps:
[0061] Step S10: receiving an API request sent by the caller.
[0062] In this embodiment, the executor of this embodiment is a management device based on an API interface, wherein the management device based on an API interface has functions such as data processing, data communication, and program running. The management device based on an API interface can be an API gateway or other network devices, and of course can also be other devices with similar functions, which is not limited in this embodiment.
[0063] It should be noted that in the current operation of the financial system platform, due to the large-scale advancement of business and the strong demand for financing, the company's funds can no longer meet the needs of business development, and it is urgent to expand diversified financing channels such as banks. In this context, finding how to quickly connect with multiple banks directly and avoid the high cost and low efficiency caused by connecting with each bank separately has become an urgent core pain point to be solved. Various types of enterprises are using different IT software for business management, such as ERP, CRM, procurement systems, etc. These systems bring great convenience to enterprises while also causing a lot of trouble. Due to the inconsistency of the needs and technologies of various funding parties, the connection efficiency is low and the duplication is high. One of the most troublesome problems for enterprises is the information exchange problem between different systems and platforms. Many enterprises often need manual participation when dealing with such problems. For example, the API interface encryption methods and transmission protocols between different banks are different, which leads to a lot of manpower and material resources when calling the API interface. This problem directly leads to reduced efficiency of enterprise connection work and increased labor costs.
[0064] In order to solve the above technical problems, this embodiment receives an API request sent by the caller; queries the corresponding configuration information from the configuration information library obtained from the input interface according to the API request; determines the configuration file corresponding to the API request according to the configuration information; determines the target channel based on the configuration file, and forwards the API request to the corresponding API interface in the back-end service through the target channel; responds to the API request through the API interface and performs corresponding operations, and can call different channels and interfaces for different requests, thereby improving development efficiency. At the same time, clear and accurate interface configuration information and convenient interface management also enable developers to quickly understand and use the API interface, reducing development time and cost. Specifically, it can be implemented as follows.
[0065] In the specific implementation, this embodiment needs to first receive the API request sent by the caller. The caller can construct an HTTP request according to the definition of the API interface, which includes setting the request method (such as GET, POST, PUT, DELETE, etc.), specifying the requested URL, setting the necessary request headers (such as Content-Type, Authorization, etc.), and preparing the request body. Then the caller uses a network programming library or framework (such as Python's requests library, Java's HttpClient, Node.js's axios, etc.) to send the HTTP request, which also includes setting the parameters of the HTTP request, such as timeout settings, redirection strategies, etc. API request refers to application programming interface request, API is also Application ProgrammingInterface.
[0066] Step S20: querying corresponding configuration information from the configuration information library obtained from the input interface according to the API request.
[0067] It should be noted that the caller inputs the configuration information in advance through the input interface and then stores it in the configuration information library. In this embodiment, after receiving the API request, the corresponding configuration information can be directly queried from the configuration information library.
[0068] Specifically, the query process is to obtain the request uniform resource locator, request metadata and request body contained in the API request; determine the query parameters and path parameters according to the request uniform resource locator; determine the configuration items corresponding to each configuration information in the configuration information library obtained from the input interface; determine the target configuration items that match the query parameters, the path parameters, the request metadata and the request body in the configuration items corresponding to each configuration information; and determine the configuration information according to the target configuration items.
[0069] It should be noted that in this embodiment, the request uniform resource locator is, for example, the URL corresponding to the API request, and the request metadata includes the type of request body, authentication information, and the type of response that the client expects the server to return, etc. The request entity also includes the data sent by the client to the server, and the data format includes JSON, XML or other formats. Furthermore, the query parameters determined by the uniform resource locator are included at the end of the uniform resource locator in the form of key-value pairs, and the path parameters are included in the path of the request URL, which are used to specify the specific resources or actions requested. The important parameters in the configuration information are configuration items. The corresponding target configuration items can be located through the above parameter information, and can be located based on the mapping relationship when the configuration information is stored in the database itself. After the target configuration item is determined, the corresponding configuration information can be determined.
[0070] Step S30: Determine the configuration file corresponding to the API request according to the configuration information.
[0071] The configuration information in this embodiment corresponds to a plurality of configuration files. After the configuration information is determined, the configuration file corresponding to the API request is further filtered out from the plurality of configuration files according to the API request.
[0072] Specifically, a unique request identifier corresponding to the API request is obtained; an API source type of each configuration file corresponding to the configuration information is determined; a matching degree between the API request and each configuration file is determined based on the unique request identifier and the API source type; and a configuration file with the greatest matching degree is determined based on the matching degree.
[0073] It should be noted that the API request has its corresponding unique request identifier. Each configuration file contains an API source type. Different API requests correspond to different API source types and have a corresponding relationship. In this embodiment, in order to select the most suitable configuration file for the API request, the matching degree between the unique request identifier and the API source type is determined, and then the configuration file with the highest matching degree is determined. Among them, the unique request identifier can be automatically generated based on certain attributes of the request, such as the requested URL, timestamp, unique ID of the client, serial number of the request, etc. The role of the unique request identifier is to track each API request so that it can be tracked and debugged when necessary. The API source type of the configuration file indicates the source of the API request. Different sources correspond to unique request URLs, timestamps, unique IDs of the client, serial numbers of the request, etc.
[0074] In some embodiments, the process of determining the degree of match between the API request and each configuration file based on the unique request identifier and the API source type is specifically to determine a first identifier corresponding to the unique request identifier, determine a second identifier corresponding to the API source type, and determine the degree of match based on the first identifier and the second identifier, for example, S1=|P1-P2|, where S1 represents the degree of match, P1 represents the first identifier, and P2 represents the second identifier.
[0075] In addition, in this embodiment, the intersection and union of the first identifier and the second identifier can be obtained respectively, and the matching degree can be determined based on the intersection and the union. For example, the intersection of the first identifier P1 and the second identifier P2 is P1∩P2, and the union of the first identifier P1 and the second identifier P2 is P1∪P2. The matching degree calculation is, for example, S2=(P1∩P2) / P1∪P2, where S2 represents the matching degree.
[0076] Step S40: determining a target channel based on the configuration file, and forwarding the API request to a corresponding API interface in a backend service through the target channel.
[0077] The channel in this embodiment is also the API channel. The API channel in this embodiment is the path or communication path for the API request to be transmitted from the client to the server, and the server response to be transmitted from the server to the client. In the backend service, the client sets the API interface. After completing the transmission of the API request, the API request is processed through the API interface. In order to make the called API interface applicable, the configuration file is parsed in this embodiment to obtain parameter information. The parameter information at least includes the interface path, the request method, the request header and the request body. Based on the parameter information, several channels that meet the requirements are matched. For example, the API request that can be received by each channel is affected by factors such as the request method and the request header. Therefore, several channels that can transmit the API request can be determined through the above parameter information, and the network parameters, API design parameters, request processing speed of the server and data processing capacity of each channel are determined. According to the network parameters, API design parameters, request processing speed of the server and data processing capacity of the client of each channel, the target channel is screened out from the several channels that meet the requirements.
[0078] It should be noted that in order to improve transmission efficiency, in this embodiment, it is necessary to select the channel with the fastest transmission rate as the target channel for transmitting API requests. The network parameters are the time required for data to be transmitted from one place to another. The API design parameters are specifically the call frequency of the API. The request processing speed of the server is specifically the time to process the API request. The data processing capability of the client is specifically the performance parameters of the client. Then, the network parameters, API design parameters, the request processing speed of the server and the data processing capability of the client have their corresponding weight coefficients respectively. The transmission rate of each channel can be determined by a weighted manner. Finally, the channel corresponding to the maximum transmission rate is selected as the target channel.
[0079] Step S50: respond to the API request through the API interface and perform corresponding operations.
[0080] After determining the API interface, the API request is verified through the API interface. The API interface can verify the API request through identity authentication, such as comparing the username and password with the credentials stored in the client of the backend service, or through an access token. In this embodiment, the verification method can be selected according to actual needs and is not limited to this.
[0081] After completing the verification, the API interface performs resource processing based on the request method corresponding to the API request and generates a response result. The request entity contained in the API request has actual data. In this embodiment, the API interface can perform resource updates, resource deletions, and resource additions on these data resources, and then generates a response result based on the data resource processing results. When the client receives the response result, it means that the client knows that the API interface has completed the processing of the data resource. In this case, the client performs corresponding operations based on the response result, that is, the data resource processed by the API interface.
[0082] This embodiment receives an API request sent by a caller; queries corresponding configuration information from a configuration information library obtained from an input interface according to the API request; determines a configuration file corresponding to the API request according to the configuration information; determines a target channel based on the configuration file, and forwards the API request to a corresponding API interface in a backend service through the target channel; responds to the API request through the API interface and performs corresponding operations, and can call different channels and interfaces for different requests, thereby improving development efficiency. Meanwhile, clear and accurate interface configuration information and convenient interface management also enable developers to quickly understand and use API interfaces, thereby reducing development time and costs.
[0083] Reference Figure 2 , Figure 2This is a structural block diagram of the first embodiment of the management system based on the API interface of the present invention.
[0084] like Figure 2 As shown, the management system based on the API interface proposed in the embodiment of the present invention includes:
[0085] The receiving module 10 is used to receive an API request sent by a caller.
[0086] The query module 20 is used to query the corresponding configuration information from the configuration information library obtained from the input interface according to the API request.
[0087] The reading module 30 is used to determine the configuration file corresponding to the API request according to the configuration information.
[0088] The screening module 40 is used to determine the target channel based on the configuration file, and forward the API request to the corresponding API interface in the backend service through the target channel.
[0089] The execution module 50 is used to respond to the API request through the API interface and perform corresponding operations.
[0090] This embodiment receives an API request sent by a caller; queries corresponding configuration information from a configuration information library obtained from an input interface according to the API request; determines a configuration file corresponding to the API request according to the configuration information; determines a target channel based on the configuration file, and forwards the API request to a corresponding API interface in a backend service through the target channel; responds to the API request through the API interface and performs corresponding operations, and can call different channels and interfaces for different requests, thereby improving development efficiency. Meanwhile, clear and accurate interface configuration information and convenient interface management also enable developers to quickly understand and use API interfaces, thereby reducing development time and costs.
[0091] In some embodiments, the query module 20 is used to obtain the request uniform resource locator, request metadata and request body contained in the API request; determine the query parameters and path parameters according to the request uniform resource locator; determine the configuration items corresponding to each configuration information in the configuration information library obtained from the input interface; determine the target configuration items that match the query parameters, the path parameters, the request metadata and the request body in the configuration items corresponding to each configuration information; and determine the configuration information according to the target configuration items.
[0092] In some embodiments, the reading module 30 is used to obtain a unique request identifier corresponding to the API request; determine the API source type of each configuration file corresponding to the configuration information; determine the matching degree between the API request and each configuration file based on the unique request identifier and the API source type; and determine the configuration file with the highest matching degree based on the matching degree.
[0093] In some embodiments, the reading module 30 is used to determine a first identifier corresponding to the unique request identifier; determine a second identifier corresponding to the API source type; and determine a matching degree based on the first identifier and the second identifier.
[0094] In some embodiments, the filtering module 40 is used to parse the configuration file to obtain parameter information, which includes at least an interface path, a request method, a request header, and a request body; match a number of channels that meet the requirements based on the parameter information; determine the network parameters, API design parameters, request processing speed of the server, and data processing capabilities of the client for each channel; and filter out a target channel from the number of channels that meet the requirements based on the network parameters of each channel, the API design parameters, the request processing speed of the server, and the data processing capabilities of the client.
[0095] In some embodiments, the execution module 50 is used to verify the API request through the API interface; after the API request is verified, resource processing is performed through the API interface based on the request method corresponding to the API request, and a response result is generated; the response result is fed back to the client in the backend service through the API interface, so that the client performs corresponding operations based on the response result.
[0096] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0097] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0098] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0099] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, 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.
[0100] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0101] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0102] In addition, for technical details that are not described in detail in this embodiment, please refer to the management method and system based on the API interface provided in any embodiment of the present invention, which will not be repeated here.
[0103] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0104] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0106] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
[0107] It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above method.
Claims
1. A management method based on an API interface, characterized in that: The management method based on the API interface includes: Receive API requests sent by the caller; Querying corresponding configuration information from a configuration information library obtained from an input interface according to the API request; Determine a configuration file corresponding to the API request according to the configuration information; Determine a target channel based on the configuration file, and forward the API request to a corresponding API interface in a backend service through the target channel; Respond to the API request and perform corresponding operations through the API interface.
2. The management method based on the API interface according to claim 1, characterized in that: The querying corresponding configuration information from the configuration information library obtained from the input interface according to the API request includes: Obtaining a request uniform resource locator, request metadata, and request body included in the API request; Determine query parameters and path parameters according to the request uniform resource locator; Determine the configuration items corresponding to each configuration information in the configuration information library obtained from the input interface; Determine a target configuration item that matches the query parameter, the path parameter, the request metadata, and the request body among the configuration items corresponding to each configuration information; Configuration information is determined according to the target configuration item.
3. The management method based on API interface according to claim 1, characterized in that: The determining, according to the configuration information, a configuration file corresponding to the API request includes: Obtain a unique request identifier corresponding to the API request; Determine the API source type of each configuration file corresponding to the configuration information; Determine the matching degree between the API request and each configuration file based on the unique request identifier and the API source type; A configuration file with the greatest matching degree is determined based on the matching degree.
4. The management method based on the API interface according to claim 3, characterized in that: The determining the matching degree between the API request and each configuration file based on the unique request identifier and the API source type includes: Determine a first identifier corresponding to the unique request identifier; Determine a second identifier corresponding to the API source type; A degree of matching is determined based on the first identifier and the second identifier.
5. The management method based on API interface according to claim 1, characterized in that: The determining the target channel based on the configuration file includes: Parsing the configuration file to obtain parameter information, wherein the parameter information at least includes an interface path, a request method, a request header, and a request body; Matching a number of channels that meet the requirements based on the parameter information; Determine the network parameters of each channel, API design parameters, server request processing speed, and client data processing capabilities; A target channel is screened out from the channels that meet the requirements according to the network parameters of each channel, the API design parameters, the request processing speed of the server, and the data processing capability of the client.
6. The management method based on the API interface according to any one of claims 1 to 5, characterized in that: The responding to the API request through the API interface and performing corresponding operations includes: Verifying the API request through the API interface; After the API request is verified, resource processing is performed based on the request method corresponding to the API request through the API interface, and a response result is generated; The response result is fed back to the client in the backend service through the API interface, so that the client performs corresponding operations based on the response result.
7. A management system based on API interface, characterized in that: The management system based on the API interface includes: The receiving module is used to receive the API request sent by the caller; A query module, used to query corresponding configuration information from the configuration information library obtained from the input interface according to the API request; A reading module, used to determine a configuration file corresponding to the API request according to the configuration information; A screening module, used to determine a target channel based on the configuration file, and forward the API request to a corresponding API interface in a backend service through the target channel; The execution module is used to respond to the API request through the API interface and perform corresponding operations.
8. The management system based on API interface as claimed in claim 7, characterized in that: The query module is used to obtain the request uniform resource locator, request metadata and request body contained in the API request; Determine query parameters and path parameters according to the request uniform resource locator; Determine the configuration items corresponding to each configuration information in the configuration information library obtained from the input interface; Determine a target configuration item that matches the query parameter, the path parameter, the request metadata, and the request body among the configuration items corresponding to each configuration information; Configuration information is determined according to the target configuration item.
9. The management system based on API interface according to claim 7, characterized in that: The reading module is used to obtain a unique request identifier corresponding to the API request; Determine the API source type of each configuration file corresponding to the configuration information; Determine the matching degree between the API request and each configuration file based on the unique request identifier and the API source type; A configuration file with the greatest matching degree is determined based on the matching degree.
10. The management system based on API interface according to claim 9, characterized in that: The reading module is used to determine a first identifier corresponding to the unique request identifier; Determine a second identifier corresponding to the API source type; A degree of matching is determined based on the first identifier and the second identifier.
Citation Information
Patent Citations
An API-based management system and a management method
CN109165248A
Management system and management method based on API
CN110569299A
Webpage request processing method and device, electronic equipment and storage medium
CN113467855A
Data processing method and device based on interface configuration, equipment and medium
CN113885959A
Data access method and device
CN115622776A
