A self-organizing network distributed simulation system
Through a distributed architecture and an ad hoc network simulation system that dynamically elects the main control unit, the problem of the simulation system in the existing technology being unable to effectively simulate real traffic and centralized control overhead is solved, and the scalability and reliability of the simulation system is achieved, the host performance pressure is reduced, and the simulation consistency is improved.
Patent Information
- Application Number
- CN202211732462.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The existing mobile wireless ad hoc network simulation system cannot effectively simulate real traffic when verifying the on-demand startup protocol deployed by the node, and the centralized control controller is expensive. The reliability of the simulation system depends on the normal execution of the controller, resulting in excessive performance pressure and simulation consistency problems during large-scale networking of the simulation system.
Using a distributed architecture, through dynamic election of the main control unit, combining the distributed database and control units, simulation nodes, data plane channels and control plane channels on multiple hosts, network observation and control plane channels are realized from a global perspective, event communication and wireless processing modules are mounted on the simulation node, simulation traffic is isolated using overlay network channels, and simulation nodes are generated using lightweight containers to realize the loading and resource configuration of real network protocols.
It realizes the scalability of the simulation system, can flexibly deploy different network models, reduces the performance pressure of hosts, solves the reliability problem of centralized management and control type simulation systems, reduces the pressure of invalid data processing, and improves the consistency of simulation and the reliability of the simulation system.
Smart Images

Figure CN115915235B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer simulation, and particularly relates to a self-organizing network distributed simulation system. Background Art
[0002] A mobile wireless ad hoc network (MANET) is a wireless network with a fast-changing topology, where each mobile node is peer-to-peer and has limited communication computing capabilities and bandwidth. It can create and disconnect networks without any central node, relying neither on a fixed connection base station nor on a predefined topology. Due to its characteristic of mobile self-organization without a control center, the entire mobile network can quickly form a network with high reliability and strong anti-destruction ability. In addition, the communication between ad hoc network nodes includes not only the normal sending and receiving in a network but also a routing forwarding function, which multi-hop forwards data packets to the destination node to maintain normal network communication without additional nodes. These characteristics of independent network formation and self-organization play an important role in military networks that are fast-moving and have no special dependence on the deployment environment, large-scale cooperative unmanned aerial vehicle networking, sensor networks, and other applications.
[0003] For the model verification and standard confirmation of the ad hoc network model in MANET, the required QoS metrics include minimum power, fault tolerance, maximum bandwidth, packet collision probability, etc. To verify these metrics, the mobile wireless ad hoc network model needs to verify real traffic. For example, real-time network applications such as real-time audio and video conferencing and text messages have different bandwidth and delay requirements. Time-sensitive services are very sensitive to delay, while transmission-type services have high requirements for transmission bandwidth. In addition, there are many routing protocols being developed for wireless ad hoc networks to adapt to the dynamic topology and wireless channel changes of ad hoc networks. Demonstrating the effectiveness and feasibility of on-demand routing protocols in actual device networking requires real traffic driving. Secondly, for the robustness test of ad hoc networks with different node numbers and different noise interference environments, the link delay of a delay tolerant network (DTN) is unacceptable to the general network protocol stack. If real network devices or QEMU and VMware virtual machine simulation and emulation node deployment are used for the verification schemes of these scenarios, not only is the batch configuration of the kernel protocol stack cumbersome, the deployment parameters redundant, but also the network construction is not flexible enough, and it cannot be quickly updated every time the protocol architecture is upgraded.
[0004] Therefore, to validate the on-demand protocol startup of node deployments and to create simulation scenarios that can make decisions based on actual network traffic types, a simulation solution based on real-time traffic and capable of mounting real network protocols is required. Previous studies using simulation software such as Ns3, Opnet, and Exata have simplistically handled real-time traffic in simulation nodes, failing to consider the actual traffic and protocol packet processing. Their considerations of bandwidth and latency tend to be theoretical, as these are domain-specific and have relatively fixed and limited input variables, typically simulating and analyzing transmission and communication performance. Patent number CN112327667A, titled "Hard-in-the-loop Simulation Element Design Method for Large-Scale Unmanned Cluster Networks," considers integrating SDN architecture into the simulation. Each node is constructed using namespace-isolated containers, and the SDN controller uses OpenFlow to distribute control information to build, manage, and publish virtual topologies. However, the container node customization is only at the process level, requiring each host to establish a connection with the controller to manage all nodes, resulting in high controller overhead. Simulation reliability relies on the proper execution of the centralized controller. Summary of the invention
[0005] In response to the shortcomings of the existing technology, the present invention proposes a self-organizing network distributed simulation system, which includes: a distributed database and multiple hosts with distributed deployment; each host is deployed with a control unit, a simulation node, a data plane channel and a control plane channel; all control units select a main control unit through dynamic election, the main control unit observes and controls the entire network based on a global perspective, and the slave control unit is responsible for managing the resource control, protocol loading, service distribution and reporting of integrated data of all simulation nodes in the current host; the control plane channel is the communication carrier of the control unit, and the data plane channel is the communication carrier of wireless traffic between all simulation nodes, and the data plane and the network plane communicate through an overlay network channel; the simulation node is used to map the actual self-organizing network node, and the simulation node is mounted with an event communication module and a wireless processing module, the event communication module is used to process event messages transmitted by the control plane channel; the wireless processing module is used to process wireless data transmitted by the data plane channel.
[0006] Preferably, the process of all control units selecting a master control unit through dynamic election includes:
[0007] S1: After the control unit of each distributed host starts, it initiates a join session broadcast. Other hosts that receive the join session broadcast return a join session response.
[0008] S2: If the join session response contains the master control unit information and the control unit weight is less than or equal to the master control unit, the election operation will not be triggered and step S5 will be executed; otherwise, step S3 will be executed;
[0009] S3: The host that has just joined the session initiates an application for the master control operation and broadcasts an application message, which includes the current host ID and the request weight.
[0010] S4: All hosts perform the negotiation master control operation: The control unit receives the application message, compares the request weights of all application messages, and updates the host with the largest weight as the preset master control unit.
[0011] S5: All hosts perform the synchronization master control operation: After updating the master control unit, the master control unit broadcasts the unit synchronization broadcast information, and all hosts in the global session record all the unit synchronization broadcast information and return the confirmation information; when the master control unit receives the confirmation information from all hosts, the master control unit completes the confirmation.
[0012] S6: The slave control unit periodically sends a heartbeat packet to the master control unit. When a master control unit fails to respond to the heartbeat packet or a host with a weight greater than the current master control unit joins the session, the dynamic election is triggered again, and step S1 is executed.
[0013] S7: The master control unit periodically initiates a clock synchronization operation: The master control unit sends a clock synchronization request to the slave control unit, and the slave control unit returns the request after receiving it; the slave control unit records the time ts1 when it sends and returns the request, and the time tr1 when the master control node receives the return; the master control node records the time ts2 when it sends the request and the actual time tr2 when the slave control node receives the request; calculate the time deviation as Set the sending time of the master control unit plus the deviation value as the slave control unit time.
[0014] S8: The main controller address of the back-end proxy redirects the physical IP address of the master control unit.
[0015] Preferably, the control unit includes a network model configuration module, a node resource control module, a topology configuration and situation control module, a data collection and analysis module, and a service parsing and distribution module.
[0016] The network model configuration module is used to configure the network model and radio frequency parameters of the simulation nodes.
[0017] The node resource control module is used to configure the resource occupancy limit of the simulation nodes on the host.
[0018] The topology configuration and situation control module is used to trigger the node movement speed, as well as the situation coordinate pitch angle and deflection angle in real time.
[0019] The data collection and analysis module is used to collect link status, packet loss, delay, and wireless packet sending and receiving statistical data.
[0020] The service parsing and distribution module is used to parse the front-end simulation commands and deploy traffic services.
[0021] Preferably, a pre-computation multi-weight deployment algorithm is used to deploy simulation nodes on the host.
[0022] Preferably, the simulation node executes functions such as loading models at all levels, managing the survival time of nodes, resource configuration, and listening through a controller; the simulation node is used to receive event messages sent by the control unit, serialize and deserialize communication data, and store response event messages in the local distributed database for subsequent loading and uploading by the control unit; the simulation node is configured with resource occupancy limits, and each simulation node is independent.
[0023] Furthermore, the independence of each simulation node includes: the node itself stores in-band and out-of-band signals within the radio frequency range, which are classified as noise or wireless data processing according to the model definition; the wireless parameters of the current simulation node for other simulation nodes are calculated by itself according to the recorded status table, rather than being transferred by the master control calculation, enabling the simulation node to dynamically join or exit the ad hoc network.
[0024] Preferably, multiple probes are bound to the overlay network channel on the vxlan or bridge. When the overlay network channel forwards data packets, it simultaneously listens to and analyzes data within different protocol stacks, and saves the data to the corresponding distributed database according to the analysis results.
[0025] Preferably, the event communication module listens to the event messages transmitted on the control plane channel, correctly parses the event messages, sends an event reception response after successful parsing, and stores the event in the message queue; among them, the event messages include a timestamp, priority, message type, node number, and scenario number.
[0026] An ad hoc network distributed simulation system, characterized in that the wireless processing module listens to the wireless data transmitted on the data plane channel, correctly parses the wireless data, stores the parsing result in the message queue, and the message queue processes it according to the priority.
[0027] The beneficial effects of the present invention are as follows:
[0028] (1) The simulation system of the present invention has strong scalability and can flexibly deploy different network models to handle various real-time actual traffic and network protocols. The simulation nodes use highly customized lightweight user-state lxc, lxd, and docker containers to generate simulation nodes, enabling the nodes to load real network protocols, development models, and executable programs. The nodes share the kernel protocol stack dynamically loaded by the current host, and the resource configuration occupied by the simulation nodes, network protocol loading can be flexibly configured and modified through the control unit, solving problems such as excessive resource occupancy, slow simulation startup, and complicated hot update caused by using kernel virtualization methods such as kvm to make simulation nodes.
[0029] (2) The simulation system adopts a distributed architecture. Each host deploys a control unit to dynamically elect the main control unit of the current system, solving the reliability problem caused by the main control failure in other centralized management and control types of simulation systems. The distributed architecture deploys nodes on each physical host, which also reduces the host performance pressure when facing large-scale networked simulation. The simulation system also implements mechanisms such as event communication, event synchronization, and clock synchronization between distributions, solving the simulation consistency problem in distributed simulation.
[0030] (3) The simulation system designs a wireless processing module by reading and writing virtual network cards in the container, realizing functions such as channel simulation, simulated fading, delay and bandwidth simulation, open interface for the networking model, and sdr semi-physical access in the ad hoc network simulation. It can meet the simulation verification of the ad hoc network model and network protocol in mobile ad hoc networks.
[0031] (4) The present invention divides the simulation data into ordinary wireless traffic and event traffic through a multicast group, which will not cause the processing pressure of invalid data on the distributed hosts of each deployment control unit. The simulation traffic is specified to be transmitted to the corresponding simulation host through the overlay network instead of broadcasting the wireless traffic in the distributed system, reducing the forwarding pressure of the distributed hosts.
[0032] (5) The present invention can generate a simulation scenario through a mapping module according to other simulations such as Exata and ns-3 ad hoc network simulation scenario models, or import application-level digital simulation models. For the MAC model and link parameters, add the model startup and destruction processes according to the given template. Brief Description of the Drawings
[0033] Figure 1 It is the architecture diagram of the ad hoc network distributed simulation system in the present invention;
[0034] Figure 2 It is the main control unit election flow chart of the ad hoc network distributed simulation system in the present invention;
[0035] Figure 3 It is the simulation communication interaction diagram of the ad hoc network distributed simulation system in the present invention;
[0036] Figure 4 It is the wireless data processing diagram of the ad hoc network distributed simulation system in the present invention. Detailed Embodiment
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0038] The present invention proposes an ad hoc network distributed simulation system, as Figure 1 shown. The method includes the following: a distributed database and multiple hosts deployed in a distributed manner; a control unit, a simulation node, a data plane channel, and a control plane channel are deployed on each host; all control units elect a master control unit through dynamic election. The master control unit observes and controls the entire network from a global perspective, and the slave control unit is responsible for managing the resource control, protocol loading, service distribution, and reporting and integrating data of all simulation nodes within the current host; the control plane channel is the communication carrier of the control unit, and the data plane channel is the communication carrier of the wireless traffic between all simulation nodes. The data plane and the network plane communicate through an overlay network channel; the simulation node is used to map the actual ad hoc network node, and an event communication module and a wireless processing module are mounted on the simulation node. The event communication module is used to process the event messages transmitted by the control plane channel; the wireless processing module is used to process the wireless data transmitted by the data plane channel.
[0039] The front-end interface is connected to the current master control unit through the master control proxy service to generate a topology for the simulation scenario, monitor the scenario, and control the nodes, and provides a programmable access RESTful api to connect to the back-end proxy service. The back-end proxy always redirects to the master control unit of the simulation scenario, and the master control unit is dynamically elected by the simulation system from multiple control units; when generating the topology, the node execution process, network layer model, transport layer model, wireless ad hoc network model, and physical layer model can be configured. These can be selected from the node characteristics stored in the database, or can be read and stored in the node characteristic database by means such as manual import and real device monitoring. The simulation system of the present invention can set the actual deployed host for the nodes in the network topology, or let the system default assign them to the corresponding host according to the host performance weight. The node is deployed on which host, and the node is managed by the control unit of that distributed host.
[0040] The specific design of the ad hoc network distributed simulation system of the present invention is as follows:
[0041] Control unit:
[0042] The control unit is deployed on each physical host in the distributed system. Each control unit has a globally unique physical host MAC-to-mapped ID. The control unit includes a network model configuration module for configuring the network model and radio frequency parameters of each node; a node resource control module for configuring node resource usage limits on the host; a topology configuration and situation control module for real-time triggering of node movement speed, situation coordinate pitch angle, and yaw angle; a data acquisition and analysis module for collecting data such as link status, packet loss, latency, and wireless packet transmission and reception statistics; and a service parsing and delivery module for parsing front-end simulation commands and deploying traffic services. After system startup, a real-time dynamic election is initiated. The elected master control unit provides global observation and control of the entire network. The master control unit controls all simulated nodes within the current host and interacts with slave control units via RPC to issue operational signals. Slave control units manage resource control, protocol loading, service delivery, and aggregated data for all nodes within the current host. All slave control units are controlled and managed by the master control unit. They periodically obtain information such as node operating status, resource usage, link information, and reachable node paths and report it to the master control unit. After all control units are working, the entire simulation scenario can be deployed in a distributed system, realizing the topology deployment of the entire simulation network, viewing simulation information, performing event triggering, traffic import, simulation playback and other operations. Figure 2 As shown in the figure, the dynamic election process includes:
[0043] S1: After the control unit of each distributed host starts, it initiates a join session broadcast. Other hosts that receive the join session broadcast return a join session response.
[0044] After the control unit of each distributed host is started, it initiates a join session broadcast. Other hosts that receive the join session broadcast will return a join session response, informing the host receiving the broadcast message whether it is the main control unit; a host record table will be maintained and recorded between each host, and the unique identification number generated by the host Mac address will be counted.
[0045] S2: If the join session response contains the master control unit information and the control unit set weight is less than or equal to the master control unit, the election operation will not be triggered and step S5 will be executed; otherwise, step S3 will be executed.
[0046] S3: The host that has just joined the session initiates a request for master control and broadcasts a request message. The request message contains the current host ID and the requested weight.
[0047] S4: All hosts perform negotiation master operation: the control unit receives the application message, compares the request weights of all application messages, and updates the host with the largest weight as the preset master control unit; wherein the request weight depends on the host preset influence parameter and node ID.
[0048] S5: All hosts perform synchronous master control operations: After updating the master control unit, the master control unit broadcasts unit synchronization broadcast information, and all hosts in the global session record all unit synchronization broadcast information and return confirmation information; when the master control unit receives the confirmation information from all hosts, the master control unit completes the confirmation.
[0049] After updating or selecting a new master control unit, it is necessary to confirm the master control unit with all hosts in the global session. When the master control unit completes the confirmation, if a new control unit joins at this time, or the preset master control unit exits the session, or some nodes have not performed synchronization operations for too long, etc., then update the session memory of the local host and re - elect, that is, execute S1.
[0050] S6: The slave control unit (non - master control unit host) sends heartbeat packets to the master control unit at regular intervals. When a master control unit exits, that is, does not respond to the heartbeat packet, or a host with a weight greater than the current master control unit joins the session, the dynamic election is triggered again, and step S1 is executed.
[0051] When the master control unit is determined, the non - master control unit host will send heartbeat packets to the master control unit host at regular intervals to ensure the joining and exiting of each physical host, so as to obtain information such as host offline and host joining in the distributed system. When a master control unit exits or a host with a weight greater than the current master control unit joins the session, the dynamic election is triggered again.
[0052] S7: The master control unit initiates clock synchronization operations at regular intervals: The master control unit sends a clock synchronization request to the slave control unit, and the slave control unit returns the request after receiving it; the slave control unit records the time ts1 when it sends and returns, and the time tr1 when the master control node receives the return; the master control node records the time ts2 when it sends the request and the actual time tr2 when the slave control node receives the request; calculate the time deviation as Set the time of the slave control unit by adding the deviation value to the sending time of the master control unit.
[0053] When the master control unit is determined, the master control unit sends a clock synchronization request to the slave control unit, and the slave control unit returns the request after receiving it. Through the above - mentioned synchronization operation, the error can be avoided within within.
[0054] S8: The main controller address of the back - end proxy redirects the physical IP address of the master control unit.
[0055] After determining the master control unit, the main controller address of the back - end proxy redirects the physical IP address of the master control unit, providing a centralized - control - like interface for the front - end. When the above processes do not trigger the master control unit update process in S6 and S7, the simulation process will be started.
[0056] Simulation Node:
[0057] The simulation node is used to map real ad-hoc network nodes and serves as the basic unit of the simulation model. On it, functions such as receiving and sending wireless simulation data packets, resource configuration and limitation of nodes, kernel protocol stack for dynamic tailoring of access to physical hosts, generation and import of real-time network service data, semi-physical access interface, collection of node simulation data, and link status monitoring are implemented.
[0058] The simulation node executes functions such as loading models at all levels, managing the survival time of nodes, resource configuration, and listening through a controller. The simulation node can be used to receive event messages sent by the control unit, serialize and deserialize communication data, and in addition, store response event messages in the local distributed database for subsequent loading and uploading by the control unit. Each simulation node is independent. The node itself stores in-band and out-of-band signals within its radio frequency range, which are classified as noise or wireless data processing according to the model definition; the wireless parameters of the current simulation node for other simulation nodes are calculated by itself according to the recorded status table, and are not uniformly managed, calculated, and transmitted by the control unit, enabling the simulation node to dynamically join or leave the ad-hoc network. The simulation node is configured with resource occupancy limits. The simulation node presets resource control groups (Control Groups) with very high (100%), high (75%), medium (50%), low (30%), and very low (20%) resource occupancy. The pid of the parent process of the simulation node is dynamically bound to the preset resource control group to limit the cpu and memory resource occupancy of the node on the current deployed host. In response to high-concurrency and high-pressure scenarios, the control unit can also actively limit the resources occupied by the node.
[0059] The control unit of the distributed system needs to divide the simulation nodes into different hosts according to the multicast group virtual links constructed by the ad-hoc network to achieve load balancing. Therefore, the pre-computed multi-weight deployment algorithm is adopted for deploying simulation nodes on the host in the present invention. Specifically: First, the control unit will pre-compute the current wireless link status and abstract it as an undirected graph G=(V,E). In order to reduce the interference factors of simulation data, that is, to minimize the distributed communication cost, it is necessary to make the communication link edgeCut={e=(u,v)|e∈E,u∈P i ,v∈P j}(The product with the corresponding weight is as small as possible. Fuse the CPU (α) and memory (β) into the node weight X = a×α + b×β, and fuse the link bandwidth (γ) and link delay (ξ) according to the factor ratio into the edge weight Y = c×γ + d×ξ, (where the four factors a, b, c, and d are greater than or equal to 0, and satisfy a + b = 1, c + d = 1). After importing the calculated integrated weights, convert the entire graph into CSR format for storage. The control unit will divide the area according to the CSR data of the imported graph, and select the segmentation algorithm according to the graph node size. When the number of nodes is less than 1000 and the number of partitions is less than 8, use the breadth-first recursive algorithm of serial Metis. When the number of partitions is greater than 8, use the k-way algorithm of Metis. When the node scale is greater than 1000, use the graph partitioning algorithm of parallel computing ParMetis edge cutting. The constraint parameter is set to where w ixy represents the occupancy of the y-type resource of the i-th node of the x host, and T xY represents the total y-type resource of the x host, and Node x is the number of nodes under the x partition, and Nparts represents the number of distributed hosts. According to the partitioning result, substitute the nodes and resource occupancies of each partition into the above constraint formula. If the partitioning result F1 ≥ 1 or F2 ≤ 0.5, it is considered that the constraint parameter is not satisfied. The control unit will automatically adjust the weight ratios of the cpu memory in the node, the link bandwidth, and the link delay until the constraint function is satisfied. Finally, divide the subgraph according to the selected cut-edge scheme and deploy the simulation nodes.
[0060] Data plane channel and control plane channel:
[0061] The data plane channel is the communication carrier of the wireless traffic between simulation nodes. All simulation nodes join the selected traffic multicast group, and there are multiple multicast groups in the data plane channel. The encrypted and serialized simulation traffic of the simulation nodes will be encapsulated into multicast messages of the corresponding simulation multicast group.
[0062] The control plane channel is the communication carrier of all master control units and other control units. All control units join the same event multicast group, and the event messages will be encapsulated into multicast messages of the event in this multicast group.
[0063] Overlay network channel:
[0064] Overlay network channels serve as the communication carrier for data and control planes in the simulation, separating simulation data from physical host communication data and collecting simulation data for subsequent analysis. Specifically, overlay network channels carry control messages and wireless messages corresponding to different multicast groups. Because the simulation involves RPCs, event messages, and wireless simulation messages between control units, the control unit's forwarding functionality is offloaded to the overlay network channels that carry this data. The overlay network uses network virtualization technology to implement virtual network links across hosts, isolating simulation data from physical host communication data and is independent of the physical network topology between distributed hosts. By offloading this control unit's forwarding functionality to the overlay network channels that carry this data, the control unit can automatically learn the corresponding forwarding host based on the control message's multicast group's destination host, facilitating subsequent routing and allowing for flexible forwarding path designation. The network channels are bound to multiple probes on VXLANs (Virtual Extensible Local Area Networks) or bridges. When forwarding packets, the overlay network channels constantly monitor and analyze data within different protocol stacks, storing the analysis results in corresponding distributed databases. For example, the data can be differentiated and stored based on port numbers or IP layer network protocols.
[0065] Event communication module:
[0066] The event communication module, deployed on each simulation node, monitors and receives event messages from the control plane channel in real time, parses them correctly, and upon successful parsing, sends an event reception response and stores the event in a message queue. Event messages contain parameters such as timestamp, priority, message type, node ID, and scenario ID. This module uses control messages from the control unit to set simulation services to control the simulation nodes. These control messages are encapsulated into multicast messages for the corresponding multicast group, effectively reducing the number of broadcast event messages across multiple nodes. This module also handles consistency issues within the distributed simulation system: if a control unit fails to receive a response to an event message sent three times in a row, the event message will be retransmitted. If a timestamp expires, the message will be treated as invalid. To prevent the over-sending of short messages, when sending event messages, data of the same type with timestamps less than 1ms is appropriately merged, without exceeding the IP layer MTU. The event communication module stores data in a message queue, where wireless simulation data and event messages are processed sequentially based on priority, simulation message type, and enqueue order.
[0067] Wireless processing module:
[0068] The wireless processing module (wireless ad-hoc network module) is mounted to the simulation node. The wireless processing module listens for wireless data transmitted on the data plane channel, correctly parses the wireless data, and stores the parsing result in the message queue. The message queue processes the data according to the priority. Specifically: after the multicast wireless data packets listened by the wireless processing module are parsed, some wireless data packets are discarded due to reasons such as power and channel fading. The wireless communication group data that cannot be received is classified as noise for processing, and the correctly parsed wireless data will be stored in the message queue. The message queue processes the data according to the priority. The wireless processing module parses the simulation data in the message queue, parses and decrypts the phy and mac frame headers of the wireless model loaded by the corresponding simulation node, and uploads them to the wireless network card specified by the simulation node, and then enters the subsequent network layer protocol stack. The wireless ad-hoc network module also includes a sending part. The wireless ad-hoc network module will encapsulate the real data to be sent in the simulation node, serialize the corresponding ad-hoc network model MAC and PHY frames into simulation communication data and send it into the data plane channel, and provide an external interface to facilitate the mounting of third-party models. The external interface refers to a hook function similar to this, which can flexibly set the channel modulation simulation parameters and radio frequency model library of the radio frequency simulation, convert the serialized message of the physical layer transmission into an SDR device for transmission, access the simulation MAC layer data, and increase the simulation reliability.
[0069] When the dynamic election of the main control unit ends and no new election is triggered, the simulation system of the present invention starts to execute the simulation process, including the following content:
[0070] S9: Create simulation nodes. Generate nodes by configuring the node type, networking MAC model, and link parameters of the node through the front-end interface, and deploy the nodes according to the pre-computed multi-weight deployment algorithm. After that, the user can draw the topology on the interface, or import other simulation scenarios such as Exata and ns3 ad-hoc network simulation scenarios according to some templates such as mesh and star to construct the ad-hoc network topology. The simulation nodes are implemented using lightweight containers such as lxc, lxd, or docker, which isolate the cpu, memory, processes, and user command spaces, and isolate the host and simulation node resources. According to their resource occupancy, they can be deployed on the control units corresponding to different hosts in the distributed system. In addition, it is also possible to limit and monitor the cpu and memory resources occupied by the nodes for a preset or custom cgroups resource configuration group. It is also possible to execute the LKM dynamic loading protocol through the control unit to load the corresponding kernel modules to the physical host, and synchronously update the kernel protocol stack to the simulation node.
[0071] S10: Construct the data plane channel and the control plane channel. The custom simulation node will mount multiple ad hoc network models, which are uniformly processed by the corresponding wireless processing modules. The event communication module mounted on the simulation node processes event messages and interacts with the control unit. The carriers of these simulation data are the data and control plane channels, and the simulation node will automatically configure and join the overlay network channel created by the host. The network channel can be established using ovs or iproute2, such as the veth pair for point-to-point links and vxlan for cross-host connections. Different control units will add probes at all control channels of the host and at the data forwarding bridge to sniff and capture data, and perform preliminary filtering and collection of data according to the rules issued by the main control unit, and store it in the corresponding distributed database.
[0072] S11: The simulation node is equipped with an event communication module. The event communication module is the actuator of the control unit for the smallest unit of the ad hoc network, and completes basic control and viewing operations. As Figure 3 shown, after the event communication module establishes a connection with the control unit on the host, the simulation node continuously listens for real-time event message multicast packets. When the event communication module reaches the set response timestamp, it triggers a response to perform actual operations, such as changes in the situation of the node, predicted channel fading, antenna multiplexing, power increase and other events. The event message also includes a synchronization operation: wait for synchronization for the sent event message, and only after the main control confirms the receipt of the response and then sends the response packet, the received event will be officially started and queued into the message queue.
[0073] S12: The simulation node is equipped with a wireless processing module. After the simulation starts normally, the wireless processing module will process the wireless data multicast packets from the data plane channel. The simulation processing schematic diagram is as Figure 4 shown. Send and receive the ad hoc network wireless data of the corresponding model. For sending ad hoc network wireless data: the wireless processing module will read the sending data in real time and the data written in the network layer of the network card, perform corresponding MAC and PHY layer data encapsulation, add the corresponding simulation parameter serialization binary encoding, and then send it to the data plane channel to send a multicast event message packet. For receiving ad hoc network wireless data: Similarly, after the wireless processing module parses the multicast wireless data packets monitored by the data plane channel, it discards some wireless data packets due to reasons such as power and channel fading. The data that cannot be received and does not belong to this wireless communication group is classified as noise, and the correctly parsed wireless data will be stored in the message queue, and the message queue will be processed according to the priority.
[0074] S13: Start the service process of the simulation node. At this time, the previously set models such as the network layer model and the routing protocol process will be executed, and the sending and receiving of service data involved will also be carried out. For the data with simulation playback and simulation records, after preliminary processing, it will be written into the corresponding distributed database. The status of parameters such as link reliability, packet loss, and delay will also be uploaded to the slave control unit, and summarized by the master control unit for real-time monitoring and control of the entire ad hoc network, realizing the access verification of real-time traffic and constructing the basic nodes of the ad hoc network simulation.
[0075] The above-mentioned embodiments further elaborate on the purpose, technical solutions, and advantages of the present invention. It should be understood that the above-mentioned embodiments are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made to the present invention within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A self-organizing network distributed simulation system, characterized in that, include: Distributed database and multiple hosts with distributed deployment; each host is equipped with a control unit, simulation node, data plane channel, and control plane channel; All control units select a master control unit through dynamic elections. The master control unit observes and controls the entire network from a global perspective. The slave control units manage resource control, protocol loading, service delivery, and integrated data reporting for all simulation nodes within the current host. The control plane channel is the communication carrier for the control unit, and the data plane channel is the communication carrier for wireless traffic between all simulation nodes. The data plane and network plane communicate through overlay network channels. Simulation nodes are used to map real ad hoc network nodes. The simulation nodes are equipped with event communication modules and wireless processing modules. The event communication module is used to process event messages transmitted through the control plane channel. The wireless processing module is used to process wireless data transmitted through the data plane channel; The process by which all control units select the master control unit through dynamic election includes: S1: After the control unit of each distributed host starts, it initiates a join session broadcast. Other hosts that receive the join session broadcast return a join session response. S2: If the join session response contains the master control unit information and the control unit weight is less than or equal to the master control unit, the election operation will not be triggered and step S5 will be executed; otherwise, step S3 will be executed; S3: The host that just joined the session initiates a request for master control and broadcasts a request message containing the current host ID and request weight. S4: All hosts perform negotiation master control operation: The control unit receives the application message, compares the request weights of all application messages, and updates the host with the largest weight as the preset master control unit; S5: All hosts perform synchronous master control operations: After updating the master control unit, the master control unit broadcasts unit synchronization broadcast information. All hosts in the global session record all unit synchronization broadcast information and return confirmation information. When the master control unit receives confirmation information from all hosts, the master control unit completes the confirmation. S6: The slave control unit sends a maintenance heartbeat packet to the master control unit at regular intervals. When a master control unit does not respond to the heartbeat packet or a host with a weight greater than that of the current master control unit joins the session, dynamic election is triggered again and step S1 is executed; S7: The main control unit periodically initiates a clock synchronization operation: The main control unit sends a clock synchronization request to the slave control unit, and the slave control unit returns the request after receiving it; The slave control unit records the time ts1 when it sends and returns the request, and the time tr1 when the main control node receives the return; The main control node records the time ts2 when it sends the request and the actual time tr2 when the slave control node receives the request; Calculate the time deviation as Add the deviation value to the sending time of the main control unit and set it as the time of the slave control unit; S8: The physical IP address of the main controller address of the backend proxy redirects the main control unit.
2. The self-organizing network distributed simulation system according to claim 1, wherein The control unit includes a network model configuration module, a node resource control module, a topology configuration and situation control module, a data collection and analysis module, and a business analysis and delivery module; The network model configuration module is used to configure the network model and radio frequency parameters of the simulation node; The node resource control module is used to configure the resource occupation limit of the simulation node on the host; The topology configuration and situation control module is used to trigger the node movement speed and situation coordinate pitch angle and yaw angle in real time; The data collection and analysis module is used to collect link status, packet loss, delay, and wireless packet transmission and reception statistics; The service parsing and issuing module is used to parse the front-end simulation command and deploy traffic services.
3. The ad hoc distributed simulation system according to claim 1, characterized in that The simulation nodes are deployed on the host using a pre-calculated multi-weight deployment algorithm.
4. The self-organizing network distributed simulation system according to claim 1, characterized in that The simulation node executes functions such as loading models at all levels, managing the survival time of nodes, resource allocation, and listening through a controller; the simulation node is used to receive event messages sent by the control unit, serialize and deserialize communication data, and store the response event messages in the local distributed database for subsequent loading and uploading by the control unit; the simulation node is configured with resource occupancy limits, and each simulation node is independent.
5. A self-organizing network distributed simulation system according to claim 4, wherein The independence of each simulation node includes: the node itself stores signals inside and outside the radio frequency range, which are classified as noise or wireless data processing according to the model definition; the wireless parameters of the current simulation node for other simulation nodes are calculated by itself based on the recorded status table, rather than being calculated and transmitted by the master control, enabling the simulation node to dynamically join or exit the ad hoc network.
6. The self-organizing network distributed simulation system according to claim 1, characterized in that The overlay network channel binds multiple probes to the vxlan or bridge. When forwarding data packets, the overlay network channel listens to and analyzes the data in different protocol stacks at the same time, and saves the data to the corresponding distributed database according to the analysis results.
7. The self-organizing network distributed simulation system according to claim 1, characterized in that, The event communication module listens to the event messages transmitted on the control plane channel, correctly parses the event messages, sends an event reception response after successful parsing, and stores the event in the message queue; among them, the event messages include timestamp, priority, message type, node number, and scenario number.
8. The self-organizing network distributed simulation system according to claim 1, characterized in that, The wireless processing module listens to the wireless data transmitted on the data plane channel, correctly parses the wireless data, stores the parsing results in the message queue, and the message queue processes them according to the priority.
Citation Information
Patent Citations
Semi-physical simulation element design method for large-scale unmanned cluster network
CN112327667A
Simulation method for software-defined airborne ad hoc network
CN111683387A
Large-scale distributed virtualized network simulation method based on virtualized container
CN114745285A