A 3D resource cache dynamic balancing method
Through dynamic 3D resource cache balancing technology, idle renderers are used to pre-cache 3D scene resources required by users, which solves the problem of insufficient utilization of renderer resources in cloud rendering technology, and improves the utilization rate and user experience of renderers.
Patent Information
- Application Number
- CN202210661960.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-06-13
AI Technical Summary
Existing cloud rendering technology cannot effectively utilize renderer resources in large-scale clusters, resulting in some renderers being idle while some renderers are loaded. Users need to wait for other users to exit before using it, increasing the user's waiting time.
Dynamic 3D resource cache balancing technology is used to determine the idle state of the renderer, and the idle renderer is used to pre-cache the 3D scene resource files required by the user, and dynamically adjust the cache according to the load and resource utilization of the renderer to improve the utilization rate of the renderer.
The utilization rate of rendering machines is improved, the waiting time of users is reduced, and the problem of insufficient utilization of rendering machines in the prior art is solved.
Smart Images

Figure CN115082284B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resource cache, and in particular to a 3D resource cache dynamic balancing method. Background Art
[0002] The cloud rendering service runs in the rendering machine and relies on the local resource cache of the rendering machine. When using it, the user first selects the rendering machine and then runs the cloud rendering preview. If multiple users use the rendering machine at the same time and the number of users is greater than the number of runnable instances of the rendering machine, you need to wait; if you switch to another rendering machine, you need to wait for a long time to synchronize the resource cache.
[0003] Existing cloud rendering technologies all require users to select a rendering machine, and the resource files required to load the 3D scene are stored in cache on the rendering machine. However, a rendering machine can only be used by a limited number of users, and when the number of users exceeds the upper limit of the instances that can be run on the rendering machine, users need to wait for other users currently connected to the cloud rendering to exit before they can use it. This solution cannot utilize rendering machine resources in large-scale clusters, and it is easy for some rendering machines to be idle and some rendering machines to be queued with high load. Summary of the invention
[0004] In view of this, the present invention provides a 3D resource cache dynamic balancing method, which adopts dynamic 3D resource cache balancing technology to improve the utilization rate of the rendering machine and reduce the user's waiting time by using idle rendering machines to pre-cache 3D scene resource files required by users.
[0005] The present invention discloses a 3D resource cache dynamic balancing method, comprising the following steps:
[0006] Step 1: Determine whether the rendering machine is idle to obtain an idle rendering machine or a non-idle rendering machine;
[0007] Step 2: The idle rendering machine caches and loads the required 3D scene resources;
[0008] Step 3: Determine whether the 3D scene resources cached by the non-idle rendering machine need to be cleared.
[0009] Furthermore, the step 1 comprises:
[0010] According to the device load and the number of started instances, when the load threshold is exceeded or the number of started instances reaches the upper limit, it is determined as a non-idle rendering machine; otherwise, it is determined as an idle rendering machine.
[0011] Furthermore, the step 2 comprises:
[0012] Step 21: Calculate the idle index of the idle rendering machine according to the number of runnable instances and the available disk capacity;
[0013] Step 22: Calculate the scene index of the required 3D scene resource based on the 3D scene resource required for rendering;
[0014] Step 23: According to the idle index and the scene index, cache and load the 3D scene resource corresponding to the scene index.
[0015] Furthermore, the step 21 comprises:
[0016] The calculation formula for the idle index of an idle rendering machine is:
[0017] p=i*i'+d*d'
[0018] Among them, i is the number of runnable instances of the idle rendering machine, i' is the instance weight coefficient, d is the available capacity of the disk, and d' is the disk weight coefficient.
[0019] Furthermore, the step 21 further includes:
[0020] Sort the idle rendering machines into the idle rendering machine queue P according to the idle index p from large to small.
[0021] Further, the step 22 comprises:
[0022] Render the required 3D scene resources and calculate the scene index:
[0023] t=w*w'+m*m'+u*u'+x*x'
[0024] Where t is the scene index, w is the number of times the scene has been used in the last 7 days, m is the number of times the scene has been used in the last 30 days, u is the number of users who hold the required 3D scene resources, x is the number of idle rendering machines that cache the required 3D scene resources, and the weight coefficients corresponding to w, m, u, and x are w', m', u', and x', respectively.
[0025] Furthermore, the step 22 further includes:
[0026] According to the order of scene index t from large to small, each required 3D scene resource is placed into the scene queue S.
[0027] Further, the step 23 comprises:
[0028] Step 231: Scene queue S is dequeued j , the idle rendering machine queue P dequeues p1; j is greater than or equal to 1 and less than or equal to J, where J is the number of 3D scene resources in the scene queue S;
[0029] Step 232: If p1 already contains s j , then put it into temporary queue T;
[0030] Step 233: Remove the idle renderer queue P from queue p i , until p i Does not include j , p i Caches j , the temporary queue T is re-entered into the idle renderer queue P; wherein, i is greater than 1 and less than or equal to n, and n is the number of idle renderers in the idle renderer queue P;
[0031] Step 234: Let s j = j+1 ; Loop through steps 231 to 233 until queue P is empty.
[0032] Furthermore, the step 3 comprises:
[0033] When k' / k>e'*e+o'*o, clear the 3D scene resources cached by the non-idle renderer; otherwise, do not clear;
[0034] Among them, k is the available capacity of the disk, e is the number of times the local scene resource cache is used in 7 days, o is the number of times the local scene resource cache is used in 30 days, and the corresponding weight coefficients of k, e, and o are k', e', and o' respectively.
[0035] Furthermore, the method further comprises:
[0036] According to the user's scene preview requirements, a rendering machine with a corresponding 3D scene resource cache is allocated to it.
[0037] Due to the adoption of the above technical solution, the present invention has the following advantages: the present invention adopts dynamic 3D resource cache balancing technology, and improves the utilization rate of the rendering machine and reduces the user's waiting time by using idle rendering machines to pre-cache the 3D scene resource files required by users. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0039] Figure 1 A schematic diagram of a flow chart of a 3D resource cache dynamic balancing method according to an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of a rendering machine judgment process according to an embodiment of the present invention;
[0041] Figure 3 A schematic diagram of an idle rendering machine entering a queue according to an embodiment of the present invention;
[0042] Figure 4 A schematic diagram of a scene resource entering a scene queue according to an embodiment of the present invention;
[0043] Figure 5 A schematic diagram of cache loading according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention is further described in conjunction with the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present invention.
[0045] See also Figure 1 The present invention provides an embodiment of a 3D resource cache dynamic balancing method, specifically:
[0046] See also Figure 2 ,The rendering machine is classified into a non-idle rendering machine according to the device load and the number of started instances. If the load threshold is exceeded or the number of started instances reaches the upper limit, it is an idle rendering machine. Otherwise, it is an idle rendering machine.
[0047] See also Figure 3 The idle rendering machines are sorted from large to small according to the number of runnable instances and available disk capacity. The number of runnable instances is i, the instance weight coefficient is i', the available disk capacity is d (unit GB), the disk weight coefficient is d', and the idle index p = i*i'+d*d'. They are placed in the idle rendering machine queue P according to the number of runnable instances and the available disk capacity.
[0048] See also Figure 4 , the 3D scene resource files required for rendering are calculated according to the number of times the scene has been used in the last 7 days w, the number of times it has been used in the last 30 days m, the number of users who hold the scene u, the number of idle rendering machines that have cached the scene resources x, and the corresponding weight coefficients w', m', u', x'. The scene index s = w*w'+m*m'+u*u'+x*x' is calculated and sorted from large to small according to s and placed in the scene queue S.
[0049] See also Figure 5 , cache loading: scene queue S dequeues s1, idle renderer queue P dequeues p1, if p1 already contains s1 scene, put it into temporary queue T, P dequeues pn, until pn does not contain s1, pn caches s1 resources, and temporary queue T re-enqueues P.
[0050] The non-idle rendering machine calculates whether the resources need to be cleared according to the available disk capacity k, the number of times the local scene resource cache is used in 7 days e, the number of times the local scene resource cache is used in 30 days o, and the corresponding weight system k', e', o'. When k' / k>e'*e+o'*o, the scene resource cache is cleared.
[0051] When a user requests a 3D scene preview, a rendering machine with the scene resource cache is allocated.
[0052] Finally, 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 above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A 3D resource cache dynamic balancing method, characterized in that: The following steps are involved: Step 1: Determine whether the rendering machine is idle to obtain an idle rendering machine or a non-idle rendering machine; Step 2: The idle rendering machine caches and loads the required 3D scene resources; Step 3: Determine whether the 3D scene resources cached by the non-idle rendering machine need to be cleared; The step 2 comprises: Step 21: Calculate the idle index of the idle rendering machine according to the number of runnable instances and the available disk capacity; Step 22: Calculate the scene index of the required 3D scene resource based on the 3D scene resource required for rendering; Step 23: According to the idle index and the scene index, cache and load the 3D scene resource corresponding to the scene index; The step 21 comprises: The idle index of an idle rendering machine is calculated as: p=i*i'+d*d' Where i is the number of runnable instances of the idle rendering machine, i' is the instance weight coefficient, d is the available capacity of the disk, and d' is the disk weight coefficient; The step 21 further comprises: Sort the idle rendering machines into the idle rendering machine queue P according to the idle index p from large to small; The step 22 comprises: Render the required 3D scene resources and calculate the scene index: t=w*w'+m*m'+u*u'+x*x' Where t is the scene index, w is the number of times the scene has been used in the last 7 days, m is the number of times the scene has been used in the last 30 days, u is the number of users holding the required 3D scene resources, x is the number of idle rendering machines that cache the required 3D scene resources, and the weight coefficients corresponding to w, m, u, and x are w', m', u', and x' respectively; The step 22 further comprises: Sort the required 3D scene resources into the scene queue S according to the scene index t from large to small; The step 23 comprises: Step 231: Scene queue S is dequeued j , the idle rendering machine queue P dequeues p1; j is greater than or equal to 1 and less than or equal to J, where J is the number of 3D scene resources in the scene queue S; Step 232: If p1 already contains s j , then put it into temporary queue T; Step 233: Remove the idle renderer queue P from queue p i , until p i Does not include j , p i Caches j , the temporary queue T is re-entered into the idle renderer queue P; wherein, i is greater than 1 and less than or equal to n, and n is the number of idle renderers in the idle renderer queue P; Step 234: Let s j =s j+1 ; Loop through steps 231 to 233 until the queue P is empty; The step 3 comprises: When k' / k>e'*e+o'*o, clear the 3D scene resources cached by the non-idle renderer; otherwise, do not clear; Among them, k is the available capacity of the disk, e is the number of times the local scene resource cache is used in 7 days, and o is the number of times the local scene resource cache is used in 30 days. The weight coefficients corresponding to k, e, and o are k', e', and o' respectively; The non-idle rendering machine calculates whether the resources need to be cleared according to the available disk capacity k, the number of times the local scene resource cache is used in 7 days e, the number of times the local scene resource cache is used in 30 days o, and the corresponding weight system k', e', o'. When k' / k>e'*e+o'*o, the scene resource cache is cleared.
2. The method according to claim 1, characterized in that The step 1 comprises: According to the device load and the number of started instances, when the load threshold is exceeded or the number of started instances reaches the upper limit, it is determined as a non-idle rendering machine; otherwise, it is determined as an idle rendering machine.
3. The method according to claim 1, characterized in that The method further comprises: According to the user's scene preview requirements, a rendering machine with a corresponding 3D scene resource cache is allocated to it.
Citation Information
Patent Citations
Decentralized distributed rendering method and system
CN104052803A