3D rendering performance optimization method and device

By dynamically adjusting performance mode and image quality by monitoring CPU usage and adopting a multi-mode rendering framework, the rendering performance bottleneck of the web-based 3D editor when copying a large number of objects is solved, achieving a smooth rendering and editing experience and avoiding the high cost of cloud GPUs.

CN121010680APending Publication Date: 2025-11-25BEIJING JINGDONG YUANSHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410650332.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Web-based editors for building 3D digital twin scenes suffer from limited rendering performance, especially when copying a large number of objects, which causes lag. Existing methods for merging models destroy the independence of individual models and cannot be directly edited. Cloud GPU rendering increases hardware and communication costs.

Method used

By monitoring CPU utilization, the performance mode and image quality are dynamically adjusted. A multi-mode rendering framework is adopted to flexibly switch model image quality to optimize web page rendering performance while preserving the independence of individual models.

Benefits of technology

It effectively solves the lag problem of web-based 3D editors when displaying millions of repetitive objects, maintains the independence of models, allows editing operations on individual models, and reduces reliance on cloud GPUs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121010680A_ABST
    Figure CN121010680A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a 3D rendering performance optimization method and device. The specific embodiment of the method comprises the following steps: monitoring the occupancy rate of a CPU (Central Processing Unit) for webpage rendering in response to the detection of adding a target object in a 3D scene displayed by a webpage version 3D editor; setting a performance mode according to the occupancy rate of the CPU; selecting a model of corresponding image quality for the target object according to the performance mode; and rendering the webpage according to the selected model corresponding to the image quality. According to the embodiment, the problem that display of million-level and even ten million-level repeated objects in the editing state of the webpage editor is stuck can be solved, the problem that the attribute of an original single object cannot be directly edited in the later period based on combination of the repeated objects is solved, and the problem that the editing state performance of the webpage edition 3D editor is insufficient due to high non-calculation complexity is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of computer, in particular to a 3D rendering performance optimization method and device. BACKGROUND

[0002] In the editor tool of the web version 3D digital twin scene building, the rendering performance still has bottlenecks, because the editor needs to save all the attributes, and needs to optimize the rendering level after editing is completed.

[0003] The rendering performance of the web version editor is limited, but the advantage is that it can be used anytime and anywhere, and does not need to be installed, and can be very convenient for online experience. In the existing method, the method of merging the same attribute models destroys the independence of the single model, that is, after merging, the attribute operation of the single model cannot be performed. Through the merging method, if the number of scene changes at a time is large, such as copying the same object 1 million times, although the expected result can be achieved after merging, the copying process in the web version still has a lag. The cloud GPU-based algorithm depends on additional computing resources, and also needs a good communication environment, which increases the cost from the hardware and communication level, and mainly transfers some high complexity rendering calculations to the cloud. For the operation of simply copying 1 million single objects, it is very simple from the calculation level, and the reason for the web version lag is that the number of rendered objects is too large. The performance of the web version Three.js is still limited to the performance of the CPU, and only supports single-core CPU processing, so it becomes a bottleneck of web rendering. SUMMARY

[0004] Embodiments of the present disclosure provide a 3D rendering performance optimization method and device.

[0005] In a first aspect, embodiments of the present disclosure provide a 3D rendering performance optimization method, comprising: in response to detecting that a target object is added in a 3D scene displayed by a web version 3D editor, monitoring the CPU occupancy rate for web rendering; setting a performance mode according to the CPU occupancy rate; selecting a corresponding quality model for the target object according to the performance mode; and performing web rendering according to the selected corresponding quality model.

[0006] In some embodiments, the method further comprises: in response to detecting that the number of target objects is greater than a predetermined value, outputting a performance mode switching prompt information. In response to detecting that a user confirms to switch the performance mode, selecting a corresponding quality model for the target object according to the switched performance mode; and performing web rendering according to the selected corresponding quality model.

[0007] In some embodiments, the method further comprises: in response to detecting that the target object is selected, outputting an option of switching a performance mode; in response to detecting that a user selects the switched performance mode, selecting a model of corresponding quality for the target object according to the selected performance mode; and rendering the webpage according to the selected model of corresponding quality of the target object.

[0008] In some embodiments, the method further comprises: in response to detecting an editing operation on the target object, generating a scene file, wherein the scene file stores at least one of the following information: vertices of the target object, number of triangular facets, binding events, and models of different qualities corresponding to the target object; and exporting and saving the scene file.

[0009] In some embodiments, the rendering the webpage according to the selected model of corresponding quality comprises: replacing a copy of the target object with a model of corresponding quality corresponding to the performance mode; and in response to detecting an editing operation on the copy, importing related information of the target object

[0010] In some embodiments, the method further comprises: in response to detecting that the CPU occupancy rate drops to a predetermined threshold, switching the performance mode; selecting a model of corresponding quality for the target object according to the switched performance mode; and rendering the webpage according to the selected model of corresponding quality.

[0011] In some embodiments, the setting the performance mode according to the CPU occupancy rate comprises: if the CPU occupancy rate is higher than a first threshold, setting a low performance mode; if the CPU occupancy rate is higher than a second threshold and less than or equal to the first threshold, setting a medium performance mode, wherein the second threshold is less than the first threshold; and if the CPU occupancy rate is less than or equal to the second threshold, setting a high performance mode.

[0012] In some embodiments, the selecting the model of corresponding quality for the target object according to the performance mode comprises: adjusting resolution and / or edge sharpness of the target object in the 3D scene according to the performance mode to obtain the model of corresponding quality.

[0013] In some embodiments, the selecting the model of corresponding quality for the target object according to the performance mode comprises: replacing the target object in the 3D scene with a preset model of different levels of quality according to the performance mode.

[0014] In some embodiments, the webpage-based 3D editor is implemented based on Three.js.

[0015] In a second aspect, embodiments of the present disclosure provide a 3D rendering performance optimization apparatus, comprising: a monitoring unit configured to monitor an occupancy rate of a CPU for web page rendering in response to detecting that a target object is added in a 3D scene displayed by a web page version 3D editor; a setting unit configured to set a performance mode according to the occupancy rate of the CPU; a selecting unit configured to select a corresponding quality model for the target object according to the performance mode; and a rendering unit configured to perform web page rendering according to the selected corresponding quality model.

[0016] In some embodiments, the apparatus further comprises an output unit configured to: output a performance mode switching prompt information in response to detecting that the number of the target objects is greater than a predetermined value; select a corresponding quality model for the target object according to the switched performance mode in response to detecting that a user confirms to switch the performance mode; and perform web page rendering according to the selected corresponding quality model.

[0017] In some embodiments, the apparatus further comprises a switching unit configured to: output an option of switching the performance mode in response to detecting that the target object is selected; select a corresponding quality model for the target object according to the selected performance mode in response to detecting that a user selects the switched performance mode; and perform web page rendering according to the selected corresponding quality model of the target object.

[0018] In some embodiments, the apparatus further comprises a storage unit configured to: generate a scene file in response to detecting an editing operation on the target object, wherein the scene file stores at least one of the following information: vertices of the target object, number of triangular facets, binding events, and different quality models corresponding to the target object; and export and save the scene file.

[0019] In some embodiments, the rendering unit is further configured to: replace a copy of the target object with a quality model corresponding to the performance mode; and import related information of the target object in response to detecting that the copy is edited.

[0020] In some embodiments, the rendering unit is further configured to: switch the performance mode in response to detecting that the occupancy rate of the CPU drops to a predetermined threshold; select a corresponding quality model for the target object according to the switched performance mode; and perform web page rendering according to the selected corresponding quality model.

[0021] In some embodiments, the setting unit is further configured to: set a low performance mode if the occupancy rate of the CPU is higher than a first threshold; set a medium performance mode if the occupancy rate of the CPU is higher than a second threshold and less than or equal to the first threshold, wherein the second threshold is less than the first threshold; and set a high performance mode if the occupancy rate of the CPU is less than or equal to the second threshold.

[0022] In some embodiments, the selection unit is further configured to adjust the resolution and / or edge sharpness of the target object in the 3D scene according to the performance mode, to obtain a corresponding quality model.

[0023] In some embodiments, the selection unit is further configured to replace the target object in the 3D scene with a preset quality model of different levels according to the performance mode.

[0024] In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having stored thereon one or more computer programs which, when executed by the one or more processors, cause the one or more processors to implement the method of any one of the first aspect or the second aspect.

[0025] In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the first aspect or the second aspect.

[0026] The 3D rendering performance optimization method and device provided by the embodiments of the present disclosure solve the problem of display lag in the editing state of a webpage editor for a million or even ten million repeated objects based on a multi-mode rendering framework, and solve the problem of being unable to directly edit the properties of original single objects due to the merging of repeated objects. The multi-mode rendering framework solves the problem of insufficient performance of a webpage version 3D editor in the editing state caused by high non-computational complexity, which cannot be solved by cloud GPU rendering because the need to render a large number of models is caused by the high proportion of browser rendering performance.

[0027] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS

[0028] Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments made with reference to the drawings:

[0029] Figure 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;

[0030] Figure 2 is a flowchart of an embodiment of the 3D rendering performance optimization method according to the present disclosure;

[0031] Figures 3a-3eis a schematic diagram of an application scenario of the 3D rendering performance optimization method according to the present disclosure;

[0032] Figure 4 is a flow chart of still another embodiment of the 3D rendering performance optimization method according to the present disclosure;

[0033] Figure 5 is a structural schematic diagram of one embodiment of the 3D rendering performance optimization apparatus according to the present disclosure;

[0034] Figure 6 is a structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present disclosure. DETAILED DESCRIPTION

[0035] The present disclosure will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that only parts related to the application are shown in the drawings for ease of description.

[0036] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0037] Figure 1 An exemplary system architecture 100 to which embodiments of the 3D rendering performance optimization method or 3D rendering performance optimization apparatus of the present disclosure can be applied is shown.

[0038] As shown in Figure 1 , the system architecture 100 can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a communication link medium between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0039] A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as web-based 3D editors, 3D video players, web browsers, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0040] The terminal device 101, 102, 103 can be hardware or software. When the terminal device 101, 102, 103 is hardware, it can be various electronic devices with a display screen and supporting 3D rendering, including but not limited to a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, and the like. When the terminal device 101, 102, 103 is software, it can be installed in the above-listed electronic devices. It can be implemented as multiple software or software modules (for example, to provide distributed services) or as a single software or software module. No specific limitation is made herein.

[0041] The server 105 can be a server providing various services, for example, a background 3D server supporting rendering of a 3D scene on the terminal device 101, 102, 103. The background 3D server can complete some calculations, and then return the results to a web-based editor on the terminal device via network transmission for rendering. By transferring complex calculations to a new device, the web-based editor mainly serves as a display end, achieving the effect of rendering performance optimization.

[0042] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers or as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services) or as a single software or software module. No specific limitation is made herein. The server can also be a server of a distributed system or a server combined with a blockchain. The server can also be a cloud server or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0043] It should be noted that the 3D rendering performance optimization method provided by the embodiments of the present disclosure is generally executed by a terminal device, and accordingly, the 3D rendering performance optimization apparatus is generally arranged in a terminal device.

[0044] It should be understood that Figure 1 The number of terminal devices, networks, and servers in

[0045] With reference back to Figure 2, shows a flow 200 of one embodiment of the 3D rendering performance optimization method according to the present disclosure. The 3D rendering performance optimization method comprises the following steps:

[0046] Step 201, in response to detecting the addition of a target object in the 3D scene displayed in the web-based 3D editor, monitoring the CPU occupancy rate for web rendering.

[0047] In this embodiment, the execution subject of the 3D rendering performance optimization method (for example Figure 1 The terminal device shown is installed with a web-based 3D editor. The user loads or creates a 3D scene in the web-based 3D editor and then starts editing, adding new objects or copying objects to the 3D scene. In order to distinguish from the original objects in the scene, the newly added objects are named as target objects. One editing operation can add multiple objects, for example, copying 10,000 shelves.

[0048] In this embodiment, the web-based 3D editor runs on which CPU, and the occupancy rate of which CPU is monitored.

[0049] Step 202, setting the performance mode according to the CPU occupancy rate.

[0050] In this embodiment, the performance mode can be simply divided into two grades: high performance mode and low performance mode. It can also be divided into three grades: high performance mode, medium performance mode and low performance mode. It can also be divided into more grades. The lower the CPU occupancy rate, the more available resources, and the higher performance mode can be used. The higher the CPU occupancy rate, the fewer available resources, and the lower performance mode needs to be used.

[0051] Step 203, selecting a model of corresponding quality for the target object according to the performance mode.

[0052] In this embodiment, the quality level is directly proportional to the performance mode, the higher the performance mode, the clearer the quality. The lower the performance mode, the more blurred the quality. Even some simple structure models can be used to replace the target object, for example, a cube can be used to replace a shelf.

[0053] Step 204, web rendering according to the selected model of corresponding quality.

[0054] In this embodiment, the target object in the 3D scene is rendered using the web editor, and editing and event binding operations are performed on the target object. Whether it is a low performance mode corresponding quality model or a medium performance mode corresponding quality model, it retains the editing properties of the original high performance mode corresponding quality model. At the same time, a mode switching function is provided for each model, so that even in low performance mode, a model can be converted to high quality mode, and the editing user can obtain all visual rendering effects.

[0055] The method provided by the above embodiments of the present disclosure provides a flexible switching technology based on multi-mode and multi-quality model, which switches flexibly by monitoring the performance occupation of the web-based 3D editor, adopts different rendering strategies in different editing modes, and avoids user experience from being stuck when using the web-based 3D editor.

[0056] The sticking problem is solved without merging the same attribute model, so the independence of a single model is retained, and attribute operation can still be performed on the single model.

[0057] In some optional implementations of the present embodiment, the method further comprises: in response to detecting that the number of target objects is greater than a predetermined value, outputting performance mode switching prompt information; in response to detecting that the user confirms to switch the performance mode, selecting a model corresponding to the quality for the target object according to the switched performance mode; and performing web page rendering according to the selected model corresponding to the quality. If the number of target objects is greater than a predetermined value, it is expected to cause the performance mode to change, and therefore, prompt information can be outputted to remind the user to confirm whether to switch the performance mode. The switching from high performance -> medium performance -> low performance is prompted, including the prompt of mode switching and the prompt that the rendering visual effect may be reduced. The low-quality model usually has much less detail than the high-quality model, and the visual effect is sacrificed. The user can accept the performance mode switching or refuse the performance mode switching. The user can freely choose whether to sacrifice the quality to obtain the smoothness of the picture.

[0058] In some optional implementations of the present embodiment, the method further comprises: in response to detecting that the target object is selected, outputting an option of switching the performance mode; in response to detecting that the user selects the switched performance mode, selecting a model corresponding to the quality for the target object according to the selected performance mode; and performing web page rendering according to the selected model corresponding to the quality of the target object. The single object preview can be performed when the performance is insufficient, and the original quality can be restored.

[0059] In some optional implementations of the present embodiment, the method further comprises: in response to detecting the editing operation on the target object, generating a scene file, wherein the scene file stores at least one of the following information: the vertex of the target object, the number of triangular facets, the bound event, and the model corresponding to different qualities of the target object; and exporting and saving the scene file. The scene file can be exported and saved in the editing scene, and the scene file is directly imported for subsequent editing.

[0060] In some optional implementations of the embodiment, the rendering of the webpage according to the model of the selected corresponding quality includes: replacing the replica of the target object with the model of the corresponding quality corresponding to the performance mode; and importing relevant information of the target object in response to detecting editing of the replica. In the case of a large number of replicas of the same object, only one original quality object needs to be retained, and other objects are replaced with low-quality models. However, each replica retains the same information as the original quality object, such as the number of vertices, triangular facets, and binding events of the target object. Each replica can be edited individually.

[0061] In some optional implementations of the embodiment, the method further includes: switching the performance mode in response to detecting that the CPU occupancy rate falls below a predetermined threshold; selecting a model of corresponding quality for the target object according to the switched performance mode; and rendering the webpage according to the selected model of corresponding quality. After the CPU occupancy rate falls, the original quality can be restored.

[0062] In some optional implementations of the embodiment, the setting of the performance mode according to the CPU occupancy rate includes: setting a low performance mode if the CPU occupancy rate is higher than a first threshold; setting a medium performance mode if the CPU occupancy rate is higher than a second threshold and less than or equal to the first threshold, wherein the second threshold is less than the first threshold; and setting a high performance mode if the CPU occupancy rate is less than or equal to the second threshold. The multiple rendering modes include three modes of low performance, medium performance, and high performance. The single-core CPU occupancy rate of webpage rendering is monitored by Three.js. For example, when the occupancy rate is 0% to 80%, it is a high performance mode; when the occupancy rate is 80% to 95%, it is a medium performance mode; otherwise, it is a low performance mode.

[0063] In some optional implementations of the embodiment, the selecting of the model of corresponding quality for the target object according to the performance mode includes: adjusting the resolution and / or edge sharpness of the target object in the 3D scene according to the performance mode to obtain the model of corresponding quality. The basic structure of the target object is not changed, only the resolution and / or edge sharpness is changed, so that the original features are retained and stuttering is avoided.

[0064] In some optional implementations of the embodiment, the selecting of the model of corresponding quality for the target object according to the performance mode includes: replacing the target object in the 3D scene with a preset model of different levels of quality according to the performance mode. A preset model of different levels of quality with simple structure can be used to replace the real object. The resolution and edge sharpness of the model of different levels of quality are also different. The resolution and edge sharpness of the low-quality model are low, and the resolution and edge sharpness of the high-quality model are high. Directly replacing the target object can reduce the amount of calculation and CPU load, thereby avoiding stuttering.

[0065] Optionally, only the resolution and / or edge sharpness of the target object can be adjusted in high-performance mode without replacing the target object. In low-performance mode, a preset simple structure low-quality model is used to replace the real object.

[0066] In some optional implementations of the embodiment, the web-based 3D editor is implemented based on Three.js. The functions related to the application mainly include object editing and saving, rendering mode switching, and web 3D editor performance monitoring. The editor can export scene files and can also import scene files. The information stored in the scene files covers the vertices, triangular facets, event binding, low, medium, and high quality models corresponding to low, medium, and high modes of each model, and other information.

[0067] The structure of the web editor is shown in Figure 3a The application controls the web rendering performance in the 3D model management module and provides editing and saving functions of the 3D scene. The user loads or creates a 3D scene using the web-based 3D editor and selects to enter the editing state: binds the objects in the display event to the models in the scene, and then adds the corresponding events to the mapping relationship between the objects and the models. This entire process is completed in the editing state of the web editor. Since the editing state needs to save all attributes and needs to perform individual editing or mode switching operations on each object, the editing state cannot be optimized in the rendering level like the rendering state to save performance.

[0068] As shown in Figure 3b After adding objects in the editing state, the web performance is detected in the 3D model management module. The rendering is divided into three modes, corresponding to three quality models, and the low-quality model occupies the least rendering resources. By switching between various modes through web rendering performance detection, the effect of rendering millions of objects and performing editing and event binding operations on each object using only the web editor is achieved. For low and medium performance modes, the low or medium quality model maintains the editing attributes of the model, and a mode switching function is provided for each model. Even in low performance mode, a model can be converted to high quality mode to facilitate the editor to obtain all visual rendering effects.

[0069] Figure 3a The output results of the 3D model management module are grouped and merged through the web rendering module. When it is detected that the user closes the scene or saves the scene, the scene information is saved to a file in a pre-defined format through the digital twin scene serialization module.

[0070] Figure 3c As shown in Figure 3dThe low-quality model in the low-performance mode is shown. The rendering effect of the shelf in the editing state can be converted, and the high-performance mode in the editing state has the best rendering effect, which is convenient for users to view in the editing state, but occupies more performance. If 10,000 shelves are needed, the web version of the 3D editor may start to lag. Multiple shelves can be merged through the rendering optimization scheme, but this scheme cannot edit a single object again. Figure 3d In the medium-low performance mode, a cube represents the low-quality model, and a low-quality model is actually used instead.

[0071] Figure 3c In the medium-high performance mode, the number of triangular facets is 1932, Figure 3d In the medium-low performance mode, the number of triangular facets in the low-performance mode is 332. For rendering, the number of triangular facets is directly proportional to the number of times 3D model drawing needs to be performed when rendering. The more the number of triangular facets, the more rendering resources are required. Only 20 objects are copied, and the performance gap reaches about 6 times. Therefore, when the number of copied objects is in the thousands or tens of thousands, the rendering performance can be improved by three to four orders of magnitude.

[0072] Further reference is made to Figure 4 which shows a flow 400 of still another embodiment of the 3D rendering performance optimization method. The flow 400 of the 3D rendering performance optimization method includes the following steps:

[0073] Step 401, in response to detecting the addition of a target object in a 3D scene displayed by a web version of a 3D editor, monitoring the CPU occupancy rate for web rendering.

[0074] Step 402, setting a performance mode according to the CPU occupancy rate.

[0075] Step 403, selecting a corresponding quality model for the target object according to the performance mode.

[0076] Step 404, performing web rendering according to the selected corresponding quality model.

[0077] Steps 401-404 are basically the same as steps 201-204, and thus will not be described again.

[0078] Step 405, in response to detecting that the target object is selected, outputting an option to switch the performance mode.

[0079] In this embodiment, for objects in any performance mode, the object can be edited by clicking the object, and then switching to any mode, which is convenient for previewing a single object when the performance is insufficient.

[0080] Step 406, adjusting the quality of the target object according to the performance mode selected by the user.

[0081] In the present embodiment, after the automatic monitoring of the mode switching, a prompt as shown in Figure 3e is given, and a button is provided for switching to any mode.

[0082] For the low performance mode and the medium performance mode, the low-quality or medium-quality models retain the editing properties of the models, and a mode switching function is provided for each model, so that a certain model can be converted to the high-quality mode even in the low performance mode, facilitating the editing user to obtain all visual rendering effects.

[0083] Further referring to Figure 5 , as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of a 3D rendering performance optimization device, which corresponds to the method embodiment shown in Figure 2 , and the device can be specifically applied to various electronic devices.

[0084] As shown in Figure 5 , the 3D rendering performance optimization device 500 of the present embodiment comprises:

[0085] In the present embodiment, the specific processing of the monitoring unit 501, the setting unit 502, the selection unit 503 and the rendering unit 504 of the 3D rendering performance optimization device 500 can refer to steps 201, 202, 203 and 204 in the corresponding embodiment. Figure 2

[0086] In some optional implementations of the present embodiment, the device 500 further comprises an output unit (not shown in the figure) configured to: in response to detecting that the number of target objects is greater than a predetermined value, output performance mode switching prompt information; in response to detecting that a user confirms to switch the performance mode, select a corresponding quality model for the target object according to the switched performance mode; and perform web page rendering according to the selected corresponding quality model.

[0087] In some optional implementations of the present embodiment, the device 500 further comprises a switching unit (not shown in the figure) configured to: in response to detecting that the target object is selected, output an option to switch the performance mode; in response to detecting that a user selects the switched performance mode, select a corresponding quality model for the target object according to the selected performance mode; and perform web page rendering according to the selected corresponding quality model of the target object.

[0088] ​In some optional implementations of the present embodiment, the device further comprises a storage unit (not shown in the drawings) configured to: in response to detecting the editing operation on the target object, generate a scene file, wherein the scene file stores at least one of the following information: vertices of the target object, a number of triangular facets, a binding event, and different quality models corresponding to the target object; and export and save the scene file.

[0089] In some optional implementations of the present embodiment, the rendering unit 504 is further configured to: replace the copy of the target object with a model corresponding to the quality of the performance mode; and in response to detecting editing of the copy, import relevant information of the target object.

[0090] In some optional implementations of the present embodiment, the rendering unit 504 is further configured to: in response to detecting that the CPU occupancy rate drops to a predetermined threshold, switch the performance mode; select a model corresponding to the quality of the target object according to the switched performance mode; and perform web page rendering according to the selected model corresponding to the quality.

[0091] In some optional implementations of the present embodiment, the setting unit 503 is further configured to: set a low performance mode if the CPU occupancy rate is higher than a first threshold; set a medium performance mode if the CPU occupancy rate is higher than a second threshold and less than or equal to the first threshold, wherein the second threshold is less than the first threshold; and set a high performance mode if the CPU occupancy rate is less than or equal to the second threshold.

[0092] In some optional implementations of the present embodiment, the selection unit 504 is further configured to: adjust the resolution and / or edge sharpness of the target object in the 3D scene according to the performance mode.

[0093] In some optional implementations of the present embodiment, the selection unit 504 is further configured to: replace the target object in the 3D scene with a preset model of different quality levels according to the performance mode.

[0094] It should be noted that in the technical solutions of the present disclosure, the collection, collection, update, analysis, processing, use, transmission, storage, etc. of user personal information involved in the technical solutions comply with relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. Necessary measures are taken to prevent illegal access to user personal information data, and the security of user personal information, network security and national security are maintained.

[0095] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device and a readable storage medium.

[0096] An electronic device comprising: one or more processors; a storage having stored thereon one or more computer programs that, when executed by the one or more processors, cause the one or more processors to implement the method recited by flowcharts 200 or 400.

[0097] A computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method recited by flowcharts 200 or 400.

[0098] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0099] As shown, Figure 6 The device 600 includes a computing unit 601 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0100] Various components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; the storage unit 608, such as a magnetic disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0101] The computing unit 601 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs various methods and processes described above, such as the road zone planning method. For example, in some embodiments, the road zone planning method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded onto the RAM 603 and executed by the computing unit 601, one or more steps of the road zone planning method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the road zone planning method by any other suitable means, such as by means of firmware.

[0102] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0103] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0104] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0105] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0106] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0107] The computer system can include clients and servers. This relationship can be. The servers are generally remote from the users and can be accessed via the Internet using a communication network. The relationship can be a client-server relationship over a communications network, and as such, the servers can be accessed by the clients using computer programs. The servers can be servers of a distributed system, or servers combined with a blockchain. The servers can also be cloud servers, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology.

[0108] It should be understood that the various forms of flow shown above can be re-ordered, added to, or have steps deleted, using the steps described above. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.

[0109] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. A method for optimizing 3D rendering performance, comprising: In response to the detection of adding a target object to the 3D scene displayed in the web-based 3D editor, monitor the CPU usage used for web page rendering. Set the performance mode based on CPU utilization; Select a model with the corresponding image quality for the target object based on the performance mode; Render the webpage based on the selected model with the corresponding image quality.

2. The method according to claim 1, wherein, The method further includes: In response to detecting that the number of target objects exceeds a predetermined value, a performance mode switching prompt message is output; In response to detecting user confirmation of switching performance modes, a model with the corresponding image quality is selected for the target object according to the switched performance mode; Render the webpage based on the selected model with the corresponding image quality.

3. The method according to claim 1, wherein, The method further includes: In response to detecting that the target object is selected, an option to switch performance modes is output; In response to detecting that the user has selected a different performance mode, a model with the corresponding image quality is selected for the target object according to the selected performance mode; Web page rendering is performed based on the image quality model corresponding to the selected target object.

4. The method according to claim 1, wherein, The method further includes: In response to detecting an editing operation on the target object, a scene file is generated, wherein the scene file stores at least one of the following information: the vertices of the target object, the number of triangles, the bound events, and the model of the target object with different image quality; Export and save the scene file.

5. The method according to claim 1, wherein, The step of rendering the webpage based on the selected model corresponding to the image quality includes: Replace the copy of the target object with a model whose image quality corresponds to the performance mode; In response to the detection of editing of the copy, relevant information of the target object is imported.

6. The method according to claim 1, wherein, The method further includes: In response to detecting a drop in CPU utilization to a predetermined threshold, switch performance modes; Select a model with the corresponding image quality for the target object based on the switched performance mode; Render the webpage based on the selected model with the corresponding image quality.

7. The method according to claim 1, wherein, The method of setting the performance mode based on CPU utilization includes: If the CPU utilization rate is higher than the first threshold, then set the low performance mode. If the CPU utilization is higher than the second threshold but less than or equal to the first threshold, then set the performance mode to medium, where the second threshold is less than the first threshold. If the CPU utilization is less than or equal to the second threshold, then set the high-performance mode.

8. The method according to claim 1, wherein, The step of selecting a model with corresponding image quality for the target object based on the performance mode includes: Adjust the resolution and / or edge sharpness of the target objects in the 3D scene according to the performance mode to obtain a model with the corresponding image quality.

9. The method according to claim 1, wherein, The step of selecting a model with corresponding image quality for the target object based on the performance mode includes: Based on the performance mode, the target objects in the 3D scene are replaced with models of different preset image quality levels.

10. The method according to claim 1, wherein, The web-based 3D editor is implemented based on Three.js.

11. A 3D rendering performance optimization device, comprising: The monitoring unit is configured to monitor the CPU usage for web page rendering in response to the detection of adding a target object to the 3D scene displayed in the web-based 3D editor. The settings unit is configured to set the performance mode based on CPU utilization. The selection unit is configured to select a model with the corresponding image quality for the target object based on the performance mode; The rendering unit is configured to render the webpage based on the selected model with the corresponding image quality.

12. An electronic device, comprising: One or more processors; Storage device, on which one or more computer programs are stored, When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-10.

13. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.