A method and system for constructing a network security training platform

The device information is obtained through the interactive interface and configuration files are generated, and the network topology and terminal environment are built in combination with the environment configuration library, which solves the problem that physical devices cannot be efficiently constructed and synchronized in the existing technology, and realizes the efficient interconnection and interoperability of the network security training platform and environmental integrity.

CN114584354BActive Publication Date: 2024-11-26NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210168413.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2024-11-26
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

The existing network security training platform lacks support from physical equipment, resulting in the simulation environment lacking intuitiveness, realisticity and integrity, and physical equipment cannot systematically and efficiently construct network topology. When the network topology changes, physical equipment and simulation software are There is a lack of a mechanism for timely synchronization of relevant configuration information between the two countries.

Method used

Obtain device information through interactive interfaces, generate network topology configuration information, parse topology connection information, combine the environment configuration library to generate device network configuration files and script commands, build network topology and terminal environment, and detect connectivity to realize physical devices and virtual devices interconnection and interoperability.

Benefits of technology

It improves the intuitiveness and realistic nature of the network security training platform, realizes efficient interconnection and interoperability between physical devices and virtual devices, and enhances the integrity of the network security training environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114584354B_ABST
    Figure CN114584354B_ABST
Patent Text Reader

Abstract

The present invention proposes a method and system for constructing a network security training platform. The method comprises: obtaining multiple device information from a device information library according to user operation actions on an interactive interface, and generating network topology configuration information according to the multiple device information; parsing the network topology configuration information to obtain topology connection information, and generating network configuration files for each device and script commands generated by a terminal according to the topology connection information and corresponding connection information between a physical device port and a fully connected switch port stored in an environment configuration library; generating a network topology according to the network configuration files of each device to construct a network environment of the network security training platform; generating a corresponding virtual machine according to the script commands generated by the terminal to construct a terminal environment of the network security training platform; and detecting the connectivity between the network environment and the terminal environment. The method improves the intuitiveness, realism and integrity of the network security training platform construction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of network security, and in particular relates to a method and system for constructing a network security training platform. Background Art

[0002] Without cyber security, there is no national security; without informatization, there is no modernization. To build a strong cyber power, we must have a high-quality team of cyber security and informatization talents. Relying on the cyber security training environment to carry out cyber security attack and defense technology training is a necessary way to generate cyber security practical ability.

[0003] The key to building a network security training platform is to reproduce the real network topology of the target environment. Therefore, the network security training platform needs to have the ability to simulate and build network topology and the ability to interconnect and interoperate node devices. The traditional network topology simulation construction method mainly relies on network simulation software and network virtualization methods. Although, through simulation software and virtualization technology, corresponding "virtual" network devices can be generated, and the "virtual" devices can be interconnected and interoperated, thereby meeting certain network security training needs. However, due to the lack of support from physical devices, the network security training environment generated solely by "virtual" network devices still lacks intuitiveness, realism and integrity. Its shortcomings are mainly manifested in the following three points: First, it relies heavily on software to implement corresponding services and functions. When the scale and traffic of the simulated network are large, the simulation effect will be reduced; second, the functions of the provided model library are limited, and it is impossible to simulate all the characteristics and states of the real device, especially the physical characteristics of the device; third, the physical device cannot systematically and efficiently build the network topology. When the network topology changes, there is a lack of a mechanism for timely synchronization of relevant configuration information between the physical device and the simulation software. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a technical solution for constructing a network security training platform to solve the problem in the prior art that physical devices cannot systematically and efficiently construct network topology, and when the network topology changes, there is a lack of a mechanism for timely synchronization of relevant configuration information between the physical devices and the simulation software.

[0005] The first aspect of the present invention discloses a method for constructing a network security training platform; the method comprises:

[0006] Step S1, acquiring multiple device information from a device information library according to a user operation action on an interactive interface, and generating network topology configuration information according to the multiple device information;

[0007] Step S2: parsing the network topology configuration information to obtain topology connection information, and generating a network configuration file for each device and a script command generated by the terminal according to the topology connection information and corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library;

[0008] Step S3, generating a network topology according to the network configuration files of each device to construct a network environment of the network security training platform;

[0009] Step S4, generating a corresponding virtual machine according to the script command generated by the terminal to construct a terminal environment of the network security training platform;

[0010] Step S5: Detect the connectivity between the network environment and the terminal environment to achieve interconnection and interoperability of physical devices and virtual devices in the network security training platform.

[0011] According to the method of the first aspect of the present invention, in step S1, multiple device information is obtained from a device information library according to a user operation action on an interactive interface, and network topology configuration information is generated according to the multiple device information, specifically including:

[0012] Detecting user operation actions on the interactive interface;

[0013] Obtaining a corresponding operation action identifier according to the user operation action;

[0014] Acquire multiple pieces of device information from the device information library according to the operation action identifier.

[0015] According to the method of the first aspect of the present invention, in the step S2, the network topology configuration information is parsed to obtain topology connection information, and a network configuration file for each device and a script command generated by the terminal are generated according to the topology connection information and the corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library, specifically including:

[0016] Parsing the network topology configuration information to obtain topology connection information, names of components involved, and corresponding component configuration information, wherein the topology connection information includes information of each node and each link involved in the network topology;

[0017] Generate a network configuration file for each device according to the topology connection information combined with corresponding connection information of the physical device port and the fully connected switch port stored in the environment configuration library, wherein the network configuration file for each device includes a virtual device configuration file, a physical device configuration file and a terminal configuration file;

[0018] The corresponding relationship between the component name and the virtual machine template, the corresponding relationship between the component configuration information and the virtual machine configuration file are matched and integrated to obtain the script command generated by the terminal.

[0019] According to the method of the first aspect of the present invention, in step S3, generating a network topology according to the network configuration files of each device to construct the network environment of the network security training platform specifically includes:

[0020] Building a network topology composed of virtual devices according to the virtual device configuration file;

[0021] Send the physical device configuration file to each physical device through the serial port control server and adjust the configuration parameters of each physical device;

[0022] The virtual local area network connected to the physical device port is adjusted according to the corresponding connection information of the fully connected switch port in the environment configuration library, so that each of the physical devices is included in the network topology.

[0023] According to the method of the first aspect of the present invention, in step S4, generating a corresponding virtual machine according to the script command generated by the terminal to construct the terminal environment of the network security training platform specifically includes:

[0024] Generate a virtual machine according to the script command generated by the terminal and in combination with a corresponding virtual machine template;

[0025] The generated virtual machine is configured into the network topology according to the terminal configuration file.

[0026] According to the method of the first aspect of the present invention, in the step S5, the connectivity between the network environment and the terminal environment is detected to achieve the interconnection and interoperability of physical devices and virtual devices in the network security training platform, specifically including:

[0027] The virtual machine selects one or more farthest path nodes from the network topology as destination nodes according to the configuration information in the network configuration files of each device, and uses an ICMP PING tool or a Traceroute tool to determine the network connectivity of the data packet transmitted to the destination node according to the response information of the forwarding node, so as to obtain the network transmission path.

[0028] The method according to the first aspect of the present invention, before step S1, further comprises:

[0029] Establishing a configuration parameter list for each virtual device and storing the list in the device information library;

[0030] Each of the physical devices is connected to a fully connected switch in a fully connected form, and the corresponding connection information between each physical device port and the fully connected switch port is classified and sorted, and a corresponding configuration parameter list is established to be uniformly stored in the environment configuration library.

[0031] The second aspect of the present invention discloses a system for constructing a network security training platform; the system comprises:

[0032] The configuration information acquisition module is configured to acquire a plurality of device information from the device information library according to the user operation action on the interactive interface, and generate network topology configuration information according to the plurality of device information;

[0033] A generation module is configured to parse the network topology configuration information to obtain topology connection information, and generate a network configuration file for each device and a script command generated by the terminal according to the topology connection information and corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library;

[0034] A network environment construction module is configured to generate a network topology according to the network configuration files of each device to construct the network environment of the network security training platform;

[0035] A terminal environment construction module is configured to generate a corresponding virtual machine according to the script command generated by the terminal to construct the terminal environment of the network security training platform;

[0036] And, the automatic detection module is configured to detect the connectivity between the network environment and the terminal environment to achieve the interconnection and interoperability of physical devices and virtual devices in the network security training platform.

[0037] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the method for constructing a network security training platform in any one of the first aspects of the present disclosure are implemented.

[0038] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for constructing a network security training platform in any one of the first aspects of the present disclosure are implemented.

[0039] The present invention first provides users with equipment selection, configuration parameters, network topology diagram construction, and definition of virtualized terminals according to the equipment information list in the equipment information library; secondly, provides physical equipment configuration parameters according to the corresponding connection information between each physical equipment port and the fully connected switch port in the environment configuration library; then detects the user operation triggered in the graphical editing interface, and generates configuration files corresponding to each device according to the user operation; finally, generates corresponding virtual machine terminals and virtual network topologies according to the configuration files, and uses the serial port control server to configure the physical equipment and the fully connected switch, and connects the physical equipment to the virtual network, thereby completing the construction of a virtual-real network security training platform.

[0040] In summary, the scheme proposed in the present invention can construct a network environment with different characteristics according to training needs and user configuration, thereby improving the intuitiveness of the network security training platform construction process; it can realize the interconnection and interoperability of physical devices with virtualized devices and terminals, thereby improving the realism and integrity of the network security training platform construction. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A flowchart of a method for constructing a network security training platform according to an embodiment of the present invention;

[0043] Figure 2 A structural diagram of a system for building a network security training platform according to an embodiment of the present invention;

[0044] Figure 3 The figure is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0046] A first aspect of the present invention discloses a method for constructing a network security training platform. Figure 1FIG. 1 is a flow chart of a method for constructing a network security training platform according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0047] Step S1, acquiring multiple device information from a device information library according to a user operation action on an interactive interface, and generating network topology configuration information according to the multiple device information;

[0048] Step S2: parsing the network topology configuration information to obtain topology connection information, and generating a network configuration file for each device and a script command generated by the terminal according to the topology connection information and corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library;

[0049] Step S3, generating a network topology according to the network configuration files of each device to construct a network environment of the network security training platform;

[0050] Step S4, generating a corresponding virtual machine according to the script command generated by the terminal to construct a terminal environment of the network security training platform;

[0051] Step S5: Detect the connectivity between the network environment and the terminal environment to achieve interconnection and interoperability of physical devices and virtual devices in the network security training platform.

[0052] In step S1, a plurality of device information is acquired from a device information library according to a user operation action on an interactive interface, and network topology configuration information is generated according to the plurality of device information.

[0053] In some embodiments, in the step S1, a user operation action on the interactive interface is detected; a corresponding operation action identifier is obtained according to the user operation action; and a plurality of device information is obtained from the device information library according to the operation action identifier.

[0054] Specifically, a user operation triggered in a graphical interactive interface is detected, and a configuration file is generated according to the user operation, wherein the configuration file is used to represent the network topology of the network security training platform.

[0055] The graphical interactive editing interface provides a device library composed of various entities, such as switches, routers, servers, and terminals. The list of these devices is stored in the device information library, including information such as device model, version, port type, quantity, etc. The graphical interactive interface reads the device information in the device information library, allowing users to select the corresponding device from the device list and configure the device parameters, such as the IP address of the device port, routing protocol, etc.; users can also define terminals, such as virtual machines, containers, etc., and put the terminals into the corresponding network locations, and configure the terminal parameters, such as IP addresses, etc. At the same time, users can also customize devices as needed and add new device information to the device information library. In the graphical interactive interface, users can quickly and conveniently configure the network topology in the workspace through simple drag and drop operations, and can also set the properties of various network devices in the network. By running the graphical interactive interface and detecting the user operations triggered in the editing area of ​​the interactive interface, the corresponding network topology configuration file is generated according to the detected user operations to represent the entire network topology of the network security training platform.

[0056] In an embodiment of the present invention, based on a graphical interactive interface, a user can intuitively and conveniently drag and drop to generate a realistic and complete network topology of a network security training platform according to the actual network environment, thereby achieving a what-you-see-is-what-you-get network topology construction and providing an excellent user experience.

[0057] In step S2, the network topology configuration information is parsed to obtain topology connection information, and a network configuration file for each device and a script command generated by the terminal are generated according to the topology connection information and the corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library.

[0058] In some embodiments, in the step S2, the network topology configuration information is parsed to obtain topology connection information, the names of the components involved, and the corresponding component configuration information, wherein the topology connection information includes information of each node and each link involved in the network topology;

[0059] Generate a network configuration file for each device according to the topology connection information combined with corresponding connection information of the physical device port and the fully connected switch port stored in the environment configuration library, wherein the network configuration file for each device includes a virtual device configuration file, a physical device configuration file and a terminal configuration file;

[0060] The corresponding relationship between the component name and the virtual machine template, the corresponding relationship between the component configuration information and the virtual machine configuration file are matched and integrated to obtain the script command generated by the terminal.

[0061] Specifically, according to the network topology configuration information, a configuration file corresponding to each device and a script command generated by the terminal are generated.

[0062] When processing the network topology configuration file generated by the graphical interactive interface, the information of each node and each link involved in the file is obtained by reading the network topology configuration file line by line. By parsing the topology connection information in the configuration file, combined with the corresponding connection information of the physical device port and the fully connected switch port stored in the environment configuration library, a virtual-real network configuration file is generated; by parsing the correspondence between the component name and the virtual machine template, and the correspondence between the component configuration information and the virtual machine configuration file, the script command generated by the terminal is integrated.

[0063] In step S3, a network topology is generated according to the network configuration files of the various devices to construct the network environment of the network security training platform.

[0064] In some embodiments, in the step S3, a network topology composed of virtual devices is constructed according to the virtual device configuration file;

[0065] Send the physical device configuration file to each physical device through the serial port control server and adjust the configuration parameters of each physical device;

[0066] The virtual local area network connected to the physical device port is adjusted according to the corresponding connection information of the fully connected switch port in the environment configuration library, so that each of the physical devices is included in the network topology.

[0067] Specifically, a network environment is generated based on configuration files corresponding to each device, and the network environment is used to build a virtual-real network environment.

[0068] The configuration files corresponding to virtual devices and physical devices are different. When generating a virtual-real network environment, first, according to the configuration files corresponding to the virtual devices, a network topology consisting only of virtual devices is constructed, such as different VxLANs composed of Open-vSwitch; then, the configuration files corresponding to the physical devices are sent to each physical device through the serial port control server to adjust the configuration parameters of the physical devices; secondly, based on the corresponding information of the fully connected switch ports in the environment configuration library, the VLANs connected to the ports of each physical device are adjusted so that each physical device is assigned to the corresponding network according to the configuration files; finally, the connectivity of the network is tested to ensure the interconnection and interoperability of physical and virtual devices.

[0069] In step S4, a corresponding virtual machine is generated according to the script command generated by the terminal to construct the terminal environment of the network security training platform.

[0070] In some embodiments, in step S4, a virtual machine is generated according to the script command generated by the terminal and in combination with a corresponding virtual machine template; and the generated virtual machine is configured into the network topology according to the terminal configuration file.

[0071] Specifically, the terminal environment is generated based on the script command generated by the terminal, and the terminal environment is used to generate a corresponding virtual machine.

[0072] According to the script commands generated by the terminal, combined with the corresponding virtual machine templates, such as Windows virtual machine templates, WEB virtual machine templates and container templates, terminals with corresponding functions are generated, and the generated terminals are configured to the corresponding network according to the configuration files corresponding to the terminals.

[0073] In step S5, the connectivity between the network environment and the terminal environment is detected to achieve interconnection and interoperability of physical devices and virtual devices in the network security training platform.

[0074] In some embodiments, in step S5,

[0075] The virtual machine selects one or more farthest path nodes from the network topology as destination nodes according to the configuration information in the network configuration files of each device, and uses an ICMP PING tool or a Traceroute tool to determine the network connectivity of the data packet transmitted to the destination node according to the response information of the forwarding node, so as to obtain the network transmission path.

[0076] Specifically, after the terminal is generated and configured, it is necessary to automatically detect the connectivity of the network to ensure the interconnection between the terminal environment and the network environment, so as to build a network topology of a certain scale and with high realism to meet the simulation requirements of the target network during network security training.

[0077] In some embodiments, before step S1, the method further includes:

[0078] Establishing a configuration parameter list for each virtual device and storing the list in the device information library;

[0079] Each of the physical devices is connected to a fully connected switch in a fully connected form, and the corresponding connection information between each physical device port and the fully connected switch port is classified and sorted, and a corresponding configuration parameter list is established to be uniformly stored in the environment configuration library.

[0080] Specifically, the network security training platform contains a variety of physical or virtual devices, which are classified according to type and purpose, and a configuration parameter list is established for each device. The list is uniformly stored in the device information library, which effectively improves the intuitiveness and convenience of users in building topological networks.

[0081] In the network security training platform, physical devices are connected to fully connected switches in a fully connected form. The corresponding information between the physical device ports and the fully connected switch ports is classified and organized, and a configuration parameter list is established for the network connection relationship of the physical devices. The list is uniformly stored in the environment configuration library, thereby effectively improving the convenience and reliability of physical devices accessing the network topology.

[0082] A second aspect of the present invention discloses a system for constructing a network security training platform. Figure 2 FIG. 4 is a structural diagram of a system for constructing a network security training platform according to an embodiment of the present invention; Figure 2 As shown, the system 200 includes:

[0083] The configuration information acquisition module 201 is configured to acquire multiple device information from the device information library according to the user operation action on the interactive interface, and generate network topology configuration information according to the multiple device information;

[0084] The generating module 202 is configured to parse the network topology configuration information to obtain topology connection information, and generate a network configuration file for each device and a script command generated by the terminal according to the topology connection information and the corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library;

[0085] The network environment construction module 203 is configured to generate a network topology according to the network configuration files of each device to construct the network environment of the network security training platform;

[0086] The terminal environment construction module 204 is configured to generate a corresponding virtual machine according to the script command generated by the terminal to construct the terminal environment of the network security training platform;

[0087] And, the automatic detection module 205 is configured to detect the connectivity between the network environment and the terminal environment to achieve the interconnection and interoperability of physical devices and virtual devices in the network security training platform.

[0088] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the method for constructing a network security training platform in any one of the first aspects of the present disclosure are implemented.

[0089] Figure 3 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Figure 3As shown, the electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0090] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a structural diagram of the part related to the technical solution of the present disclosure, and does not constitute a limitation on the electronic device to which the technical solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0091] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for constructing a network security training platform in any one of the first aspects of the present disclosure are implemented.

[0092] The present invention first provides users with equipment selection, configuration parameters, network topology diagram construction, and definition of virtualized terminals according to the equipment information list in the equipment information library; secondly, provides physical equipment configuration parameters according to the corresponding connection information between each physical equipment port and the fully connected switch port in the environment configuration library; then detects the user operation triggered in the graphical editing interface, and generates configuration files corresponding to each device according to the user operation; finally, generates corresponding virtual machine terminals and virtual network topologies according to the configuration files, and uses the serial port control server to configure the physical equipment and the fully connected switch, and connects the physical equipment to the virtual network, thereby completing the construction of a virtual-real network security training platform.

[0093] In summary, the scheme proposed in the present invention can construct a network environment with different characteristics according to training needs and user configuration, thereby improving the intuitiveness of the network security training platform construction process; it can realize the interconnection and interoperability of physical devices with virtualized devices and terminals, thereby improving the realism and integrity of the network security training platform construction.

[0094] Please note that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not 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. The above embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several variations and improvements can be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the patent in this application shall be based on the attached claims.

Claims

1. A method for constructing a network security training platform, characterized in that: The method comprises: Step S1, acquiring multiple device information from a device information library according to a user operation action on an interactive interface, and generating network topology configuration information according to the multiple device information; Step S2: parsing the network topology configuration information to obtain topology connection information, and generating a network configuration file for each device and a script command generated by the terminal according to the topology connection information and corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library; Step S3, generating a network topology according to the network configuration files of each device to construct a network environment of the network security training platform; Wherein, in the step S3, generating a network topology according to the network configuration files of each device to construct the network environment of the network security training platform specifically includes: Building a network topology composed of virtual devices according to the virtual device configuration file; Send the physical device configuration file to each physical device through the serial port control server and adjust the configuration parameters of each physical device; Adjusting the virtual local area network connected to the physical device port according to the corresponding connection information of the fully connected switch port in the environment configuration library, so that each of the physical devices is included in the network topology; Step S4, generating a corresponding virtual machine according to the script command generated by the terminal to construct a terminal environment of the network security training platform; Wherein, in the step S4, generating a corresponding virtual machine according to the script command generated by the terminal to construct the terminal environment of the network security training platform specifically includes: Generate a virtual machine according to the script command generated by the terminal and in combination with a corresponding virtual machine template; Configuring the generated virtual machine into the network topology according to the terminal configuration file; Step S5: Detecting the connectivity between the network environment and the terminal environment to achieve interconnection and interoperability of physical devices and virtual devices in the network security training platform; Among them, in the step S5, the connectivity between the network environment and the terminal environment is detected to achieve the interconnection and interoperability of physical devices and virtual devices in the network security training platform, specifically including: The virtual machine selects one or more farthest path nodes from the network topology as destination nodes according to the configuration information in the network configuration files of each device, and uses an ICMP PING tool or a Traceroute tool to determine the network connectivity of the data packet transmitted to the destination node according to the response information of the forwarding node, so as to obtain the network transmission path.

2. The method for constructing a network security training platform according to claim 1, characterized in that: In the step S1, multiple device information is obtained from the device information library according to the user operation action on the interactive interface, and network topology configuration information is generated according to the multiple device information, specifically including: Detecting user operation actions on the interactive interface; Obtaining a corresponding operation action identifier according to the user operation action; Acquire multiple pieces of device information from the device information library according to the operation action identifier.

3. The method for constructing a network security training platform according to claim 2, characterized in that: In the step S2, the network topology configuration information is parsed to obtain topology connection information, and a network configuration file for each device and a script command generated by the terminal are generated according to the topology connection information and the corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library, specifically including: Parsing the network topology configuration information to obtain topology connection information, names of components involved, and corresponding component configuration information, wherein the topology connection information includes information of each node and each link involved in the network topology; Generate a network configuration file for each device according to the topology connection information combined with corresponding connection information of the physical device port and the fully connected switch port stored in the environment configuration library, wherein the network configuration file for each device includes a virtual device configuration file, a physical device configuration file and a terminal configuration file; The corresponding relationship between the component name and the virtual machine template, the corresponding relationship between the component configuration information and the virtual machine configuration file are matched and integrated to obtain the script command generated by the terminal.

4. The method for constructing a network security training platform according to claim 3, characterized in that: Before step S1, the method further includes: Establishing a configuration parameter list for each virtual device and storing the list in the device information library; Each of the physical devices is connected to a fully connected switch in a fully connected form, and the corresponding connection information between each physical device port and the fully connected switch port is classified and sorted, and a corresponding configuration parameter list is established to be uniformly stored in the environment configuration library.

5. A system for constructing a network security training platform, characterized in that: The system comprises: The configuration information acquisition module is configured to acquire a plurality of device information from the device information library according to the user operation action on the interactive interface, and generate network topology configuration information according to the plurality of device information; A generation module is configured to parse the network topology configuration information to obtain topology connection information, and generate a network configuration file for each device and a script command generated by the terminal according to the topology connection information and corresponding connection information between the physical device port and the fully connected switch port stored in the environment configuration library; A network environment construction module is configured to generate a network topology according to the network configuration files of each device to construct the network environment of the network security training platform; Among them, generating a network topology according to the network configuration files of each device to construct the network environment of the network security training platform specifically includes: Building a network topology composed of virtual devices according to the virtual device configuration file; Send the physical device configuration file to each physical device through the serial port control server and adjust the configuration parameters of each physical device; Adjusting the virtual local area network connected to the physical device port according to the corresponding connection information of the fully connected switch port in the environment configuration library, so that each of the physical devices is included in the network topology; A terminal environment construction module is configured to generate a corresponding virtual machine according to the script command generated by the terminal to construct the terminal environment of the network security training platform; Among them, generating a corresponding virtual machine according to the script command generated by the terminal to build the terminal environment of the network security training platform specifically includes: Generate a virtual machine according to the script command generated by the terminal and in combination with a corresponding virtual machine template; Configuring the generated virtual machine into the network topology according to the terminal configuration file; An automatic detection module is configured to detect connectivity between the network environment and the terminal environment to achieve interconnection and interoperability of physical devices and virtual devices in the network security training platform; Among them, detecting the connectivity between the network environment and the terminal environment to achieve the interconnection and interoperability of physical devices and virtual devices in the network security training platform specifically includes: The virtual machine selects one or more farthest path nodes from the network topology as destination nodes according to the configuration information in the network configuration files of each device, and uses an ICMP PING tool or a Traceroute tool to determine the network connectivity of the data packet transmitted to the destination node according to the response information of the forwarding node, so as to obtain the network transmission path.

6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the method for constructing a network security training platform described in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method for constructing a network security training platform described in any one of claims 1 to 4 are implemented.