Discrete event wireless network simulation event aggregation method and aggregation acceleration performance verification method
By storing and aggregating received packets in a wireless network, the problem of excessive number of events and long total simulation time in large-scale wireless networks is solved, and the acceleration of simulation computing and resource optimization are achieved.
Patent Information
- Application Number
- CN202210621239.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-02
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-06-02
AI Technical Summary
When simulating large-scale wireless networks or heavy load behaviors, excessive number of events and long total simulation time lead to limited improvement in computing performance.
The receiving packets are stored through the channel and the aggregate event is registered. When the receiving packet aggregation event is scheduled, the network receiving node batches all packets in the aggregate event, reducing redundant event processing.
It effectively reduces the number of discrete events, improves the speed of simulation calculation, and reduces the computing resources and cost requirements.
Smart Images

Figure CN115022913B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a discrete event wireless network simulation event aggregation method and an aggregation acceleration performance verification method, and belongs to the field of wireless communication and discrete event simulation. Background Art
[0002] Discrete event simulation is widely used in technical research fields such as wireless networks. When simulating large-scale wireless networks and heavy load behaviors, a large number of node packet transmission and reception will cause a lot of interference to the reception of packets by a single node, causing the total time of discrete events and simulation calculation to grow exponentially. Therefore, it is urgent to introduce simulation acceleration methods.
[0003] Parallel and distributed technology is regarded as the main acceleration method for discrete event simulation. Although parallel distributed simulation can expand the scale of wireless network simulation and handle a large number of receiving events generated in wireless simulation, its performance improvement comes at the cost of a large amount of computing resources and high-cost concurrent control.
[0004] The Time Wrap (TW) method was proposed to solve the problem of high-cost concurrency control, which introduces a roll-back mechanism to restore the causal relationship destroyed by relaxing time synchronization. However, when TW is used in heavily loaded wireless networks, frequent roll-back processing limits the expected improvement in computing performance.
[0005] In 2016, Marc Leinweber et al. proposed a novel discrete event simulation source code optimization idea, which mainly targets the target system state, combines related events, merges source code to implement operation instruction optimization, and gives full play to the inherent optimization capabilities of general compilers. Since most existing simulators are object-oriented, the simulation of wireless networks involves multiple object classes and cross-object function merging. After the code blocks are intertwined and merged, the storage space grows exponentially, so the scope of application of this idea is limited.
[0006] In summary, how to reduce redundant receiving events in discrete event wireless network simulation to increase the simulation speed has become an urgent problem to be solved by people in the industry. Summary of the invention
[0007] The present invention proposes a discrete event wireless network simulation receiving event aggregation method to solve the problem of too many events and too long total simulation time when simulating large-scale wireless networks or heavy load behaviors. The method includes 1) when a wireless network node sends a packet to a node-shared wireless channel, the channel stores the received packet; 2) registering a received packet aggregation event or updating the event; 3) when a received packet aggregation event is scheduled, the network receiving node wholesale processes all packets in the aggregation event.
[0008] First, the present invention proposes a method for channel storage receiving packets, comprising the following steps:
[0009] Step 1: When a wireless network node sends a packet to a shared channel, the channel needs to traverse all the receiving nodes to which it is connected;
[0010] Step 2: The channel determines whether the receiving node is the source node based on the source node address and the receiving node address in the packet. If the receiving node is the source node, the channel traverses the next node. If the receiving node is not the source node, the channel stores the packet and updates the packet aggregation event.
[0011] Step 3: When storing the packets, record the packet receiving time (P1), duration (P2), end time (P3) and the cumulative number of packets of the receiving node.
[0012] Furthermore, if the packet received by the receiving node is the first packet it receives, it registers a received packet aggregation event, and the trigger time (E0) of the event is set to the packet reception time (E0=P1). At the same time, the packet aggregation end time (E1) is recorded and set as the packet end time (E1=P3).
[0013] Furthermore, if the packet received by the receiving node is not the first packet it receives, the received packet aggregation event is updated, the event trigger time E0 is updated to E0=MIN(E0,P1), and the packet aggregation end time E1 is updated to E1=MAX(E1,P3), where MIN(a,b) means taking the minimum value from a and b, and MAX(a,b) means taking the maximum value from a and b.
[0014] Secondly, the present invention also provides a wholesale processing grouping method. When an aggregation event is scheduled, the accumulated groups recorded by the receiving node are equivalent to a group with a receiving time of E0 described in step 4 and an end time of E1 described in step 4 for processing.
[0015] Finally, the present invention provides a discrete event wireless network simulation event aggregation acceleration performance verification method, which is divided into the following steps:
[0016] Step 1, design a wireless site distribution scenario and implement the scenario on the NS-3 simulation platform. All sites are networked in a self-organizing manner. N source sites are distributed on the circumference and periodically send UDP packets to site 0 at the center of the circle. Site 0 responds and receives the packets in a node unicast mode (ucast). The source site uses NS-3's UdpEchoClient, and the destination site 0 configures UdpEchoServer. To avoid the interference of multi-hop routing on performance verification, the circle radius is set to 5 meters, and the signal propagation loss uses NS-3's fixed receiving power model (FixedRssLossModel) to avoid interference from the capture effect.
[0017] Step 2, divide the simulated business flow configuration into two stages: in the first stage, each source station takes turns to send a UDP packet to the target site (site 0) for address resolution in a non-interfering manner, and in the second stage, N source sites send UDP packets simultaneously.
[0018] Step 3, add a scenario where the source site sends UDP packets in broadcast mode (bcast), in which case MAC layer backoff and retransmission are disabled.
[0019] Step 4: Calculate the total duration (T B )formula:
[0020] T B =T 0 +T 1 n 1 +∑ N≥k>1 n k T 2 (k)#(1) Where, T 0 Indicates the duration of the address resolution period, T 1 Indicates the calculation duration of a single group event, T 2 represents the wholesale simulation duration of the combined event, n 1 is the number of single group events, n k is the number of combined events containing k groups.
[0021] Step 5: Simulate and calculate the total time (T) using the original processing logic of NS-3 Y )formula:
[0022] The symbols represent the same as step 4.
[0023] Step 6: Give the calculation formula of the acceleration factor in the site unicast mode:
[0024] Among them, T Y It refers to the total simulation calculation time when using the original processing logic of NS-3 as described in step 5, T B It is the total duration calculated when the wireless network simulation event aggregation method is adopted.
[0025] Step 7: Give the calculation formula of the acceleration factor in the site broadcast mode:
[0026] When all source sites send UDP packets in IP broadcast mode, MAC layer backoff and retransmission are disabled. N =1, and n k =0, for all N>k≥1.
[0027] Step 8: Enable the packet capture tracking record of site 0, and use wireshark to parse the packets. Calculate the acceleration factor according to the acceleration factor calculation formulas in steps 6 and 7, and analyze the acceleration effect of the event aggregation solution.
[0028] At present, discrete event simulation systems all use a single event scheduling process. The present invention aggregates multiple events to accelerate simulation calculations. 1) By storing the cumulative packets received by each receiving node, the packet reception events are aggregated, and when the aggregated event is scheduled, the receiving node wholesale processes the cumulative packets recorded by the receiving node. 2) Event aggregation greatly reduces the number of discrete events and improves the simulation calculation speed. This solution is aimed at the computational model of discrete event simulation, so it has a wide range of extended application value and can work together with parallel distributed computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of the timing of events described in this application.
[0030] Figure 2 It is a processing flow chart of event aggregation proposed in this application.
[0031] Figure 3 It is a node topology diagram used for performance verification described in this application.
[0032] Figure 4 This is the result chart of the maximum concurrency and concurrency ratio of performance verification.
[0033] Figure 5 This is a graph showing the acceleration factor calculation results (unicast service).
[0034] Figure 6 This is a graph showing the acceleration factor calculation results (multicast service). DETAILED DESCRIPTION
[0035] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.
[0036] Figure 1 The event aggregation scheme is described using a scenario where nodes A and C send packets to node B, where the distances between nodes A and C and B are different. Figure 1 The lower part shows the event scheduling and generation process, where S X Indicates that node X sends a packet event, R X Indicates that node X receives the grouping event.
[0037] Figure 1 In the example, nodes A and C are respectively 0 and t 1The packet sending method is called at any time to send packets. The channel object simulates the broadcast process and copies the packets multiple times. Through event registration and delayed callback, it is delivered to the receiving node connected to the channel via the packet receiving method. The time for nodes B and C to process the packet event of node A is t respectively. 3 ,t 4 , the time for nodes A and B to process the packet of node C is t 2 ,t 5 . B is close to C, and the transmission delay is small, so the scheduled processing time of B receiving C's packet event will be earlier than t 3 The red boxes indicate events that can be aggregated.
[0038] In the simulator of single-threaded event-driven architecture, the event processing process is extracted in sequence Figure 1 The single event in the time domain is processed and processed six times in total. B Event, Node B can actually process both R B The events are merged into one event and processed, such as Figure 1 Shown in the black box.
[0039] This application proposes a discrete event wireless network simulation event aggregation method, the specific flow chart is as follows Figure 2 :
[0040] Step 1: When a wireless network node sends a packet to a shared channel, the channel needs to traverse all the receiving nodes to which it is connected;
[0041] Step 2: The channel determines whether the receiving node is the source node based on the source node address and the receiving node address in the packet. If the receiving node is the source node, the channel traverses the next node. If the receiving node is not the source node, the channel stores the packet and updates the packet aggregation event.
[0042] Step 3: When storing the packets, record the packet receiving time (P1), duration (P2), end time (P3) and the cumulative number of packets of the receiving node;
[0043] Step 4: When updating the group aggregation event, the receiving node registers the group aggregation event when it receives the first group. The trigger time (E0) of the event is set to the receiving time of the group (E0=P1). At the same time, the group aggregation end time (E1) is recorded and set to the end time of the group (E1=P3). After the receiving node receives subsequent groups, E0=MIN(E0,P1), E1=MAX(E1,P3), where MIN(a,b) means taking the smallest value from a and b, and MAX(a,b) means taking the largest value from a and b.
[0044] Step 5: When the aggregation event is scheduled, the accumulated group recorded by the receiving node is equivalent to a group whose receiving time is E0 described in step 4 and whose ending time is E1 described in step 4 and then processed.
[0045] Furthermore, the wireless module in the NS-3 simulator is selected to perform the accelerated performance verification of the event aggregation solution proposed in this application. The steps are as follows.
[0046] Step 1: Design site distribution scenarios such as Figure 3 . All sites are networked in an ad-hoc manner. N source sites are distributed on the circumference and periodically send UDP packets to site 0 at the center of the circle at the same time. Site 0 responds and receives. The source site uses NS-3's UdpEchoClient, and the destination site 0 configures UdpEchoServer. To avoid the interference of multi-hop routing on performance verification, the circle radius is set to 5 meters, and the signal propagation loss uses a fixed receiving power model (FixedRssLossModel) to avoid interference from the capture effect. The total number of sites N is variable from 1 to 800, the interval between sites sending packets is 1 second, and the packet length is 64 bytes.
[0047] Step 2: Conduct preliminary experiments and observe. Preliminary experiments have found that when N is large, concurrency conflicts continue to occur for a long time. Therefore, the simulated service flow configuration is divided into two stages: in the first stage, each source station takes turns to send a UDP packet to the target (site 0) in a non-interfering manner, and in the second stage, N source stations send UDP packets at the same time. The first stage constitutes the statistical background of the experiment. By increasing the number of packets sent in the second team segment, the interference of the first stage on the performance verification can be reduced.
[0048] As N increases, the number of concurrent packets in the simulation network increases. However, due to the control of MAC layer exponential backoff, the concurrency will be reduced. The result is as follows Figure 4 .from Figure 4 It can be seen that the maximum concurrency (M) is approximately linearly correlated with the number of sites, while the concurrency ratio (R) is linearly negatively correlated with the number of sites. The expected acceleration peak may appear in the simulation network with N<100.
[0049] Therefore, in order to increase the concurrency, the node is set to broadcast mode to reduce the impact of MAC layer backoff.
[0050] Step 3: Set two conditions, one is the node unicast mode, the comprehensive simulation mixed with the backoff process (ucast), and the other is the broadcast mode, the wholesale simulation with exponential backoff turned off (bcast).
[0051] Step 4: Accelerate performance testing and analysis.
[0052] According to the above simulation scenario design, let the total calculation time of batch simulation be T B , which includes the address resolution period (T 0 ), calculation time of single group event (T 1 ) and the wholesale simulation duration of the combined event (T 2 ).
[0053]
[0054] Among them, n 1 is the number of single group events, n k is the number of combined events containing k groups.
[0055] Under the same simulation conditions, the corresponding total calculation time of yans is:
[0056]
[0057] When all source sites send UDP packets in IP broadcast mode, MAC layer backoff and retransmission are disabled. N =1, and n k =0, for all N>k≥1. Referring to the definition of acceleration factor in parallel and distributed computing, let:
[0058]
[0059]
[0060] Among them, formula (3) corresponds to the comprehensive simulation of unicast mode and hybrid backoff process, and formula (4) corresponds to the wholesale simulation of broadcast mode and excluding backoff process.
[0061] Figure 5 The number of nodes (N) is fixed at 80, and the total duration of the comprehensive simulation is calculated. Figure 6 The number of groups (P src ) is fixed to 100, and the acceleration factors of comprehensive simulation and wholesale simulation vary with N.
[0062] from Figure 5 It can be seen that as the number of packets sent by the source station (P src ) increases, the total simulation time increases linearly. src When <100, the maximum comprehensive simulation acceleration factor (f) is about 1.3.
[0063] from Figure 6It can be seen that the maximum acceleration performance of the integrated simulation (ucast) occurs when N < 100. From the wholesale simulation (bcast) without MAC backoff, it can be more clearly seen that the event combination and wholesale simulation method for concurrent conflicts designed in this design has a calculation acceleration factor that increases with the increase of N, that is, the larger the network scale, the better the performance improvement of wholesale simulation. When N = 1000, f can reach 7.5.
[0064] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A discrete event wireless network simulation event aggregation method, It is characterized in that The steps include: S1. When a wireless network node sends a packet to a node shared channel, the channel stores the received packet; S2. Register to receive group aggregation events or update the event; S3. When a received packet aggregation event is scheduled, the network receiving node wholesale processes all packets in the aggregation event; In the above S1, the channel storing the received packets comprises the following steps: S1-1, when a wireless network node sends a packet to a shared channel, the channel needs to traverse all the receiving nodes to which it is connected; S1-2, the channel determines whether the receiving node is the source node according to the source node address and the receiving node address in the packet. If the receiving node is the source node, it traverses the next node. If the receiving node is not the source node, it stores the packet. S1-3, when storing a packet, record the packet receiving time P1, duration P2, end time P3 and the cumulative number of packets of the receiving node; In the above S2, the specific steps of registering the receiving group aggregation event are: if the group received by the receiving node is the first group it receives, registering the receiving group aggregation event, setting the trigger time E0 of the event to the receiving time E0=P1 of the group, and recording the group aggregation end time E1 and setting it to the end time E1=P3 of the group; In the above S2, the specific steps of updating the event are: if the packet received by the receiving node is not the first packet it receives, then the received packet aggregation event is updated, the event trigger time E0 is updated to E0=MIN(E0,P1), and the packet aggregation end time E1 is updated to E1=MAX(E1,P3), where MIN(a,b) means taking the minimum value from a and b, and MAX(a,b) means taking the maximum value from a and b; In the above S3, the specific steps of the wholesale processing include: when an aggregation event is scheduled, the accumulated groups recorded by the receiving node are equivalent to a group whose receiving time is the trigger time E0 and the end time is the group aggregation end time E1 for further processing.
2. A discrete event wireless network simulation event aggregation acceleration performance verification method, It is characterized in that The following steps are involved: Step 1, design a wireless site distribution scenario and implement it on the NS-3 simulation platform; all sites are networked in a self-organizing manner, N source sites are distributed on the circumference, and periodically send UDP packets to site 0 at the center of the circle at the same time, and site 0 responds to receive, which is the node unicast mode ucast; the source site uses NS-3's UdpEchoClient, and the destination site 0 configures UdpEchoServer; the circle radius is set to 5 meters, and the signal propagation loss uses NS-3's fixed receiving power model FixedRssLossModel; Step 2, divide the simulated service flow configuration into two stages: in the first stage, each source station takes turns to send a UDP packet to the target site 0 in a non-interfering manner for address resolution, and in the second stage, N source sites send UDP packets simultaneously; Step 3: Add a scenario where the source site sends UDP packets in broadcast mode (bcast). In this case, MAC layer backoff and retransmission are disabled. Step 4: Calculate the total duration T when the wireless network simulation event aggregation method is used B formula: Among them, T 0 represents the duration of the address resolution period, T 1 represents the calculation duration of a single packet event, T 2 represents the wholesale simulation duration of a combined event, n 1 is the number of single packet events, n k is the number of combined events containing k packets; Step 5: Simulate and calculate the total time T using the original processing logic of NS-3 Y formula: Wherein, the symbol represents the same as step 4; Step 6: Calculation formula for the acceleration factor in site unicast mode: Among them, T Y It refers to the total simulation calculation time when using the original processing logic of NS-3 as described in step 5, T B It is the total duration calculated when the wireless network simulation event aggregation method is adopted; Step 7: Calculation formula for the acceleration factor in site broadcast mode: When all source sites send UDP packets in IP broadcast mode, MAC layer backoff and retransmission are turned off; correspondingly, n N =1, and n k =0, for all N>k≥1; Step 8: Enable the packet capture tracking record of site 0 and use Wireshark to parse the packets; calculate the acceleration factor according to the acceleration factor calculation formula in steps 6 and 7, and analyze the acceleration effect of the event aggregation solution.
Citation Information
Patent Citations
Digital signal processing over data streams
CN109155763A