Third-party service system interface docking method and system

By building a template management library and selecting the corresponding docking template to generate http requests, the problem of large workload and long construction period of third-party business system interface docking in the existing technology is solved, and fast and efficient interface docking is achieved.

CN120067182APending Publication Date: 2025-05-30THINVENT DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411922943.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, the docking of third-party business system interfaces is achieved through one-to-one docking, resulting in large workload and long docking period.

Method used

Build a template management library including several interface templates, link to the local system, select the corresponding docking template based on the docking request, and generate an http request through the template to complete the interface docking.

Benefits of technology

The rapid docking is achieved through the unified format interface template, which improves the efficiency of interface docking, reduces operation and maintenance costs, and shortens the docking cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067182A_ABST
    Figure CN120067182A_ABST
Patent Text Reader

Abstract

The invention provides a third-party service system interface docking method and system, and the method comprises the steps: constructing a template management library comprising a plurality of interface templates, enabling the interface templates to correspond to interfaces of a third-party service system, and linking the template management library to a local system; when the local system asks for a docking request, selecting a docking template corresponding to the docking request from the plurality of interface templates; and generating an http request based on the docking request and the docking template, and sending the http request to an interface of the third-party service system to complete interface docking. According to the method, interface templates in a unified format are respectively constructed for interfaces of different types of third-party service systems, when interface docking is needed, only the corresponding docking template needs to be selected, and the http request is generated through the docking template, so that rapid docking with the interfaces of the third-party service systems can be realized, and the interface docking efficiency is improved. The interface docking efficiency is effectively improved, the operation and maintenance cost is reduced, and the interface docking period is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of interface management, and particularly relates to a method and system for docking interfaces of a third-party business system. Background Art

[0002] With the increasing development of IT informatization, internal systems need to dock with more and more third-party business systems, and the docking method usually adopts the form of interfaces.

[0003] The existing method for realizing the docking of interfaces with a third-party business system is generally to dock a number of interfaces one by one according to the interface docking specifications formulated by the third-party business system. However, due to the large number of business interfaces formulated by the third party, the one-by-one docking method greatly increases the workload and lengthens the docking period. Summary of the Invention

[0004] Aiming at the deficiencies of the prior art, the purpose of the present invention is to provide a method and system for docking interfaces of a third-party business system, aiming to solve the technical problems in the prior art that a large amount of work and a long docking period are required to dock a number of interfaces through the one-by-one docking method.

[0005] To achieve the above purpose, in the first aspect, an embodiment of the present application provides a method for docking interfaces of a third-party business system, including the following steps:

[0006] Construct a template management library including a number of interface templates, where the interface templates correspond to the interfaces of the third-party business system, and link the template management library to the local system;

[0007] When the local system requests a docking, select a docking template corresponding to the docking request from a number of the interface templates;

[0008] Generate an http request based on the docking request and the docking template, and send it to the interface of the third-party business system to complete the interface docking.

[0009] Compared with the prior art, the beneficial effect of the present invention is that: interface templates with a unified format are respectively constructed for the interfaces of different types of third-party business systems. When interface docking is required, only the corresponding docking template needs to be selected, and the http request is generated through the docking template, so as to realize the rapid docking with the interfaces of the third-party business system, effectively improving the efficiency of interface docking, reducing the operation and maintenance cost, and shortening the interface docking period.

[0010] Further, the step of constructing a template management library including a number of interface templates, where the interface templates correspond to the interfaces of the third-party business system includes:

[0011] Obtain the interface specifications of several interfaces of the third-party business system, and extract the request parameter formats from the interface specifications;

[0012] Configure the sql query module and the module type corresponding to the sql query module according to the request parameter format;

[0013] Deduplicate several of the module types to obtain several specified types, combine the specified types and the sql query modules corresponding to the specified types into interface templates, and combine several of the interface templates into a template management library.

[0014] Furthermore, the sql query module includes parameter names, parameter codes, and parameter types.

[0015] Furthermore, after the step of configuring the sql query module and the module type corresponding to the sql query module according to the request parameter format, it further includes:

[0016] Input the fabricated name corresponding to the parameter name, the fabricated code corresponding to the parameter code, and the fabricated type corresponding to the parameter type into the sql query module, so as to generate a fabricated request parameter format through the sql query module;

[0017] Compare the fabricated request parameter format with the request parameter format to verify whether the sql query module meets the interface specifications.

[0018] Furthermore, the step of selecting the docking template corresponding to the docking request from several of the interface templates is specifically:

[0019] Extract the request category from the docking request, compare the request category with several of the specified types respectively, so as to select a docking type from several of the specified types, and obtain the docking template corresponding to the docking type.

[0020] Furthermore, the step of generating an http request based on the docking request and the docking template is specifically:

[0021] Extract the parameter information corresponding to the sql query module from the docking request, and extract the url from the docking request, and splice the parameter information and the url into an http request.

[0022] Furthermore, after the step of generating an http request based on the docking request and the docking template and sending it to the interface of the third-party business system to complete the interface docking, it further includes:

[0023] Select the successfully docked interface as the access interface, continuously obtain the real-time interface specification of the access interface, obtain the real-time request parameter format from the real-time interface specification, and verify the SQL query module based on the real-time request parameter format.

[0024] In a second aspect, an embodiment of the present application provides a third-party service system interface docking system, which is applied to the third-party service system interface docking method described in the first aspect above. The system includes:

[0025] A construction module, configured to construct a template management library including a plurality of interface templates, where the interface templates correspond to the interfaces of the third-party service system, and link the template management library to the local system;

[0026] A selection module, configured to, when the local system requests a docking request, select a docking template corresponding to the docking request from the plurality of interface templates;

[0027] An execution module, configured to generate an HTTP request based on the docking request and the docking template, and send it to the interface of the third-party service system to complete the interface docking.

[0028] In a third aspect, an embodiment of the present application provides a computer, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the third-party service system interface docking method described in the first aspect above is implemented.

[0029] In a fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the third-party service system interface docking method described in the first aspect above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a flowchart of the third-party service system interface docking method in the first embodiment of the present invention;

[0031] Figure 2 It is a structural block diagram of the third-party service system interface docking system in the second embodiment of the present invention;

[0032] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0033] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.

[0034] It should be noted that when an element is referred to as being "fixed on" another element, it can be directly on the other element or there may also be an intermediate element. When an element is considered to be "connected to" another element, it can be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0036] Please refer to Figure 1 , the method for docking the third-party service system interface provided by the first embodiment of the present invention includes the following steps:

[0037] S10: Construct a template management library including several interface templates, where the interface templates correspond to the interfaces of the third-party service system, and link the template management library to the local system;

[0038] The step S10 includes:

[0039] S110: Obtain the interface specifications of several interfaces of the third-party service system, and extract the request parameter formats from the interface specifications;

[0040] S120: Configure the sql query module and the module type corresponding to the sql query module according to the request parameter format;

[0041] It can be understood that if the interface specification changes, only the sql query module needs to be adjusted according to the changed request parameter format. The sql query module includes parameter names, parameter encodings, parameter types. In some embodiments, the sql query module further includes whether it is required. It should be noted that if there is a scenario where a joined table query is required to obtain the result for the interface, the sql query module further includes an associated configuration appendix table.

[0042] S130: Perform a duplicate removal process on several of the module types to obtain several specified types, combine the specified types and the sql query modules corresponding to the specified types into interface templates, and combine several of the interface templates into a template management library;

[0043] For the interfaces of the same type, their docking rules are basically the same, and only the docking parameters need to be adjusted. On the premise that the SQL query module has been integrated, only the SQL query modules corresponding to the interfaces of different types need to be retained.

[0044] Preferably, the step S10 further includes:

[0045] S140: Input the constructed name corresponding to the parameter name, the constructed code corresponding to the parameter code, and the constructed type corresponding to the parameter type into the SQL query module, so as to generate a format of the parameter to be requested through the SQL query module;

[0046] S150: Compare the format of the parameter to be requested with the format of the request parameter to verify whether the SQL query module meets the interface specification;

[0047] That is, through the constructed SQL query module, a virtual request is to be generated, and it is determined whether the format of the parameter to be requested conforms to the structure specification of the interface to be docked. If the SQL query module meets the interface specification, it is determined that the SQL query module can be used normally.

[0048] S20: When the local system submits a docking request, select the docking template corresponding to the docking request from several interface templates;

[0049] Specifically, extract the request category from the docking request, compare the request category with several specified types respectively, select the docking type from several specified types, and obtain the docking template corresponding to the docking type. It can be understood that the meaning of the docking type is the same as that of the specified type, and the meaning of the docking template is the same as that of the interface template.

[0050] S30: Generate an HTTP request based on the docking request and the docking template, and send it to the interface of the third-party business system to complete the interface docking;

[0051] Extract the parameter information corresponding to the SQL query module from the docking request, and extract the URL from the docking request, and splice the parameter information and the URL into an HTTP request. When the interface of the third-party business system receives the HTTP request and determines that it conforms to the specification, the output parameter is fed back to the local system, thereby completing the interface docking.

[0052] Construct the interface templates in a unified format for the interfaces of different types of third-party business systems. When interface docking is required, only select the corresponding docking template, and generate the HTTP request through the docking template, then the rapid docking with the interfaces of the third-party business systems can be achieved, effectively improving the efficiency of interface docking, reducing the operation and maintenance costs, and shortening the cycle of interface docking.

[0053] Preferably, the method further includes:

[0054] S40: Select the interface with completed docking as the access interface, continuously obtain the real-time interface specification of the access interface, obtain the real-time request parameter format from the real-time interface specification, and verify the SQL query module based on the real-time request parameter format;

[0055] By obtaining the real-time interface specification and comparing it with the SQL query module, it is possible to prevent the situation where interface docking needs to be redone due to changes in the interface specifications of the interfaces of the third-party business systems, effectively ensuring stable and long-term docking operation and ensuring business continuity.

[0056] Please refer to Figure 2 , the second embodiment of the present invention provides a third-party business system interface docking system, which is applied to the third-party business system interface docking method in the above embodiment, and those that have been described will not be repeated. As used hereinafter, terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0057] The system includes:

[0058] A construction module 10 for constructing a template management library including several interface templates, where the interface templates correspond to the interfaces of the third-party business systems, and linking the template management library to the local system;

[0059] The construction module 10 includes:

[0060] A first unit for obtaining the interface specifications of several interfaces of the third-party business system and extracting the request parameter format from the interface specifications;

[0061] A second unit for configuring the SQL query module and the module type corresponding to the SQL query module according to the request parameter format;

[0062] A third unit, configured to remove duplicates from a number of the module types to obtain a number of specified types, combine the specified types and the SQL query modules corresponding to the specified types into an interface template, and combine a number of the interface templates into a template management library;

[0063] Preferably, the building module 10 further includes:

[0064] A fourth unit, configured to input a constructed name corresponding to the parameter name, a constructed code corresponding to the parameter code, and a constructed type corresponding to the parameter type into the SQL query module, so as to generate a constructed request parameter format through the SQL query module;

[0065] A fifth unit, configured to compare the constructed request parameter format with the request parameter format to verify whether the SQL query module meets the interface specification;

[0066] A selection module 20, configured to select a docking template corresponding to the docking request from a number of the interface templates when the local system submits a docking request;

[0067] The selection module 20 includes:

[0068] A sixth unit, configured to extract a request category from the docking request, compare the request category with a number of the specified types respectively, so as to select a docking type from a number of the specified types, and obtain a docking template corresponding to the docking type;

[0069] An execution module 30, configured to generate an HTTP request based on the docking request and the docking template, and send it to the interface of a third-party business system to complete interface docking;

[0070] The execution module 30 includes:

[0071] A seventh unit, configured to extract parameter information corresponding to the SQL query module from the docking request, extract a URL from the docking request, and splice the parameter information and the URL into an HTTP request;

[0072] Preferably, the system further includes:

[0073] A monitoring module 40, configured to select the docked interface as an access interface, continuously obtain the real-time interface specification of the access interface, obtain the real-time request parameter format from the real-time interface specification, and verify the SQL query module based on the real-time request parameter format.

[0074] The present invention also provides a computer, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for docking the interface of the third-party service system as described in the above technical solution is implemented.

[0075] The present invention also provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for docking the interface of the third-party service system as described in the above technical solution is implemented.

[0076] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0077] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.

Claims

1. A third-party business system interface docking method, characterized in that: The following steps are involved: Constructing a template management library including several interface templates, wherein the interface templates correspond to interfaces of third-party business systems, and linking the template management library to a local system; When the local system submits a connection request, selecting a connection template corresponding to the connection request from a plurality of interface templates; An http request is generated based on the docking request and the docking template, and sent to the interface of the third-party business system to complete the interface docking.

2. The third-party business system interface docking method according to claim 1, characterized in that: The step of constructing a template management library including a plurality of interface templates, wherein the interface templates correspond to interfaces of third-party business systems includes: Obtain interface specifications of several interfaces of a third-party business system, and extract request parameter formats from the interface specifications; Configure a sql query module and a module type corresponding to the sql query module according to the request parameter format; Deduplication processing is performed on several of the module types to obtain several specified types, the specified types and the SQL query modules corresponding to the specified types are combined into an interface template, and several of the interface templates are combined into a template management library.

3. The third-party business system interface docking method according to claim 2, characterized in that: The sql query module includes parameter name, parameter code, and parameter type.

4. The third-party business system interface docking method according to claim 3, characterized in that: After the step of configuring the SQL query module and the module type corresponding to the SQL query module according to the request parameter format, the method further includes: Inputting a simulated name corresponding to the parameter name, a simulated code corresponding to the parameter code, and a simulated type corresponding to the parameter type into the SQL query module, so as to generate a proposed request parameter format through the SQL query module; The proposed request parameter format is compared with the request parameter format to verify whether the SQL query module meets the interface specification.

5. The third-party business system interface docking method according to claim 2, characterized in that: The step of selecting a docking template corresponding to the docking request from a plurality of interface templates is specifically as follows: A request category is extracted from the docking request, the request category is compared with a plurality of the specified types respectively, a docking type is selected from the plurality of the specified types, and a docking template corresponding to the docking type is obtained.

6. The third-party business system interface docking method according to claim 2, characterized in that: The step of generating an http request based on the docking request and the docking template is specifically as follows: Parameter information corresponding to the sql query module is extracted from the connection request, and a url is extracted from the connection request, and the parameter information and the url are spliced ​​into an http request.

7. The third-party business system interface docking method according to claim 2, characterized in that: After the step of generating an http request based on the docking request and the docking template and sending the request to the interface of the third-party business system to complete the interface docking, the method further includes: The interface that has been connected is selected as the access interface, and the real-time interface specification of the access interface is continuously obtained, the real-time request parameter format is obtained from the real-time interface specification, and the SQL query module is verified based on the real-time request parameter format.

8. A third-party business system interface docking system, applied to the third-party business system interface docking method according to any one of claims 1 to 7, characterized in that: The system comprises: A construction module, used to construct a template management library including a plurality of interface templates, wherein the interface templates correspond to interfaces of a third-party business system, and link the template management library to a local system; A selection module, configured to select a docking template corresponding to the docking request from a plurality of interface templates when the local system submits a docking request; The execution module is used to generate an http request based on the docking request and the docking template, and send it to the interface of the third-party business system to complete the interface docking.

9. A computer 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 third-party business system interface docking method according to any one of claims 1 to 7 is implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the third-party business system interface docking method as described in any one of claims 1 to 7 is implemented.