A WEB application-based automatic performance testing method, system and storage medium
Patent Information
- Application Number
- CN202310119013.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-01
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-02-01
AI Technical Summary
[0002]目前,新能源汽车在人们的生活中变得越来越普遍,随之而来的充电桩也越来越多,充电桩能够提供快速充电、充电计费等功能,为了保证充电桩提供的功能的正常运行,需要定期通过测试装置对于充电桩的性能进行检测,现有技术可以使得测试装置通过网络与远程服务器通信连接,从而可以从远程服务器下载检测需要的数据,或者将充电桩数据传输给远程服务器进行分析处理,然而,测试装置处于网络中,现有技术较少考虑测试装置与远程服务器之间的通信安全问题,当通信安全问题发生时,甚至会影响到测试装置对于充电桩的性能测试的结果
[0028]在本发明中,首先测试装置通过采集单元与充电桩进行连接,同时收集充电桩数据,并且测试装置的显示单元向用户展示对于充电桩的性能测试类型;其次测试装置的检测单元基于充电桩数据,同时按照用户选定的性能测试类型,针对充电桩执行性能测试步骤以得到性能测试结果;最后测试装置的通信单元将性能测试结果通过网络传输至服务器装置,服务器装置对于性能测试结果进行验证,服务器装置还变更性能测试步骤中的测试参数,测试装置的检测单元根据变更后的测试参数再次执行相应的性能测试步骤。通过本发明不仅能够实现对于充电桩的性能测试,得到准确的测试结果,而且还能够确保测试装置和服务器装置之间的通信安全,提高测试装置的测试结果的可靠性。
Smart Images

Figure CN117527639B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, specifically relating to an automatic performance testing method, system, and storage medium based on web applications. Background Technology
[0002] Currently, new energy vehicles are becoming increasingly common in people's lives, leading to a surge in the number of charging stations. These charging stations offer functions such as fast charging and charging billing. To ensure the normal operation of these functions, their performance needs to be periodically tested using testing devices. Existing technologies allow these testing devices to communicate with remote servers via networks, enabling them to download necessary testing data or transmit charging station data for analysis. However, given that the testing devices are located within a network, existing technologies rarely consider communication security between the testing devices and remote servers. Security breaches can even affect the performance test results of the charging stations. Therefore, this invention provides an automated performance testing method, system, and storage medium based on web applications. Summary of the Invention
[0003] This invention connects charging piles to a testing device. Users can select performance test types on the testing device, which collects charging pile data, performs performance tests, and transmits the results to a server. The server verifies the results, modifies test parameters, and sends data back to the testing device. Communication between the testing device and the server passes through a monitoring device, which manages this communication. This invention aims to achieve automated performance testing of charging piles while ensuring secure communication between the testing device and the server.
[0004] To achieve the aforementioned objectives, this invention provides an automated performance testing method for web applications, which mainly includes the following steps:
[0005] Step 1: The testing device connects to the charging pile through its acquisition unit and collects data from the charging pile. The testing device also displays the performance test types for the charging pile to the user through its display unit by running a web page. The user can manually select the desired performance test type.
[0006] Step 2: The detection unit of the testing device, based on the charging pile data collected by the acquisition unit, and according to the performance test type selected by the user, performs the performance test steps corresponding to the performance test type to obtain the performance test result of the charging pile corresponding to the performance test type.
[0007] Step 3: The communication unit of the testing device transmits the performance test results of the charging pile corresponding to the performance test type to the server device via the network. The server device verifies the performance test results of the charging pile corresponding to the performance test type based on historical big data, and sends the verification results back to the communication unit of the testing device. The display unit of the testing device displays the verification results. The server device also changes the test parameters in the performance test steps corresponding to the performance test type, and sends the changed test parameters back to the communication unit of the testing device. The detection unit of the testing device executes the corresponding performance test steps again according to the changed test parameters.
[0008] As a preferred embodiment of the present invention, a monitoring device is further provided between the testing device and the server device, and the monitoring device is connected to both the testing device and the server device via a network.
[0009] As a preferred embodiment of the present invention, before step three is executed, the monitoring device pre-stores a first monitoring table, a second monitoring table, and a third monitoring table to achieve real-time management of the communication process between the testing device and the server device. The first monitoring table stores different first monitoring rules used by the monitoring device when the testing device sends data to the server device, and preset first risk values corresponding to the different first monitoring rules. The second monitoring table stores different second monitoring rules used by the monitoring device when the server device sends data to the testing device, and preset second risk values corresponding to the different second monitoring rules. The third monitoring table stores different communication event rules used by the monitoring device when the testing device sends data to the server device and when the server device sends data to the testing device, third monitoring rules corresponding to the different communication event rules, and preset third risk values corresponding to the different third monitoring rules.
[0010] As a preferred embodiment of the present invention, step three specifically includes the following steps:
[0011] Step 1: The communication unit of the testing device generates transmission data including the performance test results of the charging pile corresponding to the performance test type, and the communication unit of the testing device sends the transmission data to the monitoring device;
[0012] In the second step, the monitoring device searches for the first monitoring rule corresponding to the transmitted data in the first monitoring table to simultaneously determine the first risk value. Furthermore, the monitoring device searches for the communication event rule and the third monitoring rule corresponding to the transmitted data in the third monitoring table to simultaneously determine the third risk value. The monitoring device also calculates a first total value of the determined first and third risk values, compares the first total value with a preset first total value threshold, and if the first total value is less than the first total value threshold, the monitoring device forwards the transmitted data to the server device. If the first total value is greater than or equal to the first total value threshold, the monitoring device stops forwarding the transmitted data to the server device.
[0013] Third step: The server device receives the transmitted data, verifies the performance test results of the charging pile corresponding to the performance test type, changes the test parameters in the performance test steps corresponding to the performance test type, and generates response data including the verification results and the changed test parameters. The server device also sends the response data to the monitoring device.
[0014] Fourth step: The monitoring device searches for the second monitoring rule corresponding to the response data in the second monitoring table to simultaneously determine the second risk value. The monitoring device also searches for the communication event rule and the third monitoring rule corresponding to the response data in the third monitoring table to simultaneously determine the third risk value. The monitoring device further calculates the determined second and third risk values, as well as the second total value of the first total value, and compares the second total value with a preset second total value threshold. If the second total value is less than the second total value threshold, the monitoring device forwards the response data to the communication unit of the testing device. If the second total value is greater than or equal to the second total value threshold, the monitoring device stops forwarding the response data to the communication unit of the testing device.
[0015] Fifth step: The communication unit of the testing device receives the response data, the display unit of the testing device displays the verification result, and the detection unit of the testing device executes the corresponding performance test steps again according to the changed test parameters.
[0016] As a preferred embodiment of the present invention, the testing device performs the first to fifth steps once during each performance test step in the entire process of performing performance testing on the charging pile.
[0017] As a preferred embodiment of the present invention, the testing device includes the following steps during the entire process of performance testing of the charging pile:
[0018] Step 1: The testing device and the server device pre-store a first flag, and the testing device and the server device set the same initial content for the stored first flag respectively;
[0019] The second step is that when the testing device sends the transmission data to the server device, the transmission data also includes the first flag stored by the testing device. After the server device receives the transmission data, the server device verifies whether the first flag in the transmission data is the same as the first flag stored in its own storage. If they are the same, the server device updates the first flag stored in its own storage according to a preset rule, and at the same time includes the updated first flag in the response data, and sends the response data to the testing device.
[0020] Third, after receiving the response data, the testing device obtains the first flag updated by the server device from the response data, and updates its own stored first flag using the first flag updated by the server device. The testing device also determines whether the conditions for ending the performance test of the charging pile are met. If they are met, all processing ends. Otherwise, when the testing device sends new data to the server device again, it jumps to the previous step to continue processing.
[0021] The present invention also provides an automated performance testing system based on web applications, comprising the following apparatus:
[0022] The testing device includes a data acquisition unit, a display unit, a detection unit, and a communication unit. The data acquisition unit is used to connect to the charging pile and collect charging pile data. The display unit is used to show the user the performance test type of the charging pile and the verification results of the performance test results of the charging pile by the server device. The detection unit is used to perform corresponding performance test steps for the charging pile based on the charging pile data collected by the data acquisition unit and according to the performance test type selected by the user. The communication unit is used to send data to the server device and receive data from the server device.
[0023] The monitoring device is connected to the testing device and the server device via a network, and pre-stores a first monitoring table, a second monitoring table, and a third monitoring table to realize real-time management of the communication process between the testing device and the server device.
[0024] The server device is used to verify the performance test results of the charging piles based on historical big data, change the test parameters in the corresponding performance test steps, and send data to the test device.
[0025] The present invention also provides a computer storage medium storing program instructions, wherein the program instructions, when executed, control the device where the computer storage medium is located to perform any of the methods described above.
[0026] The present invention also provides a processor for running a program, wherein the program, when running, performs the method described in any one of the foregoing descriptions.
[0027] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0028] In this invention, the testing device first connects to the charging pile via a data acquisition unit, simultaneously collecting charging pile data. The display unit of the testing device then shows the user the performance test type for the charging pile. Next, the detection unit of the testing device, based on the charging pile data and according to the user-selected performance test type, executes performance test steps for the charging pile to obtain performance test results. Finally, the communication unit of the testing device transmits the performance test results to a server device via a network. The server device verifies the performance test results and also modifies the test parameters in the performance test steps. The detection unit of the testing device then re-executes the corresponding performance test steps based on the modified test parameters. This invention not only enables performance testing of charging piles and obtains accurate test results but also ensures secure communication between the testing device and the server device, improving the reliability of the test results. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating the steps of an automated performance testing method based on a web application according to the present invention.
[0030] Figure 2 This is a structural diagram of an automatic performance testing system based on a web application according to the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0032] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.
[0033] This invention provides, for example Figure 1 The automated performance testing method for web applications shown is mainly implemented by performing the following steps:
[0034] Step 1: The testing device connects to the charging pile through its acquisition unit and collects data from the charging pile. The testing device also displays the performance test types for the charging pile to the user through its display unit by running a web page. The user can manually select the desired performance test type.
[0035] Step 2: Based on the charging pile data collected by the acquisition unit, the detection unit of the above-mentioned testing device performs the performance test steps corresponding to the performance test type selected by the user to obtain the performance test results of the charging pile corresponding to the performance test type.
[0036] Step 3: The communication unit of the aforementioned testing device transmits the performance test results of the charging pile corresponding to the aforementioned performance test type to the server device via the network. The server device verifies the performance test results of the charging pile corresponding to the aforementioned performance test type based on historical big data, and sends the verification results back to the communication unit of the aforementioned testing device. The display unit of the aforementioned testing device displays the verification results. The server device also changes the test parameters in the performance test steps corresponding to the aforementioned performance test type, and sends the changed test parameters back to the communication unit of the aforementioned testing device. The detection unit of the aforementioned testing device executes the corresponding performance test steps again based on the changed test parameters.
[0037] Specifically, firstly, the testing device's acquisition unit connects to the charging pile to collect charging pile data, such as charging current, charging confirmation signals, and charging billing data. The testing device's display unit, which can be a touchscreen device, displays different performance test types. Performance test types can include simulation tests for charging pile billing control, connection tests for the charging pile's communication interface, and port scanning tests for the charging pile. Users can manually select the desired performance test type for the charging pile. Secondly, the testing device's detection unit executes performance test steps based on the charging pile data and the user-selected performance test type to obtain the performance test results. Finally, the testing device's communication unit... The performance test results are sent to the server device, which verifies them. Simultaneously, the server device modifies the test parameters in the performance test steps. For example, when performing a port scanning test on a charging pile, the modified test parameter could be the port number to be scanned. The server device also sends the verified results and the modified test parameters to the communication unit of the testing device. The display unit of the testing device shows the verified results. If the verified results and the performance test results from the testing device are inconsistent, the server device can remind the user to recheck the performance test results to avoid errors caused by a malfunction in the testing device. The testing device also re-executes the performance test steps using the modified test parameters.
[0038] Furthermore, a monitoring device is also provided between the aforementioned testing device and the aforementioned server device, and the monitoring device is connected to both the aforementioned testing device and the aforementioned server device via a network.
[0039] Furthermore, before executing step three above, the monitoring device pre-stores a first monitoring table, a second monitoring table, and a third monitoring table to achieve real-time management of the communication process between the testing device and the server device. The first monitoring table stores different first monitoring rules used by the monitoring device when the testing device sends data to the server device, and preset first risk values corresponding to the different first monitoring rules. The second monitoring table stores different second monitoring rules used by the monitoring device when the server device sends data to the testing device, and preset second risk values corresponding to the different second monitoring rules. The third monitoring table stores different communication event rules used by the monitoring device when the testing device sends data to the server device and when the server device sends data to the testing device, third monitoring rules corresponding to the different communication event rules, and preset third risk values corresponding to the different third monitoring rules.
[0040] Specifically, because the testing device is located on a network, there is a risk that it may be infected by computer viruses, causing communication security issues between the testing device and the server device. If the testing device is infected with a computer virus, it may cause inaccurate performance test results for the charging pile, such as tampering with the performance test results or incorrect execution of performance test steps, resulting in erroneous performance test results. Therefore, a monitoring device is proposed to be set up between the testing device and the server device to manage the communication between them. In this invention, the communication between the testing device and the server device follows the HTTP protocol, and data is sent and received between the testing device and the server device according to the HTTP protocol. Specifically, the monitoring device pre-stores a first monitoring table, a second monitoring table, and a third monitoring table, so that when the testing device communicates with the server, the monitoring device can promptly detect abnormal communication based on the contents of the first monitoring table, the second monitoring table, and the third monitoring table. The first monitoring table stores a first monitoring rule and a corresponding first risk value; the second monitoring table stores a second monitoring rule and a corresponding second risk value; and the third monitoring table stores a communication event rule, a corresponding third monitoring rule, and a corresponding third risk value. The higher the risk value, the greater the probability of abnormal communication. The contents of the first monitoring table, the second monitoring table, and the third monitoring table are all pre-set according to the actual application scenario of the present invention. Because the communication between the test device and the server device follows the HTTP protocol, the format of the data sent by the test device to the server device is the same as the format of the HTTP request message, and the format of the response data sent by the server device to the test device is the same as the format of the HTTP response message. The first monitoring rule is used to check the sent data, and the second monitoring rule is used to check the response data. For example, a certain first monitoring rule is that the Accept-Charset information in the sent data is inconsistent with the standard Accept-Charset information, and a certain second monitoring rule is that the response data is missing Content-Length information. In addition, communication event rules are used to check the sent data and response data. When a communication event rule is met, it means that a corresponding communication event has occurred. This communication event is the communication between the test device and the server device before the abnormal communication occurred. The third monitoring rule is similar to the first and second monitoring rules. For example, a certain communication event rule is that the request mode information in the sent data is delete, and the corresponding third monitoring rule is that the sent data is missing Accept-Charset information.
[0041] Furthermore, step three above specifically includes the following steps:
[0042] Step 1: The communication unit of the above-mentioned testing device generates transmission data including the performance test results of the charging pile corresponding to the above-mentioned performance test type, and the communication unit of the above-mentioned testing device sends the transmission data to the above-mentioned monitoring device.
[0043] The second step involves the monitoring device searching for the first monitoring rule corresponding to the transmitted data in the first monitoring table to simultaneously determine the first risk value. The monitoring device also searches for the communication event rule and the third monitoring rule corresponding to the transmitted data in the third monitoring table to simultaneously determine the third risk value. Furthermore, the monitoring device calculates a first total value of the determined first and third risk values, compares the first total value with a preset first total value threshold, and if the first total value is less than the first total value threshold, the monitoring device forwards the transmitted data to the server device. If the first total value is greater than or equal to the first total value threshold, the monitoring device stops forwarding the transmitted data to the server device.
[0044] Third, the server device receives the transmitted data, verifies the performance test results of the charging pile corresponding to the performance test type, changes the test parameters in the performance test steps corresponding to the performance test type, and generates response data including the verification results and the changed test parameters. The server device also sends the response data to the monitoring device.
[0045] Fourth step: The monitoring device searches for the second monitoring rule corresponding to the response data in the second monitoring table to simultaneously determine the second risk value. The monitoring device also searches for the communication event rule and the third monitoring rule corresponding to the response data in the third monitoring table to simultaneously determine the third risk value. The monitoring device further calculates the determined second and third risk values, as well as the second total value of the first total value, and compares the second total value with a preset second total value threshold. If the second total value is less than the second total value threshold, the monitoring device forwards the response data to the communication unit of the testing device. If the second total value is greater than or equal to the second total value threshold, the monitoring device stops forwarding the response data to the communication unit of the testing device.
[0046] Fifth step: The communication unit of the above-mentioned testing device receives the above-mentioned response data, the display unit of the above-mentioned testing device displays the verification results, and the detection unit of the above-mentioned testing device executes the corresponding performance test steps again according to the changed test parameters.
[0047] Specifically, in the first step, the testing device generates and transmits data containing the performance test results of the charging pile, and sends this data to the monitoring device. In the second step, the monitoring device first looks up the first monitoring table to determine a first risk value, then looks up the third monitoring table to determine a third risk value, and calculates a first sum of the first and third risk values. If the first sum is greater than or equal to a first sum threshold, the monitoring device refuses to forward the data to the server device because it determines that the testing device is infected with a computer virus, meaning that the communication between it and the server device is insecure. If the first sum is less than the first sum threshold, the monitoring device forwards the data to the server device and continues with subsequent steps. In the third step, the server device verifies the performance test results through big data analysis and automatically changes the test parameters. The system also generates response data, which includes the verification results and the modified test parameters. This response data is sent to the monitoring device. In the fourth step, the monitoring device first looks up the second monitoring table to determine the second risk value, then looks up the third monitoring table to determine the third risk value, and calculates the second total value of the second and third risk values plus the first total value. When the second total value is greater than or equal to the second total value threshold (where the first total value threshold is less than the second total value threshold), the monitoring device considers the testing device to be infected with a computer virus and refuses to forward the response data to the communication unit of the testing device. Otherwise, the monitoring device forwards the response data to the communication unit of the testing device. In the fifth step, the display unit of the testing device displays the verification results of the server device, and the detection unit of the testing device executes the corresponding performance test steps again. This method not only checks whether the communication between the testing device and the server device is abnormal according to the contents of the first and second monitoring tables, but also predicts the occurrence of abnormal communication in advance based on the contents of the third monitoring table, allowing for timely measures to be taken to ensure the security of communication between the testing device and the server device.
[0048] Furthermore, during the entire process of performance testing of the charging pile, the aforementioned testing device performs steps one through five simultaneously with each performance test step.
[0049] Furthermore, the aforementioned testing device includes the following steps throughout the performance testing process for charging piles:
[0050] Step 1: The aforementioned testing device and the aforementioned server device pre-store a first flag, and the aforementioned testing device and the aforementioned server device set the same initial content for the stored first flag;
[0051] The second step is that when the test device sends the transmission data to the server device, the transmission data also includes the first flag stored by the test device. After the server device receives the transmission data, the server device verifies whether the first flag in the transmission data is the same as the first flag stored in its own storage. If they are the same, the server device updates the first flag stored in its own storage according to a preset rule, and at the same time includes the updated first flag in the response data, and sends the response data to the test device.
[0052] Third, after receiving the response data, the testing device obtains the first flag updated by the server device from the response data and updates its own stored first flag using the first flag updated by the server device. The testing device also determines whether the conditions for ending the performance test of the charging pile are met. If they are met, all processing ends. Otherwise, when the testing device sends new transmission data to the server device again, it jumps to the previous step to continue processing.
[0053] Specifically, during the performance testing of charging piles, the testing device executes the performance testing steps multiple times to obtain results, thus repeatedly executing steps one through five as described above. Therefore, the communication time between the testing device and the server device may be relatively long. During this communication time, other devices may impersonate the testing device and send interfering data to the server device, affecting the normal operation of the testing device. To further address this technical problem, steps one through three are proposed. In the first step, both the testing device and the server device store a first flag, and the initial content of the first flag is the same. In the second step, the testing device adds its stored first flag to the data it sends to the server device. The server device verifies whether the first flag in the sent data is the same as its stored first flag. If they are the same, the server device updates its stored first flag and includes the updated first flag in the response data before sending it to the test device. Specifically, the server device also stores a historical first flag that was previously sent by the test device and is the same as the first flag stored by the server device at that time. If the server device verifies that the first flag in the sent data is different from its stored first flag, it continues to verify whether the first flag in the sent data is the same as its stored historical first flag. If they are the same, the server device sends response data containing its first flag to the test device. In the third step, the test device stores the first flag sent by the server device as its new first flag. If the conditions for ending the performance test of the charging pile are still not met, the test device includes its new first flag in the sent data and sends it to the server device again. This method can prevent other devices from impersonating the test device and sending interfering data to the server device, because the first flag in the data sent by other devices will not be the same as the first flag in the server device.
[0054] According to another aspect of the embodiments of the present invention, reference is made to... Figure 2 As shown, the present invention also provides an automatic performance testing system based on web applications to implement the automatic performance testing method based on web applications as described above. Specifically, the functions of each device are described as follows:
[0055] The testing device includes a data acquisition unit, a display unit, a detection unit, and a communication unit. The data acquisition unit is used to connect to the charging pile and collect charging pile data. The display unit is used to show the user the performance test type of the charging pile and the verification results of the performance test results of the charging pile by the server device. The detection unit is used to perform corresponding performance test steps for the charging pile based on the charging pile data collected by the data acquisition unit and according to the performance test type selected by the user. The communication unit is used to send data to the server device and receive data from the server device.
[0056] The monitoring device is connected to the testing device and the server device via a network, and pre-stores a first monitoring table, a second monitoring table, and a third monitoring table to realize real-time management of the communication process between the testing device and the server device.
[0057] The server device is used to verify the performance test results of the charging piles based on historical big data, change the test parameters in the corresponding performance test steps, and send data to the test device.
[0058] According to another aspect of the present invention, a computer storage medium is provided, which stores program instructions, wherein the program instructions, when executed, control the device where the computer storage medium is located to perform any of the methods described above.
[0059] According to another aspect of the present invention, a processor is provided for running a program, wherein the program executes any of the methods described above during runtime.
[0060] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0061] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0062] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0063] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
[0064] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An automated performance testing method based on web applications, characterized in that, include: S1. The testing device connects to the charging pile through its acquisition unit to collect charging pile data. The testing device also displays the performance test types for the charging pile to the user through its display unit by running a web page. The user can manually select the desired performance test type. S2. The testing unit of the testing device, based on the charging pile data collected by the acquisition unit, performs the performance test steps corresponding to the performance test type selected by the user to obtain the performance test results of the charging pile corresponding to the performance test type. A monitoring device is also installed between the testing device and the server device, and the monitoring device is connected to both the testing device and the server device via a network. S3. The communication unit of the test device generates transmission data containing the performance test results of the charging pile corresponding to the performance test type, and the communication unit of the test device sends the transmission data to the monitoring device. The monitoring device uses a first monitoring table to find the first monitoring rule corresponding to the transmitted data and simultaneously determines the first risk value. The monitoring device also uses a third monitoring table to find the communication event rule and the third monitoring rule corresponding to the transmitted data and simultaneously determines the third risk value. The monitoring device also calculates the first total value of the determined first risk value and the third risk value, and compares the first total value with a preset first total value threshold. If the first total value is less than the first total value threshold, the monitoring device forwards the transmitted data to the server device. If the first total value is greater than or equal to the first total value threshold, the monitoring device stops forwarding the transmitted data to the server device. The server device receives and sends data, verifies the performance test results of the charging pile corresponding to the performance test type, changes the test parameters in the performance test steps corresponding to the performance test type, generates response data including the verification results and the changed test parameters, and also sends the response data to the monitoring device. The monitoring device uses a second monitoring table to find the corresponding second monitoring rule for the response data and simultaneously determines the second risk value. It also uses a third monitoring table to find the corresponding communication event rule and third monitoring rule for the response data and simultaneously determines the third risk value. The monitoring device further calculates the determined second and third risk values, as well as the second total value of the first total value, and compares the second total value with a pre-set second total value threshold. If the second total value is less than the second total value threshold, the monitoring device forwards the response data to the communication unit of the testing device. If the second total value is greater than or equal to the second total value threshold, the monitoring device stops forwarding the response data to the communication unit of the testing device. The communication unit of the testing device receives the response data, the display unit of the testing device displays the verification results, and the detection unit of the testing device re-executes the corresponding performance test steps based on the changed test parameters. Based on the content of the third monitoring table, the device anticipates the occurrence of abnormal communication and takes timely measures to ensure the communication security between the testing device and the server device.
2. The automatic performance testing method based on a web application according to claim 1, characterized in that, Before S3 is executed, the monitoring device pre-stores a first monitoring table, a second monitoring table, and a third monitoring table to enable real-time management of the communication process between the testing device and the server device. The first monitoring table stores different first monitoring rules used by the monitoring device when the testing device sends data to the server device, and preset first risk values corresponding to the different first monitoring rules. The second monitoring table stores different second monitoring rules used by the monitoring device when the server device sends data to the test device, and preset second risk values corresponding to different second monitoring rules. The third monitoring table stores different communication event rules used by the monitoring device when the test device sends data to the server device, and different third monitoring rules corresponding to different communication event rules, as well as preset third risk values corresponding to different third monitoring rules.
3. The automatic performance testing method based on a web application according to claim 2, characterized in that, The entire process of performance testing of the charging pile by the testing device includes: the testing device and the server device pre-store a first flag, and both the testing device and the server device set the same initial content for the stored first flag; when the testing device sends transmission data to the server device, the transmission data also includes the first flag stored by the testing device; after the server device receives the transmission data, the server device verifies whether the first flag in the transmission data is the same as its own stored first flag. If they are the same, the server device updates its own stored first flag according to a pre-set rule, and simultaneously includes the updated first flag in the response data, and sends the response data to the testing device; after receiving the response data, the testing device retrieves the first flag updated by the server device from the response data, uses the updated first flag to update its own stored first flag, and also determines whether the conditions for ending the performance test of the charging pile are met. If they are met, all processing ends; otherwise, when the testing device sends new transmission data to the server device again, it jumps to the previous step to continue processing.
4. An automated performance testing system based on web applications, used to implement the method as described in any one of claims 1-3, characterized in that, Includes the following devices: The testing device includes a data acquisition unit, a display unit, a detection unit, and a communication unit. The data acquisition unit is used to connect to the charging pile and collect charging pile data. The display unit is used to show the user the performance test type of the charging pile and the verification results of the performance test results of the charging pile by the server device. The detection unit is used to perform corresponding performance test steps for the charging pile based on the charging pile data collected by the data acquisition unit and according to the performance test type selected by the user. The communication unit is used to send data to the server device and receive data from the server device. The monitoring device is connected to the testing device and the server device via a network, and pre-stores a first monitoring table, a second monitoring table, and a third monitoring table to realize real-time management of the communication process between the testing device and the server device. The server device is used to verify the performance test results of the charging piles based on historical big data, and to change the test parameters in the corresponding performance test steps, and to send data to the test device.
5. A computer storage medium, characterized in that, The computer storage medium stores program instructions, wherein when the program instructions are executed, they control the device where the computer storage medium is located to perform the method described in any one of claims 1 to 3.
Citation Information
Patent Citations
Web-based electric vehicle charging station monitoring system and a data acquisition method
CN109508273A
Charging pile and automatic test system thereof
CN112881846A