WO2021223464A1 - 一种分布式仿真的时间一致性同步方法 - Google Patents
一种分布式仿真的时间一致性同步方法 Download PDFInfo
- Publication number
- WO2021223464A1 WO2021223464A1 PCT/CN2021/071974 CN2021071974W WO2021223464A1 WO 2021223464 A1 WO2021223464 A1 WO 2021223464A1 CN 2021071974 W CN2021071974 W CN 2021071974W WO 2021223464 A1 WO2021223464 A1 WO 2021223464A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- clock
- simulation
- time
- logic
- node
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
- H04L7/0008—Synchronisation information channels, e.g. clock distribution lines
- H04L7/0012—Synchronisation information channels, e.g. clock distribution lines by comparing receiver clock with transmitter clock
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/04—Generating or distributing clock signals or signals derived directly therefrom
- G06F1/12—Synchronisation of different clock signals provided by a plurality of clock generators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
- G06F30/33—Design verification, e.g. functional simulation or model checking
- G06F30/3308—Design verification, e.g. functional simulation or model checking using simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
- G06F30/33—Design verification, e.g. functional simulation or model checking
- G06F30/3308—Design verification, e.g. functional simulation or model checking using simulation
- G06F30/3312—Timing analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/12—Timing analysis or timing optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/39—Circuit design at the physical level
- G06F30/396—Clock trees
Definitions
- the invention belongs to the technical field of time synchronization of computer collaborative simulation, and specifically relates to a time consistency synchronization method of distributed simulation.
- Distributed simulation system has gradually become an important evaluation and test method due to its low cost, repeatable and non-destructive characteristics. It has developed rapidly in high-end areas such as shipbuilding, aerospace, oil and gas exploitation, and large-scale equipment installation.
- a distributed simulation system multiple computers distributed in different locations jointly complete the simulation task. Each completes the mutual communication and data interaction through the computer network. Since the nodes are distributed in different geographical locations, how to ensure the time logic consistency of the data of each node and the time-related events is a key problem that the distributed virtual test system needs to solve.
- time synchronization is performed in a server/client manner, and if the server goes down, the simulation system will stop running, and the fault tolerance and robustness are low.
- each node has a high degree of autonomy.
- the nodes can be freely connected to each other to form a new connection unit. Any node may become a phased center, but it does not have a mandatory central control function.
- the influence between nodes will form a non-linear causal relationship through the network. This open, flat, and equal system phenomenon or structure is called decentralization.
- the purpose of the present invention is to provide a time consistency synchronization method for distributed simulation that solves the problem of low time consistency of distributed simulation systems in the prior art.
- Step 1 Set the system parameters of each simulation node in the virtual simulation system to zero, and set the local minimum advance clock interval;
- the number of simulation nodes included in the virtual simulation system is at least two, and all simulation nodes are in an equivalent position;
- the system parameters include local logic clock, global logic clock, global minimum advance clock interval, and other simulations Node logic clock list;
- the local logic clock represents the system logic time of the current simulation node;
- the local minimum advancing clock interval represents the minimum interval of each advancing time request of the current simulation node;
- the global logic clock represents the global minimum The local logic clock of the simulation node;
- the global minimum advance clock interval represents the minimum value of the logic time advance interval in the current simulation node;
- Step 2 Each simulation node establishes a connection with other simulation nodes in the network; determines the master clock, and other simulation nodes are set as slave clocks;
- Step 3 Each slave clock constructs a logical time status query package, and pushes the logical time status query package to the master clock; the slave clock receives the query response package from the master clock, and the query response package includes the master clock’s global Logic clock, local logic clock of other simulation nodes and local minimum advance clock interval; slave clock sets its own global logic clock and local logic clock as the global logic clock in the query response packet;
- the data between the master clock and the slave clock are transmitted through the network communication working thread;
- the network communication working thread includes a sending queue and a receiving queue; the data packets sent by the simulation node to other simulation nodes are pushed into the sending queue in order ;
- the receiving queue stores the data packets sent by other simulation nodes according to the network receiving order;
- Step 4 Each slave clock packs the local logic clock into a data packet and transmits it to the receiving queue of other simulation nodes through the network communication working thread; other simulation nodes select a data packet from the receiving queue and compare the local logic clock in the data packet And its own local logic clock;
- the data packet is discarded, and a logic clock lag response packet is returned to the data packet sender;
- the data packet is accepted
- Step 5 After the master clock receives the logic time advance request of the slave clock, it compares the local logic time requested by the slave clock with the global logic time of the master clock;
- the time advance is allowed
- the local logic time requested by the slave clock to advance is greater than the global logic time and greater than the sum of the global logic time and the global minimum advance clock interval, compare the sum of the first data of other simulation nodes and the global logic time and the global minimum advance clock interval at this time;
- the first data is the sum of the local logic time and the local minimum advance clock interval; if the first data is greater than or equal to the sum of the global logic time and the global minimum advance clock interval, and a time advance request is blocked, then all time advances are allowed Request to update the local logic time list of the simulation node in the master clock, and set the global logic time to the smallest local logic time among all simulation nodes.
- the present invention may also include:
- the method for establishing a connection between each simulation node and other simulation nodes in the network in step 2 is specifically as follows:
- Step 2.1 The first simulation node sends a detection packet to query other simulation nodes in the network by broadcasting;
- Step 2.2 After receiving the detection packet, other simulation nodes construct a response packet and establish a TCP connection with the first simulation node and transmit the response packet back to the first simulation node; the response packet includes the network address and the network connection list ;
- Step 2.3 After receiving the response packet, the first simulation node compares the network connection list in the response packet with the local network connection list. If the contents of the two are inconsistent, construct a network information difference package, and use the network address to transmit the network information difference package To the simulation node sending the response packet, the connection establishment is completed.
- each simulation node first sets itself as the master clock and notifies other simulation nodes; if there is a master clock in the network at this time, the master clock informs it Simulation node, the simulation node changes itself to the slave clock; if there is no master clock in the network at this time, it enters the stage of voting to select the master clock to select the master clock, and each simulation node determines whether the selected master clock is If it is, set itself as the master clock; if not, set itself as the slave clock;
- the voting to select the master clock stage specifically includes the following steps:
- Step 3.1 Each simulation node constructs an internal ballot; the internal ballot includes the node identification code and the global logic clock;
- Step 3.2 Put the internal votes into the sending queue and send them to other simulation nodes as external votes for other simulation nodes to obtain from the receiving queue;
- Step 3.3 The simulation node obtains external votes from the receiving queue without interval
- Step 3.4 After the simulation node obtains all the external votes connected to the network, the external votes are counted; if the simulation node cannot obtain the external votes of other simulation nodes, it will try to re-establish the network connection with other simulation nodes, and send and send again after the connection is successful. Accept work
- Step 3.5 Select the vote with the largest global logical clock value, and determine whether the number of selected votes is greater than or equal to 2; if the number of selected votes is greater than or equal to 2, select the vote with the largest node identification code, and discard the remaining votes;
- Step 3.6 Change the internal ballot of this node to the selected external ballot, and put the changed internal ballot into the sending queue and send it to other simulation nodes;
- Step 3.7 The simulation node obtains the second round of external votes from the receiving queue without interval
- Step 3.8 After the simulation node obtains all the external ballots connected to the network, it counts the external ballots;
- Step 3.9 Determine whether more than half of the simulation nodes approve the external votes of the node; if more than half of the simulation nodes approve the external votes of the node, select the node as the master clock; otherwise, return to step 3.1 to continue the selection. .
- the present invention selects the most suitable master clock according to the votes, and then uses the master clock to control the synchronization of other clocks in the network, so as to ensure the time logic consistency of the data of each node and the time-related events, even if a certain simulation Node downtime has little impact on other links of the entire system, can be effectively decentralized, can ensure time consistency to the greatest extent, and ensure the correctness and scale of the entire distributed system.
- Figure 1 is a schematic diagram of the work thread composition of the simulation node.
- Figure 2 is a schematic diagram of signal transmission in the process of establishing a connection between a simulated node.
- Figure 3 is a schematic diagram of information comparison in the process of establishing a connection between a simulated node.
- Figure 4 is a flowchart of voting to select the master clock.
- FIG. 5 is a flowchart of the slave clock execution in the clock synchronization process.
- Figure 6 is a flowchart of the master clock execution in the clock synchronization process.
- the present invention designs a time consistency synchronization method for distributed simulation.
- the system parameters are initialized first, and the local minimum advance clock interval is set; then each simulation node is connected with other simulation nodes in the network, and the master clock is determined , Other simulation nodes are set as the slave clock; each slave clock uses the master clock to query the logic time status; the slave clock sets its own global logic clock and local logic clock as the global logic clock in the query response packet; The clock determines whether to send a logical time advance request to the master clock according to the data packet comparison; the master clock determines whether to allow the logical time advance according to the logical time advance request sent by the slave clock.
- the present invention can effectively decentralize, can ensure time consistency to the greatest extent, and ensure the correctness and scale of the entire distributed system.
- a time-consistent synchronization method for distributed simulation includes the following steps:
- the system parameters include local logic clock, global logic clock, local minimum advance clock interval, global minimum advance clock interval and other simulation node logic clock lists, and set Local minimum advance clock interval;
- Each simulation node establishes a connection with other simulation nodes in the network, and determines the master clock, and other simulation nodes are set as slave clocks;
- Each slave clock constructs a logical time state query packet, and pushes the logical time state query packet to the master clock; the slave clock receives the query response packet that the master clock answers, and the query response packet includes the master clock's global Logic clock, local logic clock of other simulation nodes and local minimum advance clock interval; slave clock sets its own global logic clock and local logic clock as the global logic clock in the query response packet;
- Each slave clock packs the local logic clock into a data packet and transmits it to the receiving queue of other simulation nodes through the network communication working thread.
- the other simulation nodes select a data packet from the receiving queue and compare the local logic clock in the data packet. And its own local logic clock, if the local logic clock in the data packet is less than its own local logic clock, the data packet is discarded, and the logic clock lag response packet is returned to the data packet sender; if the local logic clock in the data packet is greater than or equal to If its own local logic clock is less than the sum of the local logic time and the local minimum advance clock interval, the data packet will be accepted; if it is greater than or equal to the sum of the local logic time and the local minimum advance clock interval, send a logic time advance request to the master clock;
- the master clock After the master clock receives the logic time advance request of the slave clock, it compares the local logic time requested by the slave clock with the global logic time of the master clock. If the local logic time requested by the slave clock is less than If it is equal to the global logic time of the master clock, a response packet that allows time advancement to succeed is returned to the slave clock; if it is greater than the global logic time and less than the sum of the global logic time and the global minimum advance clock interval, the time advancement is allowed; if it is greater than the global logic The sum of the time and the global minimum advance clock interval, compare the first data of other simulation nodes at this time with the sum of the global logic time and the global minimum advance clock interval. The first data is the sum of the local logic time and the local minimum advance clock interval.
- step (2) the method for establishing a connection is:
- the first simulation node inquires about other simulation nodes in the network by broadcasting and sending detection packets;
- the response packet includes the network address and the network connection list
- the first simulation node After receiving the response packet, the first simulation node compares the network connection list in the response packet with the local network connection list. If the contents of the two are inconsistent, construct a network information difference packet, and use the network address to transmit the network information difference packet to send the response.
- the simulation node of the package completes the connection establishment.
- step (2) the method for determining the master clock is:
- Each simulation node first sets itself as the master clock and informs other simulation nodes. If there is a master clock in the network at this time, the master clock informs the simulation node, and the simulation node changes itself to the slave clock and executes Step (3): If there is no master clock in the network at this time, enter the voting stage to select the master clock. Each simulation node judges whether the selected master clock is its own, and if so, sets itself as the master clock Party clock; if not, set yourself as the slave clock.
- step (2) the method for voting to select the master clock is:
- Each simulation node constructs an internal ballot, which includes the node identification code and the global logic clock;
- step (3) the data between the master clock and the slave clock are transmitted through the network communication working thread
- the network communication working thread includes a sending queue and a receiving queue; the data packets sent by the simulation node to other simulation nodes follow the order Push to the sending queue; the receiving queue stores the data packets sent by other simulation nodes according to the network receiving order.
- the local logic clock represents the system logic time of the current simulation node; the local minimum advancing clock interval represents the minimum interval of each advancing time request of the current simulation node; the global logic clock represents the global minimum local logic clock of the simulation node; global The minimum advance clock interval represents the minimum value of the logic time advance interval in the current simulation node.
- step (d) if the simulation node cannot obtain the external votes of other simulation nodes, it will try to re-establish a network connection with other simulation nodes, and then send and receive again after the connection is successful.
- the network connection monitoring worker thread uses the Ping-Pong mechanism to regularly monitor the network connection with other nodes.
- the number of simulation nodes included in the virtual simulation experiment system is at least two, and all simulation nodes are in a peer-to-peer position.
- the present invention provides a time consistency synchronization method for distributed simulation.
- the most suitable master clock is selected according to votes, and then the master clock is used to control the synchronization of other clocks in the network to ensure the synchronization of each node.
- Data and time-related events are consistent in time logic. Even if a simulation node goes down, it will have little impact on other links of the entire system. It can effectively decentralize and ensure time consistency to the greatest extent. , To ensure the correctness and scale of the entire distributed system.
- the master clock controls the synchronization of other clocks in the network, that is, the slave clock.
- Clock control information is exchanged between the master clock and other local slave clocks to synchronize the local slave clock with the master clock.
- the clock control information exchanged includes: the identification code of the slave clock (Identification Code); the current logical time of the slave clock; the minimum logical time advance of the slave clock; the slave clock tries to advance to the logical time; and the master clock is in Response information after receiving the time advance request of the slave clock; Vote information used for voting on the master clock selection after the current master clock is down.
- the simulation node contains three working threads, namely: a transaction processing working thread T1, a network connection monitoring thread T2, and a network communication working thread T3.
- the network communication work thread contains two message queues: SendQueue queue S001 and RecvQueue queue S002.
- the data packets sent by the simulation node to other nodes are pushed to SendQueue in order; the RecvQueue queue stores the data packets sent by other nodes according to the network receiving order.
- the transaction processing worker thread T1 runs the time synchronization algorithm code, including the local logic clock V1, the global logic clock V2, the local minimum advance clock interval V3, the local logic clock list of other nodes V4, and the external vote set V5.
- the local logic clock V1 represents the system logic time of the current simulation node; the local minimum advance clock interval V3 represents the minimum interval of each advance time request of the current simulation node; the global logic clock V2 represents the global minimum simulation node local logic clock, usually all nodes The local logic clock is greater than or equal to it; the global minimum advance clock interval refers to the minimum value of the logic time advance interval in the current simulation node.
- the network connection monitoring worker thread uses the Ping-Pong mechanism to periodically monitor the network connection with other nodes.
- a time-consistent synchronization algorithm for distributed simulation including the following steps:
- the virtual simulation experiment system contains n (n ⁇ 2) simulation nodes, all simulation nodes are in a peer position, and each simulation node can play the role of master clock and slave clock.
- n (n ⁇ 2) simulation nodes all simulation nodes are in a peer position, and each simulation node can play the role of master clock and slave clock.
- the system parameters include local logic clock, global logic clock, local minimum advance clock interval, global minimum advance clock interval and other simulation node logic clock lists, and set the local minimum Advance the clock interval;
- the local logic clock represents the system logic time of the current simulation node; the local minimum advance clock interval represents the minimum interval of each advance time request of the current simulation node; the global logic clock represents the global minimum simulation node local logic clock; the global minimum advance clock interval represents the current The minimum value of the logical time advance interval in the simulation node.
- Each simulation node establishes a connection with other simulation nodes in the network, and determines the master clock, and other simulation nodes are set as slave clocks;
- the method for establishing a connection between simulation nodes is:
- the detection packet P1 is sent by broadcasting to query other simulation nodes in the current computer network.
- the simulation node A and the simulation node B in the network encapsulate the network address and the network connection list V9 into a response packet, establish a TCP connection with the simulation node C and transmit the response packet P2.
- the simulation node C receives the response packet, as shown in Figure 3, it compares the network connection list V9 of the node with the network connection list P3 in the response packet. If the contents of the two network connection lists V9 are inconsistent, construct a network information difference packet P5, and transmit the network information difference packet to the response packet to send the simulation node P6 to complete the connection establishment.
- the method of determining the master clock is:
- Each simulation node first sets itself as the master clock and informs other simulation nodes. If there is a master clock in the network at this time, the master clock informs the simulation node, and the simulation node changes itself to the slave clock and executes Step (3): If there is no master clock in the network at this time, enter the voting stage to select the master clock. Each simulation node judges whether the selected master clock is its own, and if so, sets itself as the master clock Party clock; if not, set yourself as the slave clock.
- Each simulation node constructs an internal ballot, which includes the node identification code and the global logic clock;
- the simulation node first judges whether the master clock corresponding to the voting currently recognized by more than half of the simulation nodes is its own, if it is, it will set its own as the master clock; if not, it will set itself as the slave clock.
- each slave clock constructs a logical time status query packet, and pushes the logical time status query packet to the master clock; the slave clock receives the query response packet responded by the master clock, and the query response packet contains Including the global logic clock of the master clock, the local logic clocks of other simulation nodes, and the local minimum advance clock interval; after the slave clock receives the query response packet, it sets its own global logic clock and local logic clock as those in the query response packet Global logic clock;
- the data between the master clock and the slave clock are transmitted through a network communication working thread, the network communication working thread includes a sending queue and a receiving queue; the data packets sent by the simulation node to other simulation nodes are pushed into the sending queue in order; The receiving queue stores the data packets sent by other simulation nodes according to the network receiving order.
- each slave clock packs the local logic clock into data packets and transmits them to the receiving queue of other simulation nodes through the network communication working thread.
- the other simulation nodes select a data packet from the receiving queue and compare the data packets. If the local logic clock in the data packet is less than its own local logic clock, the data packet will be discarded, and the logic clock lag response packet will be returned to the data packet sender; if the local logic clock in the data packet is If the logic clock is greater than or equal to its own local logic clock and less than the sum of the local logic time and the local minimum advance clock interval, the data packet will be accepted; if it is greater than or equal to the sum of the local logic time and the local minimum advance clock interval, the logic time advance will be sent to the master clock ask;
- the local logic time requested by the slave clock is compared with the global logic time of the master clock. If the slave clock requests If the advanced local logic time is less than or equal to the global logic time of the master clock, a response packet that allows the time advancement to succeed is returned to the slave clock; if it is greater than the global logic time and less than the sum of the global logic time and the global minimum advance clock interval, the time is allowed Advance; if it is greater than the sum of the global logic time and the global minimum advance clock interval, compare the sum of the first data of other simulation nodes and the global logic time and the global minimum advance clock interval at this time. The first data is the local logic time and the local minimum advance clock.
- the network connection monitoring worker thread uses the Ping-Pong mechanism to periodically monitor the network connection with other nodes.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
Claims (3)
- 一种分布式仿真的时间一致性同步方法,其特征在于,包括以下步骤:步骤1:将虚拟仿真***中的各仿真节点的***参数置零,设置本地最小推进时钟间隔;所述的虚拟仿真***中包含的仿真节点个数至少为2个,所有的仿真节点均处于对等地位;所述的***参数包括本地逻辑时钟、全局逻辑时钟、全局最小推进时钟间隔及其他仿真节点逻辑时钟列表;所述的本地逻辑时钟表示当前仿真节点的***逻辑时间;所述的本地最小推进时钟间隔表示当前仿真节点每个推进时间请求的最小间隔;所述的全局逻辑时钟表示全局最小的仿真节点本地逻辑时钟;所述的全局最小推进时钟间隔表示当前仿真节点中逻辑时间推进间隔的最小值;步骤2:各仿真节点与网络中的其他仿真节点建立连接;确定主方时钟,其他仿真节点设置为从方时钟;步骤3:各从方时钟构建逻辑时间状态查询包,并将逻辑时间状态查询包推送至主方时钟;从方时钟接收主方时钟应答的查询响应包,查询响应包中包括主方时钟的全局逻辑时钟、其他仿真节点的本地逻辑时钟及本地最小推进时钟间隔;从方时钟将自身的全局逻辑时钟、本地逻辑时钟设置为查询响应包中的全局逻辑时钟;主方时钟和从方时钟之间的数据均通过网络通讯工作线程传输;所述的网络通讯工作线程包括发送队列和接收队列;仿真节点发送到其他仿真节点的数据包依照顺序推送至发送队列中;所述的接收队列依照网络接收顺序存放其他仿真节点发送过来的数据包;步骤4:各从方时钟将本地逻辑时钟打包成数据包通过网络通讯工作线程传到其他仿真节点的接收队列中;其他仿真节点从接收队列中选取一个数据包,比较数据包中的本地逻辑时钟和自身的本地逻辑时钟;若数据包中的本地逻辑时钟小于自身的本地逻辑时钟,则丢弃数据包,并向数据包发送方返回逻辑时钟滞后响应包;若数据包中的本地逻辑时钟大于或等于自身的本地逻辑时钟且小于本地逻辑时间与本地最小推进时钟间隔总和,则接受数据包;若数据包中的本地逻辑时钟大于或等于自身的本地逻辑时钟,且数据包中的本地逻辑时钟大于或等于本地逻辑时间与本地最小推进时钟间隔总和,则向主方时钟发送逻辑时间推进请求;步骤5:主方时钟接收到从方时钟的逻辑时间推进请求后,将从方时钟请求推进的本地逻辑时间与主方时钟的全局逻辑时间进行比较;若从方时钟请求推进的本地逻辑时间小于或等于主方时钟的全局逻辑时间,则向从方时钟返回允许时间推进成功的响应包;若从方时钟请求推进的本地逻辑时间大于全局逻辑时间且小于全局逻辑时间与全局最小推进时钟间隔总和,则允许时间推进;若从方时钟请求推进的本地逻辑时间大于全局逻辑时间且大于全局逻辑时间与全局最小推进时钟间隔总和,则比较此时其他仿真节点的第一数据与全局逻辑时间与全局最小推进时钟间隔总和;所述的第一数据为本地逻辑时间与本地最小推进时钟间隔总和;若第一数据大于或等于全局逻辑时间与全局最小推进时钟间隔总和,且有时间推进请求被阻塞,则允许全部的时间推进请求,更新主方时钟中的仿真节点的本地逻辑时间列表,将全局逻辑时间设置为所有仿真节点中最小的本地逻辑时间。
- 根据权利要求1所述的一种分布式仿真的时间一致性同步方法,其特征在于:所述的步骤2中各仿真节点与网络中的其他仿真节点建立连接的方法具体为:步骤2.1:第一仿真节点通过广播发送侦测包查询网络中其他仿真节点;步骤2.2:其他仿真节点在接收到侦测包后,构建响应包并与第一仿真节点建立TCP连接并将响应包回传给第一仿真节点;所述的响应包包括网络地址和网络连接列表;步骤2.3:第一仿真节点接收到响应包后,将响应包中的网络连接列表与本地网络连接列表相比对,若两者内容不一致,构建网络信息差异包,利用网络地址传输网络信息差异包至发送响应包的仿真节点,完成连接建立。
- 根据权利要求1或2所述的一种分布式仿真的时间一致性同步方法,其特征在于:所述的步骤2中主方时钟的确定方法具体为:各仿真节点先将自己设置为主方时钟,并通知其他仿真节点;若此时网络中已有主方时钟,主方时钟则告知该仿真节点,该仿真节点将自己改为从方时钟;若此时网络中不存在主方时钟,则进入投票选取主方时钟阶段选取主方时钟,各仿真节点判断被选取的主方时钟是否是自己,若是则将自己设置为主方时钟;若不是,则将自己设置为从方时钟;所述的投票选取主方时钟阶段具体包括以下步骤:步骤3.1:每个仿真节点构建内部选票;所述的内部选票包括节点标识码与全局逻辑时钟;步骤3.2:将内部全票放入发送队列中发往其他仿真节点,作为外部选票,供其他仿真节点从接收队列中获取;步骤3.3:仿真节点无间隔的从接收队列中获取外部选票;步骤3.4:仿真节点获取所有网络连接的外部选票后,对外部选票进行统计;若仿真节点无法获取其他仿真节点的外部选票,则尝试与其他仿真节点重新建立网络连接,连接成功后再次进行发送和接收工作;步骤3.5:选取全局逻辑时钟值最大的选票,判断选取的选票数量是否大于或等于2;若选取的选票数量大于或等于2,则选择节点标识码最大的选票,丢弃其余选票;步骤3.6:变更本节点的内部选票为选取的外部选票,并将变更后的内部选票放入到发送队列中发往其他仿真节点;步骤3.7:仿真节点无间隔的从接收队列中获取第二轮外部选票;步骤3.8:仿真节点获取所有网络连接的外部选票后,对外部选票进行统计;步骤3.9:判断是否超过半数的仿真节点认可本节点的外部选票;若超过半数的仿真节点认可本节点的外部选票,则将该节点选取为主方时钟;否则返回步骤3.1继续选取。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GB2110633.1A GB2602855B (en) | 2020-05-08 | 2021-01-15 | Time consistency synchronization method for distributed simulation |
US17/444,901 US11831746B2 (en) | 2020-05-08 | 2021-08-11 | Time consistency synchronization method for distributed simulation |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010383486.7A CN111641470B (zh) | 2020-05-08 | 2020-05-08 | 一种分布式仿真的时间一致性同步方法 |
CN202010383486.7 | 2020-05-08 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/444,901 Continuation US11831746B2 (en) | 2020-05-08 | 2021-08-11 | Time consistency synchronization method for distributed simulation |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021223464A1 true WO2021223464A1 (zh) | 2021-11-11 |
Family
ID=72330858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/071974 WO2021223464A1 (zh) | 2020-05-08 | 2021-01-15 | 一种分布式仿真的时间一致性同步方法 |
Country Status (3)
Country | Link |
---|---|
US (1) | US11831746B2 (zh) |
CN (1) | CN111641470B (zh) |
WO (1) | WO2021223464A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115630937A (zh) * | 2022-12-21 | 2023-01-20 | 北京京东振世信息技术有限公司 | 物流网络仿真的时间同步方法、装置和存储介质 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111641470B (zh) * | 2020-05-08 | 2022-08-02 | 哈尔滨工程大学 | 一种分布式仿真的时间一致性同步方法 |
CN113821076B (zh) * | 2021-10-11 | 2023-10-27 | 上海航天计算机技术研究所 | 基于虚拟时钟的虚拟仿真***及同步方法 |
CN114020094A (zh) * | 2021-11-17 | 2022-02-08 | 湖南麒麟信安科技股份有限公司 | 一种服务器集群时间同步方法、装置及计算机设备 |
CN114924617B (zh) * | 2022-06-15 | 2024-04-26 | 深圳前海微众银行股份有限公司 | 一种去中心化***中的时钟同步方法及装置 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103716397A (zh) * | 2013-12-30 | 2014-04-09 | 中国电子科技集团公司第二十八研究所 | 一种面向服务仿真时钟推进方法 |
US20140214393A1 (en) * | 2013-01-31 | 2014-07-31 | Electronics And Telecommunications Research Institute | System and method for performing distributed simulation |
CN111641470A (zh) * | 2020-05-08 | 2020-09-08 | 哈尔滨工程大学 | 一种分布式仿真的时间一致性同步方法 |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU4799000A (en) * | 1999-04-14 | 2000-11-14 | Sapphire Communications, Inc. | Universal synchronous network system for internet processor and web operating environment |
US8909509B2 (en) * | 2010-10-01 | 2014-12-09 | Rockwell Automation Technologies, Inc. | Dynamically selecting master clock to manage non-linear simulation clocks |
CN103268251B (zh) * | 2013-05-02 | 2016-12-28 | 中国人民解放军国防科学技术大学 | 一种基于时戳截流的并行离散事件仿真时间同步方法 |
CN103647682B (zh) * | 2013-12-09 | 2016-08-10 | 北京航空航天大学 | 一种模拟交换式以太网时钟同步的仿真*** |
KR20160114459A (ko) * | 2015-03-24 | 2016-10-05 | 한국전자통신연구원 | 이종 미들웨어 연동을 위한 게이트웨이 장치 및 시각 동기화 방법 |
US9584302B2 (en) * | 2015-06-05 | 2017-02-28 | Analog Devices Global | Method and apparatus for synchronization of slave clock to master clock |
CN105262656A (zh) * | 2015-09-22 | 2016-01-20 | 南京航空航天大学 | 航空发动机分布式控制***时间触发通信总线的实现方法 |
CN106059701B (zh) * | 2016-08-17 | 2018-06-08 | 北京航空航天大学 | 一种通过捕获协议控制帧测试时间触发以太网的时钟同步修正值的装置 |
CN107070578B (zh) * | 2017-04-02 | 2018-08-03 | 北京航空航天大学 | 一种适用于多同步域时间触发以太网的主从时钟同步方法 |
DE102018127602A1 (de) * | 2018-11-06 | 2020-05-07 | Dspace Digital Signal Processing And Control Engineering Gmbh | Rechnernetz mit einem ersten und einem zweiten Synchronsignalgeber |
-
2020
- 2020-05-08 CN CN202010383486.7A patent/CN111641470B/zh active Active
-
2021
- 2021-01-15 WO PCT/CN2021/071974 patent/WO2021223464A1/zh active Application Filing
- 2021-08-11 US US17/444,901 patent/US11831746B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140214393A1 (en) * | 2013-01-31 | 2014-07-31 | Electronics And Telecommunications Research Institute | System and method for performing distributed simulation |
CN103716397A (zh) * | 2013-12-30 | 2014-04-09 | 中国电子科技集团公司第二十八研究所 | 一种面向服务仿真时钟推进方法 |
CN111641470A (zh) * | 2020-05-08 | 2020-09-08 | 哈尔滨工程大学 | 一种分布式仿真的时间一致性同步方法 |
Non-Patent Citations (2)
Title |
---|
LI, TING-TING ET AL.: "Research and Application of Time Management in Parallel and Distributed Real-time Simulations", JOURNAL OF SYSTEM SIMULATION, vol. 25, no. 8, 31 August 2013 (2013-08-31), pages 1783 - 1788, XP055864400 * |
PAN, YULIN ET AL.: ""Clock Synchronization in Distributed Real-Time Simulation System"", 2009 FIRST INTERNATIONAL WORKSHOP ON EDUCATION TECHNOLOGY AND COMPUTER SCIENCE, 31 December 2009 (2009-12-31), XP031458808 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115630937A (zh) * | 2022-12-21 | 2023-01-20 | 北京京东振世信息技术有限公司 | 物流网络仿真的时间同步方法、装置和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
US20210376994A1 (en) | 2021-12-02 |
CN111641470A (zh) | 2020-09-08 |
CN111641470B (zh) | 2022-08-02 |
US11831746B2 (en) | 2023-11-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021223464A1 (zh) | 一种分布式仿真的时间一致性同步方法 | |
Gupta et al. | Resilientdb: Global scale resilient blockchain fabric | |
Birman et al. | Bimodal multicast | |
Montresor et al. | Robust aggregation protocols for large-scale overlay networks | |
CN112118321B (zh) | 一种工业区块链的实用拜占庭容错共识机制优化*** | |
CN109309723A (zh) | 一种共识节点变更方法及其实现*** | |
CN111338773A (zh) | 一种分布式定时任务调度方法、调度***及服务器集群 | |
Lee et al. | Is blockchain suitable for data freshness? An age-of-information perspective | |
CN105281945A (zh) | 基于数据流的确定性网络完整性故障检测方法 | |
CN110855737B (zh) | 一种一致性级别可控的自适应数据同步方法和*** | |
CN106685676A (zh) | 一种节点切换方法及装置 | |
Kim et al. | Improved raft algorithm exploiting federated learning for private blockchain performance enhancement | |
GB2602855A (en) | Time consistency synchronization method for distributed simulation | |
Cason et al. | Gossip consensus | |
WO2022238345A1 (en) | Data synchronization in edge computing networks | |
Yingchareonthawornchai et al. | Analysis of bounds on hybrid vector clocks | |
Sidik et al. | PALE: Time bounded practical agile leader election | |
CN110166364B (zh) | 一种软件定义机会网络流表更新方法 | |
Gonçalves et al. | Sconekv: a scalable, strongly consistent key-value store | |
US11016807B2 (en) | Intermediary system for data streams | |
Lu et al. | A fault tolerant election-based deadlock detection algorithm in distributed systems | |
Nodine et al. | A perceptually-based algorithm provides effective visual feedback to radiologists searching for lung nodules | |
Sinha et al. | Challenged networks to challenged computing: an untapped potential for future space exploration | |
An et al. | Research on Byzantine Fault Tolerant algorithm based on Node Weights | |
Lee | Queueing analysis of global locking synchronization schemes for multicopy databases |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 202110633 Country of ref document: GB Kind code of ref document: A Free format text: PCT FILING DATE = 20210115 |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21800857 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21800857 Country of ref document: EP Kind code of ref document: A1 |