A distributed 3D intelligent rendering method based on CPU environment

By constructing a matching degree between CPU rendering node performance index and rendering task complexity, and adaptively adjusting inertia weight, the problem of balance and efficiency of particle swarm algorithm in rendering task allocation is solved, and balanced allocation of rendering tasks and efficient CPU are achieved. use.

CN118521693BActive Publication Date: 2024-10-01HUNAN SANYUE SUWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410977739.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-10-01
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

When using the particle swarm optimization algorithm to allocate rendering tasks to CPU rendering nodes, improper setting of inertia weight parameters makes it difficult to obtain the optimal solution, resulting in poor balanced distribution of rendering tasks and reduced convergence efficiency and accuracy of the particle swarm algorithm.

Method used

By obtaining the performance indicators of the CPU rendering node and the complexity of the rendering tasks, we construct matching suitability and load balancing, adaptively adjust the inertia weight, and optimize the distribution plan of the particle swarm algorithm to achieve balanced distribution of rendering tasks.

Benefits of technology

It improves the balance of rendering task distribution and CPU utilization, enhances the optimization capability of the particle swarm algorithm, and avoids the local optimal solution problem of inertia weight parameter settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118521693B_ABST
    Figure CN118521693B_ABST
Patent Text Reader

Abstract

The present application relates to the field of intelligent rendering technology, and specifically to a distributed three-dimensional intelligent rendering method based on a CPU environment, the method comprising: obtaining the rendering PU hardware performance data of each CPU rendering node, each sub-rendering task, and each CPU rendering node; obtaining the CPU rendering node performance sequence and the rendering complexity sequence; obtaining the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence; obtaining the rendering environment parameter change rate, and then obtaining the rendering similarity; obtaining the load balancing degree of each particle; obtaining the neighbor iteration fitness change value and the fitness difference characteristic value, and then obtaining the adjustment inertia weight, dividing each sub-rendering task, and performing distributed three-dimensional intelligent rendering. The present application improves the optimization ability of the particle swarm algorithm, and then improves the effect of balanced distribution of rendering tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent rendering technology, and in particular to a distributed three-dimensional intelligent rendering method based on a CPU environment. Background Art

[0002] In the field of computer graphics and visualization computing, the rendering engine is a core component responsible for converting data from the virtual world into images for users to view. The main responsibility of the rendering engine is to handle multiple factors such as lighting, shadows, materials, textures, and implement different rendering technologies and pipelines.

[0003] In the domestic supercomputer environment, the rendering engine plays an extremely important role. The rendering engine does not rely on specific GPU hardware. With the help of multi-CPU computing power and SIMD instructions, it distributes rendering tasks to multiple CPU rendering nodes and merges sub-rendering results through high-speed networks, thereby achieving efficient 3D real-time rendering capabilities. The rendering engine uses large-scale parallel computing capabilities to use distributed task processing methods to decompose large-scale rendering tasks into multiple small rendering tasks, and distributes them to multiple CPU rendering nodes for parallel processing.

[0004] Traditional algorithms usually use optimization algorithms to obtain the optimal allocation scheme for rendering tasks to multiple CPU rendering nodes. The particle swarm algorithm is a heuristic optimization algorithm that represents the solution to the problem as a particle swarm and searches for the optimal solution in the solution space. Each particle represents a potential solution and has its position and velocity. The particles obtain the optimal solution by constantly adjusting their own position and velocity.

[0005] When using the particle swarm optimization algorithm to allocate rendering tasks to CPU rendering nodes, the setting of the inertia weight parameter directly affects the accuracy of the particle swarm algorithm in obtaining the global optimal solution. When the inertia weight parameter is too large, it is difficult for the particle swarm algorithm to obtain the optimal solution, and the optimization result is difficult to complete the balanced allocation of sub-rendering tasks. When the inertia weight parameter is too small, the particle swarm algorithm is prone to fall into the local optimal solution and it is difficult to jump out, which reduces the convergence efficiency and accuracy of the particle swarm algorithm. At the same time, when the rendering tasks are allocated through the local optimal solution, the load balancing effect achieved is far worse than the global optimal solution. Therefore, it is necessary to adjust the inertia weight to improve the optimization ability of the particle swarm algorithm, thereby improving the effect of balanced rendering task allocation. Summary of the invention

[0006] In order to solve the above technical problems, the present application provides a distributed three-dimensional intelligent rendering method based on a CPU environment to solve the existing problems.

[0007] The present application discloses a distributed 3D intelligent rendering method based on a CPU environment using the following technical solutions:

[0008] An embodiment of the present application provides a distributed 3D intelligent rendering method based on a CPU environment, the method comprising the following steps:

[0009] Obtain the rendering CPU hardware performance data of each CPU rendering node, each sub-rendering task, and each CPU rendering node from the distributed rendering client;

[0010] Obtaining a CPU rendering node performance sequence based on rendering CPU hardware performance data of each CPU rendering node;

[0011] Obtaining the rendering complexity of each sub-rendering task based on the three-dimensional model of each sub-rendering task; sorting the rendering complexity of all sub-rendering tasks in ascending order to construct a rendering complexity sequence;

[0012] Based on the correlation between the rendering CPU hardware performance data and the rendering complexity sequence, the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence is obtained;

[0013] Based on the rendering environment change parameters of the CPU rendering nodes, the rendering environment parameter change rate of each CPU rendering node is obtained; based on the rendering complexity and the rendering preset parameters of the CPU rendering nodes, the rendering similarity of each CPU rendering node is obtained;

[0014] The load balance of each particle is obtained based on the rendering environment parameter change rate and rendering similarity; the individual optimal particle and the overall optimal particle of each particle in the iteration process are obtained based on the load balance and matching suitability;

[0015] Based on the individual optimal particle and the overall optimal particle, the neighboring iteration fitness change value and fitness difference characteristic value of each particle in each iteration are obtained;

[0016] Based on the neighboring iteration fitness change value and fitness difference characteristic value, the adjustment inertia weight of each particle in each iteration is obtained, and each sub-rendering task is divided to perform distributed 3D intelligent rendering.

[0017] Furthermore, the method for obtaining the CPU rendering node performance sequence is:

[0018] Rendering CPU hardware performance data includes CPU core number, main frequency, memory bandwidth and CPU rendering node utilization;

[0019] For each CPU rendering node, the product of the number of CPU cores, main frequency, and memory bandwidth of the CPU rendering node is calculated as the first performance product;

[0020] Acquire a hardware performance coefficient of each CPU rendering node according to the CPU rendering node utilization rate and the first performance product, wherein the hardware performance coefficient is positively correlated with the first performance product and negatively correlated with the CPU rendering node utilization rate;

[0021] Sort the hardware performance coefficients of all CPU rendering nodes from small to large to obtain the CPU rendering node performance sequence.

[0022] Furthermore, the method for obtaining the rendering complexity is:

[0023] Obtaining the area to be rendered of each sub-rendering task during the creation process, and for the area to be rendered of each sub-rendering task, obtaining an image obtained after rendering the area to be rendered as a rendering result image of the area to be rendered;

[0024] The number of pixels in the rendering result image of the area to be rendered of each sub-rendering task is used as the resolution of the area to be rendered, the texture feature value of each pixel in the rendering result image of the area to be rendered is obtained, the mean of the texture feature values ​​of all pixels in the rendering result image is used as the first texture mean of the rendering result image, and the number of light sources in the area to be rendered is used as the first scene complexity of the area to be rendered;

[0025] The rendering complexity of each sub-rendering task is obtained according to the resolution, the first texture mean value and the first scene complexity, and the rendering complexity is positively correlated with the resolution, the first texture mean value and the first scene complexity respectively.

[0026] Furthermore, the method for obtaining the matching suitability is:

[0027] For the hardware performance coefficient of each CPU rendering node and the rendering complexity of the corresponding sub-rendering task, the ratio of the hardware performance coefficient to the maximum hardware performance coefficient in the CPU rendering node performance sequence is calculated as the hardware performance ratio of each CPU rendering node, and the ratio of the rendering complexity to the maximum rendering complexity in the rendering complexity sequence is calculated as the rendering complexity ratio of each CPU rendering node;

[0028] Obtain the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence according to the hardware performance ratio and the rendering complexity ratio;

[0029] For the hardware performance ratio and rendering complexity ratio of each CPU rendering node, the absolute value of the difference between the hardware performance ratio and the rendering complexity ratio is calculated as the first absolute value of the difference, and the matching suitability is negatively correlated with the first absolute value of the difference.

[0030] Furthermore, the method for obtaining the rendering environment parameter change rate is:

[0031] For each CPU rendering node, obtain its historically processed rendering tasks as the historical rendering tasks of the CPU rendering node;

[0032] Obtain the CPU usage, memory usage, and temperature data of historical rendering tasks of each CPU rendering node through the distributed rendering client;

[0033] Calculate the absolute value of the difference between the CPU usage of the historical rendering tasks of each CPU rendering node and the CPU usage of the sub-rendering task to be rendered as a first usage difference absolute value, obtain the maximum value between the CPU usage of the historical rendering tasks of each CPU rendering node and the CPU usage of the sub-rendering task to be rendered as a maximum usage rate, and calculate the ratio of the first usage difference absolute value to the maximum usage rate as the change rate of the rendering environment change parameter of each CPU rendering node in the dimension of CPU usage rate;

[0034] For memory usage and temperature data, the same method as CPU usage is used to obtain the dimensional change rate of memory usage and temperature data of each CPU rendering node;

[0035] For each CPU rendering node, the sum of all dimension change rates of the CPU rendering node is calculated as the rendering environment parameter change rate of each CPU rendering node.

[0036] Furthermore, the method for obtaining the rendering similarity is:

[0037] Setting rendering preset parameters, wherein the rendering preset parameters include light intensity, number of light sources and texture quality;

[0038] For each CPU rendering node, the absolute value of the difference between the same type of rendering preset parameters of the historical rendering tasks of the CPU rendering node and the sub-rendering tasks to be processed is calculated as the first rendering difference absolute value, the maximum value between the same type of rendering preset parameters of the historical rendering tasks of the CPU rendering node and the sub-rendering tasks to be processed is obtained as the first rendering maximum value, the ratio of the first rendering difference absolute value to the first rendering maximum value is calculated as the first rendering preset ratio of each rendering preset parameter of the same type, and the sum of all the first rendering preset ratios of the CPU rendering nodes is taken as the rendering parameter change rate of each CPU rendering node;

[0039] The same method as each sub-rendering task is used to obtain the rendering complexity of the historical rendering tasks of each CPU rendering node;

[0040] For each CPU rendering node, the absolute value of the difference between the rendering complexity of the historical rendering task and the sub-rendering task to be rendered is calculated as the rendering complexity change rate of each CPU rendering node;

[0041] The rendering similarity is acquired according to the rendering parameter change rate and the rendering complexity change rate, and the rendering similarity is negatively correlated with the rendering parameter change rate and the rendering complexity change rate, respectively.

[0042] Furthermore, the method for obtaining the load balancing degree is:

[0043] Obtaining historical rendering task references of each historical reference task of each CPU rendering node according to the rendering similarity and the rendering environment parameter change rate, wherein the historical rendering task references are positively correlated with the rendering similarity and negatively correlated with the rendering environment parameter change rate;

[0044] For each CPU rendering node, a preset number of historical rendering tasks with the greatest reference value are selected as historical reference rendering tasks of each CPU rendering node;

[0045] For each CPU rendering node, the rendering duration of all historical reference rendering tasks of the CPU rendering node is used as the input of the AR model, and the first predicted duration of the sub-rendering task to be rendered of the CPU rendering node is output;

[0046] Using the same method as the first prediction duration, the rendering duration of the unfinished historical rendering tasks of each CPU rendering node is predicted to obtain a second prediction duration;

[0047] The sum of the first predicted duration and the second predicted duration of each CPU rendering node is used as the estimated completion duration of the sub-rendering task to be rendered of each CPU rendering node;

[0048] The dimensions of each particle in the particle swarm algorithm correspond to each CPU rendering node;

[0049] The inverse of the variance of the estimated completion time of the sub-rendering tasks to be rendered of all CPU rendering nodes corresponding to each particle is used as the load balancing degree of each particle.

[0050] Furthermore, the individual optimal particles and the overall optimal particles include:

[0051] According to the load balance and matching suitability of the particles, the load matching fitness of each particle is obtained, and the load matching fitness is positively correlated with the load balance and matching suitability;

[0052] For each particle in the particle swarm algorithm, obtain the number of iterations of the particle, and obtain the individual optimal particle and the overall optimal particle during the iteration process;

[0053] The individual optimal particle is the particle with the largest load matching fitness during the iteration process, and the overall optimal particle is the particle with the largest load matching fitness among all particles during the iteration process.

[0054] Furthermore, the method for obtaining the neighbor iterative fitness change value and the fitness difference characteristic value is:

[0055] The iteration with the preset number of times closest to the current iteration number of the particle is recorded as the neighbor iteration of each particle;

[0056] Obtain the load matching fitness of the particle in each iteration of the particle's neighbor iteration, obtain the absolute value of the difference between the load matching fitness of the particle in each iteration and the next iteration as the first fitness difference absolute value, calculate the absolute value of the difference between the number of the next iteration of the particle and the number of its iteration as the first iteration difference absolute value, calculate the ratio between the first fitness difference absolute value and the first iteration difference absolute value as the first ratio, and take the sum of all first ratios of each particle in its neighbor iteration as the neighbor iteration fitness change value of each particle in its iteration number;

[0057] For each particle, the absolute value of the difference between the load matching fitness of the particle at the Kth iteration and the K-1th iteration is obtained as the second absolute value of the difference, the absolute value of the difference between the load matching fitness of the particle at the Kth iteration and the overall optimal particle is calculated as the third absolute value of the difference, and the absolute value of the difference between the particle at the Kth iteration and the individual optimal particle is calculated as the fourth absolute value of the difference;

[0058] The sum of the second difference absolute value, the third difference absolute value and the fourth difference absolute value of the particle in the iteration process is calculated as the fitness difference characteristic value of the particle in the Kth iteration.

[0059] Furthermore, the step of obtaining the adjusted inertia weight of each particle in each iteration and dividing each sub-rendering task includes:

[0060] The preset initial inertia weight is used as the inertia weight of the first iteration of the particle swarm algorithm;

[0061] For each iteration of each particle, if the neighbor iteration fitness change value is greater than 0, the adjusted inertia weight of each iteration of each particle is the product of the fitness difference characteristic value of each iteration of each particle and the inertia weight of the previous iteration;

[0062] If the neighbor iteration fitness change value is less than 0, the sum of the fitness difference characteristic value of each iteration of each particle and a preset constant is calculated, and the product of the sum and the inertia weight of the previous iteration is calculated as the adjusted inertia weight of each iteration of each particle;

[0063] If the neighbor iteration fitness change value is equal to 0, the adjusted inertia weight of each particle in each iteration is the inertia weight of the previous iteration;

[0064] The particle group is iterated according to the adjusted inertia weight of each particle, and each sub-rendering task is divided.

[0065] This application has at least the following beneficial effects:

[0066] In this application, the CPU rendering node performance index is first analyzed to obtain the corresponding CPU rendering node performance index sequence, and the rendering complexity sequence of the sub-rendering task allocation of the particle in the particle swarm algorithm is matched with the CPU rendering node performance index sequence to construct the corresponding matching fitness. At the same time, the historical rendering task processing process of the CPU rendering node is analyzed, and the corresponding historical reference rendering task is obtained through the changes in rendering complexity and CPU rendering environment. Then, the prediction of the completion time of the rendering task based on the historical reference rendering task and the AR model is completed, and the corresponding load balancing degree is constructed based on the distribution characteristics of the predicted completion time. The load matching fitness of the particle is adaptively constructed through the load balancing degree and the matching fitness. The optimal allocation scheme is obtained through the load matching fitness, which can make the allocation scheme based on the CPU rendering node performance adaptively allocated while the rendering task completion time is close to the same, while satisfying the load balancing and improving the CPU utilization. And based on the fitness change characteristics in the particle swarm optimization process, the inertia weight is adaptively adjusted, so that the adjusted inertia weight is larger when far away from the optimal solution and smaller when close to the optimal solution, which improves the optimization ability of the particle swarm algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0068] Figure 1 A flowchart of a distributed 3D intelligent rendering method based on a CPU environment provided by this application;

[0069] Figure 2 This is a schematic diagram of the distributed rendering client;

[0070] Figure 3 Get a flow chart for adjusting the inertia weight. DETAILED DESCRIPTION

[0071] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a distributed three-dimensional intelligent rendering method based on a CPU environment proposed by the present application in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0072] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0073] The following is a detailed description of a specific scheme of a distributed three-dimensional intelligent rendering method based on a CPU environment provided by the present application in conjunction with the accompanying drawings.

[0074] An embodiment of the present application provides a distributed 3D intelligent rendering method based on a CPU environment. Specifically, the following distributed 3D intelligent rendering method based on a CPU environment is provided. Figure 1 , the method comprises the following steps:

[0075] Step S1, obtaining rendering tasks and CPU rendering node related data through a distributed rendering client.

[0076] The distributed rendering client is divided into three major components: editor, rendering server management component, and rendering task management component. Figure 2 The editor is the user interface of the distributed rendering client, which is used to create, edit, and manage rendering tasks.

[0077] The rendering server management component is the core component of the distributed rendering client, which mainly realizes the management, monitoring, allocation and expansion of rendering nodes.

[0078] The rendering task management component is a key component of the distributed rendering client, which mainly realizes the disassembly, distribution, collection, and synthesis of rendering tasks.

[0079] In this application, the editor is used to obtain the rendering task created by the user, the rendering task is decomposed into multiple small sub-rendering tasks through the rendering task management component, and the split rendering tasks are assigned to the corresponding CPU rendering nodes through the rendering server management component.

[0080] The rendering PU hardware performance data of each CPU rendering node is obtained from the distributed rendering client. The rendering CPU hardware performance data includes the number of CPU cores, main frequency, memory bandwidth and CPU rendering node utilization rate. The number of CPU cores, main frequency, memory bandwidth and CPU rendering node utilization rate of each CPU rendering node are obtained from the distributed rendering client.

[0081] At this point, each CPU rendering node and each sub-rendering task are obtained.

[0082] Step S2, adaptively constructing the load matching fitness of particles in the particle swarm algorithm, and adaptively adjusting the inertia weight, so as to achieve the optimal allocation of rendering tasks through the particle swarm algorithm.

[0083] The 3D model rendering task created by the user is obtained through the editor, and the status data of the CPU rendering node in the rendering server management component is obtained. Since the characteristics and limitations of different hardware CPUs are different, the corresponding performance of different CPU rendering nodes is often different. When decomposing the rendering task into multiple sub-rendering tasks for task allocation, in order to balance the load of different nodes and make the task completion time close, an optimization algorithm is usually used to allocate the division of each sub-rendering task.

[0084] The particle swarm algorithm is a heuristic optimization algorithm. This application uses the particle swarm algorithm to allocate the process of dividing the rendering task into various sub-rendering tasks.

[0085] When the distributed rendering client receives a rendering task, it obtains the number of CPU rendering nodes of the rendering task to be assigned at this time, assuming that the number is M, and uses it as the dimension of each particle of the particle swarm. That is, each dimension of each particle corresponds to each CPU rendering node, and each CPU rendering node corresponds to a sub-rendering task.

[0086] In this embodiment, the M CPU rendering nodes are first analyzed, and the hardware performance coefficient of each CPU rendering node is constructed by rendering the CPU hardware performance data. Furthermore, the method for obtaining the hardware performance coefficient of each CPU rendering node is as follows:

[0087] For each CPU rendering node, the product of the number of CPU cores, the main frequency and the memory bandwidth of the CPU rendering node is calculated as the first performance product. The hardware performance coefficient is positively correlated with the first performance product and negatively correlated with the CPU rendering node utilization rate.

[0088] Specifically, the present application proposes an embodiment, in which the sum of the CPU rendering node utilization rate and the preset parameter adjustment factor is calculated as the first rendering sum value, and the ratio of the first performance product to the first rendering sum value is calculated as the hardware performance coefficient of each CPU rendering node. In this embodiment, the preset parameter adjustment factor is set to 1, which is used to prevent the denominator from being 0.

[0089] It should be noted that the positive correlation relationship can be a multiplication, addition, or idempotent relationship of an exponential function, which can be determined based on actual conditions and will not be elaborated in this application; the negative correlation relationship can be a subtraction relationship, a division relationship, etc., which can be determined based on actual conditions and will not be elaborated in this application.

[0090] At this point, the hardware performance coefficient of each CPU rendering node is obtained, and the hardware performance coefficients of all CPU rendering nodes are sorted from small to large to obtain the CPU rendering node performance sequence.

[0091] During the rendering process, each sub-rendering task will select a region to be rendered of the 3D model during the creation process, and for each region to be rendered of each sub-rendering task, an image obtained after rendering of each region to be rendered is obtained as a rendering result image of each region to be rendered. The rendering result image of each region to be rendered is a visualized image of each region to be rendered, which is a well-known technology and will not be described in detail here.

[0092] The number of pixels in the rendering result image of the area to be rendered of each sub-rendering task is used as the resolution of each area to be rendered, the LBP value of each pixel in the rendering result image of the area to be rendered is obtained, the average of the LBP values ​​of all pixels in the rendering result image is used as the first texture average of the rendering result image, and the number of light sources in the area to be rendered is used as the first scene complexity of the area to be rendered; wherein, the number of light sources in each area to be rendered is extracted from the distributed rendering client, and the number of light sources in each area to be rendered will be intuitively displayed in the distributed rendering client, which is a well-known technology and will not be described in detail here; the method for calculating the LBP value of the pixel is a well-known technology and will not be described in detail here.

[0093] Furthermore, the rendering complexity of each sub-rendering task is obtained according to the resolution, the first texture mean value and the first scene complexity. The rendering complexity is positively correlated with the resolution, the first texture mean value and the first scene complexity.

[0094] Specifically, the present application proposes an embodiment in which the product of the resolution, the first texture mean and the first scene complexity is used as the rendering complexity of each sub-rendering task.

[0095] Furthermore, the rendering complexity of all sub-rendering tasks is sorted in ascending order to construct a rendering complexity sequence.

[0096] Furthermore, the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence is obtained.

[0097] Specifically, each CPU rendering node corresponds to each sub-rendering task, the number of elements in the CPU rendering node performance sequence and the rendering complexity sequence is the same, and the hardware performance coefficient of each CPU rendering node and the rendering complexity of the corresponding sub-rendering task have the same sequence number in the CPU rendering node performance sequence and the rendering complexity sequence.

[0098] Furthermore, for the hardware performance coefficient of each CPU rendering node and the rendering complexity of the corresponding sub-rendering task, the ratio of the hardware performance coefficient to the maximum hardware performance coefficient in the CPU rendering node performance sequence is calculated as the hardware performance ratio of each CPU rendering node, and the ratio of the rendering complexity to the maximum rendering complexity in the rendering complexity sequence is calculated as the rendering complexity ratio of each CPU rendering node.

[0099] Furthermore, the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence is obtained according to the hardware performance ratio and the rendering complexity ratio. The obtaining method is as follows:

[0100] For the hardware performance ratio and rendering complexity ratio of each CPU rendering node, the absolute value of the difference between the hardware performance ratio and the rendering complexity ratio is calculated as the first absolute value of the difference, and the matching suitability is negatively correlated with the first absolute value of the difference.

[0101] Specifically, the present application proposes an embodiment, in which the inverse of the sum of the absolute value of the first difference and the preset parameter adjustment factor is calculated as the first inverse, and the sum of all the first inverses is calculated as the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence.

[0102] The greater the matching fitness, the closer the current particle's task allocation is to the actual CPU performance, and the better the load balancing effect of its task allocation is, so the greater its fitness.

[0103] At this point, the construction of the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence is completed. The matching suitability reflects the matching degree of the sub-rendering tasks in allocating them to the CPU rendering nodes.

[0104] However, when the CPU rendering node is actually rendering, the increase in rendering difficulty of the rendering task is not linearly related to the improvement of the CPU rendering node performance. That is, when the most complex rendering task is rendered using the best CPU rendering node, the rendering time may be much longer than the rendering time of the CPU rendering node with the lowest performance. Therefore, when the matching fitness is directly used to represent the particle fitness, the load balancing of the CPU rendering node cannot be effectively completed, and the utilization rate of the CPU rendering node is low.

[0105] Therefore, further, this embodiment obtains the historical rendering tasks of each CPU rendering node, and adaptively estimates the expected completion time of the sub-rendering tasks of the CPU rendering node corresponding to each dimension of each particle according to the completion status of the historical rendering tasks. The load balance of the node is constructed through the distribution characteristics of the expected completion time of the sub-rendering tasks assigned to the CPU rendering node under different dimensions of the particle. The acquisition method is as follows:

[0106] For each CPU rendering node, obtain its historically processed rendering tasks as the historical rendering tasks of the CPU rendering node. Each historical rendering task has a corresponding rendering environment of the CPU rendering node. The rendering environment change parameters, rendering preset parameters, and rendering complexity of the historical rendering tasks of the CPU rendering node are obtained through the distributed rendering client, and the historical rendering task reference is constructed. Based on the historical rendering task reference, the historical reference rendering tasks are obtained. The acquisition method is as follows:

[0107] Furthermore, the rendering environment change parameters when the CPU rendering node starts to process the rendering task include CPU usage, memory occupancy, and temperature data, and the rendering environment change parameters can be directly obtained in the distributed rendering client.

[0108] For the rendering environment change parameters, taking CPU usage as an example, the absolute value of the difference between the CPU usage of the historical rendering tasks of each CPU rendering node and the CPU usage of the sub-rendering task to be rendered is calculated as the first usage difference absolute value, the maximum value between the CPU usage of the historical rendering tasks of each CPU rendering node and the CPU usage of the sub-rendering task to be rendered is obtained as the maximum usage rate, and the ratio of the first usage difference absolute value to the maximum usage rate is calculated as the change rate of the rendering environment change parameters of each CPU rendering node in the dimension of CPU usage.

[0109] Similarly, obtain the dimensional change rate of memory usage and temperature data of each CPU rendering node.

[0110] For each CPU rendering node, the sum of all dimension change rates of the CPU rendering node is calculated as the rendering environment parameter change rate of each CPU rendering node.

[0111] It should be noted that, the greater the rendering environment parameter change rate is, the greater the difference in environment parameters between two rendering tasks when rendering is performed, and the less reference value of the historical rendering task is.

[0112] When the distributed rendering client is rendering a 3D model, the user needs to create a corresponding rendering task. In this process, the corresponding rendering preset parameters of the renderer need to be set. The rendering preset parameters in this embodiment include: light intensity, number of light sources, and texture quality. The implementer can select the rendering parameters according to the actual situation.

[0113] Similarly, for each CPU rendering node, the absolute value of the difference between the historical rendering tasks of the CPU rendering node and the same type of rendering preset parameters of the sub-rendering tasks to be processed is calculated as the first rendering difference absolute value, the maximum value between the historical rendering tasks of the CPU rendering node and the same type of rendering preset parameters of the sub-rendering tasks to be processed is obtained as the first rendering maximum value, the ratio of the first rendering difference absolute value and the first rendering maximum value is calculated as the first rendering preset ratio of each same type of rendering preset parameters, and the sum of all the first rendering preset ratios of the CPU rendering nodes is taken as the rendering parameter change rate of each CPU rendering node.

[0114] Furthermore, the same method as each sub-rendering task is adopted to obtain the rendering complexity of the historical rendering task of each CPU rendering node.

[0115] Furthermore, for each CPU rendering node, the absolute value of the difference between the rendering complexity of the historical rendering task and the rendering complexity of the sub-rendering task to be rendered is calculated as the rendering complexity change rate of each CPU rendering node.

[0116] Furthermore, rendering similarity is acquired according to the rendering parameter change rate and the rendering complexity change rate, wherein the rendering similarity is negatively correlated with the rendering parameter change rate and the rendering complexity change rate.

[0117] Based on this, the present application proposes an embodiment, calculating the product of the rendering parameter change rate and the rendering complexity change rate as the first product, and calculating the inverse of the sum of the first product and the preset parameter adjustment factor as the rendering similarity of each CPU rendering node.

[0118] Furthermore, the historical rendering task reference of each historical reference task of each CPU rendering node is obtained according to the rendering similarity and the rendering environment parameter change rate, wherein the historical rendering task reference is positively correlated with the rendering similarity and negatively correlated with the rendering environment parameter change rate.

[0119] Based on this, the present application proposes an embodiment, in which the ratio of rendering similarity to the rendering environment parameter change rate is used as the historical rendering task reference of each historical reference task of each CPU rendering node.

[0120] At this point, the historical rendering task reference of all historical rendering tasks of all CPU rendering nodes is obtained.

[0121] Furthermore, for each CPU rendering node, p historical rendering tasks with the greatest reference are selected as historical reference rendering tasks of each CPU rendering node. In this embodiment, the value of p is 5, and the implementer can adjust it according to actual conditions.

[0122] For each particle, the inverse of the variance of the expected completion time of the sub-rendering tasks to be rendered of all CPU rendering nodes corresponding to the particle is used as the load balancing degree of each particle. The method for obtaining the expected completion time is as follows:

[0123] For each CPU rendering node, the rendering duration of all historical reference rendering tasks of the CPU rendering node is used as the observation value of the historical moment in the AR model, wherein the rendering duration of each historical reference rendering task can be directly obtained from the distributed rendering client, and the first predicted duration of each sub-rendering task to be rendered is obtained through the AR model. The AR model prediction process is a well-known technology and will not be repeated here.

[0124] Because each CPU rendering node may be processing an unfinished historical rendering task that was previously assigned when each sub-rendering task to be rendered is assigned, the above steps are also used to predict the duration of the historical rendering task being rendered to obtain a second predicted duration.

[0125] The sum of the first predicted duration and the second predicted duration of each CPU rendering node in each particle is used as the estimated completion duration of the sub-rendering task to be rendered by each CPU rendering node. If there is no unfinished rendering task in the CPU rendering node, the value of the second predicted duration is 0.

[0126] Furthermore, the fitness function of particles in the particle swarm algorithm is constructed through the matching status of task allocation in various dimensions of particles in the particle swarm algorithm with the performance indicators of CPU rendering nodes and the distribution of expected completion time.

[0127] The present application obtains the load matching fitness of each particle according to the load balancing degree and matching fitness of the particles, and the load matching fitness is positively correlated with the load balancing degree and matching fitness.

[0128] Specifically, the present application proposes an embodiment in which the product of the load balancing degree and the matching fitness degree is used as the load matching fitness of the particle.

[0129] At this point, the construction of the particle's load matching fitness is completed.

[0130] Furthermore, when optimizing through the particle swarm algorithm, it is often necessary to update the position of the particles. In traditional particle updates, the particle speed is often adjusted through the synergistic effect of the particle's own cognition, the particle's historical influence, and the information sharing of other particles.

[0131] When using the particle swarm algorithm to divide the rendering task into each sub-rendering task, the parameters that need to be set are: particle swarm size N=100, number of iterations is 200, learning factor is set to 2, and the initial value of inertia weight is 0.9.

[0132] When the inertia weight parameter is too large, it is difficult for the particle swarm algorithm to obtain the optimal solution, and the optimization result is difficult to complete the balanced allocation of sub-rendering tasks. When the inertia weight parameter is too small, the particle swarm algorithm is easy to fall into the local optimal solution and it is difficult to jump out, which reduces the convergence efficiency and accuracy of the particle swarm algorithm. At the same time, when the rendering tasks are allocated through the local optimal solution, the load balancing effect achieved is far worse than the global optimal solution. Therefore, it is necessary to adjust the inertia weight to improve the optimization ability of the particle swarm algorithm, thereby improving the effect of balanced distribution of rendering tasks.

[0133] This embodiment analyzes the change in the load balance degree corresponding to the particle caused by the particle velocity update during different iterations, and adaptively adjusts the inertia weight based on the influence characteristics of the particle velocity update to obtain the optimal inertia weight.

[0134] For any particle, when its data in a certain dimension changes, that is, when the amount of sub-rendering tasks assigned to its corresponding CPU rendering node changes, its corresponding estimated completion time will also change accordingly, thereby causing the load balance of the CPU rendering node to change.

[0135] For any particle Q, obtain its iteration number, assuming it is the Kth iteration of particle Q, and obtain the individual optimal particle and the overall optimal particle of the particle in the K iteration process. The individual optimal particle is the particle with the largest load matching fitness of particle Q during the iteration process, and the overall optimal particle is the particle with the largest load matching fitness of all particles during the iteration process. The most recent y iterations of the particle are recorded as the neighbor iteration of each particle. In this embodiment, the value of y is 3, and the implementer can select it according to the actual situation.

[0136] Since the speed adjustment of the particle will be affected by the particle speed in the previous iteration, its inertia weight is the inertia weight of the particle speed in the previous iteration. Therefore, in this embodiment, the change of the load matching fitness of the particle in the neighbor iteration process is used to determine whether the particle update is an effective adjustment.

[0137] For each particle, the load matching fitness of the particle in each iteration of the particle's neighbor iteration is obtained, the absolute value of the difference between the load matching fitness of the particle in each iteration and the next iteration is obtained as the first fitness difference absolute value, the absolute value of the difference between the number of the next iteration of the particle and the number of its iteration is calculated as the first iteration difference absolute value, the ratio between the first fitness difference absolute value and the first iteration difference absolute value is calculated as the first ratio, and the sum of all the first ratios of each particle in its neighbor iteration is taken as the neighbor iteration fitness change value of each particle in its iteration number.

[0138] If the fitness value of particle Q continues to increase during the neighbor iteration process, that is, the neighbor iteration fitness change value is greater than 0, it means that particle Q is constantly approaching the local optimal solution or the global optimal solution, and its corresponding inertia weight should be smaller.

[0139] If the fitness value of Q keeps decreasing during the neighbor iteration process, that is, the fitness change value of the neighbor iteration is less than 0, it means that particle Q is moving away from the local optimal solution or the global optimal solution, and the corresponding inertia weight should be larger.

[0140] Taking particle Q as an example, the absolute value of the difference between the load matching fitness of particle Q in the Kth iteration and the K-1th iteration is obtained as the second absolute value of the difference, the absolute value of the difference between the load matching fitness of particle Q in the Kth iteration and the overall optimal particle is calculated as the third absolute value of the difference, and the absolute value of the difference between particle Q in the Kth iteration and the individual optimal particle is calculated as the fourth absolute value of the difference. The sum of the second absolute value of the difference, the third absolute value of the difference, and the fourth absolute value of the difference of particle Q is calculated as the fitness difference characteristic value of particle Q in the Kth iteration.

[0141] For the Kth iteration of particle Q, if the neighbor iteration fitness change value is greater than 0, then , is the inertia weight of the Kth iteration, C is the fitness difference eigenvalue of particle Q, is the adjusted inertia weight for the K+1th iteration.

[0142] If the neighbor iteration fitness change value is less than 0, then .

[0143] If the neighbor iteration fitness change value is equal to 0, then .

[0144] Among them, the flow chart for adjusting the inertia weight is as follows: Figure 3 shown.

[0145] According to the above steps, the adaptive construction of load matching fitness and the adjustment of inertia weight in the particle swarm algorithm are completed, which improves the optimization ability and efficiency of the particle swarm algorithm. The particle swarm algorithm is used to complete the optimal allocation of rendering tasks, where the particle swarm size N=100 is set, the number of iterations is 200, the learning factor is set to 2, the initial value of the inertia weight is 0.9, and it stops when the upper limit of the number of iterations is reached. The particle with the largest load matching fitness obtained here is the corresponding optimal solution. Each dimension of the particle corresponds to a CPU rendering node, and its position on the dimension represents a sub-rendering task, which is assigned to the corresponding CPU rendering node.

[0146] This makes the rendering load of each CPU as close as possible, reduces the waste of system bus bandwidth and CPU processing time caused by data transmission, and improves the operating efficiency of the entire system. The process of obtaining the optimal parameters by the particle swarm algorithm is a well-known technology and will not be described here.

[0147] At this point, distributed 3D intelligent rendering based on the CPU environment has been completed.

[0148] It should be noted that the above sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0149] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0150] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Modifications to the technical solutions recorded in the aforementioned embodiments, or equivalent replacement of some of the technical features therein, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A distributed 3D intelligent rendering method based on a CPU environment, characterized in that: The method comprises the following steps: Obtain the rendering CPU hardware performance data of each CPU rendering node, each sub-rendering task, and each CPU rendering node from the distributed rendering client; Obtaining a CPU rendering node performance sequence based on rendering CPU hardware performance data of each CPU rendering node; Obtaining the rendering complexity of each sub-rendering task based on the three-dimensional model of each sub-rendering task; sorting the rendering complexity of all sub-rendering tasks in ascending order to construct a rendering complexity sequence; Based on the correlation between the rendering CPU hardware performance data and the rendering complexity sequence, the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence is obtained; Based on the rendering environment change parameters of the CPU rendering nodes, the rendering environment parameter change rate of each CPU rendering node is obtained; based on the rendering complexity and the rendering preset parameters of the CPU rendering nodes, the rendering similarity of each CPU rendering node is obtained; The load balance of each particle in the particle swarm algorithm is obtained based on the change rate of rendering environment parameters and rendering similarity; the individual optimal particle and the overall optimal particle of each particle in the iteration process are obtained based on the load balance and matching fitness; Based on the individual optimal particle and the overall optimal particle, the neighboring iteration fitness change value and fitness difference characteristic value of each particle in each iteration are obtained; Based on the neighboring iteration fitness change value and fitness difference characteristic value, the adjustment inertia weight of each particle in each iteration is obtained, and each sub-rendering task is divided to perform distributed 3D intelligent rendering.

2. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 1, characterized in that: The method for obtaining the CPU rendering node performance sequence is: Rendering CPU hardware performance data includes CPU core number, main frequency, memory bandwidth and CPU rendering node utilization; For each CPU rendering node, the product of the number of CPU cores, main frequency, and memory bandwidth of the CPU rendering node is calculated as the first performance product; Acquire a hardware performance coefficient of each CPU rendering node according to the CPU rendering node utilization rate and the first performance product, wherein the hardware performance coefficient is positively correlated with the first performance product and negatively correlated with the CPU rendering node utilization rate; Sort the hardware performance coefficients of all CPU rendering nodes from small to large to obtain the CPU rendering node performance sequence.

3. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 1, characterized in that: The method for obtaining the rendering complexity is: Obtaining the area to be rendered of each sub-rendering task during the creation process, and for the area to be rendered of each sub-rendering task, obtaining an image obtained after rendering the area to be rendered as a rendering result image of the area to be rendered; The number of pixels in the rendering result image of the area to be rendered of each sub-rendering task is used as the resolution of the area to be rendered, the texture feature value of each pixel in the rendering result image of the area to be rendered is obtained, the mean of the texture feature values ​​of all pixels in the rendering result image is used as the first texture mean of the rendering result image, and the number of light sources in the area to be rendered is used as the first scene complexity of the area to be rendered; The rendering complexity of each sub-rendering task is obtained according to the resolution, the first texture mean value and the first scene complexity, and the rendering complexity is positively correlated with the resolution, the first texture mean value and the first scene complexity respectively.

4. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 2, characterized in that: The method for obtaining the matching suitability is: For the hardware performance coefficient of each CPU rendering node and the rendering complexity of the corresponding sub-rendering task, the ratio of the hardware performance coefficient to the maximum hardware performance coefficient in the CPU rendering node performance sequence is calculated as the hardware performance ratio of each CPU rendering node, and the ratio of the rendering complexity to the maximum rendering complexity in the rendering complexity sequence is calculated as the rendering complexity ratio of each CPU rendering node; Obtain the matching suitability between the CPU rendering node performance sequence and the rendering complexity sequence according to the hardware performance ratio and the rendering complexity ratio; For the hardware performance ratio and rendering complexity ratio of each CPU rendering node, the absolute value of the difference between the hardware performance ratio and the rendering complexity ratio is calculated as the first absolute value of the difference, and the matching suitability is negatively correlated with the first absolute value of the difference.

5. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 1, characterized in that: The method for obtaining the rendering environment parameter change rate is: For each CPU rendering node, obtain its historically processed rendering tasks as the historical rendering tasks of the CPU rendering node; Obtain the CPU usage, memory usage, and temperature data of historical rendering tasks of each CPU rendering node through the distributed rendering client; Calculate the absolute value of the difference between the CPU usage of the historical rendering tasks of each CPU rendering node and the CPU usage of the sub-rendering task to be rendered as a first usage difference absolute value, obtain the maximum value between the CPU usage of the historical rendering tasks of each CPU rendering node and the CPU usage of the sub-rendering task to be rendered as a maximum usage rate, and calculate the ratio of the first usage difference absolute value to the maximum usage rate as the change rate of the rendering environment change parameter of each CPU rendering node in the dimension of CPU usage rate; For memory usage and temperature data, the same method as CPU usage is used to obtain the dimensional change rate of memory usage and temperature data of each CPU rendering node; For each CPU rendering node, the sum of all dimension change rates of the CPU rendering node is calculated as the rendering environment parameter change rate of each CPU rendering node.

6. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 5, characterized in that: The method for obtaining the rendering similarity is: Setting rendering preset parameters, wherein the rendering preset parameters include light intensity, number of light sources and texture quality; For each CPU rendering node, the absolute value of the difference between the same type of rendering preset parameters of the historical rendering tasks of the CPU rendering node and the sub-rendering tasks to be processed is calculated as the first rendering difference absolute value, the maximum value between the same type of rendering preset parameters of the historical rendering tasks of the CPU rendering node and the sub-rendering tasks to be processed is obtained as the first rendering maximum value, the ratio of the first rendering difference absolute value to the first rendering maximum value is calculated as the first rendering preset ratio of each rendering preset parameter of the same type, and the sum of all the first rendering preset ratios of the CPU rendering nodes is taken as the rendering parameter change rate of each CPU rendering node; The same method as each sub-rendering task is used to obtain the rendering complexity of the historical rendering tasks of each CPU rendering node; For each CPU rendering node, the absolute value of the difference between the rendering complexity of the historical rendering task and the sub-rendering task to be rendered is calculated as the rendering complexity change rate of each CPU rendering node; The rendering similarity is acquired according to the rendering parameter change rate and the rendering complexity change rate, and the rendering similarity is negatively correlated with the rendering parameter change rate and the rendering complexity change rate, respectively.

7. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 5, characterized in that: The method for obtaining the load balancing degree is: Obtaining historical rendering task references of each historical reference task of each CPU rendering node according to the rendering similarity and the rendering environment parameter change rate, wherein the historical rendering task references are positively correlated with the rendering similarity and negatively correlated with the rendering environment parameter change rate; For each CPU rendering node, a preset number of historical rendering tasks with the greatest reference value are selected as historical reference rendering tasks of each CPU rendering node; For each CPU rendering node, the rendering duration of all historical reference rendering tasks of the CPU rendering node is used as the input of the AR model, and the first predicted duration of the sub-rendering task to be rendered of the CPU rendering node is output; Using the same method as the first prediction duration, the rendering duration of the unfinished historical rendering tasks of each CPU rendering node is predicted to obtain a second prediction duration; The sum of the first predicted duration and the second predicted duration of each CPU rendering node is used as the estimated completion duration of the sub-rendering task to be rendered of each CPU rendering node; The dimensions of each particle in the particle swarm algorithm correspond to each CPU rendering node; The inverse of the variance of the estimated completion time of the sub-rendering tasks to be rendered of all CPU rendering nodes corresponding to each particle is used as the load balancing degree of each particle.

8. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 7, characterized in that: The individual optimal particles and the overall optimal particles include: According to the load balance and matching suitability of the particles, the load matching fitness of each particle is obtained, and the load matching fitness is positively correlated with the load balance and matching suitability; For each particle in the particle swarm algorithm, obtain the number of iterations of the particle, and obtain the individual optimal particle and the overall optimal particle during the iteration process; The individual optimal particle is the particle with the largest load matching fitness during the iteration process, and the overall optimal particle is the particle with the largest load matching fitness among all particles during the iteration process.

9. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 8, characterized in that: The method for obtaining the neighbor iterative fitness change value and the fitness difference characteristic value is: The iteration with the preset number of times closest to the current iteration number of the particle is recorded as the neighbor iteration of each particle; Obtain the load matching fitness of the particle in each iteration of the particle's neighbor iteration, obtain the absolute value of the difference between the load matching fitness of the particle in each iteration and the next iteration as the first fitness difference absolute value, calculate the absolute value of the difference between the number of the next iteration of the particle and the number of its iteration as the first iteration difference absolute value, calculate the ratio between the first fitness difference absolute value and the first iteration difference absolute value as the first ratio, and take the sum of all first ratios of each particle in its neighbor iteration as the neighbor iteration fitness change value of each particle in its iteration number; For each particle, the absolute value of the difference between the load matching fitness of the particle at the Kth iteration and the K-1th iteration is obtained as the second absolute value of the difference, the absolute value of the difference between the load matching fitness of the particle at the Kth iteration and the overall optimal particle is calculated as the third absolute value of the difference, and the absolute value of the difference between the particle at the Kth iteration and the individual optimal particle is calculated as the fourth absolute value of the difference; The sum of the second difference absolute value, the third difference absolute value and the fourth difference absolute value of the particle in the iteration process is calculated as the fitness difference characteristic value of the particle in the Kth iteration.

10. The distributed 3D intelligent rendering method based on CPU environment as claimed in claim 1, characterized in that: The step of obtaining the adjusted inertia weight of each particle in each iteration and dividing each sub-rendering task includes: The preset initial inertia weight is used as the inertia weight of the first iteration of the particle swarm algorithm; For each iteration of each particle, if the neighbor iteration fitness change value is greater than 0, the adjusted inertia weight of each iteration of each particle is the product of the fitness difference characteristic value of each iteration of each particle and the inertia weight of the previous iteration; If the neighbor iteration fitness change value is less than 0, the sum of the fitness difference characteristic value of each iteration of each particle and a preset constant is calculated, and the product of the sum and the inertia weight of the previous iteration is calculated as the adjusted inertia weight of each iteration of each particle; If the neighbor iteration fitness change value is equal to 0, the adjusted inertia weight of each particle in each iteration is the inertia weight of the previous iteration; The particle group is iterated according to the adjusted inertia weight of each particle, and each sub-rendering task is divided.