Dynamic network simulation method and device, equipment and medium

By acquiring and analyzing network traffic characteristics, generating traffic templates and performing hardware timestamp injection and clock synchronization operations, the traffic feature simulation distortion and slow response problems in cloud mobile network simulation are solved, and high-precision network simulation and resource isolation are achieved.

CN120474932APending Publication Date: 2025-08-12启朔(深圳)科技有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510723238.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing cloud mobile network simulation technology has problems such as traffic feature simulation distortion, slow network dynamic response and serious interference from multiple tenants, which cannot meet the needs of high-precision simulation.

Method used

Obtain the original network traffic, extract key traffic characteristics, generate traffic templates, and ensure the time accuracy and priority control of data packet transmission through hardware timestamp injection and clock synchronization operations, and realize the refined management of traffic of different tenants.

Benefits of technology

It improves the network dynamic response speed, reduces resource interference from multiple tenants, meets the requirements of resource isolation of high-precision simulation, and realizes accurate simulation of time-sensitive traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005429892780000011
    Figure HDA0005429892780000011
  • Figure HDA0005429892780000021
    Figure HDA0005429892780000021
  • Figure HDA0005429892780000031
    Figure HDA0005429892780000031
Patent Text Reader

Abstract

The invention relates to the field of network communication, in particular to a dynamic network simulation method, device and equipment and a medium. According to the method, the original network traffic is firstly obtained, the key traffic features are extracted, the traffic template is generated based on the features, a transmission rule which is more practical can be formulated, and the accuracy of traffic feature simulation is improved. And secondly, operation is executed based on a flow template, a hardware timestamp is injected, a clock synchronization mechanism is combined, the time precision of a data packet in the transmission process is ensured, the network can quickly sense and respond to the link state change, and compared with a traditional network convergence algorithm, the routing re-calculation time is remarkably shortened, and the dynamic response speed of the network is improved. And finally, through hardware timestamp injection and clock synchronization operation, an accurate time reference is provided for data packet transmission, in combination with a transmission rule of a traffic template, fine management of traffic of different tenants can be realized, and the requirement of high-precision simulation for resource isolation is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communications, and in particular to a method, device, equipment and medium for simulating a dynamic network. Background Art

[0002] Traditional cloud phone network simulation solutions face numerous bottlenecks. Relying on the TC token bucket algorithm, they can only achieve basic bandwidth limitations and struggle to accurately simulate the microburst traffic characteristics of 5G slicing networks. For example, latency-sensitive TSN services exhibit packet loss simulation errors exceeding ±30% in V2X scenarios, compromising the credibility of algorithm verification.

[0003] The existing network convergence algorithm responds slowly to changes in link status. When the bit error rate (BER) is greater than 1e-5, route recalculation takes more than 1 second, resulting in prolonged service interruption. Furthermore, physical-level isolation technologies such as PCIeSR-IOV are not adopted, resulting in performance interference exceeding 20% when multiple tenants share resources, making it impossible to meet high-precision simulation requirements. Summary of the Invention

[0004] In view of this, an embodiment of the present invention provides a dynamic network simulation method, device, equipment and medium to solve the problems of traditional solutions of current cloud mobile phone network simulation technology, such as distorted traffic characteristic simulation, slow network dynamic response and serious interference of multi-tenant resources, which cannot meet the needs of high-precision simulation.

[0005] In a first aspect, an embodiment of the present invention provides a method for simulating a dynamic network, the method comprising:

[0006] Obtaining original network traffic and extracting key traffic features based on the original network traffic;

[0007] generating a traffic template including traffic transmission rules using the key traffic characteristics;

[0008] Performing data packet processing and hardware timestamp injection operations based on the traffic template to obtain a data packet with a timestamp;

[0009] A clock synchronization operation is performed using the data packet with the timestamp to obtain a clock-synchronized data packet, and the clock-synchronized data packet is transmitted according to the traffic transmission rule to complete the traffic simulation.

[0010] Furthermore, the generating of a traffic template including traffic transmission rules by using the key traffic characteristics includes:

[0011] Analyze traffic transmission patterns based on key traffic characteristics and obtain the opening and closing times of the time-aware shaper gate list;

[0012] Determining traffic transmission requirements based on the opening and closing times of the gating list and stability requirements;

[0013] Mapping the key traffic characteristics to priority queues and configuring corresponding weights based on traffic importance and traffic transmission requirements;

[0014] Calculate the guaranteed bit rate and maximum bit rate using key traffic characteristics to obtain bandwidth allocation rules;

[0015] Based on the opening time and closing time of the gating list, traffic transmission requirements, priority queue weights, and bandwidth allocation rules, a traffic template including traffic transmission rules is generated.

[0016] Furthermore, performing data packet processing and hardware timestamp injection based on the traffic template to obtain a data packet with a timestamp includes:

[0017] Load the eBPF program into the kernel;

[0018] Using the loaded eBPF program, traffic classification and marking operations are performed on data packets according to the traffic template rules. Data packets are mapped to the corresponding priority queues according to the priority parameters in the traffic template rules, and data packets marked with the priority queues are obtained.

[0019] For packets marked in the priority queue, the hardware timestamp injection operation is performed through the timestamp function to mark the precise time when the packet enters and leaves the network interface, and obtain a packet with a timestamp;

[0020] Perform rule verification on the packets with timestamps to check whether the packets meet the time window and priority constraints in the traffic template. If they meet the requirements, the packets with timestamps are output.

[0021] Furthermore, the performing a clock synchronization operation using the data packet with the timestamp to obtain a clock-synchronized data packet includes:

[0022] Performing hardware clock synchronization on packets with timestamps to obtain packets with time errors between network devices that are less than a preset value;

[0023] For data packets whose time error between network devices is less than the preset value, a software PTP client is deployed at the cloud phone application layer to perform software clock synchronization operations, eliminate the clock offset introduced by virtualization, and obtain clock-synchronized data packets.

[0024] Furthermore, transmitting the clock-synchronized data packets according to the traffic transmission rules to complete the traffic simulation includes:

[0025] Based on the time window in the traffic transmission rule, queue opening or closing operations are performed to obtain a packet flow that complies with time-aware scheduling;

[0026] Based on the data packet flow that complies with the time-aware scheduling, the low-priority frame transmission operation is interrupted for the data packet flow with a priority greater than a preset priority, thereby obtaining a data packet flow that is transmitted in order according to the priority;

[0027] Monitor the status of network links in real time. If the link bit error rate exceeds the threshold, perform routing adjustments to obtain the optimized packet flow.

[0028] The route-optimized data packet stream is transmitted to the target location to complete the traffic simulation.

[0029] Furthermore, performing the route adjustment operation to obtain a route-optimized data packet flow includes:

[0030] Analyze the current network topology and link status to obtain routing calculation results;

[0031] According to the routing calculation results, the routing table update operation is performed to obtain the updated routing table;

[0032] According to the updated routing table, the data packet transmission path adjustment operation is performed, the forwarding path of the data packet is re-planned, and the data packet flow after routing optimization is obtained.

[0033] Furthermore, the analysis of the current network topology and link status to obtain routing calculation results includes:

[0034] Analyze the current network topology and link status to obtain network node connection relationships, link bandwidth, latency, and bit error rate;

[0035] Based on the network node connection relationship, link bandwidth, delay, and bit error rate, the incremental shortest path priority calculation is performed to obtain the routing calculation result.

[0036] In a second aspect, an embodiment of the present invention provides a dynamic network simulation device, the device comprising:

[0037] An acquisition module, configured to acquire original network traffic and extract key traffic features based on the original network traffic;

[0038] A generating module, configured to generate a traffic template including traffic transmission rules using the key traffic characteristics;

[0039] A processing module, configured to perform data packet processing and hardware timestamp injection operations based on the traffic template to obtain a data packet with a timestamp;

[0040] The execution module is used to perform a clock synchronization operation using the data packet with the timestamp to obtain a clock-synchronized data packet, and transmit the clock-synchronized data packet according to the traffic transmission rule to complete the traffic simulation.

[0041] In a third aspect, an embodiment of the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0042] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.

[0043] The embodiment of the present application first obtains the original network traffic and extracts key traffic features. Based on the traffic template generated by these features, a transmission rule that is more in line with reality can be formulated to improve the accuracy of traffic feature simulation. Secondly, during the data packet processing process, operations are performed based on the traffic template and hardware timestamps are injected. Combined with the clock synchronization mechanism, the time accuracy of the data packet during transmission is ensured, so that the network can quickly perceive and respond to changes in link status. Compared with traditional network convergence algorithms, the routing recalculation time is significantly shortened, and the dynamic response speed of the network is improved. Finally, through hardware timestamp injection and clock synchronization operations, an accurate time reference is provided for data packet transmission. Combined with the transmission rules of the traffic template, refined management of traffic of different tenants can be achieved. Even in the case of multi-tenant shared resources, strict control of time and priority can be used to reduce mutual interference and meet the requirements of high-precision simulation for resource isolation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 is a flowchart of a method for simulating a dynamic network according to some embodiments of the present invention;

[0046] Figure 2 is a flow chart of another dynamic network simulation method according to some embodiments of the present invention;

[0047] Figure 3is a schematic diagram of the architecture of a dynamic network simulation system according to some embodiments of the present invention;

[0048] Figure 4 is a structural block diagram of a dynamic network simulation device according to an embodiment of the present invention;

[0049] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0051] According to an embodiment of the present invention, a method, apparatus, device and medium for simulating a dynamic network are provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0052] In this embodiment, a method for simulating a dynamic network is provided. Figure 1 FIG. 1 is a flow chart of a method for simulating a dynamic network according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0053] Step S101: Obtain original network traffic and extract key traffic features based on the original network traffic.

[0054] In the embodiment of the present application, first, a network data collection device (such as a network card, flow probe, etc.) is used to capture raw network traffic and obtain a set of unprocessed and complete network data packets. These packets contain various types of data transmitted on the network, including different protocols, source addresses, destination addresses, and other information.

[0055] Next, based on the raw network traffic data packets obtained, we use the CICFlowMeter tool to perform traffic analysis. This tool parses the data packets and extracts key traffic characteristics such as packet size, flow rate, and flow duration. Ultimately, we generate structured feature data, which provides basic data support for subsequent operations such as generating traffic templates.

[0056] Step S102: generating a traffic template including traffic transmission rules using key traffic characteristics.

[0057] In an embodiment of the present application, a traffic template containing traffic transmission rules is generated using key traffic characteristics, including: analyzing traffic transmission rules based on key traffic characteristics to obtain the opening time and closing time of the time-aware shaper gating list; determining the traffic transmission demand based on the opening time and closing time of the gating list and the stability requirement; mapping the key traffic characteristics to priority queues, and configuring corresponding weights according to the importance of the traffic and the traffic transmission demand; using the key traffic characteristics to calculate the guaranteed bit rate and the maximum bit rate to obtain the bandwidth allocation rule; generating a traffic template containing the traffic transmission rule based on the opening time and closing time of the gating list, the traffic transmission demand, the priority queue weight and the bandwidth allocation rule.

[0058] Specifically, we analyze traffic patterns based on key traffic features extracted from raw network traffic (such as packet size, flow rate, and flow duration). Through statistical and modeling approaches, we uncover traffic variation patterns and burst patterns along the temporal dimension. Based on these analysis results and in conjunction with the IEEE 802.1Qbv standard's requirements for time-aware shapers, we determine the open and close times for each queue in the gating list of the time-aware shaper, ultimately generating the timing parameters for the gating list.

[0059] Based on the acquired open and close times of the time-aware shaper gate list, and in combination with the network's requirements for traffic transmission stability (such as maximum allowable jitter range and transmission cycle consistency requirements), a traffic transmission demand analysis operation is performed. By evaluating the impact of gate list timing on traffic transmission continuity and latency, and integrating stability indicators, specific requirements such as traffic transmission cycle constraints and jitter limits are determined, resulting in clear traffic transmission demand parameters.

[0060] Based on the traffic type (such as voice, video, text, etc.) and service attributes contained in the key traffic characteristics, priority queue mapping is performed according to the IEEE802.1p standard, mapping different traffic types to corresponding priority queues (levels 0-7). Then, combined with the importance of the traffic (such as the criticality of real-time services) and the determined traffic transmission requirements (such as delay tolerance), the corresponding weight parameters are assigned to each priority queue, resulting in a complete priority queue weight configuration.

[0061] Bandwidth calculation is performed based on key traffic characteristics, such as traffic rate and packet size. By calculating the average and peak traffic rates over different time periods and combining them with the bandwidth requirements of the service, the guaranteed bit rate (CIR) is calculated, representing the minimum bandwidth that can be stably provided to the traffic. The maximum bit rate (EIR) is also determined, representing the maximum bandwidth that can be occupied by the traffic in the event of a burst. This results in bandwidth allocation rules tailored to different traffic types.

[0062] Priority queue weights and bandwidth allocation rules are used to generate a traffic template containing traffic transmission rules. This process combines the acquired open and close times of the time-aware shaper gate list, the determined traffic transmission requirements (such as period constraints and jitter limits), the configured priority queue weights, and the calculated bandwidth allocation rules. Traffic template generation is performed according to the IEEE 802.1Qbv standard. These parameters are arranged in a standard format to generate a traffic template containing complete traffic transmission rules, providing a basis for subsequent packet processing and traffic scheduling.

[0063] Step S103: performing data packet processing and hardware timestamp injection operations based on the traffic template to obtain a data packet with a timestamp.

[0064] In an embodiment of the present application, data packet processing and hardware timestamp injection operations are performed based on the traffic template to obtain a data packet with a timestamp, including: loading the eBPF program into the kernel; using the loaded eBPF program to perform traffic classification and marking operations on the data packet according to the traffic template rules, mapping the data packet to the corresponding priority queue according to the priority parameters in the traffic template rules, and obtaining a data packet marked with the priority queue; for the data packet marked with the priority queue, performing a hardware timestamp injection operation through the timestamp function, marking the precise time when the data packet enters and exits the network interface, and obtaining a data packet with a timestamp; performing a rule verification operation on the data packet with a timestamp to check whether the data packet meets the constraints of the time window and priority in the traffic template. If it meets the requirements, the data packet with a timestamp is output.

[0065] Step S104 , performing a clock synchronization operation using the data packet with the timestamp to obtain a clock-synchronized data packet, and transmitting the clock-synchronized data packet according to the traffic transmission rule to complete the traffic simulation.

[0066] In an embodiment of the present application, a clock synchronization operation is performed using a data packet with a timestamp to obtain a clock-synchronized data packet, including: performing a hardware clock synchronization operation on the data packet with a timestamp to obtain a data packet with a time error between network devices less than a preset value; for the data packet with a time error between network devices less than a preset value, a software PTP client is deployed at the cloud phone application layer to perform a software clock synchronization operation to eliminate the clock offset introduced by virtualization and obtain a clock-synchronized data packet.

[0067] Hardware clock synchronization is performed on time-stamped packets using the PTPv2 protocol supported by the Intel i210 NIC. The precise time synchronization mechanism of the PTPv2 protocol enables time information exchange and calibration between network devices, adjusting each device's local clock. During synchronization, the time error between network devices is monitored in real time, and synchronization parameters are continuously optimized until the time error between network devices is less than a preset value (e.g., 1μs), resulting in packets with the required time error.

[0068] Based on data packets with time errors between network devices less than a preset value, a software PTP client is deployed at the cloud phone application layer. The software PTP client exchanges time information with hardware-synchronized devices and analyzes the impact of clock drift caused by the virtualization environment. Software clock synchronization is then performed, using an algorithm to adjust the cloud phone application layer's clock to compensate for clock drift introduced by virtualization, ensuring time consistency within the cloud phone application layer. Ultimately, fully synchronized data packets are generated.

[0069] In an embodiment of the present application, clock-synchronized data packets are transmitted according to traffic transmission rules to complete traffic simulation, including: executing a queue opening or closing operation based on the time window in the traffic transmission rule to obtain a data packet flow that complies with the perceived scheduling; based on the data packet flow that complies with the time-aware scheduling, interrupting the low-priority frame transmission operation for the data packet flow with a priority greater than a preset priority to obtain a data packet flow transmitted in order according to priority; monitoring the status of the network link in real time, and if it is detected that the link bit error rate exceeds a threshold, performing a routing adjustment operation to obtain a data packet flow after route optimization; transmitting the data packet flow after route optimization to the target location to complete the traffic simulation.

[0070] Queue scheduling is performed using the IEEE 802.1Qbv mechanism, based on the time window specified by the traffic transmission rules in the traffic template (including parameters such as the opening and closing times of the TAS gating list). When the time window opens, the corresponding port queue is opened, allowing packets to pass; when the time window closes, the port queue is closed, pausing packet transmission. This allows precise control of packet transmission timing, resulting in a packet flow that meets time-aware scheduling requirements.

[0071] This system processes packet flows that comply with time-aware scheduling and, based on the IEEE802.1Qbu frame preemption mechanism, identifies packets within the flow with a priority greater than a preset priority (e.g., the priority for high-real-time services like voice and video). When a high-priority packet arrives, it interrupts the transmission of low-priority frames, pausing them to prioritize transmission. Once the high-priority packet is transmitted, transmission of low-priority frames is resumed, resulting in a prioritized packet flow.

[0072] Monitoring tools deployed at key network nodes (such as network probes and traffic analyzers) monitor network link status in real time and continuously collect link bit error rate data. Once the link bit error rate exceeds a preset threshold (such as 1e-5), incremental SPF calculation is immediately triggered. By analyzing the current network topology and link status, the routing table is updated and packet transmission paths are adjusted based on the updated routing table information, switching affected packets to more stable links for transmission, resulting in a route-optimized packet flow.

[0073] The optimized packet flow is transmitted over a network link to the target location (such as a test server or verification platform). During transmission, the packet's time synchronization and priority transmission characteristics are continuously guaranteed, ultimately achieving end-to-end time synchronization and traffic shaping. This generates TSN traffic that complies with the IEEE802.1 standard and outputs simulation results such as time accuracy, priority guarantee, and bandwidth utilization, completing the entire TSN traffic simulation process.

[0074] In an embodiment of the present application, a routing adjustment operation is performed to obtain a packet flow after routing optimization, including: analyzing the current network topology and link status to obtain a routing calculation result; performing a routing table update operation based on the routing calculation result to obtain an updated routing table; performing a packet transmission path adjustment operation based on the updated routing table to re-plan the forwarding path of the packet to obtain a packet flow after routing optimization.

[0075] Based on network topology data (node connectivity, link hierarchy) and link status information (bandwidth utilization, latency, bit error rate, packet loss rate, etc.) collected in real time by monitoring devices deployed in the network (such as SNMP agents or dedicated probes on routers and switches), topology analysis and link status assessment are performed through the Link State Database (LSDB) synchronization mechanism of routing protocols (such as OSPFv3). Using the Shortest Path First (SPF) algorithm or the incremental SPF algorithm, the shortest paths, optimal next hops, and link weights between network nodes are calculated, generating routing calculation results specific to the current network state (such as a list of optimal paths to each destination network).

[0076] Based on the route calculation results obtained in the first step (including information such as the destination network address, subnet mask, next-hop address, and outbound interface), a routing table update operation is performed through a routing protocol update message (such as OSPF's LSU message) or a locally configured interface. The newly calculated route entry is written to the router or switch's routing table, overwriting or adding the original route entry. At the same time, the optimal path is selected based on the route priority (such as administrative distance) and metric (such as cost), ultimately resulting in an updated routing table containing the latest routing information.

[0077] Using the updated routing table as the basis for forwarding, when a data packet enters a network device (such as a router), the device searches the routing table to obtain the optimal next-hop address and outbound interface corresponding to the destination network. For packets originally transmitted over a link with an excessive bit error rate, the new routing table entries pointing to other healthy links are used to adjust the transmission path and direct the packets to the new forwarding path. This hop-by-hop forwarding mechanism allows packets to avoid faulty or high-bit-error-rate links, ultimately resulting in a packet stream transmitted along the optimized path, ensuring that TSN traffic reaches its destination efficiently and stably.

[0078] In an embodiment of the present application, the current network topology and link status are analyzed to obtain a routing calculation result, including: analyzing the current network topology and link status to obtain network node connection relationships, link bandwidth, delay, and bit error rate; performing incremental shortest path priority calculation based on the network node connection relationships, link bandwidth, delay, and bit error rate to obtain a routing calculation result.

[0079] Based on real-time data collected by network management systems (such as the OpenDaylight controller) or routing protocols (such as BGP and OSPF), topology discovery and link status monitoring are performed. By parsing routing protocol messages (such as OSPF Hello messages and LSA updates) or SNMP query results, the IP address, interface information, and interconnectedness of each node in the network are extracted to construct a network topology. Furthermore, through active probing (such as ICMPEcho and Traceroute) or passive monitoring (such as traffic mirroring analysis), performance metrics such as bandwidth utilization, transmission delay, and bit error rate (BER) for each link are obtained. The result is structured data that includes network node connectivity, link bandwidth, delay, and bit error rate.

[0080] The incremental shortest path first (iSPF) algorithm is started using the network node connection relationship, link bandwidth, delay, and bit error rate obtained in the first step as input parameters. This algorithm only recalculates the affected routing paths for nodes or links that have changed in the network (such as links with bit error rates exceeding the standard), rather than recalculating the entire network topology. By converting indicators such as link delay and bit error rate into routing metrics (such as mapping the bit error rate to link weight, the higher the bit error rate, the greater the weight), a variant of the Dijkstra algorithm is used to quickly solve the shortest path between nodes, generating a routing calculation result that includes the destination network, next-hop address, and optimal path metric, providing an accurate basis for routing table updates.

[0081] The embodiment of the present application first obtains the original network traffic and extracts key traffic features. Based on the traffic template generated by these features, a transmission rule that is more in line with reality can be formulated to improve the accuracy of traffic feature simulation. Secondly, during the data packet processing process, operations are performed based on the traffic template and hardware timestamps are injected. Combined with the clock synchronization mechanism, the time accuracy of the data packet during transmission is ensured, so that the network can quickly perceive and respond to changes in link status. Compared with traditional network convergence algorithms, the routing recalculation time is significantly shortened, and the dynamic response speed of the network is improved. Finally, through hardware timestamp injection and clock synchronization operations, an accurate time reference is provided for data packet transmission. Combined with the transmission rules of the traffic template, refined management of traffic of different tenants can be achieved. Even in the case of multi-tenant shared resources, strict control of time and priority can be used to reduce mutual interference and meet the requirements of high-precision simulation for resource isolation.

[0082] As an example, Figure 2 As shown in the figure, 1. Use the CICFlowMeter tool to conduct in-depth analysis of raw network traffic data. By analyzing multiple dimensions of traffic information, such as source IP address, destination IP address, port number, protocol type, packet size, and flow duration, traffic characteristics can be accurately extracted. For example, for video streams, characteristics such as large packet size and relatively stable flow duration can be identified, providing basic data for subsequent traffic template generation.

[0083] 2. Based on the traffic characteristics extracted in the first step, traffic templates are designed and generated according to the IEEE802.1Qbv standard. Within the template, traffic priority parameters are clearly defined, such as assigning high priority to voice traffic. Time windows for traffic transmission are also defined, such as limiting the transmission of non-critical traffic to specific time periods. This allows for precise definition of traffic transmission timing and priority.

[0084] 3.e Inject the prepared eBPF program code into the kernel through a specific loading mechanism. Using the relevant interfaces provided by the Linux kernel, the eBPF bytecode is compiled and mounted to the corresponding network hook point (such as the XDP hook). This enables the eBPF program to start working as soon as the data packet enters the network interface, providing an operating environment for subsequent data packet processing based on traffic templates.

[0085] 4. Leveraging the hardware capabilities of the Intel i210 NIC, timestamps are injected into the packets processed in the previous steps. As packets enter and exit the network interface, the NIC, using its built-in precision timing mechanism, writes precise timestamp information into specific fields (such as custom extension fields) within the packet, accurately marking the packet's time dimension.

[0086] 5. The Intel i210 NIC supports PTPv2 (Precision Time Protocol version 2) for clock synchronization between network devices. Through the PTPv2 protocol's time information exchange mechanism, each network device continuously calibrates its local clock, ensuring consistent time references across the network. This minimizes inter-device time errors and ensures accurate transmission of time-sensitive traffic.

[0087] 6. Considering the potential clock skew introduced by the cloud phone virtualization environment, a software PTP client is deployed at the cloud phone application layer. This client exchanges time information with network devices that have synchronized their hardware clocks. Using specific algorithms and operations, it adjusts and compensates for the cloud phone application layer's clock, eliminating the clock skew introduced by virtualization and ensuring time consistency when processing data packets at the cloud phone application layer.

[0088] 7. Through the above series of steps, from traffic feature extraction to final clock synchronization, simulation of Time-Sensitive Network (TSN) traffic is achieved. The simulated traffic now features precise time stamping, strict priority control, and accurate time synchronization, meeting the TSN traffic requirements of the IEEE 802.1 standard and can be used in scenarios such as network performance testing and service verification.

[0089] Figure 3 The dynamic network simulation system architecture provided by the embodiment of this application is as follows Figure 3 As shown:

[0090] Monitoring layer: NetFlow + sFlow hybrid sampling monitoring module: Responsible for acquiring raw network traffic, using NetFlow and sFlow hybrid sampling technology to comprehensively monitor network traffic. Dynamic management of traffic is achieved through configuration and monitoring data.

[0091] The sampling rate is dynamically adjusted based on the actual network traffic conditions to ensure that key traffic characteristics can be obtained without excessively occupying resources.

[0092] It is specifically used to capture burst frame traffic in the network. This burst traffic information is an important component for extracting key traffic features.

[0093] Policy layer: JSONSchema-based dynamic network configuration engine: Leveraging key traffic characteristics obtained from the monitoring layer, dynamic network configuration is constructed based on JSONSchema. Traffic templates containing traffic transmission rules (such as latency budget and URLLC / mMTC slice bandwidth ratio) are generated.

[0094] Further refine the parameters in the traffic template, clarify the rules such as the delay budget related to 5G slicing, URLLC (ultra-reliable low-latency communication) and mMTC (massive machine-type communication) slice bandwidth ratio, and provide a strategic basis for subsequent data packet processing.

[0095] Execution layer: Traffic shaping module using Traffic Control (TC) and eBPF: Based on the traffic template generated by the policy layer, the module uses Traffic Control (TC) and eBPF to process packets, including traffic classification and marking. It also performs hardware timestamp injection to generate packets with timestamps.

[0096] Provides hardware-level virtualization support for operations such as packet processing and timestamp injection, ensuring that operations can be effectively executed in a virtual environment.

[0097] Achieve high-precision nanosecond timestamp injection to ensure the accuracy of data packet time marking.

[0098] Virtualization interface (PCIeSR-IOV): Through PCIe single-root I / O virtualization technology, independent VF (virtual function) resource allocation is achieved, connecting to external network simulation input, providing network resources for the cloud phone virtual network function node, ensuring that data packets with timestamps can be transmitted according to traffic transmission rules, and finally completing traffic simulation.

[0099] In this embodiment, a dynamic network simulation device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0100] This embodiment provides a dynamic network simulation device, such as Figure 4 Shown, including:

[0101] The acquisition module 401 is used to acquire original network traffic and extract key traffic features based on the original network traffic;

[0102] A generating module 402 is configured to generate a traffic template including traffic transmission rules using key traffic characteristics;

[0103] The processing module 403 is used to perform data packet processing and hardware timestamp injection based on the traffic template to obtain a data packet with a timestamp;

[0104] The execution module 404 is configured to perform a clock synchronization operation using the data packet with the timestamp to obtain a clock-synchronized data packet, and transmit the clock-synchronized data packet according to the traffic transmission rule to complete the traffic simulation.

[0105] In an embodiment of the present application, a generation module 402 is used to analyze traffic transmission patterns based on key traffic characteristics, obtain the opening and closing times of a time-aware shaper gating list; determine traffic transmission requirements based on the opening and closing times of the gating list and stability requirements; map key traffic characteristics to priority queues, and configure corresponding weights based on traffic importance and traffic transmission requirements; calculate guaranteed bit rates and maximum bit rates using key traffic characteristics to obtain bandwidth allocation rules; and generate a traffic template containing traffic transmission rules based on the opening and closing times of the gating list, traffic transmission requirements, priority queue weights, and bandwidth allocation rules.

[0106] In an embodiment of the present application, the processing module 403 is used to load the eBPF program into the kernel; using the loaded eBPF program, perform traffic classification and marking operations on the data packets according to the traffic template rules, map the data packets to the corresponding priority queues according to the priority parameters in the traffic template rules, and obtain data packets marked with the priority queues; for the data packets marked with the priority queues, perform a hardware timestamp injection operation through the timestamp function, mark the precise time when the data packets enter and exit the network interface, and obtain data packets with timestamps; perform rule verification operations on the data packets with timestamps to check whether the data packets meet the time window and priority constraints in the traffic template. If they meet the requirements, output the data packets with timestamps.

[0107] In an embodiment of the present application, execution module 404 is used to perform hardware clock synchronization operations on data packets with timestamps to obtain data packets with time errors between network devices that are less than a preset value; for data packets with time errors between network devices that are less than a preset value, a software PTP client is deployed at the cloud phone application layer to perform software clock synchronization operations to eliminate the clock offset introduced by virtualization and obtain clock-synchronized data packets.

[0108] In an embodiment of the present application, the execution module 404 performs a queue opening or closing operation based on the time window in the traffic transmission rule to obtain a data packet flow that complies with the time-aware scheduling; based on the data packet flow that complies with the time-aware scheduling, the low-priority frame transmission interruption operation is performed on the data packet flow with a priority greater than the preset priority to obtain a data packet flow that is transmitted in order according to the priority; the status of the network link is monitored in real time, and if it is detected that the link bit error rate exceeds the threshold, a routing adjustment operation is performed to obtain a data packet flow after route optimization; the data packet flow after route optimization is transmitted to the target location to complete the traffic simulation.

[0109] In an embodiment of the present application, module 404 is executed to analyze the current network topology and link status to obtain a routing calculation result; based on the routing calculation result, a routing table update operation is performed to obtain an updated routing table; based on the updated routing table, a data packet transmission path adjustment operation is performed to re-plan the forwarding path of the data packet to obtain a data packet flow after routing optimization.

[0110] In an embodiment of the present application, execution module 404 analyzes the current network topology and link status to obtain the network node connection relationship, link bandwidth, delay, and bit error rate; based on the network node connection relationship, link bandwidth, delay, and bit error rate, incremental shortest path priority calculation is performed to obtain the routing calculation result.

[0111] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).

[0112] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0113] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0114] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0115] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0116] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0117] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0118] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for simulating a dynamic network, characterized in that: The method comprises: Obtaining original network traffic and extracting key traffic features based on the original network traffic; generating a traffic template including traffic transmission rules using the key traffic characteristics; Performing data packet processing and hardware timestamp injection operations based on the traffic template to obtain a data packet with a timestamp; A clock synchronization operation is performed using the data packet with the timestamp to obtain a clock-synchronized data packet, and the clock-synchronized data packet is transmitted according to the traffic transmission rule to complete the traffic simulation.

2. The method according to claim 1, characterized in that The generating of a traffic template including traffic transmission rules by using the key traffic characteristics includes: Analyze traffic transmission patterns based on key traffic characteristics and obtain the opening and closing times of the time-aware shaper gate list; Determining traffic transmission requirements based on the opening and closing times of the gating list and stability requirements; Mapping the key traffic characteristics to priority queues and configuring corresponding weights based on traffic importance and traffic transmission requirements; Calculate the guaranteed bit rate and maximum bit rate using key traffic characteristics to obtain bandwidth allocation rules; Based on the opening time and closing time of the gating list, traffic transmission requirements, priority queue weights, and bandwidth allocation rules, a traffic template including traffic transmission rules is generated.

3. The method according to claim 1, characterized in that The performing of data packet processing and hardware timestamp injection operations based on the traffic template to obtain a data packet with a timestamp includes: Load the eBPF program into the kernel; Using the loaded eBPF program, traffic classification and marking operations are performed on data packets according to the traffic template rules. Data packets are mapped to the corresponding priority queues according to the priority parameters in the traffic template rules, and data packets marked with the priority queues are obtained. For packets marked in the priority queue, the hardware timestamp injection operation is performed through the timestamp function to mark the precise time when the packet enters and leaves the network interface, and obtain a packet with a timestamp; Perform rule verification on the packets with timestamps to check whether the packets meet the time window and priority constraints in the traffic template. If they meet the requirements, the packets with timestamps are output.

4. The method according to claim 1, wherein The step of performing a clock synchronization operation using the data packet with the timestamp to obtain a clock-synchronized data packet includes: Performing hardware clock synchronization on packets with timestamps to obtain packets with time errors between network devices that are less than a preset value; For data packets whose time error between network devices is less than the preset value, a software PTP client is deployed at the cloud phone application layer to perform software clock synchronization operations, eliminate the clock offset introduced by virtualization, and obtain clock-synchronized data packets.

5. The method according to claim 1, wherein The transmitting of the clock-synchronized data packets according to the traffic transmission rules to complete the traffic simulation includes: Based on the time window in the traffic transmission rule, queue opening or closing operations are performed to obtain a packet flow that complies with time-aware scheduling; Based on the data packet flow that complies with the time-aware scheduling, the low-priority frame transmission operation is interrupted for the data packet flow with a priority greater than a preset priority, so as to obtain a data packet flow that is transmitted in order according to the priority; Monitor the status of network links in real time. If the link bit error rate exceeds the threshold, perform routing adjustments to obtain the optimized packet flow. The route-optimized data packet stream is transmitted to the target location to complete the traffic simulation.

6. The method according to claim 5, characterized in that The performing of the route adjustment operation to obtain a route-optimized data packet flow includes: Analyze the current network topology and link status to obtain routing calculation results; According to the routing calculation results, the routing table update operation is performed to obtain the updated routing table; According to the updated routing table, the data packet transmission path adjustment operation is performed, the forwarding path of the data packet is re-planned, and the data packet flow after routing optimization is obtained.

7. The method according to claim 6, characterized in that The analyzing the current network topology and link status to obtain routing calculation results includes: Analyze the current network topology and link status to obtain network node connection relationships, link bandwidth, latency, and bit error rate; Based on the network node connection relationship, link bandwidth, delay, and bit error rate, the incremental shortest path priority calculation is performed to obtain the routing calculation result.

8. A dynamic network simulation device, characterized in that: The device comprises: An acquisition module, configured to acquire original network traffic and extract key traffic features based on the original network traffic; A generating module, configured to generate a traffic template including traffic transmission rules using the key traffic characteristics; A processing module, configured to perform data packet processing and hardware timestamp injection operations based on the traffic template to obtain a data packet with a timestamp; The execution module is used to perform a clock synchronization operation using the data packet with the timestamp to obtain a clock-synchronized data packet, and transmit the clock-synchronized data packet according to the traffic transmission rule to complete the traffic simulation.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and apparatus for network traffic simulation

    CN102204168A

  • Data center network traffic modeling method based on distributed system

    CN107896160A

  • Cloud network simulator

    CN120017526A

  • Dynamic traffic management for multi-access management services

    US20240267792A1