Pressure measurement processing method, device and equipment for long connection under distributed cluster and storage medium

By obtaining and processing the quality index information of the press in a distributed cluster, calculating the comprehensive score and assigning weights, the problem of inefficiency in the long connection test of the Internet of Things is solved, and efficient and accurate pressure measurement processing is achieved.

CN120263689APending Publication Date: 2025-07-04CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510422428.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The prior art in long connection testing in the Internet of Things scenario, especially the pressure measurement method of the MQTT protocol is inefficient and cannot meet the fast and accurate requirements in the agile development mode. The traditional method requires manual adjustment of the concurrency, resulting in a long test cycle and poor accuracy.

Method used

By obtaining the quality index information of the press in the distributed cluster, performing data normalization processing, calculating the comprehensive score based on the preset weight ratio, determining the allocation weight, and allocating the long connection pressure based on the score and concurrency requests, dynamic resource allocation and stability pressure measurement are realized.

Benefits of technology

It improves the efficiency and accuracy of pressure measurement, ensures the continuity and stability of pressure measurement, avoids idle or overload of resources, and supports efficient long-connected pressure measurement under distributed clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263689A_ABST
    Figure CN120263689A_ABST
Patent Text Reader

Abstract

The invention provides a pressure measurement processing method and device for long connection under a distributed cluster, equipment and a storage medium. The method comprises the following steps: in response to a concurrency adjustment request of long connection, obtaining quality index information of a press machine in a distributed cluster; performing data normalization processing on the quality index information of the press machine to obtain normalized index data of the press machine; determining a comprehensive score of the press machine according to a preset weight ratio and the normalized index data; determining the distribution weight of the press machine according to the comprehensive score of the press machine; and distributing the long connection pressure to the press machine according to the distribution weight and the concurrency adjustment request of the long connection. The method provided by the invention is used for achieving the effect of improving the pressure measurement processing efficiency and processing accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a stress testing processing method, device, equipment and storage medium for long connections in a distributed cluster. Background Art

[0002] The Transmission Control Protocol (TCP) is the core transmission protocol of the Internet of Things. It is widely used in remote monitoring, smart homes and industrial automation to ensure accurate transmission of production data. Industrial gateways use TCP long connections to provide stable data transmission between devices. The Message Queuing Telemetry Transport (MQTT) protocol is widely used in the field of the Internet of Things due to its low overhead and low bandwidth. However, in the performance stress testing of the Internet of Things protocol, TCP and MQTT face testing challenges such as the maximum number of long connections, authentication throughput, and message reporting throughput. Traditional stress testing methods are inefficient when dealing with large-scale, long-connection Internet of Things scenarios, and the test cycle is long. Especially in the long connection scenario, how to accurately control the pressure and observe key indicators such as throughput in real time has become a problem that needs to be solved urgently. Therefore, developing a more efficient stress testing processing method for long connections under distributed clusters has become a promising direction.

[0003] In the prior art, for performance stress testing in distributed mode, the constant throughput timer provided by the open source component (jmeter) is mainly relied on to modify the concurrency. When performing stress testing in IoT scenarios, the climbing mode (height-touching mode) is usually used to stress test the maximum load-bearing performance of the system. During the stress test, the tester needs to manually increase or decrease the concurrency by stopping the jmeter process, modifying the number of threads, and then restarting the jmeter process according to the resource usage or consumption backlog of the stressed system to find the performance inflection point.

[0004] However, in the IoT scenario, especially in the long connection test of the MQTT protocol, the traditional stop-modify-restart jmeter process method takes up a lot of time because it needs to test millions of long connections, resulting in a long test cycle. It cannot meet the requirements of fast, accurate and efficient testing under the agile development model, and there are technical problems such as low stress testing processing efficiency and poor accuracy. Summary of the invention

[0005] The present application provides a method, device, equipment and storage medium for stress testing processing of long connections in a distributed cluster, so as to achieve the effect of improving stress testing processing efficiency and processing accuracy.

[0006] In a first aspect, an embodiment of the present application provides a stress testing processing method for long connections under a distributed cluster, including:

[0007] In response to a concurrency adjustment request for a long connection, obtain the quality index information of the presses in the distributed cluster; the distributed cluster includes multiple presses;

[0008] Perform data normalization processing on the quality index information of the presses to obtain the normalized index data of the presses;

[0009] According to the preset weight ratio and the normalized index data, determine the comprehensive score of the presses;

[0010] According to the comprehensive score of the presses, determine the allocation weight of the presses;

[0011] According to the allocation weight and the concurrency adjustment request of the long connection, allocate the long connection pressure to the presses.

[0012] In a possible implementation manner, according to the preset weight ratio and the normalized index data, determining the comprehensive score of the presses includes:

[0013] Obtain the preset weight ratio;

[0014] According to the weight ratio, determine the weight index corresponding to the normalized index data;

[0015] Determine the weighted sum of the product of the normalized index data of the presses and the corresponding weight index as the comprehensive score of the presses.

[0016] In a possible implementation manner, according to the comprehensive score of the presses, determining the allocation weight of the presses includes:

[0017] According to the comprehensive score of the presses, calculate the total score in the distributed cluster;

[0018] According to the comprehensive score and the total score of the presses, calculate the allocation weight of the presses.

[0019] In a possible implementation manner, after allocating the long connection pressure to the presses according to the allocation weight and the concurrency adjustment request of the long connection, it further includes:

[0020] Receive the test result data sent by the presses;

[0021] Generate a result display page according to the test result data.

[0022] In a possible implementation manner, after generating the result display page according to the test result data, it further includes:

[0023] Send the test result data to the time series database;

[0024] In response to a real-time query request, a polling query request is sent to the time series database to achieve real-time query of test result data.

[0025] In a possible implementation manner, before obtaining the quality index information of the stress machine in the distributed cluster in response to the concurrent volume adjustment request of the long connection, it further includes:

[0026] Establish a performance stress testing life cycle model; where

[0027] The life cycle of the performance stress testing life cycle model includes a configuration phase, a running phase, a collection phase, and a cleaning phase.

[0028] In a possible implementation manner, before obtaining the quality index information of the stress machine in the distributed cluster in response to the concurrent volume adjustment request of the long connection, it further includes:

[0029] Monitor the running state of the performance stress testing life cycle model;

[0030] If it is monitored that the running state is abnormal, a stress testing failure prompt is issued.

[0031] In a possible implementation manner, the quality index information includes multiple of the central processing unit usage rate, memory usage rate, latency, packet loss rate, etc.

[0032] In a second aspect, the present application provides a stress testing processing device for long connections under a distributed cluster, including:

[0033] An acquisition module, configured to obtain the quality index information of the stress machine in the distributed cluster in response to the concurrent volume adjustment request of the long connection; the distributed cluster includes multiple stress machines;

[0034] A first processing module, configured to perform data normalization processing on the quality index information of the stress machine to obtain the normalized index data of the stress machine;

[0035] A second processing module, configured to determine the comprehensive score of the stress machine according to the preset weight ratio and the normalized index data;

[0036] A determination module, configured to determine the allocation weight of the stress machine according to the comprehensive score of the stress machine;

[0037] A third processing module, configured to allocate long connection pressure to the stress machine according to the allocation weight and the concurrent volume adjustment request of the long connection.

[0038] In a possible implementation manner, the second processing module is further configured to:

[0039] Obtain the preset weight ratio;

[0040] Determine the weight index corresponding to the normalized index data according to the weight ratio;

[0041] Determine the comprehensive score of the press by the weighted sum of the product of the normalized index data of the press and the corresponding weight index.

[0042] In a possible implementation manner, the determination module is further configured to:

[0043] Calculate the total score in the distributed cluster according to the comprehensive score of the press;

[0044] Calculate the allocation weight of the press according to the comprehensive score and the total score of the press.

[0045] In a possible implementation manner, the third processing module is further configured to:

[0046] Receive the test result data sent by the press;

[0047] Generate a result display page according to the test result data.

[0048] In a possible implementation manner, the third processing module is further configured to:

[0049] Send the test result data to the time series database;

[0050] In response to a real-time query request, send a polling query request to the time series database to implement real-time query of the test result data.

[0051] In a possible implementation manner, the acquisition module is further configured to:

[0052] Establish a performance stress test life cycle model; where

[0053] The life cycle of the performance stress test life cycle model includes a configuration phase, a running phase, a collection phase, and a cleaning phase.

[0054] In a possible implementation manner, the acquisition module is further configured to:

[0055] Monitor the running state of the performance stress test life cycle model;

[0056] If an abnormal running state is detected, issue a stress test failure prompt.

[0057] In a possible implementation manner, the acquisition module is further used for quality index information, where the quality index information includes multiple of the central processor usage rate, memory usage rate, latency, packet loss rate, etc.

[0058] In a third aspect, the present application provides a stress test processing device for long connections under a distributed cluster, including: a memory, a processor;

[0059] The memory stores computer-executable instructions;

[0060] The processor executes the computer-executable instructions stored in the memory, such that the processor performs the above first aspect and / or various possible implementation manners of the first aspect.

[0061] In a fourth aspect, the present application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above first aspect and / or various possible implementation manners of the first aspect when being executed by a processor.

[0062] In a fifth aspect, the present application provides a computer program product including a computer program, which implements the above first aspect and / or various possible implementation manners of the first aspect when being executed by a processor.

[0063] A method, apparatus, device, and storage medium for stress testing long connections under a distributed cluster provided by the present application first obtains quality index information of each press in the cluster in real time by responding to a concurrency adjustment request for long connections, providing a data basis for dynamic adjustment. Then, by performing normalization processing on the quality index information, the dimension difference between different indexes is eliminated, ensuring the accuracy and consistency of evaluation. The comprehensive score calculated according to the preset weight ratio and the normalized data can comprehensively reflect the performance status of the press, providing a scientific basis for resource allocation. The allocation weight determined based on the comprehensive score realizes the reasonable allocation of press resources, avoiding the situation of resource idleness or overload. Finally, according to the allocation weight and the concurrency adjustment request, long connection pressure is allocated to the press, ensuring the continuity and stability of the stress test, and achieving the effect of improving the stress test processing efficiency and processing accuracy of long connections under a distributed cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0065] Figure 1 It is a schematic diagram of an application data processing system architecture provided by an embodiment of the present application;

[0066] Figure 2 It is a flowchart of a method for stress testing long connections under a distributed cluster provided by the present application Figure 1 ;

[0067] Figure 3 It is a flowchart of a method for stress testing long connections under a distributed cluster provided by the present application Figure 2 ;

[0068] Figure 4Flow schematic diagram of the stress testing process for long connections under a distributed cluster provided by this application Figure 3 ;

[0069] Figure 5 Flow schematic diagram for real-time viewing of stress testing results provided by an embodiment of this application;

[0070] Figure 6 Flow schematic diagram of the stress testing process for long connections under a distributed cluster provided by this application Figure 4 ;

[0071] Figure 7 Schematic diagram of the performance stress testing lifecycle model provided by an embodiment of this application;

[0072] Figure 8 Overall business data flow diagram provided by an embodiment of this application;

[0073] Figure 9 Schematic diagram of the structure of the stress testing processing device for long connections under a distributed cluster provided by an embodiment of this application;

[0074] Figure 10 Schematic diagram of the structure of the stress testing processing device for long connections under a distributed cluster provided by this application.

[0075] Through the above-mentioned drawings, specific embodiments of this application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Detailed implementation manners

[0076] Here, exemplary embodiments will be described in detail, and examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with this application. On the contrary, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.

[0077] In the prior art methods in the Internet of Things scenario, especially in the long connection test of the MQTT protocol, since it is necessary to test millions of long connection numbers, the traditional way of stopping - modifying - restarting the jmeter process will take a lot of time, resulting in a long test cycle and being unable to meet the requirements of fast, accurate, and efficient testing in the agile development mode. There are technical problems such as low stress testing processing efficiency and poor processing accuracy.

[0078] In view of the above problems, a stress testing processing method, device, equipment and storage medium for long connections in a distributed cluster provided by this application first obtains the quality index information of each press in the cluster in real time by responding to the concurrency adjustment request of the long connection, providing a data basis for dynamic adjustment. Then, by normalizing the quality index information, the dimensional differences between different indexes are eliminated, ensuring the accuracy and consistency of the evaluation. The comprehensive score calculated according to the preset weight ratio and the normalized data can comprehensively reflect the performance status of the press, providing a scientific basis for resource allocation. The allocation weight determined based on the comprehensive score realizes the reasonable allocation of press resources, avoiding the situation of resource idleness or overload. Finally, according to the allocation weight and the concurrency adjustment request of the long connection, long connection pressure is allocated to the press, ensuring the continuity and stability of the stress test, and achieving the effect of improving the stress test processing efficiency and processing accuracy.

[0079] The following uses specific embodiments to elaborate in detail on the technical solution of this application and how the technical solution of this application solves the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The following will describe the embodiments of this application in conjunction with the drawings.

[0080] Figure 1 A schematic diagram of an application data processing system architecture provided for the embodiments of this application, and this application data processing system is a computer device. As Figure 1 shown, the above architecture includes at least one of a data acquisition device 101, a processing device 102, and a display device 103.

[0081] It can be understood that the structure schematically shown in the embodiments of this application does not constitute a specific limitation on the application data processing system architecture. In some other feasible implementation manners of this application, the above architecture may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements, which can be specifically determined according to the actual application scenario and will not be limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0082] In the specific implementation process, the data acquisition device 101 may include an input / output interface or a communication interface. The data acquisition device 101 can be connected to the processing device through the input / output interface or the communication interface.

[0083] The processing device 102 can determine the comprehensive score of the press and then determine the allocation weight of the press through the quality index information of multiple presses included in the distributed cluster; according to the allocation weight and the concurrency adjustment request of the long connection, long connection pressure is allocated to the press, realizing the dynamic adjustment of the stress test process.

[0084] The display device 103 may also be a touch display screen or the screen of a terminal device, which is used to receive user instructions while displaying the above content to achieve interaction with the user.

[0085] It should be understood that the above processing device may be implemented by a processor reading and executing instructions in a memory, or may be implemented by a chip circuit.

[0086] In addition, the network architecture and service scenarios described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art can know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0087] Figure 2 It is a flow schematic of the stress testing process for long connections under a distributed cluster provided by the present application Figure 1 , as Figure 2 shown, the execution subject of the embodiments of the present application may be Figure 1 the processing device 102 in

[0088] S201. In response to a concurrency adjustment request for a long connection, obtain the quality index information of the stress machines in the distributed cluster.

[0089] In this embodiment, the distributed cluster includes multiple stress machines.

[0090] In a possible implementation manner, the quality index information includes multiple of the central processor usage rate, memory usage rate, latency, and packet loss rate.

[0091] Specifically, in response to a concurrency adjustment request for a long connection and according to the particularity of the cloud virtual machine, multiple quality index information including the central processor (CPU) usage rate, memory usage rate, latency, and packet loss rate as shown in Table 1 are selected.

[0092] Table 1 Quality Index Information Table

[0093]

[0094] Among them, index in Table 1 represents each quality index information and does not refer to specific values. The quality index information in the table may be the same or different.

[0095] S202. Perform data normalization processing on the quality index information of the stress machines to obtain the normalized index data of the stress machines.

[0096] Since the dimensions and value ranges of different quality indicators may vary, it is unreasonable to directly compare and calculate them. Therefore, the system will perform data normalization on this quality indicator information, converting indicator data with different dimensions or ranges into values on a unified scale so that they can be compared and calculated on the same dimension. After normalization, the quality indicators of each press are converted into a value between 0 and 1, and these values are determined as the normalized indicator data of the press.

[0097] Specifically, the data normalization of the quality indicator information of the press can be performed according to the following formula to obtain the normalized indicator data of the press:

[0098]

[0099] Among them, Normalized is the normalized indicator data, and index is the quality indicator information.

[0100] Optionally, if is equal to , the quality indicator of all stress testing machines in the cluster is set to 1.

[0101] S203. Determine the comprehensive score of the press according to the preset weight ratio and the normalized indicator data.

[0102] Before the stress test starts, according to the test objective and the performance requirements of the press, the weight ratios of different quality indicators are preset in advance. These weight ratios reflect the importance degree of each indicator in the comprehensive evaluation. Then, the system will calculate the comprehensive score of each press by weighted summation according to these weight ratios and the normalized indicator data.

[0103] S204. Determine the allocation weight of the press according to the comprehensive score of the press.

[0104] After obtaining the comprehensive score of each press, the system will determine the task allocation ratio of each press in the stress test according to the comprehensive score of the press and the test requirements, and determine it as the allocation weight of each press.

[0105] S205. Adjust the request according to the allocation weight and the concurrency of the long connection, and allocate the long connection pressure to the press.

[0106] After calculating the allocation weight of each press in the stress cluster, the system will adjust the request according to the allocation weight and the concurrency of the long connection, and allocate the long connection requests to each press according to the corresponding ratio.

[0107] A method for stress testing long connections in a distributed cluster provided by an embodiment of the present application first adjusts the request according to the concurrency of long connections, and obtains the quality index information of each press in the cluster in real time, providing a data basis for dynamic adjustment. Then, by normalizing the quality index information, the dimensional difference between different indexes is eliminated, ensuring the accuracy and consistency of the evaluation. The comprehensive score calculated according to the preset weight ratio and the normalized data can comprehensively reflect the performance state of the press, providing a scientific basis for resource allocation. The allocation weight determined according to the comprehensive score realizes the reasonable allocation of press resources, avoiding the situation of resource idleness or overload. Finally, according to the allocation weight and the concurrency adjustment request, long connection pressure is allocated to the press, ensuring the continuity and stability of the stress test, and achieving the effect of improving the stress test processing efficiency and processing accuracy.

[0108] Figure 3 Schematic flow of the method for stress testing long connections in a distributed cluster provided by the present application Figure 2 As Figure 3 shown, on the basis of the above embodiment, this embodiment details the process of determining the allocation weight of the press. The method includes:

[0109] S301. Obtain the preset weight ratio.

[0110] Obtain the preset weight ratio w of the system.

[0111] S302. Determine the weight index corresponding to the normalized index data according to the weight ratio.

[0112] According to the above weight ratio w, determine the weight index corresponding to the normalized index data.

[0113] For example, if the weight ratio w is 1:2:3:4, the weight indexes can be 1 / 10, 2 / 10, 3 / 10, and 4 / 10 respectively.

[0114] S303. Determine the weighted sum of the product of the normalized index data of the press and the corresponding weight index as the comprehensive score of the press.

[0115] Specifically, since the weight ratio w is 1:2:3:4, the weighted sum of the product of the normalized index data of the press and the corresponding weight index is determined as the comprehensive score of the press through the following formula:

[0116]

[0117] Among them, Score is the comprehensive score of the press, W i is the weight ratio, and Normalized i is the normalized index data.

[0118] S304. Calculate the total score in the distributed cluster according to the comprehensive score of the press.

[0119] Traverse all the presses in the distributed cluster, sum up their comprehensive scores, and calculate the total score in the distributed cluster.

[0120] S305. Calculate the allocation weight of the press according to the comprehensive score and the total score of the press.

[0121] According to the comprehensive score and the total score of the press, the allocation weight of the press can be calculated according to the following formula:

[0122]

[0123] Where, Weight is the allocation weight of the press, and Score i is the comprehensive score of the press.

[0124] The long connection stress test processing method under the distributed cluster provided by the embodiment of the present application first ensures the consistency of the evaluation criteria by obtaining the preset weight ratio; then determines the weight index of the normalized index data according to the weight ratio, making the influence of different indexes on the comprehensive score reasonable; then calculates the weighted sum of the product of the normalized index of the press and the weight index to obtain the comprehensive score, comprehensively reflecting the performance of the press; then calculates the total score of the cluster according to the comprehensive score, providing a basis for allocating weights; finally, determines the allocation weight according to the ratio of the comprehensive score to the total score, realizing the optimal allocation of press resources. This series of steps ensures the objectivity and scientificity of the stress test task allocation, improves the reliability of the stress test results, and achieves the effect of improving the stress test processing efficiency and processing accuracy.

[0125] Figure 4 For the process schematic of the long connection stress test processing method under the distributed cluster provided by the present application Figure 3 , as Figure 4 shown, on the basis of the above embodiment, this embodiment supplements the subsequent process of allocating long connection pressure to the press, including:

[0126] S401. Receive the test result data sent by the press.

[0127] In this embodiment, the test result data includes but is not limited to the total number of messages, concurrency, transaction rate (TPS), average response time, and success rate.

[0128] Each stress test node uses the JMeter-Kafka listening component to send back the test result data to the distributed stream processing platform (Kafka), and the system receives the test result data sent by the pressure gauge from the Kafka message queue.

[0129] S402. Generate a result display page based on the test result data.

[0130] Summarize the test result data and generate a visual result display page.

[0131] S403. Send the test result data to the time series database.

[0132] After generating the visual result display page, the system sends the test result data to the time series database.

[0133] S404. In response to a real-time query request, send a polling query request to the time series database to achieve real-time query of the test result data.

[0134] Specifically, Figure 5 As shown in the flowchart of the real-time viewing of the stress test results provided by the embodiments of the present application, in response to the user's real-time query request, the stress test results are sent to the time series database in real time according to the following Figure 5 flowchart. The platform polls and queries data from the time series database, and can view key indicators such as the throughput and response time of the system under test in real time during the stress test. Among them, nginx is a high-performance server, Jmeter agent is an open-source component proxy, which is used as a working node to execute the test plan in distributed testing. SocketIO is a library that provides two-way communication for real-time applications. MongoDB is a database based on distributed file storage. MySQL is a relational database management system. MiniIO refers to a file server. InfluxDB is a time series database used to process and analyze time series data.

[0135] The stress test processing method for long connections under a distributed cluster provided by the embodiments of the present application, after the press assigns tasks, by receiving the test result data sent by the press, provides detailed basis for evaluating the system performance; generates a result display page to intuitively present the test results, which is convenient for quick understanding and analysis; stores the test result data in the time series database, realizing long-term data storage and efficient retrieval; at the same time, the system can respond to real-time query requests, and ensure that users can obtain the latest test result data immediately by sending polling queries to the time series database. This series of steps not only improves the automation degree of the stress test process, but also enhances the timeliness and availability of the test results, provides strong support for the performance optimization of the distributed cluster, and achieves the effect of improving the stress test processing efficiency and processing accuracy.

[0136] Figure 6 Flowchart of the stress test processing method for long connections under a distributed cluster provided by the present application Figure 4 as Figure 6As shown, based on the above embodiment, this embodiment provides a supplementary description of the process before obtaining the quality indicator information of the press in the distributed cluster in response to the concurrent volume adjustment request of the long connection, including:

[0137] S601. Establish a performance stress testing lifecycle model.

[0138] In this embodiment, the life cycle of the performance stress testing life cycle model includes a configuration phase, a running phase, a collection phase, and a cleanup phase.

[0139] Specifically, Figure 7 A schematic diagram of a performance stress test lifecycle model provided in an embodiment of the present application, wherein the entire lifecycle of a performance stress test is defined as four phases: a configuration phase, a running phase, a collection phase, and a cleanup phase;

[0140] In the configuration phase, the data required for the test is sent from MinIO to the distributed press machine, the parameterized files are divided according to the number of distributed press machines, and parameters such as scripts and parameterized files are configured in each press machine (executor). Relational data such as parameter configuration is saved in the MySQL database.

[0141] In the running stage, after each executor is configured successfully, it reports the status to the server. After all stressors have reported the configuration completion, the server issues a running command and enters the stress test running state. In this state, the executor starts the jmeter process according to the stress test script and stress test parameters configured in the previous stage, and performs stress testing on the stressed environment.

[0142] In the collection phase, after the stress test is successfully started, jmeter continues to run and collects test data in real time. The test data is sent to the time series database in real time through the Backend Listener. After all execution machines in the distributed system have finished executing, the server collects and processes the data in the time series database, generates a summary report, and saves the results in the mongoDB database.

[0143] In the cleanup phase, all execution machines enter the cleanup state after completing the collection. Each execution machine resets the test environment and cleans up the stress testing scripts and configuration parameter files in the execution machine.

[0144] S602: Monitor the running status of the performance stress test lifecycle model. If an abnormality is detected in the running status, issue a stress test failure prompt.

[0145] Specifically, Figure 8 The overall business data flow diagram provided by the embodiment of the present application is as follows: Figure 8As shown, during stress testing, the platform can uniformly schedule and coordinate the management of each stage. If abnormalities occur in the configuration stage, operation stage, and collection stage during the stress testing process, the program will enter the cleanup stage, report the stress testing failure result at the same time, and terminate the performance testing. Otherwise, it will prompt success.

[0146] It should be noted that Figure 8 It is only for reference of the display effect, not an improvement point, and does not affect the protection scope of the embodiments of this application.

[0147] The stress testing processing method for long connections under a distributed cluster provided by the embodiments of this application realizes the systematic management of the stress testing process by introducing a performance stress testing life cycle model. This model covers the configuration, operation, collection, and cleanup stages, ensuring the comprehensiveness and standardization of stress testing. At the same time, it monitors the running state of the model in real time, and once an abnormality is found, it will issue a stress testing failure prompt, effectively preventing ineffective stress testing, improving the stress testing efficiency and quality, providing reliable data support for the performance tuning of the distributed cluster, and achieving the effect of improving the stress testing processing efficiency and processing accuracy.

[0148] Figure 9 It is a schematic structural diagram of a stress testing processing device for long connections under a distributed cluster provided by the embodiments of this application. The device in this embodiment can be in the form of software and / or hardware. As Figure 9 shown, the stress testing processing device 900 for long connections under a distributed cluster provided by the embodiments of this application includes: an acquisition module 901, a first processing module 902, a second processing module 903, a determination module 904, and a third processing module 905:

[0149] The acquisition module 901 is configured to obtain the quality index information of the presses in the distributed cluster in response to the concurrency adjustment request of the long connection; there are multiple presses in the distributed cluster.

[0150] The first processing module 902 is configured to perform data normalization processing on the quality index information of the presses to obtain the normalized index data of the presses.

[0151] The second processing module 903 is configured to determine the comprehensive score of the presses according to the preset weight ratio and the normalized index data.

[0152] The determination module 904 is configured to determine the allocation weight of the presses according to the comprehensive score of the presses.

[0153] The third processing module 905 is configured to allocate long connection pressure to the presses according to the allocation weight and the concurrency adjustment request of the long connection.

[0154] In a possible implementation manner, the second processing module 903 is further configured to:

[0155] Obtain the preset weight ratio;

[0156] Determine the weight index corresponding to the normalized index data according to the weight ratio;

[0157] Determine the comprehensive score of the press by the weighted sum of the product of the normalized index data of the press and the corresponding weight index.

[0158] In a possible implementation manner, the determining module 904 is further configured to:

[0159] Calculate the total score in the distributed cluster according to the comprehensive score of the press;

[0160] Calculate the allocation weight of the press according to the comprehensive score and the total score of the press.

[0161] In a possible implementation manner, the third processing module 905 is further configured to:

[0162] Receive the test result data sent by the press;

[0163] Generate a result display page according to the test result data.

[0164] In a possible implementation manner, the third processing module 905 is further configured to:

[0165] Send the test result data to the time series database;

[0166] In response to a real-time query request, send a polling query request to the time series database to implement real-time query of the test result data.

[0167] In a possible implementation manner, the obtaining module 901 is further configured to:

[0168] Establish a performance stress testing life cycle model; wherein,

[0169] The life cycle of the performance stress testing life cycle model includes a configuration phase, a running phase, a collection phase, and a cleaning phase.

[0170] In a possible implementation manner, the obtaining module 901 is further configured to:

[0171] Monitor the running state of the performance stress testing life cycle model;

[0172] If an abnormal running state is detected, issue a stress testing failure prompt.

[0173] In a possible implementation manner, the obtaining module 901 is further configured to obtain quality index information; wherein, the quality index information includes multiple of central processor usage rate, memory usage rate, latency, packet loss rate, etc.

[0174] The stress testing processing device for long connections under a distributed cluster provided by the embodiments of the present application can execute the method provided by the above method embodiments. The implementation principle and technical effects are similar, and will not be elaborated here in this embodiment.

[0175] Figure 10 It is a schematic structural diagram of the stress testing processing device for long connections under a distributed cluster provided by the present application. As Figure 10 shown, the stress testing processing device 1000 for long connections under a distributed cluster provided by this embodiment includes: at least one processor 1001 and a memory 1002. Optionally, the device 1000 further includes a communication component 1003. Among them, the processor 1001, the memory 1002, and the communication component 1003 are connected through a bus.

[0176] In the specific implementation process, at least one processor 1001 executes the computer-executable instructions stored in the memory 1002, so that at least one processor 1001 executes the above method.

[0177] The specific implementation process of the processor 1001 can refer to the above method embodiments. The implementation principle and technical effects are similar, and will not be elaborated here in this embodiment.

[0178] In the above embodiments, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, abbreviated: CPU), or other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0179] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0180] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0181] The embodiments of this application also provide a computer program product, including a computer program which, when executed by a processor, implements the above-mentioned method.

[0182] The embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-mentioned method.

[0183] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disc. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.

[0184] An exemplary readable storage medium is coupled to the processor, enabling the processor to read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.

[0185] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0186] The unit described as a separating component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed across multiple network units. Some or all of these units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0187] In addition, in each embodiment of the present invention, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0188] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0189] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When this program is executed, it executes the steps including the above method embodiments; and the aforementioned storage medium includes: various media such as ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0190] Finally, it should be noted that: after considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other implementation schemes of the present invention. The present invention aims to cover any variations, uses, or adaptive changes of the present invention. These variations, uses, or adaptive changes follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structure described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.

Claims

1. A method for stress testing long connections in a distributed cluster, characterized in that including: In response to a concurrent volume adjustment request for a long connection, obtain the quality index information of the presses in the distributed cluster; The distributed cluster includes multiple presses; Perform data normalization processing on the quality index information of the presses to obtain the normalized index data of the presses; Determine the comprehensive score of the presses according to the preset weight ratio and the normalized index data; Determine the allocation weight of the presses according to the comprehensive score of the presses; Allocate long connection pressure to the presses according to the allocation weight and the concurrent volume adjustment request of the long connection.

2. The method according to claim 1, characterized in that The determining the comprehensive score of the presses according to the preset weight ratio and the normalized index data includes: Obtain the preset weight ratio; Determine the weight index corresponding to the normalized index data according to the weight ratio; Determine the weighted sum of the product of the normalized index data of the presses and the corresponding weight index as the comprehensive score of the presses.

3. The method according to claim 1, wherein The determining the allocation weight of the presses according to the comprehensive score of the presses includes: Calculate the total score in the distributed cluster according to the comprehensive score of the presses; Calculate the allocation weight of the presses according to the comprehensive score of the presses and the total score.

4. The method according to any one of claims 1 to 3, characterized in that After allocating the long connection pressure to the presses according to the allocation weight and the concurrent volume adjustment request of the long connection, it further includes: Receive the test result data sent by the presses; Generate a result display page according to the test result data.

5. The method according to claim 4, wherein After generating the result display page according to the test result data, it further includes: Send the test result data to the time series database; In response to a real-time query request, send a polling query request to the time series database to implement real-time query of the test result data.

6. The method according to any one of claims 1 to 3, characterized in that, Before obtaining the quality index information of the presses in the distributed cluster in response to the concurrent volume adjustment request for the long connection, it further includes: Establish a performance stress test life cycle model; where The life cycle of the performance stress test life cycle model includes a configuration stage, a running stage, a collection stage, and a cleaning stage.

7. The method according to claim 6, characterized in that It further includes: Monitor the running state of the performance stress test life cycle model; If it is monitored that the running state is abnormal, issue a stress test failure prompt.

8. The method according to claim 1, characterized in that The quality index information includes multiple of CPU usage rate, memory usage rate, latency, packet loss rate, etc.

9. A stress testing processing device for long connections under a distributed cluster, characterized in that, including: An acquisition module for obtaining the quality index information of the presses in the distributed cluster in response to a concurrent volume adjustment request for a long connection; The distributed cluster includes multiple presses; A first processing module for performing data normalization processing on the quality index information of the presses to obtain the normalized index data of the presses; A second processing module for determining the comprehensive score of the presses according to the preset weight ratio and the normalized index data; A determination module for determining the allocation weight of the presses according to the comprehensive score of the presses; A third processing module for allocating long connection pressure to the presses according to the allocation weight and the concurrent volume adjustment request of the long connection.

10. A stress testing processing device for long connections under a distributed cluster, characterized in that including: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, such that the processor executes the method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of claims 1-8.

12. A computer program product, characterized in that, Comprising a computer program, which when executed by a processor implements the method according to any one of claims 1-8.