Data processing method and device, computer equipment and storage medium

By using the compression and decompression algorithms in the joint debugging tool in the interface test, the compressed data of the HTTP request body and the return body is automatically processed, and the inefficiency and high cost problems caused by manual decompression is solved, and more efficient interface testing is achieved. .

CN119484652APending Publication Date: 2025-02-18CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411483384.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

During the interface testing process, manually decompressing the compressed HTTP request body or returning body data, resulting in low processing efficiency and high testing costs.

Method used

By using the target compression algorithm in the preset joint debugging tool to compress the HTTP request body data, and upon receiving the response data, the target decompression algorithm corresponding to the target compression algorithm automatically decompress the data to achieve automatic and fast data Decompression processing.

Benefits of technology

Improves the processing efficiency of interface testing, reduces testing costs, and avoids frequent manual decompression operations by testers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484652A_ABST
    Figure CN119484652A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing, and relates to a data processing method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining to-be-sent HTTP request volume data; performing compression operation on the request volume data based on a target compression algorithm in a preset joint debugging tool to obtain compressed data; generating a corresponding HTTP request based on the compressed data, and sending the HTTP request to a specified interface; receiving response data corresponding to the HTTP request returned by the specified interface; wherein the response data comprises a compressed specified result; extracting a specified result from the response data; performing decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain decompression data; and performing display processing on the decompressed data. In addition, the decompressed data can be stored in the block chain. Based on the use of the joint debugging tool, the processing efficiency of the interface test can be effectively improved, and the test cost of the interface test can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of data processing technology and financial technology, and in particular to data processing methods, devices, computer equipment and storage media. Background Art

[0002] In the software development and testing practice in the financial field, performance optimization has become a crucial challenge in the face of interfaces with highly complex business logic. Although developers have taken a variety of measures, such as code optimization, database query optimization, cache strategy application, and server resource allocation, to comprehensively improve the processing efficiency of interfaces, in actual stress testing, the throughput of some interfaces is still difficult to reach the expected target.

[0003] In actual test scenarios, an important factor affecting interface performance is the excessive amount of data in the HTTP request body or response body. To address this issue, the industry has begun to explore ways to reduce the amount of data transmission by compressing the HTTP request body or response body. Compression technology can significantly reduce the data volume, thereby reducing network transmission time and server processing costs, and is expected to significantly improve interface performance.

[0004] However, during the interface testing process, testers need to frequently send and receive compressed data and manually decompress it to verify the correctness of the business logic. Manual decompression has the problems of low processing efficiency and high testing cost. Summary of the invention

[0005] The purpose of the embodiments of the present application is to propose a data processing method, apparatus, computer equipment and storage medium to solve the technical problems of low processing efficiency and high testing cost in the manual decompression method used in the existing interface testing process.

[0006] In order to solve the above technical problems, the present application provides a data processing method, which adopts the following technical solution:

[0007] Get the HTTP request body data to be sent;

[0008] Compressing the HTTP request body data based on a target compression algorithm in a preset joint debugging tool to obtain corresponding compressed data;

[0009] Generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface;

[0010] Receiving response data corresponding to the HTTP request returned by the designated interface; wherein the response data includes a compressed designated result;

[0011] extracting the specified result from the response data;

[0012] Performing a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data;

[0013] The decompressed data is displayed.

[0014] Furthermore, the step of compressing the HTTP request body data based on the target compression algorithm in the preset joint debugging tool to obtain corresponding compressed data specifically includes:

[0015] Calling the target compression algorithm from the joint debugging tool;

[0016] Performing a compression operation on the HTTP request body data based on the target compression algorithm to obtain first compressed data;

[0017] Embedding a preset metadata identifier in the first compressed data to obtain corresponding second compressed data;

[0018] The second compressed data is used as the compressed data.

[0019] Furthermore, the step of generating a corresponding HTTP request based on the compressed data and sending the HTTP request to a designated interface specifically includes:

[0020] Performing encoding conversion processing on the compressed data based on a preset encoding method to obtain corresponding encoded data;

[0021] Get the preset initial HTTP request;

[0022] Performing data filling processing on the initial HTTP request based on the encoded data to obtain the corresponding HTTP request;

[0023] The HTTP request is sent to the designated interface based on a preset sending tool.

[0024] Furthermore, the step of performing a decompression operation on the designated result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data specifically includes:

[0025] Performing a decoding operation on the specified result based on a preset decoding method to obtain corresponding decoded data;

[0026] Calling the target decompression algorithm corresponding to the target compression algorithm from the joint debugging tool;

[0027] Performing a decompression operation on the decoded data based on the target decompression algorithm to obtain decompressed data;

[0028] The decompressed data is used as the decompressed data.

[0029] Furthermore, the step of displaying the decompressed data specifically includes:

[0030] Call the preset parser;

[0031] Parsing the decompressed data into target data in a specified format based on the parser;

[0032] Get the target display format;

[0033] Based on the target display format, the target data is displayed on a preset interface.

[0034] Furthermore, after the step of displaying the decompressed data, the method further includes:

[0035] Get the preset comparison strategy;

[0036] Compare the decompressed data with the request body data based on the comparison strategy to obtain a corresponding comparison result;

[0037] Call the preset display interface;

[0038] The comparison result is displayed on the display interface.

[0039] Furthermore, after the step of comparing the decompressed data with the request body data based on the comparison strategy to obtain a corresponding comparison result, the method further includes:

[0040] Determining whether the content of the comparison result is inconsistent;

[0041] If so, generating a corresponding error message based on the comparison result;

[0042] Get the preset error handling strategy;

[0043] The error information is processed accordingly based on the error processing strategy.

[0044] In order to solve the above technical problems, the embodiment of the present application further provides a data processing device, which adopts the following technical solution:

[0045] A first acquisition module, used to acquire HTTP request body data to be sent;

[0046] A compression module, used to compress the HTTP request body data based on a target compression algorithm in a preset joint debugging tool to obtain corresponding compressed data;

[0047] A first processing module, configured to generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface;

[0048] A receiving module, configured to receive response data corresponding to the HTTP request returned by the designated interface; wherein the response data includes a compressed designated result;

[0049] An extraction module, used to extract the specified result from the response data;

[0050] A decompression module, configured to perform a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data;

[0051] The first display module is used to display the decompressed data.

[0052] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0053] Get the HTTP request body data to be sent;

[0054] Compressing the HTTP request body data based on a target compression algorithm in a preset joint debugging tool to obtain corresponding compressed data;

[0055] Generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface;

[0056] Receiving response data corresponding to the HTTP request returned by the designated interface; wherein the response data includes a compressed designated result;

[0057] extracting the specified result from the response data;

[0058] Performing a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data;

[0059] The decompressed data is displayed.

[0060] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0061] Get the HTTP request body data to be sent;

[0062] Compressing the HTTP request body data based on a target compression algorithm in a preset joint debugging tool to obtain corresponding compressed data;

[0063] Generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface;

[0064] Receiving response data corresponding to the HTTP request returned by the designated interface; wherein the response data includes a compressed designated result;

[0065] extracting the specified result from the response data;

[0066] Performing a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data;

[0067] The decompressed data is displayed.

[0068] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0069] The present application first obtains the HTTP request body data to be sent; then compresses the HTTP request body data based on the target compression algorithm in the preset joint debugging tool to obtain the corresponding compressed data; and generates the corresponding HTTP request based on the compressed data, and sends the HTTP request to the designated interface; then receives the response data corresponding to the HTTP request returned by the designated interface; wherein the response data contains the compressed designated result; and extracts the designated result from the response data; subsequently decompresses the designated result based on the target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain the corresponding decompressed data; and finally displays the decompressed data. Different from the existing manual decompression method used in the interface testing process, the present application can realize automatic and rapid data decompression processing in the interface testing process based on the use of the joint debugging tool, thereby avoiding the tester from frequently sending and receiving compressed data and performing manual decompression processing, effectively improving the processing efficiency of the interface test, and reducing the test cost of the interface test. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. 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.

[0071] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0072] Figure 2 A flowchart of an embodiment of a data processing method according to the present application;

[0073] Figure 3 is a schematic structural diagram of an embodiment of a data processing device according to the present application;

[0074] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0076] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0077] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0078] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0079] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0080] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0081] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0082] It should be noted that the data processing method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the data processing device is generally arranged in the server / terminal device.

[0083] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0084] Continue to refer Figure 2 , shows a flow chart of an embodiment of a data processing method according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The data processing method provided in the embodiment of the present application can be applied to any scenario where data processing is required, and the data processing method can be applied to products in these scenarios, for example, data processing in the financial insurance field. The data processing method comprises the following steps:

[0085] Step S201, obtaining HTTP request body data to be sent.

[0086] In this embodiment, the electronic device (eg, Figure 1The server / terminal device shown in the figure) can obtain HTTP request body data through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultrawideband) connection, and other wireless connection methods currently known or to be developed in the future. The execution subject of the present application may be a data processing system with a built-in joint debugging tool, or simply referred to as a system. Among them, the HTTP request body data to be sent can be determined according to the business logic. The HTTP request body data includes various fields, such as user information, business parameters, etc. Among them, it is ensured in advance that the acquired HTTP request body data has the correct data format and meets the requirements of the back-end interface, that is, the specified interface. For example, if it is data in JSON format, it is necessary to ensure that the field name and value are correct and meet the grammatical rules of JSON. In addition, before the HTTP request body data is sent, the HTTP request body data can be further verified to ensure its integrity and accuracy, which can be specifically achieved by business logic verification, data format verification, etc. Among them, the present application can be applied to the interface testing scenario of financial interfaces in the financial business field. The above-mentioned designated interfaces are financial interfaces with high business logic complexity, which may include claims interfaces, bank interfaces, payment interfaces, and the like.

[0087] Step S202: compress the HTTP request body data based on the target compression algorithm in the preset joint debugging tool to obtain corresponding compressed data.

[0088] In this embodiment, the above-mentioned specific implementation process of compressing the HTTP request body data based on the target compression algorithm in the preset joint debugging tool to obtain the corresponding compressed data will be further described in detail in the subsequent specific embodiments of this application and will not be elaborated in detail here.

[0089] Step S203: Generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface.

[0090] In this embodiment, the specific implementation process of generating a corresponding HTTP request based on the compressed data and sending the HTTP request to a specified interface will be described in further detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0091] Step S204, receiving response data returned by the designated interface corresponding to the HTTP request; wherein the response data includes a compressed designated result.

[0092] In this embodiment, the HTTP client function in the joint debugging tool can be used to monitor and receive the response data returned by the specified interface for the corresponding processing of the above HTTP request. The joint debugging tool has the function of correctly parsing the HTTP response, including the status code, response header and response body.

[0093] Step S205: extract the specified result from the response data.

[0094] In this embodiment, upon receiving the response data corresponding to the HTTP request returned by the designated interface, it is checked whether the response body in the response data contains the compressed result, i.e., the designated result. The designated result is a Base64-encoded string. If it is contained, the designated result is extracted from the response data. If the format of the response body in the response data does not meet expectations, it is necessary to record error information and perform corresponding processing.

[0095] Step S206: decompress the specified result based on the target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data.

[0096] In this embodiment, the above-mentioned specific implementation process of performing a decompression operation on the specified result based on the target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain the corresponding decompressed data will be further described in detail in the subsequent specific embodiments of this application and will not be elaborated in detail here.

[0097] Step S207: display the decompressed data.

[0098] In this embodiment, the specific implementation process of displaying the decompressed data will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated on here.

[0099] The present application first obtains the HTTP request body data to be sent; then compresses the HTTP request body data based on the target compression algorithm in the preset joint debugging tool to obtain the corresponding compressed data; and generates the corresponding HTTP request based on the compressed data, and sends the HTTP request to the designated interface; then receives the response data corresponding to the HTTP request returned by the designated interface; wherein the response data contains the compressed designated result; and extracts the designated result from the response data; subsequently decompresses the designated result based on the target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain the corresponding decompressed data; and finally displays the decompressed data. Different from the existing manual decompression method used in the interface testing process, the present application can realize automatic and rapid data decompression processing in the interface testing process based on the use of the joint debugging tool, thereby avoiding the tester from frequently sending and receiving compressed data and performing manual decompression processing, effectively improving the processing efficiency of the interface test, and reducing the test cost of the interface test.

[0100] In some optional implementations, step S202 includes the following steps:

[0101] The target compression algorithm is called from the joint debugging tool.

[0102] In this embodiment, according to business requirements and network conditions, a suitable compression algorithm is pre-selected as the above-mentioned target compression algorithm, such as the Gzip compression algorithm or the Deflate compression algorithm. Then, in the back-end server or interface processing logic, the above-selected target compression algorithm is configured. And in the joint debugging tool, the target compression algorithm is used as the default or optional option. In addition, ensure that the compression algorithms used by the front and back ends are consistent to ensure the compatibility of compression and decompression. The constructed joint debugging function can completely simulate the code language and decompression method corresponding to the front and back ends to perform compression and decompression. In addition, the user is allowed to select a suitable decompression method as needed.

[0103] The HTTP request body data is compressed based on the target compression algorithm to obtain first compressed data.

[0104] In this embodiment, the prepared HTTP request body data may be used as input, and a target compression algorithm may be called to perform a compression operation.

[0105] A preset metadata identifier is embedded in the first compressed data to obtain corresponding second compressed data.

[0106] In this embodiment, the metadata identifier is a pre-set metadata format, for example, it may include information such as data type and length. During the compression process, the metadata identifier may be embedded as needed. For example, a special mark may be added to the front of the compressed data to identify the type, length or other key information of the data.

[0107] The second compressed data is used as the compressed data.

[0108] In this embodiment, after the compression operation is completed, the compressed binary data, namely the second compressed data, is obtained and used as the final compressed data. The compressed data will be used for subsequent encoding conversion and HTTP request sending.

[0109] The present application calls the target compression algorithm from the joint debugging tool; then compresses the HTTP request body data based on the target compression algorithm to obtain the first compressed data; then embeds a preset metadata identifier in the first compressed data to obtain the corresponding second compressed data; and subsequently uses the second compressed data as the compressed data. The present application calls the target compression algorithm from the joint debugging tool, and compresses the HTTP request body data based on the target compression algorithm to obtain the first compressed data, and intelligently embeds the metadata identifier in the first compressed data, thereby automatically and quickly completing the compression operation on the request body data, effectively improving the processing efficiency of the compression operation on the request body data.

[0110] In some optional implementations of this embodiment, step S203 includes the following steps:

[0111] The compressed data is subjected to encoding conversion processing based on a preset encoding method to obtain corresponding encoded data.

[0112] In this embodiment, the encoding method may specifically adopt Base64 encoding. The compressed data may be used as input, and then the compressed data may be encoded by calling the encoding function of the Base64 encoding library, and after the encoding is completed, the string data after Base64 encoding is obtained. Among them, these string data will be used for the content of the HTTP request body. In addition, during the encoding process, the integrity and accuracy of the data are ensured.

[0113] Gets the preset initial HTTP request.

[0114] In this embodiment, the construction process of the above-mentioned initial HTTP request may include: constructing the initial HTTP request according to the business logic and HTTP protocol specifications, including setting the request method (such as POST), request URL, request header, etc. Specifically, the necessary HTTP header information such as Content-Encoding is correctly set in the request header. The Content-Encoding header information is used to inform the back-end interface which encoding method is used for the request body data (Base64 encoding in this embodiment). At the same time, other related HTTP header information can also be set, such as Content-Type (used to inform the back-end interface of the data type of the request body, such as application / json).

[0115] The initial HTTP request is processed by data filling based on the encoded data to obtain the corresponding HTTP request.

[0116] In this embodiment, the Base64-encoded string data may be added to the initial HTTP request as the content of the request body, thereby obtaining a corresponding HTTP request.

[0117] The HTTP request is sent to the designated interface based on a preset sending tool.

[0118] In this embodiment, the sending tool may use an HTTP client library, and the HTTP client library may be used to send the generated HTTP request to the backend interface, that is, the specified interface, thereby ensuring that the HTTP request can be successfully sent and waiting for the response of the specified interface.

[0119] The present application performs encoding conversion processing on the compressed data based on a preset encoding method to obtain corresponding encoded data; then obtains a preset initial HTTP request; then performs data filling processing on the initial HTTP request based on the encoded data to obtain the corresponding HTTP request; and subsequently sends the HTTP request to the designated interface based on a preset sending tool. The present application performs encoding conversion processing on the compressed data based on an encoding method to obtain encoded data, and then performs data filling processing on the obtained initial HTTP request according to the obtained encoded data, thereby completing the construction of the corresponding HTTP request and improving the construction efficiency of the HTTP request. In addition, by using the sending tool, it can be ensured that the generated HTTP request is successfully sent to the designated interface.

[0120] In some optional implementations, step S206 includes the following steps:

[0121] The specified result is decoded based on a preset decoding method to obtain corresponding decoded data.

[0122] In this embodiment, the above decoding method is specifically a Base64 encoding method. The received designated result can be decoded by using the Base64 encoding method to restore it to compressed binary data, that is, to obtain the above decoded data.

[0123] The target decompression algorithm corresponding to the target compression algorithm is called from the joint debugging tool.

[0124] In this embodiment, the corresponding target decompression algorithm can be called out in the above-mentioned joint debugging tool according to the previously recorded target compression algorithm (such as Gzip or Deflate).

[0125] The decoded data is decompressed based on the target decompression algorithm to obtain decompressed data.

[0126] In this embodiment, the decoded binary data (decoded data) can be decompressed according to the above target decompression algorithm to obtain the corresponding decompressed data. During the decompression process, the joint debugging tool needs to ensure that it can correctly handle possible exceptions or errors, such as data corruption, format mismatch, etc.

[0127] The decompressed data is used as the decompressed data.

[0128] The present application obtains corresponding decoded data by performing a decoding operation on the designated result based on a preset decoding method; then calling the target decompression algorithm corresponding to the target compression algorithm from the joint debugging tool; then performing a decompression operation on the decoded data based on the target decompression algorithm to obtain decompressed data; and subsequently using the decompressed data as the decompressed data. The present application obtains decoded data by performing a decoding operation on the designated result based on a decoding method; then calling the target decompression algorithm corresponding to the target compression algorithm from the joint debugging tool; and then performing a decompression operation on the decoded data based on the use of the target decompression algorithm to obtain decompressed data, thereby automatically and quickly completing the decompression operation on the designated result, effectively improving the processing efficiency of the decompression operation on the designated result.

[0129] In some optional implementations, step S207 includes the following steps:

[0130] Call the default parser.

[0131] In this embodiment, the parser is a parsing tool capable of parsing decompressed data into a readable format.

[0132] The decompressed data is parsed into target data in a specified format based on the parser.

[0133] In this embodiment, the above-mentioned specified format may specifically be JSON, XML, etc.

[0134] Get the target display format.

[0135] In this embodiment, the target display format is an easy-to-read format, such as a tree structure, a table, etc.

[0136] Based on the target display format, the target data is displayed on a preset interface.

[0137] In this embodiment, the preset interface may specifically be an interface of a joint debugging tool. The target data may be displayed in a target display form on the preset interface.

[0138] The correctness and integrity of the data can be highlighted or verified based on the metadata identifier embedded in the target data. Specifically, if the decompressed data contains the metadata identifier, it can be further verified to ensure the correctness and integrity of the data. For example, it can be checked whether the type and length of the decompressed data are consistent with the description in the metadata.

[0139] The present application calls a preset parser; then based on the parser, the decompressed data is parsed into target data of a specified format; then the target display form is obtained; and subsequently, based on the target display form, the target data is displayed and processed on a preset interface. The present application calls a parser to parse the decompressed data into target data of a specified format, and then based on the use of the target display form, the target data is displayed and processed on a preset interface, thereby realizing intelligent display of the target data, effectively improving the readability of the target data, and improving the user experience.

[0140] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:

[0141] Get the preset comparison strategy.

[0142] In this embodiment, the above comparison strategy can adopt a byte-by-byte comparison strategy and a structure comparison strategy. Specifically, the strategy content of the byte-by-byte comparison strategy includes: comparing the original data and the decompressed data byte by byte. The strategy content of the structure comparison strategy includes: parsing the data according to the structure definition of the data (such as JSON, XML, etc.), and comparing each field one by one.

[0143] The decompressed data and the request body data are compared based on the comparison strategy to obtain a corresponding comparison result.

[0144] In this embodiment, by traversing the decompressed data and the request body data, and performing a comparison process between the decompressed data and the request body data according to the strategy content of the above-mentioned comparison strategy, and recording the result of each comparison point (such as the same, different, missing, etc.) to obtain the corresponding comparison result.

[0145] Call the preset display interface.

[0146] In this embodiment, the display interface may be a pre-built interface for displaying the comparison results, wherein the display interface may include color marking (eg, green for identical, red for different), difference list, detailed information viewing, and other functions.

[0147] The comparison result is displayed on the display interface.

[0148] In this embodiment, the comparison differences can be displayed on the display interface according to the comparison results recorded during the comparison process. The parts that are different can be clearly displayed by using color markings or list forms. A detailed information viewing option is provided so that the user can further understand the specific content of the difference.

[0149] This application obtains a preset comparison strategy; then compares the decompressed data with the request body data based on the comparison strategy to obtain a corresponding comparison result; then calls a preset display interface; and subsequently displays the comparison result on the display interface. After decompressing the specified result based on the target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain the decompressed data, this application uses the comparison strategy to compare the decompressed data with the request body data to ensure that the compression and decompression process does not introduce any errors or data corruption. In addition, the display interface will be intelligently used to display the generated comparison results so that users can view the differences between the original data and the decompressed data from the display page, which is conducive to improving the user experience.

[0150] In some optional implementations of this embodiment, after the step of comparing the decompressed data with the request body data based on the comparison strategy to obtain a corresponding comparison result, the electronic device may further perform the following steps:

[0151] Determine whether the comparison result is inconsistent.

[0152] In this embodiment, the content of the comparison result includes whether the comparison is consistent or inconsistent.

[0153] If so, a corresponding error message is generated based on the comparison result.

[0154] In this embodiment, if the comparison result is inconsistent, detailed error information will be recorded. The error information may include the location of inconsistent data, specific content differences, possible reasons, etc.

[0155] Get the preset error handling strategy.

[0156] In this embodiment, the error handling strategy includes: performing corresponding processing according to the severity and type of the error information, such as prompting the user to check the data source, re-comparison, and log recording.

[0157] The error information is processed accordingly based on the error processing strategy.

[0158] In this embodiment, corresponding processing for the error information may be performed according to the policy content of the above-mentioned error processing policy.

[0159] In addition, appropriate error handling mechanisms and logging capabilities can be added to the system so that relevant information can be captured and recorded in a timely manner when problems occur. This will help with troubleshooting and debugging, and improve the reliability and stability of the system.

[0160] The present application determines whether the content of the comparison result is inconsistent; if so, generates corresponding error information based on the comparison result; then obtains a preset error handling strategy; and subsequently handles the error information accordingly based on the error handling strategy. When the present application detects that the content of the comparison result is inconsistent, it will automatically and intelligently generate corresponding error information based on the comparison result, and then handle the error information accordingly based on the use of the preset error handling strategy, so that the errors that occur during the data comparison process can be effectively repaired accordingly, thereby improving the processing accuracy and processing intelligence of the data comparison process.

[0161] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.

[0162] In addition, the non-Company software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.

[0163] In addition, this application solves the problem of cumbersome front-end and back-end joint debugging after the interface with high business logic complexity is compressed, and realizes compression and decompression by simulating the code language and decompression method corresponding to the front and back ends. At the same time, it realizes result visualization, automatic decompression, customizable decompression method and code language selection, and provides a result comparison function, which compares the results before and after compression to ensure that the compression and decompression process does not introduce any errors or data corruption. Finally, error handling and logging are also provided to help troubleshooting and debugging, and improve the reliability and stability of the decompression tool.

[0164] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0165] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned decompressed data, the above-mentioned decompressed data can also be stored in a node of a blockchain.

[0166] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0167] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0168] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0170] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0171] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a data processing device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0172] like Figure 3 As shown, the data processing device 300 described in this embodiment includes: a first acquisition module 301, a compression module 302, a first processing module 303, a receiving module 304, an extraction module 305, a decompression module 306 and a first display module 307. Among them:

[0173] The first acquisition module 301 is used to acquire HTTP request body data to be sent;

[0174] The compression module 302 is used to compress the HTTP request body data based on the target compression algorithm in the preset joint debugging tool to obtain corresponding compressed data;

[0175] A first processing module 303, configured to generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface;

[0176] The receiving module 304 is used to receive the response data corresponding to the HTTP request returned by the designated interface; wherein the response data includes the compressed designated result;

[0177] An extraction module 305, configured to extract the specified result from the response data;

[0178] A decompression module 306, configured to perform a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data;

[0179] The first display module 307 is used to display the decompressed data.

[0180] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data processing method in the aforementioned implementation mode, and are not described in detail here.

[0181] In some optional implementations of this embodiment, the compression module 302 includes:

[0182] A first calling submodule, used for calling the target compression algorithm from the joint debugging tool;

[0183] A compression submodule, configured to perform a compression operation on the HTTP request body data based on the target compression algorithm to obtain first compressed data;

[0184] An embedding submodule, used for embedding a preset metadata identifier in the first compressed data to obtain corresponding second compressed data;

[0185] The first determining submodule is configured to use the second compressed data as the compressed data.

[0186] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data processing method in the aforementioned implementation mode, and are not described in detail here.

[0187] In some optional implementations of this embodiment, the first processing module 303 includes:

[0188] The conversion submodule is used to perform encoding conversion processing on the compressed data based on a preset encoding method to obtain corresponding encoded data;

[0189] The first acquisition submodule is used to obtain a preset initial HTTP request;

[0190] A filling submodule, used for performing data filling processing on the initial HTTP request based on the encoded data to obtain the corresponding HTTP request;

[0191] The sending submodule is used to send the HTTP request to the designated interface based on a preset sending tool.

[0192] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data processing method in the aforementioned implementation mode, and are not described in detail here.

[0193] In some optional implementations of this embodiment, the decompression module 306 includes:

[0194] A decoding submodule, used to perform a decoding operation on the specified result based on a preset decoding method to obtain corresponding decoded data;

[0195] A second calling submodule, used to call the target decompression algorithm corresponding to the target compression algorithm from the joint debugging tool;

[0196] A decompression submodule, used for performing a decompression operation on the decoded data based on the target decompression algorithm to obtain decompressed data;

[0197] The second determining submodule is configured to use the decompressed data as the decompressed data.

[0198] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data processing method in the aforementioned implementation mode, and are not described in detail here.

[0199] In some optional implementations of this embodiment, the first display module 307 includes:

[0200] The third calling submodule is used to call the preset parser;

[0201] A parsing submodule, used for parsing the decompressed data into target data in a specified format based on the parser;

[0202] The second acquisition submodule is used to acquire the target display form;

[0203] The display submodule is used to display the target data on a preset interface based on the target display form.

[0204] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data processing method in the aforementioned implementation mode, and are not described in detail here.

[0205] In some optional implementations of this embodiment, the data processing device further includes:

[0206] A second acquisition module is used to acquire a preset comparison strategy;

[0207] A comparison module, used for comparing the decompressed data with the request body data based on the comparison strategy to obtain a corresponding comparison result;

[0208] A calling module is used to call the preset display interface;

[0209] The second display module is used to display the comparison result on the display interface.

[0210] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data processing method in the aforementioned implementation mode, and are not described in detail here.

[0211] In some optional implementations of this embodiment, the data processing device further includes:

[0212] A judgment module, used to judge whether the content of the comparison result is inconsistent;

[0213] A generating module, configured to generate corresponding error information based on the comparison result if yes;

[0214] The third acquisition module is used to obtain a preset error handling strategy;

[0215] The second processing module is used to perform corresponding processing on the error information based on the error processing strategy.

[0216] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data processing method in the aforementioned implementation mode, and are not described in detail here.

[0217] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0218] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0219] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0220] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of data processing methods, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0221] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the data processing method.

[0222] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0223] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0224] In an embodiment of the present application, firstly, the HTTP request body data to be sent is obtained; then, based on the target compression algorithm in the preset joint debugging tool, the HTTP request body data is compressed to obtain the corresponding compressed data; and based on the compressed data, a corresponding HTTP request is generated, and the HTTP request is sent to a designated interface; then, the designated interface returns the response data corresponding to the HTTP request; wherein the response data contains the compressed designated result; and the designated result is extracted from the response data; subsequently, the designated result is decompressed based on the target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain the corresponding decompressed data; finally, the decompressed data is displayed and processed. Different from the existing manual decompression method used in the interface testing process, the present application can realize automatic and rapid data decompression processing in the interface testing process based on the use of the joint debugging tool, thereby avoiding the tester from frequently sending and receiving compressed data and performing manual decompression processing, effectively improving the processing efficiency of the interface test, and reducing the test cost of the interface test.

[0225] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the data processing method as described above.

[0226] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0227] In an embodiment of the present application, firstly, the HTTP request body data to be sent is obtained; then, based on the target compression algorithm in the preset joint debugging tool, the HTTP request body data is compressed to obtain the corresponding compressed data; and based on the compressed data, a corresponding HTTP request is generated, and the HTTP request is sent to a designated interface; then, the designated interface returns the response data corresponding to the HTTP request; wherein the response data contains the compressed designated result; and the designated result is extracted from the response data; subsequently, the designated result is decompressed based on the target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain the corresponding decompressed data; finally, the decompressed data is displayed and processed. Different from the existing manual decompression method used in the interface testing process, the present application can realize automatic and rapid data decompression processing in the interface testing process based on the use of the joint debugging tool, thereby avoiding the tester from frequently sending and receiving compressed data and performing manual decompression processing, effectively improving the processing efficiency of the interface test, and reducing the test cost of the interface test.

[0228] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0229] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A data processing method, characterized in that: The steps include: Get the HTTP request body data to be sent; Compressing the HTTP request body data based on a target compression algorithm in a preset joint debugging tool to obtain corresponding compressed data; Generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface; Receiving response data corresponding to the HTTP request returned by the designated interface; wherein the response data includes a compressed designated result; extracting the specified result from the response data; Performing a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data; The decompressed data is displayed.

2. The data processing method according to claim 1, characterized in that: The step of compressing the HTTP request body data based on the target compression algorithm in the preset joint debugging tool to obtain corresponding compressed data specifically includes: Calling the target compression algorithm from the joint debugging tool; Performing a compression operation on the HTTP request body data based on the target compression algorithm to obtain first compressed data; Embedding a preset metadata identifier in the first compressed data to obtain corresponding second compressed data; The second compressed data is used as the compressed data.

3. The data processing method according to claim 1, characterized in that: The step of generating a corresponding HTTP request based on the compressed data and sending the HTTP request to a designated interface specifically includes: Performing encoding conversion processing on the compressed data based on a preset encoding method to obtain corresponding encoded data; Get the preset initial HTTP request; Performing data filling processing on the initial HTTP request based on the encoded data to obtain the corresponding HTTP request; The HTTP request is sent to the designated interface based on a preset sending tool.

4. The data processing method according to claim 1, characterized in that: The step of performing a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data specifically includes: Performing a decoding operation on the specified result based on a preset decoding method to obtain corresponding decoded data; Calling the target decompression algorithm corresponding to the target compression algorithm from the joint debugging tool; Performing a decompression operation on the decoded data based on the target decompression algorithm to obtain decompressed data; The decompressed data is used as the decompressed data.

5. The data processing method according to claim 1, characterized in that: The step of displaying the decompressed data specifically includes: Call the preset parser; Parsing the decompressed data into target data in a specified format based on the parser; Get the target display format; Based on the target display format, the target data is displayed on a preset interface.

6. The data processing method according to claim 1, characterized in that: After the step of displaying the decompressed data, the method further includes: Get the preset comparison strategy; Compare the decompressed data with the request body data based on the comparison strategy to obtain a corresponding comparison result; Call the preset display interface; The comparison result is displayed on the display interface.

7. The data processing method according to claim 6, characterized in that: After the step of comparing the decompressed data with the request body data based on the comparison strategy to obtain a corresponding comparison result, the method further includes: Determining whether the content of the comparison result is inconsistent; If so, generating a corresponding error message based on the comparison result; Get the preset error handling strategy; The error information is processed accordingly based on the error processing strategy.

8. A data processing device, characterized in that: include: A first acquisition module, used to acquire HTTP request body data to be sent; A compression module, used to compress the HTTP request body data based on a target compression algorithm in a preset joint debugging tool to obtain corresponding compressed data; A first processing module, configured to generate a corresponding HTTP request based on the compressed data, and send the HTTP request to a designated interface; A receiving module, configured to receive response data corresponding to the HTTP request returned by the designated interface; wherein the response data includes a compressed designated result; An extraction module, used to extract the specified result from the response data; A decompression module, configured to perform a decompression operation on the specified result based on a target decompression algorithm corresponding to the target compression algorithm in the joint debugging tool to obtain corresponding decompressed data; The first display module is used to display the decompressed data.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the data processing method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.