A method for allocating computing power in an AI intelligent cluster for offline rendering task sharding
By performing region clustering and complexity identification on the original rendered image, a computing power prediction model is established, which solves the problems of unreasonable rendering task fragmentation and low resource utilization, and achieves more efficient rendering task processing and resource utilization.
Patent Information
- Application Number
- CN202611300497.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-17
AI Technical Summary
Existing intelligent cluster computing power allocation methods fail to fully consider the overlap and morphological correlation of rendering regions between original frames in offline rendering tasks, resulting in unreasonable rendering task fragmentation, increased cluster scheduling pressure, and difficulty in accurately predicting rendering complexity and computing power consumption, thus reducing resource utilization.
By acquiring original frame images for rendering, clustering and complexity identification of rendering regions are performed to establish a rendering computing power prediction model. Task fragmentation and computing power allocation are then performed based on the pixel features of the rendering regions to optimize the grouping of rendering tasks and resource utilization.
It improved the task processing throughput of the rendering cluster, reduced resource waste, and enhanced the accuracy of computing power allocation and the efficiency of cluster resource utilization.
Smart Images

Figure CN123118341A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image rendering and relates to computing power allocation technology, specifically an AI intelligent cluster computing power allocation method for offline rendering task sharding. Background Technology
[0002] Existing intelligent cluster computing power allocation methods have the following drawbacks when allocating tasks for offline rendering: 1. Existing intelligent cluster computing power allocation methods tend to divide tasks based on superficial information such as the number of tasks and file size, and rarely consider pixel-dimensional features such as the overlap of rendering regions and the morphological correlation between different rendering original frames. This makes it difficult to divide original frames with a high degree of rendering coupling into the same group, which is not conducive to the reuse of rendering preprocessing resources. As a result, the task fragmentation lacks rationality, which to some extent increases the cluster scheduling pressure and restricts the overall task processing throughput of the rendering cluster. 2. Existing intelligent cluster computing power allocation methods have difficulty combining the texture complexity and contour complexity of the original frame image to quantify the rendering complexity. It is difficult to predict the rendering computing power consumption based on the quantized rendering complexity, which can easily lead to a decrease in the utilization rate of cluster computing power resources.
[0003] Therefore, this application proposes a method for allocating computing power in an AI intelligent cluster for offline rendering task sharding. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method for allocating AI intelligent cluster computing power for offline rendering task sharding, thereby improving the efficiency of cluster computing power utilization.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for allocating computing power in an AI intelligent cluster for offline rendering task sharding, comprising: Step S1: Acquire the pre-rendered image video stream and extract the original rendering frame image. Group the original rendering frame images by rendering region clustering to obtain the rendered image grouping data. Step S2: Based on the rendered image grouping data, identify the rendering region complexity of the original rendered frame marker images in the clustered image group, and obtain the rendering complexity corresponding to each original rendered frame marker image based on the identification results, thus obtaining image rendering complexity identification data. Step S3: Collect the rendering complexity and rendering computing power consumption values of historical images that have been rendered offline, and create a rendering computing power prediction model based on this. The rendering computing power prediction model predicts the computing power consumption value of the original frame marked image based on the image rendering complexity recognition data, and obtains the rendering computing power prediction data. Step S4: Allocate cluster computing power to the original frame image for rendering based on the rendered image grouping data and the rendering computing power prediction data.
[0006] Furthermore, in step S1, the specific steps are as follows: Step S11: Acquire the image and video stream that needs to be rendered offline to obtain a pre-rendered image and video stream, and extract the pre-rendered image and video stream into several original rendering frame images frame by frame. Step S12: Acquire historical original frame images and mark the areas to be rendered to obtain multiple historical rendering marked images and create a rendering area recognition model based on them; Step S13: Use the rendering region recognition model to mark the pixel rendering regions in the original rendering frame image to obtain the marked image of the original rendering frame; Step S14: Collect the pixel rendering area values of each rendered original frame marker image, and mark the rendered original frame marker image corresponding to the largest pixel rendering area value as the T1 original frame image. Step S15: Among the original frame marker images for rendering other than the pre-selected original frame images, arbitrarily select one T2 original frame image, perform pixel rendering region matching analysis on the T1 original frame image and the T2 original frame image, and obtain the rendering coupling coordinate point corresponding to the T2 original frame image based on the analysis results. Step S16: Replace the T2 original frame image with the original frame marker image and perform rendering coupling analysis with the T1 original frame image. Based on the analysis results, obtain the rendering coupling coordinate points corresponding to each original frame marker image and mark them in the rendering coupling coordinate system. Step S17: Create a coupling coordinate circle in the rendering coupling coordinate system. If the rendering coupling coordinate point is not located in the coupling coordinate circle, the original frame marker image is not clustered. If the rendering coupling coordinate point is located in the coupling coordinate circle, the corresponding original frame marker image is clustered into the image group containing the original frame image T1, thus obtaining the clustered image group corresponding to the original frame image T1. Step S18: Replace the T1 original frame image with the un-clustered rendered original frame marker image, and perform image clustering on the replaced T1 original frame image until the replacement of the T1 original frame image with a rendered original frame marker image is completed, and obtain the clustered image group corresponding to the replaced T1 original frame image to obtain the rendered image grouping data.
[0007] Furthermore, in step S5, the specific steps are as follows: Step S151: Use the original frame image of T1 to cover the original frame image of T2, and control the geometric center point of the original frame image of T1 to coincide with the geometric center point of the original frame image of T2; Step S152: Mark the pixel rendering area in the original frame image T1 as N1 to be rendered, mark the pixel rendering area in the original frame image T2 as N2 to be rendered, and take the intersection of N1 and N2 to be rendered to obtain N12 intersection area. Step S153: Obtain the area value corresponding to the N12 intersection region, obtain the area value of the rendering overlapping region, obtain the image area value corresponding to the T1 original frame image, obtain the area value of the original frame image, calculate the difference between the area value of the original frame image and the area value of the rendering overlapping region, calculate the ratio of the obtained difference to the area value of the original frame image, and obtain the area ratio of the non-intersection rendering region. Step S154: Perform overlapping pixel channel deviation analysis on the N12 intersection region, and obtain the average deviation rate of overlapping pixel channels based on the analysis results; Step S155: Perform neighborhood pixel clustering analysis on the N12 intersection region, and obtain the neighborhood rendering position deviation rate based on the analysis results; Step S156: Create a rendering coupling coordinate system. Mark the coordinates of the non-intersecting rendering area ratio on the x-axis, the average deviation rate of overlapping pixel channels on the y-axis, and the neighborhood rendering position deviation rate on the z-axis in the rendering coupling coordinate system to obtain the rendering coupling coordinate points corresponding to the original frame image T2.
[0008] Furthermore, in step S154, the specific steps are as follows: Discretize the N12 intersection region into several region pixels, and arbitrarily select a pre-selected region pixel from the discrete region pixels. Obtain the Alpha channel value corresponding to the pre-selected region pixel in the N1 region to be rendered, and obtain the N1 pre-selected channel value. Obtain the Alpha channel value corresponding to the pre-selected region pixel in the N2 region to be rendered, and obtain the N2 pre-selected channel value. Calculate the difference between the N1 and N2 pre-selected channel values, and take the absolute value of the difference to obtain the N12 channel difference corresponding to the pre-selected region pixel. The values of the N1 pre-selected channel and the N2 pre-selected channel are compared. If the value of the N1 pre-selected channel is greater than or equal to the value of the N2 pre-selected channel, the ratio of the N12 channel difference to the N1 pre-selected channel value is calculated to obtain the pixel channel deviation rate corresponding to the pixel point in the pre-selected area. For each pixel in the N12 intersection region, the pixel channel deviation rate is collected, and the average of the collected pixel channel deviation rates is calculated to obtain the average deviation rate of the overlapping pixel channels.
[0009] Furthermore, in step S155, the specific steps are as follows: The independent intersection sub-regions contained within the N12 intersection region are obtained, resulting in multiple N12 intersection sub-regions. One pre-selected intersection sub-region is then randomly selected from the multiple obtained N12 intersection sub-regions. Obtain the geometric center point corresponding to the preselected intersection sub-region to get the center point of the preselected region. Create a neighborhood pixel circle with the center point of the preselected region as the center. Select a number of preselected pixels from the circumference of the neighborhood pixel circle. Using the center point of the pre-selected region as the starting point of the ray, draw rays that pass through different pre-selected pixels on the circumference to obtain multiple pre-selected circumference rays, and mark one pre-selected ray M1 among the obtained pre-selected circumference rays; The overlapping area between the M1 preselected ray and the N1 region to be rendered is collected to obtain multiple N1 ray coverage segments. The N1 ray coverage segment that is closest to the center point of the preselected region is marked as the N1 ray neighborhood segment. The overlapping area between the M1 preselected ray and the N2 region to be rendered is collected to obtain multiple N2 ray coverage segments. The N2 ray coverage segment that is closest to the center point of the preselected region is marked as the N2 ray neighborhood segment.
[0010] Furthermore, in step S155, the specific steps are as follows: The length values of the N1 ray neighborhood segment and the N2 ray neighborhood segment are obtained separately. The length values of the N1 segment and the N2 segment are then averaged to obtain the mean length of the N12 segment. The differences between the length values of the N1 segment and the N2 segment and the mean length of the N12 segment are calculated to obtain the mean difference of the N1 segment and the mean difference of the N2 segment. If the mean difference of the N1 segment is greater than or equal to the mean difference of the N2 segment, the difference between the mean difference of the N1 segment and the mean difference of the N2 segment is calculated to obtain the relative deviation of the N12 segment length. If the mean difference of the N1 segment is less than the mean difference of the N2 segment, the difference between the mean difference of the N2 segment and the mean difference of the N1 segment is calculated to obtain the relative deviation of the N12 segment length. The ratio of the relative deviation of the N12 segment length to the mean length of the N12 segment is calculated to obtain the relative deviation rate of the N12 segment length. Obtain the coverage starting point of the N1 ray neighborhood segment in the M1 preselected ray, and obtain the N1 ray coverage starting point. Obtain the coverage starting point of the N2 ray neighborhood segment in the M1 preselected ray, and obtain the N2 ray coverage starting point. Obtain the distance value between the N1 ray coverage starting point and the N2 ray coverage starting point, and obtain the N12 initial coverage distance difference. Calculate the product of the initial coverage distance difference of N12 and the relative deviation rate of the length of N12 to obtain the neighborhood rendering deviation rate corresponding to the preselected ray of M1; Repeat the process of obtaining the neighborhood rendering deviation rate corresponding to the M1 preselected ray, obtain the neighborhood rendering deviation rate corresponding to each circumferential preselected ray and take the average value to obtain the neighborhood rendering position deviation rate.
[0011] Furthermore, in step S2, the specific steps are as follows: Step S21: Obtain the rendered image grouping data, obtain the rendered original frame label images in each clustered image group according to the rendered image grouping data, and select the pre-selected original frame label images from them; Step S22: Perform rendering complexity analysis on the pre-selected original frame marker image, and obtain the rendering complexity corresponding to the pre-selected original frame marker image based on the analysis results; Step S23: Obtain the rendering complexity corresponding to each rendered original frame marker image to obtain image rendering complexity identification data; In step S22, the specific steps are as follows: Step S221: Perform pixel grayscale gradient analysis on the pre-selected original frame marker image, and obtain the image texture complexity corresponding to the pre-selected original frame marker image based on the analysis results; Step S222: Perform contour morphology analysis on the pre-selected original frame marker image, and obtain the image contour complexity corresponding to the pre-selected original frame marker image based on the analysis results; Step S223: Collect the area of the region to be rendered in the pre-selected original frame marked image to obtain the area value to be rendered. Calculate the product of the area value to be rendered and the image contour complexity to obtain the first image rendering weight value. Calculate the product of the area value to be rendered and the image contour complexity to obtain the second image rendering weight value. Sum the first image rendering weight value and the second image rendering weight value to obtain the rendering complexity corresponding to the pre-selected original frame marked image.
[0012] Furthermore, in step S221, the specific steps are as follows: The pre-selected original frame marker image is grayscaled to obtain the sample original frame grayscale image. The area to be rendered in the sample original frame grayscale image is discretized into several rendering pixels, and one sample rendering pixel is arbitrarily selected from the multiple discrete rendering pixels. In the grayscale image of the original sample frame, the eight neighboring pixels of the sample rendering pixel are collected, and the pixel depth values of the sample rendering pixel and its eight neighboring pixels are obtained respectively, and the neighborhood pixel depth matrix corresponding to the sample rendering pixel is constructed. For the neighborhood pixel depth matrix, create a horizontal standard matrix and a vertical standard matrix. Multiply the corresponding matrix elements of the horizontal standard matrix with the corresponding matrix elements of the neighborhood pixel depth matrix in turn. Sum the results of the multiplication to obtain the horizontal gradient value corresponding to the sample rendering pixel. Multiply the corresponding matrix elements of the vertical standard matrix with the corresponding matrix elements of the neighborhood pixel depth matrix in turn. Sum the results of the multiplication to obtain the vertical gradient value corresponding to the sample rendering pixel. The horizontal gradient value Gx and the vertical gradient value Gy are used to calculate the pixel gradient magnitude corresponding to the pixel of the sample rendering. Repeat the process of obtaining the pixel gradient magnitude corresponding to the sample rendered pixel, obtain the pixel gradient magnitude corresponding to each rendered pixel and calculate the average to obtain the average pixel gradient magnitude. The maximum pixel gradient magnitude collected in history is obtained to get the historical comparison magnitude. The ratio of the average pixel gradient magnitude to the historical comparison magnitude is calculated to obtain the image texture complexity.
[0013] Furthermore, in step S222, the specific steps are as follows: For the region to be rendered in the pre-selected original frame marked image, the contour-closed sub-regions contained in the region to be rendered are obtained to obtain independent rendering sub-regions; Select any one of the multiple independent rendering sub-regions to perform contour extraction on the pre-selected rendering sub-region to obtain the pre-selected closed contour line. For a pre-selected closed contour line, a traversal point group containing three contour sampling points is created. Based on the traversal point group, the contour morphology of the pre-selected closed contour line is analyzed. Based on the analysis results, the closed direct connection contour ratio corresponding to the pre-selected closed contour line is obtained. Specifically as follows: The contour sampling points contained in the traversed point group are named P1 contour sampling point, P2 contour sampling point and P3 contour sampling point respectively. In the pre-selected closed contour line, connect the P1 contour sampling point and the P3 contour sampling point to obtain the first sampling line. Collect the midpoint of the first sampling line to obtain the midpoint of the sampling line. Connect the P2 contour sampling point and the midpoint of the sampling line to obtain the second sampling line. Calculate the ratio of the length of the first sampled connection line to the length of the second sampled connection line to obtain the contour straight connection ratio corresponding to the traversed point group; The pre-selected closed contour line is moved and traversed using the traversal point group, and the contour direct connection ratio corresponding to each traversal position is obtained and the average value is taken to obtain the closed direct connection contour ratio corresponding to the pre-selected closed contour line. Repeat the process of obtaining the closed direct connection ratio corresponding to the pre-selected closed contour line, obtain the closed direct connection ratio corresponding to each independent rendering sub-region, and calculate the average closed contour direct connection ratio. The average direct connection ratio of the largest closed contour collected in history is obtained to get the historical comparison direct connection ratio. The ratio of the average direct connection ratio of the closed contour to the historical comparison direct connection ratio is calculated to obtain the image contour complexity.
[0014] Furthermore, in step S4, the specific steps are as follows: Step S41: Obtain rendering image grouping data. Based on the rendering image grouping data, obtain multiple clustered image groups. In each clustered image group, sum the areas of the regions to be rendered in each original frame marker image to obtain the sum of the areas of the regions to be rendered corresponding to each clustered image group. Sort the clustered image groups by rendering priority based on the sum of the areas of the regions to be rendered in descending order to obtain the rendering sorting sequence. Step S42: Mark the clustered image group that is at the top of the rendering sorting sequence as the first image group, and allocate rendering computing power to the first image group; Specifically as follows: Obtain rendering computing power prediction data, collect rendering computing power consumption prediction values for the original rendering frames contained in the first image group based on the rendering computing power prediction data, sum the obtained multiple rendering computing power consumption prediction values to obtain the grouped computing power consumption cumulative value. The rendering computing power that the offline rendering terminal can provide is collected to obtain the available rendering computing power value of the terminal. If the available rendering computing power value of the terminal is greater than or equal to the cumulative value of the grouped computing power consumption, the computing power is allocated to each original frame image based on the predicted value of the rendering computing power consumption. If the available rendering computing power of the terminal is less than the cumulative value of the grouped computing power consumption, the ratio of the predicted value of the rendering computing power consumption corresponding to each rendered original frame image to the cumulative value of the grouped computing power consumption is obtained to obtain the real-time computing power allocation weight. The product of each real-time computing power allocation weight and the available rendering computing power of the terminal is calculated to obtain the terminal computing power quota value corresponding to each rendered original frame image. The computing power is then allocated to each rendered original frame image based on the terminal computing power quota value. Step S43: Allocate rendering computing power to each clustered image group in sequence based on the rendering sorting sequence.
[0015] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. This invention completes coupled rendering clustering of the rendered image based on the pixel features of the region to be rendered, and realizes grouping of the original frame images based on the clustering results. This invention fully considers pixel-level features such as the overlap of rendering regions and morphological correlation between different original frames, and can divide the rendering original frames with high coupling into the same group, which facilitates the reuse of rendering preprocessing related data within the group, reduces unnecessary repeated calculations, optimizes the task fragmentation granularity, alleviates the computational pressure of the cluster scheduling module to a certain extent, and helps to improve the overall task processing throughput of the rendering cluster. 2. This invention can quantify the texture complexity and contour complexity of the original frame image to obtain the rendering complexity, and then use the rendering complexity to predict the rendering computing power consumption value. Combined with the pixel details and contour features of the image itself, a reproducible quantitative index is obtained. By fitting historical samples, a computing power prediction model is constructed, which can relatively accurately estimate the computing power resources required for single frame rendering, making the computing power allocation more in line with the actual rendering load of the image, reducing the waste of resources caused by computing power mismatch, and effectively improving the accuracy of cluster computing power allocation. Attached Figure Description
[0016] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.
[0017] Figure 1 This is a diagram illustrating the implementation steps of the present invention; Figure 2 This is a schematic diagram of the neighboring pixel circle of the present invention; Figure 3 This is a schematic diagram of the center point of the pre-selected region in this invention; Figure 4 This is a schematic diagram of the contour sampling points of the present invention. Detailed Implementation
[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0019] Example 1 Please see Figure 1 This invention provides a technical solution: a method for allocating computing power in an AI intelligent cluster for offline rendering task sharding, comprising the following steps: Step S1: Acquire the pre-rendered image video stream and extract the original rendering frame image. Group the original rendering frame images by rendering region clustering to obtain the rendered image grouping data. The specific steps in step S1 are as follows: The image and video streams that need to be rendered offline are acquired to obtain a pre-rendered image and video stream, and the pre-rendered image and video stream is extracted frame by frame into several original rendering frame images. The historical original frame images that have completed the identification of the areas to be rendered are acquired to obtain historical original frame images. The areas to be rendered in the historical original frame images are marked to obtain multiple historical rendering marked images.
[0020] Specifically as follows: The original historical frame image is converted to grayscale to obtain a grayscale image of the original historical frame. In the grayscale image of the original historical frame, the Alpha channel value is acquired for the solid color background area with uniform pixel depth value to obtain the background pixel channel value, and the transparent pixel channel value is set.
[0021] It should be noted here that: In this application, the background pixel channel value is the Alpha channel reference value obtained from the pure color background area with uniform pixel depth values in the grayscale image of the original historical frame. This value represents the pixel transparency of the static background area and is used to compare the pixel Alpha channel value of the frame to be processed with it, thereby distinguishing the background area that does not need to be rendered from the foreground area that needs to be rendered. In this application, the alpha channel value corresponding to the transparent pixel channel value is specifically 0.
[0022] The original grayscale image of the historical frame is discretized into several image pixels. The Alpha channel value corresponding to each image pixel is obtained. If the Alpha channel value is equal to the background pixel channel value or the transparent pixel channel value, the image pixel is marked as a non-rendered pixel. If the Alpha channel value is not equal to the background pixel channel value or the transparent pixel channel value, the image pixel is marked as a rendered pixel.
[0023] It should be noted here that: In this application, the Alpha channel value referred to herein is the pixel value of the transparency channel, which is independent of the grayscale channel and the pixel depth channel, and is used to characterize the transparency of the corresponding pixel position.
[0024] The image area covered by the rendered pixels is marked in the grayscale image of the original historical frame to obtain the pixel rendering area. The pixel rendering area is then mapped onto the original historical frame image to obtain the historical rendering marked image. The collected historical original frame images are divided into a historical original frame training set and a historical original frame test set. An image AI model is created based on an artificial intelligence platform. The image AI model is trained using the historical original frame test set. The training of the image AI model is completed using each historical rendered and labeled image in the historical original frame training set.
[0025] The image AI model is trained using a historical original frame test set, and the image training pass rate is collected. A model training benchmark pass rate is set. If the image training pass rate is greater than or equal to the model training benchmark pass rate, the image AI model training is completed and a rendering region recognition model is obtained. If the image training pass rate is less than the model training benchmark pass rate, the image AI model is trained again using the historical original frame training set until the image training pass rate is greater than or equal to the model training benchmark pass rate.
[0026] It should be noted here that: In this application, the ratio of the number of historical original frame images in the historical original frame training set to the number of historical original frame test sets is 3:7; In this application, the model training benchmark pass rate is specifically set to 95%, and the artificial intelligence platform referred to herein is an artificial intelligence platform.
[0027] The pixel rendering regions in the original rendered frame image are marked using a rendering region recognition model to obtain a marked original rendered frame image. Collect the pixel rendering area values of each rendered original frame marker image, compare the pixel rendering area values, and mark the rendered original frame marker image corresponding to the largest pixel rendering area value as the T1 original frame image. In the original frame marker images of rendering other than the pre-selected original frame images, arbitrarily select one T2 original frame image, perform pixel rendering region matching analysis on the T1 original frame image and the T2 original frame image, and obtain the rendering coupling coordinate point corresponding to the T2 original frame image based on the analysis results. Specifically as follows: The original T1 frame image is used to cover the original T2 frame image, and the geometric center point of the original T1 frame image is kept to coincide with the geometric center point of the original T2 frame image. It should be noted here that: In this application, the original frame image T1 is used to cover the original frame image T2, and the geometric shape of the original frame image T1 is consistent with the spatial pose parameters of the original frame image T2.
[0028] In this application, spatial pose parameters are used to characterize the placement and tilting posture of an image. The spatial pose parameters involved here include, but are not limited to, horizontal offset, vertical offset, and horizontal tilt angle.
[0029] Mark the pixel rendering area in the original frame image T1 as the N1 region to be rendered, and mark the pixel rendering area in the original frame image T2 as the N2 region to be rendered. Take the intersection of the N1 region to be rendered and the N2 region to be rendered to obtain the N12 intersection region. Obtain the area value corresponding to the N12 intersection region to get the area value of the rendered overlapping region. Obtain the image area value corresponding to the T1 original frame image to get the area value of the original frame image. Calculate the difference between the area value of the original frame image and the area value of the rendered overlapping region. Calculate the ratio of the obtained difference to the area value of the original frame image to get the area ratio of the non-intersection rendering region.
[0030] An analysis of overlapping pixel channel deviation was performed on the N12 intersection region, and the average deviation rate of overlapping pixel channels was obtained based on the analysis results. Specifically as follows: Discretize the N12 intersection region into several region pixels, and arbitrarily select a pre-selected region pixel from the discrete region pixels. Obtain the Alpha channel value corresponding to the pre-selected region pixel in the N1 region to be rendered, and obtain the N1 pre-selected channel value. Obtain the Alpha channel value corresponding to the pre-selected region pixel in the N2 region to be rendered, and obtain the N2 pre-selected channel value. Calculate the difference between the N1 and N2 pre-selected channel values, and take the absolute value of the difference to obtain the N12 channel difference corresponding to the pre-selected region pixel. The values of the N1 pre-selected channel and the N2 pre-selected channel are compared. If the value of the N1 pre-selected channel is greater than or equal to the value of the N2 pre-selected channel, the ratio of the N12 channel difference to the N1 pre-selected channel value is calculated to obtain the pixel channel deviation rate corresponding to the pixel point in the pre-selected area. Repeat the process of collecting the pixel channel deviation rate corresponding to the pixels in the pre-selected region. Collect the pixel channel deviation rate for each pixel in the N12 intersection region, and calculate the average of the collected pixel channel deviation rates to obtain the average deviation rate of the overlapping pixel channels. Neighborhood pixel clustering analysis was performed on the N12 intersection region, and the neighborhood rendering position deviation rate was obtained based on the analysis results.
[0031] Specifically as follows: The independent intersection sub-regions contained within the N12 intersection region are obtained, resulting in multiple N12 intersection sub-regions. One pre-selected intersection sub-region is then randomly selected from the multiple obtained N12 intersection sub-regions. Please see Figure 2 The geometric center point corresponding to the preselected intersection sub-region is obtained to obtain the center point of the preselected region. A neighborhood pixel circle is created with the center point of the preselected region as the center. Several preselected pixels are selected in the circumferential region corresponding to the neighborhood pixel circle. It should be noted here that: In this application, the central angle corresponding to any two adjacent pre-selected pixels in the neighborhood pixel circumference area is a preset central angle, and the specific angle value corresponding to the preset central angle is 1 degree.
[0032] Please see Figure 3 Using the center point of the pre-selected region as the starting point of the ray, draw rays that pass through different pre-selected pixels on the circumference to obtain multiple pre-selected circumference rays, and mark one pre-selected ray M1 among the obtained pre-selected circumference rays. The overlapping area between the M1 preselected ray and the N1 region to be rendered is collected to obtain multiple N1 ray coverage segments. The N1 ray coverage segment that is closest to the center point of the preselected region is marked as the N1 ray neighborhood segment. The overlapping area between the M1 preselected ray and the N2 region to be rendered is collected to obtain multiple N2 ray coverage segments. The N2 ray coverage segment that is closest to the center point of the preselected region is marked as the N2 ray neighborhood segment. Obtain the length values of the N1 ray neighborhood segment and the N2 ray neighborhood segment respectively. Calculate the average length of the N1 and N2 segments. Calculate the difference between the N1 and N2 segment length values and the average length of the N12 segment. If the N1 segment average difference is greater than or equal to the N2 segment average difference, calculate the difference between the N1 and N2 segment average differences to obtain the relative deviation of the N12 segment length. If the N1 segment average difference is less than the N2 segment average difference, calculate the difference between the N2 and N1 segment average differences to obtain the relative deviation of the N12 segment length. Calculate the ratio of the relative deviation of the N12 segment length to the average length of the N12 segment to obtain the relative deviation rate of the N12 segment length.
[0033] Obtain the coverage starting point of the N1 ray neighborhood segment in the M1 preselected ray, and obtain the N1 ray coverage starting point. Obtain the coverage starting point of the N2 ray neighborhood segment in the M1 preselected ray, and obtain the N2 ray coverage starting point. Obtain the distance value between the N1 ray coverage starting point and the N2 ray coverage starting point, and obtain the N12 initial coverage distance difference. Calculate the product of the initial coverage distance difference of N12 and the relative deviation rate of the length of N12 to obtain the neighborhood rendering deviation rate corresponding to the preselected ray of M1; Repeat the process of obtaining the neighborhood rendering deviation rate corresponding to the M1 preselected ray, obtain the neighborhood rendering deviation rate corresponding to each circumferential preselected ray and take the average value to obtain the neighborhood rendering position deviation rate. Create a rendering coupling coordinate system. Mark the coordinates of the non-intersecting rendering area ratio on the x-axis, the average deviation rate of overlapping pixel channels on the y-axis, and the neighborhood rendering position deviation rate on the z-axis in the rendering coupling coordinate system to obtain the rendering coupling coordinate points corresponding to the T2 original frame image. The T2 original frame image is replaced with the original frame image marked by the original frame of the rendering, and the rendering coupling degree is analyzed with the T1 original frame image. Based on the analysis results, the rendering coupling coordinate points corresponding to each original frame image are obtained and marked in the rendering coupling coordinate system. Set the coupling coordinate distance. In the rendering coupling coordinate system, create a coupling coordinate circle with the origin as the center and the radius as the coupling coordinate distance. If the rendering coupling coordinate point is not on the coupling coordinate circle, the original frame marker image will not be clustered. If the rendering coupling coordinate point is on the coupling coordinate circle, the corresponding original frame marker image will be clustered into the image group containing the original frame image T1, thus obtaining the clustered image group corresponding to the original frame image T1.
[0034] It should be noted here that: The system acquires historical original frame images with drastic coupling after rendering, obtains the radius of the coupling coordinate circle corresponding to each historical original frame image, compares the values of multiple coupling coordinate circle radii, and sets the minimum coupling coordinate circle radius as the coupling coordinate distance.
[0035] The T1 original frame image is replaced with the original frame image of the rendered original frame that has not been clustered, and the replaced T1 original frame image is clustered until the replacement of the T1 original frame image by one frame of rendered original frame image is completed, and the clustered image group corresponding to the replaced T1 original frame image is obtained to obtain the rendered image grouping data. Step S2: Based on the rendered image grouping data, identify the rendering region complexity of the original frame marker images in the clustered image group, and obtain the rendering complexity of each original frame marker image according to the identification results, thus obtaining the image rendering complexity identification data.
[0036] In step S2, the specific steps are as follows: Obtain the rendered image grouping data, and based on the rendered image grouping data, obtain the rendered original frame label images in each clustered image group, and select the pre-selected original frame label images from them; Rendering complexity analysis is performed on the preselected original frame marked image, and the rendering complexity corresponding to the preselected original frame marked image is obtained based on the analysis results; Specifically as follows: Pixel grayscale gradient analysis is performed on the preselected original frame marker image, and the image texture complexity corresponding to the preselected original frame marker image is obtained based on the analysis results; Specifically as follows: The pre-selected original frame marker image is grayscaled to obtain the sample original frame grayscale image. The area to be rendered in the sample original frame grayscale image is discretized into several rendering pixels, and one sample rendering pixel is arbitrarily selected from the multiple discrete rendering pixels. In the grayscale image of the original sample frame, the eight neighboring pixels of the sample rendering pixel are collected, and the pixel depth values of the sample rendering pixel and its eight neighboring pixels are obtained respectively. The neighborhood pixel depth matrix corresponding to the sample rendering pixel is then constructed. It should be noted here that: In this application, the eight neighboring pixels referred to herein are specifically the adjacent pixels around the sample-rendered pixel, including the pixels above, below, left, right, and four diagonally opposite pixels.
[0037] Create a horizontal standard matrix and a vertical standard matrix Sy for the neighborhood pixel depth matrix. Multiply the horizontal standard matrix Sx with the corresponding matrix elements in the neighborhood pixel depth matrix in turn, and sum the results to obtain the horizontal gradient value Gx corresponding to the sample rendering pixel. Multiply the vertical standard matrix Sy with the corresponding matrix elements in the neighborhood pixel depth matrix in turn, and sum the results to obtain the vertical gradient value Gy corresponding to the sample rendering pixel.
[0038] It should be noted here that: In this application, the horizontal standard matrix involved herein ; Vertical standard matrix If the neighborhood pixel depth matrix is ; Then the lateral gradient value lateral gradient value .
[0039] The horizontal gradient value Gx and the vertical gradient value Gy are used to calculate the pixel gradient magnitude corresponding to the pixel of the sample rendering. The specific formula for calculating the pixel gradient magnitude is as follows: ; Where Tfd is the pixel gradient magnitude, Gx is the horizontal gradient value, and Gy is the vertical gradient value; It should be noted here that: In this application, the pixel gradient magnitude is calculated using the above formula, and the horizontal and vertical gradient information is fused using the principle of two-dimensional vector magnitude to eliminate the interference of the positive and negative gradient directions on the determination of the intensity of change. It can be adapted to solve the intensity of change of various texture edges such as horizontal, vertical and diagonal. The calculation result only represents the degree of drastic change of pixel grayscale and is independent of the edge orientation. It provides a unified and reproducible basic value for subsequent gradient mean statistics of foreground area and texture complexity quantification, ensuring the stability and reliability of the rendering computing power prediction results. The following test data exists during the calculation of pixel gradient magnitude: Repeat the process of obtaining the pixel gradient magnitude corresponding to the sample rendered pixel, obtain the pixel gradient magnitude corresponding to each rendered pixel and calculate the average to obtain the average pixel gradient magnitude. The maximum pixel gradient magnitude collected in history is obtained to get the historical comparison magnitude. The ratio of the average pixel gradient magnitude to the historical comparison magnitude is calculated to obtain the image texture complexity. Contour morphology analysis is performed on the pre-selected original frame marked image, and the image contour complexity corresponding to the pre-selected original frame marked image is obtained based on the analysis results.
[0040] Specifically as follows: For the region to be rendered in the pre-selected original frame marked image, the contour-closed sub-regions contained in the region to be rendered are obtained to obtain independent rendering sub-regions; It should be noted here that: In this application, the contour-closed sub-region referred to herein is specifically the region to be rendered, which is an independent segmented region formed by continuous edge lines connecting end to end, internally connected and with completely closed boundaries.
[0041] Select any one of the multiple independent rendering sub-regions to perform contour extraction on the pre-selected rendering sub-region to obtain the pre-selected closed contour line. For a pre-selected closed contour line, a traversal point group containing three contour sampling points is created. Based on the traversal point group, the contour morphology of the pre-selected closed contour line is analyzed, and the closed direct-connection contour ratio corresponding to the pre-selected closed contour line is obtained according to the analysis results.
[0042] Specifically as follows: Please see Figure 4 The contour sampling points contained in the traversed point group are named P1 contour sampling point, P2 contour sampling point and P3 contour sampling point respectively. It should be noted here that: In this application, in the pre-selected closed contour line, the P2 contour sampling point is located between the P1 contour sampling point and the P3 contour sampling point.
[0043] In the pre-selected closed contour line, connect the P1 contour sampling point and the P3 contour sampling point to obtain the first sampling line. Collect the midpoint of the first sampling line to obtain the midpoint of the sampling line. Connect the P2 contour sampling point and the midpoint of the sampling line to obtain the second sampling line.
[0044] Calculate the ratio of the length of the first sampled connection line to the length of the second sampled connection line to obtain the contour straight connection ratio corresponding to the traversed point group; The pre-selected closed contour line is moved and traversed using the traversal point group, and the contour direct connection ratio corresponding to each traversal position is obtained and the average value is taken to obtain the closed direct connection contour ratio corresponding to the pre-selected closed contour line. It should be noted here that: During the sliding traversal, the sliding step size of contour sampling points P1, P2, and P3 is equal.
[0045] Repeat the process of obtaining the closed direct connection ratio corresponding to the pre-selected closed contour line, obtain the closed direct connection ratio corresponding to each independent rendering sub-region, and calculate the average closed contour direct connection ratio. The average direct connection ratio of the largest closed contour collected in history is obtained to get the historical comparison direct connection ratio. The ratio of the average direct connection ratio of the closed contour to the historical comparison direct connection ratio is calculated to obtain the image contour complexity. The area to be rendered in the pre-selected original frame marked image is collected to obtain the area value to be rendered. The product of the area value to be rendered and the image contour complexity is calculated to obtain the first image rendering weight value. The product of the area value to be rendered and the image contour complexity is calculated to obtain the second image rendering weight value. The first image rendering weight value and the second image rendering weight value are summed to obtain the rendering complexity corresponding to the pre-selected original frame marked image.
[0046] Repeat the process of obtaining the rendering complexity corresponding to the pre-selected original frame marked image, and obtain the rendering complexity corresponding to each rendered original frame marked image to obtain image rendering complexity recognition data. Step S3: Collect the rendering complexity and rendering computing power consumption values of historical images that have been rendered offline, and create a rendering computing power prediction model based on this. The rendering computing power prediction model predicts the computing power consumption value of the original frame marked image based on the image rendering complexity identification data, and obtains the rendering computing power prediction data.
[0047] The specific steps in step S3 are as follows: Collect historical images that have completed offline rendering jobs to obtain multiple historical rendering images, and perform rendering complexity analysis on the historical rendering images to obtain the rendering complexity corresponding to each historical rendering image. The rendering computing power consumed during the actual rendering process of each historical rendered image is obtained, resulting in multiple rendering computing power consumption values; The rendering complexity and rendering computational power consumption corresponding to each historical rendered image are linearly fitted to obtain the rendering computational power prediction model.
[0048] It should be noted here that: In this application, rendering complexity is used as the independent variable and rendering computing power consumption is used as the dependent variable. The least squares method is used to perform univariate linear fitting on the sample data to obtain the slope coefficient and intercept coefficient. After solidifying the two sets of coefficients, the rendering computing power prediction model is obtained. In practice, if five sets of historical rendering samples are collected, their rendering complexities are 10, 20, 30, 40, and 50 respectively, and the corresponding actual rendering computing power consumption values are 0.22 GPU·h, 0.43 GPU·h, 0.61 GPU·h, 0.84 GPU·h, and 1.02 GPU·h respectively, the relationship Y=0.02X+0.02 is obtained by least squares fitting.
[0049] Obtain image rendering complexity identification data, and based on the image rendering complexity identification data, obtain the rendering complexity corresponding to each original frame marked image. Substitute the collected rendering complexity into the rendering computing power prediction model, and obtain the rendering computing power consumption prediction value output by the rendering computing power prediction model to obtain the rendering computing power prediction data.
[0050] Step S4: Allocate cluster computing power to the original frame image for rendering based on the rendered image grouping data and the rendering computing power prediction data; In step S4, the specific steps are as follows: Obtain the rendering image grouping data, obtain multiple clustered image groups based on the rendering image grouping data, sum the areas of the regions to be rendered in each original frame marker image in the clustered image group to obtain the sum of the areas of the regions to be rendered corresponding to each clustered image group, sort the clustered image groups by rendering priority based on the sum of the areas of the regions to be rendered in descending order to obtain the rendering sorting sequence. The cluster image group that is at the top of the rendering sorting sequence is marked as the first image group, and rendering computing power is allocated to the first image group.
[0051] Specifically as follows: Obtain rendering computing power prediction data, collect rendering computing power consumption prediction values for the original rendering frames contained in the first image group based on the rendering computing power prediction data, sum the obtained multiple rendering computing power consumption prediction values to obtain the grouped computing power consumption cumulative value. The rendering computing power that the offline rendering terminal can provide is collected to obtain the available rendering computing power value of the terminal. If the available rendering computing power value of the terminal is greater than or equal to the cumulative value of the grouped computing power consumption, the computing power is allocated to each original frame image based on the predicted value of the rendering computing power consumption. It should be noted here that: In this application, the offline image rendering terminal involved here is specifically a hardware device terminal that undertakes offline rendering calculation tasks. It has graphics rendering computing power, receives rendering segmentation tasks dispatched by the scheduler, and completes rendering calculations for image or video frames. Unlike real-time rendering devices, it does not need to output the screen in real time. It can complete rendering calculations in the background in a non-real-time manner and output the rendering result file after rendering is completed.
[0052] If the available rendering computing power of the terminal is less than the cumulative value of the grouped computing power consumption, the ratio of the predicted value of the rendering computing power consumption corresponding to each rendered original frame image to the cumulative value of the grouped computing power consumption is obtained to obtain the real-time computing power allocation weight. The product of each real-time computing power allocation weight and the available rendering computing power of the terminal is calculated to obtain the terminal computing power quota value corresponding to each rendered original frame image. The computing power is then allocated to each rendered original frame image based on the terminal computing power quota value. The process of allocating rendering computing power to the first image group is repeated, and the rendering computing power is allocated to each clustered image group in turn based on the rendering sorting sequence.
[0053] Compared to the problems described in the background art, this invention performs coupled rendering clustering of the rendered image based on the pixel features of the region to be rendered, and groups the original rendered frames according to the clustering results. This invention fully considers pixel-level features such as the overlap of rendering regions and morphological correlation between different original frames, and can divide the rendered original frames with high coupling into the same group, which facilitates the reuse of rendering preprocessing related data within the group, reduces unnecessary repeated calculations, optimizes the task fragmentation granularity, alleviates the computational pressure on the cluster scheduling module to a certain extent, and helps to improve the overall task processing throughput of the rendering cluster. Furthermore, this invention can quantify the texture complexity and contour complexity of the original frame image to obtain the rendering complexity, and then rely on the rendering complexity to predict the rendering computing power consumption value. By combining the pixel details and contour morphology features of the image itself, a reproducible quantitative index is obtained. By fitting historical samples to construct a computing power prediction model, it can relatively accurately estimate the computing power resources required for single-frame rendering, making the computing power allocation more in line with the actual rendering load of the image, reducing the waste of resources caused by computing power mismatch, and effectively improving the accuracy of cluster computing power allocation.
[0054] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to specific implementation methods. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The present invention is limited only to the technical solutions and their full scope and equivalents.
Claims
1. A method for allocating computing power in an AI intelligent cluster for offline rendering task sharding, characterized in that, Includes the following steps: Step S1: Acquire the pre-rendered image video stream and extract the original rendering frame image. Group the original rendering frame images by rendering region clustering to obtain the rendered image grouping data. Step S2: Perform rendering region complexity identification on the original frame labeled images in the clustered image group, obtain the rendering complexity based on the identification results, and obtain image rendering complexity identification data; Step S3: Collect the rendering complexity and rendering computing power consumption values of historical images that have been rendered offline, create a rendering computing power prediction model, and predict the computing power consumption value of the original frame marked image based on the image rendering complexity recognition data to obtain the rendering computing power prediction data. Step S4: Allocate cluster computing power to the original frame image for rendering based on the rendered image grouping data and the rendering computing power prediction data.
2. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 1, characterized in that, The specific steps in step S1 are as follows: Step S11: Acquire the image and video stream that needs to be rendered offline, obtain the pre-rendered image and video stream, and extract it into several original rendering frames; Step S12: Acquire historical rendered marked images and create a rendering region recognition model; Step S13: Use the rendering region recognition model to mark the pixel rendering regions in the original rendering frame image to obtain the marked image of the original rendering frame; Step S14: Collect the pixel rendering area values of each rendered original frame marker image, and mark the rendered original frame marker image corresponding to the largest pixel rendering area value as the T1 original frame image. Step S15: In the original frame marked image, arbitrarily select the T2 original frame image, perform pixel rendering region matching analysis on the T1 original frame image and the T2 original frame image, and obtain the rendering coupling coordinate point corresponding to the T2 original frame image. Step S16: Obtain the rendering coupling coordinate points corresponding to each original frame marker image and mark them in the rendering coupling coordinate system; Step S17: Create a coupling coordinate circle. If the rendered coupling coordinate point is not within the coupling coordinate circle, the original frame marker image is not clustered. If it is within the circle, the corresponding original frame marker image is clustered into the clustering image group corresponding to the original frame image T1. Step S18: Replace the T1 original frame image with the rendered original frame marker image and perform image clustering until the T1 original frame image is replaced by a rendered original frame marker image, and obtain the rendered image grouping data.
3. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 2, characterized in that, In step S15, the specific steps are as follows: Step S151: Use the original frame image T1 to cover the original frame image T2, and control the geometric center point of the original frame image T1 to coincide with the geometric center point of the original frame image T2; Step S152: Mark the pixel rendering areas in the original frame image T1 and the original frame image T2 as N1 to be rendered area and N2 to be rendered area, respectively, and take the intersection of the rendering areas to obtain the N12 intersection area. Step S153: Obtain the area value corresponding to the N12 intersection region, obtain the area value of the rendering overlapping region, obtain the image area value corresponding to the T1 original frame image, obtain the area value of the original frame image, perform numerical analysis on the rendering overlapping region area value and the original frame image area value, and obtain the non-intersecting rendering region area ratio. Step S154: Perform overlapping pixel channel deviation analysis on the N12 intersection region, and obtain the average deviation rate of overlapping pixel channels based on the analysis results; Step S155: Perform neighborhood pixel clustering analysis on the N12 intersection region, and obtain the neighborhood rendering position deviation rate based on the analysis results; Step S156: Create a rendering coupling coordinate system. Mark the coordinates of the non-intersecting rendering area ratio on the x-axis, the average deviation rate of overlapping pixel channels on the y-axis, and the neighborhood rendering position deviation rate on the z-axis in the rendering coupling coordinate system to obtain the rendering coupling coordinate points corresponding to the original frame image T2.
4. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 3, characterized in that, In step S154, the specific steps are as follows: Discretize the N12 intersection region into several region pixels, and arbitrarily select a pre-selected region pixel from the discrete region pixels. Obtain the Alpha channel value corresponding to the pre-selected region pixel in the N1 region to be rendered, and obtain the N1 pre-selected channel value. Obtain the Alpha channel value corresponding to the pre-selected region pixel in the N2 region to be rendered, and obtain the N2 pre-selected channel value. Calculate the N1 pre-selected channel value and the N2 pre-selected channel value to obtain the N12 channel difference. The values of the N1 pre-selected channel and the N2 pre-selected channel are compared. If the value of the N1 pre-selected channel is greater than or equal to the value of the N2 pre-selected channel, the ratio of the N12 channel difference to the N1 pre-selected channel value is calculated to obtain the pixel channel deviation rate corresponding to the pixel point in the pre-selected area. For each pixel in the N12 intersection region, the pixel channel deviation rate is collected, and the average value of the collected pixel channel deviation rates is taken to obtain the average deviation rate of the overlapping pixel channels.
5. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 4, characterized in that, In step S155, the specific steps are as follows: The independent intersection sub-regions contained within the N12 intersection region are obtained, resulting in multiple N12 intersection sub-regions. One pre-selected intersection sub-region is then randomly selected from the multiple obtained N12 intersection sub-regions. Obtain the geometric center point corresponding to the preselected intersection sub-region to get the center point of the preselected region. Create a neighborhood pixel circle with the center point of the preselected region as the center. Select a number of preselected pixels in the circumferential region of the neighborhood pixel circle. Using the center point of the pre-selected region as the starting point of the ray, draw rays that pass through different pre-selected pixels on the circumference to obtain multiple pre-selected circumference rays. Mark one pre-selected ray M1 among the obtained pre-selected circumference rays. The overlapping area between the M1 preselected ray and the N1 region to be rendered is collected to obtain multiple N1 ray coverage segments. The N1 ray coverage segment that is closest to the center point of the preselected region is marked as the N1 ray neighborhood segment. The overlapping area between the M1 preselected ray and the N2 region to be rendered is collected to obtain multiple N2 ray coverage segments. The N2 ray coverage segment that is closest to the center point of the preselected region is marked as the N2 ray neighborhood segment.
6. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 5, characterized in that, In step S155, the specific steps are as follows: Obtain the length values corresponding to the N1 ray neighborhood sub-segment and the N2 ray neighborhood sub-segment, and obtain the length values of the N1 sub-segment and the N2 sub-segment. Calculate the length values of the N1 sub-segment and the N2 sub-segment to obtain the relative deviation rate of the N12 length. Obtain the coverage starting point of the N1 ray neighborhood segment in the M1 preselected ray, and obtain the N1 ray coverage starting point. Obtain the coverage starting point of the N2 ray neighborhood segment in the M1 preselected ray, and obtain the N2 ray coverage starting point. Obtain the distance value between the N1 ray coverage starting point and the N2 ray coverage starting point, and obtain the N12 initial coverage distance difference. Calculate the product of the initial coverage distance difference of N12 and the relative deviation rate of the length of N12 to obtain the neighborhood rendering deviation rate corresponding to the preselected ray of M1; Obtain the neighborhood rendering deviation rate corresponding to each pre-selected circular ray and take the average value to obtain the neighborhood rendering position deviation rate.
7. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 1, characterized in that, In step S2, the specific steps are as follows: Step S21: Obtain the rendered original frame label images from each clustered image group, and select the pre-selected original frame label images from them; Step S22: Perform rendering complexity analysis on the pre-selected original frame marker image to obtain the rendering complexity corresponding to the pre-selected original frame marker image; Step S23: Obtain the rendering complexity corresponding to each original frame marker image to obtain image rendering complexity identification data; In step S22, the specific steps are as follows: Step S221: Perform pixel grayscale gradient analysis on the pre-selected original frame marker image to obtain the image texture complexity corresponding to the pre-selected original frame marker image; Step S222: Perform contour morphology analysis on the pre-selected original frame marker image to obtain the image contour complexity corresponding to the pre-selected original frame marker image; Step S223: Collect the area of the region to be rendered in the pre-selected original frame marked image to obtain the area value to be rendered. Calculate the product of the area value to be rendered and the image contour complexity to obtain the first image rendering weight value. Calculate the product of the area value to be rendered and the image contour complexity to obtain the second image rendering weight value. Sum the first image rendering weight value and the second image rendering weight value to obtain the rendering complexity corresponding to the pre-selected original frame marked image.
8. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 7, characterized in that, In step S221, the specific steps are as follows: The pre-selected original frame marker image is grayscaled to obtain the sample original frame grayscale image. The area to be rendered in the sample original frame grayscale image is discretized into several rendering pixels. One sample rendering pixel is randomly selected from the multiple discrete rendering pixels. In the grayscale image of the original sample frame, the eight neighboring pixels of the sample rendering pixel are collected, and the pixel depth values of the sample rendering pixel and its eight neighboring pixels are obtained respectively. The neighborhood pixel depth matrix corresponding to the sample rendering pixel is then constructed. For the neighborhood pixel depth matrix, create a horizontal standard matrix and a vertical standard matrix. Multiply the corresponding matrix elements of the horizontal standard matrix with the corresponding matrix elements of the neighborhood pixel depth matrix in turn. Sum the results of the multiplication to obtain the horizontal gradient value corresponding to the sample rendering pixel. Multiply the corresponding matrix elements of the vertical standard matrix with the corresponding matrix elements of the neighborhood pixel depth matrix in turn. Sum the results of the multiplication to obtain the vertical gradient value corresponding to the sample rendering pixel. The horizontal gradient value Gx and the vertical gradient value Gy are used to calculate the pixel gradient magnitude corresponding to the sample rendered pixel. Obtain the pixel gradient magnitude corresponding to each rendered pixel and calculate the average to obtain the average pixel gradient magnitude. The maximum pixel gradient magnitude collected in history is obtained to get the historical comparison magnitude. The ratio of the average pixel gradient magnitude to the historical comparison magnitude is calculated to obtain the image texture complexity.
9. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 7, characterized in that, In step S222, the specific steps are as follows: For the region to be rendered in the pre-selected original frame marked image, the contour-closed sub-regions contained in the region to be rendered are obtained to obtain independent rendering sub-regions; Select a pre-selected rendering sub-region within the independent rendering sub-region and extract its contour to obtain the pre-selected closed contour line; A set of traversal points for contour sampling points is created for the pre-selected closed contour line. Contour morphology analysis is performed on the pre-selected closed contour line to obtain the closed direct-connection contour ratio corresponding to the pre-selected closed contour line. Specifically as follows: The contour sampling points contained in the traversal point group are named P1 contour sampling point, P2 contour sampling point and P3 contour sampling point respectively. In the pre-selected closed contour line, connect the P1 contour sampling point and the P3 contour sampling point to obtain the first sampling line. Collect the midpoint of the first sampling line to obtain the midpoint of the sampling line. Connect the P2 contour sampling point and the midpoint of the sampling line to obtain the second sampling line. Calculate the ratio of the length of the first sampled connection line to the length of the second sampled connection line to obtain the contour straight connection ratio corresponding to the traversed point group; The pre-selected closed contour line is moved and traversed using the traversal point group. The contour line direct connection ratio corresponding to each traversal position is obtained and the average value is taken to obtain the closed direct connection contour ratio corresponding to the pre-selected closed contour line. Obtain the closed direct connection contour ratio corresponding to each independent rendering sub-region and calculate the average to obtain the closed contour mean direct connection ratio; The average direct connection ratio of the largest closed contour collected in history is obtained to get the historical comparison direct connection ratio. The ratio of the average direct connection ratio of the closed contour to the historical comparison direct connection ratio is calculated to obtain the image contour complexity.
10. The method for allocating computing power in an AI intelligent cluster for offline rendering task sharding according to claim 1, characterized in that, In step S4, the specific steps are as follows: Step S41: Obtain rendering image grouping data. Based on the rendering image grouping data, obtain multiple clustered image groups. Sum the areas of the regions to be rendered in each original frame marked image to obtain the sum of the areas of the regions to be rendered corresponding to each clustered image group. Sort the clustered image groups by rendering priority based on the sum of the areas of the regions to be rendered in descending order to obtain the rendering sorting sequence. Step S42: Mark the clustered image group that is at the top of the rendering sorting sequence as the first image group, and allocate rendering computing power to the first image group; Step S43: Based on the rendering sorting sequence, allocate rendering computing power to each clustered image group in sequence until the rendering computing power allocation for each clustered image group is completed; Based on the rendering computing power prediction data, the rendering computing power consumption prediction values of the original rendering frames contained in the first image group are collected and summed to obtain the cumulative value of grouped computing power consumption. The rendering computing power that the offline rendering terminal can provide is collected to obtain the available rendering computing power value of the terminal. If the available rendering computing power value of the terminal is greater than or equal to the cumulative value of the grouped computing power consumption, then computing power is allocated to each rendered original frame image. If it is less than, then obtain the ratio of the predicted value of rendering computing power consumption to the cumulative value of grouped computing power consumption for each rendered original frame image, obtain the real-time computing power allocation weight, calculate the terminal computing power quota value corresponding to each rendered original frame image, and allocate computing power for each rendered original frame image.
