Optimization method and system for dynamic optimal distribution of rendering resources

Through the method of selecting the optimal rendering path through object detection and recognition, pruning processing and genetic algorithms, the allocation of rendering resources is dynamically adjusted, which solves the problem of unreasonable resource allocation in traditional rendering technology, and achieves efficient and stable 3D rendering of smart buildings.

CN119440804APending Publication Date: 2025-02-14GUANGXI ZHUANG AUTONOMOUS REGION COMM IND SERVICE CO LTD TECH SERVICE BRANCH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411384520.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Traditional rendering technology has shortcomings in the allocation of rendering resources, which leads to problems such as lag, frame drop, and rendering blur in 3D rendering of smart buildings, and the resource allocation is unreasonable, affecting the rendering effect and efficiency.

Method used

Through object detection and recognition, pruning processing, and genetic algorithms, select the optimal rendering path, and dynamically adjust the resource allocation ratio, and perform resource scheduling according to the needs of smart building rendering.

Benefits of technology

Improve resource utilization efficiency, ensure the accuracy and stability of rendering, reduce resource waste, improve user experience, and improve the smoothness of the rendering process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440804A_ABST
    Figure CN119440804A_ABST
Patent Text Reader

Abstract

The invention discloses an optimization method and system for dynamic optimal distribution of rendering resources. The optimization method comprises the following steps: detecting and identifying a target; pruning the task based on a target detection and identification result; searching an optimal rendering path, and selecting an optimal strategy by adopting a genetic algorithm; and dynamic rendering resource scheduling: dynamically adjusting the resource allocation proportion according to the demand of intelligent building rendering. Therefore, resources are efficiently utilized, waste is avoided, user experience is improved through rapid rendering, stability is enhanced, the rendering process is ensured to be smooth, and the problems that building rendering is slow and resources are wasted are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer graphics processing and rendering, and in particular to an optimization method and system for dynamically optimizing the allocation of rendering resources. Background Art

[0002] With the acceleration of urbanization and the rapid development of technologies such as the Internet of Things, big data, and cloud computing, traditional rendering technology has many shortcomings in rendering resource allocation. The current rendering of smart building models still relies on the web-based platform. When transmitting, network bandwidth and hardware devices must be considered, which leads to frequent freezes and other situations when many devices access the building visualization platform, and there will also be frame loss, rendering blur, etc. In addition, in traditional rendering methods, a relatively simple resource allocation method is usually adopted, such as allocation based on a fixed ratio, which does not fully consider the actual needs and importance differences of different rendering tasks. This is difficult to accurately reach the user's experience threshold when dealing with complex scenes, especially high-complexity smart building 3D rendering. When the rendering task is complex, the traditional fixed resource allocation method leads to unreasonable resource allocation, affecting the rendering effect and efficiency. In the traditional mode, it cannot be dynamically adjusted according to factors such as the size and category of objects in the smart building, and can only control the general model movement trajectory, and the tracking effect is poor. There is a lack of an effective resource recovery mechanism after the task is completed, resulting in resource waste and the inability to release occupied resources, so the server can only be restarted. Summary of the invention

[0003] In view of the above-mentioned problems, the present invention is proposed.

[0004] In order to solve the above technical problems, the present invention provides the following technical solutions: an optimization method for dynamically optimizing the allocation of rendering resources, comprising:

[0005] Target detection and recognition;

[0006] Prune tasks based on target detection and recognition results;

[0007] Explore the optimal rendering path and use genetic algorithms to select the optimal strategy;

[0008] Dynamic rendering resource scheduling dynamically adjusts resource allocation ratios according to the needs of smart building rendering.

[0009] As a preferred solution of the optimization method for dynamically optimizing the allocation of rendering resources described in the present invention, the target detection and recognition includes, after preprocessing the input building image frame, using the architecture combining CNN and Transformer to split the small module objects to be rendered;

[0010] Through the combination of cross entropy and mean square error loss, and training with the Adam optimizer, the features of various objects in smart buildings can be accurately extracted;

[0011] Finally, feature integration is performed to integrate the detected key features into structured data information. An efficient data structure hash table is used to improve the subsequent processing speed and output high-quality structured data information.

[0012] As a preferred solution of the optimization method for dynamically optimizing the allocation of rendering resources described in the present invention, the pruning of tasks includes obtaining a predicted visual effect score and a computational cost of each rendering task after the structured data information has passed through an XGBoost process;

[0013] Only a small part of the tasks are pruned each time. Task pruning is to prune away tasks that have little contribution to the overall rendering effect or have high computational cost but low visual effect improvement.

[0014] As a preferred solution of the optimization method for dynamically optimizing the allocation of rendering resources described in the present invention, wherein: the exploration of the optimal rendering path includes randomly generating a set of initial rendering strategies as an initial population of a genetic algorithm;

[0015] Use evaluation functions to measure user experience, functionality, and resource sustainability, and then evaluate the pros and cons of each individual, so as to guide the algorithm to evolve in the optimal direction and obtain the optimal rendering strategy;

[0016] The evaluation function is a regression calculation of user experience, functionality, and resource sustainability.

[0017] As a preferred solution of the optimization method for dynamically optimizing the allocation of rendering resources described in the present invention, the dynamic rendering resource scheduling includes dynamically adjusting the resource allocation ratio according to the demand for smart building rendering, and dynamically allocating according to the priority of the task, resource demand, and historical usage factors;

[0018] Set a critical resource task set. When a rendering task triggers a task in the critical task set, request system resources and retain the resources. During the rendering period, these resources will not be used by other requests. When the use is completed, the resources will be returned to the system resources.

[0019] As a preferred solution of the optimization method for dynamically optimizing the allocation of rendering resources described in the present invention, wherein: when exploring the optimal rendering path, using the depth-first search strategy also includes comprehensively considering the dynamic nature of the target, the possibility of interaction with the user, and the historical importance in the smart building, using a machine learning method, using a support vector machine classifier to predict the priority of the task, and calculating the priority of each task; the high priority is 1, and the low priority is 0;

[0020] The search algorithm using heuristic search is expressed as:

[0021]

[0022] Among them, ω1, ω2, ω3 are weight coefficients used to adjust the importance of different factors; P(task) is the priority of the task obtained by the decision function of the support vector machine; R(task) represents the resource usage required for the rendering task; C(task) represents the visual effect score of the rendering task;

[0023] The search process is parallelized, recursively exploring all possible rendering paths until resource limits are reached or all tasks are considered.

[0024] As a preferred solution of the optimization method for dynamically optimizing the allocation of rendering resources described in the present invention, when dynamically allocating resources, a resource reservation method is used to ensure that key tasks obtain sufficient resources, and a key resource task set C = {C1, C2, ..., C n}, for key task C n , reserve more R re,j ;

[0025] In building rendering, real-time rendering is essential for mission-critical monitoring 20 , the reserved resources are:

[0026]

[0027] Among them, k4 is the reserved coefficient, It is a key task C 20 The priority of It is a key task C 20 The demand for resources.

[0028] An optimization system for dynamically optimizing the allocation of rendering resources using the method of the present invention is characterized by:

[0029] Recognition module: target detection and recognition;

[0030] The pruning module prunes the tasks based on the target detection and recognition results;

[0031] The optimization module explores the optimal rendering path and uses genetic algorithms to select the optimal strategy;

[0032] Allocation module, dynamic rendering resource scheduling, dynamically adjusts resource allocation ratio according to the needs of smart building rendering.

[0033] A computer device comprises: a memory and a processor; the memory stores a computer program, wherein: the processor implements the steps of any one of the methods of the present invention when executing the computer program.

[0034] A computer-readable storage medium stores a computer program, wherein: when the computer program is executed by a processor, the steps of any one of the methods of the present invention are implemented.

[0035] Beneficial effects of the present invention: The optimization method for dynamically optimizing the allocation of rendering resources provided by the present invention combines CNN with Transformer, accurately extracts object features, and combines pruning processing to greatly improve resource utilization efficiency. Iterative training is performed through a feedback mechanism to continuously optimize model parameters to ensure rendering accuracy. The priority is calculated based on task importance, the optimal rendering path is quickly found, centralized rendering is achieved with the minimum amount of resources, and the user browsing interface is predicted based on the user's habits, and dynamic and purposeful rendering is performed to achieve efficient resource utilization and avoid waste, fast rendering to improve user experience, and enhanced stability to ensure a smooth rendering process, effectively solving the problems of slow rendering of buildings and waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0037] Figure 1 An overall flow chart of an optimization method for dynamically optimizing allocation of rendering resources provided by the first embodiment of the present invention;

[0038] Figure 2 A post-processing stage of a global feature vector of an optimization method for dynamically optimizing allocation of rendering resources provided by the first embodiment of the present invention;

[0039] Figure 3 A pruning process of an optimization method for dynamically optimizing allocation of rendering resources provided by the first embodiment of the present invention;

[0040] Figure 4 A first embodiment of the present invention provides an optimization method for dynamically optimizing allocation of rendering resources and dynamic rendering resource scheduling. DETAILED DESCRIPTION

[0041] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0042] Example 1, reference Figure 1-4 , as an embodiment of the present invention, provides an optimization method for dynamically optimizing the allocation of rendering resources, comprising:

[0043] S1: Object detection and recognition.

[0044] In the rendering of smart building architecture, the combination of different building modules forms a large floor, and various small module objects that need to be rendered are laid on the floor and around it. We split the modules and use the advanced architecture that combines CNN (convolutional neural network) and Transformer and calls each other. Through the combination of cross entropy and mean square error loss, and training with Adam optimizer, the features of various objects in smart buildings are accurately extracted, including key information such as position, orientation and material. The role of Adam optimizer is to use a large learning rate to quickly move towards the optimal parameters. As the training progresses, when approaching the optimal solution, the learning rate will gradually decrease to avoid oscillation near the optimal solution, so as to converge to the optimal parameters more stably, so that the model can accurately extract the location, orientation and material features of the object.

[0045] The image data of each input frame or motion frame is input into this system for processing. Before processing, the image is processed by observing the image characteristics and performing default image resizing to ensure the same size. The image is recorded whenever there is a change in user operation, image movement, etc.

[0046] In the object data preprocessing stage, the input building image frame is scaled to a suitable fixed resolution of 800×600 according to the image characteristics of smart buildings, bilinear interpolation is used to reduce distortion, and channel-by-channel normalization and other methods are used for normalization to better adapt to the image data of smart buildings. In the forward propagation process, that is, in the steps of I→CNN→F and F→Transformer→G, parallel computing and other technologies are used to improve the propagation speed. I is the image stream, which is the original image input of each picture, which is input into the convolutional neural network (CNN) in the form of a tensor. CNN is a convolutional neural network. The convolution layer can extract various features, such as low-level features such as edges, lines, textures, and the shape and layout of buildings. Different feature patterns can be detected through different convolution kernels. F is the feature representation after CNN processing, which contains various feature information extracted from the image. The information output by the F layer is passed as input in the Transformer. Transformer is a deep learning model based on the self-attention mechanism. G is the output result after Transformer processing (object features, spatial feature encoding and other information about the image). The difference between F and G is that F is a low-level extracted feature, and G is extracted based on F. It can capture global contextual information and model the complex relationship between features.

[0047] When decoding the detection frame and key feature information from the global feature vector G, a more advanced decoding algorithm - a decoding method based on probability graph is used to improve detection accuracy, and NMS (non-maximum suppression) is applied to remove overlapping detection frames. The threshold is dynamically adjusted according to factors such as the size and category of objects in the smart building. Improvements have been made in the post-processing link, such as Figure 2 shown.

[0048] In the decoding part, we set the global feature vector G∈R n , the center coordinates of the detection box are (x,y)∈R 2 , a multi-layer perceptron (MLP) is used to implement decoding, expressed as:

[0049] h1=W1G+b1

[0050] a1=f(h1)

[0051] This f represents the nonlinear activation function ReLU

[0052] h2=W2a1+b2

[0053] a2=f(h2)

[0054] And so on.

[0055] h m =W m a m-1 +b m

[0056] (x,y)=W out a m +b out

[0057] Among them, W m and b m are the weight matrix and bias vector of each layer, m is the hidden dimension, a m It represents the nonlinear activation function ReLU on h m The result of the evaluation, W out and b out is a certain weight and bias vector, through which the center coordinates (x, y) of the detection box can be obtained, h m It is a vector generated by different dimensional layers, containing a series of values, which are the results of processing the input global feature vector G. Each value represents specific feature information. mThe decoding result of our building represents the information such as the predicted center coordinates, size, angle and material category. We gradually extract and transform the input features to get the final result. We use different numbers of layers to detect objects with different settings during execution. When testing, we first use a small number of layers. If it is not ideal, we will gradually increase it. The multi-layer perceptron (MLP) decoding process can output the feature information set {x c ,y c ,w 宽 ,h 高 ,θ,M}, what we get through CNN and Transformer is the rendered image frame data G, which contains a lot of information. Then we decode it through post-processing, and get the data we want in the decoding process.

[0058] Where (x c ,y c ) represents the center coordinates, (w 宽 ,h 高 ) is the size, θ is the object orientation angle, and M is the material category.

[0059] In the NMS part, the detection box information output by the MLP decoding result is used as input information. During detection, the detection box may be repeatedly detected, so overlap will occur. The overlapping detection boxes are extracted by calculating the intersection-and-union ratio between different detection boxes, and only the intersection-and-union range data is taken.

[0060] First, randomly select two detection frames and calculate their intersection-over-union ratio, set as detection frames A and B, the coordinates of detection frames A and B are (x a1 ,y a1 ,x a2 ,y a2 ) and (x b1 ,y b1 ,x b2 ,y b2 ), where (x a1 ,y a1 ) represents the coordinates of the upper left corner of the detection box, (x a2 ,y a2 ) represents the coordinates of the lower right corner of the detection box. Similarly, the detection box B is represented in the same way, except that the coordinates of the upper left corner and the lower left corner are combined. The calculation formula for the intersection area is:

[0061] Horizontal axis overlap range: x interesed =max(0,min(x a2 ,x b2 )-max(x a1 ,x b1 ))

[0062] Vertical axis overlap range: yintersect =max(0,min(y a2 ,y b2 )-max(max(y a1 ,y b1 )))

[0063] Then the intersection area is calculated as: Intersection = x Intersection *y Intersection

[0064] The calculation formula for the union area is:

[0065] The area of ​​the detection box A: AreaA=(x a2 -x a1 )*(y a2 -y a1 )

[0066] The area of ​​the detection box B: AreaA = (x a2 -x a1 )*(y a2 -y a1 )

[0067] Union area: Union = AreaA + AreaB - Intersection

[0068] The calculation formula of intersection-over-union ratio is:

[0069]

[0070] Among them, IoU represents the intersection-over-union ratio between detection boxes, Intersection represents the intersection area between detection boxes, and Union represents the union area between detection boxes.

[0071] In the process of calculating the intersection-over-union ratio, for a set of detection boxes S = {B1, B2, L, B n}, first according to the confidence C(B i ) are sorted in descending order, and then processed in sequence: Select the detection box with the highest confidence For other detection boxes B in the set S j , if the intersection over union ratio between the two is: IoU(B max ,B j )>thresh (where thresh is the overlap threshold), then B j Remove it from the set S. Repeat the above process until all detection boxes in the set S have been processed. Finally, perform feature integration to integrate the detected key features (position, size, orientation, material) into structured data information, use an efficient data structure hash table to improve the subsequent processing speed, and output high-quality structured data information.

[0072] Among them, confidence is a measure of the detection result of the target detection algorithm, which indicates the possibility of the target being contained in the detection box. A detection box with a high confidence is more likely to be a correct object detection result. When outputting the detection box data above, the target detection algorithm CNN and Transformer will output a confidence score to evaluate the reliability of the detection result.

[0073] S2: Prediction pruning based on target detection and recognition results.

[0074] The above output results (structured data) and historical data of user operations are put into the regression model XGBoost to calculate the score results and calculation costs.

[0075] The trained structured data information and the collected historical rendering data of smart buildings are used for training and prediction. XGBoost is then used to calculate the score results and calculation costs.

[0076] First, determine a threshold for the visual effect score in the rendering of building objects, set high and low thresholds after comprehensive evaluation, and continuously adjust and optimize the thresholds based on feedback from the rendering effect in actual applications. If it is found that the threshold is too high, causing too many tasks to be pruned, affecting the overall rendering effect, the threshold can be appropriately lowered; if the threshold is too low and does not play an effective pruning role, the threshold can be increased. The specific process is as follows: Figure 3 shown.

[0077] According to the type, location, material and other characteristics of the targets in the smart building, XGBoost (Extreme Gradient Boosting) is used to accurately predict the visual effect score and computational cost of each task of smart building rendering.

[0078] XGBoost can automatically evaluate the importance of each feature and select features with higher importance, which can improve the performance and generalization ability of the model we use. The XGBoost objective function is:

[0079]

[0080] n is the number of samples, y i is the true value of the i-th sample, is the predicted value of the ith sample, is the loss function, which measures the difference between the predicted value and the true value, K is the number of trees, and f k is the kth tree, Ω(f k ) is a regular term used to control the complexity of the tree. For the loss function, the simplest function is used For the regularization term:

[0081]

[0082] T is the number of leaf nodes, w is the weight of the leaf node, γ and λ are regularization parameters used to control the number of leaf nodes and the size of the leaf node weight. During the training process, XGBoost improves the performance of the model by continuously adding new trees to minimize the objective function.

[0083] After the structured data information has gone through the XGBoost process, we get the predicted visual effect score and computational cost for each rendering task.

[0084] Only a small part of the tasks are pruned each time. The pruning tasks mainly prune those tasks that contribute little to the overall rendering effect or have high computational costs but do not significantly improve the visual effect. For example, in the visual effect score and computational cost, if a task has a high cost and a low score, then we will prune this rendering task. Pruning can also provide a more reasonable task set for the depth-first search strategy and dynamic rendering resource scheduling. The task set after pruning is more refined, so that the subsequent search strategy and resource scheduling can focus more on important tasks. The pruning ratio also needs to be considered and modified according to different projects. For example, in our building project, 5% is used as the starting value, which can avoid a significant drop in model performance due to excessive one-time pruning. The pruning ratio is adjusted according to the complexity of the model and the characteristics of the data. After each pruning, re-evaluate the performance of the model, including visual effect scores and inference speed. If the model performance drops beyond a certain limit, suspend pruning, or adjust the pruning ratio and strategy. This reduces unnecessary rendering tasks in smart buildings, thereby providing a more reasonable task set for the depth-first search strategy and dynamic rendering resource scheduling. After each pruning, timely feedback is given to the architecture combining CNN and Transformer for iterative training to help adjust model parameters and further improve the accuracy of smart building rendering. By continuously adjusting and optimizing the pruning strategy, better rendering effects and resource utilization efficiency can be achieved.

[0085] S3: Explore the optimal rendering path.

[0086] Using the depth-first search strategy, based on the target detection results and task importance of the first two steps of smart buildings, the dynamics of the target, the possibility of interaction with users, and the historical importance in smart buildings are comprehensively considered. The machine learning method is used to use the support vector machine classifier to predict the priority of the task and calculate the priority of each task. The feature vector is X = (x1, x2, x3, x4), which represent the importance of target detection results, target dynamics, the possibility of interaction with users, and historical importance, respectively. The decision function of the support vector machine is f(x) = sign(ω TX+b), where ω is the weight vector and b is the bias term. By training the support vector machine, the values ​​of the weight vector and the bias term are determined so that for a given feature vector, the priority of the task can be accurately predicted (high priority is 1, low priority is 0). Starting from the highest priority task, a heuristic search algorithm is used, and the algorithm is expressed as:

[0087]

[0088] Among them, ω1, ω2, ω3 are weight coefficients used to adjust the importance of different factors, P(task) is the priority of the task obtained by the decision function of the support vector machine, R(task) represents the resource usage required for rendering this task in S2, and C(task) represents the visual effect score of the rendering task in S2. The search process is parallelized and all possible rendering paths are explored recursively until the resource limit is reached or all tasks are considered. This algorithm uses different weight ratios, and these different weights correspond to four different importances when rendering building projects: result importance, target dynamics, possibility of interaction with users, and historical importance. We represent these four importances with feature vector sets and then make decisions through decision functions.

[0089] Furthermore, in step 2, we input historical data, which includes the time required to render an object, CPU usage, etc. These are the actual cost of the calculation. After passing the XGBoost algorithm model, we will get the predicted value of the computational cost required to render the object. This computational cost is the amount of resources used. As for the visual effect score, we take the rendering frame at a certain moment in the historical data as an example. We use human visual perception to evaluate the score at this moment, and put the rendering score of this frame into the model for training, then a predicted rendering effect score will be formed in the XGBoost model.

[0090] By defining an evaluation function that comprehensively considers user experience, functionality of smart buildings, resource sustainability and other factors, the formula is expressed as: E = αU + βF + γS, where α, β, γ are weight coefficients, U, F, S represent user experience, functionality and sustainability of building resources, reflecting the importance of different factors in the evaluation.

[0091] The optimal strategy is selected by using a multi-objective optimization genetic algorithm. The genetic algorithm simulates the biological evolution process, continuously iterates and optimizes to find the optimal solution that meets multiple objectives. In this process, the evaluation function is used to evaluate the pros and cons of each individual (i.e., rendering strategy), thereby guiding the algorithm to evolve in the optimal direction. This optimization process is to use a multi-objective optimization genetic algorithm to weigh and optimize multiple objectives to find a compromise solution that performs well in terms of user experience, functionality, and resource sustainability. The final optimal strategy is a relatively better rendering strategy, not a strategy that achieves the maximum value on a single indicator. The specific process of optimization is:

[0092] The first step is to encode the rendering strategy into chromosomes. Appropriate encoding methods can be used according to specific circumstances. For example, in this project, the parameters of each rendering task (priority, resource allocation ratio, etc.) are encoded as genes, and the parameters of multiple tasks are combined to form a chromosome. The second step is to randomly generate a set of initial chromosomes as the initial population of the genetic algorithm. These initial chromosomes represent different initial rendering strategies. The third step is fitness evaluation, using the evaluation function (the above-mentioned evaluation function) to evaluate each chromosome (rendering strategy) to obtain the fitness value. Among them, user experience (U) can be measured by considering factors such as the visual effect of rendering and the interactive response time; functionality (F) can evaluate whether the rendering results meet the specific functional requirements of smart buildings, such as the accuracy of rendering target detection and the completeness of information display; resource sustainability (S) can consider the consumption of computing resources by the rendering process and the reasonable utilization of resources. The fourth step is the selection operation. According to the fitness value, a part of excellent chromosomes are selected as parents to generate the next generation of chromosomes. Roulette selection is used to make chromosomes with higher fitness values ​​have a greater probability of being selected. The fifth step is the crossover operation, which performs a crossover operation on the selected parent chromosomes to generate new daughter chromosomes. The crossover operation can randomly select certain positions on the chromosome for gene exchange, thereby combining the advantages of different parent chromosomes and increasing the diversity of the population. The sixth step is the mutation operation, which performs mutation operations on some offspring chromosomes to introduce new genetic changes. The mutation operation can randomly change the values ​​of certain genes on the chromosome to prevent the algorithm from falling into a local optimum. The seventh step is iterative optimization, repeating the above selection, crossover, mutation and fitness evaluation steps to continuously iterate and optimize the population. In each generation of iteration, chromosomes with higher fitness values ​​are retained, and the rendering strategy is gradually improved. Finally, the termination condition is judged.

[0093] When the termination condition is met, the algorithm stops. To ensure performance, we can set the termination condition to the number of iterations. Increasing the judgment dimension will increase the number of iterations. We can also directly reduce the number of iterations. Although it may not reach the optimal level, it can reduce performance loss. The chromosome finally obtained represents the optimal rendering strategy, that is, the best solution that meets multiple goals such as user experience, functionality and resource sustainability.

[0094] S4: Dynamic rendering resource scheduling.

[0095] In the dynamic rendering resource scheduling of smart buildings, real-time monitoring of hardware resources is carried out, with more frequent monitoring frequency and hardware performance counters to obtain more detailed resource usage information. Dynamically adjust the resource allocation ratio according to the needs of smart building rendering, and dynamically allocate resources based on factors such as task priority, resource requirements, and historical usage. Figure 4 As shown in the figure, the resource reservation method is used to ensure that key tasks have sufficient resources, and the key resource task set C = {C1, C2, ..., C n}, for key task C n , reserve more R re,j In building rendering, real-time rendering is essential for mission-critical monitoring. 20 , the reserved resources are:

[0096]

[0097] Where k4 is the reserved coefficient, It is a key task C 20 The priority of It is a key task C 20 Demand for resources: When a rendering task triggers a task in the critical task set, it will request system resources and reserve resources. During the rendering period, these resources will not be used by other requests. When the use is completed, these resources will return to the system resources. R is the amount of resources allocated to the critical task, K is the reservation coefficient, P is the priority of the critical task, and D is the demand for resources for the critical task. For example, for the critical tasks used in this project, the higher the P and D of a task, the more reserved resources will be obtained, and vice versa. Although they are all critical tasks, some critical tasks use different amounts of resources and task levels, so there will be different Rs; (the role of the critical task set is that when a task comes in, it will first be found in the critical task set. If it cannot be found, it is an ordinary task and uses ordinary resources with other ordinary tasks). After the task is completed, the result set of the operation data is saved in the historical data set as the old data set for the next rendering. After that, the occupied resources are released immediately, and the resource status is quickly updated. The recycled resources are managed and reused using technologies such as resource pools to improve resource utilization and achieve continuous resource supply.

[0098] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0099] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0100] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0101] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0102] Embodiment 2 is an embodiment of the present invention, which provides an optimization system for dynamically optimizing the allocation of rendering resources.

[0103] Recognition module, target detection and recognition.

[0104] The pruning module prunes the tasks based on the target detection and recognition results.

[0105] The optimization module explores the optimal rendering path and uses genetic algorithms to select the optimal strategy.

[0106] Allocation module, dynamic rendering resource scheduling, dynamically adjusts resource allocation ratio according to the needs of smart building rendering.

[0107] The recognition module transmits the recognition results to the pruning module, which prunes the tasks and then transmits them to the optimization module for strategy exploration. Finally, the allocation module generates the resource allocation ratio according to the strategy of the optimization module.

[0108] Embodiment 3 is an embodiment of the present invention, which provides an optimization method for dynamically optimizing the allocation of rendering resources. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0109] First of all, it should be noted that the proof method of this solution will have unavoidable problems such as network fluctuations. During the experiment, we will try our best to ensure a unified verification process and the same experimental environment, and record the experimental data in real time to improve the correctness of the experiment. At the beginning of this experiment, we first built a traditional rendering system and a rendering system of this solution on this server. Through the web page, we visualized the rendering content of the servers equipped with two different solution systems. We ran the two systems in the same bandwidth of 100Mbps and hardware equipment environment, and recorded the rendering frame loss rate, rendering blur number and blur circle size, CPU occupancy rate and operation response time within one hour, as shown in Table 1:

[0110] Table 1 Comparison of rendering effect indicators of different solutions

[0111] index Traditional rendering solution This system rendering solution Relative improvement Average Frames 21 28 / Rendering blur number (still) 6 0 / Average CPU usage 67.1% 55% 12.1% Memory usage 80% 60% 20% Average operation response time 1 second 0.4 seconds 60% Loading response time 1 minute 18 seconds 50 seconds 35.9%

[0112] In terms of average frame rate, this solution can make the frame rate more stable. During the experiment, the frame rate of the traditional solution fluctuated greatly, jumping between 15 and 25. The frame rate of this solution was relatively stable, and it could be stabilized at more than 24 frames even when dragging the screen to move, achieving a relatively smooth picture. Considering that it is difficult to observe blur during operation, the static observation method is adopted. Within ten minutes of observation, the traditional rendering will have blurring and fluctuations in the rendering boundary, but this solution does not have this situation. In terms of CPU usage, the traditional solution also exceeds this solution during loading and running. Under our 100 identical operations, the traditional solution has response delays and freezes, and other places pause during operation, while this solution greatly reduces the operation response time, and other resources do not pause. When loading from the web page, excluding the impact of bandwidth fluctuations, the average response time of the traditional solution is 1 minute and 18 seconds, and the average response time of this solution is 50 seconds, which is also a huge improvement. This shows that this solution achieves more efficient and smooth rendering compared to the traditional solution, and also improves the stability of rendering.

[0113] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for dynamically optimizing the allocation of rendering resources, characterized in that: include: Target detection and recognition; Prune tasks based on target detection and recognition results; Explore the optimal rendering path and use genetic algorithms to select the optimal strategy; Dynamic rendering resource scheduling dynamically adjusts resource allocation ratios according to the needs of smart building rendering.

2. The optimization method for dynamically optimizing the allocation of rendering resources according to claim 1, characterized in that: The target detection and recognition includes preprocessing the input building image frame and then splitting the small module objects to be rendered using the architecture combining CNN and Transformer; Through the combination of cross entropy and mean square error loss, and training with the Adam optimizer, the features of various objects in smart buildings can be accurately extracted; Finally, feature integration is performed to integrate the detected key features into structured data information. An efficient data structure hash table is used to improve the subsequent processing speed and output high-quality structured data information.

3. The optimization method for dynamically optimizing the allocation of rendering resources according to claim 2, characterized in that: The pruning of the tasks includes obtaining a predicted visual effect score and a computational cost of each rendering task after the structured data information has passed through an XGBoost process; Only a small part of the tasks are pruned each time. Task pruning is to prune away tasks that have little contribution to the overall rendering effect or have high computational cost but low visual effect improvement.

4. The optimization method for dynamically optimizing the allocation of rendering resources according to claim 3, characterized in that: The exploring of the optimal rendering path includes randomly generating a set of initial rendering strategies as an initial population of a genetic algorithm; Use evaluation functions to measure user experience, functionality, and resource sustainability, and then evaluate the pros and cons of each individual, so as to guide the algorithm to evolve in the optimal direction and obtain the optimal rendering strategy; The evaluation function is a regression calculation of user experience, functionality, and resource sustainability.

5. The optimization method for dynamically optimizing the allocation of rendering resources according to claim 4, characterized in that: The dynamic rendering resource scheduling includes dynamically adjusting the resource allocation ratio according to the demand for smart building rendering, and dynamically allocating resources according to task priority, resource demand, and historical usage factors; Set a critical resource task set. When a rendering task triggers a task in the critical task set, system resources are requested and retained. During rendering, these resources are not used by other requests. When the use is completed, the resources are returned to the system resources.

6. The optimization method for dynamically optimizing the allocation of rendering resources according to claim 4, characterized in that: When exploring the optimal rendering path, the depth-first search strategy also includes comprehensively considering the dynamic nature of the target, the possibility of interaction with users, and the historical importance in the smart building, using machine learning methods, using support vector machine classifiers to predict the priority of tasks, and calculating the priority of each task; the high priority is 1, and the low priority is 0; The search algorithm using heuristic search is expressed as: Among them, ω1, ω2, ω3 are weight coefficients used to adjust the importance of different factors; P(task) is the priority of the task obtained by the decision function of the support vector machine; R(task) represents the resource usage required for the rendering task; C(task) represents the visual effect score of the rendering task; The search process is parallelized, recursively exploring all possible rendering paths until resource limits are reached or all tasks are considered.

7. The optimization method for dynamically optimizing the allocation of rendering resources according to claim 5, characterized in that: When dynamically allocating resources, the resource reservation method is used to ensure that key tasks have sufficient resources. The key resource task set C = {C1, C2, ..., C n }, for key task C n , reserve more R re,j ; In building rendering, real-time rendering is essential for mission-critical monitoring 20 , the reserved resources are: R re,20 =k4×P C20 ×D C20 Among them, k4 is the reserved coefficient, P C20 It is a key task C 20 Priority, D C20 It is a key task C 20 The need for resources.

8. An optimization system for dynamically optimizing the allocation of rendering resources using the method according to any one of claims 1 to 7, characterized in that: Recognition module: target detection and recognition; The pruning module prunes the tasks based on the target detection and recognition results; The optimization module explores the optimal rendering path and uses genetic algorithms to select the optimal strategy; Allocation module, dynamic rendering resource scheduling, dynamically adjusts resource allocation ratio according to the needs of smart building rendering.

9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that: when the processor executes the computer program, the processor implements the steps of an optimization method for dynamically optimizing the allocation of rendering resources.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the optimization method for dynamically optimizing the allocation of rendering resources are implemented.

Citation Information

Cited By

  • WebGPU-based end-cloud hybrid rendering method and device and computer storage medium

    CN121636032A