Streaming session oriented pressure test management platform and pressure test method

By designing a pressure measurement management platform for streaming sessions, dynamically adjusting the number of streaming sessions, the problem that traditional stress testing solutions are not suitable for streaming sessions is solved, and effective performance evaluation of streaming session scenarios is achieved.

CN120216319APending Publication Date: 2025-06-27ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510374286.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Traditional stress testing schemes are not suitable for streaming session scenarios, and cannot effectively evaluate the performance of streaming sessions in high load environments.

Method used

A pressure measurement management platform for streaming sessions is designed, including a control unit and a session initiator unit. By dynamically adjusting the number of streaming sessions, the service platform is maintained for performance testing under pre-configured online sessions.

Benefits of technology

The stress test of streaming session scenarios is realized, which can effectively evaluate the performance indicators of the service platform under the specified number of online sessions, solving the differences in the inability of traditional solutions to adapt to streaming sessions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216319A_ABST
    Figure CN120216319A_ABST
Patent Text Reader

Abstract

A pressure test management platform and pressure test method oriented to a streaming session, a medium, a device and a program product, the pressure test management platform comprising: a control unit for obtaining a pre-configured online session number in response to a received pressure test task, and sending the online session number to a session initiation unit; the number of online sessions is the total number of streaming sessions expected to be maintained by the service platform with the streaming session capability; the session initiation unit is used for determining the number of initiated sessions required for maintaining the number of online sessions based on the number of real-time sessions of the service platform, initiating a corresponding number of streaming sessions to the service platform based on the number of initiated sessions, receiving events returned by the service platform in each streaming session, and sending the events to the service platform; the information of the event is used for the control unit to test the performance index of the service platform under the online session number; the number of real-time sessions is the number of streaming sessions on the service platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of software testing, and in particular, to a stress testing management platform for streaming sessions and a stress testing method. Background Art

[0002] In order to ensure the stability and performance of software programs in high-load environments, stress testing of software programs is required. Stress testing refers to continuously applying load pressure to a system by simulating extreme situations such as high concurrency and large data volumes in the actual operating environment to evaluate the performance of the system under corresponding pressure. The current stress testing solutions mainly focus on stress testing for traditional Remote Procedure Call (RPC). With the development of Artificial Intelligence (AI), more and more service platforms have started to support streaming session functions, such as real-time conversations, voice interactions, video stream processing, etc. Compared with RPC calls, there are many differences in traffic patterns and performance metrics in streaming sessions, which makes the traditional stress testing solutions not applicable to stress testing for streaming sessions. Therefore, there is an urgent need to propose a new solution for stress testing in streaming session scenarios to meet the special requirements of streaming session scenarios. Summary of the Invention

[0003] In a first aspect, an embodiment of this application provides a stress testing management platform for streaming sessions. The stress testing management platform includes: a control unit, configured to, in response to receiving a stress testing task, obtain a pre-configured number of online sessions and send the number of online sessions to a session initiation unit; the number of online sessions is the total number of streaming sessions that a service platform with streaming session capabilities expects to maintain; the session initiation unit is configured to determine the number of sessions to be initiated to maintain the number of online sessions based on the real-time number of sessions of the service platform, initiate a corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated, and receive events returned by the service platform in each streaming session, and information of the events is used by the control unit to test performance metrics of the service platform under the number of online sessions; the real-time number of sessions is the number of streaming sessions that the service platform is currently conducting.

[0004] Second aspect, an embodiment of the present application provides a stress testing method for streaming sessions, which is applied to a session initiation unit in the stress testing management platform described in the first aspect; the method includes: obtaining the number of online sessions sent by the control unit, where the number of online sessions is the total number of streaming sessions that a service platform with streaming session capabilities expects to maintain; determining the number of sessions to be initiated to maintain the number of online sessions based on the real-time session number of the service platform; the real-time session number is the number of streaming sessions that the service platform is currently conducting; initiating the corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated; receiving events returned by the service platform in each streaming session; the information of the events is used by the control unit to test the performance metrics of the service platform under the number of online sessions.

[0005] Third aspect, an embodiment of the present application provides a stress testing method for streaming sessions, which is applied to a control unit in the stress testing management platform described in the first aspect; the method includes: in response to receiving a stress testing task, obtaining a pre-configured number of online sessions; the number of online sessions is the total number of streaming sessions that a service platform with streaming session capabilities expects to maintain; sending the number of online sessions to the session initiation unit, so that the session initiation unit determines the number of sessions to be initiated to maintain the number of online sessions based on the real-time session number of the service platform, initiates the corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated, and receives events returned by the service platform in each streaming session; the real-time session number is the number of streaming sessions that the service platform is currently conducting; testing the performance metrics of the service platform under the number of online sessions based on the information of the events.

[0006] Fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any embodiment of the present application is implemented.

[0007] Fifth aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the method described in any embodiment of the present application is implemented.

[0008] Sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in any embodiment of the present application is implemented.

[0009] In the embodiment of the present application, the control unit sends the pre-configured number of online sessions to the session initiation unit. The session initiation unit determines the number of sessions to initiate based on the real-time number of sessions on the service platform, and initiates the corresponding number of streaming sessions to the service platform based on the number of sessions to initiate, so that the number of streaming sessions between the session initiation unit and the service platform is maintained at the pre-configured number of online sessions, realizing the test of the performance metrics of the service platform under the specified number of online sessions.

[0010] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings herein are incorporated into the specification and constitute a part of the present application. These drawings show embodiments consistent with the present application and are used together with the specification to illustrate the technical solutions of the present application.

[0012] Figure 1A is a schematic diagram of the implementation process of traditional RPC calls.

[0013] Figure 1B is a schematic diagram of the implementation process of streaming sessions.

[0014] Figure 2A is a schematic diagram of the pressure application mode of traditional RPC calls.

[0015] Figure 2B is a schematic diagram of the pressure application mode of streaming sessions.

[0016] Figure 3 is a schematic diagram of the pressure testing management platform according to the embodiment of the present application.

[0017] Figure 4 is a schematic diagram of the deployment architecture of the control unit and the session initiation unit according to the embodiment of the present application.

[0018] Figure 5A is a schematic diagram of realizing pressure control by counting the number of online sessions according to the embodiment of the present application.

[0019] Figure 5B is a schematic diagram of adaptive pressure control according to the embodiment of the present application.

[0020] Figure 6 is a schematic diagram of the functional modules of the pressure testing management platform according to the embodiment of the present application.

[0021] Figure 7 is a schematic diagram of the overall architecture according to the embodiment of the present application.

[0022] Figure 8 is a schematic diagram of the overall flowchart according to the embodiment of the present application.

[0023] Figure 9 It is a flowchart of the stress testing method according to an embodiment of the present application.

[0024] Figure 10 It is a flowchart of the stress testing method according to another embodiment of the present application.

[0025] Figure 11 It is a block diagram of the stress testing device according to an embodiment of the present application.

[0026] Figure 12 It is a block diagram of the stress testing device according to another embodiment of the present application.

[0027] Figure 13 It is a schematic diagram of a computer device according to an embodiment of the present application. Detailed implementation manners

[0028] Here, the exemplary embodiments will be described in detail, and the 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 the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0029] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items. In addition, the term "at least one" as used herein means any one of a plurality or any combination of at least two of a plurality.

[0030] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0031] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application and make the above objects, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the drawings.

[0032] At present, more and more service platforms are beginning to support the streaming session function. Among them, streaming session is a communication mode that refers to the establishment of a continuous, two-way communication channel between the client and the server for real-time transmission and processing of data. Unlike the traditional request-response model (such as HTTP request), streaming session allows data to be continuously transmitted between the two communicating parties in the form of a "stream" without the need to re-establish a connection for each interaction. In a streaming session, the connection between the client and the server remains open until the end of the session. This mode allows data to be continuously transmitted during the session without frequently establishing and closing connections. The service platform can be an AI agent or an AI gateway. Taking AI agents as an example, AI agents refer to intelligent systems that can autonomously perceive the environment, make decisions, and perform actions. In B-side services, AI Agents are mostly intelligent customer service roles. In addition to ensuring the correctness of the answer results, the experience of the answer is also crucial, including the timeliness of the reply (perception speed) and the experience of the reply process (continuity of the output content).

[0033] When performing tasks, AI Agents need to think, reason, decompose complex steps, and call tools, which is more complicated than traditional request-response systems, so the whole process will take longer. In order to reduce user waiting time and optimize the interactive experience, streaming output is usually used. Streaming output allows data to be sent to users gradually during processing, rather than waiting until all data is processed and sent all at once, which can reduce user waiting time.

[0034] Figure 1A and Figure 1B The difference between the implementation process of the traditional RPC call and the implementation process of the streaming online session is shown. Figure 1A A schematic diagram of the RPC call process using the HyperText Transfer Protocol (HTTP) is shown. Figure 1A It can be seen that ordinary HTTP requests are usually based on a request-response model, each request is independent and does not involve session management. Figure 1B The implementation process of the streaming session based on the Server-Sent Events (SSE) protocol is shown. Figure 1B It can be seen that under SSE streaming interaction, the server keeps the connection open after the client initiates a request, can continuously push information to the client, can maintain a long-term session, and the server can send multiple events during the session.

[0035] Table 1 shows the differences between RPC calls and streaming sessions during stress testing (abbreviated as pressure testing). From Table 1, it can be seen that RPC calls adopt the request-response model. After the requester (such as the client) sends a request, the responder (such as the server) immediately returns a response without the need to establish a long-term connection between the requester and the responder. When conducting stress testing on RPC calls, the main metrics of concern are the Queries Per Second (QPS), Response Time (RT), error rate, etc. The stress testing of RPC calls is mainly targeted at test scenarios such as APIs and microservices, and the processing ability under high-concurrency requests is used as the performance measurement metric. Since RPC calls do not require a long-term connection between the requester and the responder, generally, the overall management of the session is not involved.

[0036] In contrast, a streaming session requires continuous session interaction and needs to establish a long-term session connection between the responder and the requester. The responder continuously returns events (tokens) to the requester through this session connection. When conducting stress testing on a streaming session, the main concerns are the session maintenance ability and the context management ability. The session maintenance ability refers to the ability of the system to maintain the session state in a streaming session, ensuring that the connection between the client and the server can remain stable and continuous during the session and will not be interrupted due to network fluctuations, server switches, or other interference factors. The context management ability refers to the ability of the system to manage the session context information in a streaming session. The stress testing of streaming sessions is mainly targeted at application scenarios such as chatbots and online customer service, and the session continuity, stability, and fluency in resource management are used as the performance measurement metrics. Since a streaming session requires a long-term connection between the requester and the responder, it is necessary to manage the session state and context.

[0037] Table 1

[0038]

[0039] Based on the above differences, the main differences between traditional RPC calls and streaming sessions during stress testing are as follows:

[0040] (1) Differences in the pressure application and control modes.

[0041] Differences in pressure control modes

[0042] Figure 2A and Figure 2B shows the pressure application mode of RPC calls during stress testing and the pressure application mode of streaming sessions during stress testing. As Figure 2AAs shown, still taking the RPC call based on the HTTP protocol as an example, when conducting a stress test on the RPC call, stateless HTTP requests are initiated. Each request is independent, and the number of requests initiated within each time period remains constant and is consistent with the real-time number of requests. As Figure 2B shown, when conducting a stress test on a streaming session, a certain number of concurrent sessions need to be maintained, and the number of initiated sessions is dynamically adjusted according to the number of online sessions and the real-time number of sessions. Among them, the number of initiated sessions refers to the number of streaming sessions initiated by the request side to the response side, the number of online sessions refers to the total number of streaming sessions expected to be maintained between the request side and the response side, and the real-time number of sessions refers to the number of streaming sessions currently in progress between the request side and the response side.

[0043] Differences in constant pressure control modes

[0044] When conducting a stress test on the RPC call, pressure control is relatively simple and is achieved by fixing the number of requests initiated in each time period. When conducting a stress test on a streaming session, pressure control is more complex, and the number of online sessions needs to be dynamically adjusted, and the duration of each session needs to be considered.

[0045] (2) Differences in performance metric evaluation.

[0046] The stress test metrics for traditional RPC calls mainly focus on response time, throughput (QPS), and error rate, and do not involve the stability of maintaining sessions for a long time. The performance evaluation is relatively simple. In addition to the above metrics, the stress test for streaming sessions also needs to focus on multiple key metrics, as shown in Table 2.

[0047] Table 2

[0048]

[0049]

[0050] Generally speaking, the stress test for traditional RPC calls pays more attention to instantaneous processing capabilities, while the stress test for streaming sessions pays more attention to session persistence and stability. The different requirements of these two modes fundamentally determine the differences in stress test design and pressure injection / control strategies. Combining the characteristics of the AI intelligent agent product, it is necessary to ensure that the system can operate stably in the high-concurrency QPS scenario and also evaluate its performance in multiple long-connection sessions, so as to comprehensively evaluate the system performance.

[0051] Based on this, the present application proposes a stress test management platform for streaming sessions, which is used to conduct stress tests on service platforms with streaming sessions; see Figure 3 , the stress test management platform includes:

[0052] A control unit 10, configured to obtain a pre-configured number of online sessions in response to receiving a stress test task, and send the number of online sessions to a session initiation unit 20; the number of online sessions is the total number of streaming sessions that a service platform with streaming session capabilities expects to maintain.

[0053] The session initiation unit 20 is configured to determine the number of sessions to be initiated to maintain the number of online sessions based on the real-time number of sessions of the service platform, initiate a corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated, and receive events returned by the service platform in each streaming session. The information of the events is used by the control unit 10 to test the performance metrics of the service platform under the above-mentioned number of online sessions; the real-time number of sessions is the number of streaming sessions that the service platform is currently conducting.

[0054] In the embodiment of the present application, the control unit 10 sends the pre-configured number of online sessions to the session initiation unit 20. The session initiation unit 20 determines the number of sessions to be initiated based on the real-time number of sessions of the service platform, and initiates a corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated, so that the number of streaming sessions between the session initiation unit 20 and the service platform is maintained at the pre-configured number of online sessions, thereby solving the problem of maintaining the number of sessions during the stress test of streaming sessions and realizing the test of the performance metrics of the service platform under the specified number of online sessions. The specific details of the embodiment of the present application are illustrated below.

[0055] The service platform of the present application can be a platform capable of conducting streaming sessions, such as an AI agent or an AI gateway. In a specific application scenario, the service platform is an AI agent cluster including multiple AI agents. The AI agent cluster can call AI models such as large language models (LLMs) to conduct streaming sessions (also known as AI streaming sessions). Testers can initiate a stress test task through the front-end web page and configure the number of online sessions in the stress test task, that is, the total number of streaming sessions that the service platform expects to maintain. The control unit 10 (also known as the control center) can obtain the above-mentioned number of online sessions and send the above-mentioned number of online sessions to the session initiation unit 20.

[0056] The session initiation unit 20 (also known as a stress tester or a session initiator) can generate a stress test task message based on the obtained number of online sessions and send the generated stress test task message to the message queue. Among them, the number of stress test task messages generated by the session initiation unit 20 is the same as the number of online sessions. The session initiation unit 20 can also consume the stress test task messages in the message queue, that is, read the stress test task messages in the message queue. For each stress test task message read, initiate a streaming session to the service platform and delete the stress test task message from the message queue.

[0057] After the session initiation unit 20 initiates a streaming session to the service platform, if the session is successfully established, the streaming session is in the ongoing state; if the session establishment fails, the streaming session is in the completed state. After the session is successfully established, the service platform can continuously return events (tokens) to the session initiation unit 20. After returning the last event, the session connection between the session initiation unit 20 and the service platform is closed. After the above session connection is closed, the streaming session is in the completed state.

[0058] When performing a stress test on a streaming session, it is necessary to maintain the number of ongoing sessions between the session initiation unit and the service platform at a certain number (i.e., the above-mentioned online session number) in order to determine the performance metrics of the service platform under this online session number. Since the streaming sessions initiated by the session initiation unit 20 may last for a period of time, the session initiation unit 20 needs to determine the number of streaming sessions to be initiated to the service platform (i.e., the number of initiated sessions) based on the pre-configured online session number and the number of ongoing streaming sessions of the service platform (i.e., the real-time session number). For example, assuming the online session number is 10 and the real-time session number is 7, the session initiation unit 20 still needs to initiate 3 more streaming sessions to the service platform, so that the total number of streaming sessions between the session initiation unit 20 and the service platform remains 10.

[0059] Figure 4 The figure shows a schematic diagram of the deployment architecture of the control unit 10 and the session initiation unit 20.

[0060] In some embodiments, the control unit 10 is deployed in the session initiation unit 20. The control unit 10 is responsible for managing and scheduling stress test tasks, and the session initiation unit 20 is used to execute stress test tasks and directly interact with the service platform.

[0061] Furthermore, the session initiation unit 20 is capable of concurrently executing multiple threads. Each thread is used to initiate a streaming session and receive the events returned by the service platform in the streaming session initiated by this thread. The online session number is the total number of streaming sessions expected to be maintained between the multiple threads of the session initiation unit 20 and the service platform. This embodiment adds multi-thread processing capabilities to the session initiation unit 20, improves the concurrency performance, and thus improves the stability of the session initiation unit 20. Similar to the previous embodiment, the control unit 10 is responsible for managing and scheduling stress test tasks. Each of the multiple threads (such as thread T1, thread T2, thread T3, and thread T4) can independently execute stress test tasks.

[0062] In some embodiments, the number of session initiation units 20 is multiple, and the multiple session initiation units 20 form a distributed cluster. Each session initiation unit 20 can concurrently execute multiple threads, and each thread is used to initiate a streaming session and receive events returned by the service platform in the streaming session initiated by the thread. The number of online sessions is the total number of streaming sessions that the multiple session initiation units 20 and the service platform expect to maintain. This embodiment introduces a distributed architecture. The control unit 10 serves as the master center (master) in the distributed architecture and is responsible for overall pressure control and monitoring. The multiple session initiation units 20 serve as the controlled parties (slaves) in the distributed architecture. Each session initiation unit 20 can be regarded as a node in the distributed architecture, and each node can include multiple threads (such as thread T1, thread T2, thread T3, and thread T4), and these nodes can be distributed on different machines. The control center can dynamically adjust the pressure of the distributed cluster (i.e., the total number of streaming sessions initiated by the distributed cluster) according to requirements. Figure 4 The differences among the three architectures in Figure 4 are shown in Table 3.

[0063] Table 3

[0064]

[0065]

[0066] Generally speaking, the introduction from V1 to V2 and then to V3 is mainly to solve the stability of the pressure generation module. From a single machine to multi-threading, and then to a distributed architecture, it can support large-scale distributed pressure testing (for example, it can achieve 1000 concurrent sessions with 9 online pressure machines simultaneously), and improve the scalability and flexibility of the system.

[0067] The biggest difficulty of the pressure testing management platform lies in pressure control, that is, how to ensure the stability of the number of online sessions. The following takes the accompanying drawings as an example to illustrate two ways to achieve pressure control.

[0068] Figure 5AIt shows a schematic diagram of pressure control (hereinafter referred to as counting-based pressure control) by counting the number of online sessions in a distributed architecture. In this embodiment, the stress testing management platform further includes a session quantity control unit 30 for counting the number of online sessions in the distributed cluster. The number of initiated sessions can be determined based on the count value of the session quantity control unit 30. Specifically, in response to any one of the session initiation units 20 in the distributed cluster initiating a streaming session to the service platform, the count value of the session quantity control unit 30 is incremented by 1; in response to the completion of any one of the initiated streaming sessions, the count value of the session quantity control unit 30 is decremented by 1. In this way, the real-time number of sessions in the distributed cluster can be determined based on the count value of the session quantity control unit 30. The number of initiated sessions can be determined according to the difference between the number of online sessions and the real-time number of sessions. The above method can accurately control the number of sessions, with a relatively simple logic, which is easy to understand and maintain.

[0069] Figure 5B It shows a schematic diagram of adaptive pressure control in a distributed architecture. In this embodiment, any one of the session initiation units 20 can perform the following operations: in response to the completion of a session initiated by the session initiation unit 20 itself, generate a test task message and broadcast the generated test task message to the distributed cluster, so that the session initiation units 20 in the distributed cluster initiate streaming sessions to the service platform in response to the test task message. Specifically, after the service platform returns the last event to the session initiation unit 20, it can return a message to the session initiation unit 20 to indicate the completion of the session and disconnect the session connection. After receiving the above message, the session initiation unit 20 can determine that a session initiated by the session initiation unit 20 itself has been completed. At this time, the session initiation unit 20 can generate a test task message and send the test task message to the message queue. The session initiation units 20 in the distributed cluster (which can be the session initiation unit 20 that generated the above test task message or other session initiation units 20) can read the test task message from the message queue and initiate a streaming session to the service platform. In the above process, the session initiation unit 20 serves as both a producer and a consumer of the test task message. As long as any one of the streaming sessions is completed, the distributed cluster will automatically generate a test task message so that the distributed cluster continues to initiate streaming sessions to the service platform, realizing the adaptive control of the number of online sessions. Moreover, compared with the method of achieving pressure control by counting the number of online sessions, this embodiment avoids the problem that the session quantity control unit 30 itself becomes a performance bottleneck in a high-concurrency scenario, with relatively high flexibility.

[0070] The characteristics of the above two methods of achieving pressure control are compared as shown in Table 4.

[0071] Table 4

[0072] Characteristics Counting pressure control Adaptive pressure control Control accuracy High Medium Flexibility Low High Implementation complexity Low High Adaptability to dynamic loads Poor Good Risk of performance bottleneck Possible Low

[0073] In practical applications, the voltage-controlled scheme can be selected by considering the implementation costs and flexibility of the two schemes comprehensively.

[0074] After a session is successfully initiated, the session initiation unit 20 can receive events returned by the service platform in each streaming session. The control unit 10 can monitor the information of the above events and test the performance metrics of the service platform under the above online session count based on the monitored event information. Among them, the event information includes but is not limited to the time when the service platform returns the event (such as the time when the first event is returned and the time when the last event is returned) and the status of the event (success or failure), etc. The above performance metrics can include at least one of the following: the time taken for the service platform to return the first event in the streaming session (also known as the first event time), the time taken for the service platform to return the last event in the streaming session (also known as the last event time), the time interval between two adjacent events returned by the service platform in the streaming session (also known as the inference interval), the total time of the streaming session, the number of successful streaming sessions, the number of failed streaming sessions, and the error rate of the streaming session.

[0075] Furthermore, the control unit 10 can also generate a test report based on the performance metrics of the service platform under the online session count, and can also send the test report generated based on the performance metrics of the service platform under the corresponding online session count to the designated receiving end. When an abnormality in the stress test task is detected, the control unit 10 can also control the session initiation unit 20 to stop initiating streaming sessions to the service platform (i.e., abnormal fusing).

[0076] In practical applications, there are differences in the implementation of modules such as model inference and workflow orchestration in different application scenarios (such as RAG, tool QA, table QA, etc.). Therefore, it may be necessary to conduct stress tests on streaming sessions in multiple application scenarios and generate performance reports for each type of scenario to ensure customer satisfaction with the delivered services and provide effective inputs for the stability construction of the service platform, the utilization rate of computing power resources, etc. By configuring the parameters related to the service scenario in the service platform (including but not limited to the type of knowledge base mounted on the service platform, the type of AI model called by the service platform, the intent recognition ability provided by the service platform, the number of session rounds of the streaming session, etc.), the service platform can be made to simulate the corresponding application scenario. For example, when the service platform is an AI agent, an AI agent cluster including multiple AI agents can be adopted, and different AI agents can be configured with different scenario parameters (i.e., the above parameters related to the service scenario). When conducting stress tests, different AI agents can be called to simulate different application scenarios.

[0077] Figure 6A schematic diagram of the functional modules of the stress testing management platform according to an embodiment of the present application is shown. The stress testing management platform covers three levels: a control center, platform capabilities, and underlying dependencies. The main capabilities include: actual management, task management, execution scheduling, performance monitoring, performance reporting, etc., to ensure that the service platform can be supported for stress testing execution in various complex scenarios.

[0078] The underlying dependencies include a cluster of pressure machines (i.e., the distributed cluster in the foregoing embodiment), middleware, and data monitoring. The cluster of pressure machines includes multiple pressure machines (i.e., the session initiation units 20 in the foregoing embodiment), and each pressure machine is a node in the distributed cluster, thereby realizing distributed pressure sending. The middleware is used to implement message passing between the control unit 10 and the session initiation unit 20, as well as between the session initiation unit 20 and the service platform. The types of middleware include, but are not limited to, Zcache, Msgbroker, ZDAL, Oss, SOFABoot, DRM, and other types. Data monitoring can be implemented based on technologies such as AI Studio or AntMonitor, etc., for monitoring various data required for stress testing. The above data includes, but is not limited to, the time when the service platform returns each event, the status of the streaming session, the real-time session count of the streaming session, the number of successful session connections, the number of failures, etc.

[0079] Based on the above underlying dependencies, the stress testing management platform can implement functions such as pressure control, task management, and performance reporting. The pressure control function can specifically include pressure configuration (configuring the number of online sessions), streaming call (calling the service platform for a streaming session), precise pressure sending (precisely controlling the real-time session count between the session initiation unit and the service platform), cluster pressure sending (initiating a streaming session to the service platform through a distributed cluster), real-time pressure regulation (real-time adjusting the configured number of online sessions), abnormal fusing (controlling the session initiation unit to stop initiating a streaming session to the service platform when a stress testing exception occurs), and other functions. The task management function can specifically include task creation (creating a stress testing task), task configuration (configuring a stress testing task), permission control (authorizing a specific account to execute a stress testing task), scenario configuration (configuring the application scenario of the service platform during stress testing), data configuration (configuring various data of the streaming session), pressure mode (the mode in which the session initiation unit initiates a streaming session, such as initiating a streaming session evenly or in a burst mode), and other functions. The performance reporting function can specifically include data collection (such as collecting the time when the service platform returns an event), data analysis (such as analyzing the change trend of performance indicators of the streaming session under different numbers of online sessions), stress testing log, test report, baseline comparison (such as comparing the performance indicators obtained from this stress testing with those obtained from the previous stress testing), message notification, and other functions.

[0080] Figure 7 Shows the overall architecture of an embodiment of the present application, mainly including:

[0081] The web front-end page can be a visual page used to initiate stress test tasks, adjust stress, stop stress testing, and other operations.

[0082] Distributed cluster: This is the core of the stress test management platform and is responsible for executing stress tests. The distributed cluster consists of multiple nodes, each of which can run multiple session threads to simulate users initiating streaming sessions.

[0083] The master node (i.e., control unit 10) is responsible for the scheduling and allocation of tasks, and sends the stress test tasks to each stress machine in the distributed cluster. In some embodiments, the user can flexibly adjust the pressure based on the real-time monitoring feedback of the stress test process. The system dynamically increases the number of session threads through the master node to simulate the system performance under different load conditions. The master node sends the stress test tasks to each node in the distributed cluster based on the number of stress test sessions. When performing a stress test, the node initiates a stress test request by calling the streaming access script of the service platform.

[0084] The stress testing management platform also provides functions such as stress testing task management, stress testing data management, stress testing process recording and stress testing reports to comprehensively manage and analyze stress testing results. In addition, the stress testing management platform also provides storage modules and monitoring modules. Among them, the storage module uses Zcache and database to store test data and results to ensure fast access and persistence of data. The monitoring module includes stress monitoring, failure number monitoring, etc., which monitors the execution of stress testing in real time and provides data support for stress testing process operations. Furthermore, the monitoring module can also include alarm monitoring, system monitoring and other functions.

[0085] The overall process of some embodiments is as follows Figure 8 shown.

[0086] First, the control unit 10 can start stress testing and obtain service information configuration, including environment management services and data management services. The control unit 10 can manage stress testing tasks and send the number of online sessions to the session initiation unit 20. The session initiation unit 20 can produce stress testing task messages as a producer and add the stress testing task messages to the message queue. At the same time, the session initiation unit 20 can also consume stress testing task messages in the message queue as a consumer and execute stress testing tasks. When executing stress testing tasks, the session initiation unit 20 can select an executor, execute the stress testing task script, and initiate a streaming session to the service platform. Each time a streaming session is completed, the session initiation unit 20 can regenerate a stress testing task message.

[0087] During the stress test, the control unit 10 can adjust the pressure (i.e., change the number of online sessions), and re - send the changed number of online sessions to the session initiation unit 20, so that the session initiation unit 20 generates a stress test task message according to the adjusted pressure. In addition, the control unit 10 can also monitor the stress test process, including monitoring key time - consuming indicators, monitoring the success trend and failure trend of streaming sessions, and monitoring the details of streaming sessions that initiate failures, etc.

[0088] The control unit 10 can also stop the stress test task and generate a stress test report. The stress test report can record information such as the total number of successfully completed streaming sessions (total success number), the total number of streaming sessions that failed to be successfully completed (total failure number), error rate, first - event time - consumption, last - event time - consumption, average inference interval, overall session time - consumption, etc.

[0089] In addition, after starting and stopping the stress test, the control unit 10 can also send a notification message to a specified message recipient. In the case of an abnormal stress test process, the control unit 10 can also perform abnormal fusing on the stress test process.

[0090] The embodiments of the present application have the following advantages:

[0091] (1) The present application solves the problem of long - connection thread occupation of streaming sessions through multi - thread distributed stress testing, and can keep the number of online sessions stable according to the service scenario;

[0092] (2) The present application supports the quick access of all streaming scenarios by abstracting the call process of streaming sessions;

[0093] (3) The performance metrics and performance reports obtained by the present application are all key metrics during the streaming session process around the service platform, which are closer to the streaming session service.

[0094] See Figure 9 , the embodiments of the present application also provide a stress test method for streaming sessions, which is applied to the session initiation unit 20 in the stress test management platform in the foregoing embodiments; the method includes:

[0095] Step S12: Obtain the number of online sessions sent by the control unit, where the number of online sessions is the total number of streaming sessions that a service platform with streaming session capabilities expects to maintain;

[0096] Step S14: Determine the number of sessions to be initiated to maintain the number of online sessions based on the real - time session number of the service platform; the real - time session number is the number of streaming sessions that the service platform is currently conducting;

[0097] Step S16: Initiate the corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated;

[0098] Step S18: Receive the events returned by the service platform in each streaming session; the information of the events is used by the control unit to test the performance metrics of the service platform under the number of online sessions.

[0099] In some embodiments, the session initiation unit forms a distributed cluster with at least one other session initiation unit; the session initiation unit can concurrently execute multiple threads, each thread is used to initiate a streaming session, and receive the events returned by the service platform in the streaming session initiated by this thread, and the number of online sessions is the total number of streaming sessions expected to be maintained between each session initiation unit in the distributed cluster and the service platform.

[0100] In some embodiments, the method further includes: obtaining the count value of the number of online sessions of the distributed cluster by the session quantity control unit in the stress testing management platform; determining the real-time session number based on the count value; wherein, in response to any one session initiation unit in the distributed cluster initiating a streaming session to the service platform, the count value of the session quantity control unit is incremented by 1; in response to the completion of any one initiated streaming session, the count value of the session quantity control unit is decremented by 1.

[0101] In some embodiments, the method further includes: generating a test task message in response to the completion of the session initiated by the present session initiation unit; broadcasting the test task message to the distributed cluster, so that the session initiation units in the distributed cluster initiate streaming sessions to the service platform in response to the test task message.

[0102] For the specific details of the embodiments of this method, please refer to the method executed by the session initiation unit 20 described above, which will not be elaborated here.

[0103] See Figure 10 , an embodiment of the present application further provides a stress testing method for streaming sessions, which is applied to the control unit 10 in the stress testing management platform in the foregoing embodiments; the method includes:

[0104] Step S22: In response to receiving a stress testing task, obtain a pre-configured number of online sessions; the number of online sessions is the total number of streaming sessions expected to be maintained by a service platform with streaming session capabilities;

[0105] Step S24: Send the number of online sessions to the session initiation unit, so that the session initiation unit determines the number of sessions to be initiated to maintain the number of online sessions based on the real-time session number of the service platform, and initiate the corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated, and receive the events returned by the service platform in each streaming session; the real-time session number is the number of streaming sessions being carried out by the service platform.

[0106] Step S26: Test the performance metrics of the service platform at the online session count based on the information of the event.

[0107] For the specific details of the embodiments of this method, refer to the method executed by the control unit 10 described above, which will not be elaborated here.

[0108] Corresponding to the method executed by the session initiation unit 20 above, an embodiment of the present application further provides a stress testing device, which is applied to the session initiation unit 20 in the stress testing management platform in the foregoing embodiment; see Figure 11 , the method includes:

[0109] A first acquisition module 110, configured to acquire the online session count sent by the control unit, where the online session count is the total number of streaming sessions that the service platform expects to maintain.

[0110] A determination module 120, configured to determine the number of sessions to be initiated required to maintain the online session count based on the real-time session count of the service platform; the real-time session count is the number of streaming sessions that the service platform is currently conducting.

[0111] A session initiation module 130, configured to initiate a corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated.

[0112] A receiving module 140, configured to receive events returned by the service platform in each streaming session; the information of the event is used by the control unit to test the performance metrics of the service platform at the online session count.

[0113] Corresponding to the method executed by the control unit 10 above, an embodiment of the present application further provides a stress testing device, which is applied to the control unit 10 in the stress testing management platform in the foregoing embodiment; see Figure 12 , the method includes:

[0114] A second acquisition module 210, configured to acquire the pre-configured online session count in response to receiving a stress testing task; the online session count is the total number of streaming sessions that the service platform expects to maintain.

[0115] A sending module 220, configured to send the online session count to the session initiation unit, so that the session initiation unit determines the number of sessions to be initiated required to maintain the online session count based on the real-time session count of the service platform, initiates a corresponding number of streaming sessions to the service platform based on the number of sessions to be initiated, and receives events returned by the service platform in each streaming session; the real-time session count is the number of streaming sessions that the service platform is currently conducting.

[0116] A test module 230 is configured to test the performance metrics of the service platform under the number of online sessions based on the information of the event.

[0117] An embodiment of the present application further provides a computer device, which at least includes a memory, a processor, and a computer program stored on the memory and executable on the processor. Wherein, when the processor executes the program, it implements the method described in any one of the foregoing embodiments.

[0118] Figure 13 FIG. shows a more specific schematic diagram of the hardware structure of a computer device provided by an embodiment of the present application. The device may include: a processor 310, a memory 320, an input / output interface 330, a communication interface 340, and a bus 350. Among them, the processor 310, the memory 320, the input / output interface 330, and the communication interface 340 are communicatively connected to each other inside the device through the bus 350.

[0119] The processor 310 may be implemented in a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present application. The processor 310 may further include a graphics card, and the graphics card may be an Nvidia titan X graphics card or a 1080Ti graphics card, etc.

[0120] The memory 320 may be implemented in the form of a read-only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 320 may store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of the present application through software or firmware, the relevant program codes are stored in the memory 320 and are called and executed by the processor 310.

[0121] The input / output interface 330 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0122] The communication interface 340 is used to connect to a communication module (not shown in the figure) to achieve communication and interaction between this device and other devices. The communication module can achieve communication through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, Wi-Fi, Bluetooth, etc.).

[0123] The bus 350 includes a path for transmitting information between various components of the device (such as the processor 310, the memory 320, the input / output interface 330, and the communication interface 340).

[0124] It should be noted that although the above device only shows the processor 310, the memory 320, the input / output interface 330, the communication interface 340, and the bus 350, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of the present application, and does not necessarily include all the components shown in the figure.

[0125] The embodiments of the present application provide a computer program product, including a computer program, which when executed by a processor implements the method described in any embodiment of the present application.

[0126] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method described in any of the foregoing embodiments.

[0127] Computer-readable media include both permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computer device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0128] The various embodiments in this application are all described in a progressive manner. For the identical or similar parts among the embodiments, reference can be made to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the device embodiments, since they are basically similar to the method embodiments, they are described relatively simply, and for the relevant parts, reference can be made to the description in the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated. When implementing the solution of the embodiments of this application, the functions of each module can be implemented in the same or multiple software and / or hardware. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.

[0129] The above is only the specific implementation manner of the embodiments of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the embodiments of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the embodiments of this application.

Claims

1. A stress test management platform for streaming sessions, the stress test management platform comprising: A control unit, configured to, in response to receiving a stress test task, obtain a pre-configured number of online sessions, and send the number of online sessions to a session initiating unit; The number of online sessions is the total number of streaming sessions that the service platform with streaming session capability expects to maintain; The session initiating unit is configured to determine the number of initiated sessions required to maintain the number of online sessions based on the number of real-time sessions of the service platform, initiate a corresponding number of streaming sessions to the service platform based on the number of initiated sessions, and receive events returned by the service platform in each streaming session, wherein information of the events is used by the control unit to test a performance indicator of the service platform under the number of online sessions; The number of real-time sessions is the number of streaming sessions being conducted by the service platform.

2. According to the stress testing management platform of claim 1, the control unit is deployed in the session initiation unit.

3. According to the stress testing management platform of claim 2, the session initiating unit can execute multiple threads concurrently, each thread is used to initiate a streaming session and receive events returned by the service platform in the streaming session initiated by the thread, and the number of online sessions is the total number of streaming sessions expected to be maintained between the multiple threads of the session initiating unit and the service platform.

4. According to the stress testing management platform of claim 1, there are multiple session initiating units, and the multiple session initiating units form a distributed cluster; each session initiating unit can execute multiple threads concurrently, each thread is used to initiate a streaming session and receive events returned by the service platform in the streaming session initiated by the thread, and the number of online sessions is the total number of streaming sessions expected to be maintained between the multiple session initiating units and the service platform.

5. According to the stress testing management platform of claim 4, the stress testing management platform also includes a session quantity control unit for counting the number of real-time sessions of the distributed cluster; in response to any session initiation unit in the distributed cluster initiating a streaming session to the service platform, the count value of the session quantity control unit is increased by 1; in response to the completion of any initiated streaming session, the count value of the session quantity control unit is reduced by 1.

6. According to the stress testing management platform of claim 4, the session initiating unit is used for: In response to the completion of the session initiated by the session initiating unit, a test task message is generated and broadcast to the distributed cluster, so that the session initiating units in the distributed cluster initiate a streaming session to the service platform in response to the test task message.

7. The stress testing management platform according to claim 1, wherein the control unit is further configured to perform at least one of the following operations: generating a test report based on the performance indicators of the service platform under the number of online sessions; Sending a test report generated based on the performance indicators of the service platform under the number of online sessions to a designated receiving end; When an abnormality is detected in the stress test task, the session initiating unit is controlled to stop initiating a streaming session to the service platform.

8. According to the stress testing management platform of claim 1, the performance indicator includes at least one of the following: The service platform returns the time taken for the first event in the streaming session; The service platform returns the time taken for the last event in the streaming session; The service platform returns the time interval between two adjacent events in the streaming session; The total time taken for the streaming session; The number of successful streaming sessions; Number of streaming session failures; The error rate for the streaming session.

9. A stress testing method for streaming sessions, applied to a session initiating unit in a stress testing management platform according to any one of claims 1 to 8; the method comprising: Acquire the number of online sessions sent by the control unit, where the number of online sessions is the total number of streaming sessions that the service platform with streaming session capability expects to maintain; The number of initiated sessions required to maintain the number of online sessions is determined based on the number of real-time sessions of the service platform; the number of real-time sessions is the number of ongoing streaming sessions of the service platform; Initiating a corresponding number of streaming sessions to the service platform based on the number of initiated sessions; An event returned by the service platform in each streaming session is received; information of the event is used by the control unit to test a performance indicator of the service platform under the number of online sessions.

10. According to the method of claim 9, the session initiating unit and at least one other session initiating unit form a distributed cluster; the session initiating unit can execute multiple threads concurrently, each thread is used to initiate a streaming session, and receive events returned by the service platform in the streaming session initiated by the thread, and the number of online sessions is the total number of streaming sessions expected to be maintained between each session initiating unit in the distributed cluster and the service platform.

11. The method according to claim 10, further comprising: Obtaining a count value of the number of online sessions of the distributed cluster by a session quantity control unit in the stress testing management platform; determining the number of real-time sessions based on the count value; Wherein, in response to any session initiation unit in the distributed cluster initiating a streaming session to the service platform, the count value of the session quantity control unit is increased by 1; In response to completion of any initiated streaming session, the count value of the session quantity control unit is reduced by 1.

12. The method according to claim 10, further comprising: In response to the completion of the session initiated by the session initiating unit, a test task message is generated; The test task message is broadcasted to the distributed cluster, so that a session initiation unit in the distributed cluster initiates a streaming session to the service platform in response to the test task message.

13. A stress testing method for streaming sessions, applied to the control unit in the stress testing management platform according to any one of claims 1 to 8; the method comprising: In response to receiving the stress test task, obtaining a preconfigured number of online sessions; The number of online sessions is the total number of streaming sessions that the service platform with streaming session capability expects to maintain; sending the number of online sessions to a session initiating unit, so that the session initiating unit determines the number of initiated sessions required to maintain the number of online sessions based on the number of real-time sessions of the service platform, initiates a corresponding number of streaming sessions to the service platform based on the number of initiated sessions, and receives events returned by the service platform in each streaming session; the number of real-time sessions is the number of streaming sessions being conducted by the service platform; The performance index of the service platform under the number of online sessions is tested based on the information of the event.

14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 9 to 13.

15. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 9 to 13 when executing the computer program.

16. A computer program product, comprising a computer program, which implements the method according to any one of claims 9 to 13 when executed by a processor.