A method for online connection of three-party interfaces
By creating and modifying three-party interface scripts online, the problem of low efficiency in traditional JAVA system joint debugging is solved, and efficient and accurate three-party interface online docking is achieved.
Patent Information
- Application Number
- CN202411377545.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Traditional JAVA systems cannot be modified online when connecting to third-party interfaces, resulting in low joint debugging efficiency and the need to repeatedly modify code, compile, package, and launch multiple processes.
Create the first script by obtaining the interface information of the three-party interface, and modify it into the second script according to business needs to implement online joint debugging and online modification until the entire business process is normal.
It improves the efficiency of joint debugging and docking, ensures the accuracy and security of scripts, and ensures the effectiveness and efficient operation of online docking of three-party interfaces.
Smart Images

Figure CN119512774B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of online joint debugging of three-party interfaces, and in particular to a method for online docking of three-party interfaces. Background Art
[0002] With the widespread adoption of digitalization and internet technologies, businesses and organizations increasingly need to integrate and interact with third-party systems to meet broader business needs and facilitate data sharing. Data integration between systems has become crucial to enable data flow and sharing. Consequently, business systems often require coordinated debugging and integration with third-party interfaces.
[0003] However, traditional JAVA systems cannot be modified online during integration. Joint debugging requires repeated code modification, compilation, packaging, and deployment, significantly impacting joint debugging efficiency.
[0004] Therefore, in order to overcome the above technical problems, the present invention provides a method for online docking of a three-party interface. Summary of the Invention
[0005] The present invention provides a method for online docking of a three-party interface, which is used to effectively create a first script by obtaining interface information of the three-party interface, and modify the first script according to the business requirements of the three-party interface joint debugging and docking, so as to obtain a second script, which is beneficial to ensuring the accuracy of the script, and performs a first online joint debugging on the second script, and when the online joint debugging is successful, calls the three-party interface based on the second script, and performs a second online joint debugging on the three-party interface, and when there is a problem, realizes online modification of the second script until the entire business process runs normally, and effectively improves the joint debugging and docking efficiency by joint debugging the three-party interface in the online running state.
[0006] A method for online connection of a three-party interface, comprising:
[0007] Step 1: Obtain the interface information of the three-party interface and create the first script based on the interface information;
[0008] Step 2: Obtain the business requirements for the three-party interface joint debugging and docking, modify the first script to obtain the second script according to the business requirements, and perform the first online joint debugging on the second script;
[0009] Step 3: After the online joint debugging is successful, call the third-party interface corresponding to the second script and perform a second online joint debugging on the third-party interface. If there is an exception, modify the second script online until the entire business process runs normally.
[0010] Preferably, a method for online docking of a three-party interface, in step 1, obtaining interface information of the three-party interface and creating a first script according to the interface information, includes:
[0011] S101: Obtain an online joint debugging and docking service, and read the online joint debugging and docking service to determine the interface label of the online docking three-party interface and the service label of the online joint debugging and docking service;
[0012] S102: Generate an access request based on the service tag of the online joint debugging service and the interface tag of the three-party interface;
[0013] S103: Input the access request into the preset interface management library for verification, and when the verification passes, retrieve the interface information of the three-party interface based on the access request;
[0014] S104: Read the script template and determine the script header corresponding to the script template;
[0015] S105: Divide the interface information of the three-party interface according to the script header, and obtain sub-interface information corresponding to each script header;
[0016] S106: Map the corresponding sub-interface information in the script template according to the script header, and complete the creation of the first script.
[0017] Preferably, a method for online docking of a three-party interface, in S102, generating an access request according to a service tag of the online joint debugging docking service and an interface tag of the three-party interface, includes:
[0018] Retrieving a first access request element from a preset database based on a service tag of the online joint debugging service;
[0019] Retrieving a second access request element from a preset database based on an interface tag of the three-party interface;
[0020] The first access request element and the second access request element are combined to generate an access request.
[0021] Preferably, a method for online connection to a three-party interface inputs an access request into a preset interface management library for verification, including:
[0022] Reading a preset interface database to determine the constituent elements of the preset interface database;
[0023] Among them, the components of the preset interface database include: request verification data sub-database and information retrieval sub-database;
[0024] Read the access request and determine the first access request element and the second access request element
[0025] Inputting the first access request element into the request verification data sub-database for a first traversal, and determining whether there is an authorization code matching the first access request element in the verification data sub-database according to the first traversal result;
[0026] If there is no authorization code matching the first access request element in the verification database sub-database, it is determined that the verification has not passed;
[0027] If the authorization code matching the first access request element exists in the verification data sub-database, the data interface form matching the authorization code is retrieved from the request verification data sub-database;
[0028] Input the second access request element in the access request into the request verification data sub-repository and perform a second traversal in the data interface form, and determine whether there is a data interface consistent with the second access request element in the data interface form based on the second traversal result;
[0029] If a data interface that is consistent with the second access request element exists in the data interface table, the verification is determined to be passed, and the interface information of the third-party interface is retrieved from the information retrieval sub-library based on the data interface that is consistent with the second access request element in the data interface table;
[0030] If the data interface list does not contain a data interface that is consistent with the second access request element, it is determined that the verification has not passed.
[0031] Preferably, a method for online connection of a three-party interface further includes:
[0032] If there is no authorization code matching the first access request element in the verification database sub-database, a first alarm operation is performed;
[0033] If the data interface form does not contain a data interface that is consistent with the second access request element, a second alarm operation is performed.
[0034] Preferably, a method for online docking of a three-party interface, in step 2, obtaining the business requirements of the three-party interface joint debugging and docking, and modifying the first script according to the business requirements to obtain the second script, includes:
[0035] S201: Read the business requirements for the three-party interface joint debugging and docking, determine the requirement items corresponding to the business requirements, and read the requirement content and item names corresponding to the requirement items;
[0036] S202: Obtaining a script content format of the first script, and adjusting the format of the item name according to the script content format of the first script to obtain a script index;
[0037] S203: Read the demand data corresponding to the demand item, determine the execution target corresponding to the demand data and the execution logic corresponding to each execution target;
[0038] S204: performing a first positioning in the first script based on the script index to obtain the region to be modified in the first script, and performing a second positioning in the region to be modified according to the execution target to obtain the content of the script to be modified;
[0039] S205: Adjust parameters of the script to be modified based on the execution logic of the execution target to obtain a second script.
[0040] Preferably, in a method for online connection of a three-party interface, in S201, the business demand items include: an interface call item and a data processing logic item.
[0041] Preferably, in a method for online docking of a three-party interface, in step 2, performing a first online joint debugging on the second script includes:
[0042] Reading the working status of the local network, and when the working status of the local network is in an on state, generating a benchmark input parameter based on the attribute information of the three-party interface, and obtaining a benchmark result corresponding to the benchmark input parameter;
[0043] Uploading the second script to the processing terminal, starting the second script based on the benchmark input parameters in the processing terminal, and outputting the running result of the second script in the processing terminal;
[0044] Compare the running results with the benchmark results to determine whether the second script completes the first online joint debugging;
[0045] When the running result matches the benchmark result, it is determined that the second script completes the first online joint debugging;
[0046] Otherwise, the second script is subjected to online parameter adjustment until the running result matches the benchmark result.
[0047] Preferably, a method for online docking of a three-party interface, in step 3, when the online joint debugging is successful, calling the three-party interface corresponding to the second script, and performing a second online joint debugging on the three-party interface, including:
[0048] Read the calling method and calling requirements of the corresponding third-party interface in the second script;
[0049] Call the third-party interface according to the calling method and calling requirements, and at the same time, obtain the current network connection status. When the network connection is normal, read the entire business process;
[0050] Determine the parameter transmission channel corresponding to the three-party interface based on the entire business process, and add a transmission vector for each interface based on the parameter transmission channel;
[0051] Build a joint debugging parameter group for each interface based on the transmission vector and the entire business process;
[0052] The joint debugging parameter group of the current interface is transmitted to the corresponding remaining two interfaces according to the transmission channel, and the second online joint debugging of the three interfaces is implemented according to the receiving parameter group of the corresponding two interfaces.
[0053] Preferably, a method for online docking of a three-party interface, performing a second online joint debugging of the three-party interface according to a receiving parameter group corresponding to the two-party interface, includes:
[0054] Read the receiving parameter groups corresponding to the two interfaces;
[0055] Determine whether the joint debugging parameter group is consistent with the received parameters;
[0056] When the joint debugging parameter group is consistent with the receiving parameter group, it is determined that the parameter transmission from the current interface to the remaining two interfaces is normal;
[0057] Otherwise, it is determined that the parameter transmission from the current interface to the remaining two interfaces is abnormal, and at the same time, the abnormal interface is determined, and the received parameter group received by the abnormal interface is regarded as the abnormal parameter group;
[0058] Read the joint debugging parameter group of the current party interface, and match the target correction policy set in the preset policy library according to the current joint debugging parameter group;
[0059] Input the abnormal parameter group into the target correction strategy set for matching, and output the target correction strategy;
[0060] Read the target correction strategy, determine the correction parameters, and modify the second script online based on the correction parameters until the entire business process runs normally.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] 1. By obtaining the interface information of the three-party interface, the first script can be effectively created, and the first script can be modified according to the business requirements of the three-party interface joint debugging to obtain the second script, which is conducive to ensuring the accuracy of the script. By performing the first online joint debugging on the second script, and when the online joint debugging is successful, the three-party interface is called based on the second script, and the second online joint debugging is performed on the three-party interface, and when there is a problem, the second script is modified online until the entire business process runs normally. By joint debugging the three-party interface in the online running state, the efficiency of joint debugging and docking is effectively improved.
[0063] 2. By determining the first access request element and the second access request element in the access request, the first traversal operation and the second traversal operation are performed in the request verification data sub-library in the corresponding preset interface database respectively, and verification is performed according to the results of the first traversal operation and the second traversal operation. When the verification passes, the sub-library can be called based on the information in the preset interface database to realize the retrieval of the interface information of the three-party interface. By verifying the access request, the security of the retrieval of the interface information of the three-party interface is effectively guaranteed, thereby ensuring the effectiveness of the online docking of the three-party interface.
[0064] 3. Read the receiving parameter group of the corresponding two-party interfaces; determine whether the joint debugging parameter group is consistent with the receiving parameter group; when the joint debugging parameter group is consistent with the receiving parameter group, it is determined that the parameter transmission from the current party interface to the remaining two party interfaces is normal; otherwise, it is determined that the parameter transmission from the current party interface to the remaining two party interfaces is abnormal. At the same time, the abnormal party interface is determined, and the receiving parameter group received by the abnormal party interface is used as the abnormal parameter group; secondly, read the joint debugging parameter group of the current party interface, and match the target correction policy set in the preset policy library according to the current joint debugging parameter group; input the abnormal parameter group into the target correction policy set for matching, and output the target correction policy; finally, read the target correction policy, determine the correction parameters, and modify the second script online based on the correction parameters until the entire business process runs normally, ensuring the accurate operation of the three-party interface and improving the efficiency of the three-party interface joint debugging.
[0065] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.
[0066] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0068] Figure 1 This is a flow chart of a method for online docking of a three-party interface in an embodiment of the present invention;
[0069] Figure 2 This is a flowchart of step 1 in a method for online connection of a three-party interface in an embodiment of the present invention;
[0070] Figure 3 This is a flowchart of step 2 in a method for online connection of a three-party interface in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0072] In one embodiment, this embodiment provides a method for online docking of a three-party interface, such as Figure 1 As shown, including:
[0073] Step 1: Obtain the interface information of the three-party interface and create the first script based on the interface information;
[0074] Step 2: Obtain the business requirements for the three-party interface joint debugging and docking, modify the first script to obtain the second script according to the business requirements, and perform the first online joint debugging on the second script;
[0075] Step 3: After the online joint debugging is successful, call the third-party interface corresponding to the second script and perform a second online joint debugging on the third-party interface. If there is a problem, modify the second script online until the entire business process runs normally.
[0076] In this embodiment, the interface information may include the interface name, request method, interface path, request parameters, etc. of the three-party interface.
[0077] In this embodiment, the three-party interface may be an interface between three different entities or systems, and the three-party interface is determined according to specific business conditions, for example: service provider-application developer-user, etc.
[0078] In this embodiment, the first script may be a descriptive language created according to the interface information and used to control interface calls.
[0079] In this embodiment, the second script may be a script that implements interface calling and data processing logic based on business requirements.
[0080] In this embodiment, the first online joint debugging can be used to monitor the operation of the second script, and realize the joint debugging of the second script by evaluating the monitoring results, wherein the first online joint debugging can include testing of signals in the script connection, testing of each interface in the script, etc.
[0081] In this embodiment, the second online joint debugging may be performing joint debugging tests on the three-party interfaces, so as to achieve normal parameter transmission or data interaction among the three-party interfaces.
[0082] The working principle and beneficial effects of the above technical solution are: by obtaining the interface information of the three-party interface, the first script can be effectively created, and the first script can be modified according to the business needs of the three-party interface joint debugging and docking, so as to obtain the second script, which is conducive to ensuring the accuracy of the script, and by performing the first online joint debugging on the second script, and when the online joint debugging is successful, the three-party interface is called based on the second script, and the second online joint debugging is performed on the three-party interface, and when there is a problem, the second script is modified online until the entire business process runs normally, and the efficiency of the joint debugging and docking is effectively improved by joint debugging the three-party interface in the online running state.
[0083] In one embodiment, this embodiment provides a method for online docking of a three-party interface, such as Figure 2 As shown, in step 1, the interface information of the three-party interface is obtained, and a first script is created according to the interface information, including:
[0084] S101: Obtain an online joint debugging and docking service, and read the online joint debugging and docking service to determine the interface label of the online docking three-party interface and the service label of the online joint debugging and docking service;
[0085] S102: Generate an access request based on the service tag of the online joint debugging service and the interface tag of the three-party interface;
[0086] S103: Input the access request into the preset interface management library for verification, and when the verification passes, retrieve the interface information of the three-party interface based on the access request;
[0087] S104: Read the script template and determine the script header corresponding to the script template;
[0088] S105: Divide the interface information of the three-party interface according to the script header, and obtain sub-interface information corresponding to each script header;
[0089] S106: Map the corresponding sub-interface information in the script template according to the script header, and complete the creation of the first script.
[0090] In this embodiment, the online joint debugging and docking service may be a service that includes three-party interfaces that need to be linked and the three parties need to perform online joint debugging.
[0091] In this embodiment, the preset interface management library is set in advance and is used to implement verification of the access request, thereby achieving acquisition of the interface information of the three-party interface.
[0092] In this embodiment, the script template may be set in advance, and the script header is used to represent the import statement at the beginning of the script.
[0093] In this embodiment, the interface label of the online interconnection three-party interface may be used to represent the representation identifier of the three-party interface, and the service label of the online interconnection service may be used to represent the representation identifier of the service.
[0094] The working principle and beneficial effects of the above technical solution are: by obtaining the online joint debugging and docking task, the interface label of the three-party interface and the business label of the online joint debugging and docking business can be effectively determined; then, an access request can be effectively generated, and by verifying the access request, the security of information retrieval can be effectively guaranteed. When the access request passes the verification, the interface information of the three-party interface can be effectively obtained, and then the script header can be determined through the script template. By processing and mapping the interface information of the three-party interface, the creation of the first script is effectively completed, thereby improving the accuracy and effectiveness of the creation of the first script.
[0095] In one embodiment, this embodiment provides a method for online docking of a three-party interface. In S102, an access request is generated based on a service tag of the online joint debugging service and an interface tag of the three-party interface, including:
[0096] Retrieving a first access request element from a preset database based on a service tag of the online joint debugging service;
[0097] Retrieving a second access request element from a preset database based on an interface tag of the three-party interface;
[0098] The first access request element and the second access request element are combined to generate an access request.
[0099] In this embodiment, the first access request element is used to represent the first character of the access request component retrieved from a preset database according to the service tag of the online joint debugging service.
[0100] In this embodiment, the second access request element is used to represent the second character of the access request component retrieved from the preset database according to the interface tag of the three-party interface.
[0101] In this embodiment, the preset database may be used to store request elements corresponding to different service labels or interface labels.
[0102] The working principle and beneficial effect of the above technical solution are: through the business tags of the online joint debugging and the interface tags of the three-party interface, the corresponding first access request element and the second access request element can be effectively retrieved in the preset database, thereby ensuring the accuracy of the generated access request.
[0103] In one embodiment, the embodiment provides a method for online docking of a three-party interface, inputting an access request into a preset interface management library for verification, including:
[0104] Reading a preset interface database to determine the constituent elements of the preset interface database;
[0105] Among them, the components of the preset interface database include: request verification data sub-database and information retrieval sub-database;
[0106] Read the access request and determine the first access request element and the second access request element
[0107] Inputting the first access request element into the request verification data sub-database for a first traversal, and determining whether there is an authorization code matching the first access request element in the verification data sub-database according to the first traversal result;
[0108] If there is no authorization code matching the first access request element in the verification database sub-database, it is determined that the verification has not passed;
[0109] If the authorization code matching the first access request element exists in the verification data sub-database, the data interface form matching the authorization code is retrieved from the request verification data sub-database;
[0110] Input the second access request element in the access request into the request verification data sub-repository and perform a second traversal in the data interface form, and determine whether there is a data interface consistent with the second access request element in the data interface form based on the second traversal result;
[0111] If a data interface that is consistent with the second access request element exists in the data interface table, the verification is determined to be passed, and the interface information of the third-party interface is retrieved from the information retrieval sub-library based on the data interface that is consistent with the second access request element in the data interface table;
[0112] If the data interface list does not contain a data interface that is consistent with the second access request element, it is determined that the verification has not passed.
[0113] In this embodiment, the components of the preset interface database include: a request verification data sub-library and an information retrieval sub-library. The request verification data sub-library stores the authorization codes of the request elements corresponding to all authorizable service tags and the interface form corresponding to the authorization code. The interface form stores all data interface information authorized by the authorization code.
[0114] In this embodiment, the first traversal is based on the result of traversing the first access request element in the request verification data sub-repository.
[0115] In this embodiment, the second traversal is based on the result of traversing the second access request element in the interface form.
[0116] In this embodiment, the request verification data sub-library is connected to the information retrieval sub-library. When the request verification data sub-library passes the request verification, the interface information of the three-party interface can be retrieved based on the information retrieval sub-library.
[0117] The working principle and beneficial effects of the above technical solution are: by determining the first access request element and the second access request element in the access request, performing the first traversal operation and the second traversal operation in the request verification data sub-library in the corresponding preset interface database respectively, and verifying according to the results of the first traversal operation and the second traversal operation, when the verification is passed, the sub-library can be called based on the information in the preset interface database to realize the retrieval of the interface information of the three-party interface. By verifying the access request, the security of the retrieval of the interface information of the three-party interface is effectively guaranteed, thereby ensuring the effectiveness of the online docking of the three-party interface.
[0118] In one embodiment, this embodiment provides a method for online connection of a three-party interface, further comprising:
[0119] If there is no authorization code matching the first access request element in the verification database sub-database, a first alarm operation is performed;
[0120] If the data interface form does not contain a data interface that is consistent with the second access request element, a second alarm operation is performed.
[0121] In this embodiment, the first alarm operation may be an alarm operation mode when the first access request element fails to pass the verification. For example, the first alarm operation may be implemented through operations such as vibration.
[0122] In this embodiment, the second alarm operation may be an alarm operation mode when the second access request element fails to pass the verification. For example, the second alarm operation may be implemented by light operation.
[0123] The beneficial effect of the above technical solution is: through different alarm operations, effective identification is achieved when the first request element or the second request element fails to pass the verification, so that the user can grasp the verification status as soon as possible and improve the efficiency of verification monitoring.
[0124] In one embodiment, this embodiment provides a method for online docking of a three-party interface, such as Figure 3 As shown, in step 2, the business requirements for the three-party interface joint debugging are obtained, and the first script is modified according to the business requirements to obtain the second script, including:
[0125] S201: Read the business requirements for the three-party interface joint debugging and docking, determine the requirement items corresponding to the business requirements, and read the requirement content and item names corresponding to the requirement items;
[0126] S202: Obtaining a script content format of the first script, and adjusting the format of the item name according to the script content format of the first script to obtain a script index;
[0127] S203: Read the demand data corresponding to the demand item, determine the execution target corresponding to the demand data and the execution logic corresponding to each execution target;
[0128] S204: performing a first positioning in the first script based on the script index to obtain the region to be modified in the first script, and performing a second positioning in the region to be modified according to the execution target to obtain the content of the script to be modified;
[0129] S205: Adjust parameters of the script to be modified based on the execution logic of the execution target to obtain a second script.
[0130] In this embodiment, the business requirement items include: an interface call item and a data processing logic item.
[0131] In this embodiment, the script index may be used to achieve positioning in the first script (ie, first positioning), thereby locking the region to be modified in the first script.
[0132] In this embodiment, the second positioning may be to lock the script content to be modified in the area to be modified according to the execution target.
[0133] In this embodiment, the execution logic of the execution target may be the execution logic such as the sequence and collaborative relationship between the execution targets.
[0134] The working principle and beneficial effects of the above technical solution are: by reading the business requirements of the three-party interface joint debugging, the item names corresponding to the business requirements can be effectively determined, and then the first positioning of the first script and the second positioning of the execution target in the area to be modified can be effectively achieved through the script index, which effectively ensures the effectiveness of the modification of the first script and the accuracy of the script.
[0135] In one embodiment, this embodiment provides a method for online docking of a three-party interface. In step 2, performing a first online joint debugging on the second script includes:
[0136] Reading the working status of the local network, and when the working status of the local network is in an on state, generating a benchmark input parameter based on the attribute information of the three-party interface, and obtaining a benchmark result corresponding to the benchmark input parameter;
[0137] Uploading the second script to the processing terminal, starting the second script based on the benchmark input parameters in the processing terminal, and outputting the running result of the second script in the processing terminal;
[0138] Compare the running results with the benchmark results to determine whether the second script completes the first online joint debugging;
[0139] When the running result matches the benchmark result, it is determined that the second script completes the first online joint debugging;
[0140] Otherwise, the second script is subjected to online parameter adjustment until the running result matches the benchmark result.
[0141] In this embodiment, the attribute information is the working conditions and working environment of the three-party interface.
[0142] In this embodiment, the benchmark input parameters are defined based on the attribute information and are used as limiting requirements for joint debugging of a three-party interface.
[0143] In this embodiment, the benchmark result is a standard result of joint debugging of the three-party interface according to the benchmark input parameters.
[0144] The working principle and beneficial effects of the above technical solution are: by ensuring that the working status of the local network is in the connected state, the benchmark input parameters of the three-party interface are effectively determined based on the attribute information of the three-party interface, so that the benchmark results corresponding to the benchmark input parameters can be effectively determined, and the second script is run, and the matching judgment between the running results and the benchmark results is made, so as to effectively realize the judgment of whether the first online joint debugging is completed, thereby ensuring the effectiveness and integrity of the first online joint debugging.
[0145] In one embodiment, this embodiment provides a method for online docking of a three-party interface. In step 3, after the online joint debugging is successful, the three-party interface corresponding to the second script is called, and a second online joint debugging is performed on the three-party interface, including:
[0146] Read the calling method and calling requirements of the corresponding third-party interface in the second script;
[0147] Call the third-party interface according to the calling method and calling requirements, and at the same time, obtain the current network connection status. When the network connection is normal, read the entire business process;
[0148] Determine the parameter transmission channel corresponding to the three-party interface based on the entire business process, and add a transmission vector for each interface based on the parameter transmission channel;
[0149] Build a joint debugging parameter group for each interface based on the transmission vector and the entire business process;
[0150] The joint debugging parameter group of the current interface is transmitted to the corresponding remaining two interfaces according to the transmission channel, and the second online joint debugging of the three interfaces is implemented according to the receiving parameter group of the corresponding two interfaces.
[0151] In this embodiment, the calling method may include, for example, an API call.
[0152] In this embodiment, the calling requirements may include: permission requirements, data restrictions (ie, data size, frequency restrictions), etc.
[0153] In this embodiment, the entire business process may be used to represent the work and coordination process between the three-party interfaces.
[0154] In this embodiment, the transmission vector is the transmission direction between data transmission channels. By adding the transmission vector of the interface, the direction of transmission on the interface can be effectively determined.
[0155] The working principle and beneficial effects of the above technical solution are: by determining the transmission vector, the joint debugging vector and the joint debugging parameter group of each interface during the second joint debugging are effectively determined, and the second online joint debugging is realized by combining the joint debugging parameter group and the transmission vector, thereby effectively ensuring the efficient docking efficiency of the joint debugging.
[0156] In one embodiment, this embodiment provides a method for online docking of a three-party interface, which implements a second online joint debugging of the three-party interface according to a receiving parameter group corresponding to the two-party interface, including:
[0157] Read the receiving parameter groups corresponding to the two interfaces;
[0158] Determine whether the joint debugging parameter group is consistent with the received parameters;
[0159] When the joint debugging parameter group is consistent with the receiving parameter group, it is determined that the parameter transmission from the current interface to the remaining two interfaces is normal;
[0160] Otherwise, it is determined that the parameter transmission from the current interface to the remaining two interfaces is abnormal, and at the same time, the abnormal interface is determined, and the received parameter group received by the abnormal interface is regarded as the abnormal parameter group;
[0161] Read the joint debugging parameter group of the current party interface, and match the target correction policy set in the preset policy library according to the current joint debugging parameter group;
[0162] Input the abnormal parameter group into the target correction strategy set for matching, and output the target correction strategy;
[0163] Read the target correction strategy, determine the correction parameters, and modify the second script online based on the correction parameters until the entire business process runs normally.
[0164] In this embodiment, the preset strategy library may be set in advance and used to store correction strategy sets (ie, target correction strategy sets) corresponding to different joint debugging parameter groups.
[0165] The working principle and beneficial effects of the above technical solution are: first, read the receiving parameter group of the corresponding two-party interface; judge whether the joint debugging parameter group is consistent with the receiving parameter; when the joint debugging parameter group is consistent with the receiving parameter group, it is determined that the parameter transmission from the current party interface to the remaining two party interfaces is normal; otherwise, it is determined that the parameter transmission from the current party interface to the remaining two party interfaces is abnormal, and at the same time, the abnormal party interface is determined, and the receiving parameter group received by the abnormal party interface is used as the abnormal parameter group; secondly, read the joint debugging parameter group of the current party interface, and match the target correction policy set in the preset policy library according to the current joint debugging parameter group; input the abnormal parameter group into the target correction policy set for matching, and output the target correction policy; finally, read the target correction policy, determine the correction parameters, and modify the second script online based on the correction parameters until the entire business process runs normally, ensuring the accurate operation of the three-party interface and improving the efficiency of the three-party interface joint debugging.
[0166] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for online docking of a three-party interface, characterized in that: include: Step 1: Obtain the interface information of the three-party interface and create the first script based on the interface information; Step 2: Obtain the business requirements for the three-party interface joint debugging and docking, modify the first script to obtain the second script according to the business requirements, and perform the first online joint debugging on the second script; Step 3: After the online joint debugging is successful, call the third-party interface corresponding to the second script and perform a second online joint debugging on the third-party interface. If there is an exception, modify the second script online until the entire business process runs normally; In step 1, the interface information of the three-party interface is obtained, and a first script is created according to the interface information, including: S101: Obtain an online joint debugging and docking service, and read the online joint debugging and docking service to determine the interface label of the online docking three-party interface and the service label of the online joint debugging and docking service; S102: Generate an access request based on the service tag of the online joint debugging service and the interface tag of the three-party interface; S103: Input the access request into the preset interface management library for verification, and when the verification passes, retrieve the interface information of the three-party interface based on the access request; S104: Read the script template and determine the script header corresponding to the script template; S105: Divide the interface information of the three-party interface according to the script header, and obtain sub-interface information corresponding to each script header; S106: Mapping the corresponding sub-interface information in the script template according to the script header to complete the creation of the first script; Input the access request into the preset interface management library for verification, including: Reading a preset interface database to determine the constituent elements of the preset interface database; Among them, the components of the preset interface database include: request verification data sub-database and information retrieval sub-database; Read the access request and determine the first access request element and the second access request element Inputting the first access request element into the request verification data sub-database for a first traversal, and determining whether there is an authorization code matching the first access request element in the verification data sub-database according to the first traversal result; If there is no authorization code matching the first access request element in the verification database sub-database, it is determined that the verification has not passed; If the authorization code matching the first access request element exists in the verification data sub-database, the data interface form matching the authorization code is retrieved from the request verification data sub-database; Input the second access request element in the access request into the request verification data sub-repository and perform a second traversal in the data interface form, and determine whether there is a data interface consistent with the second access request element in the data interface form based on the second traversal result; If a data interface that is consistent with the second access request element exists in the data interface table, the verification is determined to be passed, and the interface information of the third-party interface is retrieved from the information retrieval sub-library based on the data interface that is consistent with the second access request element in the data interface table; If the data interface table does not contain a data interface that is consistent with the second access request element, it is determined that the verification has not been passed; In step 3, after the online joint debugging is successful, the third-party interface corresponding to the second script is called, and the second online joint debugging of the third-party interface is performed, including: Read the calling method and calling requirements of the corresponding third-party interface in the second script; Call the third-party interface according to the calling method and calling requirements, and at the same time, obtain the current network connection status. When the network connection is normal, read the entire business process; Determine the parameter transmission channel corresponding to the three-party interface based on the entire business process, and add a transmission vector for each interface based on the parameter transmission channel; Build a joint debugging parameter group for each interface based on the transmission vector and the entire business process; The joint debugging parameter group of the current party interface is transmitted to the corresponding remaining two party interfaces according to the transmission channel, and the second online joint debugging of the three party interfaces is implemented according to the receiving parameter group of the corresponding two party interfaces; The second online joint debugging of the three-party interface is implemented according to the receiving parameter group of the corresponding two-party interface, including: Read the receiving parameter groups corresponding to the two interfaces; Determine whether the joint debugging parameter group is consistent with the received parameters; When the joint debugging parameter group is consistent with the receiving parameter group, it is determined that the parameter transmission from the current interface to the remaining two interfaces is normal; Otherwise, it is determined that the parameter transmission from the current interface to the remaining two interfaces is abnormal, and at the same time, the abnormal interface is determined, and the received parameter group received by the abnormal interface is regarded as the abnormal parameter group; Read the joint debugging parameter group of the current party interface, and match the target correction policy set in the preset policy library according to the current joint debugging parameter group; Input the abnormal parameter group into the target correction strategy set for matching, and output the target correction strategy; Read the target correction strategy, determine the correction parameters, and modify the second script online based on the correction parameters until the entire business process runs normally.
2. The method for online connection of a three-party interface according to claim 1, characterized in that: In S102, an access request is generated based on the service tag of the online joint debugging service and the interface tag of the three-party interface, including: Retrieving a first access request element from a preset database based on a service tag of the online joint debugging service; Retrieving a second access request element from a preset database based on an interface tag of the three-party interface; The first access request element and the second access request element are combined to generate an access request.
3. The method for online connection of a three-party interface according to claim 1, characterized in that: Also includes: If there is no authorization code matching the first access request element in the verification database sub-database, a first alarm operation is performed; If the data interface form does not contain a data interface that is consistent with the second access request element, a second alarm operation is performed.
4. The method for online connection of a three-party interface according to claim 1, characterized in that: In step 2, the business requirements for the three-party interface joint debugging are obtained, and the first script is modified according to the business requirements to obtain the second script, including: S201: Read the business requirements for the three-party interface joint debugging and docking, determine the requirement items corresponding to the business requirements, and read the requirement content and item names corresponding to the requirement items; S202: Obtaining a script content format of the first script, and adjusting the format of the item name according to the script content format of the first script to obtain a script index; S203: Read the demand data corresponding to the demand item, determine the execution target corresponding to the demand data and the execution logic corresponding to each execution target; S204: performing a first positioning in the first script based on the script index to obtain the region to be modified in the first script, and performing a second positioning in the region to be modified according to the execution target to obtain the content of the script to be modified; S205: Adjust parameters of the script to be modified based on the execution logic of the execution target to obtain a second script.
5. The method for online connection of a three-party interface according to claim 4, characterized in that: In S201 , the business requirement items include: an interface call item and a data processing logic item.
6. The method for online connection of a three-party interface according to claim 1, characterized in that: In step 2, a first online joint debugging is performed on the second script, including: Reading the working status of the local network, and when the working status of the local network is in an on state, generating a benchmark input parameter based on the attribute information of the three-party interface, and obtaining a benchmark result corresponding to the benchmark input parameter; Uploading the second script to the processing terminal, starting the second script based on the benchmark input parameters in the processing terminal, and outputting the running result of the second script in the processing terminal; Compare the running results with the benchmark results to determine whether the second script completes the first online joint debugging; When the running result matches the benchmark result, it is determined that the second script completes the first online joint debugging; Otherwise, the second script is subjected to online parameter adjustment until the running result matches the benchmark result.
Citation Information
Patent Citations
Method, device and equipment for testing analog Dubbo interface
CN111538606A
Automatic testing method, device and equipment of photomask plate transmission control system and medium
CN117421220A