Time synchronization method and device of cloud native distributed simulation architecture, equipment and storage medium
By employing global, local, or general time synchronization strategies in a cloud-native distributed simulation architecture, and performing time synchronization based on the type and hierarchical relationship of virtualized devices, the problem of time synchronization error between multiple virtualized devices is solved, thereby improving simulation performance and system efficiency.
Patent Information
- Application Number
- CN202511766027.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-27
AI Technical Summary
In cloud-native distributed simulation architectures, significant time synchronization errors exist among multiple virtualized devices, leading to a decrease in simulation performance.
By receiving synchronization instructions generated by the time synchronization module, time synchronization is performed using global, local, or general time synchronization strategies based on the type and hierarchical relationship of the virtualization devices, and a time synchronization tree structure is constructed to achieve interoperability of hierarchical relationships between various virtualization devices.
It improves the time accuracy in the simulation architecture, reduces the probability of time synchronization failure caused by external clock failure, and improves the working efficiency of the simulation system.
Smart Images

Figure CN121585680A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing and distributed systems technology, and in particular to a time synchronization method, apparatus, device and storage medium for a cloud-native distributed simulation architecture. Background Technology
[0002] With the rapid development of information technology, cloud-native distributed simulation architecture has been increasingly widely used in fields such as complex system simulation, cloud computing and distributed systems, and intelligent manufacturing due to its advantages such as elastic scaling, resource efficiency and high agility. This cloud-native distributed simulation architecture deconstructs the traditional monolithic simulation system into a series of virtualized devices and can dynamically schedule multiple virtualized devices, thereby realizing the platformization and service-orientation of simulation capabilities.
[0003] However, due to the distributed nature of the underlying infrastructure and the uncertainty of network transmission, significant time synchronization errors exist among multiple virtualized devices, leading to a decline in the simulation performance of cloud-native distributed simulation architectures. Therefore, how to effectively improve the time synchronization accuracy among multiple virtualized devices has become a core problem that urgently needs to be solved. Summary of the Invention
[0004] Therefore, it is necessary to provide a time synchronization method, apparatus, device, and storage medium for a cloud-native distributed simulation architecture to address the aforementioned technical issues.
[0005] In a first aspect, this application provides a time synchronization method for a cloud-native distributed simulation architecture, applied to a target virtualized device among multiple virtualized devices in a cloud-native distributed simulation architecture, including:
[0006] Receive synchronization instructions sent by the time synchronization module in the cloud-native distributed simulation architecture; the synchronization instructions are generated by the time synchronization module based on the time synchronization tree structure corresponding to multiple virtualization devices;
[0007] If the synchronization command is the first-time synchronization command, then time synchronization is performed with other virtualization devices according to the global time synchronization strategy; the global time synchronization strategy is related to the type of the target virtualization device.
[0008] If the synchronization command is the second time synchronization command, then time synchronization is performed with other virtualization devices according to the local time synchronization strategy; the local time synchronization strategy is related to the type of the target virtualization device.
[0009] If the synchronization command is a third time synchronization command, then time synchronization is performed with other virtualization devices according to the general time synchronization strategy; the local time synchronization strategy is related to the type of the target virtualization device.
[0010] Secondly, this application provides a time synchronization method for a cloud-native distributed simulation architecture, applied to a target virtualization device among multiple virtualization devices in a cloud-native distributed simulation architecture, including:
[0011] Obtain the time synchronization network topology corresponding to multiple virtualization devices;
[0012] Determine global nodes, local nodes, and general nodes based on the time synchronization network topology;
[0013] A first synchronization instruction is sent to the virtualization device corresponding to the global node, a second synchronization instruction is sent to the virtualization device corresponding to the local node, and a third synchronization instruction is sent to the virtualization device corresponding to the general node. The first synchronization instruction is used to instruct the virtualization device corresponding to the global node to perform time synchronization according to the first time synchronization strategy; the second synchronization instruction is used to instruct the virtualization device corresponding to the local node to perform time synchronization according to the second time synchronization strategy; and the third synchronization instruction is used to instruct the virtualization device corresponding to the general node to perform time synchronization according to the third time synchronization strategy.
[0014] Thirdly, this application also provides a time synchronization device for a cloud-native distributed simulation architecture, comprising:
[0015] The receiving module is used to receive synchronization instructions sent by the time synchronization module in the cloud-native distributed simulation architecture; the synchronization instructions are generated by the time synchronization module according to the time synchronization tree structure corresponding to multiple virtualization devices.
[0016] The first synchronization module is used to synchronize time with other virtualization devices according to a global time synchronization strategy if the synchronization instruction is a first time synchronization instruction; the global time synchronization strategy is related to the type of the target virtualization device.
[0017] The second synchronization module is used to synchronize time with other virtualization devices according to a local time synchronization strategy if the synchronization instruction is a second time synchronization instruction; the local time synchronization strategy is related to the type of the target virtualization device.
[0018] The third synchronization module is used to synchronize time with other virtualization devices according to the general time synchronization strategy if the synchronization instruction is the third time synchronization instruction; the local time synchronization strategy is related to the type of the target virtualization device.
[0019] Fourthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect above.
[0020] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.
[0021] Sixthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect above.
[0022] The aforementioned time synchronization method, apparatus, device, and storage medium for cloud-native distributed simulation architecture receive synchronization instructions sent by the time synchronization module in the cloud-native distributed simulation architecture. These instructions are generated by the time synchronization module based on the time synchronization tree structure corresponding to multiple virtualization devices. If the synchronization instruction is a first time synchronization instruction, time synchronization is performed with other virtualization devices according to a global time synchronization strategy, which is related to the type of the target virtualization device. If the synchronization instruction is a second time synchronization instruction, time synchronization is performed with other virtualization devices according to a local time synchronization strategy, which is also related to the type of the target virtualization device. If the synchronization instruction is a third time synchronization instruction, time synchronization is performed with other virtualization devices according to a general time synchronization strategy, which is also related to the type of the target virtualization device. In this method, since the synchronization instructions are generated by the time synchronization module based on the time synchronization tree structure corresponding to multiple virtualization devices, and this tree structure reflects the hierarchical relationship between the multiple virtualization devices, the method achieves time information exchange between the hierarchical relationships of each virtualization device and other virtualization devices, thereby performing time synchronization operations and improving the accuracy of time in the simulation architecture. Furthermore, different synchronization commands can instruct virtualization devices to perform time synchronization operations using different time synchronization strategies, enabling each virtualization device to perform adaptive time synchronization and further improving the accuracy of time in the simulation architecture. Moreover, the above method allows virtualization devices to perform time synchronization operations based on their own clocks, eliminating the need for multiple virtualization devices to perform time synchronization operations based on an external clock from the scheduling center. This reduces the probability of time synchronization failure due to external clock malfunctions and improves the efficiency of the simulation system. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1This is an application environment diagram of a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0025] Figure 2 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0026] Figure 3 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0027] Figure 4 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0028] Figure 5 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0029] Figure 6 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0030] Figure 7 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0031] Figure 8 This is a time synchronization topology diagram of a cloud-native virtualization device cluster based on a multi-branch tree in one embodiment.
[0032] Figure 9 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0033] Figure 10 This is a time synchronization topology update diagram when a new virtualization device is added in one embodiment;
[0034] Figure 11 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0035] Figure 12 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0036] Figure 13 This is a time synchronization topology update diagram for a device failure and offline situation in one embodiment.
[0037] Figure 14 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0038] Figure 15 Here is a flowchart of a time synchronization advancement method in one embodiment;
[0039] Figure 16 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0040] Figure 17 This is a flowchart illustrating a time synchronization method for a cloud-native distributed simulation architecture in one embodiment.
[0041] Figure 18 This is a structural block diagram of a time synchronization device in a cloud-native distributed simulation architecture in one embodiment.
[0042] Figure 19 This is a structural block diagram of a time synchronization device in a cloud-native distributed simulation architecture, as shown in one embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0045] With the rapid development of information technology, cloud-native distributed simulation architecture has been increasingly widely used in fields such as complex system simulation, cloud computing and distributed systems, and intelligent manufacturing due to its advantages such as elastic scaling, resource efficiency and high agility. This cloud-native distributed simulation architecture deconstructs the traditional monolithic simulation system into a series of virtualized devices and can dynamically schedule multiple virtualized devices, thereby realizing the platformization and service-orientation of simulation capabilities.
[0046] However, due to the distributed nature of the underlying infrastructure and the uncertainty of network transmission, significant time synchronization errors exist among multiple virtualized devices, leading to a decline in the simulation performance of cloud-native distributed simulation architectures. Therefore, how to effectively improve the time synchronization accuracy among multiple virtualized devices has become a core problem that urgently needs to be solved.
[0047] The time synchronization method for cloud-native distributed simulation architecture provided in this application can be applied to, for example... Figure 1The computer device shown can be a terminal, and its internal structure diagram can be as follows: Figure 1 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, and input devices. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input devices are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a time synchronization method for a cloud-native distributed simulation architecture.
[0048] In one exemplary embodiment, a time synchronization method for a cloud-native distributed simulation architecture is provided, which is applied to... Figure 1 The target virtualized device in the cloud-native distributed simulation architecture of the computer device is used as an example for illustration. Figure 2 As shown, it includes:
[0049] S201: Receive the synchronization command sent by the time synchronization module in the cloud-native distributed simulation architecture. If the synchronization command is a first time synchronization command, proceed to step S202; if the synchronization command is a second time synchronization command, proceed to step S203; if the synchronization command is a third time synchronization command, proceed to step S204.
[0050] The synchronization instructions are generated by the time synchronization module based on the time synchronization tree structure corresponding to multiple virtualization devices. The synchronization instructions include a first time synchronization instruction, a second time synchronization instruction, and a third time synchronization instruction. The first time synchronization instruction indicates the use of a global time synchronization strategy; the second time synchronization instruction indicates the use of a local time synchronization strategy; and the third time synchronization instruction indicates the use of a general time synchronization strategy.
[0051] The cloud-native distributed simulation architecture can be integrated onto computer systems. It decomposes large simulation tasks and enables them to be completed collaboratively across multiple network-connected computers. The architecture contains multiple virtualized devices, each executing a specific simulation task. The target virtualized device can be any one of these multiple virtualized devices.
[0052] The time synchronization tree structure is used to represent the hierarchical relationship between multiple virtualization devices. The time synchronization tree structure includes multiple nodes, each node corresponds to a virtualization device, and these multiple nodes may include multiple parent nodes and multiple child nodes.
[0053] In this embodiment, the computer device can configure a time synchronization module within a cloud-native distributed simulation architecture. When a user executes a large-scale simulation task using this architecture, the computer device can activate the time synchronization module to synchronize the time between virtualized devices within the architecture, ensuring timing consistency. During this synchronization process, the time synchronization module first constructs a time synchronization tree structure based on relevant information about multiple virtualized devices, such as their number, performance, and type. This tree structure represents the hierarchical relationship between the virtualized devices. Then, a synchronization command is generated based on this tree structure, and the time synchronization module sends the command to the target virtualized device, enabling it to synchronize its time with other virtualized devices.
[0054] S202 synchronizes time with other virtualization devices according to the global time synchronization strategy.
[0055] The global time synchronization strategy is related to the type of the target virtualization device. Specifically, when the target virtualization device is a global virtualization device, the synchronization strategy is a global time synchronization strategy. The target virtualization device can be categorized as a global virtualization device, a local virtualization device, or a general virtualization device. The nodes in the time synchronization tree structure can be correspondingly categorized as global nodes, local nodes, and general nodes. These nodes have hierarchical relationships; for example, a global node can be the parent node of a local node, a local node can be the child node of a global node, a local node can be the parent node of a general node, and a general node can be the child node of a local node. The type of each virtualization device is related to the type of each node in the time synchronization tree structure; that is, global virtualization devices are associated with global nodes, local virtualization devices with local nodes, and general virtualization devices with general nodes.
[0056] In this embodiment, the time synchronization module can first divide the time domain of multiple virtualization devices, dividing the virtualization cluster composed of multiple virtualization devices into a global time domain, a local time domain, and a general time domain. The specific virtualization devices of the global nodes in the time synchronization tree structure correspond to the global time domain, the specific virtualization devices of the local nodes correspond to the local time domain, and the specific virtualization devices of the general nodes correspond to the general time domain. When the computer device controls the time synchronization module to issue a first time synchronization command to each virtualization device in the cloud-native distributed simulation architecture, the target virtualization device located at the global node receives the command and can initiate the time synchronization process according to a preset global synchronization strategy. The target virtualization device located at the global node, acting as the core scheduling unit, first collects and verifies the timestamp and status information of all virtualization devices corresponding to the local nodes. After verification, it pushes the global clock in the simulation architecture to be updated. After receiving the global command, the virtualization devices corresponding to each local node complete the time calibration of the virtualization devices corresponding to each general node based on the hierarchical relationship. Simultaneously, the virtualization devices corresponding to each general node also feed back their own timestamp and status information to the virtualization devices corresponding to the corresponding local nodes.
[0057] S203, if the synchronization instruction is the second time synchronization instruction, then time synchronization is performed with other virtualization devices according to the local time synchronization strategy.
[0058] The local time synchronization strategy is related to the type of the target virtualization device.
[0059] In this embodiment, when the computer device control time synchronization module sends a second time synchronization command to each virtualization device in the cloud-native distributed simulation architecture, the target virtualization device located at the local node receives the command and can initiate the time synchronization process according to a preset local synchronization strategy. The local synchronization strategy is directly related to the type of the target virtualization device. The target virtualization device located at the local node acts as the core scheduling unit, first collecting the timestamp information and status information of the virtualization devices corresponding to all general nodes, and verifying them. After verification, it pushes the local clock in the simulation architecture to be updated. After receiving the local command, the virtualization devices corresponding to each general node complete the time calibration of the virtualization devices corresponding to each general node based on the hierarchical communication relationship, and at the same time feed back their own timestamp information and status information to the virtualization devices corresponding to the corresponding local nodes.
[0060] S204, if the synchronization instruction is a third time synchronization instruction, then time synchronization is performed with other virtualization devices according to the general time synchronization strategy.
[0061] The local time synchronization strategy is related to the type of the target virtualization device.
[0062] In this embodiment, when the computer device control time synchronization module sends a third time synchronization command to each virtualization device in the cloud-native distributed simulation architecture, the target virtualization device located at a general node receives the command and can initiate a time synchronization process according to a preset general synchronization strategy. The general synchronization strategy is directly related to the type of the target virtualization device. The general synchronization strategy uses the virtualization device located at a local node as an intermediary to achieve time synchronization with other virtual devices through hierarchical communication relationships. When the target virtualization device located at a general node receives the command, it first reads its own internal clock to generate a timestamp, and then packages the timestamp, verification information, and status information together and sends them to the virtualization device located at the local node through hierarchical communication relationships. At the same time, it can also start an internal timer. If no acknowledgment message is received within a preset time threshold, a retransmission mechanism is triggered to ensure the reliability of command transmission.
[0063] In the time synchronization method for the cloud-native distributed simulation architecture described in the above embodiments, synchronization instructions are received from the time synchronization module in the cloud-native distributed simulation architecture. If the synchronization instruction is a first time synchronization instruction, time synchronization is performed with other virtualization devices according to a global time synchronization strategy; if the synchronization instruction is a second time synchronization instruction, time synchronization is performed with other virtualization devices according to a local time synchronization strategy; if the synchronization instruction is a third time synchronization instruction, the synchronization instructions are received from the time synchronization module according to the time synchronization tree structure corresponding to multiple virtualization devices. Since this time synchronization tree structure reflects the hierarchical relationship between multiple virtualization devices, the above method enables time information exchange between the hierarchical relationships of each virtualization device and other virtualization devices, thereby performing time synchronization operations and improving the accuracy of time in the simulation architecture. Furthermore, different synchronization instructions can instruct virtualization devices to perform time synchronization operations using different time synchronization strategies, allowing each virtualization device to perform adaptive time synchronization, further improving the accuracy of time in the simulation architecture. Moreover, the above method allows virtualization devices to perform time synchronization operations based on their own clocks, eliminating the need for multiple virtualization devices to perform time synchronization operations based on an external clock from the scheduling center. This reduces the probability of time synchronization failure due to external clock malfunctions and improves the efficiency of the simulation system.
[0064] In an exemplary embodiment, the "synchronizing time with other virtualization devices according to the global time synchronization policy" in S202 above, such as Figure 3 As shown, it includes:
[0065] S301 receives the first-time synchronization information and the first-node status information sent by the virtualization devices corresponding to each next-level local node.
[0066] The first time synchronization information includes the time synchronization information of the next-level local node and the time synchronization information of the next-level general node of the next-level local node; the first node status information includes the status information of the next-level local node and the status information of the next-level general node of the next-level local node.
[0067] In this embodiment, when the computer device control time synchronization module sends a second time synchronization command to each virtualization device in the cloud-native distributed simulation architecture, the target virtualization device located at the local node receives the command and collects the timestamp information (i.e., the first time synchronization information) and status information (i.e., the node status information) sent by the virtualization devices corresponding to each next-level local node. The timestamp information and status information include the timestamp set of all virtualization devices corresponding to all general nodes within each local node, status snapshots (such as simulation task progress, device operation status), simulation intermediate results, time deviation statistics (maximum value, minimum value, standard deviation) within the node, timestamps of the local node itself, status snapshots of the local node itself (such as simulation task progress, device operation status), simulation intermediate results, and time deviation statistics (maximum value, minimum value, standard deviation) within the node.
[0068] S302, summarizes and verifies the first time synchronization information and first node status information sent by the virtualization devices corresponding to all next-level local nodes, and generates a time synchronization confirmation message.
[0069] The first synchronization information includes the collection of timestamps of the virtualization devices corresponding to all general nodes within each local node and the timestamp of the local node itself; the first node status information includes the status information of the virtualization devices corresponding to all general nodes within each local node and the status information of the local node itself.
[0070] In this embodiment, when the target virtualization device located at the global node collects the timestamp and status information sent by the virtualization devices corresponding to each next-level local node, it summarizes and verifies the timestamp and status information. For timestamp verification, the timestamp information reported by each local node is compared with a globally preset time deviation. For example, the threshold is set to ±3 milliseconds; data exceeding this range is considered invalid, and a retransmission command can be sent to the corresponding local node using a dedicated data transmission channel. For status verification, the status information reported by each local node is compared with a globally preset parameter difference. For example, if the parameter difference exceeds a preset threshold of 3%, it is considered faulty data, and a retransmission command can be sent to the corresponding local node using a dedicated data transmission channel, requiring the local node to re-upload the status information. After summarizing and verifying the timestamp and status information, a time synchronization confirmation message can be generated. This message may include a global time base, a time advancement command, time deviation correction values for each local node, and a checksum.
[0071] S303 sends the time synchronization confirmation message to the virtualization device corresponding to each next-level local node.
[0072] In this embodiment of the application, when the target virtualization device located at the global node generates a time synchronization confirmation message, it is sent down level by level through the time synchronization tree structure: the virtualization device corresponding to the global node sends it down to the virtualization device corresponding to the local node, and the virtualization device corresponding to the local node sends it down to the virtualization device corresponding to the general node.
[0073] In an exemplary embodiment, the "synchronizing time with other virtualization devices according to the local time synchronization strategy" in S203 above, such as Figure 4 As shown, it includes:
[0074] S401 receives the second time synchronization information and the second node status information sent by the virtualization devices corresponding to each next-level general node.
[0075] The second time synchronization information includes the time synchronization information of the next-level general node; the first node status information includes the status information of the next-level general node.
[0076] In this embodiment of the application, when the computer device control time synchronization module sends a second time synchronization instruction to each virtualization device in the cloud-native distributed simulation architecture, the target virtualization device located at the local node receives the instruction. The target virtualization device located at the local node will act as the core scheduling unit to collect the timestamp information (i.e., the second time synchronization information) and status information (i.e., the two-node status information) sent by the virtualization devices corresponding to each next-level general node. The timestamp information and status information include the timestamp information, status snapshots (such as simulation task progress, device operation status), simulation intermediate results, and time deviation statistics (maximum value, minimum value, standard deviation) of the virtualization devices corresponding to all general nodes.
[0077] S402, obtain its own third time synchronization information and third node status information.
[0078] In this embodiment, the target virtualization device located at the local node collects the timestamp information and status information sent by the virtualization devices corresponding to each next-level general node, as well as its own timestamp information, the communication delay information of the next-level global node, its own simulation task status (such as status snapshots, simulation intermediate results, and time deviation statistics within the node), the amount of idle resources, and the management status of each corresponding next-level node.
[0079] S403 forwards the second time synchronization information, the third time synchronization information, the status information of each second node, and the status information of the third node to the virtualization device corresponding to the next higher-level global node.
[0080] In this embodiment, the target virtualization device located at the local node collects the timestamp information of the virtualization devices corresponding to each next-level general node, its own timestamp information, the simulation task status information of the virtualization devices corresponding to each next-level general node, and its own simulation task status information, and then packages them together and forwards them to the virtualization device corresponding to the next-level global node.
[0081] S404 receives a time synchronization confirmation message from the virtualization device corresponding to the previous global node, and performs time synchronization with other virtual devices based on the time synchronization confirmation message.
[0082] In this embodiment of the application, when the target virtualization device located at the local node forwards the packaged information to the virtualization device corresponding to the upper-level global node, it also receives the time synchronization confirmation message issued by the virtualization device corresponding to the upper-level node, verifies the integrity of the time synchronization confirmation message (such as by comparing the verification code), and parses the time synchronization confirmation message, including the global time base, time advancement instructions, time deviation correction values of each local node and the verification code, and corrects its own internal clock according to the time deviation correction value.
[0083] S405 sends the time synchronization confirmation message to the next level general node.
[0084] In this embodiment of the application, after receiving the time synchronization confirmation message sent by the virtualization device corresponding to the upper-level node, the target virtualization device located at the local node parses the message and then sends the time synchronization confirmation message to the next level general node. The virtualization device corresponding to the general node calibrates its own internal clock according to the time synchronization confirmation message.
[0085] In an exemplary embodiment, the phrase "synchronize time with other virtualization devices according to a general time synchronization strategy" in S204 above, such as... Figure 5 As shown, it includes:
[0086] S501, obtain its own fourth time synchronization information and fourth node status information.
[0087] In this embodiment of the application, when the computer device control time synchronization module sends a third time synchronization instruction to each virtualization device in the cloud-native distributed simulation architecture, the target virtualization device located at the general node receives the instruction and collects its own timestamp information (i.e., the fourth time synchronization information) and its own node status information (i.e., the fourth node status information), including the communication delay information of the upper-level local node, its own simulation task status (such as status snapshot, simulation intermediate results, and time deviation statistics within the node), and the amount of idle resources.
[0088] S502 forwards the fourth time synchronization information and the fourth node status information to the virtualization device corresponding to the previous level local node.
[0089] In this embodiment of the application, the target virtualization device located at a general node collects its own timestamp information (i.e., fourth time synchronization information) and its own node status information (i.e., fourth node status information), packages them together, and then forwards them to the virtualization device corresponding to the next higher-level local node.
[0090] S503 receives a time synchronization confirmation message from the virtualization device corresponding to the previous local node, and performs time synchronization with other virtual devices based on the time synchronization confirmation message.
[0091] In this embodiment of the application, when the target virtualization device located at the general node forwards the packaged information to the virtualization device corresponding to the upper-level local node, it also receives the time synchronization confirmation message sent by the virtualization device corresponding to the upper-level node, verifies the integrity of the time synchronization confirmation message (such as by comparing the verification code), and parses the time synchronization confirmation message, including the local time base, time advance instruction, time deviation correction value of the general node and the check code, and corrects its own internal clock according to the time deviation correction value.
[0092] Based on the time synchronization method for cloud-native distributed simulation architecture described in any of the foregoing embodiments, another time synchronization method for cloud-native distributed simulation architecture is also provided, such as... Figure 6 As shown, it includes:
[0093] S601, obtain the time synchronization network topology corresponding to multiple virtualization devices.
[0094] The structural configuration of the time synchronization network topology is consistent with the time synchronization tree structure described in any of the aforementioned embodiments.
[0095] In this embodiment of the application, when a user uses a cloud-native distributed simulation architecture to perform large-scale simulation tasks, the computer device will control the time synchronization module in the simulation architecture and build a corresponding time synchronization network topology based on multiple virtualization devices to achieve the purpose of time consistency in order to ensure the timing consistency between the virtualization devices in the simulation system.
[0096] S602 determines global nodes, local nodes, and general nodes based on the time synchronization network topology.
[0097] In this embodiment of the application, the computer device initially constructs a time synchronization network topology by determining the number of multiple virtualization devices, and initially determines global nodes, local nodes, and general nodes based on the time synchronization network topology. There is only one global node, and the local nodes and general nodes can be expanded to multiple nodes as needed.
[0098] S603, send a first synchronization command to the virtualization device corresponding to the global node, a second synchronization command to the virtualization device corresponding to the local node, and a third synchronization command to the virtualization device corresponding to the general node.
[0099] The first synchronization instruction is used to instruct the virtualization device corresponding to the global node to perform time synchronization according to the first time synchronization strategy; the second synchronization instruction is used to instruct the virtualization device corresponding to the local node to perform time synchronization according to the second time synchronization strategy; and the third synchronization instruction is used to instruct the virtualization device corresponding to the general node to perform time synchronization according to the third time synchronization strategy.
[0100] In this embodiment, after the computer device determines the global node, local node, and general node based on the synchronization network topology, during the simulation task, the time synchronization module sends a first synchronization command to the virtualization device corresponding to the global node. Upon receiving the command, the virtualization device corresponding to the global node performs time synchronization according to the first time synchronization strategy and feeds back the result to the time synchronization module. Next, the time synchronization module sends a second synchronization command to the virtualization device corresponding to the local node. Upon receiving the second synchronization command, the virtualization device corresponding to the local node performs time synchronization according to the second time synchronization strategy and feeds back the result to the time synchronization module. Then, the time synchronization module sends a third synchronization command to the virtualization device corresponding to the general node. Upon receiving the command, the virtualization device corresponding to the general node immediately performs time synchronization according to the third time synchronization strategy and feeds back the result to the time synchronization module. The methods involved in the first, second, and third time synchronization strategies are the same as those described above. Figures 2-5 The methods of the first, second, and third time synchronization strategies described in any implementation are basically the same. For details, please refer to the foregoing explanation, which will not be repeated here.
[0101] In an exemplary embodiment, the "determining global nodes, local nodes, and general nodes based on the time synchronization network topology" in S602 above, such as Figure 7 As shown, it includes:
[0102] S701 determines the number of nodes based on the number of multiple virtualization devices.
[0103] In this embodiment, the time synchronization module can determine the number of nodes in the time synchronization network topology based on the number of virtualized devices in the cloud-native distributed simulation system architecture. For example, if there are 13 virtualized devices in the simulation system architecture, then there are 13 nodes in the time synchronization network topology, including global nodes, local nodes, and general nodes.
[0104] S702, based on the performance indicators of each virtualization device, divides the nodes corresponding to each virtualization device and each virtualization device into time domains, and determines the type of the nodes corresponding to each virtualization device and the type of each virtualization device.
[0105] The types of virtualization devices include any one of the following: global virtualization devices, local virtualization devices, and general virtualization devices.
[0106] In this embodiment, before performing the simulation task, the time synchronization module first calculates the initial performance index of each virtualization device according to the performance weight calculation formula, as shown in equation (1).
[0107] (1);
[0108] in, This represents the number of idle CPU cores. This refers to the size of free memory. It refers to network bandwidth; It is a weighting factor for the number of idle CPU cores; It is a weighting factor for the size of free memory; It is the weighting coefficient of network bandwidth.
[0109] After determining the number of virtualized devices, the time synchronization module first determines the number of time domains to be divided based on the number of virtualized devices. For example, if there are 13 virtualized devices in the simulation system architecture, then the number of time domains is determined to be 13. Then, after obtaining the initial performance index of each virtualized device according to the relation (1), the time domain type is divided according to the nodes corresponding to each virtualized device and each virtualized device. The virtualization cluster composed of multiple virtualized devices is logically divided into different domains, which means that the time domain can be divided into global synchronization domain, local synchronization domain, and general synchronization domain. The nodes corresponding to the global synchronization domain are global nodes, the nodes corresponding to the local synchronization domain are local nodes, and the nodes corresponding to the general synchronization domain are general nodes. Accordingly, the virtualized devices corresponding to the global nodes are global virtualized devices; the virtualized devices corresponding to the local nodes are local virtualized devices; and the virtualized devices corresponding to the general nodes are general virtualized devices. Among them, the performance weight of the global nodes is the largest, the performance weight of the local nodes is the second largest, and the remaining nodes are general nodes.
[0110] S703 constructs a time synchronization network topology based on the number of nodes and the type of nodes corresponding to each virtualization device.
[0111] The time synchronization network topology consists of a global node, multiple local nodes, and multiple general nodes.
[0112] In this embodiment, after determining the number of nodes and the type of nodes corresponding to each virtualization device, the time synchronization module determines the hierarchical structure of the time synchronization network topology and the role of each virtualization device in the time synchronization domain. Furthermore, the communication links between global synchronization nodes, local synchronization nodes, and general synchronization nodes also constitute a multi-branch tree topology, i.e., the time synchronization network topology. Assuming the distributed simulation system consists of N virtualization devices, the number of time synchronization domains is K, and the number of local nodes is M, the minimum value of M in the K-layer M-branch tree time synchronization network topology can be calculated according to equation (2), as shown below:
[0113] (M takes a positive integer) (2);
[0114] For example, when the distributed simulation system consists of 13 virtualization devices and the number of time synchronization domains is 3 (including only global synchronization domain, local synchronization domain, and general synchronization domain), the minimum value of M calculated according to the relation tree (2) is 3. Then the time synchronization module obtains a 3-layer ternary tree time synchronization network topology, such as... Figure 8 As shown in the figure, GVD represents global virtualization device; LVD represents local virtualization device; and NVD represents general virtualization device.
[0115] In an exemplary embodiment, the "constructing a time synchronization network topology based on the number of nodes and the type of nodes corresponding to each virtualization device" in S703 above, such as Figure 9 As shown, it includes:
[0116] When S801 detects new or offline virtualization devices in the cloud-native distributed simulation architecture, it updates the time synchronization network topology based on the performance indicators of the new virtualization devices or the type of offline virtualization devices, thus obtaining a new time synchronization network topology.
[0117] In this embodiment, when the simulation system is executing a simulation task, if the time synchronization module detects a new virtualization device in the cloud-native distributed simulation architecture, it calculates the performance index of the new virtualization device according to the relation (1), and updates the time synchronization network topology based on the performance index of the new virtualization device to obtain a new time synchronization network topology, such as... Figure 10As shown in the diagram, GVD represents a global virtualization device; LVD represents a local virtualization device; NVD represents a general virtualization device; and NEW represents a newly added virtualization device. When the time synchronization module detects a virtualization device failure and offline in the cloud-native distributed simulation architecture, it reconstructs the time synchronization network topology according to the type of the offline virtualization device. This ensures that the time synchronization module can maintain high efficiency and time consistency among all virtualization devices in the cloud-native distributed simulation architecture even in complex simulation environments.
[0118] S802, obtain the new time synchronization network topology.
[0119] In this embodiment of the application, when there are newly added virtualized devices and virtualized devices that go offline due to failure in the cloud-native distributed simulation architecture, the time synchronization module automatically triggers the max heap algorithm based on performance weight (i.e., relation (1)) to re-update the time synchronization network topology to ensure the stability of the simulation system operation.
[0120] In an exemplary embodiment, the above-described S801, "when a new virtualization device is detected in the cloud-native distributed simulation architecture, the time synchronization network topology is updated according to the performance indicators of the new virtualization device to obtain a new time synchronization network topology," is as follows: Figure 11 As shown, it includes:
[0121] S901, when a new virtualization device is detected in the cloud-native distributed simulation architecture, determines the location information of the node corresponding to the new virtualization device based on the performance indicators of the new virtualization device and the performance indicators of general virtualization devices in the cloud-native distributed simulation architecture.
[0122] In this embodiment of the application, when the time synchronization module detects a new virtualization device in the cloud-native distributed simulation architecture, it calculates the performance index of the new virtualization device using the relation (1) based on parameters such as the number of idle CPU cores, the size of idle memory, the network bandwidth, and the identity of the virtualization device. Then, it compares the performance index of the new virtualization device with the performance index of a general virtualization device in the known cloud-native distributed simulation architecture to determine the location information of the node corresponding to the new virtualization device.
[0123] S902, based on the location information, adds the corresponding node of the newly added virtualized device to the time synchronization network topology to obtain a new time synchronization network topology.
[0124] In this embodiment, after determining the performance indicators of the newly added virtualized device according to the relation (1), the time synchronization module compares the performance indicators with those of general virtualized devices in a known cloud-native distributed simulation architecture to determine the location information of the corresponding node of the newly added virtualized device. Based on this location information, the corresponding node of the newly added virtualized device is added to the time synchronization network topology. Then, time synchronization roles are reassigned to the time synchronization network topology, and time synchronization is advanced according to the new time synchronization roles, thus synchronously updating the time synchronization network topology of the multi-virtualized device cluster.
[0125] In an exemplary embodiment, the phrase "when a virtualized device is detected to be offline in the cloud-native distributed simulation architecture, update the time synchronization network topology according to the type of the offline virtualized device" in S801 above is as follows: Figure 12 As shown, this includes: when a virtualization device is detected to be offline in the cloud-native distributed simulation architecture, if the offline virtualization device is a local virtualization device, the time synchronization network topology is updated according to the performance indicators corresponding to the general virtualization device; if the offline virtualization device is a global virtualization device, the time synchronization network topology is updated according to the performance indicators corresponding to multiple virtualization devices related to the global virtualization device.
[0126] In this embodiment, when the simulation system is executing a simulation task, if the time synchronization module detects that a virtualization device has gone offline due to a fault in the cloud-native distributed simulation architecture, and if the offline device is a local virtualization device, then the offline local virtualization device is deleted, and the general virtualization device is scheduled to the corresponding local time synchronization domain according to the performance index of the general virtualization device. Then, the time synchronization network topology is updated again based on the performance weight max-heap algorithm (i.e., relation (1)). Figure 13 As shown, the general virtualization device with the highest performance index among multiple general virtualization devices is selected as the new local virtualization device. In the figure, GVD represents the global virtualization device; LVD represents the local virtualization device; and NVD represents the general virtualization device. If the global virtualization device is taken offline, the offline global virtualization device node is deleted, and the time synchronization network topology of the multiple virtualization devices is readjusted according to the performance index of the multiple virtualization devices related to the global virtualization device.
[0127] In an exemplary embodiment, the "updating the time synchronization network topology based on the performance metrics corresponding to multiple virtualization devices associated with the global virtualization device" in S801 above, such as... Figure 14 As shown, it includes:
[0128] S1001, Based on the performance indicators of multiple local virtualization devices related to the global virtualization device, select the target local virtualization device from multiple local virtualization devices.
[0129] In this embodiment of the application, after deleting the offline global virtualization device node, the time synchronization module calculates the performance index of multiple local virtualization devices related to the offline global virtualization device according to the relation (1), and selects the local virtualization device with the largest performance index from the multiple local virtualization devices as the target local virtualization device.
[0130] S1002, the target local virtualization device is used as the new global virtualization device, and the corresponding node of the new global virtualization device in the time synchronization network topology is updated.
[0131] In this embodiment, after the time synchronization module determines the target local virtualization device using relation (1), it uses the target local virtualization device as the new global virtualization device and synchronously updates the corresponding node of the new global virtualization device in the time synchronization network topology to obtain the new time synchronization network topology.
[0132] S1003, the general virtualization devices related to the target local virtualization device are taken as new local virtualization devices, and the corresponding nodes of the new local virtualization devices in the time synchronization network topology are updated.
[0133] In this embodiment of the application, after the time synchronization module schedules the target local virtualization device as a new local virtualization device, a vacancy appears in the local time synchronization domain where the target local virtualization device was originally located. The performance index of the general virtualization device related to the target local virtualization device is calculated using the relation (1). Based on the calculation result, the general virtualization device used to replace the target local virtualization device is determined, and the corresponding node of the new local virtualization device in the time synchronization network topology is updated synchronously.
[0134] In summary, based on all the above embodiments, a time synchronization advancement method is also provided, the flowchart of which is shown below. Figure 15 As shown (the containers in the diagram represent virtualization devices): When the simulation task begins, the time synchronization module sends confirmation messages to the general synchronization virtualization device, the local synchronization virtualization device, and the global synchronization virtualization device.
[0135] For a general synchronous virtualization device, after receiving an acknowledgment message, it begins to execute the simulation calculation task and determines whether a preset time slice has elapsed. If so, it confirms whether the general synchronous virtualization device has received an acknowledgment. If the preset time slice has not elapsed, it returns to the previous step. If the general synchronous virtualization device has received an acknowledgment, it proceeds to the next step, where each general synchronous virtualization device sends a timestamp and status information to the local synchronous virtualization device. If the general synchronous virtualization device has not received an acknowledgment, it stores the timestamp and status information of the preset time slice in the time synchronization status table.
[0136] For a local synchronous virtualization device, after receiving an acknowledgment message, the local synchronous virtualization device begins to execute the simulation calculation task and determines whether it has received timestamps and status information from all general synchronous virtualization devices. If it has received timestamps and status information from all general synchronous virtualization devices, it confirms whether the local synchronous virtualization device has received acknowledgment. If it has not received timestamps and status information from all general synchronous virtualization devices, it returns to the previous step. After confirming that the local synchronous virtualization device has received acknowledgment, it proceeds to the next step, where each local synchronous virtualization device sends timestamps and status information to the global synchronous virtualization device. If the local synchronous virtualization device has not received acknowledgment, it stores the timestamps and status information in the time synchronization status table.
[0137] For a globally synchronized virtualization device, upon receiving an acknowledgment message, it begins executing the simulation calculation task and determines whether it has received timestamps and status information from all local synchronized virtualization devices. If it has received timestamps and status information from all local synchronized virtualization devices, it advances the global clock. If it has not received timestamps and status information from all local synchronized virtualization devices, it returns to the previous step. After advancing the global clock, it determines whether the global clock equals the simulation end time. If so, it ends the simulation task. If not, the globally synchronized virtualization device sends an acknowledgment message to the local synchronized virtualization devices, and the local synchronized virtualization devices, upon receiving the acknowledgment message, send an acknowledgment message to the general synchronized virtualization devices.
[0138] In summary, based on all the above embodiments, a time synchronization method for a cloud-native distributed simulation architecture is also provided, such as... Figure 16 As shown, the method includes:
[0139] S1101 receives synchronization commands sent by the time synchronization module in the cloud-native distributed simulation architecture;
[0140] S1102, if the synchronization instruction is the first time synchronization instruction, execute S1103-S1105; if the synchronization instruction is the second time synchronization instruction, execute S1106-S1110; if the synchronization instruction is the third time synchronization instruction, execute S1111-S1113.
[0141] S1103, Receive the first-time synchronization information and first-node status information sent by the virtualization devices corresponding to each next-level local node;
[0142] S1104, summarize and verify the first time synchronization information and first node status information sent by the virtualization devices corresponding to all the next-level local nodes, and generate a time synchronization confirmation message;
[0143] S1105, sends the time synchronization confirmation message to the virtualization device corresponding to each next-level local node;
[0144] S1106, Receive the second time synchronization information and the second node status information sent by the virtualization device corresponding to each next-level general node;
[0145] S1107, obtain its own third time synchronization information and third node status information;
[0146] S1108, each second time synchronization information, third time synchronization information, each second node status information and third node status information are forwarded to the virtualization device corresponding to the upper-level global node;
[0147] S1109, Receive the time synchronization confirmation message sent by the virtualization device corresponding to the previous global node, and synchronize the time with other virtual devices according to the time synchronization confirmation message;
[0148] S1110, send the time synchronization confirmation message to the next level general node;
[0149] S1111, obtain its own fourth time synchronization information and fourth node status information;
[0150] S1112, forward the fourth time synchronization information and the fourth node status information to the virtualization device corresponding to the previous local node;
[0151] S1113 Receives a time synchronization confirmation message from the virtualization device corresponding to the previous local node, and performs time synchronization with other virtual devices based on the time synchronization confirmation message.
[0152] The methods described in each of the above steps have been described in the foregoing embodiments. For details, please refer to the foregoing descriptions. They will not be repeated here.
[0153] In summary, based on all the above embodiments, a time synchronization method for a cloud-native distributed simulation architecture is also provided, such as... Figure 17 As shown, the method includes:
[0154] S1201, Obtain the time synchronization network topology corresponding to multiple virtualization devices;
[0155] S1202, determine the number of nodes based on the number of multiple virtualization devices;
[0156] S1203, Based on the performance indicators of each virtualization device, divide the nodes corresponding to each virtualization device and each virtualization device into time domains to determine the type of the nodes corresponding to each virtualization device and the type of each virtualization device;
[0157] S1204. Based on the number of nodes and the type of nodes corresponding to each virtualization device, a time synchronization network topology is constructed.
[0158] S1205, send a first synchronization instruction to the virtualization device corresponding to the global node, send a second synchronization instruction to the virtualization device corresponding to the local node, and send a third synchronization instruction to the virtualization device corresponding to the general node.
[0159] S1206: When a new virtualization device is detected in the cloud-native distributed simulation architecture, execute S1207-S1208; when a virtualization device is detected to be offline in the cloud-native distributed simulation architecture, execute S1209-S1212.
[0160] S1207 When a new virtualization device is detected in the cloud-native distributed simulation architecture, the location information of the node corresponding to the new virtualization device is determined based on the performance indicators of the new virtualization device and the performance indicators of general virtualization devices in the cloud-native distributed simulation architecture.
[0161] S1208, Based on the location information, add the corresponding node of the newly added virtualized device to the time synchronization network topology to obtain a new time synchronization network topology;
[0162] S1209: When a virtualization device is detected to be offline in the cloud-native distributed simulation architecture, if the offline virtualization device is a local virtualization device, the time synchronization network topology is updated according to the performance indicators corresponding to the general virtualization device; if the offline virtualization device is a global virtualization device, the time synchronization network topology is updated according to the performance indicators corresponding to the multiple virtualization devices related to the global virtualization device.
[0163] S1210, Based on the performance indicators of multiple local virtualization devices related to the global virtualization device, select the target local virtualization device from multiple local virtualization devices;
[0164] S1211, the target local virtualization device is used as the new global virtualization device, and the corresponding node of the new global virtualization device in the time synchronization network topology is updated;
[0165] S1212, the general virtualization device related to the target local virtualization device is taken as the new local virtualization device, and the corresponding node of the new local virtualization device in the time synchronization network topology is updated.
[0166] The methods described in each of the above steps have been described in the foregoing embodiments. For details, please refer to the foregoing descriptions. They will not be repeated here.
[0167] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0168] Based on the same inventive concept, embodiments of this application also provide two time synchronization devices for implementing the time synchronization method of the cloud-native distributed simulation architecture described above. The solution provided by these devices is similar to the implementation schemes described in the above methods. Therefore, the specific limitations of one or more time synchronization device embodiments for cloud-native distributed simulation architectures provided below can be found in the limitations of the time synchronization method for cloud-native distributed simulation architectures described above, and will not be repeated here.
[0169] In one exemplary embodiment, such as Figure 18 As shown, a time synchronization device for a cloud-native distributed simulation architecture is provided, comprising: a receiving module 11, a first synchronization module 12, a second synchronization module 13, and a third synchronization module 14, wherein:
[0170] Receiver module 11 is used to receive synchronization instructions sent by the time synchronization module in the cloud-native distributed simulation architecture; the synchronization instructions are generated by the time synchronization module according to the time synchronization tree structure corresponding to multiple virtualization devices.
[0171] The first synchronization module 12 is used to synchronize time with other virtualization devices according to a global time synchronization strategy if the synchronization instruction is a first time synchronization instruction; the global time synchronization strategy is related to the type of the target virtualization device.
[0172] The second synchronization module 13 is used to perform time synchronization with other virtualization devices according to a local time synchronization strategy if the synchronization instruction is a second time synchronization instruction; the local time synchronization strategy is related to the type of the target virtualization device.
[0173] The third synchronization module 14 is used to perform time synchronization with other virtualization devices according to the general time synchronization strategy if the synchronization instruction is the third time synchronization instruction; the local time synchronization strategy is related to the type of the target virtualization device.
[0174] In one exemplary embodiment, such as Figure 19 As shown, a time synchronization device for a cloud-native distributed simulation architecture is also provided, comprising: a structure module 21, a node module 22, and a sending module 23, wherein:
[0175] Structure module 21 is used to obtain the time synchronization network topology corresponding to multiple virtualization devices;
[0176] Node module 22 is used to determine global nodes, local nodes, and general nodes based on the time synchronization network topology;
[0177] The sending module 23 is used to send a first synchronization instruction to the virtualization device corresponding to the global node, a second synchronization instruction to the virtualization device corresponding to the local node, and a third synchronization instruction to the virtualization device corresponding to the general node.
[0178] The modules in the time synchronization device of the aforementioned cloud-native distributed simulation architecture can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0179] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the time synchronization method of the cloud-native distributed simulation architecture described in any of the above embodiments.
[0180] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the time synchronization method for the cloud-native distributed simulation architecture described in any of the above embodiments.
[0181] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the time synchronization method for the cloud-native distributed simulation architecture described in any of the above embodiments.
[0182] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0183] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0184] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A time synchronization method for a cloud-native distributed simulation architecture, characterized in that, The method, applied to a target virtualized device among multiple virtualized devices in the cloud-native distributed simulation architecture, includes: Receive synchronization instructions sent by the time synchronization module in the cloud-native distributed simulation architecture; the synchronization instructions are generated by the time synchronization module according to the time synchronization tree structure corresponding to the multiple virtualization devices; If the synchronization instruction is a first time synchronization instruction, then time synchronization is performed with other virtualization devices according to a global time synchronization strategy; the global time synchronization strategy is related to the type of the target virtualization device. If the synchronization instruction is a second time synchronization instruction, then time synchronization is performed with other virtualization devices according to a local time synchronization strategy; the local time synchronization strategy is related to the type of the target virtualization device. If the synchronization instruction is a third time synchronization instruction, then time synchronization is performed with other virtualization devices according to a general time synchronization strategy; the local time synchronization strategy is related to the type of the target virtualization device.
2. The method according to claim 1, characterized in that, The step of synchronizing time with other virtualization devices according to a global time synchronization strategy includes: Receive first time synchronization information and first node status information sent by the virtualization device corresponding to each next-level local node; the first time synchronization information includes the time synchronization information of the next-level local node and the time synchronization information of the next-level general node of the next-level local node; the first node status information includes the status information of the next-level local node and the status information of the next-level general node of the next-level local node. The first-time synchronization information and first-node status information sent by the virtualization devices corresponding to all the next-level local nodes are summarized and verified to generate a time synchronization confirmation message. The time synchronization confirmation message is sent to the virtualization device corresponding to each of the next-level local nodes.
3. The method according to claim 1, characterized in that, The step of synchronizing time with other virtualization devices according to a local time synchronization strategy includes: The system receives second time synchronization information and second node status information sent by the virtualization devices corresponding to each next-level general node; the second time synchronization information includes the time synchronization information of the next-level general node; the first node status information includes the status information of the next-level general node. Obtain its own third-party time synchronization information and third-party node status information; The second time synchronization information, the third time synchronization information, the status information of each second node, and the status information of the third node are forwarded to the virtualization device corresponding to the next higher level global node. Receive the time synchronization confirmation message sent by the virtualization device corresponding to the previous global node, and synchronize the time with other virtual devices according to the time synchronization confirmation message; The time synchronization confirmation message is sent to the next level general node.
4. The method according to claim 1, characterized in that, The step of synchronizing time with other virtualization devices according to a general time synchronization strategy includes: Obtain its own fourth time synchronization information and fourth node status information; The fourth time synchronization information and the fourth node status information are forwarded to the virtualization device corresponding to the previous local node. Receive the time synchronization confirmation message sent by the virtualization device corresponding to the previous local node, and synchronize the time with other virtual devices according to the time synchronization confirmation message.
5. A time synchronization method for a cloud-native distributed simulation architecture, characterized in that, A time synchronization module applied in the cloud-native distributed simulation architecture, which includes multiple virtualization devices, the method includes: Obtain the time synchronization network topology corresponding to the multiple virtualization devices; Based on the time synchronization network topology, global nodes, local nodes, and general nodes are determined; A first synchronization instruction is sent to the virtualization device corresponding to the global node, a second synchronization instruction is sent to the virtualization device corresponding to the local node, and a third synchronization instruction is sent to the virtualization device corresponding to the general node; the first synchronization instruction is used to instruct the virtualization device corresponding to the global node to perform time synchronization according to a first time synchronization strategy; the second synchronization instruction is used to instruct the virtualization device corresponding to the local node to perform time synchronization according to a second time synchronization strategy; and the third synchronization instruction is used to instruct the virtualization device corresponding to the general node to perform time synchronization according to a third time synchronization strategy.
6. The method according to claim 5, characterized in that, The method further includes: The number of nodes is determined based on the number of the plurality of virtualization devices; Based on the performance indicators of each virtualization device, the nodes corresponding to each virtualization device and each virtualization device are divided into time domains to determine the type of the nodes corresponding to each virtualization device and the type of each virtualization device; the type of virtualization device includes any one of global virtualization device, local virtualization device, and general virtualization device; The time synchronization network topology is constructed based on the number of nodes and the type of nodes corresponding to each virtualization device; the time synchronization network topology consists of a global node, multiple local nodes and multiple general nodes.
7. The method according to claim 6, characterized in that, The method further includes: When a new or offline virtualization device is detected in the cloud-native distributed simulation architecture, the time synchronization network topology is updated according to the performance indicators corresponding to the new virtualization device or the type of the offline virtualization device to obtain a new time synchronization network topology. The step of obtaining the time synchronization tree structure corresponding to the plurality of virtualization devices includes: Obtain the new time synchronization network topology.
8. The method according to claim 7, characterized in that, When a new virtualization device is detected in the cloud-native distributed simulation architecture, the time synchronization network topology is updated based on the performance metrics of the new virtualization device to obtain a new time synchronization network topology, including: When a new virtualization device is detected in the cloud-native distributed simulation architecture, the location information of the node corresponding to the new virtualization device is determined based on the performance indicators of the new virtualization device and the performance indicators of general virtualization devices in the cloud-native distributed simulation architecture. Based on the location information, the corresponding node of the newly added virtualized device is added to the time synchronization network topology to obtain a new time synchronization network topology.
9. The method according to claim 7, characterized in that, When a virtualization device is detected to be offline in the cloud-native distributed simulation architecture, the time synchronization network topology is updated according to the type of the offline virtualization device, including: When a virtualization device is detected to be offline in the cloud-native distributed simulation architecture, if the offline virtualization device is a local virtualization device, the time synchronization network topology is updated according to the performance indicators corresponding to the general virtualization device; if the offline virtualization device is a global virtualization device, the time synchronization network topology is updated according to the performance indicators corresponding to multiple virtualization devices related to the global virtualization device.
10. The method according to claim 9, characterized in that, The step of updating the time synchronization network topology based on the performance metrics corresponding to multiple virtualization devices associated with the global virtualization device includes: Based on the performance metrics of multiple local virtualization devices associated with the global virtualization device, a target local virtualization device is selected from the multiple local virtualization devices; The target local virtualization device is used as a new global virtualization device, and the corresponding node of the new global virtualization device in the time synchronization network topology is updated. The general virtualization devices associated with the target local virtualization device are used as new local virtualization devices, and the corresponding nodes of the new local virtualization devices in the time synchronization network topology are updated.
11. A time synchronization device for a cloud-native distributed simulation architecture, characterized in that, The device includes: The receiving module is used to receive synchronization instructions sent by the time synchronization module in the cloud-native distributed simulation architecture; the synchronization instructions are generated by the time synchronization module according to the time synchronization tree structure corresponding to the multiple virtualization devices. The first synchronization module is configured to synchronize time with other virtualization devices according to a global time synchronization strategy if the synchronization instruction is a first time synchronization instruction; the global time synchronization strategy is related to the type of the target virtualization device. The second synchronization module is used to perform time synchronization with other virtualization devices according to a local time synchronization strategy if the synchronization instruction is a second time synchronization instruction; the local time synchronization strategy is related to the type of the target virtualization device. The third synchronization module is used to synchronize time with other virtualization devices according to a general time synchronization strategy if the synchronization instruction is a third time synchronization instruction; the local time synchronization strategy is related to the type of the target virtualization device.
12. A time synchronization device for a cloud-native distributed simulation architecture, characterized in that, The device includes: The acquisition module is used to acquire the time synchronization tree structure corresponding to the multiple virtualization devices; The determination module is used to determine global nodes, local nodes, and general nodes based on the time synchronization network topology. The sending module is configured to send a first synchronization instruction to the virtualization device corresponding to the global node, a second synchronization instruction to the virtualization device corresponding to the local node, and a third synchronization instruction to the virtualization device corresponding to the general node; the first synchronization instruction is configured to instruct the virtualization device corresponding to the global node to perform time synchronization according to a first time synchronization strategy; the second synchronization instruction is configured to instruct the virtualization device corresponding to the local node to perform time synchronization according to a second time synchronization strategy; and the third synchronization instruction is configured to instruct the virtualization device corresponding to the general node to perform time synchronization according to a third time synchronization strategy.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.