A third-party service access method, device, equipment and medium

Through low-code platform and microservice architecture, non-hard-coded access to third-party services in the financial risk control field is achieved, solving the problems of high cost and long cycle of traditional access methods, and achieving the effect of quickly responding to business needs and reducing development costs. .

CN115941772BActive Publication Date: 2024-11-05PING AN INT FINANCIAL LEASING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211387265.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2024-11-05
Estimated Expiration
2042-11-07

AI Technical Summary

Technical Problem

In the field of financial risk control, traditional third-party service access methods require hard code, resulting in high development costs and long development and launch cycles, making it difficult to quickly respond to business needs.

Method used

Adopting a low-code platform and microservice architecture, through a pre-built HTTP service and service registration center, non-hard coded access to third-party services is achieved, request information is obtained and configured, and third-party service data is directly called, supporting load balancing and domain name resolution. , generate load balancing strategies to reduce development costs and online cycles.

Benefits of technology

No professional developers are required to achieve third-party service access, reduce development costs, quickly respond to business needs, realize system hot deployment, and reduce system development and online cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115941772B_ABST
    Figure CN115941772B_ABST
Patent Text Reader

Abstract

The present invention relates to the fields of computer technology and digital finance, and discloses a third-party service access method, device, equipment and medium, the method comprising: obtaining the address information, service name, and business demand information of the target third-party service; configuring the service configuration items corresponding to the pre-built target HTTP service according to the address information, service name and business demand information of the target third-party service, and obtaining request information; transmitting the request information to the target HTTP service, and calling the data in the target third-party service according to the request information through the target HTTP service. This application is based on low-code and microservice architecture, configures the service configuration items, and does not require professional developers to perform hard development of third-party service access, thereby reducing development costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer technology and digital finance, and in particular to a third-party service access method, device, equipment and medium. Background Art

[0002] The core of finance is risk control, which is to solve the problem of information asymmetry and assess customer credit risk; the core of risk control is data, especially in the current quantitative risk control model, risk control data is particularly important. In the intelligent decision-making link in the field of financial risk control, in order to deal with risks in an all-round way, it is often necessary to call on data services provided by third-party institutions, such as identity verification data, list data, user behavior data, credit score data, customer portrait data, etc.

[0003] However, as more and more risk data access channels are available, the development costs associated with third-party service calls are increasing. Traditional third-party service access requires hard coding, and non-developers cannot access third-party services; the development and launch cycle is too long, making it difficult to quickly respond to third-party data service access needs. Therefore, how to enable non-developers to access third-party data services without hard coding, and how to reduce the system development and launch cycle to quickly respond to business access needs, are a series of problems that need to be solved urgently. Summary of the invention

[0004] In view of the above problems existing in the prior art, the present invention proposes a third-party service access method, device, equipment and medium to solve the problem of how to achieve non-hard-coded access to third-party data services by non-developers and how to reduce the system development and launch cycle to quickly respond to business access needs.

[0005] In order to achieve the above purpose and other purposes, the technical solution adopted by the present invention is as follows.

[0006] In one embodiment of the present application, a third-party service access method is provided, the method comprising the following steps:

[0007] Obtain the address information, service name, and business demand information issued by the user of the target third-party service;

[0008] According to the address information, service name and business requirement information of the target third-party service, information configuration is performed on the service configuration item corresponding to the pre-built target HTTP service to obtain request information;

[0009] The request information is transmitted to the target HTTP service, and the data in the target third-party service is called according to the request information through the target HTTP service.

[0010] In one embodiment of the present application, before obtaining the address information and service name of the target third-party service, the process further includes:

[0011] Obtain the service name and candidate business data type of the candidate third-party service;

[0012] Register the service name and the candidate business data type of the candidate third-party service through a pre-built service registration center component to obtain an available service registration table;

[0013] A service query instruction issued by a user is obtained, and a service corresponding to the service query instruction is selected from the available service registration table according to the service query instruction to obtain the target third-party service, wherein the service query instruction includes a service name and a target business data type of the target third-party service.

[0014] In one embodiment of the present application, the target HTTP service includes an HTTP service that implements HTTP requests through domain name resolution, and the service configuration items corresponding to the pre-built target HTTP service are configured according to the address information, service name, and business requirement information of the target third-party service to obtain request information, including:

[0015] Obtaining load balancing request information, wherein the load balancing request information includes address information of the service registration center component and a pre-built load balancing algorithm;

[0016] Transmitting the load balancing request information to a pre-built load balancing application module, and enabling the pre-built load balancing application module to obtain the available service registry and generate a load balancing strategy according to the load balancing request information;

[0017] According to the load balancing strategy, the address information of the target third-party service is transmitted to a pre-built domain name system, and the address information of the target third-party service is resolved by a domain name to obtain the resolved address information;

[0018] The address item, service name item and request parameter item in the service configuration item are respectively configured according to the resolved address information, service name and business requirement information to obtain the request information.

[0019] In one embodiment of the present application, before transmitting the request information to the target HTTP service, the method further includes:

[0020] Obtaining a request parameter standard for the target third-party service, wherein the request parameter standard includes a request parameter encoding format and / or a signature parameter requirement;

[0021] By using a pre-built data format setting expression, the request parameters in the request information are converted into the request parameter encoding format of the target third-party service to obtain new request information; and / or,

[0022] If the encoding format of the request parameters of the target third-party service is JSON format, the request parameters in the request information are converted into JSON format by a pre-built JSON parser to obtain new request information; and / or,

[0023] If the signature parameter requirement is to add signature parameters, a parameter signature is performed according to the request parameters in the request information to obtain signature parameters, and the signature parameters are added to the request parameters in the request information to obtain new request information.

[0024] In one embodiment of the present application, after calling the data in the target third-party service according to the request information through the target HTTP service, the method further includes:

[0025] Obtaining the response time taken by the target third-party service to respond to the request parameters in the request information;

[0026] If the response time exceeds a preset response time threshold, the third-party service response is determined to have timed out, and response timeout warning information is generated, wherein the response timeout warning information includes the service name and address information, request parameters, and response time of the target third-party service;

[0027] The response timeout warning information is transmitted to the user terminal through the pre-constructed first warning channel to perform a timeout warning.

[0028] In one embodiment of the present application, after calling the data in the target third-party service according to the request information through the target HTTP service, the method further includes:

[0029] Obtaining a response status code returned by the target third-party service according to the request parameters in the request information;

[0030] If the response status code matches the preset failure status code, it is determined that the target third-party service fails to respond to the request parameters, and response failure information is generated, the response failure information including the service name and address information of the target third-party service, the request parameters and the response status code;

[0031] The response failure information is transmitted to the user terminal through a pre-constructed second warning channel to issue a response failure warning.

[0032] In one embodiment of the present application, after the target HTTP service calls the data in the target third-party service according to the request information, the method further includes:

[0033] Obtaining the data call result of the target third-party service;

[0034] If the data call result is that the call data is successful, a third-party service call success log is generated according to the address information, service name, response time and response time information of the target third-party service;

[0035] If the data call result is a failure to call the data, a third-party service call failure log is generated according to the response failure information.

[0036] In one embodiment of the present application, a third-party service access device is also provided, the device comprising:

[0037] The initial information acquisition module is used to obtain the address information, service name, and business demand information issued by the user of the target third-party service;

[0038] A request information configuration module, configured to configure information of a service configuration item corresponding to a pre-built target HTTP service according to the address information, service name and business requirement information of the target third-party service, to obtain request information;

[0039] The service access module is used to transmit the request information to the target HTTP service, and call the data in the target third-party service according to the request information through the target HTTP service.

[0040] In one embodiment of the present application, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the third-party service access method described above when executing the computer program.

[0041] In one embodiment of the present application, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the third-party service access method described above are implemented.

[0042] The solutions implemented by the third-party service access method, device, equipment and medium have the following beneficial effects:

[0043] This application first obtains the address information, service name, and business demand information issued by the user of the target third-party service; then, according to the address information, service name, and business demand information of the target third-party service, the service configuration items corresponding to the pre-built target HTTP service are configured to obtain request information; finally, the request information is transmitted to the target HTTP service, and the data in the target third-party service is called through the target HTTP service according to the request information. In this application, the request information required for accessing the target third-party service can be obtained by configuring the service configuration items corresponding to the pre-built target HTTP service through the address information, service name, and business demand of the target third-party service. The information configuration of the service configuration items can be implemented using the microservice architecture and low-code platform, without the need for professional developers to perform hard development of third-party service access, thereby reducing development costs; the pre-built target HTTP service uses the request information to implement the call of data in the third-party service, and can directly perform system hot deployment, reducing the system development and online cycle, and quickly responding to business access needs.

[0044] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0046] Figure 1 is a schematic diagram of an implementation environment of a third-party service access method shown in an exemplary embodiment of the present application;

[0047] Figure 2 is a flowchart of a third-party service access method shown in an exemplary embodiment of the present application;

[0048] Figure 3 is a structural diagram of a third-party service access device shown in an exemplary embodiment of the present application;

[0049] Figure 4 A schematic diagram of the structure of a computer system used to implement an embodiment of the present application is shown. DETAILED DESCRIPTION

[0050] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0051] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0052] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0053] The term "multiple" as used in this application refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0054] Here, the abbreviations and key term definitions related to this application are introduced:

[0055] With low-code, developers do not need to use traditional handwritten code to program, but can complete development work through more efficient methods such as graphical drag and drop, parameter configuration, etc. The low-code development platform can achieve rapid delivery of business applications and reduce the development costs of business applications. On the one hand, low-code development requires lower investment in the entire software life cycle process (less code writing, simpler environment setup and deployment costs); on the other hand, low-code development also significantly lowers the threshold for developers to use it. Non-professional developers can quickly take up their posts after simple basic IT training, which can fully mobilize and utilize the company's existing human resources in all aspects, and significantly reduce dependence on expensive professional developer resources.

[0056] Eureka service: Eureka is a REST-based service discovery framework that uses a CS (Client / Server) architecture. Eureka includes the following two components: Eureka Server, which is the Eureka service registration center, is mainly used to provide service registration functions. When a microservice is started, it will register its own service with the Eureka Server. The Eureka Server maintains a list of available services and stores information about all available services registered with the Eureka Server; Eureka Client, which usually refers to each microservice in a microservice system, is mainly used to interact with the Eureka Server.

[0057] Signature parameters: When an application sends an Open API (Open Application Programming Interface) call request based on an HTTP (Hyper Text Transfer Protocol) request, in order to ensure secure communication between the application and the REST (Representational State Transfer) server and prevent malicious attacks such as Secret Key theft and data tampering, the REST server uses a parameter signature mechanism. Before calling the Open API, the application needs to calculate an MD5 (MD5Message-Digest Algorithm) signature for all its request parameters and append it to the request parameters. The parameter name is "sign". When the REST server receives the request, it will recalculate the signature and determine whether its value is consistent with the sign parameter value passed by the application, so as to determine whether the current Open API call request has been forged or tampered with by a third party.

[0058] At present, in the field of financial risk control, when the data of the indicator calculation platform of banks and non-bank institutions is not enough to support the needs of quantitative risk control, they will seek to cooperate with third-party data institutions to access data and improve internal risk control needs. Third-party data institutions mainly provide data such as multiple loan data, blacklists, device fingerprints, and credit scores.

[0059] When the indicator calculation platform accesses third-party data services, it mainly implements business logic by calling third-party service interfaces or using codes. For example, it can use HTTP requests to implement custom business logic, use HTTP to call external services, and complete system configuration by configuring HTTP request addresses, methods, parameters, etc. However, most developers currently need to use tools such as Http Client to enable the indicator calculation platform to send HTTP requests to third-party services and receive HTTP responses from resources identified by URIs (Uniform Resource Identifiers). Non-developers cannot access third-party services, and the access process design, development, testing, business acceptance, and online release require multiple environments to be released. The entire cycle is long, and it is difficult to quickly respond to business access needs.

[0060] The technical solutions in the embodiments of this application involve technologies such as low-code and Eureka services, which are specifically described through the following embodiments:

[0061] Figure 1 It is a schematic diagram of an implementation environment of a third-party service access method shown in an exemplary embodiment of the present application.

[0062] Reference Figure 1 As shown, the implementation environment may include a user terminal 101 and a third-party server 102. The user terminal 101 may include various electronic devices such as a tablet computer, a laptop computer, a desktop computer, etc. The third-party server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0063] It should be noted that the implementation environment in the embodiment of the present application may have any number of third-party service terminals 102. For example, the third-party service terminal 102 may be a server group composed of multiple server devices.

[0064] In addition, the technical solution provided in the embodiment of the present application can be applied to the user terminal 101, and the user terminal 101 is used to implement access to third-party services of the indicator calculation platform through low-code and microservice architecture. The third-party server 102 receives the HTTP request information sent by the user terminal 101 and returns a response.

[0065] In one embodiment of the present application, the user terminal 101 obtains the address information, service name, and business demand information of the third-party server 102; then, according to the address information, service name, and business demand information of the third-party server 102, the service configuration items corresponding to the pre-built target HTTP service are configured to obtain request information; finally, the request information is transmitted to the target HTTP service, and the target HTTP service calls the data in the target third-party service according to the request information to achieve access to the third-party service. It can be seen that in the process of accessing the third-year service, the present application can be based on the microservice architecture and low code, and the service configuration items corresponding to the pre-built target HTTP service can be configured through the address information, service name, and business demand of the target third-party service to obtain the request information required for accessing the target third-party service, without the need for professional developers to perform hard development of third-party service access, thereby reducing development costs; the pre-built target HTTP service can directly perform hot deployment of the system by calling the data in the third-party service through the request information, thereby reducing the cycle of system development and online launch, and quickly responding to the access needs of the business.

[0066] The above section introduces the exemplary implementation environment of the technical solution of the present application, and the third-party service access method of the present application will be introduced next.

[0067] See also Figure 2 , Figure 2 is a flowchart of a third-party service access method shown in an exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown is specifically executed by the user terminal 101 in the implementation environment. It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.

[0068] like Figure 2 As shown, in an exemplary embodiment, the third-party service access method includes at least steps S210-S230, which are described in detail as follows:

[0069] In step S210, the address information, service name, and business requirement information issued by the user of the target third-party service are obtained.

[0070] Exemplarily, in the financial risk control process, the indicator calculation platform needs to access the borrower's age and whether the borrower is on the credit blacklist in the third-party service, so as to calculate the borrower's loan indicator and determine whether it is possible to borrow money from the candidate borrower and / or the loan amount. In this embodiment, the URL (Universal Resource Locator) address information of the target third-party service with the service name "Risk Gateway" is obtained. In the embodiment of the present application, the business demand information sent by the user is determined according to the business environment in which the current indicator calculation platform is located. For example, the business environment in which the current indicator calculation platform is located is to make risk control intelligent decisions based on the borrower's age in the bank's credit information and whether the borrower is on the credit blacklist. The corresponding business demand information is the borrower's age and whether the borrower is on the credit blacklist.

[0071] In step S220, information configuration is performed on the service configuration items corresponding to the pre-built target HTTP service according to the address information, service name and business requirement information of the target third-party service to obtain request information.

[0072] Exemplarily, the third-party service access method in the embodiment of the present application is implemented based on low-code and microservice architecture. Before configuring the service configuration items, the low-code platform has encapsulated pre-built HTTP services, such as pre-built F5 domain name services, Eureka services, and HTTP services based on F5 domain names and Eureka. As an example, first obtain the service name and URL address information of the target third-party service of the "risk gateway", and the business demand information is the age of the borrower and whether the borrower is on the credit blacklist. Select the pre-built HTTP service based on F5 domain name and Eureka to implement the access of the target third-party service of the "risk gateway"; then configure the information on the service configuration item configuration page corresponding to the HTTP service based on F5 domain name and Eureka, for example, configure the HTTP service name, the service name of the target third-party service of the "risk gateway", URL address information, request header, request parameters, maximum number of retries and other configuration items to obtain request information.

[0073] In step S230, the request information is transmitted to the target HTTP service, and the target HTTP service calls the data in the target third-party service according to the request information.

[0074] Exemplarily, the request information obtained by configuring the service configuration item is transmitted to a pre-built HTTP service based on the F5 domain name and Eureka, and the HTTP service calls the target data of the target third-party service according to the request information and the pre-configured request method. In the embodiment of the present application, the request method may include, for example, GET, POST, PUT and other request methods.

[0075] Specifically, as an example, you can first obtain the service name and URL address of the "Risk Gateway" third-party service, and the business requirement information is the borrower's age and whether the borrower is on the credit blacklist; then, according to the service name, URL address and business requirement information, configure the request parameters, request headers, UPL address and other information in the service configuration item configuration page of the pre-built HTTP service based on the F5 domain name and Eureka to obtain the request information; finally, transmit the request information to the pre-built HTTP service based on the F5 domain name and Eureka, and send a data call request to the "Risk Gateway" third-party service through the Eureka service registry, F5 domain name and load balancing, thereby realizing the access of the "Risk Gateway" third-party service.

[0076] It can be seen from the above steps S210 to S230 that before accessing the third-party service, the indicator calculation platform can pre-build and encapsulate the HTTP service based on the low-code and microservice architecture; when the indicator calculation platform needs to access the target third-party service, it only needs to configure the information on the HTTP service configuration page according to the service name, address information and other information of the target third-party service to obtain the request information; then the access to the target third-party service can be completed according to the request information. Compared with the conventional method of re-developing software and testing the target third-party service information after obtaining the target third-party service information, the third-party service access method in the embodiment of the present application does not require professional developers to perform hard development of third-party service access, which reduces the development cost; the pre-built target HTTP service realizes the call of the data in the third-party service through the request information, and can directly perform system hot deployment, which reduces the system development and online cycle, and quickly responds to the access needs of the business.

[0077] In one embodiment of the present application, before obtaining the address information and service name of the target third-party service in step S210, the following steps are also included:

[0078] Obtain the service name and candidate business data type of the candidate third-party service;

[0079] Register the service name and the candidate business data type of the candidate third-party service through a pre-built service registration center component to obtain an available service registration table;

[0080] A service query instruction issued by a user is obtained, and a service corresponding to the service query instruction is selected from the available service registration table according to the service query instruction to obtain the target third-party service, wherein the service query instruction includes a service name and a target business data type of the target third-party service.

[0081] In this embodiment, the discovery of candidate third-party services and the determination of target third-party services are realized based on the Eureka service. For example, first, based on the Eureka service framework in the pre-built service registration center component, multiple candidate third-party services send service names and candidate business data types to the service registration center Eureka Server as Eureka Clients and register to obtain an available service registration table; then obtain the service query instruction issued by the user at the user terminal, and screen and determine the target third-party service from the available service registration table according to the service query instruction.

[0082] It should be noted that when registering candidate third-party services, multiple candidate third-party services can also send address information, service name, candidate business data type and request parameter encoding format to the service registration center Eureka Server as Eureka Client and register to obtain an available service registration table. In this application, the candidate third-party service registration information when realizing the discovery of candidate third-party services based on the Eureka service can be adjusted according to the needs of the specific implementation process, and is not limited to the registration information content in the embodiment of this application.

[0083] It can be seen that the target third-party service can be discovered through the Eureka service in the pre-built service registration center component, and the candidate target third-party service can be determined through the user's query instructions.

[0084] In one embodiment of the application, in step S220, the target HTTP service may be, for example: an HTTP service that implements HTTP requests through domain name resolution, that is, an HTTP service implemented by F5 domain name resolution; a service that implements HTTP requests by sending request information after discovering the target third-party service through the Eureka service.

[0085] Wherein, when the target HTTP service is an HTTP service that implements HTTP requests through domain name resolution, information configuration is performed on the service configuration items corresponding to the pre-built target HTTP service according to the address information, service name and business requirement information of the target third-party service to obtain request information, including the following steps:

[0086] Obtaining load balancing request information, wherein the load balancing request information includes address information of the service registration center component and a pre-built load balancing algorithm;

[0087] Transmitting the load balancing request information to a pre-built load balancing application module, and enabling the pre-built load balancing application module to obtain the available service registry and generate a load balancing strategy according to the load balancing request information;

[0088] According to the load balancing strategy, the address information of the target third-party service is transmitted to a pre-built domain name system, and the address information of the target third-party service is resolved by a domain name to obtain the resolved address information;

[0089] The address item, service name item and request parameter item in the service configuration item are respectively configured according to the resolved address information, service name and business requirement information to obtain the request information.

[0090] Exemplarily, first, a POST request is sent using a pre-defined interface. The POST request is the load balancing request information. The effective load of the POST request is a template in json format. The template needs to contain the type of service discovery. In this embodiment, the type of service discovery is specified as Eureka. In addition, the IP address of Eureka needs to be added to the template, and the load balancing algorithm and health check can also be configured; then the POST request is transmitted to the pre-built F5 load balancing application module, so that the load balancing application in the F5 load balancing application module communicates with the third-party service registration center Eureka through the IP address of Eureka, obtains the information of the target third-party service registered on Eureka in real time, and generates a load balancing strategy based on the load balancing algorithm in the POST request and the information of the target third-party service registered on Eureka; then, according to the load balancing strategy, the address information of the selected target third-party service is transmitted to the pre-built DNS (Domain Name System, Domain Name System), and the address information of the target third-party service is resolved by domain name, for example, the domain name can be resolved into IP address information; finally, according to the resolved address information, service name and business demand information, the address item, service name item and request parameter item in the service configuration item are respectively configured to obtain the request information. When the parameter encoding format of the request parameters in the request information is consistent with the request parameter encoding format of the target third-party service, the request information can be directly sent to the target third-party service through the F5 load balancing application to obtain a response.

[0091] From this, we can see that through the pre-built HTTP service and the information configured in the HTTP service configuration items, access to the target third-party service can be directly achieved without hard coding and publishing the service interface. The HTTP request information can be configured online throughout the process, reducing development costs.

[0092] Among them, when the target HTTP service is a service that sends request information to implement HTTP requests after discovering the target third-party service through the Eureka service, the address information, service name and other information of the target third-party service are determined through the available service registry discovered by the Eureka service, and then the information is configured on the HTTP service configuration page to obtain the configured request information. In the service configuration page, the name of the HTTP service can be configured, and the service name and address information, request parameters, maximum number of retries and other information of the target third-party service can also be configured to obtain the request information. The HTTP service determines the request method based on the request information and sends the request information to the target third party to achieve access to the target third-party service and data call.

[0093] For example, the configuration value in the service configuration page is jsonbject, which is a data structure that can be understood as a data structure in json format. The put method can be used to add elements to the json object. According to the preset service configuration item description, the service address of the HTTP service, the number of retries for failed requests, request parameters and other configuration items can be configured in the service configuration page to obtain request information.

[0094] In one embodiment of the application, before transmitting the request information to the target HTTP service in step S230, the following steps are included:

[0095] Obtaining a request parameter standard for the target third-party service, wherein the request parameter standard includes a request parameter encoding format and / or a signature parameter requirement;

[0096] By using a pre-built data format setting expression, the request parameters in the request information are converted into the request parameter encoding format of the target third-party service to obtain new request information; and / or,

[0097] If the encoding format of the request parameters of the target third-party service is JSON format, the request parameters in the request information are converted into JSON format by a pre-built JSON parser to obtain new request information; and / or,

[0098] If the signature parameter requirement is to add signature parameters, a parameter signature is performed according to the request parameters in the request information to obtain signature parameters, and the signature parameters are added to the request parameters in the request information to obtain new request information.

[0099] It should be noted that the request parameter standard includes the request parameter encoding format and / or the signature parameter requirement, and the signature parameter requirement is whether the signature parameter needs to be added. Different target third-party services correspond to different request parameter encoding formats. For example, the encoding method of the request parameter specified by a target third-party service is application / json. When the indicator calculation platform sends a data call request to the target third-party service, the format of the request parameter must be json (JavaScript Object Notation, JS object notation) format; for example, the encoding format of the request parameter specified by a target third-party service is text / xml. When the indicator calculation platform sends a data call request to the target third-party service, the format of the request parameter must be xml (eXtensible Markup Language) format.

[0100] When the data format of the request parameters in the request information obtained through the configuration page of the target HTTP service configuration item is inconsistent with the request parameter encoding format of the target third-party service, it is necessary to convert the format of the request parameters in the request information. For example, if the request parameter encoding format of the target third-party service is in json format, it is necessary to convert the data format of the request parameters in the request information through a json parser to avoid the situation where the format of the request parameters received by the target third-party service is inconsistent with the request parameter encoding format, resulting in failure to respond to the request parameters.

[0101] In this embodiment, the request parameters are converted into data formats through data format setting expressions and a JSON parser to obtain request parameters that conform to the target third-party request parameter encoding format, thereby avoiding the problem of being unable to respond to requests due to the mismatch between the request parameters and the target third-party request parameter format.

[0102] Among them, when the signature parameter needs to be added, the request parameters can be processed with the help of Groovy scripts, the parameter signature is performed according to the request parameters in the request information, the MD5 signature is calculated, the signature parameter sign is obtained, and the signature parameter sign is added to the request parameters in the request information to obtain the request information. When the target third-party service receives the request information containing the signature parameter sign, the signature is recalculated according to the request parameters, and it is determined whether the value of the recalculated signature parameter is consistent with the sign value in the request information, so as to determine whether the current request information has been forged or tampered with by a third party, further ensuring the confidentiality and accuracy of the request and response.

[0103] In one embodiment of the application, after calling the data in the target third-party service according to the request information through the target HTTP service in step S230, the method further includes the following steps:

[0104] Obtaining the response time taken by the target third-party service to respond to the request parameters in the request information;

[0105] If the response time exceeds a preset response time threshold, the third-party service response is determined to have timed out, and response timeout warning information is generated, wherein the response timeout warning information includes the service name and address information, request parameters, and response time of the target third-party service;

[0106] The response timeout warning information is transmitted to the user terminal through the pre-constructed first warning channel to perform a timeout warning.

[0107] Exemplarily, after the target third-party service receives the request information sent by the HTTP service, it returns a response to the indicator calculation platform and returns the response time. The response time is compared with the preset response time threshold to determine whether the response has timed out at that time. For example, if the response time of the target third-party service to return the response is 164 milliseconds, and the preset response time threshold is 100 milliseconds, it can be determined that the current response has timed out. If the current response times out, response timeout warning information is generated based on the service name and address information, request parameters and response time of the target third-party service, and the warning information is transmitted to the user terminal through the pre-built first warning channel to issue a timeout warning to the user. Among them, the first warning channel can be configured in a pre-built warning configuration module. For example, the first warning channel is an email, and the email content, email subject, title template and other information are configured in the warning configuration module.

[0108] In one embodiment of the application, after calling the data in the target third-party service according to the request information through the target HTTP service in step S230, the method further includes the following steps:

[0109] Obtaining a response status code returned by the target third-party service according to the request parameters in the request information;

[0110] If the response status code matches the preset failure status code, it is determined that the target third-party service fails to respond to the request parameters, and response failure information is generated, the response failure information including the service name and address information of the target third-party service, the request parameters and the response status code;

[0111] The response failure information is transmitted to the user terminal through a pre-constructed second warning channel to issue a response failure warning.

[0112] Exemplarily, after the target third-party service receives the request information sent by the HTTP service, it returns a response status code to the indicator calculation platform. The response status code is then compared with the preset failure status code to determine whether the target third-party service fails to respond to the request parameters. If the current response fails, a response failure warning message is generated based on the service name and address information, request parameters, and response status code of the target third-party service, and the warning message is transmitted to the user terminal through a pre-built second warning channel to warn the user of a response failure. Among them, the second warning channel is an email, and the email content, email subject, title template, recipient, and other information are configured in the warning configuration module.

[0113] It can be seen that in the embodiment of the present application, through a unified warning configuration and management method, abnormal warnings are issued according to the response time and response status code, which can promptly discover faults when accessing third-party services and quickly respond to online problems.

[0114] In one embodiment of the present application, after calling the data in the target third-party service according to the request information through the target HTTP service in step S230, the method further includes the following steps:

[0115] Obtaining the data call result of the target third-party service;

[0116] If the data call result is that the call data is successful, a third-party service call success log is generated according to the address information, service name, response time and response time information of the target third-party service;

[0117] If the data call result is a failure to call the data, a third-party service call failure log is generated according to the response failure information.

[0118] In this embodiment, when the target third-party service successfully returns a response, a call success log is generated based on the response time, response time information, and information about the target third-party service; when the target third-party response fails, a call failure log is generated based on the response failure information. The call success log and call failure log can further facilitate the operation and maintenance to troubleshoot online problems and reduce operation and maintenance costs.

[0119] The following describes an apparatus embodiment of the present application, which can be used to execute the third-party service access method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the third-party service access method of the present application.

[0120] Figure 3 is a schematic diagram of a third-party service access device shown in an exemplary embodiment of the present application. The device can be applied to Figure 1The implementation environment shown in the figure is specifically configured in the user terminal 101. The apparatus may also be applicable to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the apparatus is applicable.

[0121] like Figure 3 As shown, the exemplary third-party service access device includes: an initial information acquisition module 301 , a request information configuration module 302 , and a service access module 303 .

[0122] The initial information acquisition module 301 is used to acquire the address information and service name of the target third-party service, as well as the business demand information issued by the user.

[0123] The request information configuration module 302 is used to configure the service configuration items corresponding to the pre-built target HTTP service according to the address information, service name and business requirement information of the target third-party service to obtain request information.

[0124] In one embodiment of the present application, the request information configuration module 302 includes:

[0125] A request information acquisition unit, used to acquire load balancing request information, wherein the load balancing request information includes address information of the service registration center component and a pre-built load balancing algorithm;

[0126] A load balancing strategy generating unit, configured to transmit the load balancing request information to a pre-built load balancing application module, and enable the pre-built load balancing application module to obtain the available service registry according to the load balancing request information and generate a load balancing strategy;

[0127] A domain name resolution unit, configured to transmit the address information of the target third-party service to a pre-built domain name system according to the load balancing strategy, and perform domain name resolution on the address information of the target third-party service to obtain resolved address information;

[0128] The request information configuration unit is used to configure the address item, service name item and request parameter item in the service configuration item according to the resolved address information, service name and business requirement information to obtain the request information.

[0129] The service access module 303 is used to transmit the request information to the target HTTP service, and call the data in the target third-party service according to the request information through the target HTTP service.

[0130] In another exemplary embodiment of the present application, the device further includes:

[0131] The service registration module is used to obtain the service name and candidate business data type of the candidate third-party service; register the service name and candidate business data type of the candidate third-party service through a pre-built service registration center component to obtain an available service registration table; obtain the service query instruction issued by the user, and select the service corresponding to the service query instruction from the available service registration table according to the service query instruction to obtain the target third-party service, wherein the service query instruction includes the service name and target business data type of the target third-party service.

[0132] In another exemplary embodiment of the present application, the device further includes a request parameter configuration module, and the request parameter configuration module is specifically used to:

[0133] Obtaining a request parameter standard for the target third-party service, wherein the request parameter standard includes a request parameter encoding format and / or a signature parameter requirement;

[0134] By using a pre-built data format setting expression, the request parameters in the request information are converted into the request parameter encoding format of the target third-party service to obtain new request information; and / or,

[0135] If the encoding format of the request parameters of the target third-party service is JSON format, the request parameters in the request information are converted into JSON format by a pre-built JSON parser to obtain new request information; and / or,

[0136] If the signature parameter requirement is to add signature parameters, a parameter signature is performed according to the request parameters in the request information to obtain signature parameters, and the signature parameters are added to the request parameters in the request information to obtain new request information.

[0137] In another exemplary embodiment of the present application, the device further includes a timeout warning module, which is specifically used to:

[0138] Obtaining the response time taken by the target third-party service to respond to the request parameters in the request information;

[0139] If the response time exceeds a preset response time threshold, the third-party service response is determined to have timed out, and response timeout warning information is generated, wherein the response timeout warning information includes the service name and address information, request parameters, and response time of the target third-party service;

[0140] The response timeout warning information is transmitted to the user terminal through the pre-constructed first warning channel to perform a timeout warning.

[0141] In another exemplary embodiment of the present application, the device further includes a response failure warning module, and the response failure warning module is specifically used to:

[0142] Obtaining a response status code returned by the target third-party service according to the request parameters in the request information;

[0143] If the response status code matches the preset failure status code, it is determined that the target third-party service fails to respond to the request parameters, and response failure information is generated, the response failure information including the service name and address information of the target third-party service, the request parameters and the response status code;

[0144] The response failure information is transmitted to the user terminal through a pre-constructed second warning channel to issue a response failure warning.

[0145] In another exemplary embodiment of the present application, the device further includes a log generating module, and the log generating module is specifically used for:

[0146] Obtaining the data call result of the target third-party service;

[0147] If the data call result is that the call data is successful, a third-party service call success log is generated according to the address information, service name, response time and response time information of the target third-party service;

[0148] If the data call result is a failure to call the data, a third-party service call failure log is generated according to the response failure information.

[0149] It should be noted that the third-party service access device provided in the above embodiment and the third-party service access method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In actual application, the third-party service access device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.

[0150] In one embodiment of the present application, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the third-party service access method provided in the above-mentioned embodiments when executing the computer program.

[0151] Exemplarily, the computer device in the embodiment of the present application implements the operation of the computer program through a computer system. Figure 4 The schematic diagram of the structure of the computer system used to implement the embodiment of the present application is shown. It should be noted that: Figure 4The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0152] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, ROM 402 and RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0153] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.

[0154] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 409, and / or installed from a removable medium 411. When the computer program is executed by a central processing unit (CPU) 401, various functions defined in the system of the present application are executed.

[0155] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0156] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0157] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0158] Another aspect of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the third-party service access method described in the above embodiment are implemented. The computer-readable storage medium may be included in the computer device described in the above embodiment, or may exist independently without being assembled into the computer device.

[0159] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0160] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the third-party service access method provided in each of the above embodiments.

[0161] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0162] In the above embodiments, unless otherwise specified, the use of serial numbers such as "first" and "second" to describe common objects only indicates that they refer to different instances of the same object, rather than indicating that the objects being described must adopt a given order, whether in time, space, sorting or any other way.

[0163] In the above embodiments, the reference in the specification to "this embodiment", "another embodiment", or "other embodiments" indicates that the specific features, structures, or characteristics described in conjunction with the embodiments are included in at least some embodiments, but not necessarily all embodiments. Multiple occurrences of "this embodiment", "another embodiment", or "another embodiment" do not necessarily all refer to the same embodiment. If the specification describes that a component, feature, structure, or characteristic "may", "perhaps", or "can" be included, then the specific component, feature, structure, or characteristic "may", "perhaps", or "can" be included, then the specific component, feature, structure, or characteristic is not necessarily included. If the specification or claims mention "an" element, it does not mean that there is only one element. If the specification or claims mention "an additional" element, it does not exclude the presence of more than one additional element.

[0164] In the above-described embodiments, although the invention has been described in conjunction with specific embodiments of the invention, many substitutions, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other storage structures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed. Embodiments of the invention are intended to encompass all such substitutions, modifications, and variations that fall within the broad scope of the appended claims.

[0165] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A third-party service access method, characterized in that: The method comprises the following steps: Obtain the address information, service name, and business demand information issued by the user of the target third-party service; According to the address information, service name and business requirement information of the target third-party service, information configuration is performed on the service configuration item corresponding to the pre-built target HTTP service to obtain request information; Transmitting the request information to the target HTTP service, and calling the data in the target third-party service according to the request information through the target HTTP service; Before obtaining the address information and service name of the target third-party service, the method further includes: Obtain the service name and candidate business data type of the candidate third-party service; Register the service name and the candidate business data type of the candidate third-party service through a pre-built service registration center component to obtain an available service registration table; A service query instruction issued by a user is obtained, and a service corresponding to the service query instruction is selected from the available service registration table according to the service query instruction to obtain the target third-party service, wherein the service query instruction includes a service name and a target business data type of the target third-party service.

2. The third-party service access method according to claim 1, characterized in that: The target HTTP service includes an HTTP service that implements HTTP requests through domain name resolution, and the service configuration items corresponding to the pre-built target HTTP service are configured according to the address information, service name and business requirement information of the target third-party service to obtain request information, including: Obtaining load balancing request information, wherein the load balancing request information includes address information of the service registration center component and a pre-built load balancing algorithm; Transmitting the load balancing request information to a pre-built load balancing application module, and enabling the pre-built load balancing application module to obtain the available service registry and generate a load balancing strategy according to the load balancing request information; According to the load balancing strategy, the address information of the target third-party service is transmitted to a pre-built domain name system, and the address information of the target third-party service is resolved by a domain name to obtain the resolved address information; The address item, service name item and request parameter item in the service configuration item are respectively configured according to the resolved address information, service name and business requirement information to obtain the request information.

3. The third-party service access method according to claim 1, characterized in that: Before transmitting the request information to the target HTTP service, the method further includes: Obtaining a request parameter standard for the target third-party service, wherein the request parameter standard includes a request parameter encoding format and / or a signature parameter requirement; By using a pre-built data format setting expression, the request parameters in the request information are converted into the request parameter encoding format of the target third-party service to obtain new request information; and / or, If the encoding format of the request parameters of the target third-party service is JSON format, the request parameters in the request information are converted into JSON format by a pre-built JSON parser to obtain new request information; and / or, If the signature parameter requirement is to add signature parameters, a parameter signature is performed according to the request parameters in the request information to obtain signature parameters, and the signature parameters are added to the request parameters in the request information to obtain new request information.

4. The third-party service access method according to claim 1, characterized in that: After calling the data in the target third-party service according to the request information through the target HTTP service, the method further includes: Obtaining the time taken for the target third-party service to respond to the request parameters in the request information; If the response time exceeds a preset response time threshold, the third-party service response is determined to have timed out, and response timeout warning information is generated, wherein the response timeout warning information includes the service name and address information, request parameters, and response time of the target third-party service; The response timeout warning information is transmitted to the user terminal through the pre-constructed first warning channel to perform a timeout warning.

5. The third-party service access method according to claim 1, characterized in that: After calling the data in the target third-party service according to the request information through the target HTTP service, the method further includes: Obtaining a response status code returned by the target third-party service according to the request parameters in the request information; If the response status code matches the preset failure status code, it is determined that the target third-party service fails to respond to the request parameters, and response failure information is generated, the response failure information including the service name and address information of the target third-party service, the request parameters and the response status code; The response failure information is transmitted to the user terminal through a pre-constructed second warning channel to issue a response failure warning.

6. The third-party service access method according to claim 5, characterized in that: After calling the data in the target third-party service according to the request information through the target HTTP service, the method further includes: Obtaining the data call result of the target third-party service; If the data call result is that the call data is successful, a third-party service call success log is generated according to the address information, service name, response time and response time information of the target third-party service; If the data call result is a failure to call the data, a third-party service call failure log is generated according to the response failure information.

7. A third-party service access device, characterized in that: The device comprises: The initial information acquisition module is used to obtain the address information, service name, and business demand information issued by the user of the target third-party service; A request information configuration module, configured to configure information of a service configuration item corresponding to a pre-built target HTTP service according to the address information, service name and business requirement information of the target third-party service, to obtain request information; A service access module, used to transmit the request information to the target HTTP service, and call the data in the target third-party service according to the request information through the target HTTP service; The device also includes: The service registration module is used to obtain the service name and candidate business data type of the candidate third-party service; register the service name and candidate business data type of the candidate third-party service through a pre-built service registration center component to obtain an available service registration table; obtain the service query instruction issued by the user, and select the service corresponding to the service query instruction from the available service registration table according to the service query instruction to obtain the target third-party service, wherein the service query instruction includes the service name and target business data type of the target third-party service.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the third-party service access method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the third-party service access method according to any one of claims 1 to 6 are implemented.