Network impairment simulation implementation method and system based on double cooperation modules

By deploying different network damage simulation configuration templates on Tofino chips and CPU chips, combining the advantages of both, the problems of single complex network damage simulation logic and insufficient data processing capabilities in the existing technology are solved, and efficient and accurate network damage simulation is achieved.

CN119892654APending Publication Date: 2025-04-25SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510036261.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing network damage simulator based on Tofino chips has problems such as single logic and insufficient data processing capabilities in complex network damage simulation, resulting in low efficiency and inaccurate simulation results.

Method used

The network damage simulation implementation method using dual-collaborative modules is used to deploy configuration templates for simple and complex network damage simulation on Tofino chip and CPU chip respectively, combining the advantages of both to achieve efficient simulation of network damage of different complexities.

Benefits of technology

It realizes efficient and accurate simulation of network damage of different complexity degrees, breaks through the limitations of hardware and programming, and improves the efficiency and accuracy of simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892654A_ABST
    Figure CN119892654A_ABST
Patent Text Reader

Abstract

The invention provides a network damage simulation implementation method and system based on double cooperation modules, and belongs to the technical field of internet network damage. Generating a first configuration template and a second configuration template based on the user damage instruction; carrying out network damage condition matching and task demand judgment on the network flow data packet, and processing the network flow data packet which meets a network damage matching condition and has a task demand of simple network damage simulation based on a first configuration template on the Tofino chip; based on a second configuration template on the CPU chip, processing the network flow data packet of which the task demand is simulated as the complex network damage; and finally, forwarding the network flow data packet meeting the network damage simulation task requirement to a receiver. According to the invention, on the basis of making full use of double-cooperation module processing, limitation of hardware and programming is broken through, and network damage simulation of different complexity degrees is efficiently and accurately realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet network damage, and in particular relates to a method and system for realizing network damage simulation based on dual collaborative modules. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Network impairment refers to the phenomenon of decreased data transmission efficiency, increased latency, unstable connections, and reduced service availability caused by adverse effects of factors such as network facilities, configuration, or external attacks during data communication. Simulating network impairment is of vital importance in many fields, especially in the development and testing stages of network applications. For example, through network impairment simulation, various problems that may occur in a real network environment can be simulated in a laboratory environment, such as bandwidth limitations, latency, packet loss, disorder, duplicate messages, bit errors, etc. This helps developers discover and fix potential problems before the product goes online, improving application stability and user satisfaction.

[0004] A network damage simulator is an instrument specially used to simulate the quality of wide area network links. Currently, network damage simulators usually use general-purpose chips such as CPUs or special-purpose integrated chips such as FPGAs to implement network damage; the former has low performance but low price, while the latter has high performance but high price. Therefore, Tofino-based programmable switches have become a potential third network damage simulator implementation solution with their high-performance packet forwarding capabilities and flexible programming capabilities.

[0005] However, although the programmable switch based on the Tofino chip can realize basic network damage simulation, it still has some technical problems, such as:

[0006] (1) The logic of network damage simulation is single. Regardless of the complexity of the network damage requirement, simulation can only be performed based on the same damage logic, which makes the simulation results inefficient and inaccurate, and thus only applicable to simple network damage simulation implementations.

[0007] (2) Weak data processing capability: When simulating complex network impairments (such as random delay impairments, disorder, etc.), a large amount of cache is generated, and the impairment configuration template based on the Tofino chip is difficult to store and calculate large amounts of data. Summary of the invention

[0008] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a network damage simulation implementation method and system based on dual collaborative modules, which can break through the limitations of hardware and programming on the basis of fully utilizing the dual collaborative module processing, and efficiently and accurately realize network damage simulation of different complexities.

[0009] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0010] A first aspect of the present invention provides a method for implementing network damage simulation based on dual collaborative modules.

[0011] A network damage simulation implementation method based on dual collaborative modules, comprising:

[0012] Receive a user damage instruction; generate and issue an damage configuration template based on the obtained user damage instruction, wherein the damage configuration template includes a first configuration template and a second configuration template;

[0013] Receive network flow data packets sent by the sender;

[0014] The network flow data packet is matched with network damage conditions and judged for task requirements. Specifically: if the network flow data packet does not meet the matching conditions for network damage, the network flow data packet is directly forwarded to the recipient; otherwise, the task requirements in the network flow data packet are judged. When the task requirement is a simple network damage simulation, the network damage simulation operation is directly performed based on the first configuration template; when the task requirement is a complex network damage simulation, the network damage simulation operation is performed based on the second configuration template;

[0015] After the network damage simulation operation, the network flow data packets that meet the network damage simulation task requirements are forwarded to the receiver.

[0016] Furthermore, the first configuration template is deployed on a Tofino chip, and the second configuration template is deployed on a CPU chip; the Tofino chip performs a simple network damage simulation operation based on the first configuration template, and the CPU chip performs a complex network damage simulation operation based on the second configuration template.

[0017] Furthermore, the simple network damage simulation includes packet loss and fixed delay, and the complex network damage simulation includes random delay, disorder and high-dimensional combined damage.

[0018] Furthermore, the network flow data packet is matched with the network damage condition. Specifically, it is queried whether there is a damage item in the network flow data packet that matches the configuration contained in the first configuration template. If so, it means that the network flow data packet meets the matching condition of the network damage; otherwise, it does not meet the matching condition.

[0019] Furthermore, after the network damage simulation operation, it is determined whether the network flow data packet meets the network damage simulation task requirements; if not, the network damage simulation operation is re-executed until it meets the network damage simulation task requirements.

[0020] Furthermore, after the network flow data packets that meet the requirements of the network damage simulation task are forwarded to the receiver, the processing status of the Tofino chip and the CPU chip, the statistical information of the network flow data packets and the damage simulation results are periodically collected and monitored to generate a damage result report and provide a visual interface.

[0021] A second aspect of the present invention provides a network damage simulation implementation system based on dual collaborative modules.

[0022] A network damage simulation implementation system based on dual collaborative modules, comprising:

[0023] The configuration template generation module is configured to: receive a user injury instruction; generate and issue an injury configuration template based on the obtained user injury instruction, wherein the injury configuration template includes a first configuration template and a second configuration template;

[0024] The data packet receiving module is configured to: receive a network flow data packet sent by a sender;

[0025] The network damage simulation module is configured to: match the network damage condition and judge the task requirement for the network flow data packet, specifically: if the network flow data packet does not meet the matching condition of the network damage, directly forward the network flow data packet to the recipient; otherwise, judge the task requirement in the network flow data packet, when the task requirement is a simple network damage simulation, directly perform the network damage simulation operation based on the first configuration template; when the task requirement is a complex network damage simulation, perform the network damage simulation operation based on the second configuration template;

[0026] The management center module is configured to: forward the network flow data packets that meet the network damage simulation task requirements to the receiving party after the network damage simulation operation;

[0027] An interface module, the interface module comprising a data interface and a management interface; wherein the data interface is used to connect the device under test and the target device; the management interface is connected to the management center module;

[0028] A storage module, the storage module includes a first memory and a second memory; wherein the first memory and the second memory are connected to the Tofino chip and the CPU chip respectively.

[0029] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the method for implementing network damage simulation based on dual collaborative modules as described in the first aspect of the present invention.

[0030] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the method for implementing network damage simulation based on dual collaborative modules as described in the first aspect of the present invention are implemented.

[0031] One or more of the above technical solutions have the following beneficial effects:

[0032] (1) Before performing network damage simulation, the present invention divides the tasks, that is, generates a first configuration template and a second configuration template based on the user damage instruction. The first configuration template and the second configuration template are used to process simple network damage simulation operations and complex network damage simulation operations, respectively. According to different task requirements, different damage logics are used for simulation, so that the simulation results are efficient and more accurate. Therefore, the present invention can efficiently and accurately realize network damage simulation of different complexities.

[0033] (2) The first configuration template of the present invention is deployed on the Tofino chip, and the second configuration template is deployed on the CPU chip. Specifically, the Tofino chip performs a simple network damage simulation operation based on the first configuration template, and the CPU chip performs a complex network damage simulation operation based on the second configuration template, which effectively combines the efficient packet forwarding capability of the Tofino chip and the flexible programming and computing capability of the CPU. Therefore, the present invention can break through the limitations of hardware and programming on the basis of making full use of the dual collaborative module processing, and realize the simulation of complex network damage functions.

[0034] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0036] Figure 1 This is a flow chart of a method for implementing network damage simulation based on dual collaborative modules in Embodiment 1 of the present invention.

[0037] Figure 2 This is an architecture diagram of a network damage simulation implementation system based on dual collaborative modules in Example 2 of the present invention.

[0038] Figure 3 Schematic diagram of the architectural relationship between the interface module and the memory in the second embodiment of the present invention. DETAILED DESCRIPTION

[0039] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0040] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0041] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0042] The overall idea proposed by the present invention: The present invention provides a method for implementing network damage simulation based on dual collaborative modules, which generates and issues a first configuration template and a second configuration template based on user damage instructions; the first configuration template and the second configuration template are deployed on the Tofino chip and the CPU chip, respectively. By combining the efficient data packet forwarding capability of the Tofino chip and the flexible programming and computing capability of the CPU, the simulation of complex network damage functions is achieved. Aiming at the resource and functional limitations of the current Tofino chip and CPU chip, the present invention designs a collaborative architecture. When the Tofino chip cannot efficiently process damage requests, it can forward data packets to the CPU for processing, thereby completing the simulation of complex network damage functions. Among them, the Tofino chip is a programmable Ethernet-specific integrated circuit; the CPU chip is a central processing unit (Central Processing Unit) chip.

[0043] Embodiment 1

[0044] This embodiment discloses a method for implementing network damage simulation based on dual collaborative modules.

[0045] like Figure 1 As shown, a network damage simulation implementation method based on dual collaborative modules includes:

[0046] Step S1, receiving a user damage instruction; generating and issuing an damage configuration template based on the obtained user damage instruction, wherein the damage configuration template includes a first configuration template and a second configuration template;

[0047] Step S2, receiving the network flow data packet sent by the sender;

[0048] Step S3, matching the network damage condition and judging the task requirement of the network flow data packet, specifically: if the network flow data packet does not meet the matching condition of the network damage, directly forward the network flow data packet to the recipient; otherwise, judging the task requirement in the network flow data packet, when the task requirement is a simple network damage simulation, directly executing the network damage simulation operation based on the first configuration template; when the task requirement is a complex network damage simulation, executing the network damage simulation operation based on the second configuration template;

[0049] Step S4: After the network damage simulation operation, the network flow data packets that meet the network damage simulation task requirements are forwarded to the receiver.

[0050] Based on the above process, the present invention can make full use of the dual collaborative module processing, break through the limitations of hardware and programming, and efficiently and accurately realize the simulation of network damage of different complexity. To facilitate the understanding of the technical solution of the present invention, the specific implementation steps in the technical solution of the present invention are further explained and illustrated below.

[0051] Step S1, receiving a user damage instruction; generating and issuing an damage configuration template based on the obtained user damage instruction, wherein the damage configuration template includes a first configuration template and a second configuration template.

[0052] Receive user damage instructions. Specifically, according to the real network scenario that the user needs to simulate, provide the user with different network damage function selection operation front ends, and receive the user damage instructions according to the user's selection or input result on the front end.

[0053] Based on the obtained user damage instructions, the damage configuration template is generated and issued. Specifically, according to the network damage task requirements, the damage functions to be implemented are divided into two parts: simple network damage simulation and complex network damage simulation. Among them, simple network damage simulation includes lightweight functions such as packet loss and fixed delay; complex network damage simulation includes random delay, disorder and high-dimensional combined damage.

[0054] For example, for packet loss damage, the task requirement for simple network damage simulation can be set to fixed probability packet loss damage, that is:

[0055]

[0056] Among them, P drop represents the fixed packet loss probability, N drop Indicates the number of packets discarded in a unit period, N total Indicates the total number of packets.

[0057] For the task requirements of complex network damage simulation, it can be set as packet loss damage with a packet loss probability that follows a normal distribution, that is:

[0058] P drop ~N(μ,σ 2 );

[0059] Among them, μ represents the mean number of packets discarded in a unit period, σ 2 Indicates the variance of the number of packets dropped per unit period.

[0060] Furthermore, the division of damage tasks is dynamically decided by the system control module according to the damage configuration parameters required by the user, and a first configuration template corresponding to the simple network damage simulation and a second configuration template corresponding to the complex network damage simulation are generated accordingly. Specifically, the first configuration template and the second configuration template are determined according to the user configuration parameters. Among them, the first configuration template includes the damage function code and parameter configuration corresponding to the simple network damage simulation, and the second configuration template includes the damage function code and parameter configuration corresponding to the complex network damage simulation.

[0061] Furthermore, the first configuration template is deployed on the Tofino chip, and the second configuration template is deployed on the CPU chip; wherein the Tofino chip performs a simple network damage simulation operation based on the first configuration template, and the CPU chip performs a complex network damage simulation operation based on the second configuration template.

[0062] Step S2: Receive the network flow data packet sent by the sender.

[0063] Receive the network flow data packet sent by the sender. Specifically: the data packet enters the switch through the physical port, and the corresponding port circuit performs signal detection and conversion on the data packet. Then the switch reads the header information of the data packet, such as source IP, destination IP, port number, protocol type, etc., and uses this to determine the relevant attributes of the data packet.

[0064] Step S3, match the network damage conditions and judge the task requirements for the network flow data packet. Specifically: if the network flow data packet does not meet the matching conditions of the network damage, the network flow data packet is directly forwarded to the recipient; otherwise, the task requirements in the network flow data packet are judged. When the task requirement is a simple network damage simulation, the network damage simulation operation is directly performed based on the first configuration template; when the task requirement is a complex network damage simulation, the network damage simulation operation is performed based on the second configuration template.

[0065] Step S3-1: The network flow data packet sent by the device under test is first received by the Tofino chip. The Tofino chip preliminarily analyzes the network flow data packet according to a preset first configuration template.

[0066] The network flow data packet is matched with the network damage condition. Specifically, it is checked whether there is a damage item in the network flow data packet that matches the configuration contained in the first configuration template. If so, it means that the network flow data packet meets the matching condition of network damage; otherwise, it does not meet the matching condition and directly enters the normal forwarding process to forward the network flow data packet to the target port and send it to the target device through the target port. The network damage condition matching process can be expressed as:

[0067]

[0068] Step S3-2: When the network flow data packet meets the matching condition of the network damage, the task requirements in the network flow data packet are judged.

[0069] If the network flow data packet meets the matching conditions of network damage and the judgment result of the task requirement in the network flow data packet is a simple network damage simulation, the simple damage logic processing is completed directly in the Tofino chip based on the first configuration template, including but not limited to packet loss, fixed delay and other operations, and the processed data packet is forwarded to the target port. Among them, the Tofino chip determines whether the task requirement in the network flow data packet is a simple network damage based on the parameters input by the user.

[0070] If the judgment result of the task requirement in the network flow data packet is complex network damage simulation, the network flow data packet is forwarded to the CPU chip for complex damage logic processing.

[0071] Step S3-3: Perform a network damage simulation operation based on the second configuration template.

[0072] The CPU chip is connected to the CPU chip through a high-speed PCIe bus, and then uses a communication mechanism based on the PCIe protocol to interact and communicate with the data; after receiving the network flow data packet forwarded by the Tofino chip, the CPU chip will perform complex damage logic processing according to the second configuration template. Specifically: for complex delay simulation, the CPU chip adds random delay time to the network flow data packet according to the input delay distribution parameters (such as the mean and variance of the normal distribution); for disorder simulation, the CPU chip maintains a disorder queue for the flow to be damaged, dynamically adjusts the sending order of the data packet, and ensures the implementation of disorder operation; for multi-dimensional combined damage, the CPU chip implements specific damage combination logic by superimposing multiple damage operations. After processing, the CPU chip returns the processed data packet to the Tofino chip.

[0073] Step S3-4: after the network damage simulation operation, determine whether the network flow data packet meets the network damage simulation task requirements; if not, re-execute the network damage simulation operation until it meets the network damage simulation task requirements.

[0074] The Tofino chip receives the data packets processed by the CPU chip and further completes the refined data packet processing logic, including adding tags to the data packets, counting damage information, etc. Subsequently, the Tofino chip performs a final check on the network flow data packets to confirm whether all damage configuration requirements are met, specifically:

[0075] 1) If the network flow data packet meets all the impairment configuration requirements, it is forwarded to the target port;

[0076] 2) If the network flow data packet still does not meet the configuration requirements, the data packet is forwarded to the CPU chip or its own storage unit through the recycling mechanism to continue to complete the unfinished damage task until all configuration requirements are met. The inspection process can be expressed as:

[0077]

[0078] Step S4: After the network damage simulation operation, the network flow data packets that meet the network damage simulation task requirements are forwarded to the receiver.

[0079] After forwarding the network flow data packet that meets the network damage simulation task requirements to the receiver, the sender will continue to send a probe data packet to periodically collect and monitor the processing status of the Tofino chip and CPU chip, the statistical information of the network flow data packet, and the damage simulation results; the receiver will generate a damage result report based on the statistical information of the probe datagram and provide a visual front-end interface.

[0080] Embodiment 2

[0081] This embodiment discloses a network damage simulation implementation system based on dual collaborative modules.

[0082] like Figure 2 As shown, a network damage simulation implementation system based on dual collaborative modules includes:

[0083] The configuration template generation module is configured to: receive a user injury instruction; generate and issue an injury configuration template based on the obtained user injury instruction, wherein the injury configuration template includes a first configuration template and a second configuration template;

[0084] The data packet receiving module is configured to receive the network flow data packet sent by the sender.

[0085] The network damage simulation module is configured to: match the network damage condition and judge the task requirement for the network flow data packet, specifically: if the network flow data packet does not meet the matching condition of the network damage, directly forward the network flow data packet to the recipient; otherwise, judge the task requirement in the network flow data packet, when the task requirement is a simple network damage simulation, directly perform the network damage simulation operation based on the first configuration template; when the task requirement is a complex network damage simulation, perform the network damage simulation operation based on the second configuration template, specifically:

[0086] The damage logic is written in the P4 programming language of the Tofino chip, and hardware registers and counters are used to control parameters such as packet loss probability and delay time. For packet loss simulation, periodic packet loss, fixed probability packet loss, and burst packet loss based on simple threshold judgment can be achieved. For delay damage, the recycling mechanism in the Tofino chip switching architecture is used to accurately increase the transmission delay of the data packet by controlling the forwarding path and processing time of the network flow data packet inside the switch. The Tofino chip is suitable for scenarios with high real-time requirements and relatively simple damage logic, which reduces the computing load of the CPU. The flexible programming and general computing capabilities of the CPU chip are used to process complex network damage functions, such as complex delay simulation, out-of-order simulation, and large-scale network damage logic combining multiple damage modes. For complex delay simulation, the CPU chip achieves precise control of delay distribution by dynamically allocating memory resources and adjusting queue order. For out-of-order simulation, custom data packet queues and priority rules are used to flexibly adjust the order in which data packets are dequeued. In addition, the CPU chip also supports large-scale multi-damage combination simulation, and meets the needs of high-concurrency damage tasks through nested damage logic and multi-threaded processing mechanisms. The CPU chip cooperates with the Tofino chip to leave simple tasks to the Tofino chip and offload complex tasks to the CPU chip, thereby achieving efficient utilization of the resources of the two chips and optimal performance allocation.

[0087] The management center module is configured to complete basic configuration tasks such as shelf initialization, simple and complex damage logic segmentation, and damage logic distribution, and report data such as device status, port traffic, and business statistics; after the network damage simulation operation, the network flow data packets that meet the network damage simulation task requirements are forwarded to the receiver.

[0088] Furthermore, the management center module serves as the management center of the entire system, and is responsible for providing a user-friendly interface, flexible damage configuration capabilities, and comprehensive system monitoring functions. Users submit damage test requirements through this module, such as specifying the matching rules, damage types, and specific parameters of data flows (such as packet loss probability, delay distribution, etc.); after the configuration is completed, a standardized damage configuration template will be generated and sent to Tofino and CPU subsystems through the management interface. At the same time, it can also monitor the operating status of the entire system in real time, including the execution of damage tasks and the utilization of equipment resources; in addition, after the simulation is completed, it can collect, organize and print test results, such as visual packet loss rate, delay distribution, and the error results between actual damage and configuration parameters, and realize external export analysis of simulation results through the data interface to output an overall test report.

[0089] The interface module includes a management interface and several data interfaces; wherein the data interface includes an input interface and an output interface; wherein the input interface and the output interface are used to connect the device under test and the target device respectively; the input interface and the output interface can be in the form of an optical port, an electrical port or other switching port. At the same time, the management interface is connected to the management center module.

[0090] A storage module, the storage module includes a first memory and a second memory; Figure 3 As shown, the Tofino chip has its own or extended memory (i.e., the first memory) for caching network flow data packets to be forwarded and processed and simple damage logic intermediate data, such as periodic packet loss counters, fixed delay parameters, etc.; the CPU chip external memory (i.e., the second memory) is used to support high-dimensional parameter storage and calculation of complex damage logic, such as random delay distribution parameters, disordered queue status, etc.

[0091] Embodiment 3

[0092] The purpose of this embodiment is to provide a computer-readable storage medium.

[0093] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in a method for implementing network damage simulation based on dual collaborative modules as described in the first embodiment of the present disclosure.

[0094] Embodiment 4

[0095] The purpose of this embodiment is to provide an electronic device.

[0096] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a method for implementing network damage simulation based on dual collaborative modules as described in Embodiment 1 of the present disclosure are implemented.

[0097] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0098] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0099] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A network damage simulation implementation method based on dual collaborative modules, characterized in that: include: Receive a user damage instruction; generate and issue an damage configuration template based on the obtained user damage instruction, wherein the damage configuration template includes a first configuration template and a second configuration template; Receive network flow data packets sent by the sender; The network flow data packet is matched with network damage conditions and judged for task requirements. Specifically: if the network flow data packet does not meet the matching conditions for network damage, the network flow data packet is directly forwarded to the recipient; otherwise, the task requirements in the network flow data packet are judged. When the task requirement is a simple network damage simulation, the network damage simulation operation is directly performed based on the first configuration template; when the task requirement is a complex network damage simulation, the network damage simulation operation is performed based on the second configuration template; After the network damage simulation operation, the network flow data packets that meet the network damage simulation task requirements are forwarded to the receiver.

2. A network damage simulation implementation method based on dual collaborative modules as claimed in claim 1, characterized in that: The first configuration template is deployed on a Tofino chip, and the second configuration template is deployed on a CPU chip; the Tofino chip performs a simple network damage simulation operation based on the first configuration template, and the CPU chip performs a complex network damage simulation operation based on the second configuration template.

3. A network damage simulation implementation method based on dual collaborative modules as claimed in claim 1, characterized in that: The simple network damage simulation includes packet loss and fixed delay, and the complex network damage simulation includes random delay, disorder and high-dimensional combined damage.

4. A network damage simulation implementation method based on dual collaborative modules as claimed in claim 1, characterized in that: The network flow data packet is matched with the network damage condition. Specifically, it is queried whether there is a damage item in the network flow data packet that matches the configuration contained in the first configuration template. If so, it means that the network flow data packet meets the matching condition of the network damage; otherwise, it does not meet the matching condition.

5. A method for implementing network damage simulation based on dual collaborative modules as claimed in claim 1, characterized in that: After the network damage simulation operation, determine whether the network flow data packet meets the network damage simulation task requirements; if not, re-execute the network damage simulation operation until it meets the network damage simulation task requirements.

6. A network damage simulation implementation method based on dual collaborative modules as claimed in claim 1, characterized in that: After forwarding the network flow data packets that meet the network damage simulation task requirements to the receiver, the processing status of the Tofino chip and CPU chip, the statistical information of the network flow data packets and the damage simulation results are periodically collected and monitored to generate a damage result report and provide a visual interface.

7. A network damage simulation implementation system based on dual collaborative modules, characterized in that: include: The configuration template generation module is configured to: receive a user injury instruction; generate and issue an injury configuration template based on the obtained user injury instruction, wherein the injury configuration template includes a first configuration template and a second configuration template; The data packet receiving module is configured to: receive a network flow data packet sent by a sender; The network damage simulation module is configured to: match the network damage condition and judge the task requirement for the network flow data packet, specifically: if the network flow data packet does not meet the matching condition of the network damage, directly forward the network flow data packet to the recipient; otherwise, judge the task requirement in the network flow data packet, when the task requirement is a simple network damage simulation, directly perform the network damage simulation operation based on the first configuration template; when the task requirement is a complex network damage simulation, perform the network damage simulation operation based on the second configuration template; The management center module is configured to forward the network flow data packets that meet the network damage simulation task requirements to the receiver after the network damage simulation operation.

8. A network damage simulation implementation system based on dual collaborative modules as claimed in claim 7, characterized in that: Also includes: An interface module, the interface module comprising a data interface and a management interface; wherein the data interface is used to connect the device under test and the target device; the management interface is connected to the management center module; A storage module, the storage module includes a first memory and a second memory; wherein the first memory and the second memory are connected to the Tofino chip and the CPU chip respectively.

9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the method for implementing network damage simulation based on dual collaborative modules as described in any one of claims 1 to 6 are implemented.

10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the method for implementing network damage simulation based on dual collaborative modules as described in any one of claims 1 to 6 are implemented.