Asynchronous parallel simulation method, device and equipment based on time series association clustering
By constructing a timing dependency graph and a group dependency graph in complex system simulation, and using the density peak method to dynamically cluster the simulation body, the problem of low parallelism in synchronous parallel simulation is solved, asynchronous parallel scheduling is realized, and the simulation operation efficiency is improved.
Patent Information
- Application Number
- CN202510111283.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-23
AI Technical Summary
In complex system simulation, the interaction relationship between entities changes dynamically. The existing synchronous parallel simulation mechanism requires frequent global synchronization, resulting in low parallelism and affecting operational efficiency.
The asynchronous parallel simulation method based on timing correlation clustering is adopted, and the timing dependency graph and grouping dependency graph are constructed, and the density peak method is used to dynamically cluster the simulation body to reduce global synchronization and improve parallelism.
By reducing global synchronization overhead, improving simulation operation efficiency, maximizing system parallelism, and achieving asynchronous parallel scheduling.
Smart Images

Figure CN119538617B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of simulation technology, and in particular to an asynchronous parallel simulation method, device and equipment based on time series association clustering. Background Art
[0002] In the simulation of complex systems, the interaction between entities changes dynamically, and static associations cannot be built in advance. Therefore, a synchronous parallel simulation mechanism that does not rely on connections is generally used to control the operation of simulation entities. Synchronous parallel simulation has a global clock and a global simulation step, and all computing nodes or processors must synchronize their states at the end of each simulation time step. All nodes must complete all calculations of the current step before entering the next simulation time step. The order of event processing in synchronous simulation is determined because all nodes synchronize their events and states at the same simulation time point. However, limited by the minimum look-ahead value, the mechanism needs to perform global synchronization frequently, resulting in low parallelism, which seriously affects the operating efficiency. The synchronous parallel simulation mechanism is difficult to fully explore the parallelism of the system.
[0003] Asynchronous parallel simulation allows computing nodes to advance their time independently without synchronizing their states with other nodes at the end of each time step. In asynchronous simulation, each node can have its own clock and event processing order, and they do not need to wait for other nodes to complete the calculation before entering the next simulation time step. Asynchronous simulation can reduce waiting time and improve simulation efficiency, but requires more complex logic to handle event consistency and causality between different nodes. By constructing a topic space in advance, entities subscribe to data under certain topic spaces and add topic space identifiers to the published data, and then cooperate with interest matching algorithms, data filtering can be achieved, and a simulation entity interaction network can be constructed. Therefore, how to explore temporal dependencies in dynamic interaction scenarios to schedule asynchronous parallel solution of models is a key scientific issue. Summary of the invention
[0004] Based on this, it is necessary to provide an asynchronous parallel simulation method, device and equipment based on timing association clustering to address the above technical problems.
[0005] An asynchronous parallel simulation method based on time series correlation clustering, the method comprising:
[0006] The simulation platform maps the interest expressions published and subscribed by the simulation entities to the topic space of the corresponding topics, performs interest matching in the topic space, and obtains simulation entity pairs with message interaction relationships;
[0007] A timing dependency graph is constructed according to the message interaction relationship between the simulation entity pairs in each topic space; the nodes of the timing dependency graph include the simulation entities, the edges include the message interaction relationship between the simulation entities, and the weight of the edge is the minimum forward-looking value of the corresponding simulation entity pair under all topics;
[0008] The nodes of the timing dependency graph are dynamically clustered using the density peak method, multiple groups are constructed according to the clustering results, the simulation entities in each group are merged into a group node, and a group dependency graph is constructed according to the group nodes and the dependencies between the group nodes; the weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between the groups;
[0009] The safety time bound of the current group is obtained according to the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, a directed acyclic graph is constructed according to the safety time bound of each group, and asynchronous parallel scheduling is performed according to the directed acyclic graph.
[0010] An asynchronous parallel simulation device based on time series association clustering, the device comprising:
[0011] An interest matching module is used to map the interest expressions published and subscribed by the simulation entity to the subject space of the corresponding subject through the simulation platform, perform interest matching in the subject space, and obtain simulation entity pairs with message interaction relations;
[0012] A timing dependency extraction module is used to construct a timing dependency graph according to the message interaction relationship between the simulation entity pairs in each topic space; the nodes of the timing dependency graph include the simulation entities, the edges include the message interaction relationship between the simulation entities, and the weight of the edge is the minimum forward-looking value of the corresponding simulation entity pair under all topics;
[0013] A dynamic clustering module is used to dynamically cluster the nodes of the timing dependency graph using a density peak method, construct multiple groups according to the clustering results, merge the simulation entities in each group into a group node, and construct a group dependency graph according to the group nodes and the dependencies between the group nodes; the weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between the groups;
[0014] The asynchronous scheduling module is used to obtain the safety time boundary of the current group according to the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, construct a directed acyclic graph according to the safety time boundary of each group, and perform asynchronous parallel scheduling according to the directed acyclic graph.
[0015] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0016] The simulation platform maps the interest expressions published and subscribed by the simulation entities to the topic space of the corresponding topics, performs interest matching in the topic space, and obtains simulation entity pairs with message interaction relationships;
[0017] A timing dependency graph is constructed according to the message interaction relationship between the simulation entity pairs in each topic space; the nodes of the timing dependency graph include the simulation entities, the edges include the message interaction relationship between the simulation entities, and the weight of the edge is the minimum forward-looking value of the corresponding simulation entity pair under all topics;
[0018] The nodes of the timing dependency graph are dynamically clustered using the density peak method, multiple groups are constructed according to the clustering results, the simulation entities in each group are merged into a group node, and a group dependency graph is constructed according to the group nodes and the dependencies between the group nodes; the weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between the groups;
[0019] The safety time bound of the current group is obtained according to the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, a directed acyclic graph is constructed according to the safety time bound of each group, and asynchronous parallel scheduling is performed according to the directed acyclic graph.
[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0021] The simulation platform maps the interest expressions published and subscribed by the simulation entities to the topic space of the corresponding topics, performs interest matching in the topic space, and obtains simulation entity pairs with message interaction relationships;
[0022] A timing dependency graph is constructed according to the message interaction relationship between the simulation entity pairs in each topic space; the nodes of the timing dependency graph include the simulation entities, the edges include the message interaction relationship between the simulation entities, and the weight of the edge is the minimum forward-looking value of the corresponding simulation entity pair under all topics;
[0023] The nodes of the timing dependency graph are dynamically clustered using the density peak method, multiple groups are constructed according to the clustering results, the simulation entities in each group are merged into a group node, and a group dependency graph is constructed according to the group nodes and the dependencies between the group nodes; the weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between the groups;
[0024] The safety time bound of the current group is obtained according to the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, a directed acyclic graph is constructed according to the safety time bound of each group, and asynchronous parallel scheduling is performed according to the directed acyclic graph.
[0025] The above-mentioned asynchronous parallel simulation method, device and equipment based on time-related clustering constructs a time-dependent graph through the entity interaction relationship of each subject space, can extract the time-dependent relationship from the dynamic information interaction, divide the simulation entities into several groups based on the density peak clustering method, weaken the global dependency between entities into the local dependency between groups, and use the independence between groups to improve the parallelism, and then infer the call order that can maximize the system parallelism according to the impact range of the time-dependent, drive the asynchronous parallel solution of the model, and asynchronously schedule each group to advance independently, thereby avoiding the global synchronization overhead and improving the parallel simulation performance. The embodiment of the present invention can improve the simulation operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a flow chart of an asynchronous parallel simulation method based on time series association clustering in one embodiment;
[0027] Figure 2 A schematic diagram of a flow chart of asynchronous parallel simulation in a specific embodiment;
[0028] Figure 3 A structural block diagram of an asynchronous parallel simulation device based on time series association clustering in one embodiment;
[0029] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] In one embodiment, Figure 1 As shown, an asynchronous parallel simulation method based on time series association clustering is provided, comprising the following steps:
[0032] Step 102, mapping the interest expressions published and subscribed by the simulation entities to the subject space of the corresponding subject through the simulation platform, performing interest matching in the subject space, and obtaining simulation entity pairs with message interaction relationships.
[0033] Chinese patent CN116401898A records a simulation application combination system based on publish-subscribe. In a specific embodiment, the present invention uses the simulation application combination system for simulation. By constructing a subject space in advance, entities subscribe to data under certain subject spaces and add subject space identifiers to the published data, and then cooperate with an interest matching algorithm, it can not only achieve data filtering, but also build a simulation entity interaction relationship network.
[0034] Step 104: construct a timing dependency graph according to the message interaction relationship between the simulation entity pairs in each topic space.
[0035] The nodes of the timing dependency graph include simulation entities, and the edges include message interaction relationships between simulation entities. The weight of the edge is the minimum look-ahead value of the corresponding simulation entity under all topics. The look-ahead value indicates the minimum delay that the simulation entity is expected to affect other entities through the topic message. For example, in a satellite communication simulation system, it takes at least 2 seconds for the satellite signal to propagate to the ground station. Then the ground station can continue to operate based on the existing data within these 2 seconds without recalculating the impact of the satellite on it. It is not until 2 seconds later that the impact of new state changes on the receiving station is considered.
[0036] Interest matching will generate different message interaction graphs for different topics, which are recorded as , , …, ,in . Assume that the look-ahead value for each topic is , then the edge weights of the message interaction graphs of the same topic are the same. The look-ahead value and the connection relationship together construct the temporal dependency.
[0037] All message interaction diagrams need to be merged to build a complete timing dependency diagram For any two simulation entities, as long as there is a connection under a certain topic, they are considered to have temporal dependency. Moreover, the dependency weight (edge weight) is determined by the minimum look-ahead value, that is: .
[0038] Step 106, dynamically cluster the nodes of the timing dependency graph using the density peak method, construct multiple groups based on the clustering results, merge the simulation entities in each group into a group node, and construct a group dependency graph based on the group nodes and the dependencies between the group nodes.
[0039] The weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between groups.
[0040] After obtaining the timing dependency graph between entities, the entities are quickly clustered based on the density peak method to form several simulation entity groups in a "high cohesion, low coupling" manner. The simulation entities within the group have strong dependencies and should be scheduled as a whole. In addition, according to the "overdecomposed" parallel optimization principle, the number of groups should be more than twice the number of computing units to achieve load balancing in dynamic scheduling.
[0041] It can be understood that extracting timing dependencies from dynamic information interactions, grouping simulation entities according to the principle of "high cohesion and low coupling", and weakening the global dependencies between entities into local dependencies between groups are conducive to more efficient parallel scheduling.
[0042] Step 108, obtain the safety time boundary of the current group according to the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, construct a directed acyclic graph according to the safety time boundary of each group, and perform asynchronous parallel scheduling according to the directed acyclic graph.
[0043] A directed acyclic graph (DAG) is a graph consisting of nodes and directed edges. Nodes represent groups of simulation entities, edges represent dependencies between groups of simulation entities, and the direction of edges represents the order of dependencies (i.e., one group must be executed after another group). Acyclicity means that no circular dependencies are formed in the graph, which ensures the feasibility of task scheduling. By analyzing the dependencies between simulation entities, such a graph can be constructed to clarify which groups have dependencies and which groups can be executed in parallel.
[0044] The critical path is the path with the largest sum of weights in the DAG. In other words, it has the longest expected execution time and can easily become a bottleneck for simulation operations. By building a DAG and finding the critical path, you can determine which groups have no direct dependencies and which groups need to be scheduled first. Groups without direct dependencies can be scheduled to different computing units for parallel processing. Maximizing the number of groups that can be executed in parallel through reasonable scheduling means that the system will find as many tasks as possible without dependencies and execute them in parallel, thereby reducing waiting time and improving overall simulation efficiency.
[0045] During the scheduling process, after finding the critical path, you can decide which simulation entity groups must be executed in sequence and which can be executed in parallel. By prioritizing the tasks on the critical path and optimizing the execution order of other tasks based on this path, you can ensure that the simulation process goes smoothly.
[0046] It can be understood that inferring the calling order that can maximize the system parallelism based on the impact range of timing dependencies and driving the asynchronous parallel solution of the model can improve the simulation operation efficiency.
[0047] In the above-mentioned asynchronous parallel simulation method based on time-related clustering, a time-dependent graph is constructed through the entity interaction relationship of each subject space, and the time-dependent relationship can be extracted from the dynamic information interaction. The simulation entities are divided into several groups based on the density peak clustering method, and the global dependency between entities is weakened into the local dependency between groups, so as to improve the parallelism by using the independence between groups. Then, the calling order that can maximize the system parallelism is inferred according to the impact range of the time-dependent, and the model is driven to be solved asynchronously in parallel. Each group is asynchronously scheduled to advance independently, thereby avoiding the global synchronization overhead and improving the parallel simulation performance. The embodiment of the present invention can improve the simulation operation efficiency.
[0048] In one embodiment, constructing a timing dependency graph based on the message interaction relationship between pairs of simulation entities in each subject space includes: obtaining a simulation entity interaction relationship graph of each subject space; the nodes of the simulation entity interaction relationship graph include simulation entities, the edges include message interaction relationships between simulation entities, and the weights of the edges are the forward-looking values of the corresponding subjects; and merging the simulation entity interaction relationship graphs of each subject space into a timing dependency graph.
[0049] In one embodiment, a density peak method is used to dynamically cluster the nodes of a timing dependency graph, and multiple groups are constructed based on the clustering results, including: calculating the local density and center offset distance of each simulation entity in the timing dependency graph; sorting the simulation entities from large to small according to the local density and center offset distance, selecting the simulation entities with the highest sorting as the clustering center, and assigning the remaining simulation entities to the group where the nearest neighbor and the clustering center with a larger local density than itself are located, thereby obtaining multiple groups.
[0050] In this embodiment, for each entity , first calculate their local density and center offset distance :
[0051] ;
[0052] ;
[0053] in, is the neighborhood cutoff distance, is the edge weight in the temporal association graph. is a logical judgment function, ,but ;otherwise, In the density peak clustering algorithm, the neighborhood cutoff distance is a predetermined distance threshold. Local density refers to the number of data points within the neighborhood cutoff distance, while the center offset distance It refers to the minimum distance between a sample point and other points with higher density.
[0054] Then, select and The relatively high simulation entity is the cluster center, and the remaining points are assigned to the group of the nearest neighbor with a greater density than the center to complete the clustering. The specification is reduced to groups as nodes and group dependencies as edges. .in,
[0055] ;
[0056] .
[0057] In one embodiment, the safety time bound is:
[0058] ;
[0059] in, Grouping nodes The safety time limit, Grouping nodes The simulation time, Grouping nodes With grouped nodes The edge between for In this embodiment, the simulation group is used as the basic unit for scheduling. For each group, there is a safety time limit, where the simulation time of the group is equal to the timestamp of the message being processed or the timestamp of the smallest unprocessed message.
[0060] Because the message timestamps sent by other packets must be greater , so the grouping All timestamps less than the current time can be processed in chronological order When all messages are processed, if Because other groups of parallel execution have changed, You can continue processing messages without waiting; otherwise, you need to enter a waiting state according to local causal constraints. Will be updated continuously as it progresses , which may cause changes in the safety time boundaries of other groups. Some groups that enter the waiting state will enter the ready state and wait for scheduling. The ready state refers to the state in which the group execution dependency conditions have been met.
[0061] If the number of ready-state groups can be guaranteed to be greater than the number of computing units, the processor can be prevented from waiting idle, computing resources can be fully utilized, and simulation operation efficiency can be improved. Therefore, a directed acyclic graph is constructed based on the operation dependency, and the critical path is found in the graph for scheduling to maximize the number of simulation entity groups that can be executed in parallel.
[0062] In one embodiment, constructing a directed acyclic graph according to the safety time bound of each group includes: setting the group without pending messages within the safety time bound to a waiting state, and using the group in the waiting state as the initial node of the directed acyclic graph; the group in the waiting state is the group whose execution dependency has not been met; adding the group that is not in the current directed acyclic graph and directly affects the readiness of the initial node to the directed acyclic graph, and using it as the parent node of the corresponding initial node, iterating the process of adding the parent node until all groups are in the directed acyclic graph, and outputting the current directed acyclic graph.
[0063] In this embodiment, first, all the "waiting" state groups are taken as initial nodes; then, the groups that are not in the graph and directly prevent these nodes from being ready are added to the graph as their parent nodes. Direct Obstruction , refers to Existence To the edge ,and ; By iterating according to this logic, all groups can be used as nodes to build a directed acyclic graph. In the entire scheduling process, there is no global synchronization point, and each group in the ready state is asynchronously advanced.
[0064] In one embodiment, the situation of the grouping that directly affects the initial node readiness is represented as follows: in the grouping dependency graph, there is arrive Edge ,and , among which, according to For grouping nodes Group nodes with dependencies. for The simulation time, for The simulation time, For edge The weight of .
[0065] In one embodiment, performing asynchronous parallel scheduling according to the directed acyclic graph includes: finding a critical path of the directed acyclic graph, maximizing the number of groups that can be executed in parallel according to the critical path, and implementing asynchronous parallel simulation.
[0066] In a specific embodiment, Figure 2As shown in FIG, a flowchart of an asynchronous parallel simulation is provided. First, the temporal dependencies are extracted from the entity interaction relationship diagrams of different subject spaces. Then, the simulation entities are divided into several groups based on the density peak clustering method to utilize the independence between groups to improve the parallelism, that is, Figure 2 Dynamic clustering based on density peaks is performed in the simulation. Finally, according to local causal constraints and critical path analysis, each group is asynchronously scheduled to advance independently, thus avoiding global synchronization overhead and effectively improving parallel simulation performance.
[0067] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0068] In one embodiment, Figure 3 As shown, an asynchronous parallel simulation device based on time series association clustering is provided, comprising:
[0069] An interest matching module 302 is used to map the interest expressions published and subscribed by the simulation entity to the subject space of the corresponding subject through the simulation platform, perform interest matching in the subject space, and obtain a pair of simulation entities having a message interaction relationship;
[0070] A timing dependency extraction module 304 is used to construct a timing dependency graph according to the message interaction relationship between the simulation entity pairs in each topic space; the nodes of the timing dependency graph include the simulation entities, the edges include the message interaction relationship between the simulation entities, and the weight of the edge is the minimum forward-looking value of the corresponding simulation entity pair under all topics;
[0071] The dynamic clustering module 306 is used to dynamically cluster the nodes of the timing dependency graph using the density peak method, construct multiple groups according to the clustering results, merge the simulation entities in each group into a group node, and construct a group dependency graph according to the group nodes and the dependencies between the group nodes; the weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between the groups;
[0072] The asynchronous scheduling module 308 is used to obtain the safety time limit of the current group based on the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, construct a directed acyclic graph based on the safety time limit of each group, and perform asynchronous parallel scheduling based on the directed acyclic graph.
[0073] In one of the embodiments, it is also used to obtain a simulation entity interaction relationship diagram for each subject space; the nodes of the simulation entity interaction relationship diagram include simulation entities, the edges include message interaction relationships between simulation entities, and the weights of the edges are the forward-looking values of the corresponding subjects; the simulation entity interaction relationship diagrams for each subject space are merged into a timing dependency diagram.
[0074] In one of the embodiments, it is also used to calculate the local density and center offset distance of each simulation entity in the timing dependency graph; the simulation entities are sorted from large to small according to the local density and center offset distance, and the simulation entities with the highest sorting are selected as cluster centers, and the remaining simulation entities are assigned to the group where the nearest neighbor cluster center with a larger local density than itself is located, so as to obtain multiple groups.
[0075] In one embodiment, the safety time limit is:
[0076] ;
[0077] in, Grouping nodes The safety time limit, Grouping nodes The simulation time, Grouping nodes With grouped nodes The edge between for The weight of .
[0078] In one of the embodiments, it is also used to set the groups without pending messages within the safety time limit to a waiting state, and use the groups in the waiting state as the initial nodes of the directed acyclic graph; the groups in the waiting state are the groups whose execution dependencies have not been met; the groups that are not in the current directed acyclic graph and directly affect the readiness of the initial node are added to the directed acyclic graph and used as the parent nodes of the corresponding initial nodes, and the process of adding the parent nodes is iterated until all groups are in the directed acyclic graph, and the current directed acyclic graph is output.
[0079] In one embodiment, the situation of the grouping that directly affects the initial node readiness is represented as follows: in the grouping dependency graph, there is arrive Edge ,and , among which, according to For grouping nodes Group nodes with dependencies. for The simulation time, for The simulation time, For edge The weight of .
[0080] In one of the embodiments, it is also used to find the critical path of the directed acyclic graph, maximize the number of groups that can be executed in parallel according to the critical path, and implement asynchronous parallel simulation.
[0081] For the specific definition of the asynchronous parallel simulation device based on timing association clustering, please refer to the definition of the asynchronous parallel simulation method based on timing association clustering in the above text, which will not be repeated here. Each module in the above-mentioned asynchronous parallel simulation device based on timing association clustering can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0082] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an asynchronous parallel simulation method based on time-series association clustering is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0083] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0084] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.
[0085] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0086] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0087] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 specification.
[0088] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An asynchronous parallel simulation method based on time series correlation clustering, characterized in that: The method comprises: The simulation platform maps the interest expressions published and subscribed by the simulation entities to the topic space of the corresponding topics, performs interest matching in the topic space, and obtains simulation entity pairs with message interaction relationships; A timing dependency graph is constructed according to the message interaction relationship between the simulation entity pairs in each topic space; the nodes of the timing dependency graph include the simulation entities, the edges include the message interaction relationship between the simulation entities, and the weight of the edge is the minimum forward-looking value of the corresponding simulation entity pair under all topics; The nodes of the timing dependency graph are dynamically clustered using the density peak method, multiple groups are constructed according to the clustering results, the simulation entities in each group are merged into a group node, and a group dependency graph is constructed according to the group nodes and the dependencies between the group nodes; the weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between the groups; The safety time bound of the current group is obtained according to the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, a directed acyclic graph is constructed according to the safety time bound of each group, and asynchronous parallel scheduling is performed according to the directed acyclic graph.
2. The method according to claim 1, characterized in that The step of constructing a timing dependency graph according to the message interaction relationship between the simulation entity pairs in each topic space includes: Acquire a simulation entity interaction relationship diagram of each topic space; the nodes of the simulation entity interaction relationship diagram include simulation entities, the edges include message interaction relationships between simulation entities, and the weights of the edges are the forward-looking values of the corresponding topics; The simulation entity interaction relationship graph of each topic space is merged into a temporal dependency graph.
3. The method according to claim 1, characterized in that The step of dynamically clustering the nodes of the time series dependency graph using the density peak method and constructing a plurality of groups according to the clustering results includes: Calculating the local density and center offset distance of each simulation entity in the timing dependency graph; The simulation entities are sorted from large to small according to the local density and the center offset distance, and the simulation entities with the highest sorting are selected as the cluster centers. The remaining simulation entities are assigned to the group where the nearest neighbor cluster center with a larger local density is located, and multiple groups are obtained.
4. The method according to claim 1, characterized in that: The safety time limit is: in, Grouping nodes The safety time limit, Grouping nodes The simulation time, Grouping nodes With grouped nodes The edge between for The weight of .
5. The method according to claim 1, characterized in that Constructing a directed acyclic graph based on the safety time bound of each group includes: The group without pending messages within the safety time limit is set to a waiting state, and the group in the waiting state is used as the initial node of the directed acyclic graph; the group in the waiting state is a group whose execution dependency has not been satisfied; The groups that are not in the current directed acyclic graph and directly affect the readiness of the initial node are added to the directed acyclic graph and used as the parent nodes of the corresponding initial nodes. The process of adding parent nodes is iterated until all groups are in the directed acyclic graph, and the current directed acyclic graph is output.
6. The method according to claim 5, characterized in that The situation that directly affects the grouping of the initial node is expressed as: In the group dependency graph, there is arrive Edge ,and , among which, according to For grouping nodes Group nodes with dependencies. for The simulation time, for The simulation time, For edge The weight of .
7. The method according to claim 1, characterized in that Performing asynchronous parallel scheduling according to the directed acyclic graph includes: The critical path of the directed acyclic graph is found, and the number of groups that can be executed in parallel is maximized according to the critical path to achieve asynchronous parallel simulation.
8. An asynchronous parallel simulation device based on time series correlation clustering, characterized in that: The device comprises: An interest matching module is used to map the interest expressions published and subscribed by the simulation entity to the subject space of the corresponding subject through the simulation platform, perform interest matching in the subject space, and obtain simulation entity pairs with message interaction relations; A timing dependency extraction module is used to construct a timing dependency graph according to the message interaction relationship between the simulation entity pairs in each topic space; the nodes of the timing dependency graph include the simulation entities, the edges include the message interaction relationship between the simulation entities, and the weight of the edge is the minimum forward-looking value of the corresponding simulation entity pair under all topics; A dynamic clustering module is used to dynamically cluster the nodes of the timing dependency graph using a density peak method, construct multiple groups according to the clustering results, merge the simulation entities in each group into a group node, and construct a group dependency graph according to the group nodes and the dependencies between the group nodes; the weight of the edge in the group dependency graph is the minimum weight of each pair of simulation entities between the groups; The asynchronous scheduling module is used to obtain the safety time boundary of the current group according to the sum of the minimum message timestamp and weight of the groups that have a dependency relationship with the current group in the group dependency graph, construct a directed acyclic graph according to the safety time boundary of each group, and perform asynchronous parallel scheduling according to the directed acyclic graph.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Computational flow chart construction method and device, computational efficiency optimization method and device and electronic equipment
CN113238837A
Simulation application combination system and method based on publishing and subscribing
CN116401898A