Message transmission physical simulation method

By setting time synchronization and generating specific distributed packets in a complex distributed network environment, the problem of difficulty in accurately simulating multi-node packet transmission in the existing technology is solved, and efficient network performance evaluation and simulation are achieved.

CN119728448APending Publication Date: 2025-03-28XIAN TECH UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411849451.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Existing software simulation methods are difficult to accurately simulate the entire process of message transmission in complex distributed network environments, especially in the interaction and transmission rules between multiple nodes.

Method used

By setting the transmission time slot and total number of nodes, all nodes are synchronized in time, packets that conform to Poisson distribution and gamma distribution are generated, and transmission is carried out according to the preset transmission path and packet arrival time to realize physical simulation.

Benefits of technology

Accurate simulation and real-time performance evaluation of message transmission in complex distributed network environments are realized, and the flexibility and efficiency of testing are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728448A_ABST
    Figure CN119728448A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of network testing. The invention provides a message transmission physical simulation method. According to the embodiment of the invention, devices of a plurality of nodes are collected for communication by utilizing a current device network environment, connection is carried out according to node configuration information, message packets are randomly generated according to Poisson distribution and gamma distribution, and the server node carries out to-be-transmitted data distribution for other slave nodes, so that the transmission efficiency is improved. Each node generates a data chain table and a buffer area for message transmission, and finally the end-to-end sending physical simulation purpose is achieved. The method is flexible and convenient to use, and can randomly select a network environment and be deployed on any system equipment. According to the method, software to be tested does not need to be installed and uninstalled at each network node during simulation testing, synchronous starting and stopping of testing tasks of all the network nodes can be achieved, a transmission process and a simulation result can be displayed on a system interface, and the method is easy to operate, accurate in testing result and high in efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In traditional network testing, in order to improve the flexibility and efficiency of testing, many network testing systems have begun to use software simulation technology to perform performance evaluation by simulating network nodes and message transmission processes. However, existing software simulation methods usually rely on virtual communication between single nodes and cannot truly reflect the interaction and transmission rules between multiple nodes in the network. Especially in a complex distributed network environment, how to accurately and comprehensively simulate the entire process of message transmission and perform real-time performance evaluation is still a technical problem that needs to be solved urgently.

[0003] Therefore, it is necessary to improve one or more problems existing in the above-mentioned related technical solutions.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the embodiments of the present disclosure is to provide a method for simulating physical transmission of a message, thereby overcoming one or more problems caused by limitations and defects of related technologies at least to a certain extent.

[0006] According to a first aspect of an embodiment of the present disclosure, a method for simulating a physical object of message transmission is provided, the method comprising: Set the sending time slot and the total number of nodes to synchronize the time of all nodes; the nodes include server nodes and slave nodes; The server node and the slave node generate a preset number of message packets and calculate the arrival time of the message packets; The server node and the slave node transmit the message packets according to the preset transmission path and message packet arrival time to perform simulation testing; Obtain the flow of message packets during the simulation test and analyze the flow of message packets to obtain a test process report.

[0007] Furthermore, the step of setting the transmission time slot and the total number of nodes and performing time synchronization on all nodes includes: Set the sending time slot and the total number of nodes, determine the server node and slave node to build the network to be tested; The master clock in the server node sends synchronization information; The slave clock in the slave node records the time when the synchronization information is received and sends a delay request message; The master clock in the server node returns a delayed response message to correct the time deviation between the server node and the slave node.

[0008] Furthermore, the steps of generating a preset number of message packets and calculating the arrival time of the message packets by the server node and the slave node include: Each node generates Poisson data and gamma data that conform to Poisson distribution and gamma distribution, and performs data filtering on the Poisson data and gamma data; wherein the number of Poisson data groups and gamma data groups corresponds; Assign the first Poisson data in the filtered Poisson data group to the server node, the second Poisson data to the first slave node, the third Poisson data to the second slave node, and so on; The first gamma data in the filtered gamma data group is assigned to the server node, the second gamma data is assigned to the first slave node, the third gamma data is assigned to the second slave node, and so on; Each node determines the number of packets generated per second based on its Poisson data; Each node calculates the packet arrival time based on its gamma data; Packet arrival time = current time sending slot + gamma data + one slot.

[0009] Furthermore, the format of the message packet is: Number, message length, message, and packet arrival time.

[0010] Furthermore, Poisson distribution is used to describe the number of packets generated per unit time; Suppose the average number of packets generated by each node per unit time is , then the event occurs The probability of this is:

[0011] in, is the number of packets generated by each node per unit time, is the average number of packets generated per unit time, is the base of natural logarithms, for The factorial of The gamma distribution is used to describe the arrival time of packets transmitted in a time slot; The probability density function of the gamma distribution is:

[0012] in, is a random variable, representing time or interval; is the shape parameter, is the scale parameter; is the gamma function, if , the gamma distribution degenerates into an exponential distribution.

[0013] Furthermore, the step of transmitting the message packet by the server node and the slave node according to the preset transmission path and message packet arrival time includes: The server node sets the transmission path for sending the message packet; The server node and each slave node perform data transmission based on the ADMA transmission mechanism, and a sending message packet arrival buffer and a receiving message packet storage area are pre-set in the server node and each slave node; The server node establishes a connection with each slave node; After the server node and each slave node are connected, the message packet is transmitted according to the preset transmission path and message packet arrival time, and the message packet sending time is recorded.

[0014] Further, the step of obtaining the flow of packets during the simulation test and analyzing the flow of packets to obtain a test process report includes: Obtaining the unsent message information in the message packet arrival buffer of each node; wherein the message information includes the message ID, message content information and arrival time; The message information of all nodes is analyzed to obtain a message delay histogram; wherein, delay time = message packet arrival time - message packet sending time.

[0015] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including: Processor; and A memory, configured to store executable instructions of the processor; The processor is configured to execute the steps of the method for physical simulation of message transmission in any one of the above embodiments by executing the executable instructions.

[0016] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects: In the embodiments of the present disclosure, through the above-mentioned method for physical simulation of message transmission, on the one hand, the current device network environment is utilized to collect devices of multiple nodes for communication, and connections are made according to the node configuration information, and message packets are randomly generated according to the Poisson distribution and the gamma distribution, and the server node distributes the data to be transmitted to other slave nodes, and each node generates a data linked list and a buffer for message transmission, and finally achieves the purpose of physical simulation of end-to-end transmission. On the other hand, the method is flexible and convenient to use, and the network environment can be selected at will and deployed on any system device. During the simulation test, it is not necessary to install and uninstall the software to be tested on each network node, and the test tasks of each network node can be started and stopped synchronously. The system interface can display the transmission process and the simulation results. The method is simple to operate, the test results are accurate, and the efficiency is high.

[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0019] Figure 1 A step diagram showing a method for simulating a physical object of message transmission in an exemplary embodiment of the present disclosure; Figure 2 A Poisson data distribution diagram of a server node in an exemplary embodiment of the present disclosure is shown; Figure 3 A flowchart showing the processing of Poisson data and gamma data in an exemplary embodiment of the present disclosure is shown; Figure 4 A Poisson data distribution diagram assigned to each node after filtering in an exemplary embodiment of the present disclosure is shown; Figure 5 A gamma data distribution diagram of a server node in an exemplary embodiment of the present disclosure is shown; Figure 6 A distribution diagram of gamma data assigned to each node after filtering in an exemplary embodiment of the present disclosure is shown; Figure 7 A schematic diagram showing the distribution of Poisson data and gamma data in an exemplary embodiment of the present disclosure; Figure 8 A schematic diagram showing the interconnection of various nodes in an exemplary embodiment of the present disclosure; Fig. 9A schematic diagram showing the structure of a network to be tested in an exemplary embodiment of the present disclosure is shown; Fig.10 A schematic diagram of packet generation in an exemplary embodiment of the present disclosure is shown; Fig.11 A schematic diagram of a message packet sending process in an exemplary embodiment of the present disclosure is shown; Fig.12 A schematic diagram of a message packet receiving process in an exemplary embodiment of the present disclosure is shown; Fig.13 A schematic diagram of receiving buffer messages in an exemplary embodiment of the present disclosure is shown; Fig.14 A histogram of message delay times of all nodes in an exemplary embodiment of the present disclosure is shown; Fig.15 A histogram of server node message delay time in an exemplary embodiment of the present disclosure is shown; Fig.16 A schematic diagram showing message delay time in an exemplary embodiment of the present disclosure is shown; Fig.17 A schematic diagram showing an interface of a server node in an exemplary embodiment of the present disclosure; Fig.18 A schematic diagram of a sub-node system interface in an exemplary embodiment of the present disclosure is shown; Fig.19 A schematic diagram of a detailed txt document on the server side of a subnode system in an exemplary embodiment of the present disclosure is shown; Fig. 20 A schematic diagram of detailed txt documents of other nodes in the sub-node system in an exemplary embodiment of the present disclosure is shown; Fig.21 A schematic diagram showing a computer-readable storage medium in an exemplary embodiment of the present disclosure; Fig. 22 A schematic diagram showing an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0021] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0022] In this example implementation, a method for simulating physical transmission of a message is first provided. The method can be applied to a terminal device, such as a mobile phone, a personal digital assistant, a laptop computer, a tablet computer, a smart watch, or other mobile terminal [flexibly adjusted according to specific circumstances, such as the terminal device is a server, etc.]. Figure 1 As shown in , the method may include the following steps: Step S101: Setting the sending time slot and the total number of nodes to synchronize the time of all nodes; wherein the nodes include server nodes and slave nodes; Step S102: the server node and the slave node generate a preset number of message packets and calculate the arrival time of the message packets; Step S103: the server node and the slave node transmit the message packet according to the preset transmission path and message packet arrival time to perform a simulation test; Step S104: Obtain the flow of message packets during the simulation test, and analyze the flow of message packets to obtain a test process report.

[0023] Through the above-mentioned message transmission physical simulation method, on the one hand, the current device network environment is used to collect devices of multiple nodes for communication, and connections are made according to the node configuration information. Message packets are randomly generated according to the Poisson distribution and the gamma distribution, and the server node distributes the data to be transmitted to other slave nodes. Each node generates a data linked list and a buffer for message transmission, and finally achieves the purpose of physical simulation of end-to-end transmission. On the other hand, this method is flexible and convenient to use, and the network environment can be selected at will and deployed on any system device. During the simulation test, it is not necessary to install and uninstall the software to be tested on each network node, and the test tasks of each network node can be started and stopped synchronously. The system interface can display the transmission process and the simulation results. The method is simple to operate, the test results are accurate, and the efficiency is high.

[0024] Next, we will refer to Figures 1 to 22 Each step of the above method in this example implementation is described in more detail.

[0025] In step S101, the time difference is calibrated using a clock server. IEEE 1588 Precision Time Protocol (PTP) is a high-precision clock synchronization protocol designed specifically for local area networks and industrial environments. PTP can accurately synchronize system time through the network, and is particularly suitable for environments that require microsecond-level synchronization accuracy. In the PTP protocol, network devices (such as switches, routers, etc.) and end devices (such as computers, servers, etc.) jointly participate in the time synchronization process.

[0026] The PTP system transmits time information to slave clock devices through one or more master clock devices. The master clock generally obtains time through an external time source (such as GPS or atomic clock), and the slave clock device adjusts according to the time information of the master clock. The PTP protocol communicates through timestamps. During the synchronization process, the master clock sends a synchronization message (Sync), the slave clock device records the time when the synchronization message is received, and then sends a delay request (Delay Request) message, and the master clock returns a delay response (Delay Response) message. In this way, the time deviation between devices can be corrected to achieve nanosecond synchronization accuracy. The protocol supports a delay compensation mechanism, that is, by calculating the delay of the message propagation in the network, the accuracy of clock synchronization can be corrected. In the absence of GPS devices, high-precision synchronization can be performed through existing LAN devices (switches, routers, etc.), and it has higher synchronization accuracy and flexibility. Its accuracy can usually reach microseconds or even sub-microseconds.

[0027] In this method, time base synchronization is the basis of TDMA system. To ensure synchronization of real data link and accurate alignment of received messages, time base synchronization has a complex system and algorithm. Each machine (node) has its own timing system. When sending a packet, it records the sending node time and the receiving timestamp respectively. The time difference can be seen by comparison. The transmission time can be ignored because the network speed is very high.

[0028] In step S102, Poisson distribution is used to describe the number of messages generated per unit time, such as Figure 2 As shown. If the average number of messages generated by each node in unit time is , then the event occurs The probability of this is:

[0029] in, is the number of packets generated by each node per unit time, is the average number of packets generated per unit time, is the base of natural logarithms (approximately equal to 2.71828), for The factorial of .

[0030] Gamma distribution is used to describe the specific time when a message is transmitted in a time slot. is the gamma function, defined as .if , the gamma distribution degenerates into an exponential distribution, showing the approximate graph of a Poisson distribution with a mean of 5. The probability density function of the gamma distribution is:

[0031] in, is a random variable representing time or interval.

[0032] It is the shape parameter.

[0033] is the scale parameter.

[0034] On each desktop, set up teams ADBS1, BDBS1, CDBS1; ADBS2, BDBS2, CDBS2. ADBS1 is on a node machine and is used to store the number of packets arriving in each cycle. ADBS2 is used to store the arrival time of each packet. The time follows the gamma distribution and is generated by the server. It is calculated from the start time of each frame. The other node machines are similar. The detailed data allocation and processing flow is as follows: Figure 3 shown.

[0035] The generated random numbers (reached number) are placed in ADBS1, BDBS1, and CDBS1 in turn according to the number generated by Poisson distribution. The numbers greater than 10 and equal to 0 are removed because the probability is too small. Figure 4 The figure shows the data that conforms to the Poisson distribution after filtering the data of a certain node. The gamma data that conforms to the shape parameter is generated, such as Figure 5 As shown. Take the gamma random variable and put it into ADBS2, BDBS2, and CDBS2 respectively. And process and transform ADBS2, BDBS2, and CDBS2 respectively. For example, for ADBS2, divide ADBS2 into segments according to the number of arrivals recorded by ADBS1, and separate each segment with a special mark. Remove the arrival times greater than or equal to 1s in ADBS2, such as Figure 6 As shown, since it has exceeded one frame period, it should be recorded in the next frame; the random arrival time variables in each segment are sorted from small to large to conform to the natural time advancement. This sorting calls an existing function in C++, and the number of elements participating in the sorting each time is determined by ADBS1, such as Figure 7 The figure shows a schematic diagram of data distribution among three nodes.

[0036] In step S103, many traditional MAC protocols (such as CSMA / CA, TDMA, etc.) often rely on fixed parameter settings and may not provide optimal performance in a changing wireless environment. With the increase in the number of devices in the network, the fluctuation of channel quality, and the uneven distribution of data traffic, the network may experience congestion, increased latency, and decreased throughput. Therefore, it is particularly important to develop protocols that can be dynamically adjusted according to network conditions and application requirements. The ADMA (Adaptive Dynamic Medium Access) transmission mechanism is an adaptive dynamic medium access (MAC) protocol for wireless communication systems, which aims to improve network performance when multiple users share wireless channels, especially in a dynamically changing network environment. The core idea of ​​the ADMA mechanism is to adaptively adjust communication parameters according to the real-time status of the network and communication requirements, thereby optimizing channel utilization efficiency, reducing latency, and improving system throughput.

[0037] ADMA systems usually adjust medium access strategies through real-time channel quality assessment. Wireless devices regularly measure channel quality (such as RSSI, SINR, etc.) and feed this information back to the base station or control node. By analyzing this feedback information, the system can understand the current channel situation and adjust the access strategy accordingly. Prepare in advance to set up the send message arrival buffer DHQ1, DHQ2, DHQ3, and the receive message storage area JSQ1, JSQ2, JSQ3 at each node.

[0038] The process of server monitoring and node connecting to the server is a common step in network communication, such as Figure 8 As shown in Figure 1, this process usually involves requests and responses between nodes and servers. The following is a typical process of server monitoring and node connection: Create a server socket: The server first creates a socket for communication. The server needs to specify the communication protocol (usually TCP / IP protocol) and the port number that the server will listen to (for example, 8080). Use the API provided by the operating system (such as socket()) to create a socket.

[0039] Binding a socket: The server needs to bind the created socket to a specific IP address and port. This step ensures that the server can receive data sent to that address and port. Use an API (such as bind()) to bind the socket to the specified port.

[0040] Listening: The server sets the socket to the listening state, waiting for the node's connection request, and specifies the size of a queue of pending connection requests. The server uses the listen() function to set the socket to the listening state, indicating that it is waiting for the node to connect.

[0041] Accept connection: Once the node initiates a connection, the server accepts the node's connection request by calling the accept() function. This returns a new socket that establishes a connection with the node for subsequent data exchange. The server can read and write data through this new socket, while the original listening socket continues to wait for new connection requests.

[0042] Create a node socket: The node creates a socket for communication with the server. Unlike the server, the node only needs to specify the server's IP address and port number (usually in the connect() function).

[0043] Connect to the server (Connect): The node uses the connect() function to initiate a connection request, sending a request to the server to establish a TCP connection. The node will wait until the server accepts the connection, that is, the server calls accept().

[0044] Establishing a connection: After receiving the connection request from the node, the server uses the accept() function to accept the connection. Once the server accepts the connection, a reliable two-way communication channel is established between the server and the node. Both the node and the server can use sockets to send and receive data.

[0045] Reading and writing data: Once the connection is established, the node and server can begin exchanging data through the established socket. The node sends a request and the server processes the request and returns a response.

[0046] Close the connection: After the data exchange is completed, both parties can close the connection and release resources. Usually, the close() function is used to close the socket.

[0047] Start preparation. As time goes by, each node will enter the waiting period (such as the second time slot of node 1), which means a new frame starts. Prepare packets to be sent at each node in the first frame starting time slot: according to the number of packets arriving in the first frame recorded in ADBS1, such as Fig. 9As shown, several times of phase numbers are taken from ADBS2 in sequence to form the arrival message packet: fill in the data fields of the message structure as mentioned above: message number, message length, message content, message sending timestamp (i.e., receiving time), receiving timestamp (this current time + the first arrival delay time in ADBS2), delay time (arrival time - sending time). Each of these composed messages is placed in DHQ1 and waits for sending, thus forming ADBS1 messages one by one. Naturally, the corresponding pointer needs to be moved when taking data. The intuitive operation process is as follows Fig.10 shown.

[0048] Below, an example is taken according to natural time, with a running time of 30 seconds and a number of time slots of 60.

[0049] The time slot 1S / 60=16.67ms is used as the advancement time. When the node reaches the time slot 19, the message of the first node is stored in the DHQ1 waiting to be sent. Fig.11 As shown in Figure 2, the message is sent to the second node. When the second node receives this batch of packets, Fig.12 As shown, the time stamp is recorded in the receiving time data field of each message and put into the receiving message storage area JSQ2. When the time reaches the 19th time slot and enters the 20th time slot, the second node is processed similarly to the first node. When the time reaches the 39th time slot and enters the 40th time slot, the third node is processed similarly to the first node.

[0050] Run, set up the sending message arrival buffer in each node. The first node, the sending message storage area DHQ1 and the receiving message storage area JSQ1. The second node, the sending message storage area DHQ2 and the receiving message storage area JSQ2. The third node, the sending message storage area DHQ3 and the receiving message storage area JSQ3. The base node publishes the start timing operation to prepare the packets to be sent at each node in the first frame time slot: the arrival delay time of each packet to be sent plus the current time is the time when the message arrives at the sending node, recorded in the data structure of the packet, and moved into DHQ1, and the messages are processed one by one. Then, according to the natural time, the time is advanced with the time slot 1S / 60=16.67ms as the beat. At the 19th time slot, the message is placed in the receiving message storage area JSQ1, and the current time is recorded in the sending time data area of ​​each packet. When the time finishes the 19th time slot and enters the 20th time slot, the second node is processed similarly to the first node. When the time passes the 39th time slot and enters the 40th time slot, the third node is processed similarly to the first node. This cycle continues until 30 seconds, i.e. 30 frames, have passed.

[0051] In step S104, after the simulation test is completed, the unsent message information in the buffer can be displayed in each node interface, such as Fig.13As shown, it includes important information such as the message ID, message details, and arrival time, which allows users to clearly see whether there is packet loss or leakage. It can also analyze the message sending efficiency and network efficiency within a fixed time period.

[0052] In step S105, each node is automatically calculated after the test is completed, such as Fig.14 The figure shows the message delay histogram of all nodes, and Fig.15 The delay time histogram of the server-side node message is displayed. The transmission delay time of all messages is printed in the interface, such as Fig.16 As shown in the figure, a corresponding histogram is also generated for reference. The delay time is calculated as follows: delay time = message arrival time - message sending time.

[0053] The present invention allows users to analyze the reliability of the network structure and the transmission speed of the network under different structures and data distributions through the delay time, which is convenient for further improvement.

[0054] In step S106, the system interface of the present invention is written using the tkinter library, which is used to create graphical user interface (GUI) applications. It is one of the most commonly used GUI libraries. Based on the Tk GUI toolkit, Tkinter encapsulates the interface provided by Tk, allowing Python developers to easily create cross-platform desktop applications. Tkinter is installed with Python by default, so in most cases you can use it without installing it separately.

[0055] The system interface is divided into the server side and other network nodes. The server side interface is as follows: Fig.17 As shown, on the left side of the interface, you can enter various parameters of the network to be tested, which is convenient for adapting to the test requirements of different networks. You can flexibly adjust parameters such as the sending time slot, the total number of nodes, and the IP address. The interface can clearly display the transmission process and delay time of the server-side message. You can also see the data distribution diagram of all network nodes and the message delay time histogram and the overall time delay histogram of each network node. In the lower left corner of the interface, you can calculate the average delay time and view the detailed message transmission process to make network test judgments, realizing the advantages of simple system operation, accurate test results and high efficiency.

[0056] In other network node interfaces, such as Fig.18 As shown, through the simple and clear interface settings, you can quickly and easily see the test results of the node, conduct a comprehensive analysis of the network, and flexibly adjust the structure of the network.

[0057] Click on 'Detailed Process Documentation' in the interface to jump to the txt document on the server side. Fig.19 and Fig. 20 As shown in the figure, the document records in detail all the detailed processes of this node end in this simulation, including message sending and receiving data, buffer data, data distribution in each time slot, and the specific time of sending and receiving.

[0058] In one embodiment, the method of the present invention includes a plurality of node devices for physical simulation, and each node device can be interconnected with other nodes through a network. The core idea of ​​the method is to select nodes that need to communicate in a network environment, and use the ADMA transmission mechanism to control the sending and receiving of messages according to the configuration and function of the nodes, so as to simulate the communication process between the nodes and realize the physical simulation of message transmission. Specifically, this goal is achieved through the following main features: Message transmission based on ADMA mechanism: The present invention adopts ADMA (Adaptive Dynamic Medium Access) transmission mechanism to reasonably allocate time slots between network nodes, ensuring that each node sends messages according to the established order and rules. The ADMA mechanism can flexibly adjust the sending rate of different nodes, avoid congestion and conflict problems existing in traditional mechanisms, and improve the efficiency of multi-node parallel communication.

[0059] Node interconnection in a network environment: This method interconnects multiple physical nodes through a network environment, selects nodes that need to transmit messages, and automatically connects according to the configuration information of the nodes, reducing the complexity of manual intervention and system configuration. The transmission message configuration of each node can be flexibly changed, including the sending time slot, running time, data distribution shape, etc., with strong adaptability and scalability. All network nodes can start and stop test tasks synchronously during the simulation process, which greatly simplifies the test process and reduces the workload of configuration and management.

[0060] Automatically generate message data: During the simulation process, this method randomly generates message data according to the predetermined distribution and Poisson distribution, and the server distributes the data. Each node stores the message in a buffer or queue according to its own message generation logic, and sends the message in a specific time slot according to the TDMA (time division multiple access) mechanism to ensure the orderliness and efficiency of the data transmission process.

[0061] Data analysis and result comparison: After the simulation is completed, this method can automatically analyze the data in the buffer of each node, and compare it with the theoretical model and the actual simulation results in the interface to evaluate the message transmission performance between nodes in the network. Through this comparison, users can accurately understand the bottlenecks and optimization points of network performance, thereby providing effective data support for network optimization.

[0062] The message transmission physical simulation system of the present invention has the advantages of low cost, high efficiency, and easy operation, and can be widely used in the fields of network performance testing, network protocol verification, and device interoperability testing. The system interface can timely display the simulation process and test result comparison. By simplifying the deployment and operation process of network testing, the present invention significantly improves the flexibility and accuracy of network testing, and provides strong technical support for network management and optimization.

[0063] In a specific embodiment, the message transmission physical simulation method of the present application includes the steps of: (1) Three machines are interconnected through a switch. Each machine constitutes a node, which are called the center, node 1, and node 2 respectively.

[0064] (2) The order of message sending between nodes: server->node 1, node 1->node 2, node 2->server.

[0065] (3) Nodes send packets based on the TDMA mechanism. One time frame is 1 second and one frame has 60 time slots. The server occupies time slot 20, node 1 occupies time slot 40, and node 2 occupies time slot 60. All time slots can be set by the node.

[0066] (4) The message packets sent by each node should have a certain structure: number, message length, message, message sending timestamp, receiving timestamp, and delay time.

[0067] (5) To send packets with Poisson distribution and arrival time rules, the average rate can be changed and the parameters can be set by yourself.

[0068] (6) When the subnet is running, the received packets will be placed in the buffer (or three dedicated queues). The subnet simulation running time can be set by yourself.

[0069] (7) After the run is completed, check the data in the buffer and compare it with the theoretical and physical simulation.

[0070] In addition, the server configuration includes the IPv4 address of the network node, the port number used, the sending time slot, the running time, the total number of nodes, the distribution shape parameters, and the Poisson distribution shape parameters.

[0071] The configuration of the network node includes the IPv4 address of the network node, the port number used, the sending time slot, The server-side distribution task generates data information of each network node including: number, message length, message, and message arrival time.

[0072] The configuration information of each network node includes the following: basic information of the node, a list of target nodes to which the node initiates a connection request, a list of nodes to which the node is requested to connect by other nodes, and detailed message transmission information between the node and the connected or connected node.

[0073] These configuration information helps to clarify the communication relationship, transmission rules and specific details of data exchange between nodes.

[0074] The data transmission process of the message transmission physical simulation method of the present application includes: Data regularity: Packets arrive in a Poisson-like number and time distribution pattern.

[0075] Data distribution, generate all data that conform to Poisson and gamma distribution, and then distribute the data by segment and send it to each node. One Poisson data corresponds to a corresponding number of gamma data. The first data of Poisson distribution is provided to the server node, the second data is provided to node 1, the third data is provided to node 2, and so on.

[0076] Generate a message. The format of the message is: number, message length (temporarily empty), message (temporarily empty), and message arrival time. The Poisson distribution data determines the number of messages generated per second. The current time, the sending time slot, and the gamma distribution data are added together, and then one time slot (about 0.017) is added to obtain the arrival time of the message. Arrival time = current time sending time slot + gamma distribution data + one time slot (0.017s).

[0077] Request connection. The server requests connection with each node. The node connects to the server through the IPV4 address. The server connects immediately after receiving the node request. Then each node receives the connection status reply from the server. After all nodes are connected, the message transmission begins.

[0078] When sending messages, the server and the node transmit messages in the order of server->node 1, node 1->node 2, node 2->server. The specific process of message transmission and detailed information of the message will also be displayed on the system interface of each node.

[0079] Check the unsent messages. When the set running time is reached, the server disconnects from each node and prints the unsent messages of the node respectively. Calculate the message delay time = sending time - arrival time at the node.

[0080] In one embodiment, multiple nodes can be dynamically configured in a local area network environment to support simulation tests of different network topologies. Specifically, the system can support simple point-to-point connections to complex multi-level topologies according to actual needs. The configuration of each node can be adjusted according to test requirements. In addition, the system can automatically detect changes in the time delay of nodes in the network to ensure the continuity and consistency of the simulation process.

[0081] In one embodiment, the communication between nodes follows the TDMA (Time Division Multiple Access) mechanism. The system supports flexible configuration of the number and allocation rules of time slots to ensure efficient use and fairness of network resources. By accurately controlling each node to send data in a specific time slot, conflicts and competition between nodes are avoided, and the transmission efficiency of the system is improved. In addition, the flexibility of time slot allocation enables the system to adapt to network environments of different sizes and requirements. Users can dynamically adjust the number and allocation strategy of time slots according to simulation requirements and the number of nodes, thereby achieving more accurate performance testing and optimization.

[0082] In one embodiment, the server is responsible for generating the message data to be transmitted and reasonably distributing the data to each node according to preset rules. In order to ensure the accuracy and stability of the simulation process, the server will dynamically adjust the data distribution strategy according to the requirements of the simulation target of each node. For example, the server can automatically adjust the amount of data received and sent by each node according to the processing capacity of the node, the network status and the message generation rate, so as to avoid overloading or idleness of a certain node and ensure the balance and efficiency of the entire network simulation process.

[0083] In one embodiment, a user-friendly interface is also provided to support real-time display of data flow during the simulation process. The interface can clearly display the performance indicators of each node such as message sending, receiving status, delay information, etc. Through this interface, users can intuitively observe the behavior of each node in the simulation, the transmission process of the message, the delay change during the transmission process, and other key data. The system interface also supports real-time monitoring and analysis to help users discover possible bottlenecks or anomalies in the network, so as to adjust the simulation settings in time.

[0084] In one embodiment, the transmission performance under different network environments can be simulated according to the actual network conditions. This function enables the system to more realistically reflect the transmission characteristics of the network under various environments when performing large-scale simulations, and provide engineers with more performance analysis basis.

[0085] In one embodiment, after the simulation is completed, the system will generate a detailed test process report, providing statistical analysis results of various performance indicators including each message delay, average time delay of a single node, etc. This report not only includes basic network performance data, but also helps users identify potential network bottlenecks, optimization points and configuration deficiencies by comparing simulation results under different configurations and different network topologies. The report will also provide suggestions based on actual data to help users perform more accurate network optimization and improve overall network performance and stability.

[0086] In one embodiment, the impact of real-world network fluctuations on transmission performance can also be simulated during the simulation process. In addition, the system can support large-scale distributed simulation as needed to simulate a large-scale network environment with multiple distributed nodes to perform large-scale network optimization testing and performance evaluation.

[0087] Through the above-mentioned method of physical simulation of message transmission, on the one hand, the current device network environment is used to collect devices of multiple nodes for communication, and connections are made according to the node configuration information. Message packets are randomly generated according to the Poisson distribution and the gamma distribution, and the server node distributes the data to be transmitted to other slave nodes. Each node generates a data linked list and a buffer for message transmission, and finally achieves the purpose of physical simulation of end-to-end transmission. On the other hand, this method is flexible and convenient to use, and the network environment can be selected at will and deployed on any system device. During the simulation test, it is not necessary to install and uninstall the software to be tested on each network node, and the test tasks of each network node can be started and stopped synchronously. The system interface can display the transmission process and the simulation results. The method is simple to operate, the test results are accurate, and the efficiency is high.

[0088] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc. In addition, it is also easy to understand that these steps may be, for example, executed synchronously or asynchronously in multiple modules / processes / threads.

[0089] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units for concretization. The components displayed as modules or units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. Those of ordinary skill in the art can understand and implement it without paying creative work.

[0090] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, and when the program is included in a processor and executed, the steps of the method for simulating the physical transmission of a message can be implemented in any of the above embodiments. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned method for simulating the physical transmission of a message in this specification.

[0091] refer to Fig.21 As shown, a program product 300 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0092] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0093] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0094] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0095] In an exemplary embodiment of the present disclosure, an electronic device is further provided, which may include a processor and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the steps of the method for simulating physical transmission of a message in any of the above embodiments by executing the executable instructions.

[0096] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0097] Refer to the following Fig. 22 The electronic device 600 according to this embodiment of the present invention is described. Fig.10 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0098] like Fig. 22As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0099] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the above-mentioned message transmission physical simulation method part of this specification. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .

[0100] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0101] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0102] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0103] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 650. In addition, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 through a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0104] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation methods of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server or a network device, etc.) to execute the above-mentioned message transmission physical simulation method according to the implementation methods of the present disclosure.

[0105] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A method for simulating physical transmission of a message, characterized in that: The method includes: Set the sending time slot and the total number of nodes to synchronize the time of all nodes; the nodes include server nodes and slave nodes; The server node and the slave node generate a preset number of message packets and calculate the arrival time of the message packets; The server node and the slave node transmit the message packets according to the preset transmission path and message packet arrival time to perform simulation testing; Obtain the flow of message packets during the simulation test and analyze the flow of message packets to obtain a test process report.

2. The method for simulating message transmission in real life according to claim 1, characterized in that: The steps of setting the sending time slot and the total number of nodes and performing time synchronization on all nodes include: Set the sending time slot and the total number of nodes, determine the server node and slave node to build the network to be tested; The master clock in the server node sends synchronization information; The slave clock in the slave node records the time when the synchronization information is received and sends a delay request message; The master clock in the server node returns a delayed response message to correct the time deviation between the server node and the slave node.

3. The method for simulating message transmission in real life according to claim 1, characterized in that: The steps of generating a preset number of message packets and calculating the arrival time of the message packets by the server node and the slave node include: Each node generates the corresponding Poisson data and gamma data, and performs data filtering on the Poisson data and gamma data; wherein the number of Poisson data groups and gamma data groups corresponds; Assign the first Poisson data in the filtered Poisson data group to the server node, the second Poisson data to the first slave node, the third Poisson data to the second slave node, and so on; The first gamma data in the filtered gamma data group is assigned to the server node, the second gamma data is assigned to the first slave node, the third gamma data is assigned to the second slave node, and so on; Each node determines the number of packets generated per second based on its Poisson data; Each node calculates the packet arrival time based on its gamma data; Packet arrival time = current time sending slot + gamma data + one slot.

4. The method for simulating message transmission in real life according to claim 3, characterized in that: The format of the message packet is: Number, message length, message, and packet arrival time.

5. The method for simulating message transmission in real life according to claim 3, characterized in that: Poisson distribution is used to describe the number of packets generated per unit time; Suppose the average number of packets generated by each node per unit time is , then the event occurs The probability of this is: in, is the number of packets generated by each node per unit time, is the average number of packets generated per unit time, is the base of natural logarithms, for The factorial of The gamma distribution is used to describe the arrival time of packets transmitted in a time slot; The probability density function of the gamma distribution is: in, is a random variable, representing time or interval; is the shape parameter, is the scale parameter; is the gamma function, if , the gamma distribution degenerates into an exponential distribution.

6. The method for simulating message transmission in real life according to claim 1, characterized in that: The steps of the server node and the slave node transmitting the message packet according to the preset transmission path and message packet arrival time include: The server node sets the transmission path for sending the message packet; The server node and each slave node perform data transmission based on the ADMA transmission mechanism, and a sending message packet arrival buffer and a receiving message packet storage area are pre-set in the server node and each slave node; The server node establishes a connection with each slave node; After the server node and each slave node are connected, the message packet is transmitted according to the preset transmission path and message packet arrival time, and the message packet sending time is recorded.

7. The method for simulating message transmission in real life according to claim 6, characterized in that: The steps of obtaining the flow of packets during the simulation test and analyzing the flow of packets to obtain a test process report include: Obtaining the unsent message information in the message packet arrival buffer of each node; wherein the message information includes the message ID, message content information and arrival time; The message information of all nodes is analyzed to obtain a message delay histogram; wherein, delay time = message packet arrival time - message packet sending time.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for simulating physical transmission of message transmission described in any one of claims 1 to 7 are implemented.

9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the steps of the message transmission physical simulation method according to any one of claims 1 to 7 by executing the executable instructions.

Citation Information

Cited By

  • Parameter coordination platform and coordination method for deriving line loss rate

    CN116345681A