Information processing method, device, equipment, storage medium and program product
Through the interface test equipment, the data volume of database tables in the test environment is solved, and the problem of time-consuming and inaccurate acquisition of data volume in the existing technology is solved, and automated acquisition and analysis is realized, which improves the accuracy and reliability of data volume comparison.
Patent Information
- Application Number
- CN202411938384.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, the method of obtaining the data volume of database tables in the test environment is time-consuming and labor-intensive, and is easily affected by human factors, which makes it difficult to guarantee the accuracy and reliability of the comparison results.
Through the interface test device, the test request is sent to the target interface, the initial table data volume information is monitored and obtained, and the initial table data volume information is stored in the memory associated with the data volume query interface, and the response message is generated and sent to the data processing device to automatically obtain and parse the table data volume.
It improves the efficiency and accuracy of table data volume acquisition, reduces manual operations, and enhances the accuracy and reliability of data volume comparison results.
Smart Images

Figure CN119782177A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to an information processing method, device, equipment, storage medium and program product. Background Art
[0002] In the current field of database management and maintenance, data volume comparison is a crucial task, which is directly related to data consistency, integrity and system reliability. Data volume comparison generally compares the table data volume of the database in the test environment with the table data volume of the database in the production environment. Before the comparison, it is necessary to obtain the table data volume of the database in the test environment.
[0003] Currently, after stress testing, the interface messages of the database in the test environment are usually manually exported, and the response messages are parsed using scripts or manually to obtain the table data volume of the database in the test environment. This is not only time-consuming and laborious, but also easily affected by human factors, making it difficult to ensure the accuracy and reliability of the comparison results. Summary of the invention
[0004] The embodiments of the present application provide an information processing method, apparatus, device and computer storage medium, which can automatically obtain the table data volume of a database under a test environment and improve the efficiency and accuracy of obtaining the table data volume.
[0005] In a first aspect, an embodiment of the present application provides an information processing method, which is applied to an interface testing device, and the method includes:
[0006] In response to the target stress testing task, a test request is sent to at least one target interface, where the at least one target interface includes an interface corresponding to the database under test;
[0007] Monitor each target interface to obtain initial table data volume information, where the initial table data volume information includes first table data volume information of each target interface;
[0008] The initial table data volume information is stored in the memory associated with the data volume query interface;
[0009] In response to a table data volume query request from a data processing device, a response message is generated through a data volume query interface, wherein the response message includes initial table data volume information;
[0010] A response message is sent to the data processing device, so that the data processing device parses the response message to obtain the first table data volume information of each target interface, and generates a stress test report based on the first table data volume information of each target interface.
[0011] In a possible implementation, the first table data volume information includes a uniform resource identifier (URI) of a target interface, a table name, and a table data volume;
[0012] Monitor each target interface to obtain initial table data volume information, including:
[0013] For each target interface, obtain the URI of the target interface from the test request received by the target interface;
[0014] Intercept the Structured Query Language (SQL) of each target interface through the database connection pool;
[0015] For each target interface, extract the table name and table data volume from the SQL of the target interface;
[0016] The URI, table name, and table data volume of each target interface are associated to obtain initial table data volume information.
[0017] In a possible implementation, in response to a target stress testing task, sending a test request to at least one target interface includes:
[0018] In response to the target stress testing task, a target stress testing thread group is generated;
[0019] Send a test request corresponding to the target stress testing thread group to at least one target interface.
[0020] In a second aspect, an embodiment of the present application provides another information processing method, which is applied to a data processing device, and the method includes:
[0021] In response to the target stress testing task, a table data volume query request is sent to the interface testing device, where the table data volume query request is used to obtain first table data volume information of at least one target interface, where the at least one target interface includes an interface corresponding to the database under test;
[0022] A response message generated by a data volume query interface of a receiving interface test device;
[0023] Parse the response message to obtain the first table data volume information of each target interface;
[0024] Generate a stress test report based on the data volume information of the first table of each target interface.
[0025] In a possible implementation, the first table data volume information includes a URI of a target interface, a table name, and a table data volume;
[0026] Generate a stress test report based on the data volume information of the first table of each target interface, including:
[0027] Use the report generation device to generate a stress testing report template;
[0028] Write the URI of each target interface, the table name corresponding to the URI, and the table data volume into the stress testing report template to obtain the stress testing report.
[0029] In a possible implementation, after generating a stress test report based on the data volume information of the first table of each target interface, the method further includes:
[0030] Obtain the second table data volume information of each target interface in the interface production environment;
[0031] The data volume information of the first table and the data volume information of the second table of each target interface are compared to obtain a comparison result.
[0032] In a third aspect, an embodiment of the present application provides an information processing device, which is applied to an interface testing device, and the device includes:
[0033] A sending module, configured to send a test request to at least one target interface in response to a target stress testing task, wherein the at least one target interface includes an interface corresponding to a database under test;
[0034] A monitoring module, used to monitor each target interface to obtain initial table data volume information, where the initial table data volume information includes first table data volume information of each target interface;
[0035] A storage module, used to store the initial table data volume information in a memory associated with the data volume query interface;
[0036] A generating module, used for responding to a table data volume query request of a data processing device, generating a response message through a data volume query interface, wherein the response message includes initial table data volume information;
[0037] The sending module is also used to send a response message to the data processing device, so that the data processing device parses the response message to obtain the first table data volume information of each target interface, and generates a stress test report based on the first table data volume information of each target interface.
[0038] In a fourth aspect, an embodiment of the present application provides an information processing device, which is applied to a data processing device, and the device includes:
[0039] A sending module, configured to send a table data volume query request to an interface testing device in response to a target stress testing task, wherein the table data volume query request is used to obtain first table data volume information of at least one target interface, wherein the at least one target interface includes an interface corresponding to a database under test;
[0040] A receiving module, used for receiving a response message generated by a data volume query interface of an interface test device;
[0041] A parsing module, used for parsing the response message to obtain the first table data volume information of each target interface;
[0042] The generation module is used to generate a stress test report based on the data volume information of the first table of each target interface.
[0043] In a fifth aspect, an embodiment of the present application provides an information processing device, the device comprising:
[0044] A processor and a memory storing computer program instructions; when the processor executes the computer program instructions, any one of the above information processing methods is implemented.
[0045] In a sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, any one of the above-mentioned information processing methods is implemented.
[0046] In a seventh aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform any one of the above-mentioned information processing methods.
[0047] The information processing method, device, equipment and computer storage medium of the embodiment of the present application can respond to the target stress test task and send a test request to at least one target interface, and at least one target interface includes an interface corresponding to the database under test. Monitor each target interface to obtain the initial table data volume information, and the initial table data volume information includes the first table data volume information of each target interface. The initial table data volume information is stored in the memory associated with the query data volume interface. In this way, an external program or device can be allowed to directly call the query data volume interface to obtain the initial table data volume information. Then, in response to the table data volume query request of the data processing device, a response message can be generated through the query data volume interface, and the response message includes the initial table data volume information. Send a response message to the data processing device, so that the data processing device parses the response message to obtain the first table data volume information of each target interface, and generates a stress test report based on the first table data volume information of each target interface. In this way, there is no need to manually export the interface message of the database under the test environment, which is conducive to realizing the automatic parsing of the response message by the data processing device, thereby realizing the automatic acquisition of the database table data volume under the test environment. This helps to improve the efficiency and accuracy of obtaining database table data in a test environment, thereby improving the accuracy and reliability of data volume comparison results. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0049] Figure 1 It is a flowchart of an information processing method provided by an embodiment of the present application;
[0050] Figure 2 is a structural diagram of an information processing device provided by another embodiment of the present application;
[0051] Figure 3 is a structural diagram of an information processing device provided by yet another embodiment of the present application;
[0052] Figure 4 It is a structural diagram of an information processing device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0053] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0054] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0055] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0056] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0057] As described in the background technology, currently, the method for obtaining the table data volume of the database under the test environment is usually to manually export the interface message of the database under the test environment after the stress test, and use a script or manually parse the response message to obtain the table data volume of the database under the test environment. This is not only time-consuming and laborious, but also easily affected by human factors, making it difficult to ensure the accuracy and reliability of the comparison results.
[0058] The related technology involves using an independent application programming interface (API) tool to call the backend interface, such as Postman, Jmeter, etc., to obtain the API response message, and then using a script or manually parsing the API response message. However, in this solution, it is difficult to integrate the API tool with the message parsing tool. After calling the backend interface to obtain the API response message, the message parsing tool cannot directly obtain the response message from the API tool, and still relies on manual operations to a certain extent. As a result, the efficiency and accuracy of obtaining table data volume are still low.
[0059] In order to solve the problems of the prior art, the embodiments of the present application provide an information processing method, apparatus, device and computer storage medium.
[0060] The information processing method provided in the embodiment of the present application, the device executing the method may be an information processing device, or a partial module in the information processing device for executing the information processing method. In the embodiment of the present application, the information processing method provided in the embodiment of the present application is described in detail by taking the information processing device executing the information processing method as an example.
[0061] In the method of the embodiment of the present application, the interface testing device can be implemented based on Java probe (Java Agent) technology combined with API tools. Exemplarily, an application request interception and database table data volume query tool based on Java Agent technology can be designed. The query tool can intercept all application requests without modifying the source code through Java Agent technology, obtain the interface URI of the request, further monitor SQL queries through the database connection pool, extract the table name and query the table data volume, associate the URI with the table data volume and store it, and provide an external interface for the caller to query. The query tool can realize efficient monitoring and data query functions without modifying the source code.
[0062] Exemplarily, the query tool can be injected into the application corresponding to the API tool using Java Agent technology to intercept all interface requests and record the URI information carried by the interface requests. In this way, the interface request can be monitored without modifying the source code, reducing the invasiveness of the system. Exemplarily, the SQL interception function provided by the Druid database connection pool can be used to extract the table name in the SQL statement and query the database to obtain the table data volume. In this way, through the SQL interception mechanism of Druid, not only can the SQL statement executed by the interface be obtained, but also the table name can be accurately extracted and data volume statistics can be performed. The interface test device can save the URI, table name and data volume into memory, and provide a data volume query interface (such as a RESTfulAPI interface) for external query. In this way, external query requests can be responded to quickly, improving the real-time performance of queries.
[0063] In the method of the embodiment of the present application, the data processing device can be implemented based on JSON parsing technology and a report generation tool. Exemplarily, the data processing device may include a message parsing module and a report generation module. The data processing device may be configured to automatically send a table data volume query request to the data volume query interface in response to a stress test task. The data volume query interface can return a corresponding response message based on the table data volume query request. The message parsing module can use the JSON parsing library to parse the response message of the data volume query interface, and extract the table data volume information in the response message according to the interface dimension. The report generation module can use the report generation tool to generate a stress test report template, and write the parsed table data volume information into the stress test report template.
[0064] In this way, the interface testing device can directly provide a query function to the data processing device through the data volume query interface, thereby allowing the interface device to be integrated with the data processing device to automatically execute the function of obtaining the table data volume of the database under the test environment.
[0065] The following will continue to introduce the information processing method provided in the embodiments of the present application in conjunction with the accompanying drawings.
[0066] Figure 1 FIG. 1 is a flow chart showing an information processing method provided by an embodiment of the present application. Figure 1 As shown, the method may include the following steps S110 to S180.
[0067] In a first aspect, an embodiment of the present application provides an information processing method, which is applied to an interface testing device, and the method includes:
[0068] S110, the interface testing device sends a test request to at least one target interface in response to a target stress testing task, where the at least one target interface includes an interface corresponding to the database under test.
[0069] In step S110, the target stress testing task may be a stress testing task designed based on data volume comparison requirements. Exemplarily, the target stress testing task may include identification information of a target interface in the tested database that needs to acquire table data volume.
[0070] S120: The interface testing device monitors each target interface to obtain initial table data volume information, where the initial table data volume information includes first table data volume information of each target interface.
[0071] S130, the interface testing device stores the initial table data volume information in a memory associated with the data volume query interface.
[0072] In step S130, the initial table data volume information is stored in the memory associated with the data volume query interface, which is conducive to quickly responding to external query requests and making the query function of the data volume query interface have high real-time performance.
[0073] S140: The data processing device sends a table data volume query request to the interface testing device in response to the target stress testing task, where the table data volume query request is used to obtain first table data volume information of at least one target interface.
[0074] S150, the interface testing device generates a response message through a data volume query interface in response to a table data volume query request from the data processing device, wherein the response message includes initial table data volume information.
[0075] S160, the interface testing device sends a response message to the data processing device.
[0076] Correspondingly, the data processing device receives the response message generated by the data volume query interface of the interface testing device.
[0077] S170: The data processing device parses the response message to obtain the first table data volume information of each target interface.
[0078] S180: The data processing device generates a stress test report based on the data volume information of the first table of each target interface.
[0079] In the information processing method of the embodiment of the present application, the interface test device can respond to the target stress test task and send a test request to at least one target interface, and at least one target interface includes an interface corresponding to the database under test. Each target interface is monitored to obtain the initial table data volume information, and the initial table data volume information includes the first table data volume information of each target interface. The initial table data volume information is stored in the memory associated with the query data volume interface. In this way, an external program or device can be allowed to directly call the query data volume interface to obtain the initial table data volume information. The data processing device can respond to the target stress test task and send a table data volume query request to the interface test device, and the table data volume query request is used to obtain the first table data volume information of at least one target interface. Correspondingly, the interface test device can respond to the table data volume query request of the data processing device, generate a response message through the query data volume interface, and send a response message to the data processing device. The response message includes the initial table data volume information. Then, the data processing device can receive the response message generated by the query data volume interface of the interface test device, parse the response message to obtain the first table data volume information of each target interface, and generate a stress test report based on the first table data volume information of each target interface. In this way, there is no need to manually export the interface message of the database in the test environment, which is conducive to the automatic parsing of the response message by the data processing device, thereby realizing the automatic acquisition of the database table data volume in the test environment. This is conducive to improving the efficiency and accuracy of obtaining the database table data volume in the test environment, thereby improving the accuracy and reliability of the data volume comparison results.
[0080] In one embodiment, the first table data volume information may include a URI of a target interface, a table name, and a table data volume.
[0081] The interface test equipment monitors each target interface to obtain the initial table data volume information, which may include:
[0082] The interface testing device obtains the URI of each target interface from the test request received by the target interface.
[0083] The interface test device intercepts the SQL of each target interface through the database connection pool.
[0084] The interface testing device extracts the table name and the table data volume from the SQL of each target interface.
[0085] The interface testing device associates the URI, table name and table data volume of each target interface to obtain initial table data volume information.
[0086] In the above implementation, the database connection pool can manage the creation, use and release of database connections. By intercepting the SQL of each target interface through the database connection pool, the table name and table data volume of the target interface can be accurately and comprehensively obtained.
[0087] According to the above implementation, by intercepting the test request and SQL, the URI of the target interface, the table name, and the table data volume can be quickly and accurately obtained, which is conducive to improving the efficiency and accuracy of data volume comparison.
[0088] In one embodiment, the interface testing device sends a test request to at least one target interface in response to the target stress testing task, which may specifically include:
[0089] The interface testing device generates a target stress testing thread group in response to the target stress testing task.
[0090] The interface testing device sends a test request corresponding to the target stress testing thread group to at least one target interface.
[0091] In the above implementation, the interface testing device generates a target stress testing thread group in response to the target stress testing task, which may specifically include: the interface testing device determines the number and configuration of the stress testing thread groups to be generated according to the target interface in the target stress testing task, the expected stress testing load (such as the number of concurrent users, the request rate, etc.), the test duration and other information. Each thread group can represent a group of concurrent users. One or more target stress testing thread groups are generated according to the number and configuration of the stress testing thread groups to be generated. These thread groups will simulate the behavior of concurrent users and send requests to the target interface according to the specified load and rate. The number and configuration of stress testing thread groups to be generated. For each thread group, the interface testing device needs to configure the parameters of the test request. These parameters may include the URI of the request, the request method, the request header information, the request body content (such as data in the format of JSON, XML, etc.), etc. After the configuration is completed, the interface testing device can send a test request to the corresponding target interface through the generated thread group. These requests will be sent according to the specified load and rate to simulate the user behavior in the real scenario.
[0092] According to the above implementation, a suitable test request can be automatically generated according to the target stress test task, which is not only conducive to accurately obtaining the table data volume in the test environment, but also conducive to improving the efficiency of obtaining the table data volume.
[0093] In one embodiment, the first table data volume information may include a URI of a target interface, a table name, and a table data volume.
[0094] The data processing device generates a stress test report based on the data volume information of the first table of each target interface, which may specifically include:
[0095] The data processing device uses the report generation device to generate a stress testing report template.
[0096] The data processing device writes the URI of each target interface, the table name corresponding to the URI, and the table data volume into the stress testing report template to obtain the stress testing report.
[0097] In the above implementation, the report generation device may include a report generation tool. Exemplarily, the report generation device may generate a corresponding stress testing report template according to the requirements of the target stress testing task. For example, a table data volume statistics template based on interfaces may be generated, and the table name and table data volume corresponding to the URI of each target interface may be recorded.
[0098] According to the above implementation, a stress test report with a standardized format can be automatically generated, which is not only conducive to improving the efficiency of obtaining table data volume information, but also helps to compare the table data volume with the interface production environment in the subsequent process, thereby improving the comparison efficiency and accuracy.
[0099] In one embodiment, after the data processing device generates a stress test report based on the data volume information of the first table of each target interface, the method may further include:
[0100] The data processing device obtains the second table data volume information of each target interface in the interface production environment.
[0101] The data processing device compares the first table data volume information with the second table data volume information of each target interface to obtain a comparison result.
[0102] In the above implementation, the second table data volume information may include the URI of the target interface, the table name, and the table data volume. The second table data volume information may be obtained by interface call or database query. Exemplarily, an Excel processing library (such as xlrd) may be used to read the interface production environment table data volume information in an Excel document to obtain the second table data volume information of each target interface. The above comparison results may include data volume differences, difference analysis, suggested measures, and the like. Exemplarily, the difference analysis may include the reasons that may lead to the data volume differences, and whether the data volume differences are within the acceptable range of the production environment.
[0103] According to the above implementation, the data processing device automatically compares the first table data volume information with the second table data volume information of each target interface to obtain a comparison result, which is conducive to improving the efficiency and accuracy of data volume comparison.
[0104] In order to better describe the entire solution, based on the above embodiments, a specific example is given to illustrate the information processing method of the embodiment of the present application. This is explained in detail below. It should be noted that the following examples are only for explaining the embodiment of the present application, and do not constitute a limitation on the embodiment of the present application.
[0105] Exemplarily, the interface test device can be implemented based on the aforementioned Java Agent technology combined with an API tool. The data processing device can include a message parsing module, a report generating module, and a data comparing module. The information processing method can include the following steps S210 to S270.
[0106] S210, in response to the target stress testing task, the interface testing device calls the data volume query interface through an API tool (such as Jmeter), queries the table data volume, and obtains the first table data volume information involved in each target interface.
[0107] S220, the data processing device sends a table data volume query request to the interface testing device.
[0108] S230, the interface testing device responds to the table data volume query request and returns a response message to the data processing device through the data volume query interface.
[0109] Correspondingly, the data processing device may receive a response message returned by the data volume query interface.
[0110] S240: The data processing device parses the response message through a message parsing module to obtain the first table data volume information of each target interface.
[0111] S250: The report generation module generates a stress testing report template using a report generation tool, and writes the data volume information of the first table into the stress testing report template to obtain a stress testing report.
[0112] S260, the data comparison module reads the second table data volume information of each target interface in the interface production environment in the Excel document.
[0113] S270: The data comparison module compares the data volume information of the first table of each target interface in the stress testing report with the data volume information of the second table in the Excel document to generate a comparison result.
[0114] In this way, the interface test equipment and data processing equipment can be integrated as an automated data volume comparison tool to automatically obtain and compare the table data volume. In this way, manual operations can be reduced, the probability of errors can be reduced, and seamless integration and automated processing between devices can be achieved, thereby effectively improving the efficiency and accuracy of data volume verification.
[0115] Based on the information processing method provided in the above embodiment, the present application also provides a specific implementation of an information processing device, which can be applied to an interface testing device. Please refer to the following embodiment.
[0116] See first Figure 2 The information processing device 200 provided in the embodiment of the present application includes a first sending module 201, a monitoring module 202, a storage module 203 and a first generating module 204.
[0117] The first sending module 201 is used to send a test request to at least one target interface in response to a target stress testing task, and the at least one target interface includes an interface corresponding to the database under test.
[0118] The monitoring module 202 is used to monitor each target interface to obtain initial table data volume information, where the initial table data volume information includes first table data volume information of each target interface.
[0119] The storage module 203 is used to store the initial table data volume information in the memory associated with the data volume query interface.
[0120] The first generating module 204 is used to generate a response message through a data volume query interface in response to a table data volume query request from a data processing device, wherein the response message includes initial table data volume information.
[0121] The first sending module 201 is further used to send a response message to the data processing device, so that the data processing device parses the response message to obtain the first table data volume information of each target interface, and generates a stress test report based on the first table data volume information of each target interface.
[0122] The information processing device of the embodiment of the present application is applied to the interface test device, and can respond to the target stress test task and send a test request to at least one target interface, and at least one target interface includes the interface corresponding to the tested database. Monitor each target interface to obtain the initial table data volume information, and the initial table data volume information includes the first table data volume information of each target interface. The initial table data volume information is stored in the memory associated with the query data volume interface. In this way, it is possible to allow an external program or device to directly call the query data volume interface to obtain the initial table data volume information. Then, in response to the table data volume query request of the data processing device, a response message can be generated through the query data volume interface, and the response message includes the initial table data volume information. Send a response message to the data processing device, so that the data processing device parses the response message to obtain the first table data volume information of each target interface, and generates a stress test report based on the first table data volume information of each target interface. In this way, there is no need to manually export the interface message of the database under the test environment, which is conducive to realizing the automatic parsing of the response message by the data processing device, thereby realizing the automatic acquisition of the database table data volume under the test environment. This helps to improve the efficiency and accuracy of obtaining database table data in a test environment, thereby improving the accuracy and reliability of data volume comparison results.
[0123] In one embodiment, the first table data volume information may include a uniform resource identifier URI of a target interface, a table name, and a table data volume.
[0124] The monitoring module is used to monitor each target interface to obtain the initial table data volume information, which may include:
[0125] The acquisition submodule is used to obtain the URI of the target interface from the test request received by the target interface for each target interface.
[0126] The interception submodule is used to intercept the SQL of each target interface through the database connection pool.
[0127] The extraction submodule is used to extract the table name and table data volume from the SQL of the target interface for each target interface.
[0128] The association submodule is used to associate the URI, table name and table data volume of each target interface to obtain initial table data volume information.
[0129] In one embodiment, the first sending module is used to send a test request to at least one target interface in response to a target stress testing task, which may specifically include:
[0130] The generation submodule is used to generate a target stress testing thread group in response to a target stress testing task.
[0131] The sending submodule is used to send a test request corresponding to the target stress testing thread group to at least one target interface.
[0132] Based on the information processing method provided in the above embodiment, the present application also provides a specific implementation of an information processing device, which can be applied to a data processing device. Please refer to the following embodiments.
[0133] See first Figure 3 The information processing device 300 provided in the embodiment of the present application includes a second sending module 301, a receiving module 302, a parsing module 303 and a second generating module 304.
[0134] The second sending module 301 is used to send a table data volume query request to the interface testing device in response to the target stress testing task, where the table data volume query request is used to obtain first table data volume information of at least one target interface, where the at least one target interface includes an interface corresponding to the database under test.
[0135] The receiving module 302 is used to receive a response message generated by a data volume query interface of an interface testing device.
[0136] The parsing module 303 is used to parse the response message to obtain the first table data volume information of each target interface.
[0137] The second generating module 304 is used to generate a stress testing report based on the data volume information of the first table of each target interface.
[0138] The information processing device of the embodiment of the present application is applied to a data processing device, and can respond to a target stress test task and send a table data volume query request to an interface test device, wherein the table data volume query request is used to obtain the first table data volume information of at least one target interface, and at least one target interface includes an interface corresponding to the database under test. In this way, the data volume query interface can be directly called to obtain the initial table data volume information. Then, the response message generated by the data volume query interface of the interface test device can be received, the response message can be parsed, the first table data volume information of each target interface can be obtained, and a stress test report can be generated based on the first table data volume information of each target interface. In this way, automatic parsing of the response message and automatic generation of the stress test report can be realized, thereby realizing the automatic acquisition of the database table data volume under the test environment. In this way, it is conducive to improving the acquisition efficiency and accuracy of the database table data volume under the test environment, thereby improving the accuracy and reliability of the data volume comparison results.
[0139] In one embodiment, the first table data volume information may include a URI of a target interface, a table name, and a table data volume.
[0140] The second generating module is used to generate a stress test report based on the data volume information of the first table of each target interface, which may specifically include:
[0141] The generation submodule is used to generate a stress testing report template using the report generation device.
[0142] The writing submodule is used to write the URI of each target interface and the table name and table data volume corresponding to the URI into the stress testing report template to obtain the stress testing report.
[0143] In one embodiment, the apparatus may further include:
[0144] The acquisition module is used to acquire the second table data volume information of each target interface in the interface production environment after generating a stress test report based on the first table data volume information of each target interface.
[0145] The comparison module is used to compare the first table data volume information with the second table data volume information of each target interface to obtain a comparison result.
[0146] Each module of the information processing device provided in the embodiment of the present application can realize Figure 1 The functions of each step of the information processing method are provided, and the corresponding technical effects can be achieved. For the sake of concise description, they will not be repeated here.
[0147] Figure 4 A schematic diagram of the hardware structure of an information processing device provided in an embodiment of the present application is shown.
[0148] The information processing device may include a processor 401 and a memory 402 storing computer program instructions.
[0149] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0150] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, memory 402 may be inside or outside of an integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.
[0151] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0152] The processor 401 implements any one of the information processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .
[0153] In one example, the information processing device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0154] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0155] Bus 410 includes hardware, software or both, and the parts of information processing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0156] The information processing device can execute the information processing method in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 2-3 The information processing method and device described herein. The information processing method in the above embodiments can be implemented by providing a computer storage medium in the present application embodiment. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the information processing methods in the above embodiments is implemented.
[0157] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the information processing methods in the above embodiments when the computer program is processed and executed.
[0158] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0159] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0160] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0161] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable information processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable information processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0162] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An information processing method, characterized in that: Applied to interface testing equipment, the method comprises: In response to the target stress testing task, sending a test request to at least one target interface, wherein the at least one target interface includes an interface corresponding to the database under test; Monitoring each target interface to obtain initial table data volume information, wherein the initial table data volume information includes first table data volume information of each target interface; Storing the initial table data volume information in a memory associated with a data volume query interface; In response to a table data volume query request from a data processing device, generating a response message through the data volume query interface, wherein the response message includes the initial table data volume information; The response message is sent to the data processing device, so that the data processing device parses the response message to obtain the first table data volume information of each target interface, and generates a stress test report based on the first table data volume information of each target interface.
2. The information processing method according to claim 1, characterized in that: The first table data volume information includes a uniform resource identifier URI of a target interface, a table name, and a table data volume; The monitoring of each target interface to obtain the initial table data volume information includes: For each target interface, respectively obtain the URI of the target interface from the test request received by the target interface; Intercept the structured query language SQL of each target interface through the database connection pool; For each target interface, extract the table name and table data volume from the SQL of the target interface respectively; The URI, table name, and table data volume of each target interface are associated to obtain initial table data volume information.
3. The information processing method according to claim 1 or 2, characterized in that: The sending of a test request to at least one target interface in response to the target stress testing task includes: In response to the target stress testing task, a target stress testing thread group is generated; Send a test request corresponding to the target stress testing thread group to at least one target interface.
4. An information processing method, characterized in that: Applied to a data processing device, the method comprises: In response to the target stress testing task, a table data volume query request is sent to the interface testing device, where the table data volume query request is used to obtain first table data volume information of at least one target interface, where the at least one target interface includes an interface corresponding to the database under test; Receive a response message generated by the data volume query interface of the interface test device; Parsing the response message to obtain the first table data volume information of each target interface; Generate a stress test report based on the data volume information of the first table of each target interface.
5. The information processing method according to claim 4, characterized in that: The first table data volume information includes the URI of the target interface, the table name and the table data volume; The generating a stress test report based on the first table data volume information of each target interface includes: Use the report generation device to generate a stress testing report template; The URI of each target interface and the table name and table data volume corresponding to the URI are written into the stress testing report template to obtain a stress testing report.
6. The information processing method according to claim 4, characterized in that: After generating the stress test report based on the first table data volume information of each target interface, the method further includes: Obtain the second table data volume information of each target interface in the interface production environment; The first table data volume information of each target interface is compared with the second table data volume information to obtain a comparison result.
7. An information processing device, characterized in that: Applied to interface testing equipment, the device comprises: A sending module, configured to send a test request to at least one target interface in response to a target stress testing task, wherein the at least one target interface includes an interface corresponding to a database under test; A monitoring module, used to monitor each target interface to obtain initial table data volume information, wherein the initial table data volume information includes first table data volume information of each target interface; A storage module, used to store the initial table data volume information in a memory associated with the data volume query interface; A generating module, configured to generate a response message through the data volume query interface in response to a table data volume query request of the data processing device, wherein the response message includes the initial table data volume information; The sending module is also used to send the response message to the data processing device, so that the data processing device parses the response message to obtain the first table data volume information of each target interface, and generates a stress testing report based on the first table data volume information of each target interface.
8. An information processing device, characterized in that: Applied to a data processing device, the device comprises: A sending module, configured to send a table data volume query request to an interface testing device in response to a target stress testing task, wherein the table data volume query request is used to obtain first table data volume information of at least one target interface, wherein the at least one target interface includes an interface corresponding to a database under test; A receiving module, used for receiving a response message generated by a data volume query interface of the interface test device; A parsing module, used for parsing the response message to obtain the first table data volume information of each target interface; A generation module is used to generate a stress test report based on the data volume information of the first table of each target interface.
9. An information processing device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the information processing method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the information processing method according to any one of claims 1 to 6 is implemented.
11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the information processing method as described in any one of claims 1 to 6.