Parallel computing optimization control system for live-action three-dimensional model
By designing a parallel computing optimization control system in real-life three-dimensional model processing, using multi-node clustering and dynamic scheduling technology, the problem of computing bottlenecks in massive three-dimensional model data processing is solved, and efficient parallel processing and real-time load balancing are achieved.
Patent Information
- Application Number
- CN202411877290.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
AI Technical Summary
The existing technology faces calculation bottlenecks when processing massive three-dimensional model data, especially in model optimization, texture mapping, detail recovery and topological repair. The calculation efficiency of traditional algorithms is low and difficult to meet the needs of real-time processing.
A parallel computing optimization control system for real-life three-dimensional models is designed. By building a multi-node cluster architecture, data partitioning and task division technology are used to effectively divide tasks in the three-dimensional model, and through task allocation, priority division and dynamic scheduling technology, tasks are scheduled dynamically based on the performance of the computing node and real-time load.
It realizes efficient parallel processing and adaptive load balancing of massive three-dimensional data, effectively improves processing efficiency and accuracy, solves the calculation bottleneck problems faced by stand-alone processing methods, and meets the needs of real-time processing.
Smart Images

Figure CN119806831A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of parallel computing technology, and more specifically, to a parallel computing optimization control system for real-scene three-dimensional models. Background Art
[0002] With the development of remote sensing technology, LiDAR, drone photogrammetry and other technologies, the generation of real-life 3D tilted models has been widely used in urban planning, building modeling, traffic monitoring, disaster assessment and other fields; these 3D models usually contain a large amount of point cloud data, texture images and complex geometric structures, with huge data scale and high precision requirements; however, the existing single-machine processing methods face serious computing bottlenecks when processing massive data, especially in model optimization, texture mapping, detail recovery and topology repair. The computational efficiency of traditional algorithms is low and it is difficult to meet the needs of real-time processing; therefore, how to achieve efficient and accurate model optimization processing under massive data has become a technical problem that needs to be solved urgently in the field of 3D modeling.
[0003] The patent with publication number CN111858058A discloses a SGD load balancing method, device and storage medium based on parallel computing; including: realizing distributed parallel GPU computing based on a design pattern combining model parallelism and data parallelism; using a semaphore mechanism to realize synchronous communication between the master node and the child nodes, and using a stochastic gradient descent algorithm in the child container to update the weight; the master node constructs a minimum spanning tree for the weight based on the error in the child node control table, finds the key nodes in the graph nodes, eliminates irrelevant nodes in order, and reallocates its hardware resources; realizes that multiple model copies simultaneously process different subsets of training samples, periodically interacts and merges the model copies, and optimizes the distributed algorithm; this invention realizes load balancing computing, improves model development efficiency and reduces development costs;
[0004] However, although the above-mentioned technology realizes efficient processing of data within the model through parallel computing, the load balancing method involved mainly relies on manual configuration and periodic resource recovery and allocation, which makes it difficult to efficiently manage massive computing nodes. Therefore, it is only suitable for small-scale clusters or simple computing tasks. As the scale of computing clusters expands and the complexity of tasks increases, it will lead to problems such as low degree of automation, inflexible resource scheduling, and poor scalability.
[0005] In view of this, the present invention proposes a parallel computing optimization control system for a real-scene three-dimensional model to solve the above-mentioned problem. Summary of the invention
[0006] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: a parallel computing optimization control system for a real-scene three-dimensional model, comprising:
[0007] Architecture building module, used to build multi-node clusters;
[0008] A data acquisition module, used for acquiring three-dimensional data;
[0009] A data partitioning module is used to partition the three-dimensional data and obtain n regions;
[0010] The task division module is used to divide the tasks corresponding to each area and obtain m subtasks;
[0011] A task allocation module is used to allocate m subtasks to computing nodes in a multi-node cluster;
[0012] Priority division module, used to prioritize m subtasks;
[0013] The task scheduling module is used to collect the real-time load of each computing node and dynamically schedule subtasks based on the real-time load and priority.
[0014] Further, the multi-node cluster includes storage nodes, computing nodes and management nodes; the three-dimensional data is a data set representing a real-world scene;
[0015] The step of obtaining n regions comprises:
[0016] Step A1: preset voxel size and number thresholds;
[0017] Step A2: using a data association method to associate the point cloud data in the three-dimensional data with the remaining data in the three-dimensional data; obtaining a coordinate range, a horizontal coordinate range, a vertical coordinate range and a depth coordinate range according to the point cloud data in the three-dimensional data; defining an initial cube according to the coordinate range, and using the initial cube as a root node;
[0018] Step A3: Divide each root node into eight child nodes, divide each child node into voxel units according to the voxel size, and count the number of voxel units a of each child node;
[0019] Step A4: compare the quantity threshold a′ with the number of voxel units a; if a′<a, each child node is taken as a parent node and return to step A3; if a′≥a, proceed to step A5;
[0020] Step A5: Map the three-dimensional data to the corresponding voxel unit, obtain all child nodes, and obtain n regions according to the child nodes, where n is an integer greater than 1, and the regions correspond to the child nodes one by one.
[0021] Furthermore, the method for obtaining m subtasks includes:
[0022] Input the three-dimensional data corresponding to each area into the trained task analysis model respectively, and predict the set label corresponding to each area. The set label is the digital label corresponding to the task set, and the digital labels corresponding to different task sets are different; according to the set label, obtain the task set corresponding to each area; the task set includes multiple tasks corresponding to the three-dimensional data in the area; according to the predefined division rule, divide each task in the task set corresponding to each area to obtain M subtasks;
[0023] Obtain the three-dimensional data corresponding to each subtask and mark it as calculation data; set different digital labels for different subtasks and mark them as task labels; use the calculation data and task labels corresponding to each subtask as a set of analysis data, and the analysis data corresponds to the subtask one by one; input the analysis data corresponding to each subtask into the trained resource prediction model to predict the calculation amount corresponding to each subtask;
[0024] Add the amount of calculation corresponding to each subtask in turn and divide it by M to obtain the mean value of the amount of calculation; subtract the mean value of the calculation from the amount of calculation corresponding to each subtask in turn to obtain the difference value of the calculation; add the squares of each difference value of the calculation in turn and divide it by M to obtain the variance of the calculation; take the square root of the variance of the calculation to obtain the standard deviation of the calculation; subtract twice the standard deviation of the calculation from the mean value of the calculation as the threshold value of the calculation; compare the amount of calculation corresponding to each subtask with the threshold value of the calculation, mark the subtask whose amount of calculation is less than the threshold value of the calculation as the task to be merged, and do not mark the subtask whose amount of calculation is greater than the threshold value of the calculation; add the amount of calculation of all the tasks to be merged in turn and divide it by the threshold value of the calculation to obtain the merged value; round up the merged value to obtain the number of merges; merge all the tasks to be merged according to the number of merges to obtain b merged tasks, where b is the number of merges; obtain m subtasks according to the subtasks not marked as tasks to be merged and the merged tasks, where m=MM′+b, and M′ is the number of tasks to be merged.
[0025] Furthermore, the training process of the task analysis model includes:
[0026] Collect z groups of three-dimensional data in advance, set corresponding set labels for the z groups of three-dimensional data, where z is an integer greater than 1, and convert the three-dimensional data and the corresponding set labels into a corresponding set of feature vectors; use each set of feature vectors as input to a task analysis model, and the task analysis model uses a set of predicted set labels corresponding to each group of three-dimensional data as output, and uses the actual set labels corresponding to each group of three-dimensional data as prediction targets, where the actual set labels are pre-set set labels corresponding to the three-dimensional data; minimize the sum of prediction errors of all three-dimensional data as a training target; train the task analysis model until the sum of prediction errors reaches convergence and stops training; the task analysis model is a deep neural network model;
[0027] The training process of the resource prediction model is consistent with that of the task analysis model, and both are deep neural network models.
[0028] Furthermore, the method for obtaining b merge tasks includes:
[0029] Construct b merge sets; randomly assign all tasks to be merged to d merge sets and use them as a merge method, obtaining a total of d′ merge methods. In the formula, d! is the factorial of d, is the number of combinations, Add the computational amount corresponding to each task to be merged in each merged set in turn to obtain the total computational amount corresponding to each merged set; subtract the computational amount threshold from the total computational amount corresponding to each merged set and take the absolute value to obtain the merged difference corresponding to each merged set; add the merged differences corresponding to each merging method in turn to obtain the total difference value corresponding to each merging method; sort all the total difference values from small to large, and mark the merging method corresponding to the front total difference value as the selected method; obtain b merged tasks according to the d merging sets corresponding to the selected method, b=d.
[0030] Furthermore, the step of allocating the m subtasks to computing nodes in the multi-node cluster includes:
[0031] Step B1: sort the m subtasks from large to small according to the computational loads corresponding to the m subtasks, and generate a subtask sorting table;
[0032] Step B2: Add up the computational load of the subtasks in each computing node, obtain the load corresponding to each computing node, and mark the computing node with the smallest load as the allocation node;
[0033] Step B3: According to the positive order of the subtask sorting table, obtain the subtask at the front and assign it to the assignment node, and delete the assigned subtask from the subtask sorting table;
[0034] Step B4: recalculate the load corresponding to each computing node and update the allocation node;
[0035] Step B5: loop steps B3 to B5 until there are no subtasks in the subtask sorting table. The loop ends and the m subtasks are all allocated to the computing nodes in the multi-node cluster.
[0036] Furthermore, the method for prioritizing the m subtasks includes:
[0037] Preset dependencies, where dependencies are states or conditions of mutual dependence between subtasks; construct a dependency graph corresponding to m subtasks based on the dependencies, where the dependency graph is a directed acyclic graph, i.e., there are directions in the dependency graph, but no loops; the dependency graph includes subtasks and directed edges, where directed edges point from one subtask to another; sort the m subtasks based on the dependency graph, and generate a priority table; set corresponding priorities for the m subtasks in descending order based on the positive order of the priority table, and the priority range is [1, m].
[0038] Furthermore, the step of generating a priority table includes:
[0039] Step C1: According to the dependency graph, count the number of times each subtask is pointed to and mark it as the number of incoming edges;
[0040] Step C2: Get the subtasks with 0 input edges and mark them as tasks to be executed; compare the computational amounts corresponding to all tasks to be executed, and mark the task to be executed with the largest computational amount as the execution task;
[0041] Step C3: Mark the subtasks connected to the execution task through directed edges as adjacent tasks, and reduce the number of incoming edges of all adjacent tasks by 1;
[0042] Step C4: Add the execution task to the queue and mark the execution task as completed;
[0043] Step C5: loop steps C2 to C4 until all subtasks in the queue are marked as completed tasks, then the loop ends; the queue is used as a priority sorting table.
[0044] Furthermore, the method for dynamically scheduling subtasks includes:
[0045] The load corresponding to each computing node is collected in real time and marked as real-time load; the computing performance corresponding to each computing node is obtained, and the real-time load of each computing node is divided by the corresponding computing performance to obtain the load index corresponding to each computing node;
[0046] Count the number of computing nodes and mark them as the number of nodes; add the load index of each computing node in turn and divide it by the number of nodes to obtain the load average; divide the load index of each computing node by the load average to obtain the load ratio corresponding to each computing node; subtract 1 from the load ratio of each computing node to obtain the judgment index corresponding to each computing node; preset the judgment standard, compare the judgment index of each computing node with the judgment standard, mark the computing node with a judgment index greater than the judgment standard as an overloaded node, and do not mark the computing node with a judgment index less than or equal to the judgment standard; use the exhaustive search method to obtain v scheduling schemes, calculate the scheduling index corresponding to each scheduling scheme, and take the scheduling scheme with the largest scheduling index as the best scheme; dynamically schedule the subtasks according to the best scheme.
[0047] Furthermore, the method for obtaining v scheduling schemes includes:
[0048] Preset the standard index, compare the judgment index of each computing node that is not marked as an overloaded node with the standard index; mark the computing nodes with a judgment index greater than the standard index as scheduling nodes, and do not mark the computing nodes with a judgment index less than or equal to the standard index; obtain the computing subtask corresponding to each scheduling node, and the computing subtask is the subtask being processed by the computing node; count the number of computing subtasks and mark them as the computing number; count the number of scheduling nodes and mark them as the scheduling number; randomly assign all computing subtasks to each scheduling node, and obtain v scheduling schemes, v = f g ; In the formula, f is the scheduling quantity and g is the calculation quantity;
[0049] The method for calculating the scheduling index corresponding to each scheduling scheme includes:
[0050] Calculate the judgment index corresponding to each scheduling node in each scheduling scheme and take the absolute value, marking it as the node index; subtract the judgment standard from each node index to obtain the load deviation corresponding to each scheduling node; add the load deviations corresponding to each scheduling scheme in sequence to obtain the total load deviation corresponding to each scheduling scheme; multiply the priority corresponding to each computing subtask in each scheduling node by the computing performance of the corresponding scheduling node, and add them in sequence to obtain the priority coefficient corresponding to each scheduling node; mark the scheduling node actually corresponding to the computing subtask as the actual node, and mark the scheduling node corresponding to the computing subtask in the scheduling scheme as the target node; analyze the computing subtask corresponding to each scheduling node in each scheduling scheme; if the actual node corresponding to the computing subtask and the target node are the same computing node, the corresponding computing subtask is not marked; if the actual node corresponding to the computing subtask and the target node are not the same computing node, the corresponding computing subtask is marked as a mobile subtask; count the number of mobile subtasks corresponding to each scheduling scheme and mark it as the number of moves; calculate the scheduling index corresponding to each scheduling scheme based on the total load deviation, priority coefficient and number of moves; the expression of the scheduling index is: Where dd is the scheduling index, yx is the priority coefficient, fp is the total load deviation, yc is the number of moves, ω1, ω2, ω3 are the preset weight coefficients, and u is the preset constant.
[0051] The technical effects and advantages of the parallel computing optimization control system for real-scene three-dimensional models of the present invention are as follows:
[0052] By building a multi-node cluster architecture and adopting technologies such as data partitioning and task division, the tasks in the real-life 3D model can be effectively divided; and by adopting technologies such as task allocation, priority division and dynamic scheduling, tasks can be dynamically scheduled according to the performance of the computing nodes and the real-time load; so as to make full use of distributed computing resources, efficient parallel processing and adaptive load balancing of massive 3D data can be achieved, thereby effectively improving processing efficiency and accuracy, and solving the computing bottleneck problem faced by single-machine processing methods; at the same time, through the automatic identification of deep learning technology and the optimization of merged sub-tasks, the computing efficiency and resource utilization of the system are further improved, meeting the needs of real-time processing, and providing an effective solution for the efficient modeling and processing of real-life 3D models. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 Schematic diagram of a parallel computing optimization control system for a real-scene three-dimensional model according to Embodiment 1 of the present invention;
[0054] Figure 2 This is a dependency diagram of Example 1 of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0056] Example 1
[0057] See also Figure 1 As shown, the parallel computing optimization control system for real-life three-dimensional models described in this embodiment includes an architecture building module, a data acquisition module, a data partitioning module, a task division module, a task allocation module, a priority division module and a task scheduling module; each module is connected by wired and / or wireless means to achieve data transmission between modules.
[0058] Architecture building module, used to build multi-node clusters.
[0059] A multi-node cluster includes storage nodes, computing nodes and management nodes; storage nodes are used to store three-dimensional data in real-life three-dimensional models; computing nodes are responsible for model processing and computing tasks, and each computing node independently processes three-dimensional data in a local area; management nodes are responsible for task scheduling, computing node coordination and merging of computing results to ensure efficient operation of the system; in a multi-node cluster, the connection between storage nodes, computing nodes and management nodes depends on the network architecture and communication protocols to ensure efficient execution of data flow, task scheduling and management operations.
[0060] The data acquisition module is used to acquire three-dimensional data.
[0061] Three-dimensional data is a data set that represents the spatial shape, appearance, position and other information of real-world scenes; three-dimensional data includes point cloud data (point cloud data is a set of three-dimensional coordinate points used to capture the collective shape of objects or scenes), mesh data (mesh data is composed of points, lines and surfaces and is used to represent the surface of three-dimensional objects), texture data (texture data is a two-dimensional image applied to the surface of real-life three-dimensional models to provide color, image and detail to enhance the visual realism of real-life three-dimensional models), geometric data (geometric data is geometric feature data, such as volume, surface area, side length, etc., used to analyze the physical properties of objects), etc.; three-dimensional data is obtained through real-life three-dimensional models.
[0062] The data partitioning module is used to partition the three-dimensional data and obtain n regions.
[0063] The steps to obtain n regions include:
[0064] Step A1: preset voxel size and quantity thresholds; the voxel size and quantity thresholds are preset by those skilled in the art according to the actual computing power of the computing node. The greater the actual computing power of the computing node, the more detailed the partitioning process, that is, the smaller the voxel size and quantity thresholds are. Conversely, the smaller the actual computing power of the computing node, the larger the voxel size and quantity thresholds are.
[0065] Step A2: using a data association method (such as a surface reconstruction method, a UV mapping method, etc.) to associate the point cloud data in the three-dimensional data with the remaining data in the three-dimensional data; obtaining a coordinate range, a horizontal coordinate range, a vertical coordinate range, and a depth coordinate range according to the point cloud data in the three-dimensional data; defining an initial cube according to the coordinate range, and using the initial cube as a root node;
[0066] Step A3: Divide each root node into eight child nodes, divide each child node into voxel units according to the voxel size, and count the number of voxel units a of each child node;
[0067] Step A4: compare the quantity threshold a′ with the number of voxel units a; if a′<a, each child node is taken as a parent node and return to step A3; if a′≥a, proceed to step A5;
[0068] Step A5: Map the three-dimensional data to the corresponding voxel unit, obtain all child nodes, and obtain n regions according to the child nodes, where n is an integer greater than 1, and the regions correspond to the child nodes one by one.
[0069] The task division module is used to divide the tasks corresponding to each area and obtain m subtasks.
[0070] Methods for obtaining m subtasks include:
[0071] The three-dimensional data corresponding to each area are respectively input into the trained task analysis model to predict the set label corresponding to each area. The set label is the digital label corresponding to the task set, and the digital labels corresponding to different task sets are different; according to the set label, the task set corresponding to each area is obtained; the task set includes multiple tasks corresponding to the three-dimensional data in the area, such as terrain analysis, texture repair, lighting calculation, etc.; according to the predefined division rules, each task in the task set corresponding to each area is divided to obtain M subtasks; the division rules are pre-defined by technical personnel in this field according to actual conditions, and the division rules are, for example: the terrain analysis task is divided into multiple subtasks such as elevation data processing, slope calculation, water flow path analysis, etc., the texture repair task is divided into multiple subtasks such as damaged area detection, texture repair, texture fusion, etc., and the lighting calculation task is divided into multiple subtasks such as shadow calculation, reflection calculation, refraction calculation, etc.
[0072] The training process of the task analysis model includes:
[0073] Collect z groups of three-dimensional data in advance, set corresponding set labels for all the z groups of three-dimensional data, where z is an integer greater than 1, and convert the three-dimensional data and the corresponding set labels into a corresponding set of feature vectors; the set labels corresponding to the three-dimensional data are collected by technicians in this field during the operation of the historical real-scene three-dimensional model, all the tasks are randomly combined, multiple task sets are constructed, and converted into corresponding set labels; collect z groups of three-dimensional data, analyze the set labels corresponding to each group of three-dimensional data in turn under the conditions of each group of three-dimensional data in combination with actual experience, and set corresponding set labels for the z groups of three-dimensional data in turn;
[0074] Each set of feature vectors is used as the input of the task analysis model. The task analysis model takes a set of predicted set labels corresponding to each set of three-dimensional data as output, and takes the actual set labels corresponding to each set of three-dimensional data as the prediction target. The actual set labels are the pre-set set labels corresponding to the three-dimensional data. The training goal is to minimize the sum of the prediction errors of all three-dimensional data. The calculation formula of the prediction error is: In the formula, is the prediction error, w is the group number of the feature vector corresponding to the three-dimensional data, is the predicted set label corresponding to the wth group of three-dimensional data, χ w is the actual set label corresponding to the wth group of three-dimensional data; the task analysis model is trained until the sum of the prediction errors reaches convergence and the training is stopped.
[0075] The above-mentioned task analysis model is specifically a deep neural network model; it includes an input layer, a hidden layer and an output layer; each hidden layer includes multiple neurons, each neuron is connected to the neurons in the next layer, and the connection contains weights, which determine the importance and influence of data transmission in the neural network; an activation function is applied to each neuron between the hidden layer and the output layer, and the activation function introduces nonlinearity, allowing the network to learn more complex patterns and features.
[0076] Obtain the three-dimensional data corresponding to each subtask and mark it as calculation data; set different digital labels for different subtasks and mark them as task labels; use the calculation data and task labels corresponding to each subtask as a set of analysis data, and the analysis data corresponds to the subtask one by one; input the analysis data corresponding to each subtask into the trained resource prediction model to predict the calculation amount corresponding to each subtask; the training process of the resource prediction model is consistent with the training process of the task analysis model, and both are deep neural network models;
[0077] Add the amount of calculation corresponding to each subtask in turn and divide it by M to obtain the mean value of the amount of calculation; subtract the mean value of the calculation from the amount of calculation corresponding to each subtask in turn to obtain the difference value of the calculation; add the squares of each difference value of the calculation in turn and divide it by M to obtain the variance of the calculation; take the square root of the variance of the calculation to obtain the standard deviation of the calculation; subtract twice the standard deviation of the calculation from the mean value of the calculation as the threshold value of the calculation; compare the amount of calculation corresponding to each subtask with the threshold value of the calculation, mark the subtask whose amount of calculation is less than the threshold value of the calculation as the task to be merged, and do not mark the subtask whose amount of calculation is greater than the threshold value of the calculation; add the amount of calculation of all the tasks to be merged in turn and divide it by the threshold value of the calculation to obtain the merged value; round up the merged value to obtain the number of merges; merge all the tasks to be merged according to the number of merges to obtain b merged tasks, where b is the number of merges; obtain m subtasks according to the subtasks not marked as tasks to be merged and the merged tasks, where m=MM′+b, and M′ is the number of tasks to be merged.
[0078] Methods for obtaining b merge tasks include:
[0079] Construct b merge sets; randomly assign all tasks to be merged to d merge sets and use them as a merge method, obtaining a total of d′ merge methods. In the formula, d! is the factorial of d, is the number of combinations, Add the computational amount corresponding to each task to be merged in each merged set in turn to obtain the total computational amount corresponding to each merged set; subtract the computational amount threshold from the total computational amount corresponding to each merged set and take the absolute value to obtain the merged difference corresponding to each merged set; add the merged differences corresponding to each merging method in turn to obtain the total difference value corresponding to each merging method; sort all the total difference values from small to large, and mark the merging method corresponding to the front total difference value as the selected method; obtain b merged tasks according to the d merging sets corresponding to the selected method, b=d.
[0080] A task allocation module is used to allocate m subtasks to computing nodes in a multi-node cluster;
[0081] The steps of allocating m subtasks to computing nodes in a multi-node cluster include:
[0082] Step B1: sort the m subtasks from large to small according to the computational loads corresponding to the m subtasks, and generate a subtask sorting table;
[0083] Step B2: Add up the computational load of the subtasks in each computing node, obtain the load corresponding to each computing node, and mark the computing node with the smallest load as the allocation node;
[0084] Step B3: According to the positive order of the subtask sorting table, obtain the subtask at the front and assign it to the assignment node, and delete the assigned subtask from the subtask sorting table;
[0085] Step B4: recalculate the load corresponding to each computing node and update the allocation node;
[0086] Step B5: loop steps B3 to B5 until there are no subtasks in the subtask sorting table. The loop ends and the m subtasks are all allocated to the computing nodes in the multi-node cluster.
[0087] Priority division module, used to prioritize m subtasks;
[0088] Methods for prioritizing m subtasks include:
[0089] Preset dependency, dependency is the state or condition of mutual dependence between subtasks, usually indicating that the completion of one subtask requires the prior completion of another subtask; the dependency is pre-set by technical personnel in this field according to actual conditions; dependency examples: terrain analysis affects texture repair and lighting calculation, texture repair also affects lighting calculation, so it is necessary to perform terrain analysis first, then texture repair, and finally lighting calculation, that is, lighting calculation depends on terrain analysis and texture repair, and texture repair depends on terrain analysis; in texture repair tasks, it is necessary to first perform damaged area detection, then texture repair, and finally texture fusion, so texture repair depends on damaged area detection, and texture fusion depends on texture repair;
[0090] According to the dependency relationship, a dependency graph corresponding to the m subtasks is constructed. The dependency graph is a directed acyclic graph, that is, there is a direction in the dependency graph, but there is no loop; the dependency graph includes subtasks and directed edges, and the directed edge points from one subtask to another subtask, where the pointed subtask can only be completed after the pointed subtask is completed; the dependency graph is as follows Figure 2 As shown in the figure, A, B, C, D, and E are all subtasks, and the dependency relationship in the figure is: complete subtask A first, then complete subtasks B and C, then complete subtask E, and finally complete subtask D; among them, for subtasks A and B, subtask A is the pointed subtask, and subtask B is the pointed subtask; according to the dependency graph, the m subtasks are sorted to generate a priority sorting table; according to the positive order of the priority sorting table, the corresponding priorities of the m subtasks are set in descending order, and the priority range is [1, m]; to ensure that the dependency relationship is followed when the subtasks are executed, so as to reasonably arrange the execution order of the subtasks.
[0091] The steps to generate a prioritization list include:
[0092] Step C1: According to the dependency graph, count the number of times each subtask is pointed to and mark it as the number of incoming edges;
[0093] Step C2: Get the subtasks with 0 input edges and mark them as tasks to be executed; compare the computational amounts corresponding to all tasks to be executed, and mark the task to be executed with the largest computational amount as the execution task;
[0094] Step C3: Mark the subtasks connected to the execution task through directed edges as adjacent tasks, and reduce the number of incoming edges of all adjacent tasks by 1;
[0095] Step C4: Add the execution task to the queue and mark the execution task as completed;
[0096] Step C5: loop steps C2 to C4 until all subtasks in the queue are marked as completed tasks, then the loop ends; the queue is used as a priority sorting table.
[0097] The task scheduling module is used to collect the real-time load of each computing node and dynamically schedule subtasks based on the real-time load and priority.
[0098] Methods for dynamically scheduling subtasks include:
[0099] The load corresponding to each computing node is collected in real time and marked as the real-time load; the computing performance corresponding to each computing node is obtained, and the real-time load of each computing node is divided by the corresponding computing performance to obtain the load index corresponding to each computing node; it should be noted that the computing performance is determined by technicians in this field during the operation of the historical real-scene three-dimensional model. P identical subtasks are assigned to each computing node, where p is an integer greater than 1; the time corresponding to each computing node completing each subtask is counted and marked as the processing time; each processing time of each computing node is divided by the computing amount of the corresponding subtask to obtain the processing efficiency corresponding to each computing node; the processing efficiency corresponding to each computing node is added up in turn and then divided by p to obtain the computing performance corresponding to each computing node;
[0100] Count the number of computing nodes and mark them as the number of nodes; add the load index of each computing node in turn and divide it by the number of nodes to obtain the load average; divide the load index of each computing node by the load average to obtain the load ratio corresponding to each computing node; subtract 1 from the load ratio of each computing node to obtain the judgment index corresponding to each computing node; preset the judgment standard, which is pre-set by technical personnel in this field according to actual conditions; compare the judgment index of each computing node with the judgment standard, mark the computing node with a judgment index greater than the judgment standard as an overloaded node, and do not mark the computing node with a judgment index less than or equal to the judgment standard; use the exhaustive search method to obtain v scheduling schemes, calculate the scheduling index corresponding to each scheduling scheme, and take the scheduling scheme with the largest scheduling index as the best scheme; dynamically schedule the subtasks according to the best scheme.
[0101] Methods for obtaining v scheduling solutions include:
[0102] Preset a standard index, which is pre-set by technicians in this field according to actual conditions; compare the judgment index of each computing node that is not marked as an overloaded node with the standard index; mark the computing node with a judgment index greater than the standard index as a scheduling node, and do not mark the computing node with a judgment index less than or equal to the standard index; obtain the computing subtask corresponding to each scheduling node, and the computing subtask is the subtask being processed by the computing node; count the number of computing subtasks and mark them as the computing number; count the number of scheduling nodes and mark them as the scheduling number; randomly assign all computing subtasks to each scheduling node to obtain v scheduling schemes, v=f g ; In the formula, f is the scheduling quantity and g is the calculation quantity.
[0103] The method for calculating the scheduling index corresponding to each scheduling scheme includes:
[0104] Calculate the judgment index corresponding to each scheduling node in each scheduling scheme and take the absolute value, marked as the node index; subtract the judgment standard from each node index to obtain the load deviation corresponding to each scheduling node; add the load deviations corresponding to each scheduling scheme in turn to obtain the total load deviation corresponding to each scheduling scheme; multiply the priority corresponding to each computing subtask in each scheduling node by the computing performance of the corresponding scheduling node, and add them in turn to obtain the priority index corresponding to each scheduling node; add the priority index corresponding to each scheduling scheme in turn, and then divide it by the scheduling quantity to obtain the priority coefficient corresponding to each scheduling scheme; calculate the scheduling node actually corresponding to the subtask Mark as the actual node, and mark the scheduling node corresponding to the computing subtask in the scheduling scheme as the target node; analyze the computing subtask corresponding to each scheduling node in each scheduling scheme; if the actual node and the target node corresponding to the computing subtask are the same computing node, then do not mark the corresponding computing subtask; if the actual node and the target node corresponding to the computing subtask are not the same computing node, then mark the corresponding computing subtask as a mobile subtask; count the number of mobile subtasks corresponding to each scheduling scheme and mark it as the number of moves; calculate the scheduling index corresponding to each scheduling scheme according to the total load deviation, priority coefficient and number of moves; the expression of the scheduling index is: Where dd is the scheduling index, yx is the priority coefficient, fp is the total load deviation, yc is the number of moves, ω1, ω2, ω3 are the preset weight coefficients, and u is the preset constant.
[0105] The specific values of the weight coefficient and constant in the formula can be set according to actual conditions. The weight coefficient and constant reflect the influence of the total load deviation, priority coefficient and number of moves on the scheduling index. Technical personnel in this field can preset the corresponding weight coefficient and constant according to the actual influence of the total load deviation, priority coefficient and number of moves on the scheduling index, so as to accurately determine the load balancing effect of different scheduling schemes.
[0106] It should be understood that the total load deviation, priority coefficient and number of moves are all influencing factors of the scheduling index; among them, the larger the total load deviation, the more unbalanced the load between different scheduling nodes is after the corresponding scheduling scheme is used for subtask scheduling, which leads to a waste of computing node resources and reduced system stability, indicating that the load balancing effect of the scheduling scheme is poor, so the scheduling index is smaller, and vice versa; the larger the priority coefficient, the more subtasks with large computational volume are scheduled to scheduling nodes with better computing performance after the corresponding scheduling scheme is used for subtask scheduling, thereby improving the processing speed of subtasks and optimizing resource utilization, indicating that the load balancing effect of the scheduling scheme is better, so the larger the scheduling index is, and vice versa; the larger the number of moves, the more subtasks are scheduled after the corresponding scheduling task is used for subtask scheduling, resulting in an increase in scheduling overhead, that is, consuming more computing resources and reducing system efficiency, indicating that the load balancing effect of the scheduling scheme is poor, so the scheduling index is smaller, and vice versa; since the scheduling index is only a numerical parameter for evaluating the pros and cons of the scheduling scheme, the calculation of the scheduling index is dimensionless calculation to eliminate the influence between different dimensions.
[0107] This embodiment builds a multi-node cluster architecture and adopts technologies such as data partitioning and task division to effectively divide the tasks in the real-life three-dimensional model; and adopts technologies such as task allocation, priority division and dynamic scheduling to dynamically schedule tasks according to the performance of the computing nodes and the real-time load; so as to make full use of distributed computing resources to achieve efficient parallel processing and adaptive load balancing of massive three-dimensional data, thereby effectively improving processing efficiency and accuracy, and solving the computing bottleneck problem faced by the single-machine processing method; at the same time, through the automatic identification of deep learning technology and the optimization of merging sub-tasks, the computing efficiency and resource utilization of the system are further improved, meeting the needs of real-time processing, and providing an effective solution for the efficient modeling and processing of real-life three-dimensional models.
[0108] Example 2
[0109] The present application also provides an electronic device. The electronic device may include one or more processors and one or more memories. The memories store computer-readable codes, and when the computer-readable codes are executed by the one or more processors, they may execute a parallel computing optimization control system for a real-scene three-dimensional model as described above.
[0110] The method or system according to the implementation mode of the present application can also be implemented with the help of the architecture of the electronic device shown in the present application. The electronic device may include a bus, one or more CPUs, ROM, RAM, a communication port connected to a network, input / output, a hard disk, etc. A storage device in the electronic device, such as a ROM or a hard disk, can store a parallel computing optimization control system for a real-life three-dimensional model provided in the present application. Furthermore, the electronic device may also include a user interface. Of course, the architecture shown in the present application is only exemplary. When implementing different devices, one or more components in the electronic device shown in the present application may be omitted according to actual needs.
[0111] Example 3
[0112] One embodiment of the present application discloses a computer-readable storage medium. Computer-readable instructions are stored on the computer-readable storage medium. When the computer-readable instructions are executed by the processor, a parallel computing optimization control system for a real-life three-dimensional model according to an embodiment of the present application described with reference to the above figures can be executed. The storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0113] In addition, according to the implementation of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, which stores machine-readable instructions, and the machine-readable instructions can be executed by a processor to execute instructions corresponding to the method steps provided by the present application, for example: a parallel computing optimization control system for a real-life three-dimensional model. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed.
[0114] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0115] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A parallel computing optimization control system for a real-life three-dimensional model, characterized in that: include: Architecture building module, used to build multi-node clusters; A data acquisition module, used for acquiring three-dimensional data; A data partitioning module is used to partition the three-dimensional data and obtain n regions; The task division module is used to divide the tasks corresponding to each area and obtain m subtasks; A task allocation module is used to allocate m subtasks to computing nodes in a multi-node cluster; Priority division module, used to prioritize m subtasks; The task scheduling module is used to collect the real-time load of each computing node and dynamically schedule subtasks based on the real-time load and priority.
2. A parallel computing optimization control system for a real-scene three-dimensional model according to claim 1, characterized in that: The multi-node cluster includes storage nodes, computing nodes, and management nodes; The three-dimensional data is a data set representing a real-world scene; The step of obtaining n regions comprises: Step A1: preset voxel size and number thresholds; Step A2: using a data association method to associate the point cloud data in the three-dimensional data with the remaining data in the three-dimensional data; obtaining a coordinate range, a horizontal coordinate range, a vertical coordinate range and a depth coordinate range according to the point cloud data in the three-dimensional data; defining an initial cube according to the coordinate range, and using the initial cube as a root node; Step A3: Divide each root node into eight child nodes, divide each child node into voxel units according to the voxel size, and count the number of voxel units a of each child node; Step A4: compare the quantity threshold a′ with the number of voxel units a; if a′<a, each child node is taken as a parent node and return to step A3; if a′≥a, proceed to step A5; Step A5: Map the three-dimensional data to the corresponding voxel unit, obtain all child nodes, and obtain n regions according to the child nodes, where n is an integer greater than 1, and the regions correspond to the child nodes one by one.
3. A parallel computing optimization control system for a real-scene three-dimensional model according to claim 2, characterized in that: The method for obtaining m subtasks includes: Input the three-dimensional data corresponding to each area into the trained task analysis model respectively, and predict the set label corresponding to each area. The set label is the digital label corresponding to the task set, and the digital labels corresponding to different task sets are different; according to the set label, obtain the task set corresponding to each area; the task set includes multiple tasks corresponding to the three-dimensional data in the area; according to the predefined division rule, divide each task in the task set corresponding to each area to obtain M subtasks; Obtain the three-dimensional data corresponding to each subtask and mark it as calculation data; set different digital labels for different subtasks and mark them as task labels; use the calculation data and task labels corresponding to each subtask as a set of analysis data, and the analysis data corresponds to the subtask one by one; input the analysis data corresponding to each subtask into the trained resource prediction model to predict the calculation amount corresponding to each subtask; Add the amount of calculation corresponding to each subtask in turn and divide it by M to obtain the mean value of the amount of calculation; subtract the mean value of the calculation from the amount of calculation corresponding to each subtask in turn to obtain the difference value of the calculation; add the squares of each difference value of the calculation in turn and divide it by M to obtain the variance of the calculation; take the square root of the variance of the calculation to obtain the standard deviation of the calculation; subtract twice the standard deviation of the calculation from the mean value of the calculation as the threshold value of the calculation; compare the amount of calculation corresponding to each subtask with the threshold value of the calculation, mark the subtask whose amount of calculation is less than the threshold value of the calculation as the task to be merged, and do not mark the subtask whose amount of calculation is greater than the threshold value of the calculation; add the amount of calculation of all the tasks to be merged in turn and divide it by the threshold value of the calculation to obtain the merged value; round up the merged value to obtain the number of merges; merge all the tasks to be merged according to the number of merges to obtain b merged tasks, where b is the number of merges; obtain m subtasks according to the subtasks not marked as tasks to be merged and the merged tasks, where m=MM′+b, and M′ is the number of tasks to be merged.
4. A parallel computing optimization control system for a real-scene three-dimensional model according to claim 3, characterized in that: The training process of the task analysis model includes: Collect z groups of three-dimensional data in advance, set corresponding set labels for the z groups of three-dimensional data, where z is an integer greater than 1, and convert the three-dimensional data and the corresponding set labels into a corresponding set of feature vectors; use each set of feature vectors as input to a task analysis model, and the task analysis model uses a set of predicted set labels corresponding to each group of three-dimensional data as output, and uses the actual set labels corresponding to each group of three-dimensional data as prediction targets, where the actual set labels are pre-set set labels corresponding to the three-dimensional data; minimize the sum of prediction errors of all three-dimensional data as a training target; train the task analysis model until the sum of prediction errors reaches convergence and stops training; the task analysis model is a deep neural network model; The training process of the resource prediction model is consistent with that of the task analysis model, and both are deep neural network models.
5. A parallel computing optimization control system for a real-scene three-dimensional model according to claim 4, characterized in that: The method for obtaining b merge tasks includes: Construct b merge sets; randomly assign all tasks to be merged to d merge sets and use them as a merge method, obtaining a total of d′ merge methods. In the formula, d! is the factorial of d, d! = d×(d-1)×…×2×1, is the number of combinations, Add the computational amount corresponding to each task to be merged in each merged set in turn to obtain the total computational amount corresponding to each merged set; subtract the computational amount threshold from the total computational amount corresponding to each merged set and take the absolute value to obtain the merged difference corresponding to each merged set; add the merged differences corresponding to each merging method in turn to obtain the total difference value corresponding to each merging method; sort all the total difference values from small to large, and mark the merging method corresponding to the front total difference value as the selected method; obtain b merged tasks according to the d merging sets corresponding to the selected method, b=d.
6. A parallel computing optimization control system for a real-scene three-dimensional model according to claim 5, characterized in that: The step of allocating m subtasks to computing nodes in a multi-node cluster includes: Step B1: sort the m subtasks from large to small according to the computational loads corresponding to the m subtasks, and generate a subtask sorting table; Step B2: Add up the computational load of the subtasks in each computing node, obtain the load corresponding to each computing node, and mark the computing node with the smallest load as the allocation node; Step B3: According to the positive order of the subtask sorting table, obtain the subtask at the front and assign it to the assignment node, and delete the assigned subtask from the subtask sorting table; Step B4: recalculate the load corresponding to each computing node and update the allocation node; Step B5: loop steps B3 to B5 until there are no subtasks in the subtask sorting table. The loop ends and the m subtasks are all allocated to the computing nodes in the multi-node cluster.
7. A parallel computing optimization control system for a real-scene three-dimensional model according to claim 6, characterized in that: The method for prioritizing m subtasks includes: Preset dependencies, where dependencies are states or conditions of mutual dependence between subtasks; construct a dependency graph corresponding to m subtasks based on the dependencies, where the dependency graph is a directed acyclic graph, i.e., there are directions in the dependency graph, but no loops; the dependency graph includes subtasks and directed edges, where directed edges point from one subtask to another; sort the m subtasks based on the dependency graph, and generate a priority table; set corresponding priorities for the m subtasks in descending order based on the positive order of the priority table, and the priority range is [1, m].
8. The parallel computing optimization control system for real-scene three-dimensional model according to claim 7, characterized in that: The step of generating a priority list comprises: Step C1: According to the dependency graph, count the number of times each subtask is pointed to and mark it as the number of incoming edges; Step C2: Get the subtasks with 0 input edges and mark them as tasks to be executed; compare the computational amounts corresponding to all tasks to be executed, and mark the task to be executed with the largest computational amount as the execution task; Step C3: Mark the subtasks connected to the execution task through directed edges as adjacent tasks, and reduce the number of incoming edges of all adjacent tasks by 1; Step C4: Add the execution task to the queue and mark the execution task as completed; Step C5: loop steps C2 to C4 until all subtasks in the queue are marked as completed tasks, then the loop ends; the queue is used as a priority sorting table.
9. A parallel computing optimization control system for a real-scene three-dimensional model according to claim 8, characterized in that: The method for dynamically scheduling subtasks includes: The load corresponding to each computing node is collected in real time and marked as real-time load; the computing performance corresponding to each computing node is obtained, and the real-time load of each computing node is divided by the corresponding computing performance to obtain the load index corresponding to each computing node; Count the number of computing nodes and mark them as the number of nodes; add the load index of each computing node in turn and divide it by the number of nodes to obtain the load average; divide the load index of each computing node by the load average to obtain the load ratio corresponding to each computing node; subtract 1 from the load ratio of each computing node to obtain the judgment index corresponding to each computing node; preset the judgment standard, compare the judgment index of each computing node with the judgment standard, mark the computing node with a judgment index greater than the judgment standard as an overloaded node, and do not mark the computing node with a judgment index less than or equal to the judgment standard; use the exhaustive search method to obtain v scheduling schemes, calculate the scheduling index corresponding to each scheduling scheme, and take the scheduling scheme with the largest scheduling index as the best scheme; dynamically schedule the subtasks according to the best scheme.
10. The parallel computing optimization control system for real-scene three-dimensional model according to claim 9, characterized in that: The method for obtaining v scheduling schemes includes: Preset the standard index, compare the judgment index of each computing node that is not marked as an overloaded node with the standard index; mark the computing nodes with a judgment index greater than the standard index as scheduling nodes, and do not mark the computing nodes with a judgment index less than or equal to the standard index; obtain the computing subtask corresponding to each scheduling node, and the computing subtask is the subtask being processed by the computing node; count the number of computing subtasks and mark them as the computing number; count the number of scheduling nodes and mark them as the scheduling number; randomly assign all computing subtasks to each scheduling node, and obtain v scheduling schemes, v = f g ; In the formula, f is the scheduling quantity and g is the calculation quantity; The method for calculating the scheduling index corresponding to each scheduling scheme includes: Calculate the judgment index corresponding to each scheduling node in each scheduling scheme and take the absolute value, marked as the node index; subtract the judgment standard from each node index to obtain the load deviation corresponding to each scheduling node; add the load deviations corresponding to each scheduling scheme in turn to obtain the total load deviation corresponding to each scheduling scheme; multiply the priority corresponding to each computing subtask in each scheduling node by the computing performance of the corresponding scheduling node, and add them in turn to obtain the priority index corresponding to each scheduling node; add the priority index corresponding to each scheduling scheme in turn, and then divide it by the scheduling quantity to obtain the priority coefficient corresponding to each scheduling scheme; calculate the scheduling node actually corresponding to the subtask Mark as the actual node, and mark the scheduling node corresponding to the computing subtask in the scheduling scheme as the target node; analyze the computing subtask corresponding to each scheduling node in each scheduling scheme; if the actual node and the target node corresponding to the computing subtask are the same computing node, then do not mark the corresponding computing subtask; if the actual node and the target node corresponding to the computing subtask are not the same computing node, then mark the corresponding computing subtask as a mobile subtask; count the number of mobile subtasks corresponding to each scheduling scheme and mark it as the number of moves; calculate the scheduling index corresponding to each scheduling scheme according to the total load deviation, priority coefficient and number of moves; the expression of the scheduling index is: Where dd is the scheduling index, yx is the priority coefficient, fp is the total load deviation, yc is the number of moves, ω1, ω2, ω3 are the preset weight coefficients, and u is the preset constant.
Citation Information
Patent Citations
SGD load balancing method and device based on parallel computing and storage medium
CN111858058A