Cross-machine data communication method for broadband communication network real-time simulation test
By introducing MSE and shared memory into network simulation, and using fixed threads to serve multiple links, the problems of low data transmission rate and system performance degradation in the existing technology are solved, and efficient cross-physical machine simulation and throughput improvement are achieved. .
Patent Information
- Application Number
- CN202411046757.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-10-11
AI Technical Summary
Existing technologies have problems such as low data transmission rate, insufficient throughput, complex operations, and degraded system performance in large-scale network simulation scenarios, especially the exhaustion of system resources and increased context switching overhead caused by frequent creation and destruction of a large number of threads.
By introducing the machine-level simulation engine MSE for cross-physical machine data transmission, we avoid binding boundary nodes to host network cards, use shared memory and a fixed number of threads to serve an indefinite number of cross-physical machine links, and use hardware synchronization primitives to ensure concurrency security. , dynamically manage service queues to reduce the frequency with which threads release links.
It significantly improves the simulation performance and throughput of the system, reduces memory resource usage and operational complexity, and ensures timely service and data transmission reliability of all links.
Smart Images

Figure CN118764392A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and further relates to a cross-machine data communication method, which can be used for real-time simulation testing of broadband communication networks. Background Art
[0002] With the development of communication network technology, network simulation faces the demands and challenges of complex topology, huge scale, high dynamic, real traffic load simulation and semi-physical access verification. At present, mainstream network simulation software such as NS3, OPNET, OMNET and other node grouping processing has low real-time performance, lacks simulation capability in large-scale simulation scenarios, and cannot realize the real protocol stack verification of ultra-large-scale dynamic network nodes.
[0003] In large-scale network real-time simulation systems, Docker container nodes are used to simulate nodes in the network. Since a single physical machine has a limit on the number of Docker containers that can be created, in scenarios with a large number of network nodes, a single physical machine cannot support the deployment of all network nodes. Network nodes need to be evenly deployed on multiple physical machines.
[0004] The Institute of Information Engineering of the Chinese Academy of Sciences proposed a virtual network data communication interaction method based on container technology in the patent document with application number 201911241576.6. This method creates a network namespace for the container nodes of the virtual network, virtualizes the network card of the container node and configures the network namespace to realize network communication between container nodes; by processing the boundary network card of the virtual network, the boundary node is bound to the host network card to realize data connectivity between container nodes of different hosts and between different types of nodes. However, since this method uses the traditional TCP / IP transmission protocol to communicate with container nodes in the same host, there is a problem that a large amount of data needs to be copied, especially in large-scale high-concurrency scenarios, which will reduce the data transmission rate and network throughput, and cannot meet the requirements of high-speed data transmission. At the same time, since the solution also needs to classify the container nodes when implementing it, different processing methods need to be adopted for different types of container nodes, such as configuring IP for the container host node and router node, and adding the corresponding routing table in the corresponding routing file. In addition, since this solution needs to separately configure the routing table, bridge and other configuration information corresponding to each simulation scenario when performing network simulation, the operation is complicated. These shortcomings make this method have certain limitations in the scenario of large-scale, high-concurrency and multi-cross-machine links.
[0005] Xidian University proposed a large-scale network real-time simulation method based on container technology in the patent document with application number 202210001737.X. It adopts a shared memory communication method so that the packets transmitted between container nodes are stored in the shared memory, ensuring that all containers can access and avoiding data copying. The data sending queue of the node adopts a lock-free and efficient circular queue structure, so it supports the queueing and dequeuing operations of single atomic statements, effectively avoiding the processing speed bottleneck caused by frequent locking and calling system functions. However, when data needs to be transmitted across physical machines, this method still uses a combination of Socket and shared memory to send data. It is necessary to establish a Socket connection between each physical machine and other physical machines. The sending container node saves the data in the shared memory. The machine-level simulation engine MSE allocates a service thread to serve each cross-physical machine output link of the simulation node. Each thread takes out the data in the link sending queue served by the thread from the shared memory, and then sends it to the MSE of the opposite physical machine through the Socket. After receiving the data through the Socket, the peer MSE saves the data in the shared memory, parses the data and obtains the destination node of the data, and then notifies the destination node to read the data from the shared memory for processing.
[0006] Although this method uses independent threads to receive and process packets for each cross-machine link in the network simulation, it not only conforms to the working state of the real-time working node, but also can effectively simulate the link transmission process of the data frame. However, in large-scale network simulation scenarios, if threads and link resources are mapped one by one, a large number of threads will be created. Since the creation and destruction of threads involve the allocation and release of system resources, if a large number of threads are frequently created and destroyed, it may lead to the exhaustion of system resources and even cause the system to crash. At the same time, too many threads will occupy a lot of memory and increase the overhead of context switching, resulting in a decrease in the performance of the simulation system. Summary of the invention
[0007] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose a cross-machine data communication method for real-time simulation testing of broadband communication networks, so as to avoid redundant configuration operations, reduce operational complexity, reduce system performance degradation caused by frequent creation and destruction of a large number of threads, and improve the throughput of the system in large-scale network simulation scenarios.
[0008] The technical idea of the present invention is: by introducing MSE to perform data transmission across physical machines, the distinction between boundary nodes and non-boundary nodes is avoided, so that all nodes can adopt a unified processing logic, and the boundary nodes no longer need to be bound to the host network card; by introducing shared memory, the configuration of the bridge is avoided to reduce the complexity of the operation. By using a fixed number of threads to serve an indefinite number of cross-physical machine links for data transmission, the system performance degradation caused by frequent creation and destruction of a large number of threads is solved.
[0009] According to the above ideas, the steps to achieve the purpose of the present invention include the following:
[0010] (1) Create containers in the physical machine that correspond to the network nodes in the simulation scenario, copy the executable files of all nodes to the containers, and load and run the executable files;
[0011] (2) Create a memory-mapped file in the shared memory directory of the physical machine as shared memory, and map this memory-mapped file to the address space of all nodes through container mounting and system functions;
[0012] (3) The machine-level simulation engine MSE creates a limited number of socket connections between the current physical machine and other physical machines according to the number of physical machines in this simulation scenario, and creates a service thread for each socket connection;
[0013] (4) During the initialization phase of the simulation, the node obtains all link information of the node in the current simulation scenario, registers the information of the cross-physical machine links in the shared memory, and then records the link registration information in the node and stores it in the service queue index SQI position in the shared memory;
[0014] (5) The node writes the data to the send queue of the cross-physical machine link and checks whether the link is served by the MSE service thread:
[0015] If it is not serviced, the node writes the SQI of the link into the request queue of the MSE and notifies the thread of the MSE to service the link by means of a semaphore;
[0016] If there is service, execute step (6);
[0017] (6) The MSE thread retrieves data from the cross-physical machine link for transmission:
[0018] (6a) The MSE thread checks its own service queue:
[0019] If the service queue is empty, the thread blocks and waits for the node's notification.
[0020] If the service queue is not empty, wait for the node's notification without blocking;
[0021] (6b) When the thread receives the notification sent by the node through the semaphore, it mutually exclusively accesses the MSE request queue through the compare and exchange CAS atomic statement in the hardware synchronization primitive, takes out the SQI written by the node, and determines the cross-physical machine link of the node according to the value of the SQI;
[0022] (6c) After the thread sets the service state of the link determined by the SQI to being served, it takes out data from the link's send queue and performs data transmission. When the thread cannot take out data from the queue, it records the link in its own service queue;
[0023] (6d) The thread polls each link in its service queue:
[0024] If there is a data service in the link that needs to be served, execute step (6e);
[0025] If there is no data in the link during polling, execute step (6f);
[0026] (6e) The thread takes data from the link where data services need to be transmitted and sends it to the MSE at the other end. A threshold value is set. When the number of data packets transmitted by the thread for a link reaches the threshold value, the thread switches the currently served link and updates the lifetime of the link in the service queue. The thread continues to poll the link that needs to be served in the service queue.
[0027] (6f) After each poll of the links in the service queue, the thread checks whether the lifetime of each link recorded in the service queue has expired:
[0028] If it has not expired, return to step (6a);
[0029] If it has expired, the link is cleared from the thread's service queue, the link's service state is set to unserved, and the process returns to step (6a);
[0030] Compared with the prior art, the present invention has the following advantages:
[0031] Firstly, since the present invention uses a fixed number of threads to dynamically serve an indefinite number of cross-physical machine links, compared with the method of creating a thread for each cross-physical machine link in the prior art, the total number of threads created by the system can be significantly reduced. This optimization scheme not only ensures the high efficiency of network nodes in packet transmission and processing, but also reduces the system's occupancy of memory resources and improves the overall simulation performance of the system. At the same time, since the present invention creates multiple Socket connections between physical machines, compared with only one Socket connection between each physical machine in the prior art, the present invention makes full use of the performance of the physical machine and further improves the throughput of the system during cross-physical machine simulation.
[0032] Secondly, the present invention aims to address the problem of high system overhead caused by low or discontinuous business intensity and frequent thread blocking and waiting for wake-up that may exist in cross-physical machine links. A service queue is created for each service thread, and the link in the service queue is released with a delayed release. That is, the thread will be cleared out of the service queue only when no business arrives within a certain period of time, thereby ensuring the service capability for burst data transmission business and reducing the frequency of blocking and waiting after the service queue is empty due to the thread releasing the link, thereby reducing the system overhead and further improving the system simulation performance.
[0033] Thirdly, the present invention uses an on-demand scheduling method for multiple links sharing a thread service and a thread rotation service mechanism, which can ensure that all links served by the thread can be served in time and avoid a link being out of service for a long time.
[0034] Fourthly, the present invention ensures that threads obtain SQI from the MSE request queue in a lock-free and secure manner through the compare-and-exchange CAS atomic statement in the hardware synchronization primitive, thereby avoiding data duplication and disorder problems caused by multiple threads serving a link at the same time, and improving the simulation reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is the overall flow chart of the implementation of the present invention;
[0036] Figure 2 It is the initialization sub-flow chart of MSE in the present invention;
[0037] Figure 3 It is a sub-flow chart of the simulation node registration cross-physical machine link in the present invention;
[0038] Figure 4 It is a sub-flow chart of a node sending data across physical machines in the present invention;
[0039] Figure 5 It is a sub-flow chart of MSE receiving data from a node link and transmitting data across physical machines in the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0041] The implementation of this example is based on a network topology of 26 nodes. The 26 nodes are evenly distributed on two physical machines. The topological connection relationship between the nodes is a mesh structure. There are 13 data streams transmitted across the physical machines. In each data stream, the size of the data packet is 1500M, and the interval for sending the data packet is 1 microsecond.
[0042] Reference Figure 1 , the implementation steps of this example are as follows:
[0043] Step 1: Schedule all nodes in the network simulation scenario.
[0044] 1.1) Create and configure containers according to the number of nodes in the network simulation scenario, that is, set the addresses of the simulation nodes, node numbers, link connection relationships between nodes, and data flow information;
[0045] 1.2) Run the executable file of the node program in the container:
[0046] This example copies the node's executable file to each container and loads and executes it to complete the scheduling of the nodes in the simulation scenario.
[0047] Step 2: Create shared memory and map it to the node.
[0048] 2.1) Create a memory-mapped file in the shared memory directory as a shared memory area.
[0049] The shared memory directory refers to a directory virtualized by memory in a computer system. The files in this directory are stored in the memory instead of on the disk.
[0050] The shared memory area refers to a large-capacity memory area that can be accessed by different central processing units in a multi-processor computer system.
[0051] Use the API provided by the Linux system to create a memory-mapped file in the shared memory directory of the physical machine as a shared memory area.
[0052] This example uses the method provided by the Posix standard to create a shared memory area. The shm_open function is used to create a memory-mapped file in the shared memory directory / dev / shm of the physical machine, and the ftruncate function is used to allocate the size of the memory-mapped file.
[0053] 2.2) Map the shared memory to the address space of all nodes, that is, each node calls the API provided by the Linux system to map the memory-mapped file to its own address space.
[0054] This example mounts the shared memory directory / dev / shm of the physical machine to all containers through the container's data volume. The node accesses the Posix shared memory area under this directory through the container's file system and maps the shared memory area to its own address space through the mmap function to complete the creation of shared memory areas for all nodes.
[0055] Step 3: MSE initializes and creates a socket connection and service thread.
[0056] Reference Figure 2 , the specific implementation of this step is as follows:
[0057] 3.1) MSE creates a limited number of socket connections between this physical machine and other physical machines according to the number of physical machines in this simulation scenario.
[0058] In this example, 12 socket connections are created between the two physical machines. This number of connections is obtained by continuously increasing the number of socket connections and testing the maximum throughput between the physical machines: when the number of created sockets is less than 12, the data transmission throughput is proportional to the number of sockets. When the number of created sockets is greater than 12, the throughput no longer increases significantly with the increase in the number of sockets.
[0059] 3.2) For each Socket connection, use the pthread_create function to create a service thread.
[0060] Step 4: The simulation node registers the cross-physical machine link.
[0061] Reference Figure 3 , the specific implementation of this step is as follows:
[0062] 4.1) During the initialization phase, the node obtains all link information of the node in this simulation scenario:
[0063] Before the node initialization phase begins, the simulation resource management engine obtains the node link information by reading the simulation configuration file used in this simulation. The link information includes: link type, link number, whether it crosses physical machines, peer node number, frame error rate, link rate, propagation delay, and peer node address;
[0064] After obtaining the link information, the simulation resource management engine fills the information into the link description word and stores the link description word in the shared memory;
[0065] After executing step 2, the node accesses the link description word in the shared memory according to its node number to obtain all link information of the node in this simulation scenario;
[0066] 4.2) The node registers the cross-physical machine link and records the SQI where the registration information is stored:
[0067] The links of a node include cross-physical machine links and non-cross-physical machine links. A node only needs to register the cross-physical machine links and notify the MSE to transmit cross-physical machine data. For non-cross-physical machine links, the node can complete data transmission independently.
[0068] The implementation of this step is that the node uses its own number and the link number of the cross-physical machine link as the content of the registration information, stores the registration information in the shared memory, and records the location SQI where the registration information is stored in the shared memory, so as to obtain the registration information filled in by the node from the shared memory through the SQI and determine a link that requires data transmission.
[0069] Step 5: The node sends data across physical machines.
[0070] Reference Figure 4 , the specific implementation of this step is as follows:
[0071] 5.1) After the node generates data, it determines the link number used for this data transmission according to the routing table;
[0072] 5.2) According to the link number, obtain the corresponding link information, and determine whether the sending link is a cross-physical machine link according to the cross-physical machine link flag in the link information:
[0073] If it is not a cross-physical machine link, go to step 5.3);
[0074] If it is a cross-physical machine link, go to step 5.4);
[0075] 5.3) The node transmits data by itself, and sends and receives data through the link's sending queue:
[0076] The sending queue adopts a circular queue structure, setting a head index h for reading data and a tail index t for writing data;
[0077] When a node writes data to the sending queue, after writing the data to the position marked by h, the value of h is increased by one, and the number of data packets contained in the sending queue is increased by one using the __sync_fetch_and_add atomic statement;
[0078] When a node takes data from the sending queue, it takes out a data from the position marked by t, increases the value of t by one, and uses the __sync_fetch_and_sub atomic statement to reduce the number of data packets in the sending queue by one;
[0079] 5.4) The node writes the data into the send queue of the link and determines whether the link is being served:
[0080] If it is not serviced, the node writes the SQI of the link into the request queue of the MSE and notifies the MSE thread to service the link by using a semaphore through the sem_post function;
[0081] If it is being served, go to step 6.
[0082] Step 6: MSE transfers data across physical machines.
[0083] Reference Figure 5 , this step is specifically implemented as follows:
[0084] 6.1) The MSE service thread checks its own service queue:
[0085] If the service queue is empty, the thread blocks and waits for the node's notification.
[0086] If the service queue is not empty, the thread waits for the node's notification in a non-blocking manner;
[0087] The blocking wait means that the thread calls the sem_wait function to wait for the node notification. When the node needs to transmit cross-physical machine data, if it finds that the cross-physical machine link is not served, it will notify the MSE through the semaphore. At this time, the thread will recover from the blocking state and execute step 6.2);
[0088] The non-blocking waiting means that the thread calls the sem_trywait function to wait for the node notification. If the notification is received successfully, step 6.2) is executed, otherwise, step 6.4) is directly executed;
[0089] 6.2) The thread takes out the SQI and determines the service link
[0090] The thread uses the compare and exchange CAS atomic statement in the hardware synchronization primitive, and uses the __sync_bool_compare_and_swap function to spin and try to modify the state of the MSE request queue to an exclusive state:
[0091] If the modification is successful, the thread takes out the SQI written by the node, changes the state of the MSE request queue to the shared state, and obtains the link information written into the shared memory by the node when registering the link based on the value of the SQI. The information includes the node number and the link number. Based on the link information, the link that needs to be serviced is determined.
[0092] If the modification fails, continue to spin and retry;
[0093] 6.3) Thread service link:
[0094] In order to avoid repeated notifications from nodes, which would cause additional system overhead, after the thread determines the link that needs to be served, it changes the link status to being served. At the same time, the thread tries to retrieve data from the link and send the data to the MSE on the other end through the socket. If the thread cannot retrieve data from the queue, it means that the sending queue of the link has been empty and the link currently has no data to be transmitted. Then the thread records the link in its own service queue. At this time, the thread will start traversing from the head of the service queue to find an available position. If it is found that a position has not been used, or the link record stored in the position is marked as invalid, the thread will use the position to record the link information.
[0095] The peer MSE receives data through Socket. After receiving the data, it parses the receiving node from the packet header, stores the packet in the shared memory, and notifies the corresponding receiving node to read the data from the shared memory.
[0096] 6.4) Thread polling service queue:
[0097] The thread polls each link in the service queue, and attempts to retrieve data from the send queue of each link in the service queue, regardless of whether there is data in the link:
[0098] If the data can be retrieved successfully, it indicates that the link has data to be transmitted, and step 6.5 is executed;
[0099] If the data cannot be retrieved, it indicates that the link sending queue is empty and no data transmission service is required, and step 6.6 is directly executed;
[0100] 6.5) Threads have limited service links:
[0101] The thread takes data from the link where data services need to be transmitted and sends it to the MSE at the other end. A threshold value is set. The threshold value in this example is set based on experience but is not limited to 100.
[0102] Each time a thread transmits a data packet, it increases the packet's sending counter by one and compares it with the set threshold value:
[0103] If the number of data packets to be sent is less than the threshold value, continue to serve this link;
[0104] If the number of data packets to be sent reaches the threshold value, the thread stops serving this link, updates the survival time of the link served this time, assigns the survival time to the current system time, and then continues to poll the service queue to find the next link to be served;
[0105] 6.6) Thread clears the service queue:
[0106] Set the expiration time threshold y. In this example, it is set according to empirical values but is not limited to taking the value of 1 second;
[0107] After polling each link in the service queue each time, the thread checks each link record in the service queue and compares the difference x between the current system time and the link survival time with the preset expiration time y:
[0108] If x≥y, it means the link has expired. Remove this link from the thread's service queue, that is, set the status of the record corresponding to this link in the service queue to invalid. When the thread records link information next time, it will directly overwrite the invalid record; at the same time, set the service status of the link to unserved, and then return to step 6.1);
[0109] If x<y, it means the link has not expired, and directly return to step 6.1).
[0110] The above description is only a specific example of the present invention and does not constitute any limitation to the present invention. Obviously, for professionals in this field, after understanding the content and principle of the present invention, various modifications and changes in form and details may be made without departing from the principle and structure of the present invention. However, these corrections and changes based on the idea of the present invention are still within the protection scope of the claims of the present invention.
[0111] It should be noted that the step numbers in the description and claims of the present invention are only for a clear description of the implementation scheme of the present invention for easy understanding, and the order of their serial numbers is not limited.
Claims
1. A cross-machine data communication method for real-time simulation testing of broadband communication networks, It is characterized in that These include: (1) Create containers in the physical machine that correspond to the network nodes in the simulation scenario, copy the executable files of all nodes to the containers, and load and run the executable files; (2) Create a memory-mapped file in the shared memory directory of the physical machine as shared memory, and map this memory-mapped file to the address space of all nodes through container mounting and system functions; (3) The machine-level simulation engine MSE creates a limited number of socket connections between the current physical machine and other physical machines according to the number of physical machines in this simulation scenario, and creates a service thread for each socket connection; (4) During the initialization phase of the simulation, the node obtains all link information of the node in the current simulation scenario, registers the information of the cross-physical machine links in the shared memory, and then records the link registration information in the node and stores it in the service queue index SQI position in the shared memory; (5) The node writes the data to the send queue of the cross-physical machine link and checks whether the link is served by the MSE service thread: If it is not serviced, the node writes the SQI of the link into the request queue of the MSE and notifies the thread of the MSE to service the link by means of a semaphore; If there is service, execute step (6); (6) The MSE thread retrieves data from the cross-physical machine link for transmission: (6a) The MSE thread checks its own service queue: If the service queue is empty, the thread blocks and waits for the node's notification. If the service queue is not empty, the thread waits for the node's notification in a non-blocking manner; (6b) When the thread receives the notification sent by the node through the semaphore, it mutually exclusively accesses the MSE request queue through the compare and exchange CAS atomic statement in the hardware synchronization primitive, takes out the SQI written by the node, and determines the cross-physical machine link of the node according to the value of the SQI; (6c) After the thread sets the service state of the link determined by the SQI to being served, it takes out data from the link's send queue and performs data transmission. When the thread cannot take out data from the queue, it records the link in its own service queue; (6d) The thread polls each link in its service queue: If there is a data service in the link that needs to be served, execute step (6e); If there is no data in the link during polling, execute step (6f); (6e) The thread takes data from the link where data services need to be transmitted and sends it to the MSE at the other end. A threshold value is set. When the number of data packets transmitted by the thread for a link reaches the threshold value, the thread switches the currently served link and updates the lifetime of the link in the service queue. The thread continues to poll the link that needs to be served in the service queue. (6f) After each poll of the links in the service queue, the thread checks whether the lifetime of each link recorded in the service queue has expired: If it has not expired, return to step (6a); If it has expired, the link is cleared from the service queue of the thread, the service state of the link is set to unserved, and the process returns to step (6a).
2. The method according to claim 1, It is characterized in that Step (2) creates a memory mapping file in the shared memory directory of the physical machine as shared memory, and maps this memory mapping file to the address space of all nodes through container mounting and system functions, which is implemented as follows: (2a) Use the shm_open() function to create a memory-mapped file in the / dev / shm directory of the physical machine; (2b) Allocate the size of the memory-mapped file through the ftruncate() function; (2c) Create a container node and mount the / dev / shm directory of the physical machine in the container by means of data volume mounting; (2d) Through the mmap() function, the memory mapping files in the / dev / shm directory are mapped to the address space of all container nodes.
3. The method according to claim 1, It is characterized in that All link information in step (4) includes: link type, link number, whether it crosses physical machines, peer node number, frame error rate, link rate, propagation delay and node address of the peer node.
4. The method according to claim 1, It is characterized in that In step (6b), the MSE request queue is accessed mutually exclusively through the compare-and-swap CAS atomic statement in the hardware synchronization primitive, which is implemented as follows: (6b1) Use the __sync_bool_compare_and_swap() function to spin and try to change the state of the MSE request queue to an exclusive state: If the modification is successful, execute step (6b2); If the modification fails, continue to spin and try again; (6b2) Take out an SQI from the MSE request queue and change the state of the MSE request queue to a shared state.
5. The method according to claim 1, It is characterized in that In step (6b), the cross-physical machine link of the node is determined according to the value of SQI, which is implemented as follows: (6b3) According to the value of SQI, the information written when the node is registered is retrieved from the shared memory, which includes the node number and the link number of the cross-physical machine link that the node needs to serve; (6b4) According to the obtained node number and link number, access the sending queue of the corresponding link in the shared memory.
6. The method according to claim 1, It is characterized in that In step (6c), data is taken from the transmission queue of the link and data transmission is performed, which is implemented as follows: (6c1) Change the link state of the current serving link to being served; (6c2) Take the data from the link's send queue and send it to the peer MSE via Socket. (6c3) The peer MSE receives data via Socket; (6c4) The peer MSE determines to which node on the local physical machine the data packet is to be sent based on the packet header information in the received data packet, stores it in the shared memory, and notifies the corresponding receiving node to read the data from the shared memory.
7. The method according to claim 1, It is characterized in that In step (6d), when the number of packets transmitted by a thread for a link reaches the threshold, the link currently being served is switched, and the lifetime of the link in the service queue is updated, which is implemented as follows: (6d1) Every time a thread transmits a data packet, the value of the packet sending counter of the current service link is increased by one; (6d2) Set a threshold value and compare it with the value of the current service link packet sending counter: If the count value is less than the threshold value, the thread continues to transmit data for the current service link; If the count value reaches the threshold, the thread no longer serves the link; (6d3) Update the lifetime of the current service link to the system time when the thread ends its service for the link.
8. The method according to claim 1, It is characterized in that In step (6e), the link whose lifetime has expired is cleared from the service queue of the thread, which is implemented as follows: (6e1) Calculate the difference d between the current system time and the link lifetime, set the expiration time threshold a, and compare the two: If d>a, the link has not expired and does not need to be cleared from the service queue; If d≤a, the link has expired, and the status of the record corresponding to the link in the thread service queue is set to invalid. The next time the thread records link information, it will directly overwrite the invalid record to clear the expired record.
