Method and device for computing communication time across nodes in real-time simulation
By calculating the inter-node communication time in real-time simulation tasks, the problem of unquantified cross-node communication time was solved, the performance of different communication methods was evaluated, and the performance of large-scale node real-time simulation was improved.
Patent Information
- Application Number
- CN202411344294.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-09-25
AI Technical Summary
Existing methods do not provide a way to calculate cross-node communication time, making it difficult to compare the performance of different communication methods and to quantify the impact of cross-node communication time on simulation performance in real-time electromagnetic transient simulation.
By determining the network channel formed by communication between any two nodes in a real-time simulation task, the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node are calculated, thereby quantifying the cross-node communication time and providing a method for quantifying cross-node communication time.
The impact of cross-node communication time on simulation performance is quantified, which is beneficial for large-scale node parallel real-time simulation, and can compare the performance advantages and disadvantages of different communication methods, thereby improving the overall performance of large-scale node real-time simulation.
Smart Images

Figure CN119155194B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of simulation computing technology, and in particular to a cross-node communication time calculation method and device in real-time simulation. BACKGROUND
[0002] Real-time simulation of power systems is an effective means to understand the characteristics of power systems and support research, planning, operation, production, equipment manufacturing, and secure and reliable operation of power systems. With the rapid development of new power systems, massive new energy units and power electronic devices are connected to the grid, and the system scale has expanded dramatically, requiring large-scale node parallel simulation.
[0003] Real-time simulation of power systems has strict requirements for the time of each link, and the length of the communication time has a great influence on the simulation step length of real-time simulation of power systems. When different nodes are jointly simulated, the communication performance between multiple nodes is crucial. Existing methods do not provide a method for calculating the cross-node communication time, making it difficult to compare the performance of different communication methods and quantify the impact of cross-node communication time on simulation performance in electromagnetic transient real-time simulation. SUMMARY
[0004] Therefore, the present application provides a cross-node communication time calculation method and device in real-time simulation, which solves the technical problem that existing methods do not provide a method for calculating the cross-node communication time, making it difficult to compare the performance of different communication methods and quantify the impact of cross-node communication time on simulation performance in electromagnetic transient real-time simulation.
[0005] The first aspect of the present application provides a cross-node communication time calculation method in real-time simulation, the method comprising:
[0006] determining the event sending time of a first node, the network event forwarding time, and the event receiving time of a second node according to a network channel formed by communication between any two different nodes in a real-time simulation task;
[0007] determining the cross-node communication time corresponding to the real-time simulation task according to the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node.
[0008] Preferably, the network channel includes a plurality of CPU configurations of the first node and a network card of the first node.
[0009] The event sending time of the first node is determined according to the time used for sending events by the CPU configuration of the first node and the time used for sending events by the network card of the first node.
[0010] Preferably, the time for the CPU of the first node to send the event is determined according to the time for the CPU of the first node to send the event data structure, the time for the distributed memory management library of the first node to calculate the CPU address offset, the time for the distributed memory management library of the first node to calculate the CPU address sending to the receiving CPU address offset, and the time for the distributed memory management library of the first node to integrate the CPU event sending event list.
[0011] Preferably, the step of obtaining the time for the network card of the first node to send the event comprises:
[0012] The longest time for the CPU of the first node to send the event to reach the network card is determined according to the time for the plurality of CPUs of the first node to respectively send the event to reach the network card.
[0013] The time for the network card driver of the first node to be used is determined according to the network card driver attribute of the first node, and the time for the network card driver of the first node to be used includes the network card startup time of the first node, the time for the network card driver scheduling memory management library of the first node to be used, and the network card addressing time of the first node.
[0014] The time for the network card of the first node to send the event is determined according to the longest time for the CPU of the first node to send the event to reach the network card, the time for the network card driver of the first node to be used, and the time for the network card of the first node to copy the event data.
[0015] Preferably, the network channel includes the hardware between the first node and the second node and a plurality of cascaded switches.
[0016] The network event forwarding time is determined according to the event transmission time of the hardware and the forwarding time of the plurality of switches.
[0017] Preferably, the network channel includes the network card of the second node and the CPU of the second node.
[0018] The event receiving time of the second node is determined according to the network card receiving processing time of the second node and the time for the CPU of the second node to receive the event data.
[0019] Preferably, the network card receiving processing time of the second node is determined according to the time for the network card driver scheduling memory management library of the second node to be used, the network card addressing time of the second node, and the time for the network card of the second node to copy the event data.
[0020] Preferably, the time for the CPU configuration of the second node to receive the event data is determined according to the interval time for the CPU configuration of the second node to poll the memory management library to receive the event data.
[0021] In a second aspect, the present application provides a device for calculating cross-node communication time in real-time simulation, comprising:
[0022] a node time calculation module configured to determine event sending time of a first node, network event forwarding time, and event receiving time of a second node according to a network channel formed by communication between any two different nodes in a real-time simulation task;
[0023] a node communication calculation module configured to determine cross-node communication time corresponding to the real-time simulation task according to the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node.
[0024] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to cause the processor to perform the steps of the method for calculating cross-node communication time in real-time simulation according to the first aspect.
[0025] As can be seen from the above technical solutions, the present application determines event sending time of a first node, network event forwarding time, and event receiving time of a second node according to a network channel formed by communication between any two different nodes in a real-time simulation task, thereby determining cross-node communication time corresponding to the real-time simulation task, and providing a quantitative method for cross-node communication time, thereby quantifying the influence of the cross-node communication time on simulation performance, which is beneficial to large-scale node parallel real-time simulation, and meanwhile, the cross-node communication time under different communication modes can be quantified, thereby determining the performance advantages and disadvantages of different communication modes, which is beneficial to improving the overall performance of large-scale node real-time simulation. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 An application environment of the method for calculating cross-node communication time in real-time simulation provided by the embodiment of the present application;
[0027] Figure 2 A flowchart of the method for calculating cross-node communication time in real-time simulation provided by the embodiment of the present application;
[0028] Figure 3 A structural schematic diagram of the network channel provided by the embodiment of the present application;
[0029] Figure 4 A flowchart of obtaining time for a network card of the first node to send an event provided by the embodiment of the present application;
[0030] Figure 5 A structural schematic diagram of a cross-node communication time calculation device in real-time simulation is provided for an embodiment of the present application.
[0031] Figure 6 A structural schematic diagram of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0033] The cross-node communication time calculation method in real-time simulation provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 The electromagnetic transient real-time simulation system communicates with the server 102 through a network, and the electromagnetic transient real-time simulation system includes multiple nodes, each node being used to perform different real-time simulation calculation tasks. When different nodes perform joint simulation, communication is performed between multiple nodes to forward event data. The data storage system can store data required to be processed by the server 102. The data storage system can be integrated on the server 102, or can be placed on a cloud or other network server. The server 102 determines the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node according to the network channel formed by the communication between any two different nodes in the real-time simulation task; and determines the cross-node communication time corresponding to the real-time simulation task according to the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node. The server 102 can be an independent physical server, a server cluster or a distributed system formed by multiple physical servers, or a cloud server providing cloud computing services.
[0034] The first node and the second node are any two different nodes in the real-time simulation task, wherein the first node can be set as an event sending node, and the second node can be set as an event receiving node, or the first node can be set as an event receiving node, and the second node can be set as an event sending node.
[0035] As shown in Figure 2 The cross-node communication time calculation method in real-time simulation provided by the embodiments of the present application is described by taking the server 102 in Figure 1 as an example, which includes the following steps S1 to S2. Wherein:
[0036] Step S1, determining the event sending time of the first node, the network event forwarding time and the event receiving time of the second node according to the network channel formed by the communication between any two different nodes in the real-time simulation task.
[0037] The network channel is formed by the communication between any two different nodes, and the network channel should include but is not limited to the first node, the second node and the communication equipment between the two nodes.
[0038] Step S2, determining the cross-node communication time corresponding to the real-time simulation task according to the event sending time of the first node, the network event forwarding time and the event receiving time of the second node.
[0039] In a general example, the communication time between the first node and the second node corresponding to the real-time simulation task, that is, the cross-node communication time, can be determined by the sum of the event sending time of the first node, the network event forwarding time and the event receiving time of the second node. When the cross-node communication time under multiple different communication modes is determined, the performance of different communication modes can be determined by comparing the lengths of the cross-node communication times under different communication modes.
[0040] It should be noted that the present application determines the event sending time of the first node, the network event forwarding time and the event receiving time of the second node according to the network channel formed by the communication between any two different nodes in the real-time simulation task, thereby determining the cross-node communication time corresponding to the real-time simulation task, giving a quantitative method of the cross-node communication time, thereby quantifying the influence of the cross-node communication time on the simulation performance, which is beneficial to large-scale node parallel real-time simulation. At the same time, the cross-node communication time under different communication modes can be quantified, thereby determining the performance of different communication modes, which is beneficial to improving the overall performance of large-scale node real-time simulation.
[0041] In the network channel structure as shown in FIG. 1, Figure 3 The network channel includes the CPU structure of the first node and the network card of the first node.
[0042] The event sending time of the first node is determined according to the time for sending events by the CPU structure of the first node and the time for sending events by the network card of the first node.
[0043] The time for sending events by the CPU structure of the first node is determined according to the time for sending event data structure by the CPU structure of the first node, the time for calculating the address offset of the CPU structure by the distributed memory management library of the first node, the time for calculating the address offset of the CPU structure sending to the address of the receiving end CPU structure by the distributed memory management library of the first node, and the time for integrating the CPU structure sending event list by the distributed memory management library of the first node.
[0044] The specific method for calculating the time taken by the CPU of the first node to construct and send events is as follows:
[0045] t xi-send =t xi-str +t xi-calsend +t xi-calsave +t xi-int
[0046] In the formula, t xi-send The time t is used to construct and send an event for the i-th CPU of the first node x. xi-str The time t is the time taken to construct the event data structure for the i-th CPU of the first node x. xi-calsend For the distributed memory management library of the first node x, calculate the time t taken to construct the address offset for the i-th CPU. xi-calsave For the distributed memory management library of the first node x, calculate the time t taken to send the constructed address of the i-th CPU to the offset of the constructed address of the receiving CPU. xi-int The time taken to construct the event sending list for the i-th CPU in the distributed memory management library integration for the first node x.
[0047] Among them, such as Figure 4 As shown, the steps for obtaining the time taken by the network card to send the event of the first node include steps S101 to S103. Wherein:
[0048] Step S101: Determine the longest time taken for the CPU configuration of the first node to send events to the network card based on the time taken for the events to be sent to the network card by the multiple CPU configurations of the first node.
[0049] It is understandable that the time taken for the events sent by the multiple CPUs of the first node to reach the network card is different. Therefore, it is necessary to select the CPU of the first node that takes the longest time to send events to the network card in order to improve the accuracy of the calculation of the time taken for the network card to send events.
[0050] Step S102: Determine the time taken by the network card driver of the first node according to the network card driver attributes of the first node. The time taken by the network card driver of the first node includes the network card startup time of the first node, the time taken by the network card driver to schedule the memory management library of the first node, and the time taken by the network card addressing of the first node.
[0051] Among them, the network card driver attributes are the driver attributes determined based on the network card settings.
[0052] Step S103: Determine the time taken for the first node's network card to send the event based on the longest time taken for the first node's CPU to construct and send the event to the network card, the time taken for the first node's network card driver, and the time taken for the first node's network card to copy the event data.
[0053] It should be noted that the time used by the network card in the embodiment of the application to copy event data is the time used by the network card to copy complete event data. When copying event data, the integrity detection mechanism is used to verify whether the copied event data is complete. If the copied data is not complete, the copied data is corrected until the copying is complete. The time used by the network card to copy event data is the complete time determined by accumulating the copying time.
[0054] Specifically, the calculation method of the time used by the network card of the first node to send an event is specifically:
[0055] t x-nc =max(t x1-iss , t x2-iss , ……, t xi-iss )+t x-ncs +t x-ncd +t x-ncf +t x-ncc
[0056] In the formula, t x-nc is the time used by the network card of the first node x to send an event, t x1-iss is the time used by the first CPU of the first node x to send an event to reach the network card; t x2-iss is the time used by the second CPU of the first node x to send an event to reach the network card; t xi-iss is the time used by the i-th CPU of the first node x to send an event to reach the network card (i=1, 2, …); t x-ncs is the start time of the network card in the first node x; t x-ncd is the time used by the memory management library of the network card driver in the first node x to schedule; t x-ncf is the time used by the network card in the first node x to address; and t x-ncc is the time used by the network card in the first node x to copy event data.
[0057] As shown in FIG. 1, the network channel includes hardware between the first node and the second node and a plurality of cascaded switches. Figure 3
[0058] The network event forwarding time is determined according to the event transmission time of the hardware and the forwarding time of the plurality of switches.
[0059] Specifically, the calculation method of the network event forwarding time between the first node x and the second node y is specifically:
[0060] t xy-net =t xy-ht +n xy *t switch
[0061] In the formula, t xy-net t represents the network event forwarding time between the first node x and the second node y. xy-ht Let n be the hardware transmission time between the first node x and the second node y. xy Let t be the number of switches traversed between the first node x and the second node y. switch The forwarding time of each level of switch between the first node x and the second node y.
[0062] It is understandable that the hardware transmission time between the first node x and the second node y reflects the communication latency, while the forwarding time of each level of switch is determined by the switch performance.
[0063] like Figure 3 As shown, the network channel includes the network card of the second node and the CPU structure of the second node.
[0064] The event reception time of the second node is determined based on the network card reception and processing time of the second node and the time taken by the CPU of the second node to construct and receive event data.
[0065] The network card reception and processing time of the second node is determined based on the time used by the network card driver to schedule the memory management library, the time used by the network card to address, and the time used by the network card to copy event data.
[0066] Specifically, the calculation method for the network card reception and processing time of the second node is as follows:
[0067] t y-nc = t y-ncd +t y-ncf +t y-ncc
[0068] In the formula, t y-nc Let t be the network interface card (NIC) receiving and processing time of the second node y. y-ncd The time t is the time used by the network card driver to schedule the memory management library for the second node y. y-ncf The time t is the network card addressing time for the second node y. y-ncc The time taken to copy event data to the network interface card of the second node y.
[0069] The time taken for the CPU of the second node to receive event data is determined by the interval at which the CPU of the second node polls the memory management library to receive event data.
[0070] Specifically, the calculation method for the time taken by the CPU of the second node to construct the event data reception is as follows:
[0071] t yj =tyj-polling
[0072] wherein, t yj is the time for the CPU configuration of the second node y to receive event data, t yj-polling is the interval time for the CPU configuration of the second node y to poll to receive event data through the memory management library.
[0073] Based on the same inventive concept, the embodiments of the present application further provide a device for implementing the cross-node communication time calculation method in real-time simulation.
[0074] The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more device embodiments for calculating cross-node communication time in real-time simulation provided below can refer to the limitations for the method for calculating cross-node communication time in real-time simulation described above, and will not be repeated here.
[0075] As Figure 5 shown, the embodiments of the present application further provide a device for calculating cross-node communication time in real-time simulation, and the device comprises:
[0076] a node time calculation module 100, configured to determine event sending time of a first node, network event forwarding time, and event receiving time of a second node according to a network channel formed by communication between any two different nodes in a real-time simulation task;
[0077] a node communication calculation module 200, configured to determine cross-node communication time corresponding to the real-time simulation task according to the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node.
[0078] In some embodiments, the network channel comprises a plurality of CPU configurations of the first node and a network card of the first node.
[0079] The event sending time of the first node is determined according to time for sending events by a CPU configuration of the first node and time for sending events by a network card of the first node.
[0080] In some embodiments, the time for sending events by the CPU configuration of the first node is determined according to time for sending event data structures by the CPU configuration of the first node, time for calculating CPU configuration address offset by a distributed memory management library of the first node, time for calculating CPU configuration address sending to accept end CPU configuration address offset by the distributed memory management library of the first node, and time for integrating CPU configuration sending event link list by the distributed memory management library of the first node.
[0081] In some embodiments, the time taken by the network card of the first node to send the event is determined according to the longest time taken by the CPU configuration of the first node to send the event to the network card, the time taken by the network card driver of the first node, and the time taken by the network card of the first node to copy the event data.
[0082] The longest time taken by the CPU configuration of the first node to send the event to the network card is determined according to the CPU configuration of the first node.
[0083] The time taken by the network card driver of the first node is determined according to the network card driver attribute of the first node, and includes the network card startup time of the first node, the time taken by the network card driver of the first node to schedule the memory management library, and the network card addressing time of the first node.
[0084] The time taken by the network card of the first node to send the event is determined according to the longest time taken by the CPU configuration of the first node to send the event to the network card, the time taken by the network card driver of the first node, and the time taken by the network card of the first node to copy the event data.
[0085] In some embodiments, the network channel includes the hardware between the first node and the second node and a plurality of cascaded switches.
[0086] The network event forwarding time is determined according to the event transmission time of the hardware and the forwarding time of the plurality of switches.
[0087] In some embodiments, the network channel includes the network card of the second node and the CPU configuration of the second node.
[0088] The event receiving time of the second node is determined according to the network card receiving processing time of the second node and the time taken by the CPU configuration of the second node to receive the event data.
[0089] In some embodiments, the network card receiving processing time of the second node is determined according to the time taken by the network card driver of the second node to schedule the memory management library, the network card addressing time of the second node, and the time taken by the network card of the second node to copy the event data.
[0090] In some embodiments, the time taken by the CPU configuration of the second node to receive the event data is determined according to the interval time at which the CPU configuration of the second node polls the memory management library to receive the event data.
[0091] As shown in Figure 6 The embodiments of the present application also provide an electronic device, which includes a memory 20 and a processor 30. The memory 20 stores a computer program, and the computer program is executed by the processor 30 to make the processor 30 execute the steps of the real-time simulation cross-node communication time calculation method according to any one of the above embodiments.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and the electronic device described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
[0093] It should be noted that the terms "first", "second", and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological order. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0094] In several embodiments provided by the present application, it can be understood that each block in the flowchart or block diagram can represent a module, a program segment or a part of code, and the module, the program segment or the part of code include one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that noted in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can also be executed in reverse order, depending on the functions involved.
[0095] In several embodiments provided by the present application, it should be understood that the disclosed system, electronic device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other form.
[0096] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0097] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0098] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for executing all or part of the steps of the method described in each embodiment of the present application by a computer device (which can be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), a random access memory (English full name: Random Access Memory, English abbreviation: RAM), a magnetic disk or an optical disk, and various program code storage media.
[0099] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A method for computing communication time across nodes in real-time simulation, characterized by, The method comprises: determining the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node according to a network channel formed by communication between any two different nodes in a real-time simulation task; determining the cross-node communication time corresponding to the real-time simulation task according to the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node; the network channel comprises a plurality of CPU configurations of the first node and a network card of the first node; the event sending time of the first node is determined according to the time used for sending an event by the CPU configuration of the first node and the time used for sending an event by the network card of the first node; the time used for sending an event by the CPU configuration of the first node is determined according to the time used for sending an event data structure by the CPU configuration of the first node, the time used for calculating a CPU configuration address offset by a distributed memory management library of the first node, the time used for sending the CPU configuration address offset to an acceptor CPU configuration address offset by the distributed memory management library of the first node, and the time used for integrating a CPU configuration to send an event link list by the distributed memory management library of the first node; the step of obtaining the time used for sending an event by the network card of the first node comprises: determining the longest time used for sending an event by the CPU configuration of the first node to reach the network card according to the time used for sending an event by the plurality of CPU configurations of the first node to reach the network card respectively; determining the time used for the network card driver of the first node according to the network card driver attribute of the first node, wherein the time used for the network card driver of the first node comprises a network card startup time of the first node, a time used for scheduling a memory management library by the network card driver of the first node, and a network card addressing time of the first node; determining the time used for sending an event by the network card of the first node according to the longest time used for sending an event by the CPU configuration of the first node to reach the network card, the time used for the network card driver of the first node, and the time used for copying event data by the network card of the first node.
2. The method of claim 1, wherein, the network channel comprises a plurality of cascaded switches and hardware between the first node and the second node; the network event forwarding time is determined according to the event transmission time of the hardware and the forwarding time of the plurality of switches.
3. The method of claim 1, wherein, the network channel comprises a network card of the second node and a CPU configuration of the second node; the event receiving time of the second node is determined according to the network card receiving processing time of the second node and the time used for receiving event data by the CPU configuration of the second node.
4. The method of claim 3, wherein, the network card receiving processing time of the second node is determined according to the time used for scheduling a memory management library by the network card driver of the second node, the network card addressing time of the second node, and the time used for copying event data by the network card of the second node.
5. The method of claim 3, wherein, the time used for receiving event data by the CPU configuration of the second node is determined according to the interval time of polling to receive event data by the memory management library of the CPU configuration of the second node.
6. An apparatus for computing communication time across nodes in real-time simulation, characterized by: the device comprises: The node time calculation module is configured to determine event sending time of a first node, network event forwarding time, and event receiving time of a second node according to a network channel formed by communication between any two different nodes in a real-time simulation task. The node communication calculation module is configured to determine cross-node communication time corresponding to the real-time simulation task according to the event sending time of the first node, the network event forwarding time, and the event receiving time of the second node. The network channel includes a plurality of CPU configurations of the first node and a network card of the first node. The event sending time of the first node is determined according to time used for sending an event by a CPU configuration of the first node and time used for sending the event by the network card of the first node. The time used for sending the event by the CPU configuration of the first node is determined according to time used for sending an event data structure by the CPU configuration of the first node, time used for calculating a CPU configuration address offset by a distributed memory management library of the first node, time used for sending the CPU configuration address offset to an accepted CPU configuration address offset by the distributed memory management library of the first node, and time used for integrating a CPU configuration to send an event link list by the distributed memory management library of the first node. The time used for sending the event by the network card of the first node is obtained, including: The longest time used for sending the event by the CPU configuration of the first node to reach the network card is determined according to time used for sending the event by the plurality of CPU configurations of the first node to reach the network card respectively. The time used for the network card driver of the first node is determined according to a network card driver attribute of the first node, and the time used for the network card driver of the first node includes network card startup time of the first node, time used for scheduling a memory management library by the network card driver of the first node, and time used for network card addressing of the first node. The time used for sending the event by the network card of the first node is determined according to the longest time used for sending the event by the CPU configuration of the first node to reach the network card, the time used for the network card driver of the first node, and time used for copying event data by the network card of the first node.
7. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the cross-node communication time calculation method in the real-time simulation according to any one of claims 1 to 5.
Citation Information
Patent Citations
Low-delay data transmission method
CN113922907A
Ring type network system
JP2007306542A