Pressure test method for trusted DCS trusted management platform and related equipment
By running Python scripts and configuration files in the same network environment, remotely calling multiple computer devices for stress testing, solving the problem of cumbersome operations in the existing technology and achieving efficient and accurate multi-device testing.
Patent Information
- Application Number
- CN202510077582.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-17
AI Technical Summary
In the prior art, ordinary shell scripts can only be executed on a single upper computer device, and cannot generate alarms on a large number of upper computer devices at the same time, making the operation cumbersome.
By uploading Python scripts and configuration files to the client and running them in the same network environment, using Python scripts to remotely call multiple host computer devices, execute commands in the json configuration file, and conduct stress tests on the trusted management platform.
It realizes stress testing on multiple upper-level computer equipment simultaneously, reducing the test cycle, improving the accuracy and reliability of the test, and reducing the time and labor cost of manual testing.
Smart Images

Figure CN119883930A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of DCS host computers, and in particular relates to a pressure testing method and related equipment for a trusted DCS trusted management platform. Background Art
[0002] The existing trusted DCS host computer integrates functions such as trusted startup, static trusted verification, dynamic trusted verification, trusted whitelist, process protection, and application access control. The trusted management platform provides functions such as trusted startup, static trusted verification, dynamic trusted verification, trusted whitelist, process protection, and application access control in multiple DCS host computer systems. The trusted management platform provides functions such as setting and deleting policies; obtaining and displaying the trusted status of the DCS host computer, trusted function alarms, and other management and control functions. Users can view the alarm content of the DCS host computer simply and conveniently through the trusted management platform. After the management platform is deployed, a large number of alarms need to be generated on the management platform for stress testing to test the bottleneck of the trusted management platform's alarm capacity and whether the management platform is used smoothly under a large number of alarms.
[0003] Ordinary shell scripts can only be executed on a single host device. If a large number of host devices are to generate alarms at the same time, it is necessary to create a shell script on each device, which is cumbersome. Summary of the invention
[0004] The present invention provides a stress testing method and related equipment for a trusted DCS trusted management platform, which solves the problem that ordinary shell scripts can only be executed on a single host device. If a large number of host devices are to generate alarms at the same time, it is necessary to create a shell script on each device, which makes the operation more complicated.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A stress testing method for a trusted DCS trusted management platform, comprising:
[0007] Upload the Python script and the configuration files required to run the script to the client, where the client and the host device under test are in the same network test environment;
[0008] Create a python script and edit the json configuration file;
[0009] Run the python script on the client to connect to multiple host devices specified in the program;
[0010] Perform stress testing on the trusted management platform based on Python scripts and JSON configuration files.
[0011] Preferably, the test instructions provided by the python script include:
[0012] Read the contents of the specified json configuration file;
[0013] Remotely call the host device to control the host device to execute the commands in the json configuration file;
[0014] Determine whether the number of alarms on the management platform is consistent with the number of alarms generated in the execution of the json configuration file;
[0015] Generate a test report.
[0016] Preferably, the json configuration file specifies the following information:
[0017] Specify the command that generates the alarm;
[0018] Specify the number of alarms to be generated;
[0019] Specifies the number of executions.
[0020] Preferably, formulating a command for generating an alarm includes:
[0021] Static trusted verification alarms, trusted whitelist alarms, process protection alarms, dynamic trusted verification alarms, and application access control alarms.
[0022] Preferably, the steps of dynamic trusted verification alarm are specifically as follows:
[0023] Command to enable the dynamic trusted verification module;
[0024] Commands for configuring dynamic trusted verification policies for execution programs;
[0025] After a program with a dynamic trusted verification policy is running, the process segment of the program is tampered with to make the dynamic trusted verification policy of the process untrustworthy.
[0026] Preferably, the step of application access control alarm includes:
[0027] Command to enable application access control policy;
[0028] Commands to configure access control policies for file applications;
[0029] Commands to modify, rename, and delete files with application access control policies using non-subject files
[0030] Preferably, stress testing the trusted management platform includes:
[0031] Perform stress testing on the trusted management platform according to the json configuration file;
[0032] The python script determines whether the alarms on the trusted management platform are consistent with the number and type of alarms generated by executing the commands specified in the json file.
[0033] Generate test reports based on python scripts.
[0034] A stress testing system for a trusted DCS trusted management platform, comprising:
[0035] Upload module: used to upload Python scripts and configuration files required to run the scripts to the client, where the client and the host device under test are in the same network test environment;
[0036] Create module: used to create python scripts and edit json configuration files;
[0037] Run module: used to run Python scripts on the client and connect to multiple host devices specified in the program;
[0038] Test module: Perform stress testing on the trusted management platform based on Python scripts and JSON configuration files.
[0039] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, steps of a stress testing method for a trusted DCS trusted management platform are implemented.
[0040] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a stress testing method for a trusted DCS trusted management platform are implemented.
[0041] Compared with the prior art, the present invention has the following beneficial effects: the present invention provides a stress testing method for a trusted DCS trusted management platform, uploads a Python script and a configuration file required for running the script to a client, wherein the client and the host device under test are in the same network test environment, and testing is performed in the same network environment, which can reduce the influence of network delay and unstable factors on the test results, making the test results more reliable, creates a python script and edits a json configuration file, and data in json format is easy to be parsed and processed by languages such as Python, runs a python script on the client, connects multiple host devices specified in the program, and runs the script on the client, which can centrally control the test process, facilitate monitoring and management, and can connect and test multiple devices at the same time, greatly shortening the test cycle, and performs stress testing on the trusted management platform according to the python script and the json configuration file, and performs comprehensive and in-depth testing on the trusted management platform by simulating multiple scenarios and concurrent requests, and the automated test script can significantly reduce the time and labor cost of manual testing, while improving the accuracy and consistency of the test. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flow chart of a stress testing method for a trusted DCS trusted management platform of the present invention;
[0043] Figure 2 It is an operation diagram of a stress test method for a trusted DCS trusted management platform of the present invention;
[0044] Figure 3 The present invention provides a block diagram of a stress test system for a trusted DCS trusted management platform. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0046] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0048] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0049] like Figure 1 An embodiment of the present invention provides a stress testing method for a trusted DCS trusted management platform, including:
[0050] Upload the Python script and the configuration files required to run the script to the client, where the client and the host device under test are in the same network test environment;
[0051] Create a python script and edit the json configuration file;
[0052] Run the python script on the client to connect to multiple host devices specified in the program;
[0053] Perform stress testing on the trusted management platform based on Python scripts and JSON configuration files.
[0054] Centrally manage test scripts and configuration files through the client to facilitate unified control and deployment of the test process, ensure the network consistency of the test environment (client and host equipment), reduce the impact of external factors on test results, improve test accuracy and reliability, utilize resources in the same network environment, optimize the test process, and reduce test costs.
[0055] The test instructions provided by the Python script include:
[0056] Read the contents of the specified json configuration file;
[0057] Remotely call the host device to control the host device to execute the commands in the json configuration file;
[0058] Determine whether the number of alarms on the management platform is consistent with the number of alarms generated in the execution of the json configuration file;
[0059] Generate a test report.
[0060] It can automate the test process, reduce manual intervention, improve test efficiency, ensure the accuracy and repeatability of the test by remotely calling the host computer and executing specified commands, judge in real time whether the alarms on the management platform are consistent with expectations, discover potential problems in time, and automatically generate test reports to facilitate subsequent analysis and problem tracking.
[0061] The json configuration file specifies the following information:
[0062] Specify the command that generates the alarm;
[0063] Specify the number of alarms to be generated;
[0064] Specifies the number of executions.
[0065] The test parameters can be flexibly set through the configuration file to meet different test requirements. The test scenario can be adjusted without modifying the script code to improve the test efficiency. The content of the configuration file is clear and easy to understand and maintain.
[0066] The commands for generating alarms include:
[0067] Static trusted verification alarms, trusted whitelist alarms, process protection alarms, dynamic trusted verification alarms, and application access control alarms.
[0068] Covering multiple alarm types, ensuring comprehensive testing of the trusted management platform, testing against specific security threats, improving the effectiveness of the test, deeply testing the security protection capabilities of the management platform, and discovering potential security vulnerabilities.
[0069] The specific steps of dynamic trusted verification alarm are as follows:
[0070] Command to enable the dynamic trusted verification module;
[0071] Commands for configuring dynamic trusted verification policies for execution programs;
[0072] After a program with a dynamic trusted verification policy is running, the process segment of the program is tampered with to make the dynamic trusted verification policy of the process untrustworthy.
[0073] Simulate security threats in dynamic environments, improve the authenticity and reliability of tests, verify the effectiveness of dynamic trusted verification strategies, ensure their protective effects in actual scenarios, and discover potential security vulnerabilities and weaknesses through operations such as tampering with process segments.
[0074] The steps for application access control alerts include:
[0075] Command to enable application access control policy;
[0076] Commands to configure access control policies for file applications;
[0077] Commands that use non-subject files to tamper with, rename, and delete files that have application access control policies.
[0078] Verify the effectiveness of application access control policies to ensure secure access to resources. Test the robustness of access control policies through operations such as tampering, renaming, and deletion to enhance the platform's defense capabilities against malicious operations and ensure business continuity.
[0079] Stress testing of the trusted management platform includes:
[0080] Perform stress testing on the trusted management platform according to the json configuration file;
[0081] The python script determines whether the alarms on the trusted management platform are consistent with the number and type of alarms generated by executing the commands specified in the json file.
[0082] Generate test reports based on python scripts.
[0083] Combine configuration files and scripts to conduct systematic testing to ensure the comprehensiveness and depth of the test, determine the consistency of alarms in real time, discover problems and provide feedback in a timely manner, summarize the test results through test reports, and provide a basis for subsequent optimization and improvement.
[0084] like Figure 2 As shown, an embodiment of the present invention provides a stress testing method for a trusted DCS trusted management platform, comprising:
[0085] 1. Upload the Python script and the configuration files required to run the script to the client, where the client and the host device under test are in the same network test environment;
[0086] 2. Create a python script: The python script mainly provides the following test instructions:
[0087] 1) You can read the contents of the specified json file;
[0088] 2) Remotely call the host device and let the host device execute the commands in the json file; (the number of host devices can be multiple)
[0089] 3) Determine whether the number of alarms on the management platform is consistent with the number of alarms generated in the execution json file;
[0090] 4) Generate a test report.
[0091] 3. Edit the json configuration file: The json configuration file specifies the following information:
[0092] 1) Specify the command to generate an alarm;
[0093] Static trusted verification alarm:
[0094] Command to enable the static trusted verification module;
[0095] Command to configure the static trusted policy of the specified file;
[0096] Commands that tamper with, delete, or rename files with static trusted policies; (an alarm will be generated in this case)
[0097] Trusted whitelist alert:
[0098] Command to enable the whitelist module;
[0099] Execute programs without whitelist policies, link dynamic link libraries without whitelist policies, and load kernel modules without whitelist policies (an alarm will be generated at this time)
[0100] Process protection alarm:
[0101] Command to enable the process protection module;
[0102] Command to configure the protection policy of the specified program process;
[0103] After running a program with a process protection policy, kill the program's process with the command; (an alarm will be generated at this time)
[0104] Dynamic trusted verification alarm:
[0105] Command to enable the dynamic trusted verification module;
[0106] Commands for configuring dynamic trusted verification policies for execution programs;
[0107] After running a program with a dynamic trusted verification policy, the process segment of the program is tampered with to make the dynamic trusted verification policy of the process untrustworthy. (An alarm will be generated at this time)
[0108] Application Access Control Alerts:
[0109] Command to enable application access control policy;
[0110] Commands to configure access control policies for file applications;
[0111] Use non-subject files to tamper with, rename, and delete files with application access control policies; (an alarm will be generated at this time)
[0112] 2) Specify the number of alarms to be generated;
[0113] 3) Specify the number of executions.
[0114] 4. Run the python script on the client. The script will connect to multiple host devices specified in the program. If the connection fails, the program will prompt the connection failure and print the reason for the failure and try to reconnect. If the upper limit of the number of reconnections is reached and the connection cannot be made, the script will exit and no longer execute the following steps.
[0115] When the client is connected to the host device under test, it starts to execute the specific business functions of the trusted management platform stress test. It includes the following test modules:
[0116] 1) Verify the trusted management platform stress test service: According to the content of the json configuration file, execute the commands specified in the json file to generate alarms on multiple host devices at the same time. The alarms generated by the host devices will be uploaded to the trusted management platform for display;
[0117] 2) Judgment module: The Python script will determine whether the alarms on the trusted management platform are consistent with the number and type of alarms generated by executing the commands specified in the JSON file, and save the judgment results. If they are inconsistent, the cause needs to be located and investigated;
[0118] 3) Generate test report: When the number and times of alarms specified in the json file are reached, the test ends. Generate test report.
[0119] like Figure 3 The present invention provides a stress testing system for a trusted DCS trusted management platform, comprising:
[0120] Upload module: used to upload Python scripts and configuration files required to run the scripts to the client, where the client and the host device under test are in the same network test environment;
[0121] Create module: used to create python scripts and edit json configuration files;
[0122] Run module: used to run Python scripts on the client and connect to multiple host devices specified in the program;
[0123] Test module: Perform stress testing on the trusted management platform based on Python scripts and JSON configuration files.
[0124] The test instructions provided by the python script include:
[0125] Read the contents of the specified json configuration file;
[0126] Remotely call the host device to control the host device to execute the commands in the json configuration file;
[0127] Determine whether the number of alarms on the management platform is consistent with the number of alarms generated in the execution of the json configuration file;
[0128] Generate a test report.
[0129] The json configuration file specifies the following information:
[0130] Specify the command that generates the alarm;
[0131] Specify the number of alarms to be generated;
[0132] Specifies the number of executions.
[0133] The commands for generating alarms include:
[0134] Static trusted verification alarms, trusted whitelist alarms, process protection alarms, dynamic trusted verification alarms, and application access control alarms.
[0135] The specific steps of dynamic trusted verification alarm are as follows:
[0136] Command to enable the dynamic trusted verification module;
[0137] Commands for configuring dynamic trusted verification policies for execution programs;
[0138] After a program with a dynamic trusted verification policy is running, the process segment of the program is tampered with to make the dynamic trusted verification policy of the process untrustworthy.
[0139] The steps for application access control alerts include:
[0140] Command to enable application access control policy;
[0141] Commands to configure access control policies for file applications;
[0142] Commands to modify, rename, and delete files with application access control policies using non-subject files
[0143] Stress testing of the trusted management platform includes:
[0144] Perform stress testing on the trusted management platform according to the json configuration file;
[0145] The python script determines whether the alarms on the trusted management platform are consistent with the number and type of alarms generated by executing the commands specified in the json file.
[0146] Generate test reports based on python scripts.
[0147] A terminal device is provided in one embodiment of the present invention. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0148] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.
[0149] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0150] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0151] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0152] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0153] Although the embodiments of the present invention are described above in conjunction with the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments and application fields, and the above-mentioned specific embodiments are only illustrative and instructive, rather than restrictive. Under the guidance of the specification, a person skilled in the art can also make many forms without departing from the scope of protection of the claims of the present invention, all of which belong to the scope of protection of the present invention.
Claims
1. A stress testing method for a trusted DCS trusted management platform, characterized in that: include: Upload the Python script and the configuration files required to run the script to the client, where the client and the host device under test are in the same network test environment; Create a python script and edit the json configuration file; Run the python script on the client to connect to multiple host devices specified in the program; Perform stress testing on the trusted management platform based on Python scripts and JSON configuration files.
2. A stress testing method for a trusted DCS trusted management platform according to claim 1, characterized in that: The test instructions provided by the Python script include: Read the contents of the specified json configuration file; Remotely call the host device to control the host device to execute the commands in the json configuration file; Determine whether the number of alarms on the management platform is consistent with the number of alarms generated in the execution of the json configuration file; Generate a test report.
3. The stress testing method of a trusted DCS trusted management platform according to claim 1 is characterized in that: The json configuration file specifies the following information: Specify the command that generates the alarm; Specify the number of alarms to be generated; Specifies the number of executions.
4. A stress testing method for a trusted DCS trusted management platform according to claim 3, characterized in that: The commands for generating alarms include: Static trusted verification alarms, trusted whitelist alarms, process protection alarms, dynamic trusted verification alarms, and application access control alarms.
5. A stress testing method for a trusted DCS trusted management platform according to claim 4, characterized in that: The specific steps of dynamic trusted verification alarm are as follows: Command to enable the dynamic trusted verification module; Commands for configuring dynamic trusted verification policies for execution programs; After a program with a dynamic trusted verification policy is running, the process segment of the program is tampered with to make the dynamic trusted verification policy of the process untrustworthy.
6. The stress testing method of a trusted DCS trusted management platform according to claim 1, characterized in that: The steps for application access control alerts include: Command to enable application access control policy; Commands to configure access control policies for file applications; Commands that use non-subject files to tamper with, rename, and delete files that have application access control policies.
7. The stress testing method of a trusted DCS trusted management platform according to claim 1 is characterized in that: Stress testing of the trusted management platform includes: Perform stress testing on the trusted management platform according to the json configuration file; The python script determines whether the alarms on the trusted management platform are consistent with the number and type of alarms generated by executing the commands specified in the json file. Generate test reports based on python scripts.
8. A stress testing system for a trusted DCS trusted management platform, characterized in that: include: Upload module: used to upload Python scripts and configuration files required to run the scripts to the client, where the client and the host device under test are in the same network test environment; Create module: used to create python scripts and edit json configuration files; Run module: used to run Python scripts on the client and connect to multiple host devices specified in the program; Test module: Perform stress testing on the trusted management platform based on Python scripts and JSON configuration files.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the stress testing method of a trusted DCS trusted management platform as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a stress testing method for a trusted DCS trusted management platform as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Application testing method and testing device
CN107967214A
ATS automatic testing method and equipment based on script language and medium
CN116431470A
Database script parallel execution method and device, electronic equipment and storage medium
CN116909687A
Automatic testing method of DCS trusted management platform client and related device
CN118689776A
Trusted DCS controller trusted function pressure test method and related device
CN118778605A