WO2020233012A1 - 分布式的智能api异步回调方法、装置、客户端、服务端及存储介质 - Google Patents
分布式的智能api异步回调方法、装置、客户端、服务端及存储介质 Download PDFInfo
- Publication number
- WO2020233012A1 WO2020233012A1 PCT/CN2019/117893 CN2019117893W WO2020233012A1 WO 2020233012 A1 WO2020233012 A1 WO 2020233012A1 CN 2019117893 W CN2019117893 W CN 2019117893W WO 2020233012 A1 WO2020233012 A1 WO 2020233012A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- api
- api interface
- request information
- callback
- data message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
Definitions
- This application relates to the field of monitoring, in particular to a technology for monitoring business nodes through software, and specifically discloses a distributed intelligent API asynchronous callback method, device, client, server and storage medium.
- this application discloses a smart API asynchronous callback method, device, client, server and storage medium.
- the first aspect of this application provides a distributed smart API asynchronous callback method, which includes:
- the server receives API interface request information
- Data decryption is performed on the API interface request information according to the preset decryption rule, and the decrypted API interface request information includes the API interface identifier, user identifier, and data message format;
- an API platform including the called API interface is selected from multiple API platforms according to preset screening rules, and the called API interface is the API interface indicated by the API interface identifier;
- the API interface indicated by the API interface identifier is called back asynchronously.
- the second aspect of this application provides a distributed intelligent API asynchronous callback device, including:
- the first receiving module receives API interface request information
- the decryption module performs data decryption on the API interface request information according to preset decryption rules, and the decrypted API interface request information includes the API interface identifier, user identifier and data message format;
- the screening module screens out API platforms including the called API interface from multiple API platforms according to preset screening rules, and the called API interface is the API interface indicated by the API interface identification;
- the interface calling module based on the API platform including the called API interface, asynchronously calls back the API interface indicated by the API interface identifier.
- the third aspect of this application provides a client, including:
- the encapsulation module is used to encapsulate API interface request information.
- the interface request information includes user identification, API interface identification, and API interface identification, and/or data message format;
- the request information encryption module is used to encrypt the encapsulated API interface request information according to preset encryption rules
- Sending module used to send encrypted API interface request information through POST;
- the second receiving module is used to receive the authentication public key
- the monitoring module is used to set the callback to monitor the sending result.
- the fourth aspect of this application provides a server, including:
- At least 1 storage unit At least 1 storage unit
- a processing unit coupled with the at least one storage unit
- the at least one storage unit is used to store computer instructions
- the processing unit is used to call the computer instructions to execute the distributed intelligent API asynchronous callback method disclosed in the first aspect of this application.
- a computer non-volatile storage medium stores computer instructions. When the computer instructions are invoked, they are used to execute the distribution disclosed in the first aspect of the present application. Smart API asynchronous callback method.
- this application can asynchronously call back the API interface of the distributed setting to call the functions provided by the API interface of the distributed setting, thereby realizing the rapid construction of fast function modules.
- this application can perform the request data and the data returned by the API interface. Encryption to achieve higher data transmission security.
- FIG. 1 is a schematic flowchart of a distributed intelligent API asynchronous callback method disclosed in Embodiment 1 of the present application;
- FIG. 2 is a schematic flow chart of a distributed intelligent API asynchronous callback method disclosed in the second embodiment of the present application
- FIG. 3 is a schematic structural diagram of a distributed intelligent API asynchronous callback device disclosed in the third embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a distributed intelligent API asynchronous callback device disclosed in the fourth embodiment of the present application.
- Fig. 5 is a schematic structural diagram of a distributed intelligent API asynchronous callback device disclosed in the present application.
- FIG. 1 is a schematic flowchart of a distributed intelligent API asynchronous callback method disclosed in Embodiment 1 of the present application, and the method is executed on the server side.
- a distributed smart API asynchronous callback method in Embodiment 1 of the present application includes:
- the server receives API interface request information.
- the distributed intelligent API asynchronous callback method of the embodiment of the present application before the server receives the API interface request information sent by the requesting end, the distributed intelligent API asynchronous callback method of the embodiment of the present application further includes:
- the server receives the public key request and generates the authentication public key and the authentication key;
- the server sends the authentication public key.
- the server performs data decryption on the API interface request information according to a preset decryption rule.
- the server After the server receives the API interface request information, it decrypts the data of the API interface request information to parse out the user ID, the API interface ID, the requested data content, and the data message format.
- the server uses the authentication key to verify the API interface request information.
- the server compares the data message format in the API interface request information with the data message format set by the server by default. If the data message format in the API interface request information is If it is inconsistent with the data message format set by the server by default, the server will format the API interface request information according to the data message format set by the server by default.
- the server requests the API interface
- the information is interpreted by nodes, and the interpretation method is mainly to traverse all nodes in the data message requesting information through the API interface through a depth-first traversal method.
- the node contains multiple values, which is defined as the root node in the example of this application, otherwise it is defined as the child node.
- the process of traversing all nodes in the data message of the API interface request information is:
- JSON data After data conversion is performed on the data requested by the API interface, two JSON data are generated, namely login and content, where content is nested, as shown below:
- the server verifies the user identity, and the user identity is obtained from the data content obtained after the server performs data decryption on the API interface request information according to a preset decryption rule.
- the user identification includes a user identity identification and a user authority identification.
- the verification of the user identity by the server may include:
- the server verifies the user identity
- the server verifies the user authority identification.
- the verification of the user identity by the server may include:
- the user ID is compared with the user ID database. If the user ID database contains the user ID, the server will return the user ID verification success message, if the user ID database does not contain the user ID, the server will return the user ID verification failure message , So that when the user terminal receives the user authentication failure information, resubmit the API interface request information.
- the server verifying the user authority identifier may include:
- the server Compare the user authority identifier with the user authority database. If the user authority database contains the user authority identifier, the server returns the user authority verification success message. If the user authority database does not contain the user authority identifier, the server returns the user authority verification failure message .
- the user identity database and the user authority database can be any of the relational databases such as mysql, orcal, sqlserver, etc., because mysql is a lightweight database and has more convenient transplantation Therefore, it is convenient to expand and maintain.
- mysql is selected as the user identity database.
- the server screens out the API platform including the called API interface from a number of API platforms according to the API interface identifier according to preset screening rules, and the called API interface is the API interface indicated by the API interface identifier.
- the server selects the API platform including the called API interface from a number of API platforms according to the API interface identifier and preset screening rules, including:
- the server screens out the API platform with the least amount of visits from several API platforms.
- the server Based on the API platform including the called API interface, the server asynchronously calls back the API interface indicated by the API interface identifier.
- the request result is returned according to a preset data format.
- the request result is returned in JSON format.
- the preset data format in the request result returned according to the preset data format can be determined in the following steps:
- the API interface request information further includes business task data, and, based on the API platform that includes the called API interface, after the server asynchronously calls back the API interface indicated by the API interface identifier, the method returns include:
- the method further includes:
- the server performs data format conversion on the callback result according to the data message format in the API interface request information
- the server encrypts the callback result according to the callback result encryption rule.
- the callback result encryption rule can be the RSA encryption algorithm. Because the RSA encryption algorithm is difficult to crack, its confidentiality is recognized in the industry. Although its security has not yet been clearly demonstrated, it is actually used In, there has not been an example of cracking the RSA encryption algorithm, so it has high data security.
- the callback result encryption rule may be a Base64 encryption algorithm
- request result can be determined according to the specific business needs of the caller, and this application does not limit the specific content of the request result.
- the embodiments of the present application can integrate functional modules with the same functions in different platforms based on functional similarity, thereby generating a universal interface open to the outside world, and then when the calling requester needs to call functional modules deployed on different platforms , The calling requester only needs to call the general interface and provide the relevant field identification to complete the API interface call between multiple platforms.
- the embodiment of this application can return the data format according to the data format in the callback request The return result is consistent with the data format in the callback request, that is, the embodiment of the present application has a flexible message conversion function.
- the embodiments of the present application can encrypt data, so that data transmission has higher security.
- FIG. 2 is a schematic flowchart of a distributed smart API asynchronous callback method disclosed in the second embodiment of the present application, and the method is executed on the client.
- a distributed smart API asynchronous callback method in the second embodiment of the present application includes:
- the client encapsulates API interface request information.
- the interface request information includes a user ID, an API interface ID, an API interface ID, and a data message format.
- the client encrypts the encapsulated API interface request information according to the preset encryption rule.
- the preset encryption rule can be the RSA encryption algorithm. Because the RSA encryption algorithm is difficult to crack, its confidentiality is recognized in the industry. Although its security has not yet been clearly demonstrated, it is actually used In, there has not been an example of cracking the RSA encryption algorithm, so it has high data security.
- the preset encryption rule may be a Base64 encryption algorithm.
- a distributed smart API asynchronous callback in the second embodiment of the application also include:
- the client sends a public key request and receives the authentication public key.
- the client sends the encrypted API interface request information through POST.
- the client When the client initiates a request, it needs to encapsulate the API interface request information carried on the request protocol.
- the API interface request information includes user identification, API interface identification, API interface identification, and data message format. Among them, optional datagram
- the text format is optional. If you don’t fill in, the data message format defaults to JSON format. Further optionally, in this embodiment of the application, the data message format is a JSON format.
- the client is not limited to APPs, web pages, desktop applications, etc., as long as any platform supports the http transmission protocol, which is not limited in the embodiment of the application.
- a distributed intelligent API asynchronous callback method further includes:
- the client sends the encrypted API interface request information through GET.
- the client receives the callback result.
- the client decrypts the callback result.
- the RSA algorithm is used to decrypt the callback result.
- the embodiment of the application can call API interfaces deployed on different platforms by accessing the general interface, and the embodiment of the application can encrypt the data in the callback request, so the embodiment of the application has high flexibility , Data security.
- FIG. 3 is a schematic structural diagram of a distributed intelligent API asynchronous callback device disclosed in the third embodiment of the present application.
- the intelligent API asynchronous callback device can be used to execute a distributed intelligent API asynchronous callback device disclosed in the first embodiment of this application.
- the smart API asynchronous callback method As shown in Figure 3, the smart API asynchronous callback device includes:
- the first receiving module 301 is configured to receive API interface request information.
- the decryption module 302 is configured to decrypt data of the API interface request information according to a preset decryption rule.
- the decrypted API interface request information includes an API interface identifier, a user identifier, and a data message format.
- the smart API asynchronous callback device also includes:
- the verification module 303 is used to verify the user identity.
- the user identification includes a user identity identification and a user authority identification; and the verification module 303 verifies the user identification specifically as follows:
- the verification module 303 verifies the user identity, more specifically:
- the user identity is compared with the user identity database, if the user identity database contains the user identity, then the user identity verification success information is returned, and if the user identity database does not contain the user identity, the user identity verification failure information is returned.
- the verification module 303 verifies the user authority identifier more specifically:
- the user authority identifier is compared with the user authority database. If the user authority database contains the user authority identifier, the user authority verification success message will be returned; if the user authority database does not contain the user authority identifier, the user authority verification failure message will be returned.
- the user identity database and the user authority database can be any of the relational databases such as mysql, orcal, sqlserver, etc., because mysql is a lightweight database and has more convenient transplantation Therefore, it is convenient to expand and maintain.
- mysql is selected as the user identity database.
- the verification module 303 is further configured to use the authentication key to verify the API interface request information.
- the verification module 303 After the first receiving module 301 receives the API interface request information, the verification module 303 performs data decryption on the API interface request information to parse out the user identification, the API interface identification, the requested data content, and the data message format.
- the smart API asynchronous callback device also includes:
- the screening module 304 is configured to screen out API platforms including the called API interface from a number of API platforms according to the API interface identification and preset screening rules, and the called API interface is the API interface indicated by the API interface identification.
- the smart API asynchronous callback device also includes:
- the interface calling module 305 is used to asynchronously call back the API interface indicated by the API interface identifier based on the API platform including the called API interface.
- the first receiving module is also used to receive a public key request.
- the device further includes a public key generation module 306 and a sending module 307, where:
- the public key generation module 306 is configured to generate an authentication public key and an authentication key according to the public key request;
- the sending module 307 is used to send the authentication public key.
- the device further includes a conversion module 308, which is used to compare the data message format in the API interface request information with the default data message format If the data message format in the PI interface request information is inconsistent with the default data message format, the API interface request information is formatted according to the default data message format.
- a conversion module 308 which is used to compare the data message format in the API interface request information with the default data message format If the data message format in the PI interface request information is inconsistent with the default data message format, the API interface request information is formatted according to the default data message format.
- the server responds to the API interface
- the request information is interpreted by nodes, and the interpretation method is mainly to traverse all the nodes in the data message of the API request information by means of depth-first traversal.
- the node contains multiple values, which is defined as the root node in the example of this application, otherwise it is defined as the child node.
- the process of traversing all nodes in the data message of the API interface request information is:
- JSON data After data conversion is performed on the data requested by the API interface, two JSON data are generated, namely login and content, where content is nested, as shown below:
- the screening module 304 is specifically configured to: filter out the API platform with the least amount of visits from several API platforms according to the API interface identifier.
- the API interface request information further includes business task data; and, the sending module 307 is also used to send a callback result, which is the API interface indicated by the API interface identifier according to the business Task data generation.
- the conversion module 308 is further configured to convert the data format of the callback result according to the data message format in the API interface request information; and, the device further includes an encryption module 309, which encrypts Module 309 is used to:
- the callback result encryption rule can be the RSA encryption algorithm. Because the RSA encryption algorithm is difficult to crack, its confidentiality is recognized in the industry. Although its security has not yet been clearly demonstrated, it is actually used In, there has not been an example of cracking the RSA encryption algorithm, so it has high data security.
- the callback result encryption rule may be a Base64 encryption algorithm
- request result can be determined according to the specific business needs of the caller, and this application does not limit the specific content of the request result.
- the embodiments of the present application can integrate functional modules with the same functions in different platforms based on functional similarity, thereby generating a universal interface open to the outside world, and then when the calling requester needs to call functional modules deployed on different platforms , The calling requester only needs to call the general interface and provide the relevant field identification to complete the API interface call between multiple platforms.
- the embodiment of this application can return the data format according to the data format in the callback request The return result is consistent with the data format in the callback request, that is, the embodiment of the present application has a flexible message conversion function.
- the embodiments of the present application can encrypt data, so that data transmission has higher security.
- FIG. 4 is a schematic structural diagram of the client disclosed in the fourth embodiment of the present application, where the client can be used to execute a distributed intelligent API asynchronous callback method disclosed in the second embodiment of the present application.
- the client includes:
- the encapsulation module 401 is used to encapsulate API interface request information.
- the interface request information includes user identification, API interface identification, and API interface identification, and/or data message format.
- the client When the client initiates a request, it needs to encapsulate the API interface request information carried on the request protocol.
- the API interface request information includes user identification, API interface identification, API interface identification, and data message format. Among them, optional datagram
- the text format is optional. If you don’t fill in, the data message format defaults to JSON format. Further optionally, in this embodiment of the application, the data message format is a JSON format.
- the client is not limited to APPs, web pages, desktop applications, etc., as long as any platform supports the http transmission protocol, which is not limited in the embodiment of the application.
- the client also includes:
- the request information encryption module 402 is configured to encrypt the encapsulated API interface request information according to a preset encryption rule.
- the preset encryption rule can be the RSA encryption algorithm. Because the RSA encryption algorithm is difficult to crack, its confidentiality is recognized in the industry. Although its security has not yet been clearly demonstrated, it is actually used In, there has not been an example of cracking the RSA encryption algorithm, so it has high data security.
- the preset encryption rule may be a Base64 encryption algorithm.
- the client further includes:
- the sending module 403 is used to send encrypted API interface request information through POST.
- the sending module 403 is also used to send a public key request; and, the client further includes a second receiving module 404, and the second receiving module 404 is used to receive the authentication public key .
- the client further includes:
- the monitoring module 405 is used to set a callback to monitor the sending result.
- the second receiving module 404 is further configured to receive the callback result.
- the client further includes:
- the callback result decryption module 406 is used to decrypt the callback result.
- the client sends the encrypted API interface request information through GET.
- the RSA algorithm is used to decrypt the callback result.
- the embodiment of the application can call API interfaces deployed on different platforms by accessing the general interface, and the embodiment of the application can encrypt the data in the callback request, so the embodiment of the application has high flexibility , Data security.
- FIG. 5 is a server disclosed in the fifth embodiment of the present application.
- the server 50 includes:
- At least one storage unit 501 At least one storage unit 501;
- a processing unit 502 coupled with at least one storage unit
- At least one storage unit is used to store computer instructions
- the processing unit is used to call computer instructions to execute the distributed intelligent API asynchronous callback method disclosed in the first aspect of the application.
- the embodiments of this application can integrate functional modules with the same functions in different platforms based on functional similarity, and then generate a universal interface open to the outside world, and then when the calling requester needs to call the functional modules deployed on different platforms, call The requester only needs to call the general interface and provide the relevant field identification to complete the API interface call between multiple platforms.
- the embodiment of the application can return the data format and the callback according to the data format in the callback request. The data format in the request is consistent and the result is returned, that is, the embodiment of the present application has a flexible message conversion function.
- the embodiments of the present application can encrypt data, so that data transmission has higher security.
- the sixth embodiment of the present application discloses a computer-readable storage medium that stores a computer program for electronic data exchange, where the computer program causes the computer to execute the distribution described in any one of the first and second embodiments.
- the steps in the asynchronous callback method of the smart API are described in any one of the first and second embodiments.
- the embodiments of this application can integrate functional modules with the same functions in different platforms based on functional similarity, and then generate a universal interface open to the outside world, and then when the calling requester needs to call the functional modules deployed on different platforms, call The requester only needs to call the general interface and provide the relevant field identification to complete the API interface call between multiple platforms.
- the embodiment of the application can return the data format and the callback according to the data format in the callback request. The data format in the request is consistent and the result is returned, that is, the embodiment of the present application has a flexible message conversion function.
- the embodiments of the present application can encrypt data, so that data transmission has higher security.
- the embodiments of the present application disclose a computer program product.
- the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to make a computer execute any of the first and second embodiments.
- One embodiment describes the steps in the distributed smart API asynchronous callback method.
- the embodiments of this application can integrate functional modules with the same functions in different platforms according to the similarity of functions, and then generate a common interface open to the outside world, and then when the calling requester needs to call the functional modules deployed on different platforms, The requester only needs to call the general interface and provide the relevant field identification to complete the API interface call between multiple platforms.
- the embodiment of the application can return the data format and the callback according to the data format in the callback request. The data format in the request is consistent and the result is returned, that is, the embodiment of the present application has a flexible message conversion function.
- the embodiments of the present application can encrypt data, so that data transmission has higher security.
- the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
- the technical solution of the present application essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other various media that can store program codes.
- the program can be stored in a computer-readable memory, and the memory can include: flash disk , Read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disc, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请涉及监控领域,公开了一种分布式的智能API异步回调方法,包括:服务端接收API接口请求信息;按照预设的解密规则对所述API接口请求信息进行数据解密,解密后的API接口请求信息包括API接口标识、用户标识、数据报文格式;对所述用户标识进行验证;根据所述API接口标识,按照预设筛选规则从若干个API平台中筛选出包括被调用的API接口的API平台,被调用的API接口为API接口标识所指示的API接口;基于所述包括被调用的API接口的API平台,异步回调所述API接口标识所指示的API接口。本申请公开了一种装置、客户端、服务端和存储介质。本申请具有较高的数据安全性、功能搭建灵活性。
Description
本申请要求申请号为201910418187.X,申请日为2019年5月20日,发明创造名称为“分布式的智能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接口请求信息进行加密;
发送模块,用于通过POST方式发送加密后的API接口请求信息;
第二接收模块,用于接收认证公钥;
监听模块,用于设置回调监听发送结果。
本申请第四方面,提供一种服务端,包括:
至少1个存储单元;
与所述至少1个存储单元耦合的处理单元;
其中,所述至少1个存储单元用于存储计算机指令;
所述处理单元用于调用所述计算机指令,以执行本申请第一方面公开的分布式的智能API异步回调方法。
本申请第五方面,提供一种计算机非易失性存储介质,所述计算机非易失性存储介质存储有计算机指令,所述计算机指令被调用时,用于执行本申请第一方面公开的分布式的智能API异步回调方法。
可见,本申请能够异步回调分布式设置的API接口,以调用分布式设置的API接口所提供的功能,进而实现快速功能模块的快速搭建,同时本申请能够对请求数据及API接口返回的数据进行加密,进而实现数据传输安全性较高。
图1是本申请实施例一公开的一种分布式的智能API异步回调方法的流程示意图;
图2是本申请实施例二公开的一种分布式的智能API异步回调方法的流程示意图;
图3是本申请实施例三公开的一种分布式的智能API异步回调装置的结构示意图;
图4是本申请实施例四公开的一种分布式的智能API异步回调装置的结构示意图。
图5是本申请公开的一种分布式的智能API异步回调装置的结构示意图。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、装置、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
面对急速变化的市场环境,通常企业会通过改变业务流程以适应这种市场环境,由于企业的业务流程管理依赖管理系统来实现,进而企业经常对管理系统的功能进行重新搭建,但是,在重新搭建管理系统的功能的过程中,我们发现,在现有技术中,重新搭建管理系统功能的方式通常是重写一个功能模块,且重写后的功能模块与管理系统中原有的其他模块依赖度高,解耦度不高,进而导致管理系统的功能搭建不够灵活、搭建周期长、搭建成本高。针对这种场景,本申请公开了一种分布式的智能API异步回调方法及装置。
下面结合本申请的具体实施例对本申请的一种分布式的智能API异步回调方法及装置进行详细说明。
实施例一
请参阅图1,图1是本申请实施例一公开的一种分布式的智能API异步回调方法的流程示意图,该方法在服务端执行。如图1所示,本申请实施例一的一种分布式的智能API异步回调方法包括:
101、服务端接收API接口请求信息。
作为一种可选的实施方式,在本申请实施例中,服务端在收到请求端发出的API接口请求信息之前,本申请实施例的分布式的智能API异步回调方法还包括:
服务端接收公钥请求,生成认证公钥和认证密钥;
服务端发送认证公钥。
102、服务端按照预设的解密规则对API接口请求信息进行数据解密。
服务端接收到API接口请求信息后,对API接口请求信息进行数据解密,以解析出包含用户标识,及API接口标识,及请求数据内容,及数据 报文格式。
作为一种可选的实施方式,在本申请实施例中,服务端使用认证密钥对API接口请求信息进行验证。
在本申请实施例中,可选的,服务端将API接口请求信息中的数据报文格式与服务端默认设定的数据报文格式进行比对,若API接口请求信息中的数据报文格式与服务端默认设定的数据报文格式不一致,则服务端按照服务端默认设定的数据报文格式对API接口请求信息进行格式转换。
示例性地,若API接口请求信息的数据报文格式为XML格式,服务端默认设定的数据报文格式为JSON数据格式,经服务端比对,两者不一致,则服务端对API接口请求信息进行结点解读,解读方式主要为通过深度优先遍历的方式遍历API接口请求信息的数据报文中所有的节点。在此,结点下包含多个数值,本申请实例定义为根节点,否则定义为子节点。
在本申请实施例中,遍历API接口请求信息的数据报文中所有的节点的过程为:
以根-节点-节点、或者根-节点-根-节点再到下一个根-节点-节点的方式遍历所有的节点,直到最后一个节点,结束遍历过程。
在本申请实施例中,遍历API接口请求信息的数据报文所有的节点的同时,进行API接口请求信息的数据转换,以将API接口请求信息以名为一个JSON数据表示。例如,假设一个API接口请求信息的数据报文为:
对API接口请求信息的数据进行数据转换后,生成两个JSON数据,即login和content,其中content中存在嵌套,如下所示:
login{userId:test;password:test123};
content{data:{extdata:1;welcome:test}}。
103、服务端对用户标识进行验证,用户标识为服务端按照预设的解密规则对API接口请求信息进行数据解密后获得的数据内容中获取。
在本申请实施例中,可选的,用户标识包括用户身份标识及用户权限标识。
相对应地,服务端对用户标识进行验证可以包括:
服务端对用户身份标识进行验证;
服务端对用户权限标识进行验证。
在本申请实施例中,进一步可选的,服务端对用户身份标识进行验证可以包括:
将用户身份标识与用户身份数据库进行比对,若用户身份数据库包含用户身份标识,则服务端返回用户身份验证成功信息,若用户身份数据库不包含用户身份标识,则服务端返回用户身份验证失败信息,使得当用户终端接收到用户身份验证失败信息重新提交API接口请求信息。
在本申请实施例中,进一步可选的,服务端对用户权限标识进行验证可以包括:
将用户权限标识与用户权限数据库进行比对,若用户权限数据库包含用户权限标识,则服务端返回用户权限验证成功信息,若用户权限数据库不包含用户权限标识,则服务端返回用户权限验证失败信息。
在本申请实施例中,进一步可选的,用户身份数据库及用户权限数据库可以是mysql,orcal,sqlserver等关系型数据库中的任意一种,由于mysql为轻量级数据库,且具备更便利的移植性,从而便于扩展和维护,本申请实施例选择mysql作为用户身份数据库。
104、服务端根据API接口标识,按照预设筛选规则从若干个API平台中筛选出包括被调用的API接口的API平台,被调用的API接口为API接口标识所指示的API接口。
在本申请实施例中,可选的,服务端根据API接口标识,按照预设筛选规则从若干个API平台中筛选出包括被调用的API接口的API平台包括:
服务端根据API接口标识,从若干个API平台中筛选出当前访问量最小的API平台。
105、基于包括被调用的API接口的API平台,服务端异步回调API接口标识所指示的API接口。
在本申请实施例中,可选的,按照预设的数据格式返回请求结果。例如,按照JSON格式返回请求结果。
在本申请实施例中,可选的,按照预设的数据格式返回请求结果中的预设的数据格式可以下步骤确定:
在本申请实施例中,可选的,API接口请求信息还包括业务任务数据,以及,基于包括被调用的API接口的API平台,服务端异步回调API接口标识所指示的API接口之后,方法还包括:
发送回调结果,回调结果为API接口标识所指示的API接口根据业务任务数据生成。
在本申请实施例中,可选的,服务端发送回调结果之前,方法还包括:
服务端按照API接口请求信息中的数据报文格式对回调结果进行数据格式转换;
服务端按照回调结果加密规则对回调结果进行加密。
在本申请实施例中,可选的,回调结果加密规则可以是RSA加密算法,因RSA加密算法破解困难,其保密性是得到业界公认的,虽然其安全性尚 未有明确的论证,但实际运用中,尚未有破解RSA加密算法的示例发生,故其具有较高的数据安全性。
在本申请实施例中,可选的,回调结果加密规则可以是Base64加密算法
需要说明的是,请求结果可以根据调用方的具体业务需求确定,本申请对请求结果的具体内容不作限定。
可见,本申请实施例能够根据功能相似性,将不同平台中具有相同功能的功能模块进行整合,进而生成一个对外开放的通用接口,进而当调用请求方需要调用部署在不同平台上的功能模块时,调用请求方只需调用该通用接口,并提供相关的字段标识,即可完成多平台之间的API接口调用,另一方面,本申请实施例能够根据回调请求中的数据格式,返回数据格式与回调请求中的数据格式一致的回掉结果,即本申请实施例具有灵活的报文转换功能。再一方面,本申请实施例能够对数据进行加密,使得数据的传输具有较高的安全性。
实施例二
请参阅图2,图2是本申请实施例二公开的一种分布式的智能API异步回调方法的流程示意图,该方法在客户端执行。如图2所示,本申请实施例二的一种分布式的智能API异步回调方法包括:
201、客户端封装API接口请求信息,接口请求信息中包含用户标识,和API接口标识,和API接口标识,和数据报文格式。
202、客户端按照预设加密规则对封装后的API接口请求信息进行加密。
在本申请实施例中,可选的,预设加密规则可以是RSA加密算法,因RSA加密算法破解困难,其保密性是得到业界公认的,虽然其安全性尚未有明确的论证,但实际运用中,尚未有破解RSA加密算法的示例发生,故其具有较高的数据安全性。
在本申请实施例中,可选的,预设加密规则可以是Base64加密算法。
作为一种可选的实施方式,在本申请实施例中,客户端按照预设加密规则对封装后的API接口请求信息进行加密之前,本申请实施例二的一种分布式的智能API异步回调方法还包括:
客户端发送公钥请求并接收认证公钥。
203、客户端通过POST方式发送加密后的API接口请求信息。
客户端在发起请求时,需要封装承载在请求协议上的API接口请求信息,该API接口请求信息包含用户标识、API接口标识、API接口标识、数据报文格式,其中,可选的,数据报文格式为可选的,如不填写,则数据报文格式默认为JSON格式。进一步可选,在本申请实施例中,数据报文格式为JSON格式。
需要说明的是,客户端不局限于APP、网页、桌面运用等,只要支持http传输协议的任何平台都可以,本申请实施例对此不作限定。
需要说明的是,关于POST请求方式和GET请求方式请参考现有技术中的描述,本申请实施例对此不在赘述。
在本申请实施例中,可选的,客户端通过POST方式发送加密后的API接口请求信息之后,一种分布式的智能API异步回调方法还包括:
设置回调监听发送结果。
在本申请实施例中,可选的,客户端通过GET方式发送加密后的API接口请求信息。
204、客户端接收回调结果。
在本申请实施例中,可选的,客户端接收回调结果之后,客户端对回调结果进行解密。
在本申请实施例中,可选的,采用RSA算法对回调结果进行解密。
可见,本申请实施例,通过访问通用接口,即可调用部署在不同平台上的API接口,且本申请实施例能够对回调请求中的数据进行加密,故本申请实施例具有较高的灵活性、数据安全性。
实施例三
请参阅图3,图3是本申请实施例三公开的一种分布式的智能API异步回调装置的结构示意图,其中,该智能API异步回调装置可用于执行本申请实施一公开的一种分布式的智能API异步回调方法。如图3所示,该智能API异步回调装置包括:
第一接收模块301,用于接收API接口请求信息。
解密模块302,用于按照预设的解密规则对API接口请求信息进行数据解密,解密后的API接口请求信息包括API接口标识、用户标识、数据报文格式。
该智能API异步回调装置还包括:
验证模块303,用于对用户标识进行验证。
作为一个可选的实施方式,在本申请实施例中,用户标识包括用户身份标识及用户权限标识;以及,验证模块303对用户标识进行验证具体为:
对用户身份标识进行验证;
对用户权限标识进行验证。
在本申请实施例中,可选的,验证模块303对用户身份标识进行验证更具体为:
将用户身份标识与用户身份数据库进行比对,若用户身份数据库包含用户身份标识,则返回用户身份验证成功信息,若用户身份数据库不包含用户身份标识,则返回用户身份验证失败信息。
在本申请实施例中,可选的,验证模块303对对用户权限标识进行验证更具体为:
将用户权限标识与用户权限数据库进行比对,若用户权限数据库包含用户权限标识,则返回用户权限验证成功信息,若用户权限数据库不包含 用户权限标识,则返回用户权限验证失败信息。
在本申请实施例中,进一步可选的,用户身份数据库及用户权限数据库可以是mysql,orcal,sqlserver等关系型数据库中的任意一种,由于mysql为轻量级数据库,且具备更便利的移植性,从而便于扩展和维护,本申请实施例选择mysql作为用户身份数据库。
作为一个可选的实施方式,在本申请实施例中,验证模块303还用于使用认证密钥对API接口请求信息进行验证。
在第一接收模块301接收到API接口请求信息之后,验证模块303对API接口请求信息进行数据解密,以解析出包含用户标识,及API接口标识,及请求数据内容,及数据报文格式。
该智能API异步回调装置还包括:
筛选模块304,用于根据API接口标识,按照预设筛选规则从若干个API平台中筛选出包括被调用的API接口的API平台,被调用的API接口为API接口标识所指示的API接口。
该智能API异步回调装置还包括:
接口调用模块305,用于基于包括被调用的API接口的API平台,异步回调API接口标识所指示的API接口。
作为一个可选的实施方式,在本申请实施例中,第一接收模块还用于接收公钥请求,进一步的,装置还包括公钥密钥生成模块306和发送模块307,其中,
公钥密钥生成模块306,用于根据公钥请求生成认证公钥和认证密钥;
发送模块307,用于发送认证公钥。
作为一个可选的实施方式,在本申请实施例中,装置还包括转换模块308,转换模块308用于将API接口请求信息中的数据报文格式与默认设定的数据报文格式进行比对,若PI接口请求信息中的数据报文格式与默认设定的数据报文格式不一致,则按照默认设定的数据报文格式对API接口请求信息进行格式转换。
示例性地,若API接口请求信息的数据报文格式为XML格式,服务端默认设定的数据报文格式为JSON数据格式,经转换模块308比对,两者不一致,则服务端对API接口请求信息进行结点解读,解读方式主要为通过深度优先遍历的方式遍历API接口请求信息的数据报文中所有的节点。在此,结点下包含多个数值,本申请实例定义为根节点,否则定义为子节点。
在本申请实施例中,遍历API接口请求信息的数据报文中所有的节点的过程为:
以根-节点-节点、或者根-节点-根-节点再到下一个根-节点-节点的方式遍历所有的节点,直到最后一个节点,结束遍历过程。
在本申请实施例中,遍历API接口请求信息的数据报文所有的节点的同时,进行API接口请求信息的数据转换,以将API接口请求信息以名为一个JSON数据表示。例如,假设一个API接口请求信息的数据报文为:
对API接口请求信息的数据进行数据转换后,生成两个JSON数据,即login和content,其中content中存在嵌套,如下所示:
login{userId:test;password:test123};
content{data:{extdata:1;welcome:test}}。
作为一个可选的实施方式,在本申请实施例中,筛选模块304具体用于:根据API接口标识,从若干个API平台中筛选出当前访问量最小的API平台。
作为一个可选的实施方式,在本申请实施例中,API接口请求信息还包括业务任务数据;以及,发送模块307还用于发送回调结果,回调结果为API接口标识所指示的API接口根据业务任务数据生成。
作为一个可选的实施方式,在本申请实施例中,转换模块308还用于按照API接口请求信息中的数据报文格式对回调结果进行数据格式转换;以及,装置还包括加密模块309,加密模块309用于:
按照回调结果加密规则对回调结果进行加密。
在本申请实施例中,可选的,回调结果加密规则可以是RSA加密算法,因RSA加密算法破解困难,其保密性是得到业界公认的,虽然其安全性尚未有明确的论证,但实际运用中,尚未有破解RSA加密算法的示例发生,故其具有较高的数据安全性。
在本申请实施例中,可选的,回调结果加密规则可以是Base64加密算法
需要说明的是,请求结果可以根据调用方的具体业务需求确定,本申请对请求结果的具体内容不作限定。
可见,本申请实施例能够根据功能相似性,将不同平台中具有相同功能的功能模块进行整合,进而生成一个对外开放的通用接口,进而当调用请求方需要调用部署在不同平台上的功能模块时,调用请求方只需调用该通用接口,并提供相关的字段标识,即可完成多平台之间的API接口调用,另一方面,本申请实施例能够根据回调请求中的数据格式,返回数据格式与回调请求中的数据格式一致的回掉结果,即本申请实施例具有灵活的报文转换功能。再一方面,本申请实施例能够对数据进行加密,使得数据的传输具有较高的安全性。
实施例四
请参阅图4,图4是本申请实施例四公开的客户端的结构示意图,其中,该客户端可以用于执行本申请实施例二公开的一种分布式的智能API异步回调方法。如图4所示,该客户端包括:
封装模块401,用于封装API接口请求信息,接口请求信息中包含用户标识,和API接口标识,和API接口标识,和/或数据报文格式。
客户端在发起请求时,需要封装承载在请求协议上的API接口请求信息,该API接口请求信息包含用户标识、API接口标识、API接口标识、数据报文格式,其中,可选的,数据报文格式为可选的,如不填写,则数据报文格式默认为JSON格式。进一步可选,在本申请实施例中,数据报文格式为JSON格式。
需要说明的是,客户端不局限于APP、网页、桌面运用等,只要支持http传输协议的任何平台都可以,本申请实施例对此不作限定。
需要说明的是,关于POST请求方式和GET请求方式请参考现有技术中的描述,本申请实施例对此不在赘述
该客户端还包括:
请求信息加密模块402,用于按照预设加密规则对封装后的API接口请求信息进行加密。
在本申请实施例中,可选的,预设加密规则可以是RSA加密算法,因RSA加密算法破解困难,其保密性是得到业界公认的,虽然其安全性尚未有明确的论证,但实际运用中,尚未有破解RSA加密算法的示例发生,故其具有较高的数据安全性。
在本申请实施例中,可选的,预设加密规则可以是Base64加密算法。
作为一种可选的实施方式,在本申请实施例中,客户端还包括:
发送模块403,用于通过POST方式发送加密后的API接口请求信息。
作为一种可选的实施方式,在本申请实施例中,发送模块403还用于发送公钥请求;以及,客户端还包括第二接收模块404,第二接收模块404用于接收认证公钥。
在本申请实施例中,可选的,客户端还包括:
监听模块405,用于设置回调监听发送结果。
在本申请实施例中,可选的,第二接收模块404还用于接收回调结果。
在本申请实施例中,可选的,客户端还包括:
回调结果解密模块406,用于对回调结果进行解密。
在本申请实施例中,可选的,客户端通过GET方式发送加密后的API接口请求信息。
在本申请实施例中,可选的,采用RSA算法对回调结果进行解密。
可见,本申请实施例,通过访问通用接口,即可调用部署在不同平台上的API接口,且本申请实施例能够对回调请求中的数据进行加密,故本 申请实施例具有较高的灵活性、数据安全性。
实施例五
请参阅图5,图5是本申请实施例五公开的一种服务端。如图5所示,服务端50包括:
至少1个存储单元501;
与至少1个存储单元耦合的处理单元502;
其中,至少1个存储单元用于存储计算机指令;
处理单元用于调用计算机指令,以执行本申请第一方面公开的分布式的智能API异步回调方法。
本申请实施例能够根据功能相似性,将不同平台中具有相同功能的功能模块进行整合,进而生成一个对外开放的通用接口,进而当调用请求方需要调用部署在不同平台上的功能模块时,调用请求方只需调用该通用接口,并提供相关的字段标识,即可完成多平台之间的API接口调用,另一方面,本申请实施例能够根据回调请求中的数据格式,返回数据格式与回调请求中的数据格式一致的回掉结果,即本申请实施例具有灵活的报文转换功能。再一方面,本申请实施例能够对数据进行加密,使得数据的传输具有较高的安全性。
实施例六
本申请实施例六公开了一种计算机可读存储介质,其存储用于电子数据交换的计算机程序,其中,该计算机程序使得计算机执行实施例一、实施例二中任意一个实施例所描述的分布式的智能API异步回调方法中的步骤。
本申请实施例能够根据功能相似性,将不同平台中具有相同功能的功能模块进行整合,进而生成一个对外开放的通用接口,进而当调用请求方需要调用部署在不同平台上的功能模块时,调用请求方只需调用该通用接口,并提供相关的字段标识,即可完成多平台之间的API接口调用,另一方面,本申请实施例能够根据回调请求中的数据格式,返回数据格式与回调请求中的数据格式一致的回掉结果,即本申请实施例具有灵活的报文转换功能。再一方面,本申请实施例能够对数据进行加密,使得数据的传输具有较高的安全性。
实施例七
本申请实施例公开了一种计算机程序产品,该计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,且该计算机程序可操作来使计算机执行实施例一、实施例二中任意一个实施例所描述的分布式的智能API异步回调方法中的步骤。
本申请实施例能够根据功能相似性,将不同平台中具有相同功能的功 能模块进行整合,进而生成一个对外开放的通用接口,进而当调用请求方需要调用部署在不同平台上的功能模块时,调用请求方只需调用该通用接口,并提供相关的字段标识,即可完成多平台之间的API接口调用,另一方面,本申请实施例能够根据回调请求中的数据格式,返回数据格式与回调请求中的数据格式一致的回掉结果,即本申请实施例具有灵活的报文转换功能。再一方面,本申请实施例能够对数据进行加密,使得数据的传输具有较高的安全性。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务端或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (20)
- 一种分布式的智能API异步回调方法,应用于服务端,其特征在于,所述方法执行以下步骤:步骤101,接收API接口请求信息;步骤102,按照预设的解密规则对所述API接口请求信息进行数据解密,解密后的API接口请求信息包括API接口标识、用户标识和数据报文格式;步骤103,对所述用户标识进行验证;步骤104,根据所述API接口标识,按照预设筛选规则从多个API平台中筛选出包括被调用的API接口的API平台,被调用的API接口为API接口标识所指示的API接口;步骤105,基于所述包括被调用的API接口的API平台,异步回调所述API接口标识所指示的API接口。
- 如权利要求1所述的分布式的智能API异步回调方法,其特征在于,所述步骤101之前,所述方法还包括:接收公钥请求,并根据所述公钥请求生成认证公钥和认证密钥;发送所述认证公钥。
- 如权利要求2所述的分布式的智能API异步回调方法,其特征在于,在所述步骤101与所述步骤102之间,所述方法还包括:使用所述认证密钥对所述API接口请求信息进行验证。
- 如权利要求1所述的分布式的智能API异步回调方法,其特征在于,在步骤102和步骤103之间,所述方法还包括:将所述API接口请求信息中的所述数据报文格式与服务端默认设定的数据报文格式进行比对;若所述API接口请求信息中的所述数据报文格式与默认设定的数据报文格式不一致,则按照默认设定的数据报文格式对所述API接口请求信息进行格式转换。
- 如权利要求1所述的分布式的智能API异步回调方法,其特征在于,根据所述API接口标识,按照所述预设筛选规则从所述多个API平台中筛选出所述包括被调用的API接口的API平台包括:根据所述API接口标识,从所述多个个API平台中筛选出当前访问量最小的API平台。
- 如权利要求1所述的分布式的智能API异步回调方法,其特征在于,所述API接口请求信息还包括业务任务数据;以及,所述基于所述包括被调用的API接口的API平台,异步回调所述API接口标识所指示的API接口之后,所述方法还包括:发送回调结果,所述回调结果为所述API接口标识所指示的API接口根据所述业务任务数据生成。
- 如权利要求6所述的分布式的智能API异步回调方法,其特征在于,所述发送回调结果之前,所述方法还包括:按照所述API接口请求信息中的所述数据报文格式对所述回调结果进行数据格式转换;按照回调结果加密规则对所述回调结果进行加密。
- 一种分布式的智能API异步回调装置,其特征在于,包括:第一接收模块,接收API接口请求信息;解密模块,按照预设的解密规则对所述API接口请求信息进行数据解密,解密后的API接口请求信息包括API接口标识、用户标识和数据报文格式;验证模块,对所述用户标识进行验证;筛选模块,根据所述API接口标识,按照预设筛选规则从多个API平台中筛选出包括被调用的API接口的API平台,被调用的API接口为API接口标识所指示的API接口;接口调用模块,基于所述包括被调用的API接口的API平台,异步回调所述API接口标识所指示的API接口。
- 如权利要求8所述的分布式的智能API异步回调装置,其特征在于,还包括:公钥密钥生成模块,用于根据公钥请求生成认证公钥和认证密钥;发送模块,用于发送认证公钥。
- 如权利要求9所述的分布式的智能API异步回调装置,其特征在于,所述验证模块使用所述认证密钥对所述API接口请求信息进行验证。
- 如权利要求8所述的分布式的智能API异步回调装置,其特征在于,还包括:转换模块,将所述API接口请求信息中的所述数据报文格式与服务端默认设定的数据报文格式进行比对,若所述API接口请求信息中的所述数据报文格式与默认设定的数据报文格式不一致,则按照默认设定的数据报文格式对所述API接口请求信息进行格式转换。
- 如权利要求8所述的分布式的智能API异步回调装置,其特征在于,所述筛选模块根据所述API接口标识,从所述多个API平台中筛选出当前访问量最小的API平台。
- 如权利要求9所述的分布式的智能API异步回调装置,其特征在于,所述第一接收模块接收API接口请求信息还包括业务任务数据,所述发送模块发送回调结果,所述回调结果为所述API接口标识所指示的API接口根据所述业务任务数据生成。
- 如权利要求11所述的分布式的智能API异步回调装置,其特征在于,所述转换模块按照所述API接口请求信息中的所述数据报文格式对所述回调结果进行数据格式转换。
- 如权利要求14所述的分布式的智能API异步回调装置,其特征 在于,还包括加密模块,按照回调结果加密规则对所述回调结果进行加密。
- 一种客户端,其特征在于,包括:封装模块,用于封装API接口请求信息,接口请求信息中包含用户标识,和API接口标识,和API接口标识,和/或数据报文格式;请求信息加密模块,用于按照预设加密规则对封装后的API接口请求信息进行加密;发送模块,用于通过POST方式发送加密后的API接口请求信息;第二接收模块,用于接收认证公钥;监听模块,用于设置回调监听发送结果。
- 根据权利要求16所述的客户端,其特征在于,还包括:回调结果解密模块,用于对回调结果进行解密。
- 一种服务端,其特征在于,包括:至少1个存储单元;与所述至少1个存储单元耦合的处理单元;其中,所述至少1个存储单元用于存储计算机指令;所述处理单元用于调用所述计算机指令,以执行以下步骤:步骤101,接收API接口请求信息;步骤102,按照预设的解密规则对所述API接口请求信息进行数据解密,解密后的API接口请求信息包括API接口标识、用户标识和数据报文格式;步骤103,对所述用户标识进行验证;步骤104,根据所述API接口标识,按照预设筛选规则从多个API平台中筛选出包括被调用的API接口的API平台,被调用的API接口为API接口标识所指示的API接口;步骤105,基于所述包括被调用的API接口的API平台,异步回调所述API接口标识所指示的API接口。
- 如权利要求18所述的服务端,其特征在于,所述处理单元用于调用所述计算机指令,以执行以下步骤:在按照所述预设的解密规则对所述API接口请求信息进行数据解密与对所述用户标识进行验证之间,所述步骤还包括:将所述API接口请求信息中的所述数据报文格式与服务端默认设定的数据报文格式进行比对;若所述PI接口请求信息中的所述数据报文格式与默认设定的数据报文格式不一致,则按照默认设定的数据报文格式对所述API接口请求信息进行格式转换。
- 一种计算机非易失性存储介质,其特征在于,所述计算机非易失性存储介质存储有计算机指令,所述计算机指令被调用时,用于执行权利要求1-7任一项所述的分布式的智能API异步回调方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910418187.X | 2019-05-20 | ||
| CN201910418187.XA CN110287037B (zh) | 2019-05-20 | 2019-05-20 | 分布式的智能api异步回调方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020233012A1 true WO2020233012A1 (zh) | 2020-11-26 |
Family
ID=68002360
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/117893 Ceased WO2020233012A1 (zh) | 2019-05-20 | 2019-11-13 | 分布式的智能api异步回调方法、装置、客户端、服务端及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110287037B (zh) |
| WO (1) | WO2020233012A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113010372A (zh) * | 2020-12-08 | 2021-06-22 | 云智慧(北京)科技有限公司 | 一种api监控的分布式实现方法和系统 |
| CN113609366A (zh) * | 2021-08-04 | 2021-11-05 | 深圳市元征科技股份有限公司 | 数据获取方法、装置、终端设备及可读存储介质 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110287037B (zh) * | 2019-05-20 | 2023-11-03 | 平安科技(深圳)有限公司 | 分布式的智能api异步回调方法及装置 |
| CN112272211A (zh) * | 2020-09-29 | 2021-01-26 | 京东数字科技控股股份有限公司 | 业务请求处理方法、装置及系统 |
| CN112667371B (zh) * | 2020-12-07 | 2024-07-23 | 深圳市远行科技股份有限公司 | 异步任务的处理方法、装置、设备及存储介质 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102792269A (zh) * | 2010-03-12 | 2012-11-21 | 微软公司 | 用于经由web服务提供信息来作为服务的系统和方法 |
| US20140165199A1 (en) * | 2012-07-16 | 2014-06-12 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for determining malicious program |
| CN106101258A (zh) * | 2016-07-08 | 2016-11-09 | 腾讯科技(深圳)有限公司 | 一种混合云的接口调用方法、装置及系统 |
| CN107291567A (zh) * | 2017-06-20 | 2017-10-24 | 山东浪潮通软信息科技有限公司 | 一种数据调用方法、装置以及系统 |
| CN108830099A (zh) * | 2018-05-04 | 2018-11-16 | 平安科技(深圳)有限公司 | 调用api接口的验证方法、装置、计算机设备和存储介质 |
| CN108881448A (zh) * | 2018-06-27 | 2018-11-23 | 杭州贝购科技有限公司 | Api请求的处理方法及装置 |
| CN109391689A (zh) * | 2018-10-08 | 2019-02-26 | 郑州云海信息技术有限公司 | 一种微服务应用程序编程接口调用的方法及装置 |
| CN110287037A (zh) * | 2019-05-20 | 2019-09-27 | 平安科技(深圳)有限公司 | 分布式的智能api异步回调方法及装置 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100442897C (zh) * | 2006-08-28 | 2008-12-10 | 华为技术有限公司 | 终端与服务器通信的方法、系统和装置 |
| CN101616136B (zh) * | 2008-06-26 | 2013-05-01 | 阿里巴巴集团控股有限公司 | 一种提供互联网服务的方法及服务集成平台系统 |
| CN103220259B (zh) * | 2012-01-20 | 2016-06-08 | 华为技术有限公司 | Oauth API的使用、调用方法、设备及系统 |
| US10540190B2 (en) * | 2017-03-21 | 2020-01-21 | International Business Machines Corporation | Generic connector module capable of integrating multiple applications into an integration platform |
| US10873587B2 (en) * | 2017-03-27 | 2020-12-22 | Oracle Systems Corporation | Authenticating access configuration for application programming interfaces |
| CN107395648A (zh) * | 2017-09-06 | 2017-11-24 | 深圳峰创智诚科技有限公司 | 权限控制方法及服务端 |
-
2019
- 2019-05-20 CN CN201910418187.XA patent/CN110287037B/zh active Active
- 2019-11-13 WO PCT/CN2019/117893 patent/WO2020233012A1/zh not_active Ceased
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102792269A (zh) * | 2010-03-12 | 2012-11-21 | 微软公司 | 用于经由web服务提供信息来作为服务的系统和方法 |
| US20140165199A1 (en) * | 2012-07-16 | 2014-06-12 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for determining malicious program |
| CN106101258A (zh) * | 2016-07-08 | 2016-11-09 | 腾讯科技(深圳)有限公司 | 一种混合云的接口调用方法、装置及系统 |
| CN107291567A (zh) * | 2017-06-20 | 2017-10-24 | 山东浪潮通软信息科技有限公司 | 一种数据调用方法、装置以及系统 |
| CN108830099A (zh) * | 2018-05-04 | 2018-11-16 | 平安科技(深圳)有限公司 | 调用api接口的验证方法、装置、计算机设备和存储介质 |
| CN108881448A (zh) * | 2018-06-27 | 2018-11-23 | 杭州贝购科技有限公司 | Api请求的处理方法及装置 |
| CN109391689A (zh) * | 2018-10-08 | 2019-02-26 | 郑州云海信息技术有限公司 | 一种微服务应用程序编程接口调用的方法及装置 |
| CN110287037A (zh) * | 2019-05-20 | 2019-09-27 | 平安科技(深圳)有限公司 | 分布式的智能api异步回调方法及装置 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113010372A (zh) * | 2020-12-08 | 2021-06-22 | 云智慧(北京)科技有限公司 | 一种api监控的分布式实现方法和系统 |
| CN113609366A (zh) * | 2021-08-04 | 2021-11-05 | 深圳市元征科技股份有限公司 | 数据获取方法、装置、终端设备及可读存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110287037A (zh) | 2019-09-27 |
| CN110287037B (zh) | 2023-11-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20220278962A1 (en) | Generating and linking private transaction identifiers to distributed data repositories | |
| WO2020233012A1 (zh) | 分布式的智能api异步回调方法、装置、客户端、服务端及存储介质 | |
| US9871662B2 (en) | Systems and methods for digital certificate and encryption key management | |
| US20190306148A1 (en) | Method for oauth service through blockchain network, and terminal and server using the same | |
| US11296881B2 (en) | Using IP heuristics to protect access tokens from theft and replay | |
| JP5711840B1 (ja) | リレーショナルデータベースを内在するカーネルプログラム、方法及び装置 | |
| US11388147B2 (en) | System and method for redirecting data access to local trust managers via an indirection logic service | |
| US9906518B2 (en) | Managing exchanges of sensitive data | |
| CN113094334B (zh) | 基于分布式存储的数字服务方法、装置、设备及储存介质 | |
| CN110009349A (zh) | 区块链中生成和验证可链接环签名的方法及装置 | |
| CN114422258A (zh) | 一种基于多认证协议的单点登录方法、介质及电子设备 | |
| CN114417344B (zh) | 资源安全集成平台 | |
| WO2020215685A1 (zh) | 基于区块链的信息处理、获取方法、装置、设备及介质 | |
| CN111737232A (zh) | 数据库管理方法、系统、装置、设备及计算机存储介质 | |
| CN115603958B (zh) | 登陆数据处理方法、装置、计算机设备和存储介质 | |
| CN116305213A (zh) | 实现第三方系统安全对接的方法及对接平台 | |
| JP2025175059A (ja) | コネクテッドtvアプリケーション及びオーバ・ザ・トップ・アプリケーションのためのプライバシ・マネージャ | |
| CN119519980B (zh) | 身份认证方法和系统 | |
| CN111817860B (zh) | 一种通信认证方法、装置、设备及存储介质 | |
| CN111404680B (zh) | 口令管理方法和装置 | |
| CN112905990A (zh) | 一种访问方法、客户端、服务端及访问系统 | |
| CN114428967B (zh) | 数据传输方法、装置、设备以及存储介质 | |
| CN110740139A (zh) | 一种秘钥装置及秘钥管理方法、系统、设备、计算机介质 | |
| CN117081782A (zh) | 网络接入方法、系统、计算机设备及存储介质 | |
| US10554789B2 (en) | Key based authorization for programmatic clients |
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: 19929649 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19929649 Country of ref document: EP Kind code of ref document: A1 |

