WO2023208132A1 - Api转换系统及其访问请求处理方法、电子设备及介质 - Google Patents

Api转换系统及其访问请求处理方法、电子设备及介质 Download PDF

Info

Publication number
WO2023208132A1
WO2023208132A1 PCT/CN2023/091284 CN2023091284W WO2023208132A1 WO 2023208132 A1 WO2023208132 A1 WO 2023208132A1 CN 2023091284 W CN2023091284 W CN 2023091284W WO 2023208132 A1 WO2023208132 A1 WO 2023208132A1
Authority
WO
WIPO (PCT)
Prior art keywords
api
layer
data source
routing
filtered
Prior art date
Application number
PCT/CN2023/091284
Other languages
English (en)
French (fr)
Inventor
孙梦桥
郑聪
龚小龙
麻志毅
Original Assignee
杭州未名信科科技有限公司
浙江省北大信息技术高等研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州未名信科科技有限公司, 浙江省北大信息技术高等研究院 filed Critical 杭州未名信科科技有限公司
Publication of WO2023208132A1 publication Critical patent/WO2023208132A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to data processing technology, especially an API conversion system and its access request processing method, electronic equipment and media.
  • API Application Programming Interface
  • functions such as functions, HTTP interface
  • APIs have gradually derived diversified specifications.
  • Embodiments of the present application provide an API conversion system and its access request processing method, electronic equipment, and media. It is used to solve the problem in related technologies that the API protocol specifications supported by various API software systems are not uniform, resulting in the inability to respond to business access requests.
  • an API conversion system including a storage layer, a parsing layer, a parameter obtaining layer, a reorganization layer, and a publishing layer, wherein:
  • the storage layer is used to store the data source API transmitted by the interface converter, and store the release API that has been converted and generated by the interface converter;
  • the parsing layer is used to determine the conversion type corresponding to the data source API after parsing the parameters carried by the data source API, and send the key parameters of the target publishing API to the routing addressing algorithm module, so that the The routing addressing algorithm module selects the target routing process based on key parameters;
  • the parameter acquisition layer is used to cache key information of parameters carried by the data source API.
  • the cache processing includes memory caching and database caching;
  • the reorganization layer is used to extract the key information of the parameters carried by the data source API from the parameter acquisition layer, and convert the data source API to generate a release API of the corresponding type based on the key information;
  • the publishing layer is used to manage and display the publishing API.
  • the parsing layer further includes:
  • the conversion type corresponding to the data source API to be parsed is determined.
  • the parsing layer further includes:
  • a security check is performed on the user access request, and after it is determined that the security check passes, the access data corresponding to the user access request is returned to the user.
  • the parameter obtaining layer further includes:
  • the carried data, interface traffic information and interface response time are used as the key information, and cached.
  • the reorganization layer further includes:
  • an access request processing method based on an API conversion system which is characterized by including:
  • publishing API information based on the target results in at least two routing processes to be filtered, including:
  • the target publishing API information is routed and parsed through the parsing layer of the API conversion system to obtain the at least two routing processes to be filtered.
  • determining the request response time and current network status corresponding to each routing process to be filtered includes:
  • the multiple API conversion systems determine the request response time and current network status corresponding to each routing process to be filtered
  • a target routing process that matches the request response time and the current network status is selected from at least two routing processes to be filtered.
  • an electronic device including:
  • the display is configured to interact with the memory to execute the executable instructions to complete any of the above-mentioned operations of the API conversion system.
  • a computer-readable storage medium which is used to store computer-readable instructions.
  • the instructions When the instructions are executed, the operations of any of the above-mentioned API conversion systems are performed.
  • the API conversion system proposed in this application includes a storage layer, a parsing layer, a parameter acquisition layer, a reorganization layer, and a publishing layer.
  • the storage layer is used to store the data source API transmitted by the interface converter, and to store the data source API that has been converted by the interface converter.
  • the generated publishing API; the parsing layer is used to determine the conversion type corresponding to the data source API after parsing the parameters carried by the data source API and send the key parameters of the target publishing API to the routing addressing algorithm module to enable the routing addressing algorithm.
  • the module selects the target routing process based on key parameters; the parameter retrieval layer is used to cache the key information of the parameters carried by the data source API.
  • the cache processing includes memory caching and database caching; the reorganization layer is used to extract the data source from the parameter retrieval layer.
  • the API After the API carries the key information of the parameters, it converts the data source API to generate the corresponding type of publishing API based on the key information; the publishing layer is used to manage and display the publishing API.
  • FIG. 1 is a schematic diagram of the API conversion system architecture proposed in this application.
  • Figure 2 is a schematic diagram of the architecture of an access request processing system based on an API conversion system proposed in this application;
  • Figure 3 is a schematic flow chart of an access request processing method based on an API conversion system proposed in this application;
  • Figure 4 is a schematic flowchart of the method for selecting a target routing process by the route addressing intelligent algorithm module proposed in this application;
  • Figure 5 is a schematic structural diagram of an access request processing electronic device based on an API conversion system proposed in this application.
  • This application also proposes an API conversion system and its access request processing method, electronic equipment and media.
  • Figure 1 schematically shows a flow chart of an API conversion system according to an embodiment of the present application.
  • the system includes a storage layer, an analysis layer, a parameter acquisition layer, a reorganization layer, and a release layer, among which:
  • S101 the storage layer, is used to store the data source API transmitted by the interface converter, and to store the release API that has been converted and generated by the interface converter.
  • the parsing layer is used to determine the conversion type corresponding to the data source API after parsing the parameters carried by the data source API and send the key parameters of the target release API to the routing addressing algorithm module, so that the routing addressing algorithm module is based on the key Parameter selection target routing process.
  • the parameter retrieval layer is used to cache the key information of the parameters carried by the data source API.
  • the cache processing includes memory caching and database caching.
  • the reorganization layer is used to extract the key information of the parameters carried by the data source API from the parameter acquisition layer, and then convert the data source API to generate a release API of the corresponding type based on the key information.
  • S105 publishing layer, used to manage and display publishing API.
  • API Application Programming Interface
  • functions such as functions, HTTP interfaces
  • APIs refers to the agreement for connecting different components of the software system.
  • Remote procedure calls such as: RPC API, ONC RPC, DCE RPC, XML-RPC, etc.;
  • Standard query languages such as: SQL API, GraphQL API, etc.;
  • File transfer such as: File API, HDFS API, etc.;
  • SOAP Simple Object Access Protocol
  • REST Representational State Transfer
  • Interface protocol conversion technology has been very maturely used in hardware scenarios, mainly through tools such as external interface converters.
  • the system includes a storage layer, a parsing layer, a parameter obtaining layer, a reorganization layer, and a publishing layer.
  • the establishment process is as follows:
  • step 1 establish the API storage layer:
  • this application can define the input API of the API interface converter as the data source API, and define the API automatically generated by the interface converter as the publishing API.
  • the two API interface information can be uniformly stored in the database to build an API storage layer.
  • step 2 build the parsing layer:
  • parameters will be parsed for the source API.
  • the route parsing process prepares data for the parameter layer.
  • the specific steps are as follows:
  • Step a2 The user finds the data source API that needs to be parsed in the storage layer, and confirms which type the data source API needs to be converted into (that is, the format after parameter reorganization).
  • the parsing layer can perform parameter parsing on the data carried by the data source API.
  • the SOAP type API parses the XML data carried; the RestFul type API parses the JSON data carried, thereby determining the data based on the parsing results. The corresponding conversion type.
  • Step b2 The analysis results are stored in the database to facilitate subsequent calls of the parameter fetching layer and the reorganization layer.
  • the parsing layer is also used to receive the user access request generated by the user for the target publishing API, and also needs to send the key parameters of the target publishing API information corresponding to the request to the routing addressing algorithm module, so that the routing addressing algorithm The module selects the target routing process based on key parameters.
  • the process of parsing user access requests can include the following:
  • Step a2 When the user uses the publishing API, he makes an access request to the publishing API.
  • the parsing layer first performs a request verification operation on the access request to determine whether the request is valid and a series of security verification operations;
  • Step b2 Perform route analysis based on the released API information, and restore and analyze all processes generated by the released API;
  • Step c2 After passing the route analysis, the analysis layer will send the restored routing process to all software API conversion systems in the same local area network. After all software API conversion systems request the data source API, they will send the requested response time, current network status, etc. The parameters are sent to the optimal routing intelligent algorithm module;
  • Step d2 After the optimal routing intelligent algorithm module returns the optimal response routing plan and response time through intelligent model calculation, the software API conversion system obtains the corresponding type of data according to the optimal response routing plan and returns it to the user.
  • step 3 is to construct the parameter acquisition layer.
  • the specific steps are as follows:
  • Step a3 Obtain the parsing results of the parsing layer (for example, including specific carrying data, interface traffic information, interface response time, etc.), and extract key information of data parameters based on the results;
  • Step b3 Perform a cache operation on the key information in the parameters. You can choose to store it in a database or perform a cache operation through memory, so as to achieve the purpose of retaining the parameter information.
  • step 4 is to build the reorganization layer.
  • the specific steps are as follows:
  • the reorganization layer is responsible for parameter reorganization, routing reorganization, and selecting the API type you want to publish. Specifically:
  • Step a4 Extract the key parameter information saved in the parameter acquisition layer, select the API type you want to change, reorganize routing according to the target API type, and generate a release API (that is, convert the data source API to be converted into a release of the corresponding conversion type API).
  • Step b4 Customize the saved key parameter information according to the target API type. Make the key parameter information consistent with the target API type;
  • Step c4 Adapt the interface traffic information, interface response time and other parameters generated by the published API to the target API through current limiting, circuit breaker and other methods to ensure balanced API performance before and after conversion.
  • Step d4 Automatically generate a standard interface document based on the user's target API type, request parameters, successful response, failed response, request examples and other information.
  • step 5 establish the API publishing layer:
  • the API conversion system proposed in this application can allow users to develop conversion protocols by themselves under an open development framework, configure corresponding interface conversions according to the conversion protocols, and at the same time allow users to build a development environment for the development framework.
  • the system is compatible with custom development environments and supports users to develop using mainstream programming languages.
  • the interface converter uses caching technology to reduce the pressure on the database and data source API when frequently requesting interfaces, thereby helping developers choose a better framework for development without considering interface performance issues to improve interface performance.
  • There is no need to use other programming languages or other frameworks to re-develop because of different application scenarios, which reduces the repetitive workload of back-end developers; at the same time, developers do not need to learn other frameworks or understand new application scenarios, they only need to select the interface type.
  • Interface conversion can be realized, which lowers the technical threshold of API development.
  • the interface converter provided by this application can be equipped with the function of automatically generating standard interface documents.
  • highly readable interface documents can be generated to ensure the consistency of document styles.
  • the API conversion system proposed in this application can be implemented under the same network.
  • the system can supervise all APIs. For APIs from the same data source, the system uses caching technology and the optimal routing algorithm to find the optimal request path. Ensure that under the same network, each API can achieve the fastest response. Even if the data source API stops data transmission due to network fluctuations, the normal operation of the publishing API can be maintained and the data transmission of the data source API can be resumed to achieve high availability of the API. Meanwhile, the API converter The system will automatically monitor the traffic and adjust the data reception and transmission process to the best state to ensure the stability of the system.
  • the API conversion system proposed in this application includes a storage layer, a parsing layer, a parameter acquisition layer, a reorganization layer, and a publishing layer.
  • the storage layer is used to store the data source API transmitted by the interface converter, and to store the data source API that has been converted by the interface converter.
  • the generated publishing API; the parsing layer is used to determine the conversion type corresponding to the data source API after parsing the parameters carried by the data source API and send the key parameters of the target publishing API to the routing addressing algorithm module to enable the routing addressing algorithm.
  • the module selects the target routing process based on key parameters; the parameter retrieval layer is used to cache the key information of the parameters carried by the data source API.
  • the cache processing includes memory caching and database caching; the reorganization layer is used to extract the data source from the parameter retrieval layer.
  • the API After the API carries the key information of the parameters, it converts the data source API to generate the corresponding type of publishing API based on the key information; the publishing layer is used to manage and display the publishing API.
  • the parsing layer further includes:
  • the conversion type corresponding to the data source API to be parsed is determined.
  • the parsing layer further includes:
  • a security check is performed on the user access request, and after it is determined that the security check passes, the access data corresponding to the user access request is returned to the user.
  • the parameter obtaining layer further includes:
  • the carried data, interface traffic information and interface response time are used as the key information, and cached.
  • the reorganization layer further includes:
  • the present application also provides an access request processing method based on an API conversion system.
  • an API conversion system includes:
  • S202 Publish API information based on the target, and obtain at least two routing processes to be filtered.
  • the routing processes to be filtered are used to obtain access data corresponding to the user's access request.
  • S203 Determine the request response time and current network status corresponding to each routing process to be filtered.
  • S204 Select a target routing process that matches the request response time and the current network status from at least two routing processes to be filtered, and obtain access data based on the target routing process.
  • this application uses the API conversion system to process the user's access request processing process to call the API.
  • the user uses the publishing API, the user can make an access request to a certain type of target publishing API.
  • the access request enters the parsing layer, and the parsing layer first performs a request verification operation on the access request to determine whether the request is valid and a series of security verification operations. And after the verification is successful, routing analysis is performed based on the published API information, and all processes generated by the published API are restored and analyzed, thereby obtaining multiple routing processes (that is, routing processes to be filtered).
  • the parsing layer will restore the routing process (i.e. Multiple routing processes to be filtered) are sent to all or multiple software API conversion systems in the same local area network. This allows all software API conversion systems to send the requested response time, current network status and other parameters to the routing intelligent algorithm module after requesting the data source API.
  • this application can use the routing intelligent algorithm module to return the optimal response routing plan (that is, the target routing process that matches the request response time and the current network status) and the response time after calculating the intelligent model.
  • the software API conversion system obtains the corresponding type of data according to the optimal response routing plan and returns it to the user.
  • the routing intelligent algorithm module is one of the calculation modules in the API conversion system proposed by this application. It contains directed graph shortest path algorithm model, traditional time series fitting function, and fitting model based on deep learning - such as based on RNN, CNN+GRU, etc. Among them, the deep learning model can use current data and historical data to perform online automatic learning. . Its main work flow is:
  • Step a The routing addressing intelligent algorithm module receives and records the current response time and network status corresponding to each routing process to be filtered;
  • Step b Select the fitting method and corresponding fitting model: no fitting, traditional fitting (such as MA, AR, ARMA, GARCH, etc.), intelligent fitting (such as based on RNN, based on CNN+GRU, etc.), given Directed graph weight;
  • traditional fitting such as MA, AR, ARMA, GARCH, etc.
  • intelligent fitting such as based on RNN, based on CNN+GRU, etc.
  • Step c Based on the weight, calculate and return the optimal path plan through the shortest path algorithm model.
  • an API conversion system that stores different types of interfaces with the same data and the same function can be realized. This allows users to only enter the interface type that needs to be converted into the system, and the new type of API is automatically generated through the interface converter. There is no need to use other programming languages or other frameworks to develop again because of different application scenarios, which reduces the duplication of work for back-end developers. In addition, since developers do not need to learn other frameworks or understand new application scenarios, they only need to select the interface type to implement interface conversion, which also lowers the technical threshold for API development.
  • FIG. 5 is a logical structural block diagram of an electronic device according to an exemplary embodiment.
  • the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.
  • a non-transitory computer-readable storage medium including instructions such as a memory including instructions.
  • the instructions can be executed by an electronic device processor to complete the above-mentioned access request processing method based on the API conversion system.
  • the method includes: receiving a user access request generated by the user for the target publishing API; based on the target publishing API information, obtaining at least two routing processes to be filtered, and the routing processes to be filtered are used to obtain the user access request corresponding to the user access request.
  • Access data determine the request response time and current network status corresponding to each routing process to be filtered; select the target routing process that matches the request response time and the current network status from at least two routing processes to be filtered, and based on The target routing process obtains the access data.
  • the above instructions may also be executed by a processor of the electronic device to complete other steps involved in the above exemplary embodiments.
  • non-transitory computer-readable storage media may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
  • an application program/computer program product including one or more instructions, which can be executed by a processor of an electronic device to complete the above-mentioned access based on the API conversion system
  • a request processing method which method includes: receiving a user access request generated by a user for a target publishing API; and obtaining at least two routing processes to be filtered based on the target publishing API information, and the routing processes to be filtered are used to obtain the user access Request corresponding access data; determine the request response time and current network status corresponding to each routing process to be filtered; select the target routing process that matches the request response time and the current network status from at least two routing processes to be filtered , and obtain the access data based on the target routing process.
  • the above instructions may also be executed by a processor of the electronic device to complete other steps involved in the above exemplary embodiments.
  • the schematic diagram 5 is only an example of the electronic device 300 and does not constitute a limitation of the electronic device 300. It may include more or fewer components than shown, or some components may be combined, or different components may be used.
  • the electronic device 300 may also include input and output devices, network access devices, buses, etc.
  • the so-called processor 302 may be a central processing unit (CPU), or other general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), Programmable on site Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general processor can be a microprocessor or the processor 302 can also be any conventional processor.
  • the processor 302 is the control center of the electronic device 300 and connects various parts of the entire electronic device 300 using various interfaces and lines.
  • the memory 301 can be used to store computer-readable instructions.
  • the processor 302 implements various functions of the electronic device 300 by running or executing computer-readable instructions or modules stored in the memory 301 and calling data stored in the memory 301.
  • the memory 301 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store a program based on Data created by use of the electronic device 300, etc.
  • the memory 301 may include a hard disk, memory, plug-in hard disk, smart memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash memory card (Flash Card), at least one disk storage device, flash memory device, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM) or other non-volatile/volatile storage devices.
  • smart memory card Smart Media Card, SMC
  • flash memory card Flash Card
  • at least one disk storage device flash memory device
  • read-only memory Read-Only Memory
  • RAM random access memory
  • the integrated modules of the electronic device 300 are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the above-mentioned embodiment methods, which can also be completed by instructing relevant hardware through computer-readable instructions.
  • the computer-readable instructions can be stored in a computer-readable storage medium. When executed by the processor, the computer-readable instructions can implement the steps of each of the above method embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种API转换系统及其访问请求处理方法、电子设备及介质。本申请中提出的API转换系统包括存储层、解析层、取参层、重组层、发布层,其中,存储层,用于存储接口转换器传输的数据源API,以及存储已经被接口转换器转换生成的发布API;解析层,用于在解析数据源API的携带参数后,确定数据源API对应的转换类型以及将目标发布API的关键参数发送给路由寻址算法模块,以使路由寻址算法模块基于关键参选取目标路由流程;取参层,用于对数据源API携带参数的关键信息进行缓存处理,缓存处理包括内存缓存以及数据库缓存;重组层,用于从取参层中提取数据源API携带参数的关键信息后,基于关键信息将数据源API转换生成对应类型的发布API。

Description

API转换系统及其访问请求处理方法、电子设备及介质 技术领域
本申请中涉及数据处理技术,尤其是一种API转换系统及其访问请求处理方法、电子设备及介质。
背景技术
API(Application Programming Interface,应用程序接口)是一些预先定义的接口(如函数、HTTP接口),或指软件系统不同组成部分衔接的约定。随着信息技术和硬件资源的发展,应用场景的不断变更,API逐渐衍生出多样化的规范。
相关技术中,针对API软件系统来说,为保证整体软件系统的稳定性和安全性,通常整个系统的API开发只遵循一种协议规范(例如SOAP、RESTful等)。然而随着产业数字化转型的不断推进,各业务平台存留的软件系统多由第三方开发,从而导致API协议规范不统一,带来大量的数据孤岛问题,无法及时响应业务需求的快速变化。
发明内容
本申请实施例提供一种API转换系统及其访问请求处理方法、电子设备及介质。用以解决相关技术中存在的,各API软件系统支持的API协议规范不统一所导致的无法响应业务访问请求的问题。
其中,根据本申请实施例的一个方面,提供的一种API转换系统包括存储层、解析层、取参层、重组层、发布层,其中:
所述存储层,用于存储接口转换器传输的数据源API,以及存储已经被所述接口转换器转换生成的发布API;
所述解析层,用于在解析所述数据源API的携带参数后,确定所述数据源API对应的转换类型,以及将目标发布API的关键参数发送给路由寻址算法模块,以使所述路由寻址算法模块基于关键参数选取目标路由流程;
所述取参层,用于对所述数据源API携带参数的关键信息进行缓存处理,所述缓存处理包括内存缓存以及数据库缓存;
所述重组层,用于从所述取参层中提取所述数据源API携带参数的关键信息后,基于所述关键信息将所述数据源API转换生成对应类型的发布API;
所述发布层,用于管理并显示所述发布API。
可选地,在基于本申请上述方法的另一个实施例中,所述解析层还包括:
接收到用户请求时,从所述存储层中提取待解析的数据源API;
基于所述待解析的数据源API携带的数据格式,确定所述待解析的数据源API对应的转换类型。
可选地,在基于本申请上述方法的另一个实施例中,所述解析层还包括:
接收用户针对目标发布API生成的用户访问请求;
对所述用户访问请求进行安全校验,并在确定安全校验通过后,将所述户访问请求对应的访问数据返回给所述用户。
可选地,在基于本申请上述方法的另一个实施例中,所述取参层还包括:
从所述解析层中调取所述数据源API对应的携带数据,接口流量信息以及接口响应时间;
将所述携带数据,接口流量信息以及接口响应时间作为所述关键信息,并对其进行缓存处理。
可选地,在基于本申请上述方法的另一个实施例中,所述重组层还包括:
从所述取参层中提取所述数据源API携带参数的关键信息,并确定所述数据源API对应的转换类型;
将所述关键信息按照对应转换类型进行转换,得到所述对应类型的发布API;
基于所述API类型、请求参数、成功响应信息、失败响应信息以及请求示例,生成与所述发布API匹配的标准接口文档。
其中,根据本申请实施例的又一个方面,提供的一种基于API转换系统的访问请求处理方法,其特征在于,包括:
接收用户针对目标发布API生成的用户访问请求;
基于所述目标发布API信息,得到至少两个待筛选路由流程,所述待筛选路由流程用于获取所述户访问请求对应的访问数据;
确定每个待筛选路由流程对应的请求响应时间以及当前网络状态;
从至少两个待筛选路由流程中,选取与所述请求响应时间以及当前网络状态相匹配的目标路由流程,并基于所述目标路由流程获取所述访问数据。
可选地,在基于本申请上述方法的另一个实施例中,所述基于所述目标发布API信息,得到至少两个待筛选路由流程,包括:
通过API转换系统的解析层对所述目标发布API信息进行路由解析,得到所述至少两个待筛选路由流程。
可选地,在基于本申请上述方法的另一个实施例中,所述确定每个待筛选路由流程对应的请求响应时间以及当前网络状态,包括:
将所述至少两个待筛选路由方式给多个API转换系统;
所述多个API转换系统确定每个待筛选路由流程对应的请求响应时间以及当前网络状态;
将所述每个待筛选路由流程对应的请求响应时间以及当前网络状态发送给路由寻址智能算法模块;
通过所述路由寻址智能算法模块,从至少两个待筛选路由流程中选取与所述请求响应时间以及当前网络状态相匹配的目标路由流程。
根据本申请实施例的又一个方面,提供的一种电子设备,包括:
存储器,用于存储可执行指令;以及
显示器,用于与所述存储器以执行所述可执行指令从而完成上述任一所述API转换系统的操作。
根据本申请实施例的还一个方面,提供的一种计算机可读存储介质,用于存储计算机可读取的指令,所述指令被执行时执行上述任一所述API转换系统的操作。
本申请中提出的API转换系统包括存储层、解析层、取参层、重组层、发布层,其中,存储层,用于存储接口转换器传输的数据源API,以及存储已经被接口转换器转换生成的发布API;解析层,用于在解析数据源API的携带参数后,确定数据源API对应的转换类型以及将目标发布API的关键参数发送给路由寻址算法模块,以使路由寻址算法模块基于关键参数选取目标路由流程;取参层,用于对数据源API携带参数的关键信息进行缓存处理,缓存处理包括内存缓存以及数据库缓存;重组层,用于从取参层中提取数据源API携带参数的关键信息后,基于关键信息将数据源API转换生成对应类型的发布API;发布层,用于管理并显示发布API。通过应用本申请的技术方案,可以实现集存有同一数据,同一功能的不同类型接口的API转换系统。以使用户只需在系统中输入需要转换的接口类型,通过接口转换器自动生成新类型的API。无需因为应用场景不同,再使用其他编程语言或者其他框架来重新开发,减少了后端开发人员的重复工作量。另外,由于开发人员无需学习其他框架或了解新的应用场景,只需选择接口类型就可以实现接口转换,从而也降低了API开发的技术门槛。
下面通过附图和实施例,对本申请的技术方案做进一步的详细描述。
附图说明
构成说明书的一部分的附图描述了本申请的实施例,并且连同描述一起用于解释本申请的原理。
参照附图,根据下面的详细描述,可以更加清楚地理解本申请,其中:
图1为本申请提出的一种API转换系统架构示意图;
图2为本申请提出的一种基于API转换系统的访问请求处理系统架构示意图;
图3为本申请提出的一种基于API转换系统的访问请求处理方法流程示意图;
图4为本申请提出的路由寻址智能算法模块选取目标路由流程的方法流程示意图;
图5为本申请提出的一种基于API转换系统的访问请求处理电子设备的结构示意图。
具体实施方式
现在将参照附图来详细描述本申请的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本申请的范围。
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,不作为对本申请及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
另外,本申请各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
需要说明的是,本申请实施例中所有方向性指示(诸如上、下、左、右、前、后……)仅用于解释在某一特定姿态(如附图所示)下各部件之间的相对 位置关系、运动情况等,如果该特定姿态发生改变时,则该方向性指示也相应地随之改变。
下面结合图1-图3来描述根据本申请示例性实施方式的用于进行API转换系统。需要注意的是,下述应用场景仅是为了便于理解本申请的精神和原理而示出,本申请的实施方式在此方面不受任何限制。相反,本申请的实施方式可以应用于适用的任何场景。
本申请还提出一种API转换系统及其访问请求处理方法、电子设备及介质。
图1示意性地示出了根据本申请实施方式的一种API转换系统的流程示意图。如图1所示,该系统包括存储层、解析层、取参层、重组层、发布层,其中:
S101,存储层,用于存储接口转换器传输的数据源API,以及存储已经被接口转换器转换生成的发布API。
S102,解析层,用于在解析数据源API的携带参数后,确定数据源API对应的转换类型以及将目标发布API的关键参数发送给路由寻址算法模块,以使路由寻址算法模块基于关键参数选取目标路由流程。
S103,取参层,用于对数据源API携带参数的关键信息进行缓存处理,缓存处理包括内存缓存以及数据库缓存。
S104,重组层,用于从取参层中提取数据源API携带参数的关键信息后,基于关键信息将数据源API转换生成对应类型的发布API。
S105,发布层,用于管理并显示发布API。
相关技术中,API(Application Programming Interface,应用程序接口)是一些预先定义的接口(如函数、HTTP接口),或指软件系统不同组成部分衔接的约定。随着信息技术和硬件资源的发展,应用场景的不断变更,API逐渐衍生出多样化的规范。API种类根据程序功能大致可分为四类:
远程过程调用,如:RPC API、ONC RPC、DCE RPC、XML-RPC等;
标准查询语言,如:SQL API、GraphQL API等;
文件传输,如:File API、HDFS API等;
信息交付,如:RESTful API、SOAP API等。
可选的一方面,以常见应用编程接口协议中简单对象访问协议(SOAP)和表述性状态传递(REST)为例,随着Web API的不断普及,业界制定了SOAP来标准化消息格式和请求。通过这种协议规范,让在不同环境下编写或以不同语言编写的应用更加轻松地通信。而REST是一种架构模式,因为它比SOAP有着更易遵循的指导原则,所以RESTful API现在比SOAP API更为普及,SOAP协议应用数量也渐渐被REST协议应用数量超越。
另一方面,在日常的软件系统开发设计中,为保证整体软件系统的稳定性和安全性,通常整个系统的API开发只遵循一种协议规范(如SOAP、RESTful)。然而随着产业数字化转型的不断推进,各产业单位中存留的软件系统多由第三方开发,API协议规范不统一,带来大量的数据孤岛问题,无法及时响应业务需求的快速变化,主要原因有如下两方面:
不同的业务系统需要不同协议类型的API支撑,开发技术范围需求较广;
现有软件系统中存在着庞大数量及诸多类型API,同时为满足业务需要带来的新老系统迭代,需要不同类型的API之间的互通,给数字化转型背景下的技术管理带来了压力;
因此,在产业数字化时代背景下,加快数据孤岛的联通,使得软件系统之间信息对称,及时响应业务需求,是数字化转型工作中的主要问题之一。如何打通软件之间的信息壁垒,提高API的整体开发效率和运维管理能力,实现单位内部各类软件系统的API兼容,是解决数据孤岛联通问题的首要切入口。然而现有的软件系统中API兼容技术解决方案存在以下三大共性问题:
软件系统API稳定性:由于存在API协议规范不同的情况,如直接调整原系统API协议规范,会对软件系统运行稳定造成未知影响。
软件系统API运维成本:软件系统API协议的调整会影响原生业务系统的使用,进而可能导致API的研发和用户需要付出额外的成本来维护原业务系统。
软件系统API安全性:软件系统API协议的变化调整会给业务系统的使用带来不可知的安全性问题。例如SOAP协议由于提供比REST更多的企业级安全 特性,在单位中对于有高安全性需求的应用多数采取SOAP协议,强行调整API协议极有可能造成应用安全漏洞问题;
针对上述三大问题,直接调整软件系统API协议不是最明智的方法。而实现单位内部各类软件系统的API兼容问题,通过对市场上的产品调研后发现,除了直接调整软件系统API协议的方法以外,接口协议的转换技术也是一种非常有效的解决思路。
接口协议的转换技术已非常成熟的在硬件场景下使用,主要是通过外置接口转换器等工具的方式进行。
综上所述,现有方案仍无法解决以下三个问题:
无法基于现有装置自主研发添加新的转换协议,最大化降低系统API的开发成本;
无法规范高效地管理转换后的接口,最大化降低系统API的运维管理成本。
无法保证接口性能最(次)优,保障系统的稳定性。
进一步的,为了解决上述问题,本申请提出了一种API转换系统,该系统中包括有存储层、解析层、取参层、重组层、发布层,其中建立过程如下:
作为示例,步骤1、建立API存储层:
其中,本申请可以将API接口转换器的输入API定义为数据源API,将接口转换器自动生成的API定义为发布API,两种API接口信息统一存储到数据库中,搭建API存储层。
作为示例,步骤2、构建解析层:
在这一步中会针对来源API进行参数解析,路由解析过程为取参层进行数据准备,其中对于数据源API解析过程,具体步骤如下:
步骤a2、用户在存储层找到需要解析的数据源API,确认数据源API所需转换成哪一种类型(即参数重组后的格式)。具体来说,解析层可以对数据源API携带的数据进行参数解析,例如:SOAP类型的API针对携带的XML数据进行解析;RestFul类型的API针对携带的JSON数据进行解析,从而根据解析结果确定其对应的转换类型。
步骤b2、解析结果存入数据库中,方便取参层和重组层后续调用。
另外,解析层还用于接收用户发送的针对目标发布API生成的用户访问请求,并还需要将请求中对应的目标发布API信息的关键参数发送给路由寻址算法模块,以使路由寻址算法模块基于关键参选取目标路由流程。
其中,对于解析用户访问请求的过程来说,可以包括如下:
步骤a2、用户在使用发布API时,对发布API进行访问请求,解析层针对访问请求先进行请求校验操作,判断请求是否有效等一系列安全验证操作;
步骤b2、根据发布API信息进行路由解析,将发布API产生的所有流程还原解析;
步骤c2、通过路由解析后,解析层将还原出的路由流程发送给同一局域网中所有的软件API转换系统,所有软件API转换系统通过请求数据源API后,将请求的响应时间、当前网络状态等参数发送给最优路由寻址智能算法模块;
步骤d2、最优路由寻址智能算法模块经过智能模型计算后,返回最优响应路由方案及响应时间后,软件API转换系统根据最优响应路由方案获取相应类型数据,并返回给用户。
作为示例,步骤3、构建取参层,具体步骤如下:
步骤a3、获取解析层的解析结果(例如包括具体的携带数据,接口流量信息,接口响应时间等),针对该结果进行数据参数关键信息提取;
步骤b3、针对参数中的关键信息,进行缓存操作,可选择存储到数据库,也可以通过内存等进行缓存操作,从而实现保留参数信息的目的。
作为示例,步骤4、构建重组层,具体步骤如下:
重组层用于负责进行参数的重组,路由重组,以及选择想要发布的API类型。其中具体为:
步骤a4、针对取参层中保存的关键参数信息进行提取,选择想更换的API类型,根据目标API类型进行路由重组,产生发布API(也即将待转换的数据源API转换为对应转换类型的发布API)。
步骤b4、根据目标API类型对保存的关键参数信息进行相应自定义转化, 使得关键参数信息可以与目标API类型相吻合;
步骤c4、将发布API产生的接口流量信息,接口响应时间等参数与目标API进行限流、熔断等方式进行适配处理,保证转换前后的API性能均衡。
步骤d4、根据用户的目标API类型、请求参数、成功响应、失败响应、请求示例等信息,自动生成标准接口文档。
作为示例,步骤5、建立API发布层:
主要用于管理显示所有发布API,以帮助用户可以随时在发布层进行管理及调用。
进一步的,如图2所示,本申请提出的API转换系统可以允许用户在开放性开发框架下自行开发转换协议,依照转换协议配置相应的接口转换,同时允许用户针对于开发框架自行搭建开发环境,系统可兼容自定义开发环境,支持用户使用主流编程语言开发。
另外,针对于同一数据,同一功能的同一类型接口,可以通过系统中的API接口转换器自动生成同类型的另一种接口。接口转换器通过缓存技术减少频繁请求接口时对数据库和数据源API的压力,从而帮助开发人员无需考虑因接口性能问题而选择更优的框架来开发,以提高接口性能。也无需因为应用场景不同,再使用其他编程语言或者其他框架来重新开发,减少了后端开发人员的重复工作量;同时开发人员无需学习其他框架或了解新的应用场景,只需选择接口类型就可以实现接口转换,降低了API开发的技术门槛。
一种方式中,本申请提供的接口转换器,可以配套拥有自动生成标准的接口文档功能,通过统一的接口文档编写规范,产生高可读性的接口文档,保证文档风格的一致性。
作为有益效果,本申请提出的API转换系统可以实现在同一网络下,系统可以监管所有API,针对同一数据源的API,系统通过缓存技术和最优路由寻址算法结合,找到最优请求路径,确保在同一网络下,每个API都可以实现最快响应,即使数据源API因网络波动停止数据传输,也可以维持发布API的正常运行,等待数据源API数据传输恢复,实现API的高可用。同时,API转换器 系统将自动监控流量,自行调整数据接收、传输过程到最佳状态,保障系统的稳定性。
本申请中提出的API转换系统包括存储层、解析层、取参层、重组层、发布层,其中,存储层,用于存储接口转换器传输的数据源API,以及存储已经被接口转换器转换生成的发布API;解析层,用于在解析数据源API的携带参数后,确定数据源API对应的转换类型以及将目标发布API的关键参数发送给路由寻址算法模块,以使路由寻址算法模块基于关键参数选取目标路由流程;取参层,用于对数据源API携带参数的关键信息进行缓存处理,缓存处理包括内存缓存以及数据库缓存;重组层,用于从取参层中提取数据源API携带参数的关键信息后,基于关键信息将数据源API转换生成对应类型的发布API;发布层,用于管理并显示发布API。通过应用本申请的技术方案,可以实现集存有同一数据,同一功能的不同类型接口的API转换系统。以使用户只需在系统中输入需要转换的接口类型,通过接口转换器自动生成新类型的API。无需因为应用场景不同,再使用其他编程语言或者其他框架来重新开发,减少了后端开发人员的重复工作量。另外,由于开发人员无需学习其他框架或了解新的应用场景,只需选择接口类型就可以实现接口转换,从而也降低了API开发的技术门槛。
可选地,在基于本申请上述方法的另一个实施例中,解析层还包括:
接收到用户请求时,从所述存储层中提取待解析的数据源API;
基于所述待解析的数据源API携带的数据格式,确定所述待解析的数据源API对应的转换类型。
可选地,在基于本申请上述方法的另一个实施例中,所述解析层还包括:
接收用户针对目标发布API生成的用户访问请求;
对所述用户访问请求进行安全校验,并在确定安全校验通过后,将所述户访问请求对应的访问数据返回给所述用户。
可选地,在基于本申请上述方法的另一个实施例中,所述取参层还包括:
从所述解析层中调取所述数据源API对应的携带数据,接口流量信息以及 接口响应时间;
将所述携带数据,接口流量信息以及接口响应时间作为所述关键信息,并对其进行缓存处理。
可选地,在基于本申请上述方法的另一个实施例中,所述重组层还包括:
从所述取参层中提取所述数据源API携带参数的关键信息,并确定所述数据源API对应的转换类型;
将所述关键信息按照对应转换类型进行转换,得到所述对应类型的发布API;
基于所述API类型、请求参数、成功响应信息、失败响应信息以及请求示例,生成与所述发布API匹配的标准接口文档。
可选的,在本申请的另外一种实施方式中,如图3所示,本申请还提供一种基于API转换系统的访问请求处理方法。其中包括:
S201,接收用户针对目标发布API生成的用户访问请求。
S202,基于目标发布API信息,得到至少两个待筛选路由流程,待筛选路由流程用于获取用户访问请求对应的访问数据。
S203,确定每个待筛选路由流程对应的请求响应时间以及当前网络状态。
S204,从至少两个待筛选路由流程中,选取与请求响应时间以及当前网络状态相匹配的目标路由流程,并基于目标路由流程获取访问数据。
一种方式中,本申请在利用API转换系统处理用户调取API的访问请求处理流程中,可以在用户在使用发布API时,由用户对某个类型的目标发布API进行访问请求。
该访问请求进入解析层,以由解析层针对访问请求先进行请求校验操作,判断请求是否有效等一系列安全验证操作。并在验证成功后,根据该发布API信息进行路由解析,将发布API产生的所有流程还原解析,从而得到多个路由流程(即待筛选路由流程)。
进一步的,该访问请求通过路由解析后,解析层将还原出的路由流程(即 多个待筛选路由流程)发送给同一局域网中所有或其中的多个软件API转换系统。以使所有软件API转换系统通过请求数据源API后,将请求的响应时间、当前网络状态等参数发送给路由寻址智能算法模块。
如图4所示,本申请可以由路由寻址智能算法模块经过智能模型计算后,返回最优的响应路由方案(即与请求响应时间以及当前网络状态相匹配的目标路由流程)及响应时间后,软件API转换系统根据最优响应路由方案获取相应类型数据,并返回给用户。
具体来讲,路由寻址智能算法模块是一种由本申请提出的API转换系统中的计算模块之一。其内含有向图最短路径算法模型、传统时序拟合函数、基于深度学习的拟合模型——如基于RNN,CNN+GRU等,其中深度学习模型可以利用当前数据和历史数据,进行在线自动学习。其主要工作流程为:
步骤a、路由寻址智能算法模块接收并记录每个待筛选路由流程对应的当前响应时间以及网络状态;
步骤b、选择拟合方式及相应的拟合模型:不拟合,传统拟合(如MA,AR,ARMA,GARCH等),智能拟合(如基于RNN,基于CNN+GRU等),给出有向图权重;
步骤c、根据权重,通过最短路径算法模型计算并返回最优路径方案。
通过应用本申请的技术方案,可以实现集存有同一数据,同一功能的不同类型接口的API转换系统。以使用户只需在系统中输入需要转换的接口类型,通过接口转换器自动生成新类型的API。无需因为应用场景不同,再使用其他编程语言或者其他框架来重新开发,减少了后端开发人员的重复工作量。另外,由于开发人员无需学习其他框架或了解新的应用场景,只需选择接口类型就可以实现接口转换,从而也降低了API开发的技术门槛。
图5是根据一示例性实施例示出的一种电子设备的逻辑结构框图。例如,电子设备300可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由电子设备处理器执行以完成上述基于API转换系统的访问请求处理方法,该方法包括:接收用户针对目标发布API生成的用户访问请求;基于所述目标发布API信息,得到至少两个待筛选路由流程,所述待筛选路由流程用于获取所述户访问请求对应的访问数据;确定每个待筛选路由流程对应的请求响应时间以及当前网络状态;从至少两个待筛选路由流程中,选取与所述请求响应时间以及当前网络状态相匹配的目标路由流程,并基于所述目标路由流程获取所述访问数据。可选地,上述指令还可以由电子设备的处理器执行以完成上述示例性实施例中所涉及的其他步骤。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种应用程序/计算机程序产品,包括一条或多条指令,该一条或多条指令可以由电子设备的处理器执行,以完成上述基于API转换系统的访问请求处理方法,该方法包括:接收用户针对目标发布API生成的用户访问请求;基于所述目标发布API信息,得到至少两个待筛选路由流程,所述待筛选路由流程用于获取所述户访问请求对应的访问数据;确定每个待筛选路由流程对应的请求响应时间以及当前网络状态;从至少两个待筛选路由流程中,选取与所述请求响应时间以及当前网络状态相匹配的目标路由流程,并基于所述目标路由流程获取所述访问数据。可选地,上述指令还可以由电子设备的处理器执行以完成上述示例性实施例中所涉及的其他步骤。
本领域技术人员可以理解,示意图5仅仅是电子设备300的示例,并不构成对电子设备300的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如电子设备300还可以包括输入输出设备、网络接入设备、总线等。
所称处理器302可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编 程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器302也可以是任何常规的处理器等,处理器302是电子设备300的控制中心,利用各种接口和线路连接整个电子设备300的各个部分。
存储器301可用于存储计算机可读指令,处理器302通过运行或执行存储在存储器301内的计算机可读指令或模块,以及调用存储在存储器301内的数据,实现电子设备300的各种功能。存储器301可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备300的使用所创建的数据等。此外,存储器301可以包括硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)或其他非易失性/易失性存储器件。
电子设备300集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。

Claims (10)

  1. 一种API转换系统,其特征在于,包括存储层、解析层、取参层、重组层、发布层,其中:
    所述存储层,用于存储接口转换器传输的数据源API,以及存储已经被所述接口转换器转换生成的发布API;
    所述解析层,用于在解析所述数据源API的携带参数后,确定所述数据源API对应的转换类型,以及将目标发布API的关键参数发送给路由寻址算法模块,以使所述路由寻址算法模块基于关键参数选取目标路由流程;
    所述取参层,用于对所述数据源API携带参数的关键信息进行缓存处理,所述缓存处理包括内存缓存以及数据库缓存;
    所述重组层,用于从所述取参层中提取所述数据源API携带参数的关键信息后,基于所述关键信息将所述数据源API转换生成对应类型的发布API;
    所述发布层,用于管理并显示所述发布API。
  2. 如权利要求1所述的系统,其特征在于,所述解析层还包括:
    接收到用户请求时,从所述存储层中提取待解析的数据源API;
    基于所述待解析的数据源API携带的数据格式,确定所述待解析的数据源API对应的转换类型。
  3. 如权利要求1或2所述的系统,其特征在于,所述解析层还包括:
    接收用户针对目标发布API生成的用户访问请求;
    对所述用户访问请求进行安全校验,并在确定安全校验通过后,将所述户访问请求对应的访问数据返回给所述用户。
  4. 如权利要求1或2所述的系统,其特征在于,所述取参层还包括:
    从所述解析层中调取所述数据源API对应的携带数据,接口流量信息以及 接口响应时间;
    将所述携带数据,接口流量信息以及接口响应时间作为所述关键信息,并对其进行缓存处理。
  5. 如权利要求1所述的系统,其特征在于,所述重组层还包括:
    从所述取参层中提取所述数据源API携带参数的关键信息,并确定所述数据源API对应的转换类型;
    将所述关键信息按照对应转换类型进行转换,得到所述对应类型的发布API;
    基于所述API类型、请求参数、成功响应信息、失败响应信息以及请求示例,生成与所述发布API匹配的标准接口文档。
  6. 一种基于API转换系统的访问请求处理方法,其特征在于,包括:
    接收用户针对目标发布API生成的用户访问请求;
    基于所述目标发布API信息,得到至少两个待筛选路由流程,所述待筛选路由流程用于获取所述户访问请求对应的访问数据;
    确定每个待筛选路由流程对应的请求响应时间以及当前网络状态;
    从至少两个待筛选路由流程中,选取与所述请求响应时间以及当前网络状态相匹配的目标路由流程,并基于所述目标路由流程获取所述访问数据。
  7. 如权利要求6所述的方法,其特征在于,所述基于所述目标发布API信息,得到至少两个待筛选路由流程,包括:
    通过API转换系统的解析层对所述目标发布API信息进行路由解析,得到所述至少两个待筛选路由流程。
  8. 如权利要求6或7所述的方法,其特征在于,所述确定每个待筛选路由流程对应的请求响应时间以及当前网络状态,包括:
    将所述至少两个待筛选路由方式给多个API转换系统;
    所述多个API转换系统确定每个待筛选路由流程对应的请求响应时间以及当前网络状态;
    将所述每个待筛选路由流程对应的请求响应时间以及当前网络状态发送给路由寻址智能算法模块;
    通过所述路由寻址智能算法模块,从至少两个待筛选路由流程中选取与所述请求响应时间以及当前网络状态相匹配的目标路由流程。
  9. 一种基于API转换系统的访问请求处理的装置,其特征在于,包括:
    接收模块,被配置为接收用户针对目标发布API生成的用户访问请求;
    生成模块,被配置为基于所述目标发布API信息,得到至少两个待筛选路由流程,所述待筛选路由流程用于获取所述户访问请求对应的访问数据;
    确定模块,被配置为确定每个待筛选路由流程对应的请求响应时间以及当前网络状态;
    选取模块,被配置为从至少两个待筛选路由流程中,选取与所述请求响应时间以及当前网络状态相匹配的目标路由流程,并基于所述目标路由流程获取所述访问数据。
  10. 一种计算机可读存储介质,用于存储计算机可读取的指令,其特征在于,所述指令被执行时执行权利要求6-8中任一所述API基于API转换系统的访问请求处理方法的操作。
PCT/CN2023/091284 2022-04-28 2023-04-27 Api转换系统及其访问请求处理方法、电子设备及介质 WO2023208132A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210457595.8 2022-04-28
CN202210457595.8A CN114968617B (zh) 2022-04-28 2022-04-28 Api转换系统及其访问请求处理方法、电子设备及介质

Publications (1)

Publication Number Publication Date
WO2023208132A1 true WO2023208132A1 (zh) 2023-11-02

Family

ID=82979644

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/091284 WO2023208132A1 (zh) 2022-04-28 2023-04-27 Api转换系统及其访问请求处理方法、电子设备及介质

Country Status (2)

Country Link
CN (1) CN114968617B (zh)
WO (1) WO2023208132A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968617B (zh) * 2022-04-28 2023-09-01 杭州未名信科科技有限公司 Api转换系统及其访问请求处理方法、电子设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002054171A2 (en) * 2000-12-06 2002-07-11 Biosentients, Inc. System, method, software architecture and business model for an intelligent object based information technology platform
CN109672558A (zh) * 2018-11-30 2019-04-23 哈尔滨工业大学(威海) 一种面向第三方服务资源的聚合与优化匹配方法,设备及存储介质
CN110472382A (zh) * 2019-07-23 2019-11-19 平安科技(深圳)有限公司 Api调用方法、装置、终端及存储介质
US10719374B1 (en) * 2019-09-17 2020-07-21 Capital One Services, Llc Application programming interface generator using database metadata
CN113760478A (zh) * 2020-06-05 2021-12-07 华为技术有限公司 目标作业系统的访问控制方法、装置、设备及介质
CN114968617A (zh) * 2022-04-28 2022-08-30 杭州未名信科科技有限公司 Api转换系统及其访问请求处理方法、电子设备及介质

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106856434B (zh) * 2015-12-08 2020-06-30 阿里巴巴集团控股有限公司 访问请求转换的方法和装置
CN107451162B (zh) * 2016-06-01 2020-12-18 阿里巴巴(中国)有限公司 网络资源访问设备、混合设备及方法
CN114980221A (zh) * 2016-12-30 2022-08-30 英特尔公司 用于无线电通信的方法和设备
CN110557445A (zh) * 2019-08-22 2019-12-10 上海艾融软件股份有限公司 访问请求路由方法、装置及存储介质、电子设备
CN111049877B (zh) * 2019-10-21 2022-08-09 贝壳技术有限公司 一种大数据对外输出方法、装置及数据开放平台
CN111143087B (zh) * 2019-12-18 2024-04-02 中国平安财产保险股份有限公司 一种接口调用方法、装置、存储介质和服务器
CN111367983B (zh) * 2020-03-10 2023-08-15 中国联合网络通信集团有限公司 数据库访问方法、系统、设备和存储介质
CN111741016B (zh) * 2020-07-23 2020-12-08 南京梦饷网络科技有限公司 用于管理应用接口的方法、计算设备和计算机存储介质
CN113784354B (zh) * 2021-09-17 2024-04-09 城云科技(中国)有限公司 基于网关的请求转换方法和装置
CN113794739B (zh) * 2021-11-16 2022-04-12 北京邮电大学 针对中间人攻击的双层主动防御的方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002054171A2 (en) * 2000-12-06 2002-07-11 Biosentients, Inc. System, method, software architecture and business model for an intelligent object based information technology platform
CN109672558A (zh) * 2018-11-30 2019-04-23 哈尔滨工业大学(威海) 一种面向第三方服务资源的聚合与优化匹配方法,设备及存储介质
CN110472382A (zh) * 2019-07-23 2019-11-19 平安科技(深圳)有限公司 Api调用方法、装置、终端及存储介质
US10719374B1 (en) * 2019-09-17 2020-07-21 Capital One Services, Llc Application programming interface generator using database metadata
CN113760478A (zh) * 2020-06-05 2021-12-07 华为技术有限公司 目标作业系统的访问控制方法、装置、设备及介质
CN114968617A (zh) * 2022-04-28 2022-08-30 杭州未名信科科技有限公司 Api转换系统及其访问请求处理方法、电子设备及介质

Also Published As

Publication number Publication date
CN114968617A (zh) 2022-08-30
CN114968617B (zh) 2023-09-01

Similar Documents

Publication Publication Date Title
CN102185901B (zh) 一种客户端报文转换方法
CN108696381B (zh) 一种协议配置方法及装置
WO2019154353A1 (zh) 系统运行参数查询方法、匹配方法、装置及节点设备
US20150120655A1 (en) Method and apparatus for synchronizing content
JP2021504813A (ja) ブロックチェーンネットワークのトランザクション処理方法、装置、機器及び記憶媒体
WO2018201887A1 (zh) 数据响应方法、装置、终端设备及介质
JP2008532119A5 (zh)
CN103139234B (zh) 一种数据服务封装的装置及方法
KR101602099B1 (ko) 사물인터넷에서 레스트 기반의 서비스 연동 시스템 및 그 방법
WO2019057055A1 (zh) 一种任务处理方法、装置、电子设备及存储介质
WO2023208132A1 (zh) Api转换系统及其访问请求处理方法、电子设备及介质
US20200111487A1 (en) Voice capable api gateway
CN111651418B (zh) 一种文档内容下载方法、装置、计算机设备和存储介质
CN111698205A (zh) 服务调用方法及相关设备
CN108287894A (zh) 数据处理方法、装置、计算设备及存储介质
US10938797B2 (en) Customized expand data services supporting delta querying
CN114168343A (zh) 服务请求的响应方法、装置、服务器及存储介质
CN113806104A (zh) 接口访问请求处理方法、api网关、服务器及系统
WO2021093674A1 (zh) 工作流系统中的bi节点执行方法、装置、设备及计算机可读存储介质
CN114285859B (zh) 中间层区块链服务的数据处理方法、装置、设备及存储介质
WO2023024057A1 (zh) 跨域授权处理方法及跨域调用处理方法
CN114189476A (zh) 一种多元接口分流调用方法及终端
US10652341B2 (en) Restful interface system for an application
KR100768087B1 (ko) 자원 관리 시스템 및 방법
US7752293B1 (en) Command processing in a telecommunications network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23795564

Country of ref document: EP

Kind code of ref document: A1