A distributed task scheduling method in a cloud computing environment
By using real-time monitoring and machine learning-driven dynamic random seed generation and task scheduling, the problem of noise regularity distribution caused by random seed overlap in cloud computing environments is solved, improving rendering quality and efficiency.
Patent Information
- Application Number
- CN202510404592.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-04-01
AI Technical Summary
In cloud computing environments, random seed overlap during distributed rendering leads to a regular distribution of noise, affecting rendering quality and efficiency.
By monitoring rendering nodes in real time, dynamically generating random seeds and intelligently scheduling tasks, using machine learning models to predict overlap risks, and adjusting Tiles allocation and computation areas, the random sampling sequences are ensured to be independent.
It improves the quality of rendered images and computational efficiency, eliminates the regular distribution of noise, and enhances rendering stability and efficiency.
Smart Images

Figure CN120492136B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed task scheduling technology, and more specifically to a distributed task scheduling method in a cloud computing environment. Background Technology
[0002] Distributed task scheduling in a cloud computing environment refers to the coordination and allocation of computing tasks among multiple computing nodes or servers to improve resource utilization, increase computing efficiency, and ensure stable task execution. It typically involves key technologies such as task decomposition, resource scheduling, load balancing, and fault recovery to ensure that tasks are rationally allocated to computing resources and executed according to preset strategies. Scheduling systems usually adopt centralized, distributed, or hybrid architectures, utilizing mechanisms such as task queues, scheduling algorithms (e.g., round-robin, shortest task first), auto-scaling, and elastic resource management to achieve efficient parallel computing. For example, in large-scale data processing scenarios (e.g., Hadoop, Spark) or container orchestration systems (e.g., Kubernetes), the scheduler dynamically allocates computing resources based on task requirements, ensuring smooth task execution and optimizing overall system performance.
[0003] Distributed rendering computing refers to allocating rendering tasks across multiple computing nodes (such as servers, GPU clusters, or cloud instances) to process 3D animations in parallel, accelerating computation and optimizing resource utilization. It is widely used in high-computation scenarios such as film special effects, animation production, architectural visualization, and game development. In cloud computing environments, distributed rendering computing typically employs dynamic adjustments to optimize computational efficiency and resource usage. These adjustments include: AutoScaling, which dynamically adjusts computing nodes based on task load; SmartScheduling, which optimizes task allocation based on computational performance, priority, and network bandwidth; LoadBalancing, which ensures even utilization of computing resources; DistributedCaching, which shares lighting caches, texture data, and sampling modes to reduce redundant computations; and FailoverRecovery, which automatically reassigns tasks when a computing node fails to prevent rendering interruptions. These adjustment mechanisms enable cloud-based distributed rendering to complete high-quality computations in the shortest possible time while reducing costs and improving system stability and rendering efficiency.
[0004] Existing technologies have the following shortcomings: In 3D animation rendering scenarios, when rendering complex images in parallel using multiple computing nodes, a single frame is typically split into multiple tiles and assigned to different nodes for processing. Path tracing, as a mainstream rendering algorithm, relies on random number generators (RNGs) for sampling to calculate physical effects such as reflection, refraction, and global illumination (GI). However, if the initialization of random seeds by distributed nodes overlaps, causing multiple tiles to use the same random number sequence, it can lead to serious problems. Due to the repetition of random sampling patterns, the rendered noise distribution exhibits a regular pattern instead of the expected random distribution. This reduces the effectiveness of Monte Carlo sampling, preventing noise from being averaged across frames and affecting the final rendering quality.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this invention is to provide a distributed task scheduling method in a cloud computing environment. By real-time monitoring of rendering nodes, dynamic generation of random seeds, and intelligent task scheduling, it solves the problem of noise distribution caused by overlapping random seeds in distributed rendering. The system predicts overlap risk through statistical analysis and machine learning models, and adjusts the random seeds, reallocates Tiles, and optimizes the division of computational regions when the risk occurs, ensuring that the random sampling sequence of each Tile is independent, thereby improving rendering quality and computational efficiency, and solving the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a distributed task scheduling method in a cloud computing environment, comprising the following steps:
[0008] First, all distributed rendering nodes are monitored in real time, and the initialization data information generated by each distributed rendering computing node is obtained in real time during the monitoring process.
[0009] After obtaining the initialization data information of each node, the obtained initialization data information is preprocessed, and the preprocessed data is integrated to establish a structured data set;
[0010] Key indicators reflecting the overlap of random seed initialization methods in distributed nodes are extracted from the dataset, and statistical analysis and visualization are performed on the extracted key indicators to quantify the risk of random seed overlap.
[0011] Intelligent prediction of whether there is a risk of random seed overlap in distributed rendering nodes is achieved through a pre-trained machine learning model.
[0012] When the machine learning model determines that there is a risk of overlap in the random seeds of Tiles, it first generates a dynamic random seed based on the Tiles coordinates, frame index, and computing node ID to change the random number sequence of each Tiles; secondly, it redistributes Tiles with high overlap to different computing nodes to disperse the distribution range of random number seeds; at the same time, it dynamically adjusts the size of Tiles and optimizes the division of computing regions to change the sampling mode between adjacent Tiles.
[0013] Preferably, in a distributed rendering environment, after obtaining the initialization data information of each node, it is preprocessed and a structured data set is established. The specific steps are as follows:
[0014] First, including but not limited to collecting initialization data from logs, API interfaces, and monitoring systems of each computing node, including hardware information, software version, load status, network connection status, and random number seed, to ensure comprehensive data coverage;
[0015] Secondly, the acquired data is preprocessed, including data cleaning, missing value imputation, data standardization, and time alignment, in order to improve the accuracy and consistency of the data.
[0016] Next, data is associated according to compute node ID, task number, and timestamp, merging data from different sources and eliminating redundant information to ensure the uniqueness and integrity of the data;
[0017] Then, the processed data is stored in a relational database to make it queryable, indexable, and scalable for efficient subsequent access.
[0018] Finally, data quality is ensured through data consistency checks and integrity verification, and the data storage structure is optimized according to business needs.
[0019] Preferably, key indicators reflecting the overlap of random seed initialization methods of distributed nodes are extracted from the dataset. The extracted indicators include the probability of hash value collisions calculated by the hash function when the node allocates random seeds and the numerical distribution of the pseudo-random number generator on each computing node. The probability of hash value collisions calculated by the hash function when the node allocates random seeds and the numerical distribution of the pseudo-random number generator on each computing node are statistically analyzed and visualized under the detection window to generate seed hash collision reference values and PRNG sampling distribution consistency reference values, respectively. The risk of random seed overlap is quantified by the seed hash collision reference values and PRNG sampling distribution consistency reference values.
[0020] Preferably, the specific steps for generating seed hash collision reference values by statistically analyzing and visualizing the probability of hash value collisions calculated based on the hash function when assigning random seeds to nodes within the detection window are as follows:
[0021] Within the detection window, there are N computing nodes. Each computing node generates a random number when allocating a random seed, and then uses a hash function to map the random number to a fixed-length hash value. To calculate the hash collision rate, the hash values of all computing nodes are compared to determine whether nodes have generated the same hash value. A hash collision matrix is defined, with the following formula:
[0022]
[0023] In the formula, C i,j It is a hash collision matrix, a binary state variable representing whether the hash values of computing node i and computing node j are the same, H. i and H j These are the hash values of the random seeds generated for computing node i and computing node j, respectively;
[0024] The total number of collisions within the detection window is calculated using the following expression:
[0025]
[0026] In the formula, P is the total number of hash collisions that occur between all computing nodes;
[0027] After obtaining the total number of collisions P, the severity of hash collisions is quantified, and a seed hash collision reference value is generated. The generation formula is as follows:
[0028]
[0029] In the formula, SHC is the seed hash collision reference value, and H... bin (H i H is the hash value of node i. i Convert to a binary vector, H bin (H i+1 ) is the hash value H of compute node i+1. i+1 Convert to a binary vector.
[0030] Preferably, the specific steps for statistically analyzing and visualizing the numerical distribution of the pseudo-random number generator at each computing node under the detection window to generate a PRNG sampling distribution consistency reference value are as follows:
[0031] First, pseudo-random number sequences are extracted from the PRNS sampling data of each computing node, and the numerical distribution feature entropy is calculated to measure the dispersion of the random number distribution of different nodes. The calculation expression is as follows:
[0032]
[0033] In the formula, X f It is the numerical distribution characteristic entropy, H is the number of discrete intervals of the PRNG sample values of the computation node, and P is the numerical distribution characteristic entropy. q λ is the normalized proportion of pseudo-random numbers in the q-th numerical interval, and λ is a very small positive number used to avoid zero values in logarithmic operations;
[0034] In obtaining the entropy characteristics of the numerical distribution of each computing node f Subsequently, to further quantify the similarity of random number distributions among multiple computing nodes, it is necessary to calculate the PRNG sampling distribution consistency reference value, the calculation expression of which is as follows:
[0035]
[0036] In the formula, PSDU is the PRNG sampling distribution consistency reference value, M is the total number of computing nodes, i.e., the number of computing nodes in the distributed rendering environment, and B... j,k It calculates the overlap of the PRNG sampling distributions between node j and node k. and These are the numerical distribution characteristic entropies of computation nodes j and k, respectively, where ∈ is a minimal positive number to prevent the denominator from being zero. It is the normalization factor.
[0037] Preferably, the seed hash collision reference value and PRNG sampling distribution consistency reference value, which have undergone statistical analysis and visualization, are input into a pre-trained machine learning model. The machine learning model generates a random seed overlap risk coefficient, and the random seed overlap risk coefficient is used to intelligently predict whether there is a random seed overlap risk in the distributed rendering nodes.
[0038] Preferably, the random seed overlap risk coefficient generated by the pre-trained machine learning model for intelligent prediction of whether there is a random seed overlap risk in the distributed rendering nodes is compared and analyzed with a pre-set reference threshold for the random seed overlap risk coefficient to identify whether there is a random seed overlap risk in the distributed rendering nodes. The specific steps are as follows:
[0039] If the random seed overlap risk coefficient is greater than the preset reference threshold for random seed overlap risk coefficient, the distributed rendering node is classified as having random seed overlap risk; if the random seed overlap risk coefficient is less than or equal to the preset reference threshold for random seed overlap risk coefficient, the distributed rendering node is classified as not having random seed overlap risk.
[0040] Preferably, when the machine learning model determines that the random seeds of Tiles have a risk of overlap, a dynamic random seed is first generated based on the Tiles coordinates, frame index, and compute node ID. Then, highly overlapping Tiles are redistributed to different compute nodes. Simultaneously, the specific steps for dynamically adjusting the size of the Tiles are as follows:
[0041] When the machine learning model predicts that Tiles have a risk of random seed overlap, i.e., the random seed overlap risk coefficient RSOR is greater than the preset random seed overlap risk coefficient reference threshold, the random seed for each Tiles should be dynamically generated first. The calculation expression is as follows:
[0042]
[0043] , in the formula, Seed dynamic It is a dynamic random seed value, which is unique to each Tiles, X tile and Y tile It represents the horizontal and vertical position of the current Tiles in the rendered image. Frame idx It is the frame index of the current rendering task, indicating the animation frame number to which the current Tiles belong. ID It is the compute node ID for currently computing Tiles, RSOR ref is the reference threshold for the risk coefficient of random seed overlap, e is the natural base, and Hash[·] is the hash function;
[0044] After dynamic seed generation is completed, the probability of random number sequence repetition is further reduced by dispersing the random number seed space, optimizing the spatial diversity of the sampling distribution, and reducing the similarity of sampling patterns between adjacent Tiles. The calculation expression is as follows:
[0045]
[0046]
[0047] In the formula, Node new It is the identifier of the reassigned compute node, Node. current It is the node identifier to which the current Tiles originally belonged, Φ is the golden ratio constant, and N total This is the total number of compute nodes. The modulo operation ensures that the new node number falls within the range of valid nodes. Size tile_new This is the dynamically adjusted size of the Tiles. tile_original Γ is the original default Tiles size, and Γ is a regularization constant used to dynamically adjust the amplitude.
[0048] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0049] This invention successfully solves the problem of regular noise distribution caused by overlapping random seeds in distributed rendering by real-time monitoring of distributed rendering nodes, dynamic generation of random seeds, and intelligent task scheduling, thereby significantly improving the quality of rendered images. First, by real-time monitoring and preprocessing of the initialization data of each computing node, the system can accurately obtain the random seed allocation of nodes and quantify potential overlap risks through statistical analysis. Then, using a trained machine learning model, the system intelligently predicts whether there is a risk of seed overlap and dynamically adjusts the random seed generation method and Tiles allocation strategy when the risk occurs. Specifically, the system generates new random seeds based on Tiles coordinates, frame index, and computing node ID, avoiding repeated sampling patterns, while adjusting Tiles size and computing region division to optimize computational efficiency. This scheme ensures that the random sampling sequence of each Tiles is independent, eliminates the regular distribution of noise, improves rendering quality, and enhances the efficiency and stability of distributed computing. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0051] Figure 1 This is a flowchart of a distributed task scheduling method in a cloud computing environment according to the present invention. Detailed Implementation
[0052] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0053] This invention provides, for example Figure 1 The distributed task scheduling method shown in the cloud computing environment includes the following steps:
[0054] First, all distributed rendering nodes are monitored in real time, and the initialization data information generated by each distributed rendering computing node is obtained in real time during the monitoring process.
[0055] This information typically includes the node's hardware configuration (CPU / GPU model, memory size, etc.), operating system environment, current random seed generation strategy (such as fixed seed, timestamp seed, or a hybrid method), and relevant software version numbers. By acquiring this data in real time, a comprehensive understanding of the latest status of each node can be obtained, providing accurate and timely foundational support for subsequent data analysis, prediction, and scheduling. In practice, scripts or agent programs are usually deployed on each node to send the collected initialization information to a centralized data management module, ensuring the integrity and real-time nature of the information.
[0056] After obtaining the initialization data information of each node, the obtained initialization data information is preprocessed, and the preprocessed data is integrated to establish a structured data set;
[0057] In a distributed rendering environment, acquiring initialization data from each compute node refers to collecting key parameters for each node at the start of a rendering task, such as hardware configuration (CPU / GPU specifications, memory size), software version (renderer, drivers), network status, load, and random number generation seed. Since this data may come from different sources (e.g., log files, API monitoring interfaces, system status reports), it needs to be preprocessed after acquisition. This includes data cleaning (removing outliers and filling in missing values), format standardization (unifying data types and aligning timestamps), deduplication, and normalization to ensure data integrity and consistency. Subsequently, the preprocessed data is integrated, i.e., it is associated and categorized according to compute node ID, timestamp, task number, and other related information to form a structured data set (e.g., database tables, distributed storage, or data warehouse) to facilitate subsequent data analysis, feature extraction, and machine learning model training. This ensures that the entire system can make intelligent decisions based on unified and standardized data, improving the efficiency of rendering task allocation and computational stability.
[0058] In a distributed rendering environment, after obtaining the initialization data information of each node, it is preprocessed and a structured data set is established. The specific steps are as follows:
[0059] First, initialization data is collected from logs, API interfaces, and monitoring systems of each computing node, including hardware information (CPU / GPU specifications, memory), software version (rendering engine, drivers), load status, network connectivity, and random number seeds, to ensure comprehensive data coverage.
[0060] Secondly, the acquired data is preprocessed, including data cleaning (removing outliers and correcting erroneous data), missing value imputation (using mean, mode, or interpolation), data standardization (normalizing numerical data and format conversion), and time alignment (ensuring all data are aligned to a uniform timestamp) to improve the accuracy and consistency of the data.
[0061] Next, data is associated according to compute node ID, task number, and timestamp, merging data from different sources and eliminating redundant information to ensure the uniqueness and integrity of the data;
[0062] Then, the processed data is stored in a relational database to make it queryable, indexable, and scalable for efficient subsequent access.
[0063] Finally, data quality is ensured through data consistency checks and integrity verification, and the data storage structure is optimized according to business needs, such as creating indexes, partitioning storage, and data compression, to improve query efficiency and provide high-quality data support for subsequent machine learning analysis, task scheduling optimization, and rendering resource allocation.
[0064] Key indicators reflecting the overlap of random seed initialization methods in distributed nodes are extracted from the dataset, and statistical analysis and visualization are performed on the extracted key indicators to quantify the risk of random seed overlap.
[0065] Key indicators reflecting overlapping random seed initialization methods of distributed nodes are extracted from the dataset. These indicators include the probability of hash value collisions calculated by the hash function when nodes are allocating random seeds, and the numerical distribution of the pseudo-random number generator (PRNG) across various computing nodes. The probability of hash value collisions calculated by the hash function and the numerical distribution of the PRNG across various computing nodes are statistically analyzed and visualized under a detection window to generate seed hash collision reference values and PRNG sampling distribution consistency reference values. The risk of random seed overlap is quantified by using these two reference values.
[0066] When nodes are assigned random seeds, the probability of hash value collisions calculated using the hash function increases significantly, indicating a risk of overlapping random seed initialization. In a distributed rendering environment, random seeds are used to initialize a pseudo-random number generator (PRNG), which generates identical random number sequences under the same seed input. If multiple computing nodes experience hash value collisions during random seed initialization, it means these nodes may have been assigned the same or highly similar random number seeds, leading to overlapping random number sequences. Since rendering tasks rely on random numbers to determine key parameters such as ray tracing paths, global illumination calculations, and shadow generation, overlapping random seeds directly result in similar sampling patterns between different tiles, leading to periodic noise, lighting errors, and non-uniformity in path tracing sampling. Furthermore, the increased seed hash collision rate may also reflect shortcomings in the random seed generation strategy, such as an excessively small seed generation range, allocation algorithms that do not consider global distribution, and low randomness entropy, further increasing the risk of lost randomness. Therefore, when the hash collision reference value increases significantly, it means that multiple computing nodes may share the same random number pattern, and there is a risk of overlapping random seed initialization methods. Optimization is needed through dynamic seed allocation, task rescheduling, and other methods to ensure the uniformity and independence of the random number distribution.
[0067] The specific steps for generating seed hash collision reference values by statistically analyzing and visualizing the probability of hash value collisions calculated based on the hash function when assigning random seeds to nodes within the detection window are as follows:
[0068] Within the detection window, there are N computing nodes. Each computing node generates a random number when allocating a random seed, and then uses a hash function (such as SHA-256 or MurmurHash) to map the random number to a fixed-length hash value. To calculate the hash collision rate, the hash values of all computing nodes are compared to determine whether nodes have generated the same hash value. The hash collision matrix is defined as follows:
[0069]
[0070] In the formula, C i,j It is a hash collision matrix, a binary state variable representing whether the hash values of computing node i and computing node j are the same, i.e., the elements of the hash collision matrix, H. i and H j These are the hash values of the random seeds generated for computing node i and computing node j, respectively;
[0071] C i,j =1,H i and H j A hash collision occurs, meaning they have the same random seed;
[0072] C i,j =0 indicates H i and H j The generated hash values are different.
[0073] The total number of collisions within the detection window is calculated using the following expression:
[0074]
[0075] In the formula, P is the total number of hash collisions that occur between all computing nodes;
[0076] After obtaining the total number of collisions P, the severity of hash collisions is quantified, and a seed hash collision reference value is generated. The generation formula is as follows:
[0077]
[0078] In the formula, SHC is the seed hash collision reference value, and H... bin (H i H is the hash value of node i. i Convert to a binary vector, H bin (H i+1 ) is the hash value H of compute node i+1. i+1 Convert to a binary vector.
[0079] This method generates a seed hash collision reference value by statistically analyzing and visualizing the probability of hash value collisions calculated by a hash function when a node is allocating a random seed within a detection window. A higher seed hash collision reference value indicates a higher risk of overlap in random seed initialization; conversely, a lower value indicates a lower risk. This is because the seed hash collision reference value is an indicator derived within the monitoring window by analyzing the probability of hash value collisions calculated by a hash function when a node allocates a random seed. A larger value means that multiple nodes generate the same or very similar hash values when initializing random seeds, potentially leading to these nodes sharing the same random seed. Overlapping random seeds directly cause different nodes to use the same random number sequence during rendering, resulting in problems such as periodic noise, uneven lighting, and uneven sampling in the rendering results.
[0080] Uneven numerical distribution across computation nodes in a pseudo-random number generator (PRNG) may indicate a risk of overlapping random seed initialization. From the perspective of overlapping random seed initialization, the random number sequence generated by the PRNG is entirely determined by the initial seed. If multiple computation nodes use the same or highly similar seeds during initialization, their PRNG-generated random number sequences will also be highly similar or identical. In this case, even if different computation nodes run at different times or in different tasks, their sampling distributions may still overlap, causing the numerical distribution to be biased towards certain patterns rather than an ideal uniform random distribution. Furthermore, PRNGs themselves have periodic characteristics. If the seed is improperly allocated, multiple computation nodes may enter the same pseudo-random number cycle, resulting in periodic sampling artifacts or reduced randomness in certain computational regions. This not only affects the sampling uniformity of path tracing rendering but may also lead to deviations in global illumination calculations, ultimately affecting the consistency of rendering results. Therefore, when the numerical distribution of PRNG across various computing nodes is abnormally uneven, it is necessary to detect the risk of random seed overlap and adopt strategies such as dynamic seed perturbation, seed allocation optimization, or replacing PRNG with low-difference sequences to ensure true randomness and improve the accuracy and stability of rendering.
[0081] The specific steps for generating a PRNG sampling distribution consistency reference value by statistically analyzing and visualizing the numerical distribution of the pseudo-random number generator across various computing nodes within a detection window are as follows:
[0082] First, pseudo-random number sequences are extracted from the PRNG sampling data of each computing node, and the numerical distribution feature entropy is calculated to measure the dispersion of the random number distribution of different nodes. The higher the entropy, the more uniform the random number distribution; the lower the entropy, the less randomness and the potential risk of seed overlap. The calculation expression is as follows:
[0083]
[0084] In the formula, X f P is the numerical distribution characteristic entropy, representing the diversity of PRNG sample values within a given window. It is used to measure whether the random number distributions of different nodes converge. H is the number of discrete intervals for calculating the PRNG sample values of a node. q It is the normalized proportion of pseudo-random numbers in the q-th numerical interval, calculated as the frequency of occurrence of sampled values in that interval, where λ is a very small positive number (e.g., 10). -10 This is used to avoid zero values in logarithmic operations and improve computational stability;
[0085] In obtaining the entropy characteristics of the numerical distribution of each computing node fNext, to further quantify the similarity of random number distributions among multiple computing nodes, it is necessary to calculate the PRNG sampling distribution consistency reference value, which is used to measure whether the pseudo-random number generation patterns among different nodes are highly similar. The calculation expression is as follows:
[0086]
[0087] In the formula, PSDU is the PRNG sampling distribution consistency reference value, M is the total number of computing nodes, i.e., the number of computing nodes in the distributed rendering environment, and B... j,k It calculates the overlap of the PRNG sampling distributions between node j and node k. and These are the numerical distribution characteristic entropies of computation nodes j and k, respectively, where ∈ is a very small positive number (e.g., 10). -10 This prevents the denominator from being zero and improves computational stability. It is a normalization factor used to prevent the influence of the numerical distribution characteristic entropy between computing nodes on similarity calculation, making the calculation more stable.
[0088] The higher the PRNG sampling distribution consistency reference value generated by statistically analyzing and visualizing the numerical distribution of the pseudo-random number generator across various computing nodes under the monitoring window, the greater the risk of overlapping random seed initialization. Conversely, a lower value indicates more independent random seed initialization and a lower risk of overlap. In a distributed rendering environment, the pseudo-random number generator (PRNG) relies on a random seed for initialization to generate pseudo-random sequences. If the random seeds of multiple computing nodes overlap or are highly similar, the random sequences generated by their PRNGs will tend to be the same, leading to highly similar sampling paths and calculation results when these nodes perform ray tracing, global illumination calculations, or sampling. The PRNG sampling distribution consistency reference value measures the similarity of these distributions by analyzing the pseudo-random number distributions of multiple computing nodes under the monitoring window. A high reference value means that the random number distribution patterns of multiple computing nodes are consistent, indicating that they may have used the same or highly similar seeds, resulting in insufficient randomness and causing problems such as periodic sampling artifacts, global illumination deviations, and fixed noise distribution patterns. Conversely, if the PRNG sampling distribution consistency reference value is low, it indicates that the random number sequences of different computing nodes have good discreteness and independence, the random seed initialization is reasonable, the randomness is high, and the risk of overlap is not likely to occur.
[0089] Intelligent prediction of whether there is a risk of random seed overlap in distributed rendering nodes is achieved through a pre-trained machine learning model.
[0090] The seed hash collision reference value and PRNG sampling distribution consistency reference value, which have undergone statistical analysis and visualization, are input into a pre-trained machine learning model. The machine learning model generates a random seed overlap risk coefficient, and the random seed overlap risk coefficient is used to intelligently predict whether there is a random seed overlap risk in the distributed rendering nodes.
[0091] A pre-trained machine learning model (PML) refers to a model that has been trained on a large amount of historical data and had its parameters optimized before formal application. It can be directly used for the analysis and prediction of new data without requiring the entire model to be rebuilt and trained. In a distributed rendering environment, the main task of this model is to generate a random seed overlap risk coefficient based on key indicators obtained from statistical analysis (such as seed hash collision reference values and sampling distribution consistency reference values). During the training phase, the model uses a large amount of rendering node data from different scenarios to learn the relationship between random seed initialization methods and the final numerical distribution, thereby gaining the ability to identify when seeds may overlap and when sampling patterns may be unusually similar. Pre-trained models can use supervised learning (such as classification or regression models) or unsupervised learning (such as clustering or anomaly detection models), the specific choice depending on the characteristics of the data and the target application.
[0092] In practical applications, this machine learning model, by inputting new data (such as the seed hash collision index and sampling distribution consistency index after statistical analysis) and utilizing pre-trained model parameters, calculates a random seed overlap risk coefficient. This coefficient is used to assess whether the current distributed rendering system has a random seed overlap problem. Because the model has been trained and optimized on a large amount of data, it can quickly adapt to new data and provide highly accurate prediction results. Furthermore, the model can continuously update and adaptively optimize, i.e., it can be incrementally trained using new rendering task data to continuously improve its predictive capabilities. The pre-trained model can not only automatically detect high-risk nodes but also provide optimization suggestions, such as whether the random seed initialization method needs to be adjusted or whether computational tasks need to be reallocated, thereby helping to optimize the stability and rendering quality of the distributed rendering system.
[0093] The machine learning model is not limited here. Any machine learning model that can comprehensively analyze the seed hash collision reference value (SHC) and the PRNG sampling distribution consistency reference value (PSDU) to generate the random seed overlap risk coefficient (RSOR) is acceptable. To achieve the technical solution of this invention, this invention provides a specific implementation method.
[0094] The random seed overlap risk coefficient RSOR is generated as follows: RSOR=n1·SHC+n2·PSDU, where n1 and n2 are the preset proportional coefficients of the seed hash collision reference value SHC and the PRNG sampling distribution consistency reference value PSDU, respectively, and both n1 and n2 are greater than 0.
[0095] The preset proportional coefficient here refers to the weighting factor, which is used to balance the relative importance of the seed hash collision reference value (SHC) and the PRNG sampling distribution consistency reference value (PSDU) in the final risk assessment when calculating the random seed overlap risk coefficient (PRSO).
[0096] n1 and n2 are preset proportional coefficients used to adjust the contribution of the seed hash collision reference value (SHC) and the PRNG sampling distribution consistency reference value (PSDU) to the calculation result of the random seed overlap risk coefficient (RSOR). If a certain component (such as SHC) plays a more decisive role in the random seed overlap risk, it can be given a higher weight (i.e., n1 > n2); if the PRNG sampling distribution consistency has a greater impact on the final result, the value of n2 can be appropriately increased.
[0097] The values of these coefficients are typically determined empirically or through machine learning optimization to ensure that RSOR accurately reflects the true extent of seed overlap risk. Furthermore, n1 and n2 must be greater than 0 to guarantee that both SHC and PSDU have a real impact on RSOR calculation and are not ignored.
[0098] As can be seen from the random seed overlap risk coefficient, the larger the seed hash collision reference value generated after statistical analysis and visualization of the probability of hash value collision calculated by the hash function when assigning random seeds to nodes, and the larger the PRNG sampling distribution consistency reference value generated after statistical analysis and visualization of the numerical distribution of pseudo-random number generators on each computing node, the larger the random seed overlap risk coefficient generated when intelligently predicting whether there is a random seed overlap risk in distributed rendering nodes through a pre-trained machine learning model, the higher the probability that there is a random seed overlap risk in distributed rendering nodes. Conversely, the smaller the random seed overlap risk coefficient, the lower the probability that there is a random seed overlap risk in distributed rendering nodes.
[0099] The random seed overlap risk coefficient generated by the pre-trained machine learning model for intelligent prediction of whether distributed rendering nodes have random seed overlap risk is compared and analyzed with a pre-set reference threshold for random seed overlap risk coefficient to identify whether distributed rendering nodes have random seed overlap risk. The specific steps are as follows:
[0100] If the random seed overlap risk coefficient is greater than the preset reference threshold for random seed overlap risk coefficient, the distributed rendering node is classified as having random seed overlap risk; if the random seed overlap risk coefficient is less than or equal to the preset reference threshold for random seed overlap risk coefficient, the distributed rendering node is classified as not having random seed overlap risk.
[0101] When the machine learning model determines that there is a risk of overlap in the random seeds of Tiles, it first generates a dynamic random seed based on the Tiles coordinates, frame index, and computing node ID to change the random number sequence of each Tiles; secondly, it redistributes Tiles with high overlap to different computing nodes to disperse the distribution range of random number seeds; at the same time, it dynamically adjusts the size of Tiles and optimizes the division of computing regions to change the sampling mode between adjacent Tiles.
[0102] The purpose of this step is to reduce the risk of random seed overlap, ensure the diversity of path tracing sampling, optimize rendering quality, and avoid problems such as periodic noise, abnormal lighting, and inter-frame flicker caused by repeated random numbers.
[0103] First, generating a dynamic random seed based on Tiles coordinates, frame index, and compute node ID ensures that different Tiles have independent random number sequences, reducing the problem of pseudo-random number distribution similarity caused by seed duplication. If multiple Tiles share the same or highly similar random seeds, the random sequences generated by their PRNGs will also be highly similar, leading to periodic artifacts in path tracing sampling direction, lighting calculation, and shadow mapping. Therefore, by introducing a dynamic random seed, the fixed random number pattern can be broken, improving the randomness of global lighting, reflection, and refraction calculations, and reducing the predictability of noise distribution.
[0104] Secondly, redistributing highly overlapping tiles to different computing nodes disperses the random number seed distribution, reducing the risk of adjacent tiles generating similar random numbers on the same computing node. Since computing nodes may use similar seed initialization methods across consecutive frames or adjacent tiles, without adjustment, this can lead to inconsistencies in lighting calculations between different frames, resulting in noticeable inter-frame flickering. Intelligent task scheduling and dynamic tile allocation balance the seed distribution among computing nodes, preventing local clustering of random numbers and improving the global stability of rendering.
[0105] Finally, dynamically adjusting the size of Tiles and optimizing the division of computational regions can change the sampling patterns between adjacent Tiles, reducing computational redundancy and optimizing the spatial distribution of path tracing. If Tiles are too small, computational nodes may generate similar random seeds in multiple small regions, leading to convergence in sampling patterns between adjacent Tiles and resulting in spatial unevenness in lighting, shadow, and reflection calculations. Conversely, if Tiles are too large, it may cause unbalanced computational load, affecting rendering efficiency. Therefore, dynamic Tile adjustment can ensure reduced similarity between local Tiles in complex lighting scenes, increased computational randomness, optimized allocation of computational resources, and improved rendering efficiency.
[0106] In summary, this step ensures a balanced distribution of random numbers in the distributed rendering system through dynamic random seed generation, intelligent task scheduling, and Tiles size optimization. It also increases the diversity of path tracing calculations, reduces periodic sampling artifacts, and enhances the physical consistency of global illumination, reflection, and shadow calculations, thereby improving the realism and stability of the final rendering results.
[0107] When the machine learning model determines that the random seeds of Tiles have a risk of overlap, it first generates a dynamic random seed based on the Tiles coordinates, frame index, and compute node ID. Then, it reassigns highly overlapping Tiles to different compute nodes. Simultaneously, the specific steps for dynamically adjusting the size of the Tiles are as follows:
[0108] When the machine learning model predicts that Tiles have a risk of random seed overlap, i.e., the random seed overlap risk coefficient RSOR is greater than the preset random seed overlap risk coefficient reference threshold, the random seed for each Tiles should be dynamically generated first. This is used to change the random sequence of each Tiles, fundamentally reducing the risk of random seed overlap. The calculation expression is as follows:
[0109]
[0110] , in the formula, Seed dynamic It is a dynamic random seed value, which is unique to each Tiles, X tile and Y tile It represents the horizontal and vertical position of the current Tiles in the rendered image. Frame idx It is the frame index of the current rendering task, indicating the animation frame number to which the current Tiles belong. ID It is the compute node ID of the current compute Tiles, which is a unique number for each compute node, RSOR. refIt is the reference threshold for the risk coefficient of random seed overlap, e is the natural base, and Hash[·] is the hash function (such as SHA-256, MurmurHash, etc.) used to ensure the security and uniformity of seed distribution.
[0111] By generating dynamic random seeds based on Tiles coordinates, frame indexes, and compute node IDs, different Tiles use independent random number sequences, thus breaking the sampling pattern similarity caused by random seed overlap and reducing the generation of periodic artifacts. Secondly, a random seed overlap risk coefficient RSOR and its reference threshold RSOR are introduced. ref By performing exponential adjustment, the calculation method of random seeds is dynamically adjusted according to the risk level, so that the distribution of random seed is more dispersed under high-risk conditions, thereby optimizing the uniformity of path tracing sampling and improving the stability of rendering calculation.
[0112] After dynamic seed generation is completed, the probability of random number sequence repetition is further reduced by dispersing the random number seed space, optimizing the spatial diversity of the sampling distribution, and reducing the similarity of sampling patterns between adjacent Tiles. The calculation expression is as follows:
[0113]
[0114]
[0115] In the formula, Node new It is the identifier of the reassigned compute node, used to determine the node to which each high-risk Tiles should be rescheduled. current This is the node identifier to which the current Tiles originally belonged. Φ is the golden ratio constant (≈1.618). Introducing the irrational, non-periodic property effectively avoids simple periodic allocation. N total This is the total number of computing nodes, used to ensure the validity of new node allocation. The modulo operation guarantees that the new node number falls within the range of valid nodes. Size tile_new This is the dynamically adjusted size of the Tiles, used to change the sampling area of the Tiles on the rendered screen, optimize the division of the calculation area, and reduce the spatial correlation of the random number seed. tile_original Γ is the original default Tiles size, and Γ is a regularization constant used to dynamically adjust the magnitude, which is used to avoid the denominator from approaching 0 and to ensure the stability of the adjusted size.
[0116] By redistributing highly overlapping tiles to different computing nodes, the distribution range of random seeds across computing nodes is effectively dispersed, reducing the duplication of random seeds on the same node. At the same time, the size of tiles is dynamically adjusted to optimize the partitioning of computing regions, ensuring that the sampling patterns between adjacent tiles are more diverse, thereby reducing sampling similarity and further reducing the risk of random seed overlap.
[0117] This invention successfully solves the problem of regular noise distribution caused by overlapping random seeds in distributed rendering by real-time monitoring of distributed rendering nodes, dynamic generation of random seeds, and intelligent task scheduling, thereby significantly improving the quality of rendered images. First, by real-time monitoring and preprocessing of the initialization data of each computing node, the system can accurately obtain the random seed allocation of nodes and quantify potential overlap risks through statistical analysis. Then, using a trained machine learning model, the system intelligently predicts whether there is a risk of seed overlap and dynamically adjusts the random seed generation method and Tiles allocation strategy when the risk occurs. Specifically, the system generates new random seeds based on Tiles coordinates, frame index, and computing node ID, avoiding repeated sampling patterns, while adjusting Tiles size and computing region division to optimize computational efficiency. This scheme ensures that the random sampling sequence of each Tiles is independent, eliminates the regular distribution of noise, improves rendering quality, and enhances the efficiency and stability of distributed computing.
[0118] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0119] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0120] It should be noted that, in this document, the use of relational terms such as "first" and "second" is merely for distinguishing one entity or operation from another, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0121] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0122] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0123] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0124] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0125] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0126] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0127] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A method for distributed task scheduling in a cloud computing environment, the method comprising: The method comprises the following steps: First, real-time monitoring is performed on all distributed rendering nodes, and initialization data information generated by each distributed rendering computing node is acquired in real time during the monitoring process; After acquiring the initialization data information of each node, the acquired initialization data information is preprocessed, and the preprocessed data is integrated to establish a structured data set; Key indicators reflecting the overlap of the random seed initialization mode of the distributed nodes are extracted from the data set, and statistical analysis and visualization processing are performed on the extracted key indicators to quantify the random seed overlap risk; An intelligent prediction is made on whether the random seed overlap risk exists in the distributed rendering nodes through a pre-trained machine learning model; When the machine learning model determines that the random seed of the Tiles has an overlap risk, first, a dynamic random seed is generated based on the Tiles coordinates, frame index and computing node ID to change the random number sequence of each Tiles; second, the high-overlap Tiles are re-assigned to different computing nodes to disperse the distribution range of the random number seed; and third, the size of the Tiles is dynamically adjusted to optimize the calculation area division to change the sampling mode between adjacent Tiles; Key indicators reflecting the overlap of the random seed initialization mode of the distributed nodes are extracted from the data set, and statistical analysis and visualization processing are performed on the extracted key indicators to quantify the random seed overlap risk; The specific steps of generating the seed hash collision reference value by statistically analyzing and visualizing the probability of hash value collision of the nodes in assigning random seeds in the detection window are as follows: In the detection window, there are N computing nodes, each of which generates a random number when assigning a random seed, and then maps the random number to a fixed-length hash value using a hash function. To calculate the hash collision rate, compare the hash values of all computing nodes to determine whether the same hash value is generated by the nodes, and define a hash collision matrix, as follows: In the formula, C i,j is a hash collision matrix, indicating a binary state variable whether the hash values of the computing node i and the computing node j are the same, H i and H j are hash values of random seeds generated by the computing node i and the computing node j respectively; The total collision times in the detection window are calculated, and the calculation expression is as follows: In the formula, P is the total hash collision times between all computing nodes; After obtaining the total collision times P, the severity of the hash collision is quantified to generate the seed hash collision reference value, and the generation formula is as follows: where SHC is a seed hash collision reference value, H bin (H i ) is the hash value H i converted to a binary vector, H bin (H i+1 ) is the hash value H i+1 converted to a binary vector; The specific steps of generating the PRNG sampling distribution consistency reference value by statistically analyzing and visualizing the numerical distribution of the pseudo-random number generator at each computing node in the detection window are as follows: First, the pseudo-random number sequence is extracted from the PRNG sampling data of each computing node, and the numerical distribution characteristic entropy is calculated to measure the discrete degree of the random number distribution of different nodes. The calculation expression is as follows: wherein X f is the numerical distribution characteristic entropy, H is the number of discrete intervals of the PRNG sampling value, P q is the normalized proportion of the pseudo-random number in the qth numerical interval, and λ is a very small positive number used to avoid zero value in the logarithmic operation. In acquiring the numerical distribution characteristics of each computing node, the numerical distribution characteristics X of each computing node are acquired f After that, in order to further quantify the random number distribution similarity between the plurality of computing nodes, it is necessary to calculate the PRNG sampling distribution consistency reference value, and the calculation expression is as follows: where PSDU is the PRNG sample distribution uniformity reference value, M is the total number of computing nodes, i.e. the number of computing nodes in the distributed rendering environment, B j,k is the PRNG sample distribution overlap degree between computing node j and node k, and are the numerical distribution characteristic entropy of computing node j and computing node k, respectively, and ∈ is a very small positive number to prevent the denominator from being zero, is the normalization factor.
2. The method of claim 1, wherein, In the distributed rendering environment, after obtaining the initialization data information of each node, preprocessing and establishing a structured data set, the specific steps are as follows: First, collect initialization data from the logs, API interfaces, and monitoring system sources of each computing node, including hardware information, software versions, load status, network connection, and random number seeds, to ensure comprehensive data coverage; Second, preprocess the obtained data, including data cleaning, missing value filling, data standardization, and time alignment, to improve data accuracy and consistency; Next, associate the data according to the computing node ID, task number, and timestamp, merge data from different sources, and eliminate redundant information to ensure data uniqueness and integrity; Then, store the processed data in a relational database to make it queryable, indexable, and extensible for efficient subsequent calls; Finally, check the data consistency and integrity to ensure data quality, and optimize the data storage structure according to business needs.
3. The method of claim 1, wherein, The seed hash collision reference value and PRNG sampling distribution consistency reference value obtained through statistical analysis and visualization processing are input into the pre-trained machine learning model, and the random seed overlap risk coefficient is generated through the machine learning model. The random seed overlap risk coefficient is used to intelligently predict whether there is a random seed overlap risk in the distributed rendering node.
4. The method of claim 3, wherein, When the random seed overlap risk coefficient generated by the pre-trained machine learning model is compared and analyzed with the pre-set random seed overlap risk coefficient reference threshold, it is identified whether there is a random seed overlap risk in the distributed rendering node. The specific steps are as follows: If the random seed overlap risk coefficient is greater than the pre-set random seed overlap risk coefficient reference threshold, the distributed rendering node is divided into a random seed overlap risk; If the random seed overlap risk coefficient is less than or equal to the pre-set random seed overlap risk coefficient reference threshold, the distributed rendering node is divided into a random seed overlap risk.
5. The method of claim 4, wherein, When the machine learning model determines that the random seed of Tiles has an overlap risk, first, generate a dynamic random seed based on the Tiles coordinates, frame index, and computing node ID, and second, reassign high-overlap Tiles to different computing nodes. The specific steps are as follows: When the machine learning model predicts that Tiles have a random seed overlap risk, i.e., the random seed overlap risk coefficient RSOR is greater than the pre-set random seed overlap risk coefficient reference threshold, first, a dynamic random seed should be generated for each Tiles. The calculation expression is as follows: where Seed dynamic is a dynamic random seed value, unique and different for each Tile, X tile and Y tile are the horizontal and vertical positions of the current Tile in the rendering picture, Frame idx is the frame index where the current rendering task is located, indicating the animation frame number to which the current Tile belongs, Node ID is the computing node ID of the current computing Tile, RSOR ref is the random seed overlap risk coefficient reference threshold, e is the natural base, and Hash[·] is a hash function. After the dynamic seed generation is completed, the repetition probability of the random number sequence is further reduced, the spatial diversity of the sampling distribution is optimized by dispersing the random number seed space, the similarity of the sampling patterns between adjacent Tiles is reduced, and the calculation expression is as follows: where Node new is the re-assigned computing node identifier, Node current is the current node identifier that the Tiles originally belong to, Φ is the golden section constant, N total is the total number of computing nodes, mod is the modulo operation to ensure the new node number falls within the valid node range, Size tile_new is the dynamically adjusted Tiles size, Size tile_original is the original default Tiles size, and Γ is the regularization constant for the dynamic adjustment amplitude.
Citation Information
Patent Citations
Task scheduling method and device suitable for distributed rendering
CN112015533A
Pseudo-random selection on blockchain
CN116113921A