Method and device for configuring gateway through three-party interface, electronic device and storage medium

By configuring the gateway method through a third-party interface, and utilizing the gateway parsing registration and container execution configuration modules, zero-code configuration is achieved. This solves the code maintenance and performance issues when connecting standardized B2B products to customers' private systems, simplifies the development and delivery process, and optimizes runtime performance.

CN116016182BActive Publication Date: 2025-12-16BEIJING SHUSHI YUNCHUANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211509494.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-12-16
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

When TOB standardized products are integrated with customers' private systems, customized third-party interfaces need to be developed, which increases the difficulty of code maintenance, the risk of upgrades, and the complexity of the delivery process. Furthermore, the deployment of customized code and standardized products results in excessively large binary packages, which affects the performance of the system.

Method used

A third-party interface configuration gateway method is adopted. The configuration information of the third-party interface is obtained, parsed and registered on the gateway, and the gateway is directly called when accessing. The container execution configuration module is used to perform mapping configuration and instantiation container transformation to achieve zero-code configuration of third-party interface registration and access.

Benefits of technology

It enables the configuration of third-party interfaces without the need for customized development, reduces the difficulty of code maintenance and upgrade risks, simplifies the delivery process, and optimizes product performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116016182B_ABST
    Figure CN116016182B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a method and device for configuring a gateway of a three-party interface, electronic equipment and a storage medium, the method comprising: obtaining configuration information of the three-party interface, and performing parsing registration on the gateway; when accessing the three-party interface, directly calling the gateway to obtain the configuration information of the three-party interface after the parsing registration on the gateway; mapping and configuring the configuration information of the three-party interface with an interface in a container execution configuration module of the gateway; obtaining an instantiated container according to the mapping configuration information in the container execution configuration module of the gateway, and converting an access request of the three-party interface according to the instantiated container to access the three-party interface through the gateway. The method can realize three-party interface registration and three-party interface access in a zero-code configuration manner.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of interface configuration. More particularly, it relates to a method and device for configuring a three-party interface gateway, an electronic device and a storage medium. BACKGROUND

[0002] In the field of computer application technology, when a TOB standardized product is connected to a customer's private system, it is necessary to customize and develop for each interface. The customer service interface (i.e. the three-party interface) may use different request protocols (HTTP protocol, DUBBO protocol, or use MQ, etc.), or use different data serialization methods (JSON format, XML format, PB format, etc.), or use different interaction methods (synchronous, asynchronous, etc.), or the interface performance needs to use different flow limiting strategies. Thus, the TOB standardized product needs to be customized and developed for each customer private system:

[0003] 1. The product code maintenance difficulty is increased, and a set of code needs to be maintained for each customer;

[0004] 2. The product upgrade risk is increased, and regression testing needs to be performed for each customer function;

[0005] 3. The product delivery process complexity is increased, and a delivery team is needed to customize and develop to connect to the customer system.

[0006] In the prior art, a method of customizing and developing a code for a single three-party interface is needed for each customer private system, which increases the SAAS platform performance stability risk. All customer customized codes and standardized product codes are deployed together, which results in a too large binary package and affects the running performance.

[0007] Correspondingly, there is a need in the art for a new method of configuring a three-party interface gateway without the need for customization and development to solve the above problems. SUMMARY

[0008] To solve at least one of the above technical problems, one purpose of the present application is to provide a method and device for configuring a three-party interface gateway, an electronic device and a storage medium.

[0009] To achieve the above purpose, the present application adopts the following technical solutions:

[0010] In a first aspect, the present application provides a method for configuring a three-party interface gateway, which comprises:

[0011] obtaining configuration information of the three-party interface and performing parsing registration on the gateway;

[0012] When accessing the third-party interface, the gateway is directly called to obtain configuration information of the third-party interface registered and parsed on the gateway;

[0013] The configuration information of the third-party interface is mapped and configured with the interface in the container execution configuration module of the gateway;

[0014] According to the mapping configuration information in the container execution configuration module of the gateway, an instantiated container is obtained, and an access request of the third-party interface is converted according to the instantiated container to access the third-party interface through the gateway.

[0015] Optionally, the configuration information of the third-party interface is obtained, and the third-party interface is registered and parsed on the gateway, including:

[0016] The interface name, interface request type, input parameter, protocol, output parameter and / or request header data of the third-party interface are described in a schema language, and are uploaded to the gateway;

[0017] The gateway parses the schema language to obtain the interface name, interface request type, input parameter, protocol, output parameter and / or request header data corresponding to the third-party interface, and stores the parsed interface name, interface request type, input parameter, protocol, output parameter and / or request header data corresponding to the third-party interface in a database;

[0018] The interface name, interface request type, input parameter, protocol, output parameter and / or request header data of the third-party interface are configuration information of the third-party interface.

[0019] Optionally, the configuration information of the third-party interface is mapped and configured with the interface in the container execution configuration module of the gateway, including:

[0020] The mapping configuration of the interface in the container execution configuration module of the gateway and the input parameter of the third-party interface;

[0021] And / or, the mapping configuration of the interface in the container execution configuration module of the gateway and the output parameter of the third-party interface;

[0022] And / or, the mapping configuration of the interface in the container execution configuration module of the gateway and the request header of the third-party interface;

[0023] And / or, the mapping configuration of the interface in the container execution configuration module of the gateway and the output parameter of the third-party interface;

[0024] And / or, the configuration of the interface in the container execution configuration module of the gateway and the strategy of the third-party interface;

[0025] And / or, the configuration of the interface in the container execution configuration module of the gateway and the protocol of the third-party interface;

[0026] And / or, the interface in the container execution configuration module of the gateway is mapped with the container execution of the three-party interface.

[0027] Optionally, the access request to the three-party interface is converted to access the three-party interface through the gateway, including:

[0028] The called three-party interface and each configuration parameter in the container execution configuration module corresponding to the three-party interface are obtained;

[0029] The static three-party interface and each configuration parameter in the container execution configuration module corresponding to the three-party interface are dynamized to generate an instantiated container;

[0030] Each configuration parameter in the instantiated container is converted to obtain information identifiable by the called three-party interface;

[0031] The three-party interface is called according to the information identifiable by the called three-party interface.

[0032] In a second aspect, the present application provides a device for configuring a gateway of a three-party interface, the device comprising:

[0033] A first obtaining module is configured to obtain configuration information of a three-party interface and perform parsing registration on the gateway;

[0034] A second obtaining module is configured to, when accessing the three-party interface, directly call the gateway to obtain the configuration information of the three-party interface after the parsing registration on the gateway;

[0035] A mapping module is configured to map and configure the configuration information of the three-party interface with an interface in a container execution configuration module of the gateway;

[0036] An access module is configured to obtain an instantiated container according to the mapping configuration information in the container execution configuration module of the gateway, and convert an access request to the three-party interface according to the instantiated container to access the three-party interface through the gateway.

[0037] Optionally, the first obtaining module can be further configured to:

[0038] An interface name, an interface request type, input parameters, a protocol, output parameters and / or request header data of the three-party interface are described in a schema language, and are uploaded to the gateway;

[0039] The gateway parses the schema language to obtain the interface name, the interface request type, the input parameters, the protocol, the output parameters and / or the request header data corresponding to the three-party interface, and stores the parsed interface name, the interface request type, the input parameters, the protocol, the output parameters and / or the request header data corresponding to the three-party interface to a database;

[0040] The interface name, the interface request type, the input parameter, the protocol, the output parameter and / or the request header data of the three-party interface are configuration information of the three-party interface.

[0041] Optionally, the mapping module can be further configured to:

[0042] mapping configuration of the interface in the container execution configuration module of the gateway and the input parameter of the three-party interface;

[0043] and / or, mapping configuration of the interface in the container execution configuration module of the gateway and the output parameter of the three-party interface;

[0044] and / or, mapping configuration of the interface in the container execution configuration module of the gateway and the request header of the three-party interface;

[0045] and / or, mapping configuration of the interface in the container execution configuration module of the gateway and the output parameter of the three-party interface;

[0046] and / or, configuration of the interface in the container execution configuration module of the gateway and the policy of the three-party interface;

[0047] and / or, configuration of the interface in the container execution configuration module of the gateway and the protocol of the three-party interface;

[0048] and / or, orchestration of the interface in the container execution configuration module of the gateway and the container execution of the three-party interface.

[0049] Optionally, the access module can be further configured to:

[0050] acquire the called three-party interface and each configuration parameter in the container execution configuration module corresponding to the three-party interface;

[0051] dynamicize the static three-party interface and each configuration parameter in the container execution configuration module corresponding to the three-party interface, to generate an instantiated container;

[0052] transform each configuration parameter in the instantiated container, to obtain information recognizable by the called three-party interface;

[0053] call the three-party interface according to the information recognizable by the called three-party interface.

[0054] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for configuring a three-party interface gateway according to the first aspect of the present application when executing the computer program.

[0055] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method for configuring a gateway by a three-party interface according to the first aspect of the present application.

[0056] The present application has the following advantages:

[0057] In the technical solution of the present application, a method for configuring a gateway by a three-party interface is provided, which obtains configuration information of the three-party interface and performs registration and parsing on the gateway; when accessing the three-party interface, the gateway is directly called to obtain the configuration information of the three-party interface after registration and parsing on the gateway; the configuration information of the three-party interface is mapped and configured with the interface in the container execution configuration module of the gateway; the instantiated container is obtained according to the mapping and configuration information in the container execution configuration module of the gateway, and the access request of the three-party interface is converted according to the instantiated container to access the three-party interface through the gateway. The method can realize the registration and access of the three-party interface in a zero-code configuration manner. BRIEF DESCRIPTION OF DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0059] Figure 1 The structural schematic diagram of the application subject gateway of the method for configuring a gateway by a three-party interface according to an embodiment of the present application is shown.

[0060] Figure 2 The main step flowchart of the method for configuring a gateway by a three-party interface according to an embodiment of the present application is shown.

[0061] Figure 3 The main structure schematic diagram of the device for configuring a gateway by a three-party interface according to an embodiment of the present application is shown.

[0062] Figure 4 The structural schematic diagram of the electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0063] In order to make the technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0064] The method for configuring a gateway by a three-party interface provided in the application can be implemented by a computer device, which can be implemented as at least one of a terminal and a server, wherein the terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server can be a physical server, a server cluster composed of multiple physical servers or a distributed system, and can also be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms.

[0065] For example, the method for configuring a gateway by a three-party interface provided in the application can be applied to an application subject gateway as shown in the accompanying drawings. Figure 1 The application subject gateway provided in the application includes four modules, namely a three-party interface configuration module, a container execution configuration module, an execution management module and a container management module.

[0066] The three-party interface configuration module is responsible for registration of a customer service interface (i.e., a three-party service interface), and analyzes and registers an interface name, an interface request type, input parameters, a protocol, output parameters and / or request header data corresponding to parameters of the customer service interface through a schema description language (JSON format), and stores the analyzed interface name, interface request type, input parameters, protocol, output parameters and / or request header data corresponding to the three-party interface to a database.

[0067] The container execution configuration module is responsible for access to mapping configuration of the customer service interface, and includes mapping, protocol and strategy configuration of a request packet body, output parameters, input parameters, a request header and a return packet body, and orchestration of a container.

[0068] The container execution module is responsible for access and execution of the customer interface, converts a standardized product request according to container execution configuration, and accesses a three-party interface. The container execution module includes container instantiation, configuration parameter conversion, strategy execution and calling of the three-party interface.

[0069] The container management module is responsible for management of the container, and includes container execution management such as loading / unloading of a strategy, loading / unloading of a protocol, life cycle management of the container, protocol management such as HTTP protocol and Kafka protocol, and strategy management such as a flow limiting strategy.

[0070] The application supports integration into other computer applications in multiple ways, such as an SDK way, and also supports separate deployment in the form of a service.

[0071] Reference is made to the accompanying drawings Figure 2 , Figure 2is a main step flow diagram of a method for configuring a gateway of a three-party interface according to an embodiment of the present application. As shown in Figure 2 The method for configuring a gateway of a three-party interface according to an embodiment of the present application mainly includes the following steps S101-S104:

[0072] Step S101: Obtain configuration information of the three-party interface and perform parsing registration on the gateway.

[0073] In a specific example, the client interface service can be referred to as a three-party interface service, and can also be referred to as an external service. When the internal system accesses the external system, the external system is parsed and registered on the gateway side when the internal system accesses the client interface service or the three-party interface service.

[0074] Step S102: When accessing the three-party interface, the gateway is directly called to obtain the configuration information of the three-party interface parsed and registered on the gateway.

[0075] In a specific example, after the configuration information of the three-party interface is parsed and registered on the gateway, when the three-party interface is accessed, the gateway is directly called to obtain the configuration information of the three-party interface parsed and registered on the gateway. After the following steps, when the internal system accesses the third-party interface, the gateway is directly accessed. After the configuration information of the three-party interface is parsed and registered, the gateway can generate a unique ID of the three-party interface, a path parameter, an input parameter, an output parameter, and a rule, and store these information in the database according to the standardization of the gateway.

[0076] Step S103: Map and configure the configuration information of the three-party interface with the interface in the container execution configuration module of the gateway.

[0077] In a specific example, when the gateway calls the third-party interface, this belongs to the content of the container execution configuration module, which specifically includes matching the request of the internal service with the just-registered three-party service interface, which contains some mapping of the path parameter, mapping of the protocol, mapping of the strategy, and priority sorting of the interface. To access the third-party interface, the registered three-party interface needs to be obtained from the gateway. After obtaining the three-party interface, the three-party interface and the internal request also need to be configured, and the internal interface and the intermediate interface need to be mapped to be connected.

[0078] Step S104: Obtain an instantiated container according to the mapping configuration information in the container execution configuration module of the gateway, and convert the access request of the three-party interface according to the instantiated container to access the three-party interface through the gateway.

[0079] In a specific example, after the mapping configuration is completed, when the internal service is used, the internal service is containerized with the gateway, and static configuration is converted into dynamic configuration, that is, when the interface is executed, the static configuration is taken to be converted into an execution thing. When the container is executed, the three-party interface is directly called, and when the internal service is accessed, the three-party interface can be accessed. The method provided in the application is completely code-free and is completely configured, that is, the method provided in the application can be implemented in a zero-code configuration manner to realize three-party interface registration and three-party interface access.

[0080] The steps S101-S104 are further described below.

[0081] In an embodiment of the application, the configuration information of the three-party interface is obtained, and registration is performed on the gateway by analysis, and the registration includes:

[0082] The interface name, the interface request type, the input parameter, the protocol, the output parameter and / or the request header data of the three-party interface are described in a schema language, and are uploaded to the gateway;

[0083] The gateway analyzes the schema language to obtain the interface name, the interface request type, the input parameter, the protocol, the output parameter and / or the request header data of the three-party interface, and stores the interface name, the interface request type, the input parameter, the protocol, the output parameter and / or the request header data of the three-party interface obtained by analysis in a database;

[0084] The interface name, the interface request type, the input parameter, the protocol, the output parameter and / or the request header data of the three-party interface are configuration information of the three-party interface.

[0085] In a specific example, the three-party interface defines an interface according to a standardized schema, and registration is performed.

[0086] In an embodiment of the application, the configuration information of the three-party interface is mapped and configured with an interface in a container execution configuration module of the gateway, and the mapping and configuration includes:

[0087] Mapping and configuration of the interface in the container execution configuration module of the gateway and the input parameter of the three-party interface;

[0088] And / or, mapping and configuration of the interface in the container execution configuration module of the gateway and the output parameter of the three-party interface;

[0089] And / or, mapping and configuration of the interface in the container execution configuration module of the gateway and the request header of the three-party interface;

[0090] And / or, mapping and configuration of the interface in the container execution configuration module of the gateway and the output parameter of the three-party interface;

[0091] And / or, the interface in the container execution configuration module of the gateway is configured with the policy of the three-party interface.

[0092] And / or, the interface in the container execution configuration module of the gateway is configured with the protocol of the three-party interface.

[0093] And / or, the interface in the container execution configuration module of the gateway is configured with the container execution of the three-party interface.

[0094] In one specific example, the container execution configuration module includes request mapping configuration, request header mapping configuration, return packet body mapping configuration, path parameter mapping configuration, query parameter mapping configuration and protocol configuration, and the above-mentioned parameter mapping configurations support JSON value, Redis value, JAVA script value and API value.

[0095] In one embodiment of the application, the access request to the three-party interface is converted to access the three-party interface through the gateway, including:

[0096] Obtaining the called three-party interface and each configuration parameter in the container execution configuration module corresponding to the three-party interface;

[0097] Dynamicizing the static three-party interface and each configuration parameter in the container execution configuration module corresponding to the three-party interface to generate an instantiated container;

[0098] Converting each configuration parameter in the instantiated container to obtain information recognizable by the called three-party interface;

[0099] According to the information recognizable by the called three-party interface, the three-party interface is called.

[0100] In one specific example, according to the execution configuration in the container execution module, an execution container is generated to process the access request, and the container execution process can support dynamically adding and reducing various strategies (such as flow control / frequency control), support protocol dynamic replacement, and support container execution arrangement, etc.

[0101] Based on steps S101-S104, a method for configuring a gateway for a three-party interface is proposed. The method obtains configuration information of the three-party interface and performs parsing registration on the gateway. When accessing the three-party interface, the gateway is directly called to obtain the configuration information of the three-party interface after parsing registration on the gateway. The configuration information of the three-party interface is mapped and configured with the interface in the container execution configuration module of the gateway. An instantiated container is obtained according to the mapping configuration information in the container execution configuration module of the gateway, and a request for accessing the three-party interface is converted according to the instantiated container to access the three-party interface through the gateway. The method can realize three-party interface registration and three-party interface access in a zero-code configuration manner.

[0102] Further, the embodiment of the present application also provides a device for configuring a gateway for a three-party interface. As shown in the figure, Figure 3 The device for configuring a gateway for a three-party interface according to the embodiment of the present application includes a first obtaining module 11, a second obtaining module 12, a mapping module 13, and an accessing module 14. In some embodiments, the first obtaining module 11 can be configured to obtain configuration information of a three-party interface and perform parsing registration on a gateway. The second obtaining module 12 can be configured to directly call the gateway when accessing the three-party interface to obtain configuration information of the three-party interface after parsing registration on the gateway. The mapping module 13 can be configured to map and configure the configuration information of the three-party interface with the interface in the container execution configuration module of the gateway. The accessing module 14 can be configured to obtain an instantiated container according to the mapping configuration information in the container execution configuration module of the gateway, convert a request for accessing the three-party interface according to the instantiated container, and access the three-party interface through the gateway.

[0103] In an embodiment of the present application, the first obtaining module can be further configured to:

[0104] The interface name, interface request type, input parameter, protocol, output parameter, and / or request header data of the three-party interface are described in a schema language and uploaded to the gateway;

[0105] The gateway parses the schema language to obtain the interface name, interface request type, input parameter, protocol, output parameter, and / or request header data corresponding to the three-party interface, and stores the parsed interface name, interface request type, input parameter, protocol, output parameter, and / or request header data corresponding to the three-party interface in a database;

[0106] The interface name, interface request type, input parameter, protocol, output parameter, and / or request header data of the three-party interface are configuration information of the three-party interface.

[0107] In an embodiment of the present application, the mapping module can be further configured to:

[0108] mapping configuration of the interface in the container execution configuration module of the gateway and the input parameter of the third-party interface;

[0109] mapping configuration of the interface in the container execution configuration module of the gateway and the output parameter of the third-party interface;

[0110] mapping configuration of the interface in the container execution configuration module of the gateway and the request header of the third-party interface;

[0111] mapping configuration of the interface in the container execution configuration module of the gateway and the output parameter of the third-party interface;

[0112] mapping configuration of the interface in the container execution configuration module of the gateway and the policy of the third-party interface;

[0113] mapping configuration of the interface in the container execution configuration module of the gateway and the protocol of the third-party interface;

[0114] mapping configuration of the interface in the container execution configuration module of the gateway and the container execution of the third-party interface.

[0115] In an embodiment of the present application, the access module can be further configured to:

[0116] obtain the invoked third-party interface and each configuration parameter in the container execution configuration module corresponding to the third-party interface;

[0117] dynamicize the static third-party interface and each configuration parameter in the container execution configuration module corresponding to the third-party interface to generate an instantiated container;

[0118] transform each configuration parameter in the instantiated container to obtain information recognizable by the invoked third-party interface;

[0119] perform the third-party interface calling according to the information recognizable by the invoked third-party interface.

[0120] In an embodiment, the description of the specific implementation function can refer to steps S101-S104.

[0121] Those skilled in the art can understand that all or part of the processes in the method of the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable storage medium can include any entity or device, medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code. It should be noted that the contents included in the computer readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable storage medium does not include electrical carrier signals and telecommunication signals.

[0122] Further, the present application also provides a computer readable storage medium. In an embodiment of the computer readable storage medium according to the present application, the computer readable storage medium can be configured to store a program for executing the method of the three-party interface configuration gateway according to the above-mentioned method embodiments, which can be loaded and run by the processor to implement the method of the three-party interface configuration gateway according to the above-mentioned method embodiments. For the convenience of description, only the parts related to the embodiments of the present application are shown, and the specific technical details not disclosed are referred to the method part of the embodiments of the present application. The computer readable storage medium can be a memory device formed by various electronic devices, and optionally, the computer readable storage medium in the embodiments of the present application is a non-transitory computer readable storage medium.

[0123] Further, the present application also provides an electronic device. In an embodiment of the electronic device according to the present application, as shown in Figure 4 the electronic device includes a processor and a memory. The memory can be configured to store a program for executing the method of the three-party interface configuration gateway according to the above-mentioned method embodiments, and the processor can be configured to execute the program in the memory, which includes but is not limited to the program for executing the method of the three-party interface configuration gateway according to the above-mentioned method embodiments. For the convenience of description, only the parts related to the embodiments of the present application are shown, and the specific technical details not disclosed are referred to the method part of the embodiments of the present application. The electronic device can be a control device formed by various electronic devices.

[0124] Further, it should be understood that, since the setting of each module is only for illustrating the functional units of the device of the present application, the corresponding physical device of the module can be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of the software and the hardware. Therefore, the number of each module in the figure is only illustrative.

[0125] Those skilled in the art can understand that each module in the device can be adaptively split or combined. Such splitting or combining of the specific module does not cause the technical solution to deviate from the principles of the present application, and therefore, the technical solution after splitting or combining will fall within the protection scope of the present application.

[0126] Obviously, the above embodiments of the present application are only examples for clearly illustrating the present application, and are not intended to limit the implementation manners of the present application. For those skilled in the art, on the basis of the above description, other different forms of changes or variations can also be made, and it is impossible to enumerate all the implementation manners here. Any obvious changes or variations derived from the technical solutions of the present application still fall within the protection scope of the present application.

Claims

1. A method of configuring a gateway as a three-party interface, characterized by The method comprises the following steps: obtaining configuration information of a three-party interface, using a schema language to describe the interface name, interface request type, input parameter, protocol, output parameter and / or request header data of the three-party interface, and uploading the description to a gateway and performing analysis and registration on the gateway; when accessing the three-party interface, directly calling the gateway to obtain the configuration information of the three-party interface after analysis and registration on the gateway; mapping and configuring the configuration information of the three-party interface with the interface in the container execution configuration module of the gateway, including: mapping the input parameter, output parameter and request header of the three-party interface with the interface in the container execution configuration module of the gateway, configuring the strategy and protocol of the three-party interface with the interface in the container execution configuration module of the gateway, and arranging the container execution of the three-party interface with the interface in the container execution configuration module of the gateway; obtaining an instantiated container according to the mapping configuration information in the container execution configuration module of the gateway, and converting an access request of the three-party interface to access the three-party interface through the gateway; the method of obtaining an instantiated container according to the mapping configuration information in the container execution configuration module of the gateway comprises: obtaining the called three-party interface and each configuration parameter in the container execution configuration module corresponding to the three-party interface; dynamically generating an instantiated container by dynamically configuring each configuration parameter in the container execution configuration module corresponding to the three-party interface.

2. The method of claim 1, wherein, The method of obtaining the configuration information of the three-party interface and performing analysis and registration on the gateway comprises: the gateway analyzes the schema language to obtain the interface name, interface request type, input parameter, protocol, output parameter and / or request header data corresponding to the three-party interface, and stores the analyzed interface name, interface request type, input parameter, protocol, output parameter and / or request header data corresponding to the three-party interface in a database; wherein the interface name, interface request type, input parameter, protocol, output parameter and / or request header data of the three-party interface are the configuration information of the three-party interface.

3. The method of claim 1, wherein, The method of converting an access request of the three-party interface to access the three-party interface through the gateway comprises: converting each configuration parameter in the instantiated container to obtain information recognizable by the called three-party interface; calling the three-party interface according to the information recognizable by the called three-party interface.

4. An apparatus for a three-party interface configuration gateway, the apparatus comprising: The method comprises the following steps: a first obtaining module is configured to obtain configuration information of a three-party interface, use a schema language to describe the interface name, interface request type, input parameter, protocol, output parameter and / or request header data of the three-party interface, and upload the description to a gateway and perform analysis and registration on the gateway; a second obtaining module is configured to, when accessing the three-party interface, directly call the gateway to obtain the configuration information of the three-party interface after analysis and registration on the gateway; The mapping module is configured to map the configuration information of the third-party interface to the interface in the container execution configuration module of the gateway, including: mapping of the interface in the container execution configuration module of the gateway to input parameters, output parameters and request headers of the third-party interface, configuration of the interface in the container execution configuration module of the gateway to policies and protocols of the third-party interface, and orchestration of the interface in the container execution configuration module of the gateway to container execution of the third-party interface. The access module is configured to obtain an instantiated container according to the mapping configuration information in the container execution configuration module of the gateway, and to convert an access request of the third-party interface according to the instantiated container, so as to access the third-party interface through the gateway. The obtaining of the instantiated container according to the mapping configuration information in the container execution configuration module of the gateway includes: obtaining a called third-party interface and each configuration parameter in a container execution configuration module corresponding to the third-party interface; and dynamically changing the static third-party interface and each configuration parameter in the container execution configuration module corresponding to the third-party interface to generate the instantiated container.

5. The apparatus of claim 4, wherein, The first obtaining module can be further configured to: The gateway parses the schema language to obtain an interface name, an interface request type, input parameters, a protocol, output parameters and / or request header data of the third-party interface, and stores the parsed interface name, interface request type, input parameters, protocol, output parameters and / or request header data of the third-party interface in a database. The interface name, interface request type, input parameters, protocol, output parameters and / or request header data of the third-party interface are configuration information of the third-party interface.

6. The apparatus of claim 4, wherein, The access module can be further configured to: convert each configuration parameter in the instantiated container to obtain information recognizable by the called third-party interface; and call the third-party interface according to the information recognizable by the called third-party interface.

7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 3.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the method of any one of claims 1 to 3.

Citation Information

Patent Citations

  • HIS (Hospital Information System) interface calling method and HIS interface configuration method

    CN105808365A

  • Universal service conversion method and system based on Kubernetes

    CN110442421A