HTTP information recording method and device, computer equipment and storage medium

Through automated recording tools, the problem of insufficient reliability of HTTP interface information testing in the financial technology business field is solved, the comprehensiveness and flexibility of the test scenario is achieved, and the reliability and efficiency of the test are improved.

CN119271516APending Publication Date: 2025-01-07PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411295952.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The reliability of HTTP interface information testing in the financial technology business field is insufficient. The interface information generated by existing automation testing software has omissions and data differences, which cannot fully cover the test scenarios, especially when the log is not available when it involves a secure interface.

Method used

Monitor service data through preset recording tools, determine the original HTTP interface data, and perform data processing on it to generate data in the target format, save it to the preset database, realize automatic recording and data processing, quickly capture and process large amounts of HTTP interface data, and ensure that Comprehensiveness and flexibility of the test scenario.

Benefits of technology

Improve the reliability of HTTP interface information testing, reduce manual testing and data preparation time, capture all business data, and discover more potential problems. The generated target HTTP interface data can be used to simulate actual interface responses, making it easier to reuse in different test environments. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271516A_ABST
    Figure CN119271516A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet, is applied to the field of financial science and technology businesses, and discloses an HTTP information recording method and device, computer equipment and a storage medium, and the method comprises the steps: monitoring business data through a recording tool, and determining original HTTP interface data; and performing data processing on the original HTTP interface data, and storing the target HTTP interface data to a preset database. By means of the mode, a large amount of HTTP interface data can be rapidly captured and processed through the automatic recording tool, the time for manual testing and data preparation is shortened, all service data are captured, the comprehensiveness of a testing scene is ensured, and more potential problems can be found easily. The generated target HTTP interface data can be used for simulating actual interface response, so that reuse in different test environments is facilitated, the test flexibility is improved, and the reliability of HTTP interface information test in the financial science and technology business field is improved through automatic recording and data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology and is applied to the field of financial technology business, and in particular to an HTTP information recording method, device, computer equipment and storage medium. Background Art

[0002] In the financial technology business field, software testers often need to mock (block data) the information returned by the third-party interface (mainly HTTP interface). Whether in the FAT (Functional Acceptance Testing) environment or the TEST environment, it is often necessary to simulate the data returned by the related party interface to achieve normal display of the app / web page.

[0003] The HTTP (Hypertext Transfer Protocol) interface is a simple request-response protocol that usually runs on top of TCP (Transmission Control Protocol). It specifies what messages a client may send to a server and what responses it may receive. However, in most software systems, the interface logs stored by the server are not complete, and encryption is not even available.

[0004] Most financial companies use backend development to assist in simulating the creation of returned data for mocking. When there are a large number of interfaces to be simulated, testers cannot quickly configure the returned data values ​​for all HTTP interfaces. Currently, the automated testing software on the market is manually entered through testing, or automatically generated through API interface tool classes (for example, the swagger framework is an open source API design and documentation tool that helps developers design, build, document and test RESTful APIs faster and easier. Swagger can automatically generate interactive API documents). The disadvantage is that the generated interface information needs to be returned according to a specific configuration range, and there may be missed scenarios, or the returned data may be very different and have no practical use. For financial software systems, the interfaces of some related parties even involve security, and the logs of the interfaces are not available, so the test scenarios cannot be fully covered. Therefore, how to improve the reliability of HTTP interface information testing in the financial technology business field has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The present application provides an HTTP information recording method, apparatus, computer equipment and storage medium to improve the reliability of HTTP interface information testing in the financial technology business field.

[0006] In a first aspect, the present application provides an HTTP information recording method, the method comprising:

[0007] All business data of the object to be recorded are monitored by a preset recording tool, and all business data are scanned to determine the original HTTP interface data;

[0008] The original HTTP interface data is processed to generate target HTTP interface data in a target format, and the target HTTP interface data is saved in a preset database.

[0009] In a second aspect, the present application further provides an HTTP information recording device, the device comprising:

[0010] The original HTTP interface data determination module is used to monitor all business data of the object to be recorded through a preset recording tool, and scan all the business data to determine the original HTTP interface data;

[0011] The target HTTP interface data recording module is used to process the original HTTP interface data, generate target HTTP interface data in a target format, and save the target HTTP interface data to a preset database.

[0012] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the HTTP information recording method as described above when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the HTTP information recording method as described above.

[0014] The present application discloses an HTTP information recording method, device, computer equipment and storage medium. The HTTP information recording method includes monitoring all business data of the object to be recorded through a preset recording tool, scanning all business data, and determining the original HTTP interface data; processing the original HTTP interface data to generate target HTTP interface data in a target format, and saving the target HTTP interface data to a preset database. In the above manner, the present application can quickly capture and process a large amount of HTTP interface data through an automated recording tool, reduce the time for manual testing and data preparation, capture all business data, ensure the comprehensiveness of the test scenario, and help discover more potential problems. The generated target HTTP interface data can be used to simulate actual interface responses, which is convenient for reuse in different test environments, improves the flexibility of the test, and improves the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 is a schematic flow chart of an HTTP information recording method provided by the first embodiment of the present application;

[0017] Figure 2 is a schematic flow chart of an HTTP information recording method provided by the second embodiment of the present application;

[0018] Figure 3 A schematic block diagram of an HTTP information recording device provided in an embodiment of the present application;

[0019] Figure 4 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0021] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0022] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0023] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0024] The embodiments of the present application provide an HTTP information recording method, device, computer equipment and storage medium. Among them, the HTTP information recording method can be applied to the server. Through the automated recording tool, a large amount of HTTP interface data can be quickly captured and processed, reducing the time for manual testing and data preparation, capturing all business data, ensuring the comprehensiveness of the test scenario, and helping to discover more potential problems. The generated target HTTP interface data can be used to simulate the actual interface response, which is convenient for reuse in different test environments, improves the flexibility of the test, and improves the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing. Among them, the server can be an independent server or a server cluster.

[0025] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0026] See also Figure 1 , Figure 1 This is a schematic flow chart of an HTTP information recording method provided in the first embodiment of the present application. The HTTP information recording method can be applied to a server, and can be used to quickly capture and process a large amount of HTTP interface data through an automated recording tool, thereby reducing the time for manual testing and data preparation, capturing all business data, ensuring the comprehensiveness of the test scenario, and helping to discover more potential problems. The generated target HTTP interface data can be used to simulate actual interface responses, which is convenient for reuse in different test environments, improves the flexibility of the test, and improves the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing.

[0027] like Figure 1 As shown, the HTTP information recording method specifically includes steps S10 to S20.

[0028] Step S10: monitor all business data of the object to be recorded through a preset recording tool, and scan all the business data to determine the original HTTP interface data;

[0029] Specifically, deploy the recording tool to the appropriate server or client machine and ensure that the recording tool runs automatically when the application starts.

[0030] Monitoring service data generally includes the following aspects:

[0031] Capture HTTP requests: The recording tool monitors all incoming and outgoing HTTP requests, including request headers, request bodies, etc.

[0032] Capture HTTP responses: Similarly, the recording tool also captures all HTTP responses, including status codes, response headers, response bodies, etc.

[0033] Step S20: Process the original HTTP interface data to generate target HTTP interface data in a target format, and save the target HTTP interface data to a preset database.

[0034] In one embodiment, through JAVA probe technology, dynamic replacement of class files is achieved through the premain method in the com.pingan.javaAgent.PreHttpAgent class in the javaAgent.jar package when tomcat is started.

[0035] The replaced files are placed in the directory configured by the BASE_PATH property of the com.pingan.javaAgent.Storage class in the javaAgent.jar package. When the premain method runs, the BASE_PATH directory is scanned to replace the target class. Currently, this directory on the UAT server is configured as / nfsc.

[0036] This embodiment discloses an HTTP information recording method, device, computer equipment and storage medium. The HTTP information recording method includes monitoring all business data of the object to be recorded through a preset recording tool, scanning all business data, and determining the original HTTP interface data; processing the original HTTP interface data to generate target HTTP interface data in a target format, and saving the target HTTP interface data to a preset database. In the above manner, the present application can quickly capture and process a large amount of HTTP interface data through an automated recording tool, reduce the time for manual testing and data preparation, capture all business data, ensure the comprehensiveness of the test scenario, and help discover more potential problems. The generated target HTTP interface data can be used to simulate actual interface responses, which is convenient for reuse in different test environments, improves the flexibility of the test, and improves the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing.

[0037] based on Figure 1 In the embodiment shown, in this embodiment, step S10 includes:

[0038] Determining the service function of the object to be recorded according to the object type of the object to be recorded;

[0039] Monitor the business parameters of each of the business functions, and generate all the business data based on the premain method and the business parameters.

[0040] In one embodiment, the object type of the object to be recorded is analyzed to understand the business functions it provides, and the specific business functions to be recorded are determined according to business requirements. Using appropriate monitoring mechanisms (such as event monitors, callback functions, etc.) to capture business functions can ensure that all necessary business parameters can be captured.

[0041] The captured business parameters are processed in the premain method. According to the business logic, the business parameters are converted into the required data format and complete business data is generated for further processing or storage.

[0042] This embodiment discloses an HTTP information recording method, device, computer equipment and storage medium, wherein the HTTP information recording method includes determining the business function of the object to be recorded according to the object type of the object to be recorded; monitoring the business parameters of each of the business functions, and generating all the business data based on the premain method and the business parameters, and scanning all the business data to determine the original HTTP interface data; performing data processing on the original HTTP interface data to generate target HTTP interface data in a target format, and saving the target HTTP interface data to a preset database. Through the above manner, the present application determines the business function by analyzing the type of the object to be recorded, which can ensure that the recording tool focuses on the relevant business logic, and captures data during class loading through the premain method, which can ensure that data is collected from the beginning of the business process, thereby improving the accuracy and relevance of data recording, and improving the reliability of HTTP interface information testing in the financial technology business field.

[0043] In a more preferred embodiment, step S10 further includes:

[0044] Traversing each of the business data to determine the HTTP data type that matches the object to be recorded;

[0045] Determining the preset recording tool according to the HTTP data type;

[0046] The HTTP request data and HTTP response data of the object to be recorded are monitored through the preset recording tool, wherein the original HTTP interface data includes the HTTP request data and the HTTP response data.

[0047] In one embodiment, for each business data, check whether it contains HTTP data related to the object to be recorded. Analyze each business data to determine the HTTP data type contained therein. This may include request method (such as GET, POST, etc.), request header, request body, response status code, response header, etc. According to the determined HTTP data type, select an appropriate preset recording tool. These tools may include network packet capture tools, proxy servers, API testing tools, etc.

[0048] Use the selected preset recording tool to capture the HTTP request and response data of the object to be recorded. Ensure that the tool can capture all relevant HTTP data, including all details of the request and response. Combine the captured HTTP request data and HTTP response data into the original HTTP interface data, and ensure that the generated data is complete and accurate for subsequent analysis and processing.

[0049] The present embodiment discloses an HTTP information recording method, device, computer equipment and storage medium, wherein the HTTP information recording method includes determining the business function of the object to be recorded according to the object type of the object to be recorded; monitoring the business parameters of each business function, and generating all the business data based on the premain method and the business parameters, and traversing each business data to determine the HTTP data type that matches the object to be recorded; determining the preset recording tool according to the HTTP data type; monitoring the HTTP request data and HTTP response data of the object to be recorded through the preset recording tool, wherein the original HTTP interface data includes the HTTP request data and the HTTP response data; performing data processing on the original HTTP interface data to generate target HTTP interface data in a target format, and saving the target HTTP interface data to a preset database. In the above manner, the present application can quickly capture and process a large amount of HTTP interface data through an automated recording tool, reduce the time for manual testing and data preparation, capture all business data, ensure the comprehensiveness of the test scenario, and help discover more potential problems. The generated target HTTP interface data can be used to simulate the actual interface response, which is convenient for reuse in different test environments, improving the flexibility of the test. Through automated recording and data processing, the reliability of HTTP interface information testing in the fintech business field is improved.

[0050] See also Figure 2 , Figure 2 This is a schematic flow chart of an HTTP information recording method provided in the second embodiment of the present application. The HTTP information recording method can be applied to a server, and can be used to quickly capture and process a large amount of HTTP interface data through an automated recording tool, thereby reducing the time for manual testing and data preparation, capturing all business data, ensuring the comprehensiveness of the test scenario, and helping to discover more potential problems. The generated target HTTP interface data can be used to simulate actual interface responses, which is convenient for reuse in different test environments, improves the flexibility of the test, and improves the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing.

[0051] based on Figure 1 The embodiment shown, this embodiment Figure 2 As shown, monitoring the service parameters of each service function and generating all the service data based on the premain method and the service parameters includes steps S1021 to S1023:

[0052] Step S1021: Create a Java Agent class based on the premain method built into the Java Agent technology and the object to be recorded;

[0053] Step S1022: Pack the Java Agent class to generate a JAR Java Agent file in JAR format;

[0054] Step S1023: Convert the business parameters into the entire business data through the JAR Java Agent file.

[0055] In one embodiment, a new Java class is created, which will serve as a Java Agent, and the premain method of the Java Agent is implemented in the class, which will be called by the Java virtual machine tool when the Java virtual machine is started. In the premain method, the required logic is implemented, for example, a Java agent is registered to intercept and modify bytecodes. The Java Agent class is packaged into a JAR file using a Java packaging tool (such as the jar command or a build tool such as Maven), and all necessary classes and resource files are ensured to be included in the JAR file.

[0056] When running a Java application, specify the JAR Java Agent file as a Java option so that the Java Agent can be loaded when the Java virtual machine starts. In the premain method of the Java Agent, implement the logic of converting business parameters into all business data. In the Java application, access the converted business data through the interface or method provided by the Java Agent.

[0057] This embodiment discloses an HTTP information recording method, device, computer equipment and storage medium, wherein the HTTP information recording method includes determining the business function of the object to be recorded according to the object type of the object to be recorded; creating a Java Agent class based on the premain method built into the Java Agent technology and the object to be recorded; packaging the Java Agent class to generate a JAR Java Agent file in JAR format; converting the business parameters into all the business data through the JAR Java Agent file, and scanning all the business data to determine the original HTTP interface data; performing data processing on the original HTTP interface data to generate target HTTP interface data in a target format, and saving the target HTTP interface data to a preset database. In the above manner, the present application can quickly capture and process a large amount of HTTP interface data through an automated recording tool, reduce the time for manual testing and data preparation, capture all business data, ensure the comprehensiveness of the test scenario, and help discover more potential problems. The generated target HTTP interface data can be used to simulate the actual interface response, facilitate reuse in different test environments, improve the flexibility of the test, and improve the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing.

[0058] In a more preferred embodiment, step S20 includes:

[0059] Based on the open source framework of the JAR Java Agent file, modify the class file in the original HTTP interface data;

[0060] Determine the original HTTP interface data after modifying the class as the target HTTP interface data;

[0061] The target HTTP interface data is saved to a preset directory of a preset database.

[0062] In one embodiment, in the premain method of the Java Agent, a bytecode operation library (such as ASM or Javassist) provided by the Java Agent technology is used to modify the class file.

[0063] Modify the class file as needed, for example, modify the method body, add or delete code, etc. Ensure that the modified class file is compatible with the original HTTP interface data. Use the modified class file as part of the target HTTP interface data to ensure that the target HTTP interface data contains all necessary data for subsequent processing. Use a database API (such as JDBC or ORM framework) to save the target HTTP interface data to the preset directory of the preset database, ensure that the data is stored correctly, and consider data consistency and security.

[0064] This embodiment discloses an HTTP information recording method, device, computer equipment and storage medium, wherein the HTTP information recording method includes monitoring all business data of the object to be recorded through a preset recording tool, scanning all business data, and determining the original HTTP interface data; based on the open source framework of the JAR Java Agent file, modifying the class file in the original HTTP interface data; determining the original HTTP interface data after modifying the class as the target HTTP interface data; and saving the target HTTP interface data to a preset directory of a preset database. In the above manner, the present application can quickly capture and process a large amount of HTTP interface data through an automated recording tool, reducing the time for manual testing and data preparation, capturing all business data, ensuring the comprehensiveness of the test scenario, and helping to discover more potential problems. The generated target HTTP interface data can be used to simulate actual interface responses, which is convenient for reuse in different test environments, improves the flexibility of the test, and improves the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing.

[0065] In a more preferred embodiment, after step S20, the following steps are included:

[0066] Convert the target HTTP interface data into JS object notation JSON format, and package the target HTTP interface data in the JSON format to generate a class JAR file;

[0067] The class JAR file is saved to the preset database.

[0068] Specifically, use a JSON library in Java (such as Gson or Jackson) to convert the target HTTP interface data into JSON format, and ensure that the converted JSON data structure is complete and correct. Use a Java packaging tool (such as the jar command or a build tool such as Maven) to package the target HTTP interface data in JSON format into a JAR file. Ensure that all necessary resources and dependencies are included in the JAR file. Use a database API (such as JDBC or an ORM framework) to save the generated class JAR file to the preset directory of the preset database.

[0069] This embodiment discloses an HTTP information recording method, device, computer equipment and storage medium, the HTTP information recording method includes monitoring all business data of the object to be recorded through a preset recording tool, scanning all business data, and determining the original HTTP interface data; based on the open source framework of the JAR Java Agent file, modifying the class file in the original HTTP interface data; determining the original HTTP interface data after modifying the class as the target HTTP interface data; saving the target HTTP interface data to a preset directory of a preset database; converting the target HTTP interface data into a JS object notation JSON format, and packaging the target HTTP interface data in the JSON format to generate a class JAR file; saving the class JAR file to the preset database. Through the above method, the present application can quickly capture and process a large amount of HTTP interface data through an automated recording tool, reducing the time for manual testing and data preparation, capturing all business data, ensuring the comprehensiveness of the test scenario, and helping to discover more potential problems. The generated target HTTP interface data can be used to simulate the actual interface response, which is convenient for reuse in different test environments, improves the flexibility of the test, and improves the reliability of HTTP interface information testing in the financial technology business field through automated recording and data processing.

[0070] Based on any of the above embodiments, in this embodiment, before step S10, the following steps are included:

[0071] Determine the target operating environment of the object to be recorded, and deploy the preset recording tool to the target operating environment;

[0072] Based on the target operating environment, configure the startup script configuration of the preset recording tool;

[0073] When it is detected that the object to be recorded is started, the preset recording tool is controlled to start, and the starting step is: all business data of the object to be recorded is monitored by the preset recording tool, and all the business data is scanned to determine the original HTTP interface data.

[0074] Specifically, analyze the operating environment of the object to be recorded, such as the operating system, Java version, etc., to determine whether the preset recording tool is compatible with the target operating environment. Package the code and dependencies of the preset recording tool into an executable file or installation package, and install and configure the preset recording tool in the target operating environment.

[0075] Write a startup script according to the requirements of the target operating environment, ensure that the startup script is correct, and can start the preset recording tool normally. Add logic to the startup script so that when the object to be recorded is detected to be started, the preset recording tool is controlled to start and start monitoring all business data of the object to be recorded, scan all business data, and determine the original HTTP interface data.

[0076] See also Figure 3 , Figure 3 The embodiment of the present application provides a schematic block diagram of an HTTP information recording device, which is used to execute the aforementioned HTTP information recording method. The HTTP information recording device can be configured on a server.

[0077] like Figure 3 As shown, the HTTP information recording device 400 includes:

[0078] The original HTTP interface data determination module 410 is used to monitor all business data of the object to be recorded through a preset recording tool, and scan all the business data to determine the original HTTP interface data;

[0079] The target HTTP interface data recording module 420 is used to process the original HTTP interface data, generate target HTTP interface data in a target format, and save the target HTTP interface data to a preset database.

[0080] Furthermore, the original HTTP interface data determination module 410 includes:

[0081] A business function determination unit, configured to determine the business function of the object to be recorded according to the object type of the object to be recorded;

[0082] The entire service data generating unit is used to monitor the service parameters of each of the service functions and generate the entire service data based on the premain method and the service parameters.

[0083] Furthermore, the original HTTP interface data determination module 410 includes:

[0084] An HTTP data type determination unit, used for traversing each of the business data and determining an HTTP data type matching the object to be recorded;

[0085] A preset recording tool determining unit, configured to determine the preset recording tool according to the HTTP data type;

[0086] The original HTTP interface data determining unit is used to monitor the HTTP request data and HTTP response data of the object to be recorded through the preset recording tool, wherein the original HTTP interface data includes the HTTP request data and the HTTP response data.

[0087] Furthermore, the entire business data generating unit includes:

[0088] A Java Agent class creation subunit, used to create a Java Agent class based on the premain method built into the Java Agent technology and the object to be recorded;

[0089] A JAR Java Agent file generation subunit, used for packaging the Java Agent class to generate a JAR Java Agent file in a JAR format;

[0090] The entire business data generating subunit is used to convert the business parameters into the entire business data through the JAR Java Agent file.

[0091] Furthermore, the target HTTP interface data recording module 420 includes:

[0092] A class file modification unit, used to modify the class file in the original HTTP interface data based on the open source framework of the JAR Java Agent file;

[0093] a target HTTP interface data determining unit, configured to determine the original HTTP interface data after the class is modified as the target HTTP interface data;

[0094] The target HTTP interface data recording unit is used to save the target HTTP interface data to a preset directory of a preset database.

[0095] Furthermore, the HTTP information recording device 400 includes:

[0096] A class JAR file generation module, used for converting the target HTTP interface data into a JS object notation JSON format, and packaging the target HTTP interface data in the JSON format to generate a class JAR file;

[0097] The class JAR file saving module is used to save the class JAR file to the preset database.

[0098] Furthermore, the HTTP information recording device 400 includes:

[0099] A recording tool deployment module, used to determine the target operating environment of the object to be recorded, and deploy the preset recording tool to the target operating environment;

[0100] A startup script configuration configuration module, used to configure the startup script configuration of the preset recording tool based on the target operating environment;

[0101] The recording tool startup module is used to control the startup of the preset recording tool when detecting that the object to be recorded is started. The starting steps are: monitoring all business data of the object to be recorded through the preset recording tool, scanning all business data, and determining the original HTTP interface data.

[0102] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0103] The above-mentioned device can be implemented in the form of a computer program. Figure 4 Runs on the computer device shown.

[0104] See also Figure 4 , Figure 4 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0105] See also Figure 4 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0106] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any HTTP information recording method.

[0107] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0108] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any HTTP information recording method.

[0109] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0110] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0111] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0112] All business data of the object to be recorded are monitored by a preset recording tool, and all business data are scanned to determine the original HTTP interface data;

[0113] The original HTTP interface data is processed to generate target HTTP interface data in a target format, and the target HTTP interface data is saved in a preset database.

[0114] In one embodiment, all business data of the object to be recorded is monitored by a preset recording tool to achieve:

[0115] Determining the service function of the object to be recorded according to the object type of the object to be recorded;

[0116] Monitor the business parameters of each of the business functions, and generate all the business data based on the premain method and the business parameters.

[0117] In one embodiment, all the business data are scanned to determine the original HTTP interface data, which is used to implement:

[0118] Traversing each of the business data to determine the HTTP data type that matches the object to be recorded;

[0119] Determining the preset recording tool according to the HTTP data type;

[0120] The HTTP request data and HTTP response data of the object to be recorded are monitored through the preset recording tool, wherein the original HTTP interface data includes the HTTP request data and the HTTP response data.

[0121] In one embodiment, the service parameters of each of the service functions are monitored, and based on the premain method and the service parameters, the entire service data is generated to achieve:

[0122] Based on the premain method built into the Java Agent technology and the object to be recorded, a JavaAgent class is created;

[0123] Packaging the Java Agent class to generate a JAR Java Agent file in JAR format;

[0124] The business parameters are converted into the entire business data through the JAR Java Agent file.

[0125] In one embodiment, the original HTTP interface data is processed to generate target HTTP interface data in a target format, and the target HTTP interface data is saved in a preset database to achieve:

[0126] Based on the open source framework of the JAR Java Agent file, modify the class file in the original HTTP interface data;

[0127] Determine the original HTTP interface data after modifying the class as the target HTTP interface data;

[0128] The target HTTP interface data is saved to a preset directory of a preset database.

[0129] In one embodiment, the original HTTP interface data is processed to generate target HTTP interface data in a target format, and the target HTTP interface data is saved in a preset database to achieve:

[0130] Convert the target HTTP interface data into JS object notation JSON format, and package the target HTTP interface data in the JSON format to generate a class JAR file;

[0131] The class JAR file is saved to the preset database.

[0132] In one embodiment, all business data of the object to be recorded is monitored by a preset recording tool, and all business data is scanned to determine the original HTTP interface data, which is used to implement:

[0133] Determine the target operating environment of the object to be recorded, and deploy the preset recording tool to the target operating environment;

[0134] Based on the target operating environment, configure the startup script configuration of the preset recording tool;

[0135] When it is detected that the object to be recorded is started, the preset recording tool is controlled to start, and the starting step is: all business data of the object to be recorded is monitored by the preset recording tool, and all the business data is scanned to determine the original HTTP interface data.

[0136] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any HTTP information recording method provided in the embodiment of the present application.

[0137] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0138] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for recording HTTP information, characterized in that: include: All business data of the object to be recorded are monitored by a preset recording tool, and all business data are scanned to determine the original HTTP interface data; The original HTTP interface data is processed to generate target HTTP interface data in a target format, and the target HTTP interface data is saved in a preset database.

2. The HTTP information recording method according to claim 1, characterized in that: The monitoring of all business data of the object to be recorded by the preset recording tool includes: Determining the service function of the object to be recorded according to the object type of the object to be recorded; Monitor the business parameters of each of the business functions, and generate all the business data based on the premain method and the business parameters.

3. The HTTP information recording method according to claim 2, characterized in that: The scanning of all the business data to determine the original HTTP interface data includes: Traversing each of the business data to determine the HTTP data type that matches the object to be recorded; Determining the preset recording tool according to the HTTP data type; The HTTP request data and HTTP response data of the object to be recorded are monitored through the preset recording tool, wherein the original HTTP interface data includes the HTTP request data and the HTTP response data.

4. The HTTP information recording method according to claim 2, characterized in that: The monitoring of the service parameters of each of the service functions and generating the entire service data based on the premain method and the service parameters include: Based on the premain method built into the Java Agent technology and the object to be recorded, create a Java Agent class; Packaging the Java Agent class to generate a JAR Java Agent file in JAR format; The business parameters are converted into the entire business data through the JAR Java Agent file.

5. The HTTP information recording method according to claim 4, characterized in that: The processing of the original HTTP interface data to generate target HTTP interface data in a target format and saving the target HTTP interface data to a preset database includes: Based on the open source framework of the JAR Java Agent file, modify the class file in the original HTTP interface data; Determine the original HTTP interface data after modifying the class as the target HTTP interface data; The target HTTP interface data is saved to a preset directory of a preset database.

6. The HTTP information recording method according to claim 5, characterized in that: The method of processing the original HTTP interface data to generate target HTTP interface data in a target format and saving the target HTTP interface data to a preset database includes: Convert the target HTTP interface data into JS object notation JSON format, and package the target HTTP interface data in the JSON format to generate a class JAR file; The class JAR file is saved to the preset database.

7. The HTTP information recording method according to any one of claims 1 to 6, characterized in that: The method of monitoring all the business data of the object to be recorded by using a preset recording tool and scanning all the business data to determine the original HTTP interface data includes: Determine the target operating environment of the object to be recorded, and deploy the preset recording tool to the target operating environment; Based on the target operating environment, configure the startup script configuration of the preset recording tool; When it is detected that the object to be recorded is started, the preset recording tool is controlled to start, and the starting step is: all business data of the object to be recorded is monitored by the preset recording tool, and all the business data is scanned to determine the original HTTP interface data.

8. An HTTP information recording device, characterized in that: include: The original HTTP interface data determination module is used to monitor all business data of the object to be recorded through a preset recording tool, and scan all the business data to determine the original HTTP interface data; The target HTTP interface data recording module is used to process the original HTTP interface data, generate target HTTP interface data in a target format, and save the target HTTP interface data to a preset database.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the HTTP information recording method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the HTTP information recording method according to any one of claims 1 to 7.