Data processing method, system and equipment and storage medium
By simulating the network environment of the interface by acquiring network quality data and obtaining server response data, the accuracy and efficiency issues of interface testing in complex network environments are solved, and efficient interface testing is achieved.
Patent Information
- Application Number
- CN202511055325.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-31
AI Technical Summary
Existing interface testing technologies struggle to accurately simulate real-world network environments in complex network conditions, resulting in low testing accuracy and inefficiency.
By acquiring network quality data to simulate the network environment of the target interface and obtaining the server's response data in that environment, automated testing can be achieved, improving testing accuracy and efficiency.
It can simulate real network environments based on network quality data, improve the accuracy of interface testing, and increase testing efficiency through automated testing methods.
Smart Images

Figure CN120880937A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interface testing technology, and in particular to a data processing method, system, device, and storage medium. Background Technology
[0002] With the rapid development of mobile internet and the Internet of Things (IoT), the stability and performance of Application Programming Interfaces (APIs) in complex network environments are becoming increasingly important. Therefore, how to accurately and efficiently perform network testing on these interfaces is a problem that urgently needs to be solved. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a data processing method, system, device and storage medium.
[0004] In a first aspect, embodiments of the present invention provide a data processing method applied to a testing system, the method comprising:
[0005] Obtain network quality data for testing the target interface;
[0006] The network environment used to test the target interface is simulated based on the network quality data.
[0007] Obtain the response data from the server in the network environment. The response data is generated based on the test request sent by the test system to the server through the target interface.
[0008] Secondly, embodiments of the present invention provide a data processing system applied to a testing system, the system comprising:
[0009] The acquisition module is used to acquire network quality data for testing the target interface.
[0010] The simulation module is used to simulate the network environment used to test the target interface based on the network quality data.
[0011] The acquisition module is also used to acquire response data from the server in the network environment, the response data being generated based on the test request sent by the test system to the server through the target interface.
[0012] Thirdly, embodiments of the present invention provide an electronic device, including: one or more processors; a memory for storing one or more programs; and when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the data processing method provided in the first aspect.
[0013] Fourthly, embodiments of the present invention provide a computer storage medium on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the data processing method provided in the first aspect.
[0014] The data processing method provided by this invention can acquire network quality data for testing target interfaces, simulate the corresponding network environment based on the network quality data, and then obtain the response data of the server in the network environment. Since the response data is generated based on the test request sent by the test system to the server through the target interface, it can be used to reflect the test results of the target interface. In this way, not only can the real network environment be simulated based on network quality data to improve the test accuracy of interface testing, but the efficiency of interface testing can also be improved through automated testing. Attached Figure Description
[0015] Figure 1 A schematic diagram of the architecture of a testing system provided in an embodiment of the present invention;
[0016] Figure 2 This is a schematic diagram of the structure of a network simulation module in a testing system provided by an embodiment of the present invention;
[0017] Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of the present invention;
[0018] Figure 4 This is a schematic diagram of a target interface provided in an embodiment of the present invention;
[0019] Figure 5 This is a schematic diagram of another target interface provided in an embodiment of the present invention;
[0020] Figure 6 This is a schematic diagram illustrating how response time varies with weak network conditions, provided by an embodiment of the present invention.
[0021] Figure 7 This is a schematic diagram illustrating how the response success rate changes under weak network conditions, provided by an embodiment of the present invention.
[0022] Figure 8 This is a schematic diagram illustrating how the response failure rate changes under weak network conditions, provided by an embodiment of the present invention.
[0023] Figure 9 This is a schematic diagram illustrating how the response timeout rate changes under weak network conditions, provided by an embodiment of the present invention.
[0024] Figure 10 This is a structural block diagram of a data processing system provided in an embodiment of the present invention;
[0025] Figure 11 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0027] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.
[0028] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0030] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.
[0031] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.
[0032] As described in the background section, with the rapid development of mobile internet and the Internet of Things (IoT), API testing in complex network environments is particularly important. However, existing API testing in complex network environments often relies on manually set laboratory conditions, which fails to simulate real-world complex network environments. Furthermore, due to limited test parameter coverage, the accuracy of existing interface testing techniques is low. In addition, existing interface testing techniques also suffer from insufficient flexibility and low testing efficiency.
[0033] To address at least one of the technical problems existing in the aforementioned related technologies, the present invention provides a data processing method. The data processing method provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings and specific examples.
[0034] Figure 1 This is a system architecture diagram of a testing system provided in an embodiment of the present invention.
[0035] like Figure 1 As shown, the test system may include a test console 11, a network simulation module 12, a data acquisition module 13, a test report generation module 14, and a storage module 15.
[0036] The test console provides an interface for users to interact with the test system. Users can configure network quality data for network testing of the target interface, such as latency range, packet loss rate, and bandwidth limit. This facilitates the subsequent transmission of the user-configured network quality data to the network simulation module for realistic simulation of complex network environments.
[0037] The aforementioned network simulation module is used to simulate the network environment for testing the target interface based on user-configured network quality data for network testing of the target interface. It should be noted that, in the information processing method provided in this embodiment of the invention, the aforementioned network quality data may include at least one of bandwidth, latency, packet loss rate, jitter, abnormal link disconnection information, and error packet setting parameters. Therefore, in order to comprehensively and thoroughly describe the testing system provided in this application embodiment, such as... Figure 2As shown above, Figure 1 The network simulation module 12 may include a bandwidth simulation module 121, a latency simulation module 122, a packet loss rate simulation module 123, a jitter simulation module 124, an abnormal link disconnection simulation module 125, and an error packet simulation module 126.
[0038] The aforementioned data acquisition module is used to collect server response data in real time under different network environments when the test system begins automated interface testing—that is, when test requests are sent to the server through the target interface in a simulated network environment. In addition, the test system automatically determines the target interface's retry policy, timeout policy, and other behaviors, and transmits the analysis results to the test report module so that the test report module can generate the corresponding test report.
[0039] The aforementioned test report module is used by the test system to generate corresponding test reports based on the server's response data under different network environments. The system generates reports and provides a visual interface to intuitively display the performance of the target interface under different network environments using preset display methods such as line charts, bar charts, and heatmaps.
[0040] The aforementioned storage module stores test reports generated by the test report module and related data generated by other modules. This storage module supports comparison of multiple test results and historical data queries. Furthermore, it allows users to visualize the data using tools such as line charts and bar charts, providing a clear understanding of the interface's performance in a network environment.
[0041] Based on the above Figure 1 and Figure 2 The architecture of the test system shown is as follows: Figure 3 As shown, this embodiment of the invention provides a data processing method. The execution entity of this data processing method can be a testing system, and the method specifically includes the following steps:
[0042] Step 310: Obtain network quality data for testing the target interface.
[0043] The target interface mentioned above can be a relevant interface used for data transmission and interaction between the test system and the server. For example, the target interface can be an API interface, without specific limitations. The target interface can include at least one interface, without specific limitations. Additionally, the network quality data mentioned above can be relevant data used to quantify the stability and performance of the network environment. It reflects the stability, reliability, and efficiency of the network when transmitting data and providing services, without specific limitations. It should be noted that the data processing method provided in this embodiment of the invention does not specifically limit the quantity of the network quality data mentioned above. That is, the network quality data obtained in this embodiment of the invention can be one or more, without further elaboration.
[0044] It should also be noted that bandwidth refers to the maximum amount of data that a network can transmit per unit time, which determines the network transmission capacity of the network environment; latency refers to the time required for data to travel from the sender to the receiver, which affects the network response speed; packet loss rate refers to the proportion of data packets lost during transmission to the total number of packets sent, which determines the data transmission reliability of the network environment; jitter refers to the range of latency variation, which reflects the stability of network transmission, i.e., the quality of network connection; abnormal link interruption information refers to the record of abnormal network connection interruption, which directly reflects the availability of the network environment; and error packet setting parameters refer to whether the content of the packet payload can be randomly modified during the interface request process, which is used to ensure data accuracy. Thus, in this embodiment of the invention, the above-mentioned network quality data may include at least one of bandwidth, latency, packet loss rate, jitter, abnormal link interruption information, and error packet setting parameters.
[0045] Step 320: Simulate the network environment used to test the target interface based on the network quality data.
[0046] Since network quality data can be used to quantify the stability and performance of a network environment, the testing system can simulate the corresponding network environment based on the network quality data obtained for the target interface, so that the performance of the target interface in that network environment can be tested subsequently.
[0047] Step 330: Obtain the response data from the server in the network environment.
[0048] In some embodiments, the response data can be generated based on the test request sent by the test system to the server through the target interface. This response data can reflect various aspects of the target interface's performance in the network environment.
[0049] Specifically, after simulating the network environment corresponding to the network quality data, the test system can obtain the response data of the server in that network environment. Since the response data is generated by the server based on the test request sent by the test system to the server through the target interface, the test system can determine the performance of the target interface in that network environment based on the response data.
[0050] The data processing method provided in this embodiment of the invention can acquire network quality data for testing target interfaces, simulate the corresponding network environment based on the network quality data, and then acquire the response data of the server in the network environment. Since the response data is generated based on the test request sent by the test system to the server through the target interface, it can be used to reflect the test results of the target interface. In this way, not only can the real network environment be simulated based on network quality data to improve the test accuracy of interface testing, but the efficiency of interface testing can also be improved through automated testing.
[0051] In order to provide a comprehensive and detailed description of the data processing method provided in the embodiments of the present invention, in one embodiment of the present invention, step 310 above may specifically include the following steps:
[0052] Receive the user's first input to the target interface;
[0053] In response to the first input, network quality data for testing the target interface is obtained.
[0054] The target interface mentioned above can be any interface displayed by the testing system used to obtain network quality data, and is not specifically limited here. Additionally, the first input mentioned above includes, but is not limited to, touch input, click input, etc., and is not specifically limited here.
[0055] Specifically, when the test system displays the target interface, the user can click on the target interface. In this way, the test system can receive the user's click input on the target interface, that is, the first input, and then respond to the first input to obtain network quality data for testing the target interface.
[0056] In this embodiment, network quality data for testing the target interface can be obtained by receiving and responding to the user's first input on the target interface. Thus, a visual interface allows users to interact with the testing system, enabling the acquisition of corresponding network quality data for testing the target interface performance based on the user's actual needs, thereby satisfying user requirements.
[0057] If the aforementioned network quality data can be obtained based on user configuration input on the target interface, then, in order to describe the data processing method provided by the embodiments of the present invention in detail and accurately, in one embodiment of the present invention, the aforementioned network quality data may include at least one parameter, and correspondingly, the aforementioned target interface may include parameter configuration controls corresponding to each of the at least one parameter, so that the user can configure the corresponding parameter based on the parameter configuration controls corresponding to each parameter. In this case, the step of receiving the user's first input on the target interface may specifically include the following steps:
[0058] Receive the user's first input to at least one target parameter configuration control in the parameter configuration control;
[0059] When there is only one parameter configuration control, the aforementioned target parameter configuration control is that parameter configuration control. When there are multiple parameter configuration controls, the aforementioned target parameter configuration control may include at least one parameter configuration control, without any specific limitation here.
[0060] In addition, the first input mentioned above can indicate the parameter configuration information corresponding to the target parameter configuration control.
[0061] Based on this, the above-mentioned step of obtaining network quality data for testing the target interface in response to the first input may specifically include:
[0062] In response to the first input, the parameter configuration information corresponding to the target parameter configuration control is determined to be network quality data.
[0063] Specifically, when the target interface displays at least one parameter configuration control corresponding to each parameter, the test system can receive the user's first input to the target parameter configuration control among the at least one parameter configuration controls. Since the first input indicates the parameter configuration information corresponding to the target parameter configuration control, the test system can respond to the first input and determine that the parameter configuration information corresponding to the target parameter configuration control is network quality data.
[0064] In one example, the parameter configuration control in the target interface described above can be as follows: Figure 4 As shown. Specifically, if the network quality data includes bandwidth, the corresponding parameter configuration controls may include control 401 for configuring uplink bandwidth and control 402 for configuring downlink bandwidth. It should be noted that the unit of bandwidth can be selected during the configuration of uplink and downlink bandwidth. Bandwidth can be in four units: bps / kbps / Mbps / Gbps, without specific limitations here.
[0065] If the network quality data includes latency, the corresponding parameter configuration controls may include control 403 for selecting the latency mode, control 404 for configuring the maximum latency value, and control 405 for configuring the minimum latency value. It should be noted that the aforementioned latency modes can include random latency mode, fixed latency mode, latency incrementing mode, and latency decreasing mode. Random latency mode refers to a mode where the latency is randomly configured between the maximum and minimum latency values. Fixed latency mode requires the user to configure a fixed latency; after the user selects fixed latency mode, the test system will display controls for configuring the fixed latency. Latency incrementing mode refers to a mode where the latency increases sequentially from the minimum to the maximum value according to a preset incrementing latency pattern. Similarly, latency decreasing mode refers to a mode where the latency decreases sequentially from the maximum to the minimum value according to a preset latency decreasing pattern. The preset incrementing and decrementing latency can be pre-set based on practical experience or circumstances, or determined based on user input; no specific limitations are imposed here. For example, the preset incrementing latency can be set to 10%, and the preset decrementing latency can also be set to 10%, or they can be set to different values; no specific limitations are imposed here. Furthermore, the latency can be set in milliseconds (ms) or seconds (s).
[0066] If the network quality data includes packet loss rate, the corresponding parameter configuration controls can also include a control 406 for selecting the packet loss mode, a control 407 for configuring the maximum packet loss rate, and a control 408 for configuring the minimum packet loss rate. It should be noted that the packet loss mode here can be similar to the latency mode described above, and will not be elaborated further here.
[0067] If the network quality data includes jitter, the corresponding parameter configuration controls may include control 409 for configuring the jitter mode, control 410 for configuring the maximum jitter value, and control 411 for configuring the minimum jitter value. It should be noted that the jitter mode here can be similar to the latency mode described above, and will not be elaborated further here.
[0068] If the network quality data includes abnormal link loss information, the corresponding parameter configuration controls may include control 412 for configuring the abnormal link loss mode and control 413 for configuring the number of link losses. It should be noted that the aforementioned abnormal link loss mode may include different modes such as during link establishment, during link establishment, and after link establishment.
[0069] If network quality data can include error packet configuration parameters, the corresponding parameter configuration controls can include control 414, which represents the content that can be randomly modified during the interface request process, and control 415, which represents the content that cannot be randomly modified during the interface request process.
[0070] In this embodiment, network quality data for testing the target interface can be obtained by integrating parameter configuration controls corresponding to each parameter into the target interface and configuring the parameter configuration information corresponding to each parameter based on user input. This not only allows for flexible configuration of network quality data and dynamic customization of the test scenario, but also improves the flexibility and efficiency of interface network testing.
[0071] As mentioned above, the network quality data is obtained based on user input; that is, the network quality data can be historical data configured by the user, without specific limitations. Based on this, in another embodiment of the present invention, the target interface may include multiple selection controls corresponding to various test cases, each test case including network quality data. For example,... Figure 5 As shown, if there are 5 test cases, the target interface can display selection controls 51 corresponding to each of the 5 test cases. Based on this, the step of receiving the user's first input to the target interface can specifically include:
[0072] Receive the user's first input for the target selection control among multiple selection controls;
[0073] Based on this, the steps described above for obtaining network quality data for testing the target interface in response to the first input may specifically include:
[0074] In response to the first input, obtain the network quality data corresponding to the target selection control.
[0075] The number of target selection controls can be one or more, without specific limitations. Similarly, the number of network quality data acquired can also be one or more, without specific limitations.
[0076] Specifically, when the target interface displays multiple selection controls corresponding to various test cases, the test system can receive the user's first input to the target selection control among the multiple selection controls. Since each test case can include network quality data, the test system can respond to the first input and obtain the network quality data corresponding to the target selection control.
[0077] It should be noted that the aforementioned test cases can include at least one sub-test case; that is, the test case can be considered a test set, which can include at least one different sub-test case. Each sub-test case can include network quality data, without specific limitations. It should also be noted that when the test system acquires multiple sets of network quality data, the execution order of these multiple sets of network quality data can be determined when responding to the first input and acquiring the network quality data corresponding to the target selection control. This execution order can be based on the user's input of selecting the target selection control or a default execution order, without specific limitations. This facilitates subsequent network testing of the target interface using the network quality data from the test cases or sub-test cases in the order of execution.
[0078] In this embodiment, multiple selection controls corresponding to test cases can be integrated into the target interface, and the corresponding network quality data can be obtained by the user selecting the target selection control from multiple selection controls. In this way, network quality data for testing can be obtained quickly, improving the efficiency of interface network testing.
[0079] Furthermore, in order to describe the data processing method provided by the embodiments of the present invention in detail, in one embodiment of the present invention, the step of obtaining the response data of the server in the network environment may specifically include the following steps:
[0080] In the network environment, multiple test requests are sent to the server through the target interface;
[0081] Obtain the response data generated by the server based on each test request.
[0082] Specifically, the testing system can simulate the corresponding network environment based on the acquired network quality data, and in that network environment, it can send multiple test requests to the server through the target interface, and obtain the response data generated by the server based on each test request.
[0083] In this embodiment, network quality data can be acquired and a corresponding network environment simulated to send a test request to the server and obtain response data. This not only allows for the simulation of a real network environment based on network quality data, improving the accuracy of interface testing, but also enhances the efficiency of interface testing through automation.
[0084] Based on this, in one embodiment of the present invention, the data processing method provided by the present invention may further include the following steps:
[0085] During the process of obtaining the response data generated by the server based on each test request, the target data is determined based on the first response data;
[0086] If the target data meets the preset conditions, a test report is generated based on the first response data.
[0087] In some embodiments, the first response data is response data acquired by the test system, which may include response duration. The target data includes at least one of total response duration and number of responses. The total response duration is the sum of the response durations in the first response data, and the number of responses is the number of times the response data is received in the first response data.
[0088] In addition, the above preset conditions can be set based on actual experience or circumstances. For example, the preset conditions can be set to have a total response time greater than or equal to a preset duration threshold and a response count greater than or equal to a preset count threshold. The preset duration threshold and the preset count threshold can be set based on actual experience and are not specifically limited here.
[0089] Specifically, the testing system can determine the target data based on the first response data during the process of obtaining the response data generated by the server based on each test request, and then generate a test report based on the first response data if the target data meets the preset conditions.
[0090] In one example, when the test system begins data collection, it can first initialize the data collection parameters: Based on user settings or system defaults, it initializes relevant parameters such as collection frequency (e.g., once per second) and timeout duration (e.g., 2-second timeout). Next, it sends a test request to the target interface: the system sends a test request to the target interface and records the start time of the test request for subsequent response time calculations. Then, it records the request sending time: the system records the timestamp of the sent test request for calculating the interface's response latency. Then, it receives response data or checks for timeout events: the system waits for the interface's response; if response data is received within a specified time, it proceeds to the "record response data" step; otherwise, it proceeds to "response timeout" processing. Finally, it handles response timeouts (timeout processing): if the interface response times out, the system records a timeout event and decides whether to continue the request based on the set timeout handling mechanism (e.g., retry). Next, the system records the response data: If the response data from the interface is successfully received, the system records the following information: Response time: calculated by the difference between the sending and receiving times; Success status: records the status code returned by the interface (e.g., 200 Success, 500 Error, etc.) and calculates the success rate; Data content (optional): key fields of the response content can be recorded as needed. Finally, timeout and success counts: If the response times out, the system increments the timeout count. If the response is successful, the system increments the success count. These counts will be used as indicators such as test success rate and error rate. The system also checks whether the data collection termination condition has been met: checks whether the termination condition has been met, such as whether the preset total number of requests has been reached or the specified duration has been exceeded. If the condition has not been met, the system returns to continue data collection; and ends data collection and generates a report: If the termination condition is met, the system ends data collection, transfers all collected data to the data analysis module, and generates a test report of the interface under network conditions. This test report may include data such as average, maximum, and minimum response times, success rate, error rate, number of timeout events, and the impact of network fluctuations on interface stability.
[0091] Furthermore, the test report in this embodiment of the invention can visually demonstrate the performance of the target interface under different network environments (i.e., the weak network conditions described below) using display methods such as line charts, bar charts, and heatmaps. In one example, it can be as follows: Figure 6 As shown, the horizontal axis represents time, and the vertical axis represents the interface response time. The data points represent the response time at different test moments, and the graph clearly shows the trend of response time changing under weak network conditions. In high-latency scenarios, the response time increases significantly; as the test environment returns to normal, the response time decreases. In another example, as... Figure 7As shown, the horizontal axis represents different weak network conditions, and the vertical axis represents the success rate. The height of the bar for each weak network condition represents the request success rate of the interface under that condition. The bar chart allows for a visual comparison of success rates under different conditions, providing insight into the impact of network latency, packet loss, bandwidth limitations, and other factors on the interface. In one example, such as... Figure 8 As shown in the figure, this graph displays the error rate of the interface under different weak network conditions, visually represented by color intensity. The darker the color, the higher the error rate. Comparing error rates under various weak network conditions helps identify key weak network factors affecting interface stability and accuracy. In another example, such as... Figure 9 As shown, the horizontal axis represents the weak network conditions in different test rounds, and the vertical axis represents the request timeout rate of the interface. The height of the timeout rate bars under each condition illustrates the fault tolerance capability of the interface in weak network conditions. The timeout rate comparison chart provides the timeout occurrence rate of the interface under conditions such as high latency and packet loss, helping developers adjust the timeout strategy of the interface.
[0092] In this embodiment, by capturing the server's response data to the test request and filtering the target data from it to generate a test report, not only is automated analysis of the test results achieved, but the efficiency of interface testing is also improved.
[0093] Based on the same inventive concept, this invention provides a data processing system that can be applied to a testing system, specifically in conjunction with... Figure 10 The off-grid detection system provided by this invention will be described in detail.
[0094] like Figure 10 As shown, the derailment detection system 1000 may include:
[0095] Module 1010 is used to acquire network quality data for testing the target interface.
[0096] Simulation module 1020 is used to simulate the network environment used to test the target interface based on the network quality data;
[0097] The acquisition module 1010 is also used to acquire response data from the server in the network environment, the response data being generated based on the test request sent by the test system to the server through the target interface.
[0098] In one embodiment of the present invention, the data processing system provided by the present invention may include:
[0099] The receiving module is used to receive the user's first input to the target interface;
[0100] The acquisition module is specifically used to acquire network quality data for testing the target interface in response to the first input.
[0101] In one embodiment of the present invention, the network quality data includes at least one parameter; the target interface includes parameter configuration controls corresponding to each of the at least one parameter; based on this, the receiving module is specifically used for:
[0102] Receive a first input from a user to a target parameter configuration control in at least one parameter configuration control, wherein the first input indicates parameter configuration information corresponding to the target parameter configuration control;
[0103] The aforementioned acquisition module is specifically used to respond to the first input and determine that the parameter configuration information corresponding to the target parameter configuration control is the network quality data.
[0104] In one embodiment of the present invention, the target interface includes multiple selection controls corresponding to test cases, each test case including the network quality data; based on this, the receiving module is specifically used for:
[0105] Receive the user's first input for the target selection control among multiple selection controls;
[0106] The aforementioned acquisition module is specifically used to acquire network quality data corresponding to the target selection control in response to the first input.
[0107] In one embodiment of the present invention, the data processing system provided by the present invention may include:
[0108] The sending module is used to send multiple test requests to the server through the target interface in the network environment.
[0109] The aforementioned acquisition module is specifically used to acquire the response data generated by the server based on each test request.
[0110] In one embodiment of the present invention, the data processing system provided by the present invention may include:
[0111] The determination module is used to determine target data based on first response data during the process of obtaining response data generated by the server based on each test request. The first response data is the response data already obtained by the test system. The response data includes response duration. The target data includes at least one of total response duration and number of responses. The total response duration is the sum of the response durations in the first response data. The number of responses is the number of times the response data is in the first response data.
[0112] The generation module is used to generate a test report based on the first response data when the target data meets preset conditions.
[0113] The data processing method provided by this invention can acquire network quality data for testing target interfaces, simulate the corresponding network environment based on the network quality data, and then acquire the response data of the server in the network environment. Since the response data is generated based on the test request sent by the test system to the server through the target interface, it can be used to reflect the test results of the target interface. In this way, not only can the real network environment be simulated based on network quality data to improve the test accuracy of interface testing, but the efficiency of interface testing can also be improved through automated testing.
[0114] The various modules in the derailment detection system provided by this invention can achieve Figure 3 The method steps of the embodiments shown are capable of achieving the corresponding technical effects, and will not be described in detail here for the sake of brevity.
[0115] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 11 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 11 As shown, an embodiment of the present invention provides an electronic device including: one or more processors 1101, a memory 1102, and one or more I / O interfaces 1103. The memory 1102 stores one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement any of the data processing methods described in the above embodiments; the one or more I / O interfaces 1103 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.
[0116] The processor 1101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 1102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 1103 is connected between the processor 1101 and the memory 1102, and can realize information interaction between the processor 1101 and the memory 1102, including but not limited to a data bus (Bus).
[0117] In some embodiments, the processor 1101, memory 1102, and I / O interface 1103 are interconnected via bus 1104, and thus connected to other components of the computing device.
[0118] In some embodiments, the one or more processors 1101 include a field-programmable gate array.
[0119] This invention also provides a computer-readable medium. The computer-readable medium stores a computer program, which, when executed by a processor, implements the steps of any of the data processing methods described in the above embodiments. The computer-readable storage medium may be volatile or non-volatile.
[0120] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described data processing method.
[0121] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0122] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0123] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0124] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0125] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0126] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0127] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0128] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0130] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A data processing method, characterized in that, Applied to a testing system, the system includes: Obtain network quality data for testing the target interface; The network environment used to test the target interface is simulated based on the network quality data. Obtain the response data from the server in the network environment. The response data is generated based on the test request sent by the test system to the server through the target interface.
2. The method according to claim 1, characterized in that, The acquisition of network quality data for testing the target interface includes: Receive the user's first input to the target interface; In response to the first input, network quality data for testing the target interface is obtained.
3. The method according to claim 2, characterized in that, The network quality data includes at least one parameter; the target interface includes parameter configuration controls corresponding to each of the at least one parameter. The receiving of the user's first input to the target interface includes: Receive a first input from a user to a target parameter configuration control in at least one parameter configuration control, wherein the first input indicates parameter configuration information corresponding to the target parameter configuration control; The step of obtaining network quality data for testing the target interface in response to the first input includes: In response to the first input, the parameter configuration information corresponding to the target parameter configuration control is determined to be the network quality data.
4. The method according to claim 1, characterized in that, The target interface includes selection controls corresponding to multiple test cases, and each test case includes the network quality data. The receiving of the user's first input to the target interface includes: Receive the user's first input for the target selection control among multiple selection controls; The step of acquiring network quality data for testing the target interface in response to the first input includes: In response to the first input, network quality data corresponding to the target selection control is obtained.
5. The method according to claim 1, characterized in that, The acquisition of server response data in the network environment includes: In the network environment, multiple test requests are sent to the server through the target interface; Obtain the response data generated by the server based on each test request.
6. The method according to claim 5, characterized in that, Also includes: In the process of obtaining the response data generated by the server based on each test request, the target data is determined based on the first response data. The first response data is the response data already obtained by the test system. The response data includes the response duration. The target data includes at least one of the total response duration and the number of responses. The total response duration is the sum of the response durations in the first response data. The number of responses is the number of times the response data is in the first response data. If the target data meets the preset conditions, a test report is generated based on the first response data.
7. The method according to any one of claims 1 to 6, characterized in that, The network quality data includes at least one of the following: bandwidth, latency, packet loss rate, jitter, abnormal link loss information, and error packet setting parameters.
8. A data processing system, characterized in that, Applied to testing systems, including: The acquisition module is used to acquire network quality data for testing the target interface. The simulation module is used to simulate the network environment used to test the target interface based on the network quality data. The acquisition module is also used to acquire response data from the server in the network environment, the response data being generated based on the test request sent by the test system to the server through the target interface.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.