Multi-language fusion HTTP (Hyper Text Transport Protocol) application debugging method and tool

Through the HTTP application debugging methods and tools of multilingual fusion, the debugging problems of HTTP interface debugging logic and response logic in different development languages ​​are solved, and the multilingual support and debugging efficiency is improved, reducing maintenance and development costs.

CN119088674APending Publication Date: 2024-12-06BEIYIN FINANCIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411004807.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing HTTP interface debugging tools cannot effectively debug the calling logic and response logic of different development languages, resulting in large debugging workloads and long R&D cycles, and the interface cannot be successfully called at one time.

Method used

Adopt the HTTP application debugging method of multi-language fusion. By deploying the compilation environment and running environment of different development languages, the background parsing and converting request parameters and response content, it provides the language central control module comparison call logic, and supports HTTP interface debugging in multiple languages. And design debugging tools in the front-end separation architecture to provide user login, request entry and historical log management.

Benefits of technology

It realizes the debugging of general HTTP interfaces of different development language systems, improves debugging efficiency, reduces maintenance and secondary development costs, provides recommended call logic and response analysis, and improves business process development and debugging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088674A_ABST
    Figure CN119088674A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-language fusion HTTP (Hyper Text Transport Protocol) application debugging method and tool. The method comprises the following steps: deploying compiling environments and running environments of different development languages; analyzing parameters for sending the request, calling logic as a part of the parameters and transmitting the calling logic to a background, selecting a corresponding development language by the background according to the corresponding development language, and sending the request to an HTTP interface service party by using the calling logic of the client; a sending result is captured, if sending fails, a sending failure reason is judged, and when the sending failure reason is a non-network connectivity error, a calling logic suggestion of a corresponding language is given to the user; and if the sending is successful and the background receives the response of the HTTP interface service party successfully, analyzing the response content and converting the response content into a response format of the corresponding development language. According to the method, HTTP calling and response analysis logic debugging in different language environments can be realized, the maintenance cost and the secondary development cost are reduced, and cost reduction and benefit improvement are further realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of application debugging, and in particular is a multi-language integrated HTTP application debugging method and tool. Background Art

[0002] Interface debugging is an indispensable part of the software development process. Interface debugging tools are mainly used to test and verify whether the interface functions in the software system are normal and whether the data transmission is correct. Through these tools, developers can simulate requests, view responses, check errors and track performance. As the most widely used HTTP protocol interface, the current mainstream debugging tools in the industry have done a lot of work in supporting HTTP protocol interface data formats such as json, xml, and graphical display.

[0003] The only drawback is that due to the development of the software industry over the years, different software uses different development languages. For example, PHP, C, JavaScript, etc. were widely used in the early days of my country's Internet, and Java, C++, Python, Go, etc. have gradually penetrated the market. Different development languages ​​have their own differentiated syntax for implementing interface calls. An interface that has been debugged through mainstream debugging tools can only indicate that the interface parameter requirements have been debugged. In the actual development process, it still cannot be successfully called in one go and requires repeated program debugging.

[0004] At present, mainstream API debugging tools are essentially for debugging data formats, and cannot debug call logic. Let's use the high-level programming language Java as an example:

[0005] 1. It is not possible to debug the calling logic of the HTTP interface. The debugging tool does not contain any Java syntax assignment logic or request sending logic.

[0006] 2. It is impossible to debug the response logic of the HTTP interface. The debugging tool does not contain any logic for receiving responses and parsing responses in Java syntax.

[0007] 3. Due to the imperfection of debugging tools, the debugging workload cannot be reduced and the R&D cycle cannot be further effectively shortened. Summary of the invention

[0008] In view of the above problems, the present invention is proposed to provide a multi-language integrated HTTP application debugging method and tool that overcomes the above problems or at least partially solves the above problems.

[0009] To achieve the above object, the present invention adopts the following technical solutions:

[0010] In a first aspect of the present application, a multi-language integrated HTTP application debugging method is provided, the method comprising:

[0011] Deploy compilation and runtime environments for different development languages;

[0012] Parse the parameters of the request and pass the call logic as part of the parameters to the backend. The backend selects the corresponding development language according to the corresponding development language and uses the client's call logic to send the request to the HTTP interface service provider.

[0013] Capture the sending result. If the sending fails, determine the reason for the sending failure. If the sending failure is not due to network connectivity errors, provide the user with a call logic suggestion in the corresponding language.

[0014] If the sending is successful and the background receives the response from the HTTP interface service successfully, the response content will be parsed and converted into the response format of the corresponding development language.

[0015] Optionally, the background includes a gateway, a user center and a language central control.

[0016] Optionally, the gateway serves as a unified entry point for requests, and is used to perform flow control, security verification, and attack prevention on requests, and the requests are sent to the user center through the gateway.

[0017] Optionally, the request is sent to the language control center after verification by the user center. The language control center parses the parameters and compares the calling logic of the parameters with the expected calling logic of the background.

[0018] If the comparison is correct, directly call the target HTTP interface;

[0019] If there are differences in the comparison, the difference information is temporarily stored and the target HTTP interface is called downward.

[0020] Optionally, after sending the request to the HTTP interface service provider, the request entry information, folder classification information and historical request log are recorded.

[0021] In a second aspect of the present application, a multi-language integrated HTTP application debugging tool is provided. The tool is designed based on a BS interactive architecture. The specific technical solution includes:

[0022] Front-end and back-end design: front-end and back-end are separated, and BS interaction mode is adopted;

[0023] Front-end design: The front-end provides functions for user login, request classification and request parameter entry;

[0024] Backend design: The backend is divided into three modules: gateway, user center and language control;

[0025] The gateway module serves as a unified entry point for requests, performs flow control, security verification, and anti-attack on requests, and sends the requests through the gateway to the user center module;

[0026] If the user is logged in, the user's request entry information, folder classification information and historical request log will be recorded. If the user is not logged in, the above information will not be recorded.

[0027] The request is verified by the user center module and sent to the language control module. The language control module parses the parameters and compares the parameter calling logic with the expected calling logic of the background. If the comparison is correct, the target HTTP interface is called directly. If there is a difference, the difference information is temporarily stored and the target HTTP interface is called downward.

[0028] If the call fails, determine whether the failure is due to a network connection error. If it is not a network connection error, generate a recommended call logic, return it to the front end and display it to the user. If the network connection fails, there is no recommendation and a network error is directly prompted.

[0029] If the call is successful, the response data is obtained and the response information is converted according to the target language. If the conversion fails, a recommended analysis is generated and returned to the user;

[0030] The user decides whether to modify parameters and call logic based on the response results.

[0031] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0032] 1. The present invention mainly provides a universal HTTP interface debugging method for systems with different development languages, and currently supports multiple languages; by analyzing the expected call results and the actual call logic of the front end through the background, the user is given the recommended call logic when the call fails.

[0033] 2. The present invention improves the efficiency of developing and debugging business implementation processes through a multi-language deployed background and a page that allows users to select a debugging language, realizes debugging of HTTP calls and response parsing logic in different language environments, reduces maintenance costs and secondary development costs, and thus achieves cost reduction and efficiency improvement. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flowchart of a multi-language integrated HTTP application debugging method provided for an application embodiment;

[0035] Figure 2 A solution architecture of a multi-language integrated HTTP application debugging tool is provided for an application embodiment. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0037] Embodiment 1:

[0038] See also Figure 1 This embodiment provides a multi-language integrated HTTP application debugging method, including:

[0039] S1. Deploy compilation environments and runtime environments for different development languages, such as the Java compilation and runtime environment JDK.

[0040] S2. Parse the parameters of the request and pass the calling logic to the backend as part of the parameters.

[0041] The backend selects the corresponding development language according to the corresponding development language, uses the client's calling logic, and sends the request to the HTTP interface service provider.

[0042] The backend includes the gateway, user center and language control center. The gateway is the unified entry point for requests, which is used to perform flow control, security verification and anti-attack on requests, and the requests through the gateway are sent to the user center.

[0043] After being verified by the user center, the request is sent to the language control center, which parses the parameters and compares the calling logic of the parameters with the expected calling logic of the background. If the comparison is correct, the target HTTP interface is called directly. If there is a difference in the comparison, the difference information is temporarily stored and the target HTTP interface is continued to be called downward. The temporarily stored difference information is used for analysis and improvement in the background.

[0044] After sending the request to the HTTP interface service provider, the request entry information, folder classification information and historical request log are recorded.

[0045] S3. Capture and send results.

[0046] If the sending fails, determine the reason for the sending failure. If the sending failure is not due to a network connectivity error, provide the user with a call logic suggestion in the corresponding language;

[0047] If the sending is successful and the background receives the response from the HTTP interface service successfully, the response content will be parsed and converted into the response format of the corresponding development language.

[0048] This embodiment mainly provides a general HTTP interface debugging method for systems with different development languages, and currently supports multiple languages; by analyzing the expected call results and the actual call logic of the front end through the background, the user is given the recommended call logic when the call fails.

[0049] This embodiment improves the efficiency of developing and debugging business implementation processes through a multi-language deployed background and a page that allows users to select a debugging language, implements debugging of HTTP calls and response parsing logic in different language environments, reduces maintenance costs and secondary development costs, and thereby achieves cost reduction and efficiency improvement.

[0050] Embodiment 2:

[0051] See also Figure 2 Embodiment 2 provides a multi-language integrated HTTP application debugging tool. The debugging tool first supports the user's selection of the debugging language on the client. The tool is designed based on the BS interactive architecture. The specific technical solution includes:

[0052] Front-end and back-end design: front-end and back-end are separated, and BS interaction mode is adopted.

[0053] Front-end design: The front-end provides functions for user login, request classification and request parameter entry.

[0054] Back-end design: The back-end is divided into three modules: gateway, user center and language central control.

[0055] The gateway module serves as a unified entry point for requests, performs flow control, security verification, and attack prevention on requests, and sends the requests through the gateway to the user center module.

[0056] If the user is logged in, the user's request entry information, folder classification information and historical request log will be recorded. If the user is not logged in, the above information will not be recorded.

[0057] The request is verified by the user center module and sent to the language control module. The language control module parses the parameters and compares the parameter call logic with the expected call logic of the background. If the comparison is correct, the target HTTP interface is directly called. The HTTP interface encapsulates the Java converter, JavaScript converter, Go converter and Linux curl converter. If there is a difference in the comparison, the difference information is temporarily stored and the target HTTP interface is continued to be called.

[0058] If the call fails, determine whether the failure is due to a network connection error. If it is not a network connection error, generate recommended call logic, return it to the front end and display it to the user. If the network connection fails, there is no recommendation and a network error is directly prompted.

[0059] If the call is successful, the response data is obtained and the response information is converted according to the target language. If the conversion fails, a recommended analysis is generated and returned to the user.

[0060] The user decides whether to modify parameters and call logic based on the response results.

[0061] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A multi-language integrated HTTP application debugging method, characterized in that: The method comprises: Deploy compilation and runtime environments for different development languages; Parse the parameters of the request and pass the call logic as part of the parameters to the backend. The backend selects the corresponding development language according to the corresponding development language and uses the client's call logic to send the request to the HTTP interface service provider. Capture the sending result. If the sending fails, determine the reason for the sending failure. If the sending failure is not due to network connectivity errors, provide the user with a call logic suggestion in the corresponding language. If the sending is successful and the background receives the response from the HTTP interface service successfully, the response content will be parsed and converted into the response format of the corresponding development language.

2. A multi-language fusion HTTP application debugging method as claimed in claim 1, characterized in that: The backend includes a gateway, a user center and a language control center.

3. A multi-language HTTP application debugging method as claimed in claim 2, characterized in that: The gateway serves as a unified entry point for requests, and is used to perform flow control, security verification, and attack prevention on requests. Requests through the gateway are sent to the user center.

4. A multi-language fusion HTTP application debugging method as claimed in claim 3, characterized in that: After being verified by the user center, the request is sent to the language control center, which parses the parameters and compares the parameter calling logic with the expected calling logic of the backend. If the comparison is correct, directly call the target HTTP interface; If there are differences in the comparison, the difference information is temporarily stored and the target HTTP interface is called downward.

5. The multi-language integrated HTTP application debugging method according to claim 1, characterized in that: After sending the request to the HTTP interface service provider, the request entry information, folder classification information and historical request log are recorded.

6. A multi-language HTTP application debugging tool, characterized in that: The tool is designed based on the BS interactive architecture, and the specific technical solutions include: Front-end and back-end design: front-end and back-end are separated, and BS interaction mode is adopted; Front-end design: The front-end provides functions for user login, request classification and request parameter entry; Backend design: The backend is divided into three modules: gateway, user center and language control; The gateway module serves as a unified entry point for requests, performs flow control, security verification, and anti-attack on requests, and sends the requests through the gateway to the user center module; If the user is logged in, the user's request entry information, folder classification information and historical request log will be recorded. If the user is not logged in, the above information will not be recorded. The request is verified by the user center module and sent to the language control module. The language control module parses the parameters and compares the parameter calling logic with the expected calling logic of the background. If the comparison is correct, the target HTTP interface is called directly. If there is a difference, the difference information is temporarily stored and the target HTTP interface is called downward. If the call fails, determine whether the failure is due to a network connection error. If it is not a network connection error, generate a recommended call logic, return it to the front end and display it to the user. If the network connection fails, there is no recommendation and a network error is directly prompted. If the call is successful, the response data is obtained and the response information is converted according to the target language. If the conversion fails, a recommended analysis is generated and returned to the user; The user decides whether to modify parameters and call logic based on the response results.