An ECPS test link execution method based on LLM and feedback improvement mechanism

By introducing a large language model (LLM) and feedback improvement mechanism into the electrical cyber-physical system, a test link library was constructed and semantic analysis was performed. This solved the problems of universality and updateability of test link execution, enabling efficient and automated penetration testing and improving the protection capabilities of ECPS.

CN122221247BActive Publication Date: 2026-11-10ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610264936.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-05
Publication Date
2026-11-10
Estimated Expiration
2046-03-05

AI Technical Summary

Technical Problem

Existing test link execution methods have low universality in electrical and cyber-physical systems, cannot deeply explore unknown risks, and lack effective feedback mechanisms, resulting in the test link not being updated and optimized in a timely manner, making it difficult to verify the effectiveness of the ECPS defense system.

Method used

A test link library is constructed using a Large Language Model (LLM) and feedback improvement mechanism. Semantic analysis is performed through LLM to generate user test reports and framework test reports. The test links are improved cyclically to form a test link library for penetration testing of electrical and cyber-physical systems.

Benefits of technology

It improves the automation and success rate of the testing process, delves deeper into the unknown risks of ECPS, generates test reports in a unified format, reduces manpower consumption, and enhances the protection capabilities of ECPS.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122221247B_ABST
    Figure CN122221247B_ABST
Patent Text Reader

Abstract

This invention discloses an ECPS test link execution method based on LLM and a feedback improvement mechanism, belonging to the field of Electrical and Cyber-Physical Systems. The method includes: first, constructing multiple initial test links; executing these test links in the ECPS test; generating error logs if execution fails, and generating vulnerability reports if execution succeeds; second, using LLM to improve the test links based on the error logs, resulting in improved test links; retesting using the improved test links until successful execution or a specified number of iterations is reached; traversing all initial test links to obtain a test link library; and finally, testing the target ECPS using the test link library to obtain a final vulnerability report. This invention can be used for in-depth mining of hidden vulnerabilities and unknown risks in ECPS, providing a solution for ECPS security protection that more closely resembles a real network attack environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electrical and cyber-physical systems, specifically relating to an ECPS test link execution method based on LLM and feedback improvement mechanism. Technical Background The execution of test links is the ultimate goal of automated penetration testing and offensive security techniques. Testers use penetration tools to execute these test links on the target system, improving the system's defenses based on the risks discovered during execution, and optimizing the test links to uncover more and deeper unknown risks within the system. Essentially, this technology simulates the thinking and methods of real attackers, proactively seeking and exploiting vulnerabilities in the system. This allows organizations to fix these vulnerabilities before malicious attackers discover them, thereby improving overall security levels. In the ECPS (Electronic Security Platforms) domain, in addition to achieving the above goals, the execution of test links must also ensure that the link successfully bypasses the intrusion detection and intrusion prevention systems within the target ECPS, and successfully identifies nodes such as generators, circuit breakers, switches, and routers within the ECPS. This ensures that testers can construct a sufficiently comprehensive network topology based on the execution results.

[0002] However, test link execution technology faces significant challenges in its development towards closed-loop feedback and cyclical improvement, limiting current methods to verifying and reproducing the effectiveness of test links. Furthermore, the lack of feedback on test results compromises the depth and breadth of the test link, making it impossible to promptly and accurately reproduce newly emerging, especially yet-to-be-exposed, complex attack techniques. This hinders the discovery of deeply hidden unknown risks in the target system and prevents the latest verification of the defense system's effectiveness. Moreover, no method is currently applicable to all ECPS scenarios for test link execution, resulting in low universality. This also leads to ECPS test reports failing to fully reflect unknown risks in the system, making ECPS maintenance difficult.

[0003] In recent years, Large Language Models (LLMs) have demonstrated tremendous capabilities in language understanding, code generation, and logical reasoning, promoting the automation and intelligentization of penetration testing. With the emergence of Gemini and Claude, LLMs in automated penetration testing are no longer limited to the formulation of macro-level plans, but delve into every sub-task, contributing to information organization, semantic matching, and augmentation generation.

[0004] Existing test link execution methods only support single execution of the test link, and the manpower consumption gradually increases with the number of executions. On the other hand, these methods are almost unable to iteratively update existing test links, and some methods that support test link updates cannot simultaneously guarantee the success rate and effectiveness of the updated test link. In addition, the development of penetration testing for EPCs is slow, and few existing test links can be directly applied to EPCs, making it difficult to discover unknown risks hidden deep within. Therefore, it is urgent to explore automatic execution and feedback improvement methods for test links that can be applied to EPCs. Summary of the Invention

[0005] To address existing technical problems, this invention provides an ECPS test link execution method based on LLM and feedback improvement mechanism. This method introduces LLM and feedback improvement mechanism into the test link execution process. Based on LLM assistance, the feedback improvement mechanism continuously improves the test link, and these test links are applied to the discovery of unknown risks in electrical and cyber-physical systems, deeply uncovering system vulnerabilities and deficiencies, and helping users to conduct targeted system protection.

[0006] The specific technical solution is as follows: S1, construct multiple initial test links for testing ECPS; S2 executes the test link in ECPS. If the test link fails, an error log is generated and the process proceeds to the next step. If the test link succeeds, a vulnerability report is generated. S3, use LLM to perform semantic analysis on the error logs and generate user test reports and framework test reports to further improve the test link and obtain the improved test link; S4. Repeat S2-S3 using the improved test link until the test link executes successfully or the specified number of iterations is reached. At this point, the improved test link is the final test link. S5, repeat S2-S4 until all initial test links are traversed, and combine all successfully executed test links and final test links into a test link library; S6 uses the test link library to test the target ECPS under test, and merges all the generated vulnerability reports to obtain a final vulnerability report that reflects the unknown risks in the target ECPS under test.

[0007] Furthermore, in S2, the error log includes four parts: log content, main error types, output format, and parsing method.

[0008] Furthermore, in S2, successful execution is defined as each test step in the test chain being successfully executed in ECPS; otherwise, execution is considered a failure.

[0009] Furthermore, in S3, the LLM adopts a large language model embedded in the LangChain framework.

[0010] Furthermore, S3 specifically refers to: S301, take the error-related text in the error log as error 1, and take the error-related text of each vulnerability in the vulnerability knowledge base as error 2; S302, traverse all errors 2 in the vulnerability knowledge base, perform L2 normalization on errors 1 and 2 respectively, and calculate the similarity between errors 1 and 2; S303, take the improvement suggestion corresponding to error 2 with the highest similarity as the improvement suggestion for error 1; S304, Error 1 and improvement suggestions are semantically parsed using the LLM decoder to generate user test reports and framework test reports; S305: Users generate feedback based on user test reports, and LLM improves the corresponding test links based on framework test reports and feedback.

[0011] Furthermore, in S301, the vulnerability knowledge base is CVE and Exploit-DB.

[0012] Furthermore, in S302, the L2 normalization process specifically involves: ; ; in, High-dimensional vector Normalized unit vector, High-dimensional vector The L2 norm.

[0013] Furthermore, in step S302, the similarity is calculated using Euclidean distance matching or cosine similarity matching.

[0014] Furthermore, in S305, the test link is improved by using LLM to update the error name, error type, error description, and system status information in the framework test report to the environment information of the penetration testing framework corresponding to the test link, and guiding the penetration testing framework to refer to the improvement suggestions and feedback in the framework test report to re-plan the test plan corresponding to the current test link.

[0015] The beneficial effects of this invention are: This invention proposes an automated execution and feedback improvement method for test links. Based on a test link for an Electrical, Cyber-Physical Systems (ECPS), a penetration testing tool is remotely invoked to automate the execution. The returned error logs are then collected and analyzed to provide improvement suggestions, generating a test report containing the reasons for test link failures and improvement recommendations. Following a feedback improvement mechanism, the test report is fed back to the penetration testing framework for cyclical updates of environmental information, test plans, and test links. This process not only improves the test link but also deeply uncovers unknown risks in ECPS. By embedding LLM (Limited Language Management) into this method, leveraging its semantic parsing and enhanced generation capabilities, improvement suggestions are provided for failed test links. A standardized test report is generated based on prompt word templates, reducing the complexity of the feedback improvement mechanism and improving the usability of the updated test link.

[0016] Compared with existing technologies, this invention addresses the problems of high manpower and time consumption in existing test link execution methods. First, it embeds an LLM (Limited Language Management) and uses prompt word engineering to guide the LLM in generating instructions, enabling remote invocation of penetration testing tools and automatic execution of test links, thus improving the efficiency and automation of penetration testing. Second, it introduces a feedback improvement mechanism to improve and update test links that fail to execute, thereby increasing the success rate and ensuring that the test links can uncover more and deeper unknown risks in the target system, thus helping users to carry out targeted vulnerability remediation and system protection. Attached Figure Description

[0017] Figure 1 This is an overall framework diagram of the method of the present invention; Figure 2 This is a flowchart illustrating the test report generation process; Figure 3 This is a comparison chart of the feasibility of the test plan and the number of risks discovered after using different feedback methods in this invention; Figure 4 This is a diagram showing the effect of different number of loop feedback cycles on the execution of the test link in this invention. Detailed Implementation

[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in the various embodiments of the present invention can be combined accordingly without mutual conflict.

[0019] Before introducing this invention, the technical terms used in this invention will be explained first: Electro-cyber-physical systems: refers to systems that apply cyber-physical systems to the field of electrical engineering, such as power plants, power grids, electric vehicle charging stations, and other power systems.

[0020] Environmental information refers to the collection and identification of various data sets of the target system before the penetration test begins. It mainly includes basic information such as system configuration, network topology, service version, user accounts, security policies, and log configuration.

[0021] Test Plan: A test plan is a systematic strategy and action plan developed by the tester to achieve goals such as automated penetration testing and red team simulation, based on the target's environmental information, network threat reports, and ATT&CK tactics, techniques, and procedures. It serves as the basis and reference for starting penetration testing and red team simulation, ensuring the smooth progress of the test.

[0022] Test Link: In network security, this describes the complete path of a tester's journey from initial intrusion to achieving the final goal. It typically includes stages such as reconnaissance, initial access, privilege escalation, lateral movement, and data theft, with each stage containing specific tactics, techniques, and steps.

[0023] Error logs are information automatically generated by penetration testing tools after a test pipeline fails. They record specific information such as the timestamp of the error, error level, error code, and stack trace. Depending on the penetration testing tool, error logs may be in plain text, JSON, or other formats.

[0024] This invention takes a test link library for Electrical, Cyber, Physical Systems (ECPS) as input. Through an embedded LLM, each test link in the library is executed remotely by calling a penetration testing tool. The error logs returned by the penetration testing tool are processed to generate user test reports and framework test reports. The framework test reports are then fed back to the penetration testing framework. The feedback improvement mechanism is used to update and improve the test links and execute them again. Links that fail to execute are improved in a loop according to the above steps. The improved and successfully executed links are stored in the original test link library. Users need to protect against the risks found in the test links to expose unknown risks in ECPS and ultimately improve the protection capabilities of the target ECPS.

[0025] The overall process of the method is as follows: Figure 1 As shown, the process includes three steps: executing the test pipeline, generating a test report, and improving the test pipeline.

[0026] The specific steps are as follows: Step 1: Use LLM to generate instructions and remotely call penetration testing tools to execute the test link.

[0027] Specifically, it includes: Step 1.1: A test link library containing multiple initial test links and a test framework corresponding to each link are manually constructed. These initial test links can probe and delve into various nodes in ECPS, including generators, circuit breakers, switches, routers, IDS, etc. (In this specific embodiment, a total of 200 initial test links are constructed, and 200 initial test links suitable for ECPS are randomly generated using the Aurora tool proposed by Northwestern University). Step 1.2: Embed the LLM using the LangChain framework to enable direct code calls to the LLM. Step 1.3: Use prompt words to make LLM generate remote invocation instructions for remotely invoking the specified penetration testing tool; Step 1.4: Select existing initial test links one by one from the test link library, and execute the test links in the target ECPS using the penetration tool. If the test link execution fails, it indicates that the target ECPS is secure. The penetration tool will return an error log and proceed to Step 2. The error log includes four parts: log content, main error type, output format, and parsing method. The specific category of each part varies depending on the selected penetration tool. If the test link execution is successful, the risks and vulnerabilities of the ECPS used during the execution of the test link are compiled and a vulnerability report is generated. The vulnerability report includes the risk and vulnerability names, descriptions, and impacts of the target ECPS.

[0028] Successful execution means that every test step in the test chain is executed successfully; otherwise, it is considered an execution failure.

[0029] In this embodiment, the open-source penetration testing tool CALDERA is used as an example. The components of the error log generated after executing the test link are shown in Table 1.

[0030] Table 1. Composition of CALDERA's error log Step 2: Based on the error logs returned by the penetration testing tool, perform semantic analysis using the LLM embedded in the framework, and obtain user test reports and framework test reports containing error information and improvement suggestions according to the preset prompt word templates, and provide feedback to the user and the penetration testing framework respectively.

[0031] like Figure 2 As shown, it specifically includes: Step 2.1: Take the error-related text (including the error name and related description) in the error log as error 1, and the error in the existing vulnerability knowledge base (in this specific embodiment, the vulnerability knowledge base is CVE and Exploit-DB) as error 2. After converting them into high-dimensional vectors by the LLM encoder, perform L2 normalization to obtain unit vectors of error 1 and error 2. Taking error 1 as an example, for the transformed n-dimensional vector The specific formula for calculating the unit vector after L2 normalization is as follows: (1) (2) in, For vectors Normalized unit vector, For vectors The L2 norm.

[0032] Step 2.2: Use the similarity matching algorithm to traverse and calculate the similarity between the unit vectors of error 1 and all errors in the vulnerability knowledge base, and take the improvement suggestion of error 2 with the highest similarity in the vulnerability knowledge base as the improvement suggestion of error 1. Similarity matching algorithms can employ either Euclidean distance matching or cosine similarity matching. For Euclidean distance matching, the Euclidean distance between the two is calculated using formula (3) to determine their similarity. Let... For error 1, the unit vector, Let the unit vector be error 2, then: (3) in, Let be the Euclidean distance between two unit vectors. The smaller the value, the more similar the corresponding error 1 and error 2 are; For cosine similarity matching, the unit vector is calculated using formula (4). and cosine similarity , (4) in, and They are respectively and The length of the mold, .

[0033] For each error 1, iterate through and calculate the similarity between all errors 2 in the vulnerability knowledge base and the current error 1. Then, take the improvement suggestion of error 2 with the highest similarity as the improvement suggestion of error 1.

[0034] Step 2.3: Semantically parse the matched error 1 and its improvement suggestions using the LLM decoder to generate a phased user test report and a framework test report containing information such as error name, error type, error description, system status, and improvement suggestions.

[0035] The phased user test reports are written in text and are provided to users to help them understand the specific details of each test execution and monitor the specific effects of a test link. The framework test reports are written in JSON format and are used to provide feedback to the penetration testing framework for updating environment information and improving the test plan.

[0036] Step 3: Decompose the framework test report fed back to the penetration testing framework through the LLM embedded in the framework, guide the penetration testing framework to update the environment information and improve the test plan, and at the same time, combine the user's feedback based on the periodic user test reports to regenerate the test link and execute it again, helping the target ECPS to deeply explore unknown risks.

[0037] Specifically, it includes: Step 3.1: Feed back the framework test report to the penetration testing framework to update the environment information, test plan, and test link. That is, use the LLM embedded in the framework to update the information about error names, error types, error descriptions, and system status in the framework test report to the environment information of the penetration testing framework. Guide the penetration testing framework to refer to the improvement suggestions in the framework test report and the feedback from users based on the periodic user test reports to re-plan the test plan of the current test link, which is to improve the test link.

[0038] Step 3.2: Retest the improved test link against the target ECPS using a penetration testing tool. If the test fails, repeat the update process according to Step 2 and Step 3.1 until the specified number of iterations is reached, then stop the loop to improve the depth and executability of the test link.

[0039] Step 3.3: Store the test link obtained when stopping the loop in step 3.2 in the test link library built in step 1 and delete the corresponding initial link.

[0040] Step 3.4: Repeat steps 1.4-3.3 until all initial links in the test link library are traversed to obtain the updated test link library. Then, merge the vulnerability reports generated in the last loop of each test link into the final vulnerability report. For the new target ECPS to be tested, perform tests using all links in the updated test link library to obtain the final vulnerability report.

[0041] Based on the risks discovered during the execution of the test link in the final vulnerability report, users protect the target ECPS. This involves analyzing which risks in the target ECPS the test link exploited, and for each risk, users need to perform targeted remediation and resolution to eliminate the risks exploited by the test link, thereby improving the risk protection capabilities of the target ECPS.

[0042] To demonstrate the effectiveness of the method of this invention, this specific embodiment uses a parallel fitting application security testbed containing an Electrical and Cyber-Physical System (ECPS) as the test site. Considering the efficiency, accuracy, and cost of LLMs, DeepSeek-R1 and Claude are used as LLMs embedded in the automatic execution method of the test link, and CALDERA is selected as the penetration testing tool for executing the test links. All test links in the test link library can be used for ECPS penetration testing. Considering the different advantages of different LLMs, this specific embodiment uses the embedded Claude to call the penetration testing tool, and DeepSeek-R1, due to its superior semantic understanding capabilities, is used for semantic understanding of error reports and improvement of the test links.

[0043] In the target environment of an electrical, cyber-physical system, this invention first uses an embedded LLM to generate commands for remotely invoking penetration testing tools and executing test links in a test link library. Next, it processes the error logs returned by the penetration testing tools, generating user test reports and framework test reports based on information such as error name, error type, error description, system status, and improvement suggestions. Then, it feeds the framework test reports back to the penetration testing framework to help it update environment information, test plans, and test links. Finally, it re-executes the updated test links; if execution fails, the above steps are repeated for a cyclical update; if execution succeeds, the test links are stored in the test link library, and users are guided to perform targeted remediation based on the risks discovered by the test links.

[0044] Table 2 shows the efficiency of our method in automatically executing test chains compared to methods from two popular frameworks, GAIL-PT and Aurora, expressed as execution time. We selected five test chains from the test chain library to demonstrate the specific execution times of these methods, and also compared the average execution time of all chains. It is evident that after executing multiple test chains, GAIL-PT has the longest average execution time among the three methods, while Aurora and our method have similar average execution times. This is because both integrate the same penetration testing tool, CALDERA, but our method employs a simpler approach when remotely invoking the penetration testing tool, resulting in an average execution time 2 seconds less than Aurora, thus ensuring the shortest possible execution time for the test chains.

[0045] Table 2 Comparison of time consumption for automatic execution of the test link Table 3 compares the performance of our proposed method with four feedback-free methods—PenHeal, RefPentester, Aurora, and a four-agent cooperative offensive security framework—in terms of test link quality and ECPS risk detection. Test link quality is measured by execution success rate; a higher success rate indicates better link quality. Risk detection effectiveness is evaluated through the generated test reports; the more information listed in the report, the more risks discovered. The results show that the execution success rate of our proposed method is significantly higher than PenHeal and RefPentester, and 5.8% higher than Aurora, and 3.5% higher than the four-agent cooperative offensive security framework. Furthermore, the test reports also identified 20-30 more risks than the feedback-free Aurora and the four-agent cooperative offensive security framework. This indicates that our method, by introducing feedback, can significantly improve test link quality and effectively promote the discovery of ECPS risks.

[0046] Table 3. Execution success rate and number of reports with and without feedback. Figure 3 This paper compares the feasibility of updated test plans and the number of risks discovered after five cycles using different feedback methods. Besides the test report feedback proposed in this invention, the other three feedback methods are: feedback providing only the cause of the error, feedback providing only improvement measures, and direct feedback from error logs. It is clear that the test plan with direct error log feedback has the lowest feasibility and discovers the fewest risks. This is because penetration testing tools generate error logs in various formats. Direct feedback of error logs may result in some formats being unrecognizable by the penetration testing framework, leading to information loss and affecting the updating of the test plan and test path. Feedback only on the cause of the error and feedback only on improvement measures yield similar results, but both are inferior to feedback from test reports. This indicates that processing error logs into a standardized test report during the feedback process improves the accuracy of information identification and helps the penetration testing framework better update environmental information, test plans, and test paths.

[0047] Figure 4The impact of the number of iterations on the test links was compared. By setting 1, 5, 10, and 15 iterations respectively, the proportion of test links that failed to execute and the number of test links ultimately stored in the test link library were observed. As shown in the figure, with the increase of the number of iterations, the failure rate of the test links gradually decreased, and the number of test links stored in the test link library gradually increased, indicating that the quality of the test links improved. In other words, if the number of iterations is sufficient, all test links can be executed successfully after continuous iteration and updates, and more unknown risks of ECPS will be discovered, thus providing users with sufficient system maintenance suggestions and ultimately significantly improving the protection capability of ECPS against unknown risks.

[0048] In summary, the innovation and technological contribution of the method of this invention are mainly reflected in the following aspects: (1) An automatic execution method for test links of electrical and cyber-physical systems is proposed. By connecting the penetration testing tool to the penetration testing framework and inputting instructions to control the framework to call the tool, the penetration testing tool is remotely controlled to perform offensive security tests on the target ECPS. This allows the penetration testing framework to automatically apply the test link to the penetration test, thereby detecting the quality of the test link and exploring unknown risks of the system. (2) The LLM is embedded into the penetration testing framework. Error logs returned to the framework by the penetration testing tools are used to organize and summarize error types, descriptions, and other information. A feedback and optimization loop mechanism based on test reports is constructed using LLM semantics. The penetration testing framework generates test reports containing the reasons for test link failures and improvement suggestions based on the error logs. The test reports are divided into encoded reports fed back to the penetration testing framework in JSON format and text reports provided to users in natural language.

[0049] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.

Claims

1. An ECPS test link execution method based on LLM and feedback improvement mechanism, characterized in that, include: S1, construct multiple initial test links for testing ECPS; S2, using prompt words to make LLM generate remote invocation instructions for remotely invoking the specified penetration tool; execute the test link in ECPS through the penetration tool. If the test link fails, an error log is generated and the process proceeds to the next step. If the test link succeeds, a vulnerability report is generated. S3, use LLM to perform semantic analysis on the error logs and generate user test reports and framework test reports to further improve the test link and obtain the improved test link; S301, take the error-related text in the error log as error 1, and take the error-related text of each vulnerability in the vulnerability knowledge base as error 2; S302, traverse all errors 2 in the vulnerability knowledge base, perform L2 normalization on errors 1 and 2 respectively, and calculate the similarity between errors 1 and 2; S303, take the improvement suggestion corresponding to error 2 with the highest similarity as the improvement suggestion for error 1; S304, Error 1 and improvement suggestions are semantically parsed using the LLM decoder to generate user test reports and framework test reports; S305, users generate feedback based on user test reports, and LLM improves the corresponding test links based on framework test reports and feedback; In S305, the test link is improved by using LLM to update the error name, error type, error description, and system status information in the framework test report to the environment information of the penetration testing framework corresponding to the test link, and guiding the penetration testing framework to refer to the improvement suggestions and feedback in the framework test report to re-plan the test plan corresponding to the current test link. S4. Repeat S2-S3 using the improved test link until the test link executes successfully or the specified number of iterations is reached. At this point, the improved test link is the final test link. S5, repeat S2-S4 until all initial test links are traversed, and combine all successfully executed test links and final test links into a test link library; S6 uses the test link library to test the target ECPS under test, and merges all the generated vulnerability reports to obtain a final vulnerability report that reflects the unknown risks in the target ECPS under test.

2. The ECPS test link execution method based on LLM and feedback improvement mechanism according to claim 1, characterized in that, In S2, the error log includes four parts: log content, main error types, output format, and parsing method.

3. The ECPS test link execution method based on LLM and feedback improvement mechanism according to claim 1, characterized in that, In S2, successful execution is defined as each test step in the test chain being successfully executed in ECPS; otherwise, execution is considered a failure.

4. The ECPS test link execution method based on LLM and feedback improvement mechanism according to claim 1, characterized in that, In S3, LLM adopts a large language model embedded in the LangChain framework.

5. The ECPS test link execution method based on LLM and feedback improvement mechanism according to claim 1, characterized in that, In S301, the vulnerability knowledge base is CVE and Exploit-DB.

6. The ECPS test link execution method based on LLM and feedback improvement mechanism according to claim 1, characterized in that, In step S302, the L2 normalization process specifically involves: ; ; in, High-dimensional vector Normalized unit vector, High-dimensional vector The L2 norm.

7. The ECPS test link execution method based on LLM and feedback improvement mechanism according to claim 1, characterized in that, In step S302, the similarity is calculated using Euclidean distance matching or cosine similarity matching.

Citation Information

Patent Citations

  • Network penetration testing method and system based on state feedback

    CN119520075A

  • Power grid terminal safety protection system and method based on large language model

    CN120200801A