A fine neuron efficient simulation method and device based on tree structure division

By introducing a tree-based partitioning method, a tree structure corresponding to neuron computation is constructed, the cost function is calculated, and a partitioning model is built based on the cost function to partition the tree structure and obtain branch subtrees, thereby realizing parallel simulation computation. This solves the problem of excessively long simulation time for large-scale fine neural networks and improves simulation efficiency and user experience.

CN114186674BActive Publication Date: 2026-03-20PEKING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-11
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies cannot efficiently simulate large-scale, sophisticated neural networks, resulting in excessively long computation times, which greatly limits research in brain science and brain-inspired artificial intelligence.

Method used

A tree-based partitioning method is adopted to construct the tree structure corresponding to the neuron computation, calculate the cost function, and build a partitioning model based on the cost function to partition the tree structure to obtain each branch subtree. Parallel simulation computation is performed, and finally the simulation results are pushed to the target user terminal device for display.

Benefits of technology

It improves the efficiency of simulation calculation and processing, and the simulation results are displayed intuitively, thus enhancing the user experience and application experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114186674B_ABST
    Figure CN114186674B_ABST
Patent Text Reader

Abstract

The application discloses a fine neuron efficient simulation method and device based on tree structure division, computer equipment and a storage medium. The method comprises the following steps: calculating a cost function, and constructing a corresponding division model based on the cost function; dividing the tree structure according to the division model to obtain each branch sub-tree; distributing each branch sub-tree to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result; and pushing the simulation result to a target user terminal device for display. The simulation method of the embodiment of the application has the advantages that the division model constructed based on the cost function is introduced, the tree structure is divided according to the division model to obtain each branch sub-tree, each branch sub-tree is distributed to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result, and the simulation method fully utilizes the parallel calculation architecture for simulation calculation, thereby greatly improving the processing efficiency of simulation calculation processing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a fine neuron efficient simulation method and device based on tree structure division. BACKGROUND

[0002] Neurons in different brain regions of the brain have high complexity, unlike existing artificial neural networks, a single neuron in the biological brain has a very complex structure, and a large number of research works show that such neurons with complex structure have strong computing power, therefore, the simulation of the brain needs to use a fine neuron model with dendrite structure.

[0003] A large-scale fine neural network composed of a large number of fine neuron models can simulate different scale brain response phenomena, and establish a bridge between dendrite information processing and brain neural circuit function, which is of great significance to brain science and brain-inspired artificial intelligence. However, the fine neuron has strong computing power, and due to its very complex structure, it has high computational complexity and is very time-consuming in simulation. The network composed of such fine neuron models has huge computing amount. In the whole simulation process, the calculation of solving linear equations is the longest, which is the efficiency bottleneck of the simulation process. The existing simulation method and simulation platform cannot efficiently solve the linear equations, which leads to long time in simulating the large-scale fine neural network, and cannot realize the efficient simulation of the large-scale fine neural network, which greatly limits the research in related aspects. SUMMARY

[0004] Embodiments of the present application provide a fine neuron efficient simulation method and device based on tree structure division, computer equipment and storage medium. In order to have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This part is not a general review, nor is it intended to determine the key / important elements or describe the protection scope of these embodiments. The only purpose is to present some concepts in a simple form as a preface to the detailed description below.

[0005] In a first aspect, the embodiments of the present application provide a fine neuron efficient simulation method based on tree structure division, which comprises:

[0006] According to the fine neuron model to be calculated, a tree structure corresponding to neuron calculation is constructed;

[0007] A cost function is calculated, and a corresponding division model is constructed based on the cost function;

[0008] According to the division model, the tree structure is divided to obtain each branch sub-tree;

[0009] Each branch sub-tree is respectively allocated to a corresponding calculation unit for parallel simulation calculation processing, and simulation results are obtained;

[0010] The simulation results are pushed to a target user terminal device for display.

[0011] In a possible implementation, the constructing a tree structure corresponding to neuron calculation according to the fine neuron model to be calculated comprises:

[0012] Each calculation unit on the fine neuron model is corresponded to a node on the tree structure;

[0013] The cell body is taken as a root node, nodes having a front-back dependency relationship during calculation are taken as parent-child nodes, and the corresponding tree structure is sequentially constructed.

[0014] In a possible implementation, the dividing the tree structure according to the division model to obtain corresponding branch sub-trees comprises:

[0015] The division model corresponds to a division mode, that is, the tree structure is divided into multiple parts C(T) = {T root , T1, T2...T k}

[0016] The number of nodes of each part is {W(T root ), W(T1), W(T2)...W(T k )} respectively, where T root is a sub-tree containing a root node, T1, T2...T k are each branch obtained by division.

[0017] The tree structure is divided according to the division model to obtain corresponding branch sub-trees.

[0018] In a possible implementation, after the tree structure is divided according to the division model to obtain corresponding branch sub-trees, the method further comprises:

[0019] According to a first preset condition, each branch sub-tree is optimized to obtain an optimized each branch sub-tree.

[0020] In a possible implementation, before each branch sub-tree is optimized according to the first preset condition to obtain an optimized each branch sub-tree, the method further comprises:

[0021] The first preset condition is read, and the first preset condition comprises:

[0022] In the process of the triangularization, the calculation process of the root sub-tree can be performed only after the calculation process of each branch sub-tree is completed.

[0023] In the process of the back substitution, the calculation process of each branch sub-tree can be performed only after the calculation process of the root sub-tree is completed.

[0024] In a possible implementation, the method further includes:

[0025] The calculation cost after the neurons are divided is

[0026]

[0027] In a possible implementation, the constructing the division model based on the cost function includes:

[0028] A heuristic search is used to find a division such that the division result minimizes the value of the cost function under the premise of meeting a second preset condition; the second preset condition includes that there is no intersection between each branch sub-tree obtained by dividing the tree structure based on the division model obtained based on the initial division model.

[0029] In a second aspect, an embodiment of the present application provides an efficient simulation device of fine neurons based on tree structure division, and the device includes:

[0030] A tree structure constructing module is configured to construct a tree structure corresponding to neuron calculation according to a fine neuron model to be calculated.

[0031] A calculation module is configured to calculate a cost function.

[0032] A division model constructing module is configured to construct a division model based on the cost function calculated by the calculation module.

[0033] A division module is configured to divide the tree structure according to the division model constructed by the division model constructing module to obtain each branch sub-tree.

[0034] A simulation module is configured to assign each branch sub-tree obtained by the division model to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result.

[0035] A pushing and displaying module is configured to push the simulation result obtained by the simulation module to a target user terminal device for display.

[0036] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor to cause the processor to perform the method steps described above.

[0037] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer readable instructions, the computer readable instructions being executed by one or more processors to cause the one or more processors to perform the method steps described above.

[0038] The technical solutions provided by the embodiments of the present application can include the following beneficial effects:

[0039] In the embodiments of the present application, according to the fine neuron model to be calculated, a tree structure corresponding to neuron calculation is constructed; a cost function is calculated, and a corresponding division model is constructed based on the cost function; the tree structure is divided according to the division model to obtain each branch sub-tree; each branch sub-tree is respectively distributed to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result; and the simulation result is pushed to a target user terminal device for display. By using the simulation method provided by the embodiments of the present application, since the division model constructed based on the cost function is introduced, the tree structure is divided according to the division model to obtain each branch sub-tree; and each branch sub-tree is respectively distributed to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result; thus, based on the ability of parallel simulation calculation processing, the processing efficiency of simulation calculation processing is greatly improved, and the simulation result can be pushed to a target user terminal device for display, so that the simulation result is more intuitive and the user experience is improved.

[0040] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application.

[0042] Figure 1 is a flowchart of a fine neuron efficient simulation method based on tree structure division provided by an embodiment of the present application;

[0043] Figure 2 is a schematic diagram of constructing a tree structure corresponding to neuron calculation in a specific application scenario of an embodiment of the present application;

[0044] Figure 3 is a schematic diagram of dividing based on a cost function with a smaller cost in a specific application scenario of an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of different branch nodes in a specific application scenario of an embodiment of the present application being allocated to corresponding threads for parallel computing;

[0046] Figure 5 is a structural schematic diagram of an efficient simulation device of fine neurons based on tree structure partitioning provided by an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following description and drawings are sufficient to fully enable one skilled in the art to practice the present application.

[0048] It should be clear that the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0049] The optional embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0050] Please refer to Figure 1 is a flowchart of an efficient simulation method of fine neurons based on tree structure partitioning provided by an embodiment of the present application. As Figure 1 shown, the efficient simulation method of fine neurons based on tree structure partitioning of the present application can include the following steps:

[0051] S101, according to the fine neuron model to be calculated, constructing a tree structure corresponding to neuron calculation.

[0052] In one possible implementation, according to the fine neuron model to be calculated, constructing a tree structure corresponding to neuron calculation includes the following steps:

[0053] Corresponding each calculation unit on the fine neuron model to a node on the tree structure;

[0054] Taking the cell body as the root node, the nodes having a front-back dependency relationship during calculation are constructed into parent-child nodes, and the corresponding tree structure is sequentially constructed.

[0055] In one specific application scenario, the process of constructing a tree structure corresponding to neuron calculation is specifically as follows:

[0056] According to the basic theory of fine neuron modeling, a real biological neuron can be modeled by several interconnected computing units (compartments). In order to explore the parallelism in the calculation, a tree structure is first constructed according to the structure of the neuron. Each computing unit on the neuron model is corresponded to a node on the tree structure, with the cell body as the root node, and the nodes with sequential dependence relationship form parent and child nodes, and the corresponding tree structure is constructed. After the tree structure is formed, the calculation process can correspond to the tree structure, and there is no dependence relationship between the calculations of different branches, and parallelism can be performed. The overall process is as shown in Figure 2 .

[0057] S102, calculate the cost function, and construct the corresponding division model based on the cost function.

[0058] In a specific application scenario, the process of calculating the cost function and constructing the corresponding division model based on the cost function is as follows:

[0059] In the efficient parallel algorithm of single neuron, the most critical is how to obtain the optimal parallel division of the tree T constructed in S101. For the tree T=(V, E), if the division C divides it into several parts C(T)=(T root ,T1,T2…T k}, the number of nodes of each part is {W(T root ),W(T1),W(T2)…W(T k )}, where T root represents a subtree containing the root node, and T1, T2…T k represents each branch obtained by division. In order to ensure the correctness of the calculation result, the calculation between each subtree obtained by division needs to satisfy the following relationship: 1) In the triangulation process, the calculation of the root subtree can only be performed after all the calculations of the branch subtrees are completed; 2) In the back substitution process, the calculation of each branch subtree can only be performed after all the calculations of the root subtree are completed. Each branch subtree can be calculated in parallel, and therefore, the calculation cost of all branch subtrees is the number of nodes on the largest branch subtree The calculation of the root subtree is performed in series with all branch subtrees, and the calculation cost is W(T root ). The calculation cost required to complete the calculation of all nodes on the neuron is In order to improve the simulation efficiency, it is necessary to obtain the division C i (T) so as to make the calculation cost as small as possible.

[0060] In summary, the following model is established for the tree structure division corresponding to the fine neuron, that is, given a tree T corresponding to a fine neuron, a division C is obtained to minimize the calculation cost, and there is no intersection between the branch sub-trees obtained by the division (to ensure correct calculation, if there is an intersection between the branch sub-trees, the sub-trees cannot be calculated in parallel).

[0061]

[0062]

[0063] In a possible implementation, before constructing the corresponding division model based on the cost function, the simulation method provided by the embodiment of the application further includes the following steps:

[0064] The calculation cost under different application scenarios is determined, and is specifically as follows:

[0065] The calculation cost after the division of the neuron is

[0066]

[0067] In a possible implementation, constructing the corresponding division model based on the cost function includes the following steps:

[0068] A heuristic search method is used to find a division, so that the division result minimizes the value of the cost function under the premise of meeting the second preset condition;

[0069] The second preset condition includes that there is no intersection between each branch sub-tree obtained by the division model based on the initial division model for dividing the tree structure.

[0070] The above only lists the second preset condition in one application scenario, and the second preset condition for optimizing the initial division model can also be adjusted according to the needs of different application scenarios, which will not be described here.

[0071] S103, according to the division model, the tree structure is divided to obtain each branch sub-tree.

[0072] In a specific application scenario, the division process of the tree structure is specifically as follows:

[0073] For the modeling optimization target, the simulation method provided in the embodiments of the present application proposes a tree partition algorithm based on cut shift. For each fine neuron model that needs to be calculated, a partition with smaller calculation cost is obtained according to the tree structure constructed and the cost function in S102. The algorithm process is as follows: given a tree, initialize all partitions to the edge corresponding to the root node, then move the partitions to different branches of the tree according to a certain strategy through analysis of the neuron topology, forming different branch sub-trees. Finally, the optimal partition is selected according to the objective function. The specific details of the algorithm are as shown in Figure 3 The core idea is as follows: each time, move the partition to the sub-tree that can minimize the cost, and update the state of all nodes on the corresponding branch, so that when there is a partition on the branch, no other partition will be moved to the branch. Each time a new partition is generated, the calculation cost is obtained in the manner of S102, and the partition with the smallest calculation cost is taken as the final result.

[0074] In a possible implementation, according to the partition model, the tree structure is partitioned to obtain corresponding branch sub-trees.

[0075] The partition mode corresponding to the partition model is: the tree structure is partitioned into multiple parts C(T) = {T root , T1, T2...T k}

[0076] The number of nodes of each part is {W(T root ), W(T1), W(T2),... W(T k )}}, where T root is a sub-tree containing the root node, and T1, T2...T k are each branch obtained by partitioning;

[0077] According to the partition model, the tree structure is partitioned to obtain corresponding branch sub-trees.

[0078] In a possible implementation, after the tree structure is partitioned according to the partition model to obtain corresponding branch sub-trees, the simulation method provided in the embodiments of the present application further includes the following steps:

[0079] According to the first preset condition, the branch sub-trees are optimized to obtain optimized branch sub-trees.

[0080] In the embodiments of the present application, the first preset condition includes:

[0081] In the triangulation process, the calculation process of the root sub-tree can be performed only after each branch sub-tree completes the corresponding calculation process; and

[0082] In the back substitution process, the calculation process of each branch sub-tree can be performed only after the calculation process of the root sub-tree is completed.

[0083] The first preset condition is only listed in one application scenario, and the first preset condition for optimizing each branch sub-tree can be adjusted according to the requirements of different application scenarios, which will not be repeated here.

[0084] In a possible implementation, before each branch sub-tree is optimized according to the first preset condition to obtain the optimized each branch sub-tree, the simulation method provided by the embodiment of the application further includes the following steps:

[0085] The first preset condition is read, and the first preset condition includes:

[0086] In the triangularization process, the calculation process of the root sub-tree can be performed only after the calculation process of each branch sub-tree is completed.

[0087] In the back substitution process, the calculation process of each branch sub-tree can be performed only after the calculation process of the root sub-tree is completed.

[0088] The first preset condition is only listed in one application scenario, and the first preset condition for optimizing each branch sub-tree can be adjusted according to the requirements of different application scenarios, which will not be repeated here.

[0089] S104, each branch sub-tree is respectively distributed to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result.

[0090] In a specific application scenario, the parallel simulation calculation process is as follows:

[0091] The sub-trees divided in S103 are distributed to different calculation units for simulation calculation. First, each branch node is distributed to different threads. For different nodes on the same branch, the calculation order of the nodes on the corresponding thread is determined according to the dependency relationship during calculation, and the calculation order is marked. All nodes are arranged in the correct order. After the distribution of each branch node is completed, the root node branch is distributed to the thread containing the most nodes to ensure that the calculation of each branch and the root sub-tree can be performed in the correct order. During calculation, each thread performs calculation according to the calculation order mark of the nodes it is responsible for. In this way, parallel calculation of nodes in each branch can be realized. After each thread completes the calculation of the current node, synchronization is required to ensure that all nodes perform the calculation of the next node at the same time, so as to ensure the accuracy of the result. Figure 4 The above process is shown, in which different branch nodes are distributed to corresponding threads for parallel calculation.

[0092] In the embodiments of the present application, each branch sub-tree is respectively allocated to a corresponding calculation unit for parallel simulation calculation processing, and based on the fact that each branch sub-tree can be subjected to parallel simulation calculation processing, the processing efficiency of simulation calculation processing is greatly improved.

[0093] In S105, the simulation result is pushed to a target user terminal device for display.

[0094] In the embodiments of the present application, the simulation result can also be displayed in the form of intuitive charts, so that the simulation result is more intuitive, thereby improving the user experience.

[0095] In the embodiments of the present application, according to the fine neuron model to be calculated, a tree structure corresponding to neuron calculation is constructed; a cost function is calculated, and a corresponding division model is constructed based on the cost function; the tree structure is divided according to the division model to obtain each branch sub-tree; each branch sub-tree is respectively allocated to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result; and the simulation result is pushed to a target user terminal device for display. By using the simulation method provided in the embodiments of the present application, since the division model constructed based on the cost function is introduced, the tree structure is divided according to the division model to obtain each branch sub-tree; and each branch sub-tree is respectively allocated to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result; based on the fact that parallel simulation calculation processing can be performed, the processing efficiency of simulation calculation processing is greatly improved, and the simulation result can also be pushed to a target user terminal device for display, so that the simulation result is more intuitive and the user experience is improved.

[0096] The following is an embodiment of the present application, which is a fine neuron efficient simulation device based on tree structure division. The details of the fine neuron efficient simulation device based on tree structure division are not disclosed in the embodiments of the present application, and please refer to the fine neuron efficient simulation method based on tree structure division.

[0097] Please refer to Figure 5 which shows a structure schematic diagram of the fine neuron efficient simulation device based on tree structure division provided in an exemplary embodiment of the present application. The fine neuron efficient simulation device based on tree structure division can be realized by software, hardware or a combination of both to become all or part of a terminal. The fine neuron efficient simulation device based on tree structure division includes a tree structure construction module 10, a calculation module 20, a division model construction module 30, a division module 40, a simulation module 50 and a pushing and display module 60.

[0098] Specifically, the tree structure construction module 10 is configured to construct a tree structure corresponding to the fine neuron model to be calculated;

[0099] The calculation module 20 is configured to calculate the cost function;

[0100] The partition model construction module 30 is configured to construct a corresponding partition model based on the cost function calculated by the calculation module 20;

[0101] The partition module 40 is configured to partition the tree structure according to the partition model constructed by the partition model construction module 30 to obtain each branch sub-tree;

[0102] The simulation module 50 is configured to respectively assign each branch sub-tree obtained by partitioning the partition model to a corresponding calculation unit for parallel simulation calculation processing to obtain a simulation result;

[0103] The pushing and displaying module 60 is configured to push the simulation result obtained by the simulation module 50 to a target user terminal device for display.

[0104] Optionally, the tree structure construction module 10 is specifically configured to:

[0105] correspond each calculation unit on the fine neuron model to a node on the tree structure;

[0106] take the cell body as a root node, construct parent and child nodes by nodes having a front-back dependency relationship during calculation, and sequentially construct the corresponding tree structure.

[0107] Optionally, the partition module 40 is specifically configured to:

[0108] The partition model corresponds to a partition mode of: dividing the tree structure into multiple parts C(T)={T root , T1, T2...T k}

[0109] The number of nodes of each part is {W(T root ), W(T1), W(T2)...W(T k )} respectively, wherein T root is a sub-tree containing the root node, T1, T2...T k are each branch obtained by partitioning;

[0110] According to the partition model, the tree structure is partitioned to obtain corresponding each branch sub-tree.

[0111] Optionally, the apparatus further comprises:

[0112] an optimization module (in Figure 5(Not shown in the image) is used to divide the tree structure according to the division model in the partitioning module 40, obtain the corresponding branch subtrees, and then optimize each branch subtree according to the first preset condition to obtain the optimized branch subtrees.

[0113] Optionally, the device further includes:

[0114] Read module (in) Figure 5 (Not shown in the image) is used to read the first preset conditions before the optimization module optimizes each branch subtree according to the first preset conditions to obtain the optimized branch subtrees. The first preset conditions read by the reading module include: in the triangulation process, the root subtree can only be calculated after each branch subtree has completed its corresponding calculation process; and in the back-substitution process, the calculation process of each branch subtree can only be performed after the root subtree has been calculated.

[0115] Optionally, the computational cost after dividing the neurons is

[0116]

[0117] Optionally, the partitioned model building module 30 is specifically used for:

[0118] A heuristic search is used to find a partition that minimizes the value of the cost function while meeting a second preset condition.

[0119] The second precondition includes: there is no overlap between the subtrees of each branch obtained by dividing the tree structure based on the initial partitioning model.

[0120] It should be noted that the tree-structure-based high-efficiency simulation device for fine-grained neurons provided in the above embodiments is only illustrated by the division of the functional modules described above when executing the tree-structure-based high-efficiency simulation method for fine-grained neurons. In practical applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the tree-structure-based high-efficiency simulation device for fine-grained neurons provided in the above embodiments and the tree-structure-based high-efficiency simulation method embodiments belong to the same concept, and the implementation process is detailed in the tree-structure-based high-efficiency simulation method embodiments, which will not be repeated here.

[0121] In the embodiment of the present application, the tree structure construction module is configured to construct a tree structure corresponding to neuron computation according to a fine neuron model to be calculated; the computation module is configured to calculate a cost function; the partition model construction module is configured to construct a corresponding partition model based on the cost function calculated by the computation module; the partition module is configured to partition the tree structure according to the partition model constructed by the partition model construction module to obtain each branch sub-tree; the simulation module is configured to respectively distribute each branch sub-tree obtained by the partition model to a corresponding calculation unit for parallel simulation computation processing to obtain a simulation result; and the pushing and displaying module is configured to push the simulation result obtained by the simulation module to a target user terminal device for display. The simulation device provided by the embodiment of the present application has the following advantages: the partition model based on the cost function is introduced, the tree structure is partitioned according to the partition model to obtain each branch sub-tree, and each branch sub-tree is respectively distributed to a corresponding calculation unit for parallel simulation computation processing to obtain a simulation result. The simulation device provided by the embodiment of the present application fully utilizes the parallel computation architecture for simulation computation, and greatly improves the processing efficiency of simulation computation processing.

[0122] In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program: constructing a tree structure corresponding to neuron computation according to a fine neuron model to be calculated; calculating a cost function and constructing a corresponding partition model based on the cost function; partitioning the tree structure according to the partition model to obtain each branch sub-tree; respectively distributing each branch sub-tree to a corresponding calculation unit for parallel simulation computation processing to obtain a simulation result; and pushing the simulation result to a target user terminal device for display.

[0123] In one embodiment, a storage medium having computer readable instructions is provided, and the computer readable instructions are executed by one or more processors to cause the one or more processors to perform the following steps: constructing a tree structure corresponding to neuron computation according to a fine neuron model to be calculated; calculating a cost function and constructing a corresponding partition model based on the cost function; partitioning the tree structure according to the partition model to obtain each branch sub-tree; respectively distributing each branch sub-tree to a corresponding calculation unit for parallel simulation computation processing to obtain a simulation result; and pushing the simulation result to a target user terminal device for display.

[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiment methods. The storage medium can be a non-volatile storage medium such as a magnetic disc, an optical disc, a read-only memory (ROM), or a random access memory (RAM).

[0125] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the description.

[0126] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A high-efficiency simulation method for fine-grained neurons based on tree structure partitioning, characterized in that, The method includes: Based on the fine neuron model to be computed, a tree structure corresponding to the computation of biological neurons is constructed; with the cell body as the root node, nodes with sequential dependencies during computation are used as parent and child nodes, and the corresponding tree structure is constructed in sequence. Calculate the cost function and construct the corresponding partitioning model based on the cost function; According to the partitioning model, the tree structure is divided into various branch subtrees; the computation of different branch subtrees is independent of each other, allowing parallel computation; Each branch subtree is assigned to a corresponding computing unit for parallel simulation processing to obtain simulation results, which are then pushed to the target user terminal device for display. The step of constructing a corresponding partitioning model based on the cost function includes: using a heuristic search to find a partition that minimizes the value of the cost function while meeting a second preset condition; the second preset condition includes: there is no intersection between the subtrees of each branch obtained by partitioning the tree structure based on the partitioning model obtained from the initial partitioning model; After dividing the tree structure according to the partitioning model to obtain the corresponding branch subtrees, the method further includes: optimizing each branch subtree according to a first preset condition to obtain optimized branch subtrees; Before optimizing each branch subtree according to the first preset condition to obtain the optimized branch subtrees, the method further includes: reading the first preset condition, the first preset condition including: in the triangulation process, the root subtree can only be calculated after each branch subtree has completed its corresponding calculation process; and in the back-substitution process, the branch subtree can only be calculated after the root subtree has been calculated.

2. The method according to claim 1, characterized in that, The process of constructing the tree structure corresponding to the biological neuron computation based on the fine neuron model to be computed includes: Each computational unit in the fine neuron model is mapped to a node in the tree structure.

3. The method according to claim 1, characterized in that, The step of dividing the tree structure according to the partitioning model to obtain the corresponding branch subtrees includes: The partitioning model corresponds to the partitioning method of dividing the tree structure into multiple parts. , The number of nodes in each part are respectively ,in, For the subtree containing the root node, The resulting branches; Based on the partitioning model, the tree structure is divided to obtain the corresponding branch subtrees.

4. The method according to claim 1, characterized in that, The method further includes: The computational cost after dividing biological neurons is .

5. A high-efficiency simulation device for fine-grained neurons based on tree structure partitioning, characterized in that, The device includes: The tree structure building module is used to construct the tree structure corresponding to the biological neuron computation based on the fine neuron model to be computed; The calculation module is used to calculate the cost function; The partitioning model construction module is used to construct the corresponding partitioning model based on the cost function calculated by the calculation module; taking the cell body as the root node, nodes with sequential dependencies during calculation are used as parent and child nodes to form the corresponding tree structure. The partitioning module is used to partition the tree structure according to the partitioning model constructed by the partitioning model construction module to obtain various branch subtrees; the calculations of different branch subtrees are independent of each other, allowing parallel calculations; The simulation module is used to assign each branch subtree obtained by the partitioning model to the corresponding computing unit for parallel simulation computing processing to obtain simulation results; The push and display module is used to push the simulation results obtained by the simulation module to the target user terminal device for display. The partitioning model construction module is further used to find a partition using a heuristic search method, such that the partitioning result minimizes the value of the cost function under the premise of meeting a second preset condition; the second preset condition includes: there is no intersection between the subtrees of each branch obtained by partitioning the tree structure based on the partitioning model obtained from the initial partitioning model; The device further includes: an optimization module, used to optimize each branch subtree according to a first preset condition to obtain optimized branch subtrees; The reading module is used to read the first preset conditions, which include: during the triangulation process, the root subtree can only be calculated after each branch subtree has completed its corresponding calculation process; and during the back-substitution process, the calculation process of each branch subtree can only be performed after the calculation process of the root subtree has been completed.

6. A computer device comprising a memory and a processor, the memory storing computer-readable instructions which, when executed by the processor, cause the processor to perform the steps of the simulation method as claimed in any one of claims 1 to 4.

7. A storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the simulation method as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Large-scale sparse symmetric linear equation set parallel processing method based on elimination tree

    CN110162736A

  • Video data encoding method and device, computer equipment and storage medium

    CN111901602A