Scheduling method of rendering engine
By dividing the rendering task into subtasks and assigning them to multiple rendering engines for processing according to rendering performance, the problem of low rendering efficiency in the existing technology is solved, and an efficient and adaptable three-dimensional rendering solution is achieved.
Patent Information
- Application Number
- CN202410883619.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-03
AI Technical Summary
In existing 3D rendering technology, a single rendering engine has low rendering efficiency when faced with multiple rendering tasks. Multi-rendering engine technology has the problem of low rendering efficiency due to the rendering task allocation strategy, making it difficult to meet the diverse terminal needs and high efficiency of complex scenes. render.
Efficient scheduling of rendering tasks is achieved by dividing the rendering task to be processed into multiple subtasks at different levels of detail, and assigning the subtasks to multiple available rendering engines for processing based on the mapping relationship between rendering performance and level of detail.
It improves the rendering engine's processing efficiency of rendering tasks, adapts to the needs of different terminals and scenes, and ensures high performance and high-quality rendering output.
Smart Images

Figure CN118426973B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a scheduling method for a rendering engine. Background Art
[0002] Against the backdrop of the current domestic informatization construction and digital transformation, the demand for efficient and collaborative 3D rendering technology in fields such as architecture, planning, urban management, and digital twins is growing.
[0003] At present, commonly used 3D rendering technologies include two categories: single rendering engine technology and multi-rendering engine technology. Specifically, a single rendering engine can only process one rendering task at a time. When faced with multiple rendering tasks, there is a problem of low rendering efficiency. In order to solve the limitations of a single rendering engine, the industry has proposed multi-rendering engine technology. However, in actual applications, although multiple rendering engines can process multiple rendering tasks in parallel, the rendering efficiency is still low because the rendering task allocation strategy is to allocate the rendering tasks to be processed to the idle rendering engines for rendering.
[0004] Therefore, how to improve the rendering efficiency of multiple rendering engines is a problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of this application is to provide a scheduling method for a rendering engine, aiming to improve the rendering efficiency of multiple rendering engines.
[0006] To achieve the above-mentioned purpose, the present application provides a scheduling method for a rendering engine, the scheduling method for the rendering engine is applied to a scheduling system, the scheduling system includes a plurality of rendering engines, and the scheduling method for the rendering engine includes:
[0007] receiving a rendering task to be processed, and dividing the rendering task into a plurality of subtasks at different levels of detail;
[0008] Determine an available engine among the plurality of rendering engines, and obtain rendering performance of each of the available engines;
[0009] Based on a preset first mapping relationship, the multiple subtasks are allocated to each of the available engines, and each of the available engines is scheduled to process the multiple subtasks to obtain a rendering result of the rendering task, wherein the first mapping relationship represents a mapping relationship between rendering performance and detail level.
[0010] In one embodiment, the step of dividing the rendering task into a plurality of subtasks at different levels of detail includes:
[0011] Determining original model data of the rendering task, and preprocessing the original model data to obtain a plurality of model data sets at different levels of detail;
[0012] The rendering task is divided into a plurality of subtasks according to the plurality of model data sets.
[0013] In one embodiment, the scheduling system further includes a digital twin engine functional interface, and the plurality of rendering engines are all connected to the resource management system through the digital twin engine functional interface. Before the step of receiving the rendering task to be processed and determining the task type of the rendering task, the method further includes:
[0014] The multiple rendering engines request graphics processing resources from the resource management system through the digital twin engine functional interface.
[0015] In one embodiment, the step of determining an available engine among the plurality of rendering engines comprises:
[0016] Identify the hardware performance of the terminal device integrated with the scheduling system, and select multiple target engines from the multiple rendering engines based on a preset second mapping relationship, wherein the second mapping relationship represents a mapping relationship between hardware performance and rendering performance;
[0017] Determine the remaining image processing resources of the plurality of target engines, and judge whether the plurality of target engines meet the rendering requirements of the target subtasks based on the plurality of remaining image processing resources, wherein the target subtask is the subtask with the lowest rendering requirement among the plurality of subtasks;
[0018] A rendering engine among the multiple target engines that meets the rendering requirement of the target subtask is determined as an available engine among the multiple rendering engines.
[0019] In one embodiment, the step of scheduling each of the available engines to process the plurality of subtasks to obtain a rendering result of the rendering task includes:
[0020] Determining rendering parameters of each of the plurality of subtasks based on a preset third mapping relationship, wherein the third mapping relationship represents a mapping relationship between a detail level and a rendering parameter;
[0021] The available engines process the multiple subtasks based on the respective rendering parameters of the multiple subtasks to obtain a rendering result of the rendering task.
[0022] In one embodiment, the step of processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain a rendering result of the rendering task comprises:
[0023] Processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain rendering images corresponding to the plurality of subtasks;
[0024] The rendering images are integrated and processed to obtain a rendering result of the rendering task.
[0025] In one embodiment, after the step of scheduling each of the available engines to process the plurality of subtasks to obtain the rendering result of the rendering task, the following steps are included:
[0026] Based on the display viewport range of the display screen of the terminal device integrated with the scheduling system, a target rendering picture is selected from the plurality of rendering pictures and outputted on the display screen.
[0027] In addition, to achieve the above-mentioned purpose, the present application further provides a scheduling device for a rendering engine, wherein the scheduling device for the rendering engine is applied to a scheduling system, wherein the scheduling system includes a plurality of rendering engines, and wherein the scheduling device for the rendering engine includes:
[0028] A segmentation module, configured to receive a rendering task to be processed and segment the rendering task into a plurality of subtasks at different levels of detail;
[0029] An acquisition module, used to determine available engines among the plurality of rendering engines, and acquire rendering performance of each of the available engines;
[0030] A scheduling module is used to allocate the multiple subtasks to each of the available engines based on a preset first mapping relationship, and schedule each of the available engines to process the multiple subtasks to obtain a rendering result of the rendering task, wherein the first mapping relationship represents a mapping relationship between rendering performance and detail level.
[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a program for implementing the scheduling method of the rendering engine is stored on the computer-readable storage medium. The program for implementing the scheduling method of the rendering engine is executed by a processor to implement the steps of the scheduling method of the rendering engine as described above.
[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, including a computer program, which implements the steps of the scheduling method of the rendering engine as described above when the computer program is executed by a processor.
[0033] The present application provides a scheduling method for a rendering engine, which is applied to a scheduling system. The scheduling system includes multiple rendering engines. The present application first receives a rendering task to be processed, divides the rendering task into multiple subtasks at different levels of detail, and further determines available engines among the multiple rendering engines, and obtains the rendering performance of each available engine. Based on a preset first mapping relationship, the multiple subtasks are scheduled to each available engine, and the multiple subtasks are processed by each available engine to obtain a rendering result of the rendering task, wherein the first mapping relationship represents a mapping relationship between rendering performance and level of detail.
[0034] In this way, compared to the engine scheduling method of directly assigning the rendering tasks to be processed to the idle rendering engines for rendering, the present application improves the processing efficiency of the rendering engine for rendering tasks by dividing a single rendering task into multiple sub-tasks with different detail levels, and assigning the multiple sub-tasks with different detail levels to multiple available engines based on the mapping relationship between rendering performance and detail level. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 This is a flow chart of the first embodiment of the scheduling method of the rendering engine of the present application;
[0038] Figure 2 A schematic diagram of a scheduling system architecture involved in an embodiment of a scheduling method for a rendering engine of the present application;
[0039] Figure 3 This is a schematic diagram of the module structure of the scheduling device of the rendering engine of this application;
[0040] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the scheduling method of the rendering engine in the embodiment of the present application.
[0041] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0043] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0044] The main solution of the present application is: receiving a rendering task to be processed, dividing the rendering task into multiple subtasks with different levels of detail; determining an available engine among the multiple rendering engines, and obtaining the rendering performance of each of the available engines; allocating the multiple subtasks to each of the available engines based on a preset first mapping relationship, scheduling each of the available engines to process the multiple subtasks, and obtaining the rendering result of the rendering task, wherein the first mapping relationship represents the mapping relationship between rendering performance and level of detail.
[0045] At present, commonly used 3D rendering technologies include two categories: single rendering engine technology and multi-rendering engine technology. Specifically, a single rendering engine can only process one rendering task at a time. When faced with multiple rendering tasks, there is a problem of low rendering efficiency. In order to solve the limitations of a single rendering engine, the industry has proposed multi-rendering engine technology. However, in actual applications, although multiple rendering engines can process multiple rendering tasks in parallel, the rendering efficiency is still low because the rendering task allocation strategy is to allocate the rendering tasks to be processed to the idle rendering engines for rendering.
[0046] Compared to the engine scheduling method of directly assigning pending rendering tasks to idle rendering engines for rendering, the present application improves the processing efficiency of rendering engines for rendering tasks by dividing a single rendering task into multiple subtasks at different levels of detail, and assigning multiple subtasks at different levels of detail to multiple available engines based on the mapping relationship between rendering performance and level of detail.
[0047] In addition, the rendering methods of existing rendering engines have the following defects: a single rendering engine is difficult to simultaneously meet the performance requirements, functional characteristics and user experience requirements of various terminals such as desktop, mobile, and web terminals. At the same time, for real-time rendering of large-scale and complex three-dimensional scenes, a single engine is prone to performance bottlenecks and cannot achieve efficient and high-quality rendering output; for multiple rendering engines, it is difficult to share multi-source heterogeneous data, and there is a lack of unified data exchange formats and interface standards; there is a lack of efficient management of massive two-dimensional and three-dimensional data, and optimization of data transmission, scene scheduling, data loading, etc. is required. At the same time, the scene adaptive scheduling of data services for multi-terminal applications requires adaptive switching of data services; in a multi-node, multi-GPU (Graphics Processing Unit, graphics processor) environment, it is not easy to effectively implement task allocation, load balancing, cross-engine communication and data synchronization, especially the optimization of hardware resources may not be sufficient, which may affect the overall rendering efficiency. At the same time, when dealing with complex scenarios, diverse terminal requirements, and changes in network conditions, the existing technology needs to improve its response speed and accuracy in dynamically adjusting scene complexity, data transmission strategies, and rendering priorities; porting high-performance rendering technology to different operating systems and hardware architectures and optimizing them is a difficult task, which may encounter problems such as compiler differences, inconsistent hardware features, and incomplete driver support. It is quite challenging to achieve an adaptive and consistent user interaction experience for the diverse interaction methods of various terminals (such as touch screens, gestures, sensor data, etc.).
[0048] This application builds a highly compatible, efficient, flexible and reliable multi-engine rendering scheduling expression system in the context of multi-mode and multi-terminal to meet the growing demand for high-performance 3D graphics applications. In the face of the evolving needs of high-performance 3D graphics applications, by integrating a variety of mainstream rendering engines, such as Unreal Engine, WebGL (WebGraphics Library), etc., and optimizing their operation in the domestic information innovation environment, it ensures stable performance on different operating systems and hardware platforms. The system will adopt advanced resource management and scheduling strategies to achieve cross-engine resource sharing and performance optimization, while supporting adaptive scheduling of multi-level data services to adapt to different scenarios and user needs. This application aims to provide a seamless, smooth and high-quality visual experience for high-performance 3D graphics rendering that is widely used in game development, architectural design, virtual reality, mobile graphics applications and other fields.
[0049] It should be noted that the execution subject of the method in each embodiment of the energy storage system configuration method of the present application may be a dispatching system, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a dispatching device of a rendering engine capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the dispatching system as the execution subject as an example to illustrate this embodiment and the following embodiments.
[0050] Based on this, the present application proposes a scheduling method for a rendering engine of the first embodiment, please refer to Figure 1 The scheduling method of the rendering engine includes steps S10 to S40:
[0051] Step S10, receiving a rendering task to be processed, and dividing the rendering task into a plurality of subtasks at different levels of detail;
[0052] It should be noted that the scheduling system of the present application includes multiple rendering engines, and the design of multiple rendering engines makes the system more flexible and scalable. Rendering engines can be added or replaced at any time according to specific needs to adapt to changing needs and technological developments, thereby improving the flexibility and scalability of the system. By dividing model data according to the LOD level, it can adapt to rendering under different distances and performance requirements. Cloud computing resources are used to decompose complex rendering tasks and distribute them to multiple computing nodes for parallel processing, and then the results are merged and returned, which significantly improves the rendering speed; at the same time, some or all rendering tasks are deployed on edge nodes close to the user to execute, reducing network transmission delays, improving response speed, and alleviating pressure on the central server.
[0053] In this embodiment, the scheduling system further includes a digital twin engine functional interface, and the plurality of rendering engines are all connected to the resource management system through the digital twin engine functional interface. Before step S10, the following is further included:
[0054] The multiple rendering engines request graphics processing resources from the resource management system through the digital twin engine functional interface.
[0055] It should be noted that the embodiment of the present application encapsulates the different underlying rendering engines by providing an API (Application Programming Interface) abstraction layer, providing a unified interface for upper-level applications, and ensuring the universality and flexibility of the interface based on the general digital twin engine functional interface, including but not limited to scene management, resource loading, rendering object creation and update, rendering parameter setting, rendering task submission, etc., supports real-time replacement of rendering engines during program runtime, and dynamically selects the appropriate rendering engine according to actual needs or environmental conditions without modifying the code, thereby reducing the cost of cross-engine switching or collaboration.
[0056] In this way, engine adaptation and standardized interfaces ensure the stable operation of various mainstream rendering engines in a domestic environment, and design a universal rendering interface specification. Through resource pooling management and intelligent update strategies, the rational allocation and utilization of cross-engine resources are realized, and dynamic scheduling and performance optimization of rendering tasks are realized based on the established real-time performance monitoring system and task scheduling center. The embodiments of the present application can reduce development and maintenance costs by designing a unified interface and management mechanism. The collaborative work and resource sharing between various rendering engines can effectively reduce duplicate development and waste of resources, improve development efficiency and system maintainability, and thus reduce development and maintenance costs.
[0057] In a specific implementation, multiple rendering engines request GPU resources (i.e., the above-mentioned graphics processing resources) from the resource management system through the digital twin engine function interface. By way of example, the embodiment of the present application dynamically adjusts GPU resource allocation based on real-time load, uses containerization and GPU virtualization technology to isolate GPU resources, disperses tasks on multi-GPU servers, sets priorities based on task importance, and uses preemptive scheduling methods to ensure the execution of critical tasks; each engine requests the required resources from the resource management system through an interface, and the system obtains resources from the local cache, remote server or other engines according to the request, and uses the OpenCL command queues mechanism to achieve concurrent task execution.
[0058] In addition, it should be noted that for resource updates caused by LOD (Level of Detail) switching, intelligent update strategies are adopted, such as incremental updates, asynchronous loading, etc. And the embodiment of the present application allows one engine to directly reference resources loaded by another engine, reducing repeated loading and memory consumption.
[0059] In this embodiment, the step S20 may include:
[0060] Step S201, determining original model data of the rendering task, and preprocessing the original model data to obtain a plurality of model data sets at different detail levels;
[0061] It should be noted that the original model data in the rendering task refers to one or more three-dimensional models.
[0062] In a specific implementation, after determining the original model data of the rendering task, the original model data is preprocessed. Specifically, the three-dimensional models of terrain, buildings, vegetation, etc. are subjected to geometric simplification, texture compression, lighting baking, etc. to obtain multiple model data sets of different LOD levels, each model data set containing models and textures of different fineness.
[0063] Step S202: dividing the rendering task into a plurality of subtasks according to the plurality of model data sets.
[0064] After obtaining multiple model data sets at different LOD levels, the rendering task is divided into multiple subtasks according to each model data set, that is, one model data set corresponds to one subtask. When the rendering engine processes the subtask, it will perform rendering work according to the model data set corresponding to the subtask to obtain a rendered image.
[0065] Step S30, determining available engines among the plurality of rendering engines, and obtaining rendering performance of each of the available engines;
[0066] It should be noted that the scheduling system also includes a real-time monitoring module, which is used to monitor key indicators such as workload, frame rate, and memory usage of each rendering engine in the scheduling system, so as to determine the rendering performance of each rendering engine based on various key indicators.
[0067] An available engine is determined from a plurality of rendering engines, and rendering performance of each available engine monitored in advance is obtained.
[0068] In this embodiment, the step S30 may include:
[0069] Step S301, identifying the hardware performance of a terminal device integrated with the scheduling system, and selecting a plurality of target engines from the plurality of rendering engines based on a preset second mapping relationship, wherein the second mapping relationship represents a mapping relationship between hardware performance and rendering performance;
[0070] It should be noted that the embodiments of the present application can automatically identify the hardware performance of various terminal devices, where the types of terminal devices include but are not limited to desktops, laptops, mobile devices, and AR / VR devices, and the hardware performance includes but is not limited to processor type, graphics card model, screen resolution, and refresh rate. Select the most suitable rendering engine or optimize the rendering parameters based on the device characteristics to ensure the best visual effect on different terminals. The mapping relationship between the hardware performance of the terminal device and the rendering performance of the rendering engine is pre-defined (hereinafter referred to as the second mapping relationship for distinction). This application does not limit the specific correspondence of the second mapping relationship, which is a pre-derived empirical value.
[0071] The hardware performance of the terminal device integrated with the scheduling system is identified, and multiple engines (hereinafter referred to as target engines for distinction) are selected from multiple rendering engines based on a preset second mapping relationship.
[0072] In this way, through automatic identification and capability evaluation of various terminal devices, the best rendering engine or optimization parameters are selected based on the device characteristics to ensure the best visual effects on different terminals.
[0073] Step S302, determining the remaining image processing resources of the plurality of target engines, and judging whether the plurality of target engines meet the rendering requirements of the target subtasks based on the plurality of remaining image processing resources, wherein the target subtask is the subtask with the lowest rendering requirement among the plurality of subtasks;
[0074] Determine the remaining image processing resources of multiple target engines, and determine whether each target engine meets the rendering requirements of a subtask with the lowest rendering requirement among multiple subtasks (hereinafter referred to as a target subtask for distinction) based on each remaining image processing resource. The rendering requirement of a rendering task refers to the GPU resources required to execute the subtask.
[0075] Step S303: determining a rendering engine among the multiple target engines that meets the rendering requirement of the target subtask as an available engine among the multiple rendering engines.
[0076] A rendering engine that meets the rendering requirement of the target subtask among the multiple target engines is determined as an available engine among the multiple rendering engines.
[0077] Thus, the embodiments of the present application take into account the different performance and characteristics of different terminal devices, and introduce multiple rendering engines to better adapt to the needs of different terminal devices. At the same time, the most suitable rendering engine and parameters can also be selected for different scene requirements to achieve better rendering effects.
[0078] Step S40, allocating the plurality of subtasks to each of the available engines based on a preset first mapping relationship, scheduling each of the available engines to process the plurality of subtasks, and obtaining a rendering result of the rendering task, wherein the first mapping relationship represents a mapping relationship between rendering performance and detail level.
[0079] It should be noted that a mapping relationship between the rendering performance of the rendering engine and the detail level corresponding to the subtask is predefined (hereinafter referred to as the first mapping relationship for distinction). This application does not limit the specific corresponding relationship of the first mapping relationship.
[0080] Based on a preset first mapping relationship, multiple subtasks are allocated to each available engine. Specifically, an available engine with strong rendering performance is scheduled to process subtasks with a high level of detail. After multiple subtasks are allocated to each available engine, the multiple subtasks are processed by the available engines allocated to the subtasks.
[0081] In this way, the embodiments of the present application can improve rendering efficiency and performance by cooperating with multiple rendering engines and optimizing rendering parameters. When an engine has a problem or is overloaded, the system can automatically switch to other available engines to ensure the continuity of rendering services.
[0082] It should be noted that the embodiment of the present application also designs a cross-engine synchronization mechanism, such as a synchronization method based on message passing, to ensure the consistency of view and the continuity of action when multiple engines collaborate to render the same scene; and the embodiment of the present application can monitor network conditions (such as bandwidth, packet loss rate, latency, etc.). When network congestion is detected, the bit rate or resolution of the rendering output can be reduced to reduce network transmission pressure and ensure smooth playback.
[0083] In addition, the embodiment of the present application also designs a cross-engine rendering state management mechanism to ensure that global states such as lighting, materials, and camera parameters are consistent among engines; and builds a cross-process / thread message bus to achieve synchronous notification of key rendering events (such as user interaction and scene changes) to ensure that each engine responds in time and updates the rendering results. In this way, through the cross-engine rendering state management and message bus synchronization mechanism, the consistency of global states such as lighting and materials among engines is ensured; at the same time, the perfect error handling and fault tolerance mechanism enhances the robustness and service continuity of the system, ensuring a good experience for users in abnormal situations. Moreover, the embodiment of the present application establishes a perfect error detection, reporting and recovery mechanism for possible engine failures, network interruptions, etc. to ensure service continuity. When a rendering engine has a problem or performance degradation, the task is automatically reallocated to other available engines to ensure service continuity, and a backup rendering path or backup engine is designed to quickly switch when the main engine has a problem to maintain user experience.
[0084] The embodiment of the present application receives a rendering task to be processed, determines the task type of the rendering task, divides the rendering task into multiple subtasks with different levels of detail, and further determines available engines among multiple rendering engines, obtains the rendering performance of each available engine, schedules the multiple subtasks to each available engine based on a preset first mapping relationship, processes the multiple subtasks by each available engine, and obtains a rendering result of the rendering task, wherein the first mapping relationship represents a mapping relationship between rendering performance and level of detail.
[0085] In this way, compared to the engine scheduling method of directly assigning the rendering tasks to be processed to the idle rendering engines for rendering, the embodiment of the present application improves the processing efficiency of the rendering engine for rendering tasks by dividing a single rendering task into multiple sub-tasks with different detail levels, and assigning the multiple sub-tasks with different detail levels to multiple available engines according to the mapping relationship between rendering performance and detail level.
[0086] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. On this basis, the step S40 may include:
[0087] Step S401, determining rendering parameters of each of the plurality of subtasks based on a preset third mapping relationship, wherein the third mapping relationship represents a mapping relationship between detail levels and rendering parameters;
[0088] It should be noted that a mapping relationship between the detail level of a subtask and the rendering parameters used by the subtask is predefined (hereinafter referred to as a third mapping relationship for distinction). This application does not limit the specific corresponding relationship of the third mapping relationship.
[0089] Step S402: Processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain a rendering result of the rendering task.
[0090] After determining the rendering parameters of each subtask, each available engine processes the multiple subtasks based on the rendering parameters of the multiple subtasks. Specifically, the available engine assigned to the subtask processes the subtask based on the rendering parameters of the subtask to obtain a rendering result.
[0091] In this embodiment, the step S402 may include:
[0092] Step A10, processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain rendering images corresponding to the plurality of subtasks;
[0093] Step A20, integrating the rendering images to obtain a rendering result of the rendering task.
[0094] The multiple subtasks are processed by each available engine based on the rendering parameters of each of the multiple subtasks to obtain rendering images corresponding to each of the multiple subtasks, and then the rendering images are integrated to obtain a final rendering result.
[0095] In this way, the embodiment of the present application determines the rendering parameters corresponding to each task after dividing the rendering task into multiple subtasks and sending them to each available engine in the scheduling system respectively, and after the available engine assigned to the subtask processes the subtask based on the rendering parameters to obtain the rendering picture, the rendering pictures are integrated to obtain the final rendering result. In this way, the rendering efficiency when multiple rendering engines process rendering tasks is improved.
[0096] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. On this basis, after step S40, the scheduling method of the rendering engine further includes:
[0097] Step B10: Based on the display viewport range of the display screen of the terminal device integrated with the scheduling system, a target rendering picture is selected from the plurality of rendering pictures and outputted on the display screen.
[0098] After using multiple available engines to execute each subtask and obtaining the rendering screen corresponding to each subtask, when displaying it to the user, according to the display viewport range of the display screen of the terminal device currently integrated with the scheduling system, a rendering screen corresponding to the current display viewport range (hereinafter referred to as the target rendering screen for distinction) is selected from multiple rendering screens for display.
[0099] For example, for the same data, multiple level of detail (LOD) data sets are created, each containing models and textures of different fineness. Threshold conditions such as viewing distance and screen space size are set for each LOD level. When the observer's position, viewing angle or screen window changes, the corresponding LOD level is automatically switched according to these thresholds; according to different hardware performance and current observation conditions, the most suitable LOD level data service is dynamically selected for expression. The selection strategy can be based on rules (such as fixed threshold judgment) or machine learning algorithms (such as learning models based on historical behavior and performance data).
[0100] In addition, the embodiment of the present application adopts a hierarchical caching mechanism (such as memory cache, disk cache, network cache) to reduce data access delay and improve rendering speed; realize on-demand loading and dynamic update of data, and only transmit the minimum data set within the current viewport range or required for interaction, so as to avoid network congestion caused by transmitting a large amount of data at one time. In this way, by layering and caching strategy design of data services, combining hierarchical caching, data preprocessing, on-demand loading and efficient data transmission technology, data access is made efficient and lightweight, network transmission pressure is reduced, and rendering speed is improved, which is especially suitable for processing large scenes and real-time data streams. Considering the impact of network bandwidth and latency on data service selection, low-latency, high-bandwidth data transmission protocols (such as HTTP / 2, QUIC, etc.) are applied to ensure fast and reliable data transmission between multiple engines; the transmitted LOD data is compressed (such as gzip, lz4, brotli, etc.) to reduce network transmission volume. After receiving the compressed data, the receiving end quickly decodes it and restores it to available three-dimensional model data. In addition, the embodiments of the present application use efficient data encoding formats (such as vector tiles, streaming transmission, etc.) to reduce data volume, improve network transmission efficiency, divide large scenes into multiple independent blocks (such as quadtree and octree structures), each block corresponds to a complete set of LOD level data, and develop a unified data exchange format so that different rendering engines can share and exchange data, reducing losses and delays in the data conversion process.
[0101] For example, Figure 2The diagram shows the scheduling system architecture, which is mainly divided into four functional modules, namely multi-mode multi-terminal collaborative scheduling, service adaptive loading, rendering state synchronization processing and multi-engine compatibility. Among them, the multi-mode multi-terminal collaborative scheduling module is used for device identification and performance evaluation, scene segmentation and dynamic adjustment of rendering parameters; the service adaptive loading module is used for data layer preprocessing, network bandwidth upgrade, hierarchical cache mechanism, data compression processing, scene on-demand loading, multi-LOD data set adjustment and data encoding system; the rendering state synchronization processing module is used for rendering state management, cross-engine message bus and engine backup and recovery; the multi-engine compatibility module is used for engine adaptation, resource management and performance monitoring. Engine adaptation includes UE (Unreal Engine) and Webgl (Web Graphics Library) engine adaptation and general rendering interface specifications. Resource management includes resource pooling management, LOD intelligent update and loaded resource call. Performance monitoring includes implementation of monitoring rendering engine workload, intelligent scheduling algorithm and cross-engine synchronization.
[0102] The present application also provides a rendering engine scheduling device, please refer to Figure 3 The scheduling device of the rendering engine is applied to a scheduling system, the scheduling system includes a plurality of rendering engines, and the scheduling device of the rendering engine includes:
[0103] A segmentation module 10 is used to receive a rendering task to be processed and segment the rendering task into a plurality of subtasks at different levels of detail;
[0104] An acquisition module 20, configured to determine available engines among the plurality of rendering engines, and acquire rendering performance of each of the available engines;
[0105] The scheduling module 30 is used to allocate the multiple subtasks to each of the available engines based on a preset first mapping relationship, and schedule each of the available engines to process the multiple subtasks to obtain the rendering results of the rendering task, wherein the first mapping relationship represents the mapping relationship between rendering performance and detail level.
[0106] Optionally, the segmentation module 10 is further used for:
[0107] Determining original model data of the rendering task, and preprocessing the original model data to obtain a plurality of model data sets at different levels of detail;
[0108] The rendering task is divided into a plurality of subtasks according to the plurality of model data sets.
[0109] Optionally, the scheduling system further includes a digital twin engine functional interface, and the plurality of rendering engines are all communicatively connected to the resource management system through the digital twin engine functional interface, and the scheduling device of the rendering engine further includes:
[0110] The multiple rendering engines request graphics processing resources from the resource management system through the digital twin engine functional interface.
[0111] Optionally, the acquisition module 20 is further used for:
[0112] Identify the hardware performance of the terminal device integrated with the scheduling system, and select multiple target engines from the multiple rendering engines based on a preset second mapping relationship, wherein the second mapping relationship represents a mapping relationship between hardware performance and rendering performance;
[0113] Determine the remaining image processing resources of the plurality of target engines, and judge whether the plurality of target engines meet the rendering requirements of the target subtasks based on the plurality of remaining image processing resources, wherein the target subtask is the subtask with the lowest rendering requirement among the plurality of subtasks;
[0114] A rendering engine among the multiple target engines that meets the rendering requirement of the target subtask is determined as an available engine among the multiple rendering engines.
[0115] Optionally, the scheduling module 30 is further used for:
[0116] Determining rendering parameters of each of the plurality of subtasks based on a preset third mapping relationship, wherein the third mapping relationship represents a mapping relationship between a detail level and a rendering parameter;
[0117] The available engines process the multiple subtasks based on the respective rendering parameters of the multiple subtasks to obtain a rendering result of the rendering task.
[0118] Optionally, the scheduling module 30 is further used for:
[0119] Processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain rendering images corresponding to the plurality of subtasks;
[0120] The rendering images are integrated and processed to obtain a rendering result of the rendering task.
[0121] Optionally, the scheduling device of the rendering engine further includes:
[0122] An output module is used to select a target rendering picture from the plurality of rendering pictures and output it on the display screen based on the display viewport range of the display screen of the terminal device integrated with the scheduling system.
[0123] The scheduling device of the rendering engine provided in the embodiment of the present application adopts the scheduling method of the rendering engine in the above embodiment, which can solve the technical problem of how to improve the rendering efficiency of multiple rendering engines. Compared with the prior art, the beneficial effects of the scheduling device of the rendering engine provided in the embodiment of the present application are the same as the beneficial effects of the scheduling method of the rendering engine provided in the above embodiment, and other technical features in the scheduling device of the rendering engine are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0124] The present application provides a scheduling device for a rendering engine, the scheduling device for the rendering engine comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the scheduling method for the rendering engine in the above-mentioned embodiment 1.
[0125] Reference below Figure 4 , which shows a schematic diagram of the structure of a scheduling device for a rendering engine suitable for implementing an embodiment of the present application. The scheduling device for the rendering engine in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The scheduling device of the rendering engine shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0126] like Figure 4As shown, the scheduling device of the rendering engine may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the scheduling device of the rendering engine are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the scheduling device of the rendering engine to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows the scheduling device of the rendering engine with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0127] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0128] The scheduling device of the rendering engine provided by the present application adopts the scheduling method of the rendering engine in the above embodiment, which can solve the technical problem of how to improve the rendering efficiency of multiple rendering engines. Compared with the prior art, the beneficial effects of the scheduling device of the rendering engine provided by the present application are the same as the beneficial effects of the scheduling method of the rendering engine provided by the above embodiment, and the other technical features in the scheduling device of the rendering engine are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0129] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0130] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0131] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the scheduling method of the rendering engine in the above-mentioned embodiment.
[0132] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0133] The computer-readable storage medium may be included in the scheduling device of the rendering engine; or may exist independently without being assembled into the scheduling device of the rendering engine.
[0134] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the scheduling device of the rendering engine, the scheduling device of the rendering engine: receives a rendering task to be processed, and divides the rendering task into multiple subtasks with different levels of detail; determines an available engine among the multiple rendering engines, and obtains the rendering performance of each of the available engines; allocates the multiple subtasks to each of the available engines based on a preset first mapping relationship, and schedules each of the available engines to process the multiple subtasks to obtain a rendering result of the rendering task, wherein the first mapping relationship represents a mapping relationship between rendering performance and level of detail.
[0135] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0136] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0138] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned scheduling method of the rendering engine, and can solve the technical problem of scheduling the rendering engine. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the scheduling method of the rendering engine provided in the above-mentioned embodiment, and will not be elaborated here.
[0139] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the scheduling method of the rendering engine as described above when the computer program is executed by a processor.
[0140] The computer program product provided in this application can solve the technical problem of how to improve the rendering efficiency of multiple rendering engines. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the scheduling method of the rendering engine provided in the above embodiment, which will not be repeated here.
[0141] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A scheduling method for a rendering engine, characterized in that: The scheduling method of the rendering engine is applied to a scheduling system, the scheduling system includes a digital twin engine functional interface and multiple rendering engines, and the multiple rendering engines are all communicated with the resource management system through the digital twin engine functional interface. The scheduling system also includes a multi-mode multi-terminal collaborative scheduling module, a service adaptive loading module, a rendering state synchronization processing module and a multi-engine compatibility module. The multi-mode multi-terminal collaborative scheduling module is used for device identification and performance evaluation, scene segmentation and dynamic adjustment of rendering parameters. The service adaptive loading module is used for data layering preprocessing, network bandwidth upgrade, hierarchical cache mechanism, data compression processing, scene on-demand loading, multi-LOD data set adjustment and data encoding system. The rendering state synchronization processing module is used for rendering state management and engine backup and recovery. The multi-engine compatibility module is used for engine adaptation, resource management and performance monitoring, wherein the engine adaptation includes the adaptation of the Unreal Engine and the Web Graphics Library Engine and the general rendering interface specification, the resource management includes resource pooling management, LOD intelligent update and loaded resource call, and the performance monitoring includes monitoring the rendering engine workload, intelligent scheduling algorithm and cross-engine synchronization; The scheduling method of the rendering engine includes: receiving a rendering task to be processed, determining a task type of the rendering task, and dividing the rendering task into a plurality of subtasks at different levels of detail; Determine an available engine among the plurality of rendering engines, and obtain rendering performance of each of the available engines; Allocating the plurality of subtasks to each of the available engines based on a preset first mapping relationship, scheduling each of the available engines to process the plurality of subtasks, and obtaining a rendering result of the rendering task, wherein the first mapping relationship represents a mapping relationship between rendering performance and detail level; Before the step of receiving a rendering task to be processed and determining a task type of the rendering task, the method further includes: The plurality of rendering engines request graphics processing resources from the resource management system through the digital twin engine functional interface; The step of dividing the rendering task into a plurality of subtasks at different levels of detail comprises: Determining original model data of the rendering task, and preprocessing the original model data to obtain a plurality of model data sets at different levels of detail; Dividing the rendering task into a plurality of subtasks according to the plurality of model data sets, wherein one model data set corresponds to one subtask; The step of determining an available engine among the plurality of rendering engines comprises: Identify the hardware performance of the terminal device integrated with the scheduling system, and select multiple target engines from the multiple rendering engines based on a preset second mapping relationship, wherein the second mapping relationship represents a mapping relationship between hardware performance and rendering performance; Determine the remaining image processing resources of the plurality of target engines, and judge whether the plurality of target engines meet the rendering requirements of the target subtasks based on the plurality of remaining image processing resources, wherein the target subtask is the subtask with the lowest rendering requirement among the plurality of subtasks; Determine a rendering engine that meets the rendering requirement of the target subtask among the multiple target engines as an available engine among the multiple rendering engines; The step of scheduling each of the available engines to process the plurality of subtasks to obtain a rendering result of the rendering task includes: Determining rendering parameters of each of the plurality of subtasks based on a preset third mapping relationship, wherein the third mapping relationship represents a mapping relationship between detail levels and rendering parameters; Processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain a rendering result of the rendering task; The step of processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain the rendering result of the rendering task comprises: Processing the plurality of subtasks based on the respective rendering parameters of the plurality of subtasks by each of the available engines to obtain rendering images corresponding to the plurality of subtasks; Integrate the rendering images to obtain the rendering result of the rendering task; After the step of obtaining the rendering result of the rendering task, the method further includes: Based on the display viewport range of the display screen of the terminal device integrated with the scheduling system, a target rendering picture is selected from the plurality of rendering pictures and outputted on the display screen.
