Graph propagation model simulation-oriented acceleration method, terminal and storage medium
By constructing a dual-acceleration propagation model framework based on message passing and a distributed propagation simulation method, the problem of low efficiency in graph propagation model simulation is solved, efficient simulation of ultra-large-scale graph data is achieved, and computing efficiency and scalability are improved.
Patent Information
- Application Number
- CN202511203423.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-09-30
AI Technical Summary
Existing technologies have problems with low computational efficiency and insufficient scalability in graph propagation model simulation. Especially when processing ultra-large-scale graph data, existing solutions find it difficult to balance simulation accuracy and computational efficiency.
A dual-acceleration propagation model framework based on message passing is constructed, which realizes micro- and macro-acceleration through synchronous node status updates and batch parallel methods, and divides the graph structure into multiple subgraphs through the maximum processing time strategy for distributed propagation simulation.
It achieves efficient simulation of graph propagation models, and the acceleration effect does not decrease with the increase of data scale. It can handle ultra-large-scale networks, improves computing efficiency and scalability, and is suitable for computing devices with different performance.
Smart Images

Figure CN120723944A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graph communication technology, and in particular to an acceleration method, terminal and storage medium for graph communication model simulation. Background Art
[0002] In recent years, with the booming development of social media platforms, the increasing demand for contact tracing during public health events, and the widespread adoption of communication analysis in financial systems, the amount of graph-based data has increased significantly. Graph data, with its semi-structured and non-Euclidean properties, often expresses complex connections between entities through topological relationships between nodes. It has been widely used in various scenarios, including infectious disease modeling and information dissemination.
[0003] In existing technologies, academia and industry generally use mechanism propagation models (such as SIR and IC) for simulation. These models traverse all edges in the graph in each iteration to sample and update the state, resulting in large computational workload and frequent state copying, which leads to low simulation efficiency. To this end, several technical solutions have been proposed to improve simulation efficiency. From the perspective of algorithm implementation optimization, The -leaping approximation method reduces the frequency of calls to the rate function by sampling propagation events in batches within a fixed time step. The fast_SIR model in the EoN library triggers local computation only when "infection" or "recovery" actually occurs, avoiding full graph traversal. CyNetDiff, based on the independent cascade and linear threshold model features, rewrites traditional loops into breadth-first search and combines it with Cython compilation optimization to improve execution efficiency. From a computing hardware perspective, some research has introduced high-performance computing architectures (such as GPUs or distributed clusters) to support large-scale graph propagation simulations. For example, EpiSimdemics achieves large-scale parallel simulations of real social networks. Koster and Su et al. further accelerated propagation computations using GPU solutions.
[0004] However, while these solutions have achieved some success in single-machine or partially parallel environments, they still face significant challenges in handling extremely large-scale graph propagation tasks. In distributed environments, general-purpose distributed graph computing systems (such as GraphLab, Pregel, and Giraph) can run general graph algorithms, but they lack optimized support for the propagation process, resulting in high communication costs and uneven node loads.
[0005] In summary, existing technologies still have shortcomings in the simulation efficiency and scalability of graph propagation models, and some technologies sacrifice accuracy for efficiency. Existing distributed simulation technologies lack error control and communication optimization strategies for propagation models, making it difficult to simultaneously take into account simulation accuracy and computational efficiency. Summary of the Invention
[0006] To solve the technical problems existing in the prior art, the present invention provides an acceleration method, terminal, and storage medium for graph propagation model simulation, constructs a unified acceleration framework for graph propagation models that combines speed, accuracy, and scalability, and can also perform efficient propagation simulation for ultra-large-scale networks that are difficult to calculate on a single machine.
[0007] To achieve the above object, the present invention provides the following technical solutions: The present invention discloses an acceleration method for graph propagation model simulation, comprising: Define a graph structure consisting of a set of nodes and a set of edges and store graph data of the graph structure; A dual-acceleration propagation model framework based on message passing is constructed to achieve both micro- and macro-acceleration of the graph propagation model. At the micro level, the neighbor states of each node in the synchronous graph structure are aggregated and updated. At the macro level, all node states simulated multiple times in the graph structure are superimposed into a high-dimensional tensor for forward propagation through batch parallelization, accelerating Monte Carlo simulations. Among them, if the graph data of the graph structure exceeds the preset scale, the edge data of the graph structure is divided according to the target node based on the longest processing time strategy, thereby forming multiple subgraphs and broadcasting them to the process of distributed propagation simulation, so that the same target node only exists in a single subgraph.
[0008] As a further improvement to the above solution, the state update expression formula of each node is: ; ; ; Where, and Node i At the current time step k and the previous time step k -1 status, Update function for the node; Represents the node in the simulation at the current time step i Aggregation results from the state information of neighboring nodes; is the sample space of the current time step; Represents the neighbor nodes in the simulation at the current time step j Pass to node i information; is the information aggregation function; For nodes i The set of neighbor nodes of Neighbor nodes j The state at the previous time step; For nodesi With neighboring nodes j The side information between is the information transfer function.
[0009] As a further improvement of the above solution, the forward propagation formula is: ; Where, is the node state vector Superposition of high-dimensional tensors; Indicates that for each node state vector in the batch, the sample space is not shared; is the set of real numbers; B is the batch size; is the number of nodes; Represents a simulation calculation for one time step.
[0010] As a further improvement to the above solution, the specific process of splitting edge data according to target nodes in the graph structure based on the longest processing time strategy includes: Step 1: Count the in-degrees of all nodes in the graph structure as node weights, sort the nodes from largest to smallest according to their in-degrees, and obtain the sorting index: ; Where, For the Node index, is the weight of the node, ; Step 2: Define cumulative weight: ; ;
[0011] Where, Before n The cumulative sum of the node weights, ; W is the total weight; the total weight W Divide into d paragraph, get the q The thresholds for the segments are: , , then q partitions By Satisfaction All indexes of are composed of: ; Where, , represents the cumulative sum of the weights of the first 0 nodes; Step 3: For q partitions , its subgraph edge set is: ; Where, V and E are the node set and edge set of the graph structure respectively; represents the edge, u and v Represent the source node and target node respectively.
[0012] As a further improvement of the above scheme, each process in the distributed propagation simulation performs propagation for one time step and updates the node status of the target node. No communication is performed in this process. After the process completes the node status update, communication is performed to aggregate the node status of the target node in each process to the main process, and then broadcast it to each process.
[0013] As a further improvement of the above scheme, the graph structure is , V is a node set, E is an edge set; edge is a binary or triples ; u and v represent the source node and the target node respectively, w Represents weight. If the edge has weight information, the graph is a weighted graph, otherwise it is an unweighted graph. The graph structure is stored in the format of compressed sparse matrix rows.
[0014] As a further improvement of the above solution, the types of graph propagation models are divided into infectious disease models, opinion evolution models and dynamic graph propagation models.
[0015] As a further improvement of the above solution, the graph propagation model is applied to directed graphs and undirected graphs.
[0016] The present invention also discloses a computer terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the acceleration method for graph-oriented propagation model simulation as described above are implemented.
[0017] The present invention also discloses a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the acceleration method for graph-oriented propagation model simulation as described above are implemented.
[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. The acceleration method for graph propagation model simulation disclosed in the present invention optimizes the efficiency and scalability of the graph propagation model. The dual-acceleration propagation model framework based on message passing realizes both microscopic and macroscopic acceleration of the propagation model. The distributed propagation simulation method divides the data by target nodes, taking into account the load and communication of distributed computing. Compared with the existing graph propagation model implementation, it has high operating efficiency, and the acceleration effect does not decrease with the increase of data scale. In addition, it can also perform efficient propagation simulation for ultra-large-scale networks that are difficult to calculate on a single machine, greatly improving the efficiency and scalability of the propagation model, and has excellent performance on computing devices with different performance.
[0019] 2. This acceleration method can accelerate algorithms such as infectious disease models, opinion evolution models, and dynamic graph propagation models, and can be applied to scenarios such as infectious disease propagation simulation, rumor source location, and propagation capacity analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flowchart of the acceleration method for graph propagation model simulation in Example 1 of the present invention.
[0021] Figure 2 Schematic diagram of the framework of the double acceleration propagation model based on message passing in Example 1 of the present invention.
[0022] Figure 3 This is a flow chart of the distributed propagation simulation method in Example 1 of the present invention.
[0023] Figure 4 This is a schematic diagram of the structure of a computer terminal in Example 2 of the present invention. DETAILED DESCRIPTION
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0025] Example 1 Graph propagation models are key tools in fields such as information diffusion, public opinion monitoring, and public health prevention and control. However, with the explosive growth of graph data, existing implementations are often inefficient and difficult to scale to large-scale graphs. In the propagation model implementation, each iteration requires traversing all edges and performing random sampling and node state updates. This large number of loop calculations and frequent state copies result in extremely low simulation efficiency. The inherent bottleneck of the speed dilemma is the large number of loops in the simulation process. As the amount of data continues to expand, this bottleneck evolves into an even more severe scale dilemma. On the one hand, the limitations of simulation efficiency have constrained propagation-related research to smaller-scale data; on the other hand, how to simulate the propagation of very large-scale data that cannot be calculated on a single machine.
[0026] Based on this, this embodiment provides an acceleration method for graph propagation model simulation, please refer to Figure 1 , the method comprises the following steps: First, define a graph structure consisting of a node set and an edge set and store the graph data of the graph structure. The graph structure is , V is a node set, E is an edge set; edge is a binary or triples ; u and v represent the source node and the target node respectively, w Represents weight. If the edge has weight information, the graph is a weighted graph, otherwise it is an unweighted graph. The graph structure is stored in the format of compressed sparse matrix rows. The graph structure is stored in the format of compressed matrix rows (CSR) and is displayed as three arrays, such as Figure 2 The graph data format shown in (1) is: source node, target node and edge weight. The length of the three arrays is , the same index value of the three arrays constitutes an edge. For unweighted graphs, the array storing the element values can be further omitted.
[0027] In this embodiment, the types of graph propagation models are divided into infectious disease models, opinion evolution models and dynamic graph propagation models, which are used for directed graphs and undirected graphs.
[0028] A dual-acceleration propagation model framework based on message passing is constructed to achieve both micro- and macro-acceleration of the graph propagation model. Acceleration is achieved at the micro level by synchronizing node status updates, and at the macro level by parallel Monte Carlo calculations.
[0029] Micro-acceleration considers synchronous computation of node state determination and updates, replacing the need to traverse both the node and its neighbors. A node's state update requires aggregating information from its neighbors and updating the target node. The forward propagation mechanism of message passing also involves message passing, aggregation, and state updates. Based on the characteristics of the propagation model, a micro-level node synchronization computation method is proposed.
[0030] Figure 2 (1) is the side information in the form of CSR, Figure 2 The one-dimensional vector in (3) is the node feature, indicating the state of the node. is the sample space of the discrete step, including the model parameters and the random values of this step. Figure 2 (2) In one forward propagation, the information transmission of one time step is calculated synchronously, and the information is aggregated and the state is updated: ; Specifically, in the simulation of one time step of the graph propagation model, the states of neighbor nodes are first aggregated: ; The received information is then aggregated: ; Use the aggregated information to update the node status: ; In the node state update step, the state of the target node in the previous time step needs to be updated. The update method is determined by neighbor information Update or update with other parameters regardless of neighbor information.
[0031] In the above formula, and Node i The state at the current time step and the previous time step, Update function for the node; Represents the node in the simulation at the current time step i Aggregation results from the state information of neighboring nodes; is the sample space of the current time step; Represents the neighbor nodes in the simulation at the current time step j Pass to node i information; It is an information aggregation function designed based on the graph propagation model mechanism; For nodes i The set of neighbor nodes of Neighbor nodes jThe state at the previous time step; For nodes i With neighboring nodes j The side information between It is an information transfer function designed according to the propagation model mechanism, which usually requires side information, the state of the source node and the target node in the previous time step, and the sample space of this step or the initial sampling.
[0032] Macro-acceleration utilizes batch parallelism to accelerate Monte Carlo simulations. Batching in message passing mechanisms involves consolidating multiple graphs into a single large graph for computation, with the batch size referring to the number of graphs in the batch. In deep learning, batching significantly increases GPU (graphics processing unit) utilization, accelerating both training and inference. Monte Carlo simulations in probability propagation models involve repeatedly running the algorithm on the same graph data. Therefore, batches can be constructed from the same graph data, allowing the results of multiple Monte Carlo simulations to be computed in parallel during a single forward pass.
[0033] At the macro level, a batch parallel method is used to superimpose all node states of multiple simulations in the graph structure into a high-dimensional tensor for forward propagation, accelerating the Monte Carlo simulation. The forward propagation formula is: ; Where, is the node state vector Superposition of high-dimensional tensors; Indicates that for each node state vector in the batch, the sample space is not shared; is the set of real numbers; B is the batch size; is the number of nodes; Represents a simulation calculation for one time step.
[0034] Figure 2 (4) shows a batch parallel method that superimposes the initial states of all nodes in the graph structure into a high-dimensional tensor, performs forward propagation, and obtains the results of multiple Monte Carlo simulations.
[0035] The memory required to read and execute data in propagation simulations of very large-scale graphs is enormous. Therefore, distributed propagation simulations are necessary to rationally partition the very large data into subgraphs and broadcast them to distributed computing processes. This paper proposes a distributed propagation simulation method that balances load and communication. This method partitions subgraphs according to target nodes, ensuring that the number of edges in each subgraph is not severely skewed, and communicating the target node's state after each time step.
[0036] During the simulation of the propagation model, the target node receives aggregated information from the source node and updates the node state. If the target node exists in multiple subgraphs, the information received by the node needs to be communicated before the node state is updated. This increases the communication frequency and the amount of communication data, and different communication methods need to be designed for different propagation models. When the target node only exists in a single subgraph, a simulation of one time step is performed on the single subgraph. The target node can receive all the information from the source node and only needs to communicate the state of the target node. Figure 3 As shown in Figure 2, in a distributed propagation simulation, each process performs propagation for one time step, updating the node state of the target node. No communication is required during this process. After the process completes the node state update, communication is performed to aggregate the node states of the target nodes in each process to the master process, which is then broadcast to each process.
[0037] If the graph data of the graph structure exceeds the preset size, the edge data of the graph structure is split according to the target node based on the maximum processing time strategy, thereby forming multiple subgraphs and broadcasting them to the distributed propagation simulation process, so that the same target node only exists in a single subgraph. The specific process of splitting the edge data includes: Step 1: Count the in-degrees of all nodes in the graph structure as node weights, sort the nodes from largest to smallest according to their in-degrees, and obtain the sorting index: ; Where, For the Node index, is the weight of the node, ; Step 2: Define cumulative weight: ; ; Where, Before n The cumulative sum of the node weights, ; W Right now is the total weight; the total weight W Divide into d paragraph, get the q The thresholds for the segments are: , , then q partitions By Satisfaction All indexes of are composed of: ; Where, , represents the cumulative sum of the weights of the first 0 nodes; Step 3: Forq partitions , its subgraph edge set is: ; Where, V and E are the node set and edge set of the graph structure respectively; represents the edge, u and v Represent the source node and target node respectively.
[0038] By splitting the process by target nodes, each process does not need to communicate when performing a time step calculation, so the propagation algorithm implemented by the double acceleration propagation model framework based on message passing can be directly used.
[0039] To verify the effectiveness of the above acceleration method, this example selected six real-world graph datasets of varying data size for experimentation. The number of nodes ranged from thousands to millions, and the number of edges ranged from tens of thousands to tens of millions. The six graph datasets were Cora, PubMed, Flickr, Yelp, Pokec, and Webbase. Pokec was run exclusively on the algorithm implemented in FS_GPlib, while the Webbase dataset was used for distributed simulations. Graph data statistics are shown in Table 1.
[0040] Table 1. Graph data information ; This example uses the following mainstream implementations as comparisons: one uses the algorithm integrated in the standard library NDlib (Nd-); the other uses a custom implementation based on the Networkx library (Nx-). In addition to comparing the efficiency of the IC (Independent Cascade) and SIR propagation models, two additional acceleration schemes are also compared: the IC implementation integrated in the new algorithm library CyNetDiff (CyNetDiff_IC), and the other uses the SIR implementation in the EoN library (EoN_SIR). This example uses the degree centrality algorithm to select a seed set of nodes representing 10% of the total number of nodes and calculates the final propagation ranges for the SIR and IC models. Unless otherwise specified, for IC propagation, the propagation probability is 0.5, and 1000 Monte Carlo simulations are performed until propagation is complete. For SIR propagation, the propagation and recovery probabilities are 0.01 and 0.005, respectively, and 1000 Monte Carlo simulations are performed with 100 time steps.
[0041] Among them, CyNetDiff comes from: Robson EW, Reddy D, Umrawal A K. CyNetDiff: A Python Library for Accelerated Implementation of Network Diffusion Models[J]. Proceedings of theVLDB Endowment, 2024, 17(12): 4409-4412. EoN_SIR is derived from: Miller JC, Ting T. Eon (epidemics on networks): a fast, flexiblepython package for simulation, analytic approximation, and analysis of epidemics on networks[J]. arXiv preprint arXiv:2001.02436, 2020. Kiss IZ, Miller JC, Simon P L. Mathematics of epidemics on networks[J]. Cham: Springer, 2017, 598(2017): 31. The comparison algorithm only supports CPU computation, while FS_GPlib supports both CPU and GPU computation. CPU computations were performed on a compute node equipped with four Intel(R) Xeon(R) Platinum 8260 processors (each with 24 cores and 48 threads, a base frequency of 2.40 GHz, and 1.5 TiB of DDR4 memory). GPU computations were performed on a server equipped with eight NVIDIA GeForce RTX 4090 (24.5 GiB) GPUs and a 64-core dual-socket Intel(R) Xeon(R) Platinum 8358 CPU (2.6 GHz) with 503 GiB of DDR4 memory. The operating system was Rocky Linux 8.5 (Green Obsidian), running the Linux kernel 4.18.0-348.el8.0.2.x86_64. Experiments were run in a virtual environment using Python 3.10, PyTorch 2.1.2, CUDA 12.1, and CUDA_VISIBLE_DEVICES=0.
[0042] First, we experimented with micro-acceleration effects. This example compared the runtimes of four implementations of IC and SIR. Tables 2 and 3 list the times required for 1000 Monte Carlo simulations. The times for some algorithms were calculated by multiplication.
[0043] Table 2. Runtimes for different IC implementations ; In the table, the symbol The data is the time for 100 simulations multiplied by 10; the symbol The data is the time for 10 simulations multiplied by 100.
[0044] Table 3. Running time of different SIR implementations ; In a runtime comparison of IC implementations, Nx-IC is more efficient than the unified framework's Nd-IC, but its runtime is longer than all other implementations. For Cora and PubMed data, CyNetDiff-IC is the most efficient, but its runtime increases with increasing data size, exceeding that of FS-IC (GPU). FS-IC (CPU) is less computationally efficient than FS-IC (GPU).
[0045] The runtime comparison results for different SIR implementations are generally consistent with those for IC. Nx-SIR and Nd-SIR have the lowest computational efficiency. FS-SIR (CPU) is less efficient than FS-SIR (GPU). EoN-SIR has the shortest runtime on the small-scale Cora dataset. For other datasets, FS-SIR (GPU) has a shorter computational time than EoN-SIR. FS-SIR (GPU) has the shortest runtime on all datasets, and the speedup increases with data size.
[0046] Both experiments demonstrate FS-GPlib's excellent micro-acceleration and its ability to efficiently compute simulation results for large-scale data. Furthermore, FS-GPlib's performance on both CPUs and GPUs demonstrates its ability to fully leverage the advantages of GPUs, breaking through the constraints of efficiency and scale.
[0047] Secondly, the macro-acceleration effect is demonstrated. Tables 4 and 5 show the relationship between algorithm runtime and batch size. For smaller data (e.g., Cora), runtime decreases as the batch size increases, but the runtime does not decrease in multiples of the batch size. For larger data, when the batch size increases, the runtime acceleration effect is not significant, and the runtime may even increase. When the batch size is too large, the algorithm cannot be run. These situations are all due to the limited performance of the computing device. When the batch size increases, the memory occupied by the data, the computational throughput, and the data transmission requirements all increase, resulting in a bottleneck in the acceleration effect. Therefore, when performing propagation model acceleration simulation on large-scale data, it is necessary to select an appropriate batch parameter based on the data size and device performance.
[0048] Table 4. Relationship between the running time of FS-IC and the batch size ; Table 5. Relationship between the running time of FS-SIR and the batch size ; Finally, the feasibility of distributed simulations of very large graphs was verified. A distributed SIR propagation simulation was run on the very large graph Webbase. The data is shown in Table 3. The experimental equipment was a single machine with multiple graphics cards, and six of them were selected for calculation. The results are shown in Table 6.
[0049] First, partitioning the ultra-large-scale Webbase graph on a CPU takes only about 42 seconds. Then, 1,000 Monte Carlo simulations are performed across six processes, taking approximately 1.15E+04 seconds. The expected percentage of infected nodes is ultimately 29.63%. This experiment validates the feasibility of the proposed acceleration method for computing propagation simulation results on ultra-large-scale graphs, demonstrating the framework's strong scalability.
[0050] Table 6. Distributed simulation results of the ultra-large-scale graph Webbase .
[0051] Example 2 This embodiment provides a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the acceleration method for graph-oriented propagation model simulation as described in Example 1 are implemented.
[0052] like Figure 4 As shown, the computer terminal provided in this embodiment includes: at least one processor 101, and a memory 102 connected to the at least one processor 101. The specific connection medium between the processor 101 and the memory 102 is not limited in this embodiment. Figure 4 In the example, the processor 101 and the memory 102 are connected via the bus 100. Figure 4 The bus 100 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The bus is represented by only one thick line, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 101 can also be called a controller, and there is no limitation on the name.
[0053] In this embodiment, the memory 102 stores instructions that can be executed by at least one processor 101 , and the at least one processor 101 can perform the aforementioned method by executing the instructions stored in the memory 102 .
[0054] Among them, the processor 101 is the control center of the device, which can use various interfaces and lines to connect various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory 102 and calling data stored in the memory 102, the various functions of the device and processing data.
[0055] In one possible design, processor 101 may include one or more processing units. Processor 101 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 101. In some embodiments, processor 101 and memory 102 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.
[0056] The processor 101 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the acceleration method for graph propagation model simulation disclosed in Example 1 can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor 101.
[0057] The memory 102 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 102 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 102 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 102 in this embodiment can also be a circuit or any other device that can implement a storage function, for storing program instructions and / or data.
[0058] By designing and programming the processor 101, the code corresponding to the acceleration method for graph propagation model simulation introduced in the above embodiment can be fixed into the chip, so that the chip can execute Figure 1 The steps of the acceleration method for graph propagation model simulation are shown. How to design and program the processor 101 is a technique well known to those skilled in the art and will not be described in detail here.
[0059] Example 3 This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the acceleration method for graph-oriented propagation model simulation as described in Example 1 are implemented.
[0060] The computer-readable storage medium may include flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the storage medium may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is generally used to store the operating system and various application software installed on the computer device. In addition, the memory may also be used to temporarily store various types of data that have been output or are about to be output.
[0061] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. An acceleration method for graph propagation model simulation, characterized in that: include: Define a graph structure consisting of a set of nodes and a set of edges and store graph data of the graph structure; Build a dual-acceleration propagation model framework based on message passing to achieve micro-acceleration and macro-acceleration of the graph propagation model; At the micro level, the neighbor status of each node in the synchronized graph structure is aggregated to update the node status; At the macro level, a batch parallel approach is used to superimpose all node states of multiple simulations in the graph structure into high-dimensional tensors for forward propagation, accelerating Monte Carlo simulations. Among them, if the graph data of the graph structure exceeds the preset scale, the edge data of the graph structure is divided according to the target node based on the longest processing time strategy, thereby forming multiple subgraphs and broadcasting them to the process of distributed propagation simulation, so that the same target node only exists in a single subgraph.
2. The acceleration method for graph-oriented propagation model simulation according to claim 1, characterized in that: The state update expression formula of each node is: ; ; ; Where, and Node i At the current time step k and the previous time step k -1 status, Update function for the node; Represents the node in the simulation at the current time step i Aggregation results from the state information of neighboring nodes; is the sample space of the current time step; Represents the neighbor nodes in the simulation at the current time step j Pass to node i information; is the information aggregation function; For nodes i The set of neighbor nodes of Neighbor nodes j The state at the previous time step; For nodes i With neighboring nodes j The side information between is the information transfer function.
3. The acceleration method for graph-oriented propagation model simulation according to claim 1, characterized in that: The expression formula of the forward propagation is: ; Where, is the node state vector Superposition of high-dimensional tensors; Indicates that for each node state vector in the batch, the sample space is not shared; is the set of real numbers; B is the batch size; is the number of nodes; Represents a simulation calculation for one time step.
4. The acceleration method for graph-oriented propagation model simulation according to claim 1, characterized in that: The specific process of splitting edge data according to target nodes in the graph structure based on the longest processing time strategy includes: Step 1: Count the in-degrees of all nodes in the graph structure as node weights, sort the nodes from largest to smallest according to their in-degrees, and obtain the sorting index: ; Where, For the Node index, is the weight of the node, ; Step 2: Define cumulative weight: ; ; Where, Before n The cumulative sum of the node weights, ; W is the total weight; the total weight W Divide into d paragraph, get the q The thresholds for the segments are: , , then q partitions By Satisfaction All indexes of are composed of: ; Where, , represents the cumulative sum of the weights of the first 0 nodes; Step 3: For q partitions , its subgraph edge set is: ; Where, V and E are the node set and edge set of the graph structure respectively; represents the edge, u and v Represent the source node and target node respectively.
5. The acceleration method for graph-oriented propagation model simulation according to claim 4, characterized in that: In the distributed propagation simulation, each process performs propagation for one time step and updates the node state of the target node, and no communication is performed in the process; After the process completes the node status update, it communicates and aggregates the node status of the target node in each process to the main process, which is then broadcast to each process.
6. The acceleration method for graph-oriented propagation model simulation according to claim 1, characterized in that: The graph structure is , V is a node set, E is an edge set; edge is a binary or triples ; u and v represent the source node and the target node respectively, w Represents weight. If the edge has weight information, the graph is a weighted graph, otherwise it is an unweighted graph. The graph structure is stored in the format of compressed sparse matrix rows.
7. The acceleration method for graph-oriented propagation model simulation according to claim 1, characterized in that: The types of graph propagation models are divided into infectious disease models, opinion evolution models and dynamic graph propagation models.
8. The acceleration method for graph-oriented propagation model simulation according to claim 7, characterized in that: The graph propagation model is applicable to both directed and undirected graphs.
9. A computer terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the processor implements the steps of the acceleration method for graph-oriented propagation model simulation as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the acceleration method for graph-oriented propagation model simulation as described in any one of claims 1 to 8 are implemented.