Pressure testing method, device and electronic equipment
By simulating vehicle registration behavior and receiving status monitoring, virtual vehicles are generated to evaluate the load capacity of the traffic information data server, which solves the stability problem of the server under large-scale vehicle users and achieves accurate acquisition of load values and performance optimization.
Patent Information
- Application Number
- CN202111638632.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-12-27
AI Technical Summary
Existing technologies make it difficult to effectively evaluate and optimize the stability and load capacity of vehicle traffic information data servers, especially when facing a large number of vehicle users, resulting in server performance degradation or overload.
Generate virtual vehicles by simulating vehicle registration behavior, control virtual vehicles to receive traffic information and monitor the receiving status, identify abnormal virtual vehicles to stop stress testing, obtain the server load value, control the number of virtual vehicles in batches to determine the load upper limit, and generate a target stress test report.
It realizes the stability evaluation and performance optimization of the server, improves the accuracy of load value acquisition, and provides support for server performance optimization.
Smart Images

Figure CN114416445B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to artificial intelligence fields such as computer vision. Background Art
[0002] With the development of technology, vehicle users have a demand for traffic information data services. In practice, the server that provides data services to vehicles needs to provide services to a large number of vehicle users at the same time. Therefore, in the actual application environment, its stability is very important. Summary of the Invention
[0003] The present disclosure provides a pressure testing method, device and electronic equipment.
[0004] According to a first aspect of the present disclosure, a stress testing method is proposed, comprising: simulating vehicle registration behavior, and generating a virtual vehicle of a server to be tested based on the vehicle registration behavior; controlling the virtual vehicle to simultaneously receive traffic information sent by the server to be tested, and monitoring the receiving status of the virtual vehicle to perform a stress test on the server to be tested; stopping the stress test in response to the presence of an abnormal virtual vehicle having an abnormal receiving status among the virtual vehicles participating in the stress test; and obtaining a load value of the server to be tested according to the receiving status of the virtual vehicles participating in the stress test.
[0005] According to the second aspect of the present disclosure, a stress testing device is proposed, including a registration module for simulating vehicle registration behavior and generating a virtual vehicle of a server to be tested based on the vehicle registration behavior; a stress testing module for controlling the virtual vehicle to simultaneously receive traffic information sent by the server to be tested, and monitoring the receiving status of the virtual vehicle to perform a stress test on the server to be tested; a control module for stopping the stress test in response to the presence of an abnormal virtual vehicle with an abnormal receiving status among the virtual vehicles participating in the stress test; and an analysis module for obtaining a load value of the server to be tested according to the receiving status of the virtual vehicle participating in the stress test.
[0006] According to a third aspect of the present disclosure, an electronic device is proposed, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the stress testing method described in the first aspect above.
[0007] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is proposed, wherein the computer instructions are used to enable the computer to execute the stress testing method described in the first aspect above.
[0008] According to a fifth aspect of the present disclosure, a computer program product is proposed, including a computer program, which implements the stress testing method described in the first aspect when executed by a processor.
[0009] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.
[0011] Figure 1 Schematic diagram of a pressure testing method according to an embodiment of the present disclosure;
[0012] Figure 2 This is a flow chart of a pressure testing method according to another embodiment of the present disclosure;
[0013] Figure 3 This is a flow chart of a pressure testing method according to another embodiment of the present disclosure;
[0014] Figure 4 This is a flow chart of a pressure testing method according to another embodiment of the present disclosure;
[0015] Figure 5 This is a flow chart of a pressure testing method according to another embodiment of the present disclosure;
[0016] Figure 6 This is a flow chart of a pressure testing method according to another embodiment of the present disclosure;
[0017] Figure 7 This is a flow chart of a pressure testing method according to another embodiment of the present disclosure;
[0018] Figure 8 This is a flow chart of a pressure testing method according to another embodiment of the present disclosure;
[0019] Figure 9 This is a schematic structural diagram of a pressure testing platform according to an embodiment of the present disclosure;
[0020] Figure 10 This is a structural diagram of a pressure testing device according to an embodiment of the present disclosure;
[0021] Figure 11 A schematic block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0022] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0023] Computer vision is the science of making machines "see." Specifically, it refers to using cameras and computers to replace the human eye in identifying, tracking, and measuring objects. Further image processing is performed, allowing the computer to generate images more suitable for human observation or transmission to instruments for inspection. As a scientific discipline, computer vision studies related theories and technologies, aiming to build artificial intelligence systems that can extract "information" from images or multidimensional data. This information refers to information that can be used to assist in making a decision, as defined by Shannon. Because perception can be viewed as extracting information from sensory signals, computer vision can also be viewed as the science of making artificial systems "perceive" from images or multidimensional data.
[0024] Artificial Intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors, such as learning, reasoning, thinking, and planning. It encompasses both hardware and software technologies. AI hardware technologies generally include computer vision, speech recognition, natural language processing, as well as deep learning / learning, big data processing, and knowledge graphs.
[0025] Figure 1 FIG. 1 is a flow chart of a pressure testing method according to an embodiment of the present disclosure. Figure 1 As shown, the method includes:
[0026] S101, simulating vehicle registration behavior, and generating a virtual vehicle for a server to be tested based on the vehicle registration behavior.
[0027] In practice, the vehicle's driving environment will be affected by traffic events occurring around it, and the vehicle driver can adjust the vehicle's driving route according to the affected driving environment.
[0028] For example, assume a vehicle traveling eastbound experiences a traffic accident on the road ahead, causing congestion. In this scenario, the driver, upon learning of the traffic incident, can adjust their driving direction and route to avoid the congested road section.
[0029] Optionally, a traffic information data service may be provided to the vehicle through a relevant traffic information data server, and relevant traffic information in the vehicle's driving environment may be sent to the vehicle, so that the vehicle may adaptively plan its itinerary and route according to the received traffic information.
[0030] Furthermore, in order to enable the traffic information data server to provide stable traffic information data services when facing a large number of vehicles, the load upper limit of the server can be obtained through relevant stress testing.
[0031] Among them, the relevant servers that can provide traffic information data can be used as servers to be tested in the stress test.
[0032] In the embodiment of the present disclosure, a corresponding stress test simulation environment can be built for the server to be tested, and a stress test of the server to be tested can be implemented through the stress test simulation environment.
[0033] Furthermore, during the stress test of the server to be tested, multiple user information can be generated on the server to be tested by simulating the registration behavior of vehicles in actual scenarios, wherein each user information corresponds to a virtual vehicle.
[0034] S102 , controlling the virtual vehicle to simultaneously receive traffic information sent by the server to be tested, and monitoring the receiving status of the virtual vehicle to perform a stress test on the server to be tested.
[0035] In practice, traffic information data servers need to simultaneously serve a large number of vehicle users and provide corresponding traffic data services to these users. During stress testing, we can simulate multi-point data consumption scenarios for traffic information data servers and stress-test the server under test by simultaneously transmitting traffic information from the server to virtual vehicles.
[0036] The virtual vehicle can be controlled to simultaneously receive traffic information sent by the server to be tested, so as to simulate the multi-point data consumption scenario of the actual traffic information data server.
[0037] Furthermore, the receiving status of the virtual vehicle to the traffic information sent by the server to be tested can be obtained, and the status of the current stress test can be judged by monitoring the receiving status of each virtual vehicle.
[0038] S103 , in response to the presence of an abnormal virtual vehicle with an abnormal reception state among the virtual vehicles participating in the stress test, stopping the stress test.
[0039] In the embodiment of the present disclosure, the receiving status of the virtual vehicle from the traffic information sent by the server to be tested may include normal reception and abnormal reception.
[0040] Among them, a virtual vehicle with an abnormal reception state can be determined as an abnormal virtual vehicle.
[0041] Furthermore, when it is monitored that there is an abnormal virtual vehicle with an abnormal receiving status among the virtual vehicles currently participating in the stress test, it can be judged that there is an abnormality in the process of the current server to be tested sending traffic information to the virtual vehicle. It can be understood that there is an abnormality in the stability of the current server to be tested.
[0042] That is, in the current stress test, the number of virtual vehicles that simultaneously receive traffic information from the server to be tested has a certain degree of impact on the performance of the current server to be tested, resulting in an overload situation for the current server to be tested.
[0043] In this scenario, you can stop the current stress test on the server to be tested. After stopping the stress test, you can further analyze the cause of the overload on the server to be tested and prepare for the next round of stress testing.
[0044] S104: Obtain the load value of the server to be tested according to the receiving status of the virtual vehicle participating in the stress test.
[0045] In the embodiment of the present disclosure, the load value of the server to be tested can be understood as the upper limit of the number of virtual vehicles that the server to be tested can provide services for, wherein the receiving status can reflect the information interaction status between the virtual vehicle participating in the stress test and the server to be tested. If the receiving status is normal, it can be judged that the information interaction status between the virtual vehicle and the server to be tested is normal; if the receiving status is abnormal, it can be judged that the information interaction status between the virtual vehicle and the test server is abnormal.
[0046] Furthermore, when an abnormality occurs in the information interaction state between the virtual vehicle and the server to be tested, it can be determined that an abnormality occurs in the process of the server to be tested currently providing data services to the virtual vehicle.
[0047] The number of virtual vehicles with normal current information interaction status can be obtained, and this number can be used as the upper limit of the number of virtual vehicles that the server to be tested can load in the current round of stress testing, where the upper limit is the load value of the server to be tested in the current round of stress testing.
[0048] The stress testing method proposed in the present disclosure simulates vehicle registration behavior and generates a virtual vehicle user for the server to be tested. The virtual vehicle is controlled to simultaneously receive traffic information sent by the server to be tested, and the receiving status of the virtual vehicle is monitored. When a virtual vehicle with an abnormal receiving status is identified among the virtual vehicles participating in the stress test, the stress test is determined to be terminated, and the load value of the server to be tested is obtained based on the receiving status of the virtual vehicles participating in the stress test. In the present disclosure, by simulating the registration of vehicle users and the reception of traffic information, an effective stress test of the server to be tested is achieved. The load upper limit of the server to be tested is obtained through the load value of the server to be tested, and the stability of the server to be tested is controlled, thereby identifying the load defects of the server to be tested, and further achieving effective optimization of the performance of the server to be tested.
[0049] In the above embodiment, when the receiving state of the virtual vehicle is normal, Figure 2 Further understanding, Figure 2 FIG. 1 is a flow chart of a pressure testing method according to another embodiment of the present disclosure. Figure 2 As shown, the method includes:
[0050] S201, within the set test duration, controlling some virtual vehicles in batches to receive traffic information.
[0051] In the embodiment of the present disclosure, in order to implement effective stress testing on the server to be tested and obtain the limit value of the server to be tested, the stress test may be time-controlled.
[0052] During the set test duration, the virtual vehicle is controlled to receive traffic information sent by the server to be tested. When simulating vehicle registration, virtual vehicles can be registered in batches and all virtual vehicles can be divided into batches.
[0053] Optionally, one of the batches of virtual vehicles can be controlled to simultaneously receive traffic information from the server to be tested within the set test duration, and the relevant information of the stress test can be judged based on the receiving status of the virtual vehicles in the batch.
[0054] S202, in response to the receiving status of the previous batch of virtual vehicles participating in the stress test being normal, the number of virtual vehicles participating in the stress test in the next batch is increased until an abnormal virtual vehicle with an abnormal receiving status exists in the current batch of virtual vehicles participating in the stress test and the stress test is stopped.
[0055] In the embodiment of the present disclosure, it is possible that among the virtual vehicles participating in the stress test, each virtual vehicle can normally receive the traffic information sent by the server to be tested. In this scenario, it can be determined that the number of virtual vehicles in the current parameter stress test is less than the load upper limit of the server to be tested.
[0056] Furthermore, in order to obtain the load upper limit of the server to be tested, the number of virtual vehicles participating in the stress test can be increased, and the increased number of virtual vehicles can be controlled to participate in the next batch of stress tests.
[0057] Among them, the increased number of virtual vehicles can be controlled to simultaneously receive traffic information sent by the server to be tested within the set test duration, and the number of virtual vehicles currently participating in the stress test can be judged based on the receiving status of each virtual vehicle to determine whether it is the load upper limit of the server to be tested.
[0058] Furthermore, the receiving status of the virtual vehicles participating in the stress test in the current batch can be monitored. If it is monitored that there are abnormal virtual vehicles with abnormal receiving status among all the virtual vehicles, it can be determined that the number of virtual vehicles participating in the stress test in the current batch exceeds the load limit of the server to be tested. Therefore, the stress test of the current batch can be stopped and the relevant results of the current stress test can be obtained.
[0059] The stress testing method proposed in the present disclosure controls virtual vehicles in batches to participate in the stress test of the server to be tested, and monitors the reception status of each virtual vehicle for the traffic information sent by the server to be tested. When the reception status of the virtual vehicles participating in the stress test is normal, the number of virtual vehicles participating in the stress test is increased, and the virtual vehicles with the increased number are controlled to continue to participate in the stress test of the server to be tested, until an abnormal virtual vehicle with an abnormal reception status exists among the virtual vehicles participating in the stress test, and the stress test of the server to be tested is stopped. In the present disclosure, by increasing the number of virtual vehicles participating in the stress test in batches, the load value of the server to be tested is obtained, the accuracy of the obtained load value is improved, and the performance optimization effect of the server to be tested is enhanced.
[0060] In the above embodiment, the load value of the server to be tested can be obtained by combining Figure 3 Further understanding, Figure 3 FIG. 1 is a flow chart of a pressure testing method according to another embodiment of the present disclosure. Figure 3 As shown, the method includes:
[0061] S301, according to the number of abnormal virtual vehicles, obtain the number of normal virtual vehicles with normal receiving status within a set test time.
[0062] In the embodiment of the present disclosure, when an abnormal virtual vehicle with an abnormal receiving state appears in the virtual vehicles, it can be determined that the number of virtual vehicles currently participating in the stress test exceeds the load upper limit of the server to be tested.
[0063] Among them, a virtual vehicle with an abnormal receiving state can be determined as an abnormal virtual vehicle. Further, after the virtual vehicle participating in the stress test starts to receive traffic information sent by the server to be tested, the receiving state of the virtual vehicle can be determined based on the relevant information received by the virtual vehicle on the traffic information.
[0064] As a possible implementation manner, in response to the server to be tested not receiving the feedback information of the virtual vehicle, it is determined that the receiving state of the virtual vehicle is abnormal.
[0065] In the embodiment of the present disclosure, after the virtual vehicle receives traffic information, it can provide feedback to the server to be tested based on the received traffic information. Therefore, by monitoring whether the server to be tested receives the feedback information confirming receipt returned by the virtual vehicle, it can be determined whether there is any abnormality in the information transmission status between the virtual vehicle and the server to be tested.
[0066] Furthermore, when the number of feedback information received by the server to be tested does not match the number of traffic information sent to the virtual vehicle, it can be judged that there is currently a virtual vehicle that has not returned feedback information confirming receipt to the server to be tested, and then it is judged that there is an abnormal reception status in the virtual vehicle in the current stress test.
[0067] Optionally, each virtual vehicle has set identification information when it is registered. The identification information can be attached to the traffic information sent by the server to be tested and the feedback information returned by the virtual vehicle. Based on the comparison results of the identification information, the abnormal virtual vehicle with abnormal receiving status among the virtual vehicles currently participating in the stress test can be determined.
[0068] As another possible implementation, traffic information displayed by the virtual vehicle is identified, and in response to the displayed traffic information not matching the traffic information sent by the server to be tested, it is determined that the receiving state of the virtual vehicle is abnormal.
[0069] In the embodiment of the present disclosure, after the virtual vehicle receives the traffic information sent by the server to be tested, it is necessary to read the received traffic information and display the reading result.
[0070] Therefore, the traffic information reading result of the virtual vehicle can be matched with the traffic information received by the virtual vehicle, and whether the receiving state of the virtual vehicle is abnormal can be determined based on the matching result.
[0071] Furthermore, when the result displayed after the virtual vehicle reads the traffic information does not match the traffic information sent by the server to be tested, it can be judged that there is a problem in the information interaction between the virtual vehicle and the traffic information, and the virtual vehicle whose reading result does not match the traffic information can be determined as an abnormal virtual vehicle with an abnormal receiving state.
[0072] During implementation, there is a set number of virtual vehicles participating in the stress test. In order to reduce the difficulty of obtaining the number of virtual vehicles with normal receiving status, the number of abnormal virtual vehicles can be used to obtain the number of virtual vehicles with normal receiving status from the set number of all virtual vehicles participating in the stress test as the number of normal virtual vehicles currently participating in the stress test.
[0073] S302: Determine the load value of the server to be tested according to the normal number of virtual vehicles, and generate a target stress test report for the server to be tested.
[0074] In an embodiment of the present disclosure, in a scenario where there are abnormal virtual vehicles among the virtual vehicles participating in the stress test, the number of normal virtual vehicles with normal receiving status can be used as the load upper limit of the server to be tested during the current stress test.
[0075] The load upper limit may be determined as the load value of the server to be tested.
[0076] Furthermore, a target stress test report of the server to be tested may be generated according to the load value, and relevant information of the stress test of the server to be tested may be displayed through the stress test report.
[0077] The stress testing method proposed in this disclosure uses the number of abnormal virtual vehicles to obtain the number of normal virtual vehicles receiving normal status among the virtual vehicles participating in the stress test. The load value of the server under test is determined based on the number of normal virtual vehicles, and a corresponding target stress test report is generated. In this disclosure, the number of normal virtual vehicles is obtained by using the number of abnormal virtual vehicles, which reduces the difficulty of calculating the load value of the server under test. The corresponding target stress test report is generated based on the registered load value, providing support for subsequent optimization of the server under test.
[0078] Furthermore, during the stress test of the server to be tested, the function of simulating vehicle registration can also be stress tested, which can be combined with Figure 4 understand, Figure 4 FIG. 1 is a flow chart of a pressure testing method according to another embodiment of the present disclosure. Figure 4 As shown, the method includes:
[0079] S401 , monitoring the registration status of each simulated registration during the process of simulating vehicle registration behavior.
[0080] In implementation, the traffic information data server will face a large number of vehicle users in the actual application environment. Therefore, in the process of providing services to vehicle users, there is a possibility of a large number of vehicle users registering at the same time. In order to ensure the stability of the traffic information data server, when the corresponding server to be tested is stress tested, the load limit of its registration function needs to be tested.
[0081] In the disclosed embodiment, the registration behavior of a vehicle can be simulated, and the server under test constructs corresponding user information based on the simulated registration behavior and generates a corresponding virtual vehicle user. During the simulated registration process of the virtual vehicle, the registration status of each simulated registration behavior can be monitored.
[0082] Furthermore, a corresponding return code can be set for the registration status of the simulated registration behavior. When performing simulated registration on the server to be tested, the server to be tested can return a return code corresponding to the registration status. By reading and monitoring the return code, the registration status of each simulated registration can be monitored.
[0083] Optionally, the relevant status of the simulated vehicle registration behavior can be controlled through the Remote Dictionary Server (Redis), such as the registration start, registration end, registration quantity and registration frequency within the set registration period, and the relevant feedback information of the simulated registration returned by the server to be tested can be transmitted to the Message Queue (MQ). Based on the registration feedback information in the MQ, the registration status of the simulated registration behavior can be analyzed and judged.
[0084] S402: Perform a registration stress test on the server to be tested according to the registration status of the simulated registration.
[0085] In the embodiment of the present disclosure, the load upper limit of the service to be tested can be determined according to the registration status of the simulated registration.
[0086] Optionally, simulated registrations can be performed in batches within the set registration time.
[0087] Among them, when performing simulated registration, all simulated registration behaviors can be controlled in batches. By controlling the batches, the number of simulated registrations performed simultaneously within the set registration time can be controlled, thereby determining the registration load of the server to be tested.
[0088] Furthermore, in response to the registration status of the previous batch of simulated registrations being normal, the number of simulated registrations to be performed in the next batch is increased until an abnormal simulated registration with an abnormal registration status exists in the current batch of simulated registrations, and the simulated registration is stopped.
[0089] Among them, the number of simulated registration behaviors that are performed simultaneously within the set registration time can be controlled in batches, and the registration status of each simulated registration behavior can be monitored. When it is monitored that the registration status corresponding to each simulated registration behavior in the previous batch is normal, it can be judged that the number of simulated registration behaviors that are performed simultaneously in the previous batch is less than the registration load limit of the server to be tested.
[0090] In order to obtain the load limit of the simulated registration of the server to be tested, the number of simulated registrations performed simultaneously within the set registration period can be increased based on the number of simulated behaviors participating in the simulated registration in the previous batch, and simulated registrations can be performed based on the increased number within the set registration period. At the same time, the registration status of each simulated registration is monitored until an abnormal simulated registration with an abnormal simulated registration status is detected in the simulated registrations of the current batch.
[0091] Among them, when there is an abnormal simulated registration in the registration status, it can be judged that the number of simulated registration behaviors performed simultaneously in the current batch within the set registration time exceeds the load limit of the server to be tested, and the current registration stress test can be stopped.
[0092] Furthermore, based on the number of abnormal simulated registrations, a target number of registrations with normal registration status within a set registration time period is obtained.
[0093] Among them, based on the number of abnormal simulated registrations and the number of simulated behaviors participating in the simulated registration in the current batch, the target number of registrations with normal registration status in the simulated behaviors that perform simulated registrations simultaneously within the set registration time period in the current batch can be obtained.
[0094] Furthermore, the registration load value of the server to be tested is determined according to the target registration quantity, and a registration stress test report of the server to be tested is generated.
[0095] In the embodiment of the present disclosure, the target number of registrations in the current batch with normal registration status within the set registration time is the current registration load value of the server to be tested.
[0096] It can be understood that based on the current performance of the server to be tested, the load and the number of simulated registration behaviors corresponding to the load value can be loaded simultaneously within the set registration time, and a stable registration service can be provided for the number of simulated registration behaviors corresponding to the load value, thereby constructing a corresponding number of user information and establishing a data service provision relationship with a corresponding number of virtual vehicles.
[0097] Furthermore, based on the acquired load value of the server to be tested, a registration stress test report for performing a registration stress test on the server to be tested is generated, wherein relevant information of the stress test on the server to be tested can be displayed in the registration stress test report.
[0098] The stress testing method proposed in this disclosure simulates vehicle registration behavior and monitors the registration status of each simulated registration. Based on the simulated registration status, a registration stress test is performed on the server under test. Based on the test results, the registration load value of the server under test is obtained and a corresponding registration load report is generated. In this disclosure, a batch control method is used to perform registration stress testing on the server under test, improving the accuracy of the obtained registration load value for the server under test and generating a corresponding registration stress test report, providing support for subsequent registration performance optimization of the server under test.
[0099] Furthermore, during the stress test of the server to be tested, the virtual vehicle needs to be authorized after registration. During the authorization process, the authorization function of the server to be tested can be stress tested. Figure 5 understand, Figure 5 FIG. 1 is a flow chart of a pressure testing method according to another embodiment of the present disclosure. Figure 5 As shown, the method includes:
[0100] S501 , generating a random key for a virtual vehicle, performing authorization operations on the virtual vehicle based on the random key, and monitoring the authorization status of the virtual vehicle.
[0101] In implementation, when the traffic information data server provides services to a vehicle, it needs to configure the corresponding secret key for the vehicle and authorize the secret key to the corresponding vehicle. The vehicle can read the traffic information data sent by the server based on the obtained secret key.
[0102] In the embodiment of the present disclosure, the server to be tested needs to generate a random key and authorize the generated random key to the corresponding virtual vehicle. By simulating the interaction between the traffic information data providing server and the vehicle user in the actual application environment, a stress test of the key authorization part of the server to be tested is implemented.
[0103] Furthermore, during the process of random key authorization for a virtual vehicle, the authorization status of the virtual vehicle can be monitored. A corresponding return code can be set based on the random key authorization. When the random key authorization of the virtual vehicle is successful, the virtual vehicle can transmit the corresponding return code to the server under test. By monitoring the transmission of this return code, the authorization status of the virtual vehicle can be monitored.
[0104] Optionally, the random key authorization of the virtual vehicle can be controlled by the Remote Dictionary Server (Redis), which can include the start of authorization, the end of authorization, the authorization amount and authorization frequency within the set authorization period, etc., and the authorization feedback information returned by the server to be tested is transmitted to the message queue (Message Queue, MQ). By reading the authorization feedback information in the MQ, the authorization status of the virtual vehicle can be analyzed and judged.
[0105] S502: Perform an authorization stress test on the server to be tested according to the authorization status of the virtual vehicle.
[0106] In the embodiment of the present disclosure, the stress test result of the authorization function of the server to be tested can be judged according to the authorization status of the virtual vehicle.
[0107] Optionally, the random keys may be authorized to corresponding virtual vehicles in batches within a set authorization period.
[0108] The generated random keys may be divided into multiple batches, and starting from one of the batches, the random keys may be authorized to the corresponding virtual vehicles within a set authorization period.
[0109] Furthermore, in response to the normal authorization status of the virtual vehicles in the previous batch, the number of virtual vehicles for random key authorization in the next batch is increased until there is an abnormal authorization with an abnormal authorization status in the virtual vehicles in the current batch, and the random key is stopped from being authorized to the corresponding virtual vehicle.
[0110] In the disclosed embodiment, the authorization status of the corresponding virtual vehicles can be monitored during the random key authorization process for each batch. If the random key for each virtual vehicle in the previous batch is successfully authorized, it can be determined that the number of random keys or virtual vehicles in the previous batch that simultaneously participated in the authorization stress test is less than the authorization load limit of the server under test.
[0111] The number of random keys can be increased before the start of the next batch of authorization, and the increased number of random keys can be controlled to be authorized to the corresponding virtual vehicles within the set authorization period. At the same time, the authorization status of each virtual vehicle is monitored. When a virtual vehicle with an abnormal authorization status is identified, it can be determined that the number of random keys or virtual vehicles in the current batch that simultaneously participate in the authorization stress test within the set authorization period exceeds the authorization load limit of the server to be tested.
[0112] In this scenario, the authorization stress test on the server to be tested can be stopped by stopping authorization of the random key to the corresponding virtual vehicle.
[0113] Furthermore, based on the number of abnormal authorizations, a target number of authorizations with normal authorization status within a set authorization time period is obtained.
[0114] In the disclosed embodiment, the number of random keys or virtual vehicles in normal authorization status can be obtained from the number of random keys or virtual vehicles in the current batch that simultaneously participate in the authorization stress test of the server to be tested within the set authorization time period, as the corresponding target authorization number.
[0115] Among them, the target authorization number can be determined by deleting the number of abnormally authorized random keys or virtual vehicles from the number of random keys or virtual vehicles in the current batch that simultaneously participate in the authorization stress test of the server to be tested within the set authorization time.
[0116] Furthermore, according to the target authorization quantity, the authorization load value of the server to be tested is determined, and an authorization stress test report of the server to be tested is generated.
[0117] In the embodiment of the present disclosure, the target authorization quantity is the authorized load upper limit of the current server to be tested, and the authorized load upper limit can be used as the authorized load value of the server to be tested.
[0118] Furthermore, a corresponding authorization stress test report may be generated based on the authorization load value and the authorization stress test of the server to be tested, and relevant information of the authorization stress test performed on the server to be tested may be displayed in the report.
[0119] The stress testing method proposed in this disclosure generates a corresponding random key for a virtual vehicle and controls the random key in batches to authorize the corresponding virtual vehicle within a set authorization duration. During the authorization process, the authorization status of each virtual vehicle is monitored, thereby implementing an authorization stress test on the server under test. In this disclosure, the authorization stress test of the server under test is performed through a batch control method, which improves the accuracy of the authorization load value obtained for the server under test and generates a corresponding authorization stress test report, providing support for subsequent optimization of the authorization performance of the server under test.
[0120] In the above embodiment, the traffic information sent by the server to be tested can be generated by a virtual pressure test sample, wherein the virtual pressure test sample can be combined with Figure 6 Further understanding, Figure 6 FIG. 1 is a flow chart of a pressure testing method according to another embodiment of the present disclosure. Figure 6 As shown, the method includes:
[0121] S601: Construct a road simulation event and generate a virtual test sample according to the road simulation event, wherein the virtual test sample is used to generate traffic information transmitted between the server to be tested and the virtual vehicle.
[0122] In practice, when stress testing a traffic information data server, a large number of stress test samples are required. In an actual environment, it is difficult to obtain real stress test samples.
[0123] In the disclosed embodiment, corresponding road simulation events can be constructed by simulating events that may occur in a real traffic environment, and then generated into virtual test samples required for stress testing of the server to be tested.
[0124] Furthermore, the simulated road events can be sent to the server to be tested, and the server to be tested converts them into corresponding traffic information and transmits them to the virtual vehicle, thereby achieving stress testing of the server to be tested.
[0125] Among them, simulated road events may include events that may occur in a real traffic environment.
[0126] For example, based on the changes in traffic lights in an actual traffic environment, corresponding signal light simulation events can be generated. These events simulate the alternating lighting of each color signal light, and set relevant information such as the duration of each color's illumination. Furthermore, corresponding signal light virtual test samples are generated based on the signal light simulation events and transmitted to the server under test. Based on the received signal light simulation events, the server under test converts the signal light traffic information into information that can be read by a virtual vehicle and transmits it to a properly authorized virtual vehicle, thereby stress testing the server under test.
[0127] For example, based on possible traffic accidents in real-world traffic environments, corresponding roadside simulation events can be generated. These simulated roadside accidents, which could result from vehicle collisions, can then be simulated. Furthermore, corresponding roadside virtual test samples are generated based on these roadside simulation events and transmitted to the server under test. Based on the received roadside simulation events, the server under test converts roadside traffic information readable by a virtual vehicle and transmits it to a properly authorized virtual vehicle, thereby stress-testing the server under test.
[0128] The stress testing method proposed in this disclosure provides virtual test samples for the server under test by constructing simulated road events. This generates sufficient virtual test samples for the stress testing of the server under test, enabling effective stress testing of the server under test and optimizing the stress testing effect of the server under test.
[0129] In the implementation, a monitoring environment corresponding to the server to be tested can be constructed to monitor the stress test of the server to be tested. The construction of the monitoring environment and the monitoring of the stress test can be combined with Figure 7 Further understanding, Figure 7 FIG. 1 is a flow chart of a pressure testing method according to another embodiment of the present disclosure. Figure 7 As shown, the method includes:
[0130] S701: Build an initial monitoring environment for stress testing, render road simulation events into the initial monitoring environment, and generate a target monitoring environment for the server to be tested.
[0131] In the embodiment of the present disclosure, there is an initialization monitoring environment for the stress test of the server to be tested. According to the differences in the stress tests performed on each batch, the corresponding events or related information can be rendered into the initialization monitoring environment to generate a target monitoring environment corresponding to the stress test of each batch of the server to be tested.
[0132] In some implementations, it may be possible to determine whether the current stress test is proceeding normally by monitoring the traffic information received by the virtual vehicle.
[0133] Furthermore, during the current stress test process, simulated road events corresponding to the traffic information sent by the server to be tested to the virtual vehicle can be rendered into the monitoring environment, thereby generating a corresponding target monitoring environment.
[0134] In order to achieve effective monitoring of the stress test of the server to be tested, the target monitoring environment can be constructed based on the actual vehicle operating environment.
[0135] S702 : generating a virtual driving trajectory of the virtual vehicle in the target monitoring environment according to the virtual position of the virtual vehicle, and monitoring traffic information transmitted from the server to be tested and received by the virtual vehicle.
[0136] In the embodiment of the present disclosure, the virtual vehicles have set planned routes, and a virtual driving trajectory corresponding to each virtual vehicle can be generated in the target monitoring environment according to the virtual position corresponding to the virtual vehicle.
[0137] When a simulated road event occurs on the virtual vehicle's virtual driving trajectory, the traffic information sent by the server under test, received by the virtual vehicle, can be used to determine whether the current stress test status of the server under test is normal. The target monitoring environment can switch monitoring perspectives, allowing users to monitor traffic information received by a virtual vehicle by entering its driving perspective.
[0138] Optionally, the traffic information received by each virtual vehicle can be transmitted to a message queue (MessageQueue, MQ), and after reading the traffic information in the MQ, the traffic information in the MQ can be stored in a time series database (InfluxDB), and aggregate analysis can be performed based on the timestamp corresponding to each traffic information, thereby realizing analysis and judgment of the receiving status of the virtual vehicle.
[0139] It should be noted that, in the target monitoring environment, the virtual position of the virtual vehicle can be rendered through WebSocket to generate a corresponding virtual driving trajectory, and the corresponding vehicle operation effect of the virtual vehicle can be generated.
[0140] S703 , adjusting the number of virtual vehicles participating in the stress test according to the matching status between the road simulation event and the traffic information received by the virtual vehicle, and controlling the progress of the stress test.
[0141] In the disclosed embodiment, the status of the current stress test may be determined based on the matching between the traffic information received by the virtual vehicle and the simulated road events on its corresponding virtual driving trajectory.
[0142] As one possibility, when the reading and display results of the traffic information received by the virtual vehicle are inconsistent with the simulated road events on its corresponding virtual driving trajectory, it can be judged that the current virtual vehicle receiving state is abnormal, where the abnormal situation may include the abnormal situation of the information transmission channel between the server to be tested and the virtual vehicle, and may also include the abnormal situation of the virtual vehicle's abnormality in the reading process of the received traffic information.
[0143] Furthermore, it can be determined that the number of virtual vehicles simultaneously participating in the stress test of the server to be tested in the scenario exceeds the load upper limit of the server to be tested. At this time, the stress test of the server to be tested can be stopped by controlling the target monitoring environment, and the current load value of the server to be tested can be determined through the scenario.
[0144] As another possibility, when the read and displayed results of the traffic information received by the virtual vehicle are consistent with the simulated road events on its corresponding virtual driving trajectory, it can be determined that the current receiving status of the virtual vehicle is normal.
[0145] Furthermore, it can be determined that in this scenario, the number of virtual vehicles simultaneously participating in the stress test of the server to be tested is less than the load upper limit of the server to be tested. Under the control of the target monitoring environment, the number of virtual vehicles simultaneously participating in the stress test of the server to be tested can continue to be increased, and through the control of the target monitoring environment, the server to be tested continues to be stress tested based on the increased number of virtual vehicles until an abnormal virtual vehicle with an abnormal receiving status appears.
[0146] The stress testing method proposed in the present disclosure renders the simulated road events into the initialized monitoring environment to generate a corresponding target monitoring environment. Furthermore, a virtual driving trajectory corresponding to the virtual vehicle is generated in the target monitoring environment, and the traffic information sent by the server to be tested and received by the virtual vehicle is monitored. According to the matching results between the monitored traffic information of the virtual vehicle and the simulated road events, the relevant status of the stress test of the current server to be tested is judged, thereby realizing the adjustment of the number of virtual vehicles and the progress control of the stress test. In the present disclosure, by constructing a monitoring environment for the stress test of the server to be tested, the monitoring of the stress test is realized, and the controllability of the stress test process of the server to be tested is optimized, thereby improving the accuracy and efficiency of the stress test.
[0147] Furthermore, the performance of the server to be tested can be optimized according to the target stress test report of the server to be tested. Figure 8 understand, Figure 8 FIG. 1 is a flow chart of a pressure testing method according to another embodiment of the present disclosure. Figure 8 As shown, the method includes:
[0148] S801: Generate a load adjustment strategy for the server to be tested according to the target stress test report.
[0149] In the embodiment of the present disclosure, the load defect of the current server to be tested can be obtained through the target stress test report of the server to be tested.
[0150] Based on the specific type and detailed information of the load defect, an adjustment optimization method for the function of the server to be tested corresponding to the load defect can be determined, thereby generating a load adjustment strategy for the server to be tested.
[0151] S802: Execute a load adjustment strategy to optimize the load of the server to be tested.
[0152] Furthermore, the execution of the load adjustment strategy is controlled through relevant instructions, and based on the relevant adjustment method in the load adjustment strategy, the relevant parameters of the server to be tested are adjusted, thereby achieving load optimization of the server to be tested.
[0153] Optionally, after executing the load adjustment strategy, a set number of virtual vehicles can be controlled to continue stress testing the server to be tested, and the execution of the load adjustment strategy can be judged based on the results of the stress test to determine whether the load performance of the server to be tested has been adjusted to the expected effect.
[0154] The stress testing method proposed in the present disclosure optimizes the performance of the server to be tested through the target stress test report of the server to be tested, thereby enhancing the pertinence and effectiveness of the load performance optimization of the server to be tested.
[0155] Optionally, the stress test method of the server to be tested in the above embodiment can be implemented by building a stress test simulation platform, which can be combined with Figure 9 Further understanding, Figure 9 FIG. 1 is a structural diagram of a pressure testing platform according to an embodiment of the present disclosure. Figure 9 As shown, where:
[0156] The generation of virtual test samples can be achieved by simulating road event units.
[0157] The registration service unit is used to simulate the registration of virtual vehicles and to perform a stress test on the registration load of the server to be tested.
[0158] The random key is used to authorize the virtual vehicle through the authorization service unit, and the authorization load of the server to be tested is stress tested at the same time.
[0159] According to the monitoring environment unit, the rendering generation of the target monitoring environment and the monitoring of the stress test are realized.
[0160] According to the stress test data processing unit, relevant data processing of the stress test of the server to be tested is realized, thereby obtaining the load value of the server to be tested and generating a corresponding target stress test report.
[0161] Simulate the registration behavior of the vehicle and generate a virtual vehicle user of the server to be tested. Control the virtual vehicle to simultaneously receive traffic information sent by the server to be tested and monitor the receiving status of the virtual vehicle. When it is identified that there is a virtual vehicle with an abnormal receiving status among the virtual vehicles participating in the stress test, the stress test is judged to be over, and the load value of the server to be tested is obtained based on the receiving status of the virtual vehicles participating in the stress test. In the present disclosure, by simulating the registration of vehicle users and the reception of traffic information, an effective stress test of the server to be tested is achieved. Through the load value of the server to be tested, the load upper limit of the server to be tested is obtained, and the stability of the server to be tested is controlled, thereby identifying the load defects of the server to be tested, and then achieving effective optimization of the performance of the server to be tested.
[0162] Corresponding to the pressure testing methods proposed in the above-mentioned embodiments, an embodiment of the present disclosure also proposes a pressure testing device. Since the pressure testing device proposed in the embodiment of the present disclosure corresponds to the pressure testing methods proposed in the above-mentioned embodiments, the implementation method of the above-mentioned pressure testing method is also applicable to the pressure testing device proposed in the embodiment of the present disclosure and will not be described in detail in the following embodiments.
[0163] Figure 10 FIG. 1 is a structural diagram of a pressure testing device according to an embodiment of the present disclosure. Figure 10As shown, the stress testing device 100 includes a registration module 11, a stress testing module 12, a control module 13, an analysis module 14, and a simulation module 15, wherein:
[0164] A registration module 11 is used to simulate vehicle registration behavior and generate a virtual vehicle for the server to be tested based on the vehicle registration behavior;
[0165] The stress testing module 12 is used to control the virtual vehicle to simultaneously receive traffic information sent by the server to be tested, and monitor the receiving status of the virtual vehicle to perform stress testing on the server to be tested;
[0166] A control module 13 is configured to stop the stress test in response to the presence of an abnormal virtual vehicle with an abnormal reception state among the virtual vehicles participating in the stress test;
[0167] The analysis module 14 is configured to obtain a load value of the server to be tested according to the receiving status of the virtual vehicle participating in the stress test.
[0168] In the embodiment of the present disclosure, the stress testing module 12 is further used to: control some virtual vehicles in batches to receive the traffic information within the set test duration; in response to the normal receiving status of the virtual vehicles in the previous batch participating in the stress test, increase the number of the virtual vehicles participating in the stress test in the next batch, until the abnormal virtual vehicle with abnormal receiving status in the current batch of virtual vehicles participating in the stress test stops the stress test.
[0169] In the embodiment of the present disclosure, the analysis module 14 is also used to: obtain the number of normal virtual vehicles with normal receiving status within the set test duration based on the number of abnormal virtual vehicles; determine the load value of the server to be tested based on the number of normal virtual vehicles, and generate a target stress test report for the server to be tested.
[0170] In the embodiment of the present disclosure, the control module 13 is also used to: in response to the server to be tested not receiving feedback information from the virtual vehicle, determine that the receiving state of the virtual vehicle is abnormal; or, identify the traffic information displayed by the virtual vehicle, and in response to the display of traffic information not matching the traffic information sent by the server to be tested, determine that the receiving state of the virtual vehicle is abnormal.
[0171] In the disclosed embodiment, the registration module 11 is further configured to: monitor the registration status of each simulated registration during the simulation of vehicle registration behavior; and perform a registration stress test on the server to be tested based on the registration status of the simulated registration.
[0172] In the disclosed embodiment, the registration module 11 is further configured to: perform simulated registrations in batches within a set registration duration; in response to the registration status of the simulated registrations performed in the previous batch being normal, increase the number of simulated registrations performed in the next batch, and stop the simulated registrations until an abnormal simulated registration with an abnormal registration status is present in the current batch of simulated registrations. Based on the number of abnormal simulated registrations, obtain a target number of registrations with normal registration status within the set registration duration; based on the target number of registrations, determine the registration load value of the server to be tested, and generate a registration stress test report for the server to be tested.
[0173] In the embodiment of the present disclosure, the stress testing module 12 is further used to: generate a random key for the virtual vehicle, perform authorization operations on the virtual vehicle based on the random key, and monitor the authorization status of the virtual vehicle; and perform authorization stress testing on the server to be tested according to the authorization status of the virtual vehicle.
[0174] In the embodiment of the present disclosure, the stress testing module 12 is also used to: control the authorization of the random key to the corresponding virtual vehicle in batches within the set authorization time; in response to the normal authorization status of the virtual vehicles in the previous batch, increase the number of the virtual vehicles for random key authorization in the next batch, until there is an abnormal authorization with an abnormal authorization status in the virtual vehicles in the current batch, and stop authorizing the random key to the corresponding virtual vehicle; according to the number of abnormal authorizations, obtain the target number of authorizations with normal authorization status within the set authorization time; according to the target number of authorizations, determine the authorization load value of the server to be tested, and generate an authorization stress test report for the server to be tested.
[0175] In the embodiment of the present disclosure, the device also includes: a simulation module 15, which is used to construct a road simulation event and generate a virtual test sample based on the road simulation event, wherein the virtual test sample is used to generate the traffic information transmitted between the server to be tested and the virtual vehicle.
[0176] In the embodiment of the present disclosure, the control module 13 is also used to: construct an initialization monitoring environment for the stress test, and render the road simulation event into the initialization monitoring environment to generate a target monitoring environment for the server to be tested; generate a virtual driving trajectory of the virtual vehicle in the target monitoring environment according to the virtual position of the virtual vehicle, and monitor the traffic information transmitted by the server to be tested and received by the virtual vehicle; adjust the number of virtual vehicles participating in the stress test according to the matching status between the road simulation event and the traffic information received by the virtual vehicle, and control the progress of the stress test.
[0177] In the embodiment of the present disclosure, the analysis module 14 is further configured to: generate a load adjustment strategy for the server to be tested according to the target stress test report; and execute the load adjustment strategy to optimize the load of the server to be tested.
[0178] The stress testing device proposed in the present disclosure simulates the registration behavior of a vehicle and generates a virtual vehicle user of the server to be tested. It controls the virtual vehicle to simultaneously receive traffic information sent by the server to be tested and monitors the receiving status of the virtual vehicle. When a virtual vehicle with an abnormal receiving status is identified among the virtual vehicles participating in the stress test, the stress test is determined to be over and the load value of the server to be tested is obtained based on the receiving status of the virtual vehicles participating in the stress test. In the present disclosure, by simulating the registration of vehicle users and the reception of traffic information, an effective stress test of the server to be tested is achieved. Through the load value of the server to be tested, the load upper limit of the server to be tested is obtained, and the stability of the server to be tested is controlled, thereby identifying the load defects of the server to be tested and achieving effective optimization of the performance of the server to be tested.
[0179] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0180] Figure 11 A schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0181] like Figure 11 As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1109 into a random access memory (RAM) 1103. Various programs and data required for the operation of the device 1100 can also be stored in the RAM 1103. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0182] Various components in device 1100 are connected to I / O interface 1105, including an input unit 1106, such as a keyboard and mouse; an output unit 1107, such as various types of displays and speakers; a storage unit 1109, such as a magnetic disk and optical disk; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows device 1100 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0183] The computing unit 1101 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the stress testing method. For example, in some embodiments, the stress testing method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 1109. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the stress testing method described above can be performed. Alternatively, in other embodiments, the computing unit 1101 can be configured to perform the stress testing method by any other appropriate means (e.g., by means of firmware).
[0184] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0185] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0186] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0187] To propose interactions with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to propose interactions with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0188] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0189] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0190] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0191] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A stress testing method, wherein: The method comprises: Simulating vehicle registration behavior, and generating a virtual vehicle for the server to be tested based on the vehicle registration behavior; Controlling the virtual vehicle to simultaneously receive traffic information sent by the server to be tested, and monitoring the receiving status of the virtual vehicle to perform a stress test on the server to be tested; In response to the presence of an abnormal virtual vehicle with an abnormal reception state among the virtual vehicles participating in the stress test, stopping the stress test; Obtaining a load value of the server to be tested according to the receiving status of the virtual vehicle participating in the stress test; The simulated vehicle registration behavior includes: Monitor the registration status of each simulated registration during the simulation of vehicle registration behavior; Perform a registration stress test on the server to be tested according to the registration status of the simulated registration.
2. The method according to claim 1, wherein The controlling the virtual vehicle to simultaneously receive the traffic information sent by the server to be tested, and monitoring the receiving status of each virtual vehicle to perform a stress test on the server to be tested includes: Within the set test duration, controlling some virtual vehicles in batches to receive the traffic information; In response to the receiving status of the virtual vehicles in the previous batch participating in the stress test being normal, the number of the virtual vehicles in the next batch participating in the stress test is increased until the stress test is stopped by an abnormal virtual vehicle with an abnormal receiving status in the current batch of virtual vehicles participating in the stress test.
3. The method according to claim 2, wherein: The acquiring, according to the receiving state of the virtual vehicle participating in the stress test, a load value of the server to be tested, comprises: According to the number of abnormal virtual vehicles, the number of normal virtual vehicles in normal receiving state within the set test time is obtained; The load value of the server to be tested is determined according to the normal number of virtual vehicles, and a target stress test report of the server to be tested is generated.
4. The method according to claim 3, wherein: The determination of abnormal reception status of the virtual vehicle includes: In response to the server to be tested not receiving the feedback information of the virtual vehicle, determining that the receiving state of the virtual vehicle is abnormal; or, Traffic information displayed by the virtual vehicle is identified, and in response to the displayed traffic information not matching the traffic information sent by the server to be tested, it is determined that a receiving state of the virtual vehicle is abnormal.
5. The method according to claim 1, wherein The performing a registration stress test on the server to be tested according to the registration status of the simulated registration includes: Conduct simulated registration in batches within the set registration time; In response to the registration status of the simulated registrations performed in the previous batch being normal, increasing the number of simulated registrations to be performed in the next batch until an abnormal simulated registration with an abnormal registration status exists in the simulated registrations of the current batch, and then stopping the simulated registrations; According to the number of abnormal simulated registrations, a target number of registrations with normal registration status within the set registration time period is obtained; According to the target registration quantity, the registration load value of the server to be tested is determined, and a registration stress test report of the server to be tested is generated.
6. The method according to claim 5, wherein: Before controlling the virtual vehicle to simultaneously receive traffic information sent by the server to be tested, the method further includes: generating a random key for the virtual vehicle, performing authorization operations on the virtual vehicle based on the random key, and monitoring the authorization status of the virtual vehicle; According to the authorization status of the virtual vehicle, an authorization stress test is performed on the server to be tested.
7. The method according to claim 6, wherein: The performing of an authorization stress test on the server to be tested according to the authorization status of the virtual vehicle includes: Within the set authorization time, the random key is authorized to the corresponding virtual vehicle in batches; In response to the authorization status of the virtual vehicles in the previous batch being normal, increasing the number of the virtual vehicles in the next batch for random key authorization, until abnormal authorization with an abnormal authorization status occurs in the virtual vehicles in the current batch, and stopping authorization of the random key to the corresponding virtual vehicle; According to the number of abnormal authorizations, the target number of authorizations in normal authorization status within the set authorization time period is obtained; According to the target authorization quantity, the authorization load value of the server to be tested is determined, and an authorization stress test report of the server to be tested is generated.
8. The method according to claim 1, wherein Before performing the stress test on the server to be tested, the method further includes: A road simulation event is constructed, and a virtual test sample is generated according to the road simulation event, wherein the virtual test sample is used to generate the traffic information transmitted between the server to be tested and the virtual vehicle.
9. The method according to any one of claims 1 to 8, wherein: During the process of performing the stress test on the server to be tested, the method further includes: Constructing an initial monitoring environment for the stress test, and rendering road simulation events into the initial monitoring environment to generate a target monitoring environment for the server to be tested; generating a virtual driving trajectory of the virtual vehicle in the target monitoring environment according to the virtual position of the virtual vehicle, and monitoring the traffic information transmitted by the server to be tested and received by the virtual vehicle; According to the matching status between the road simulation event and the traffic information received by the virtual vehicle, the number of virtual vehicles participating in the stress test is adjusted, and the progress of the stress test is controlled.
10. The method according to claim 3, wherein: Also includes: Generating a load adjustment strategy for the server to be tested according to the target stress test report; The load adjustment strategy is executed to optimize the load of the server to be tested.
11. A pressure testing device comprising: A registration module, configured to simulate vehicle registration behavior and generate a virtual vehicle for the server to be tested based on the vehicle registration behavior; A stress testing module, configured to control the virtual vehicle to simultaneously receive traffic information sent by the server to be tested, and monitor the receiving status of the virtual vehicle, so as to perform a stress test on the server to be tested; a control module, configured to stop the stress test in response to an abnormal virtual vehicle having the abnormal reception state among the virtual vehicles participating in the stress test; an analysis module, configured to obtain a load value of the server to be tested according to the receiving status of the virtual vehicle participating in the stress test; The registration module is further used to: Monitor the registration status of each simulated registration during the simulation of vehicle registration behavior; Perform a registration stress test on the server to be tested according to the registration status of the simulated registration.
12. The device according to claim 11, wherein The stress measurement module is further used to: Within the set test duration, controlling some virtual vehicles in batches to receive the traffic information; In response to the receiving status of the virtual vehicles in the previous batch participating in the stress test being normal, the number of the virtual vehicles in the next batch participating in the stress test is increased until the stress test is stopped by an abnormal virtual vehicle with an abnormal receiving status in the current batch of virtual vehicles participating in the stress test.
13. The device according to claim 12, wherein The analysis module is further configured to: According to the number of abnormal virtual vehicles, the number of normal virtual vehicles in normal receiving state within the set test time is obtained; The load value of the server to be tested is determined according to the normal number of virtual vehicles, and a target stress test report of the server to be tested is generated.
14. The device according to claim 13, wherein For control modules, also used for: In response to the server to be tested not receiving the feedback information of the virtual vehicle, determining that the receiving state of the virtual vehicle is abnormal; or, Traffic information displayed by the virtual vehicle is identified, and in response to the displayed traffic information not matching the traffic information sent by the server to be tested, it is determined that a receiving state of the virtual vehicle is abnormal.
15. The device according to claim 11, wherein The registration module is further used to: Conduct simulated registration in batches within the set registration time; In response to the registration status of the simulated registrations performed in the previous batch being normal, increasing the number of simulated registrations to be performed in the next batch until an abnormal simulated registration with an abnormal registration status exists in the simulated registrations of the current batch, and then stopping the simulated registrations; According to the number of abnormal simulated registrations, a target number of registrations with normal registration status within the set registration time period is obtained; According to the target registration quantity, the registration load value of the server to be tested is determined, and a registration stress test report of the server to be tested is generated.
16. The device according to claim 15, wherein The stress measurement module is further used to: generating a random key for the virtual vehicle, performing authorization operations on the virtual vehicle based on the random key, and monitoring the authorization status of the virtual vehicle; According to the authorization status of the virtual vehicle, an authorization stress test is performed on the server to be tested.
17. The device according to claim 16, wherein The stress measurement module is further used to: Within the set authorization time, the random key is authorized to the corresponding virtual vehicle in batches; In response to the authorization status of the virtual vehicles in the previous batch being normal, increasing the number of the virtual vehicles in the next batch for random key authorization, until abnormal authorization with an abnormal authorization status occurs in the virtual vehicles in the current batch, and stopping authorization of the random key to the corresponding virtual vehicle; According to the number of abnormal authorizations, the target number of authorizations in normal authorization status within the set authorization time period is obtained; According to the target authorization quantity, the authorization load value of the server to be tested is determined, and an authorization stress test report of the server to be tested is generated.
18. The device according to claim 11, wherein The device further comprises: The simulation module is used to construct a road simulation event and generate a virtual test sample according to the road simulation event, wherein the virtual test sample is used to generate the traffic information transmitted between the server to be tested and the virtual vehicle.
19. The device according to any one of claims 11 to 18, wherein: The control module is further configured to: Constructing an initial monitoring environment for the stress test, and rendering road simulation events into the initial monitoring environment to generate a target monitoring environment for the server to be tested; generating a virtual driving trajectory of the virtual vehicle in the target monitoring environment according to the virtual position of the virtual vehicle, and monitoring the traffic information transmitted by the server to be tested and received by the virtual vehicle; According to the matching status between the road simulation event and the traffic information received by the virtual vehicle, the number of virtual vehicles participating in the stress test is adjusted, and the progress of the stress test is controlled.
20. The apparatus according to claim 13, wherein The analysis module is further configured to: Generating a load adjustment strategy for the server to be tested according to the target stress test report; The load adjustment strategy is executed to optimize the load of the server to be tested.
21. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.
23. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Pressure test method and device
CN108733545A
Network management server testing method, device and system
CN109348498A