Compatible rendering method and device, equipment, storage medium and program product

By adjusting SDK objects and flexibly allocating rendering engines, the problem of high processing costs when supporting multiple rendering engines in the prior art is solved, and more efficient development and adaptive rendering effects are achieved.

CN119961014AActive Publication Date: 2025-05-09SHENZHEN SMARTCITY TECH DEV GRP CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510451950.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-05-09
Estimated Expiration
2045-04-11

AI Technical Summary

Technical Problem

When the prior art supports multiple rendering engines, the processing costs are high and the development process is complex, resulting in increased labor and time costs.

Method used

By adjusting the SDK object, a new SDK object is obtained, and the cloud rendering engine, end rendering engine or other rendering engine is flexibly allocated according to actual needs, and the appropriate rendering engine is selected for rendering in a unified call manner.

Benefits of technology

It reduces the workload of developing multiple SDKs, and can flexibly select the most suitable rendering method according to actual needs, reduces processing costs, and improves adaptability in different rendering scenarios and hardware conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961014A_ABST
    Figure CN119961014A_ABST
Patent Text Reader

Abstract

The invention discloses a compatible rendering method and device, equipment, a storage medium and a program product, and relates to the technical field of rendering, and the method comprises the steps: obtaining a new sdk object in response to an adjustment operation on the sdk object, and distributing a rendering engine for the new sdk object, the rendering engine comprising a cloud rendering engine, an end rendering engine and other rendering engines; and rendering the new sdk object by calling an interface of the allocated rendering engine to obtain a rendering result. The method can be compatible with various rendering modes, and the processing cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of rendering technology, and in particular to a compatible rendering method, a compatible rendering apparatus, a compatible rendering device, a storage medium and a computer program product. Background Art

[0002] Currently, there are many rendering methods. For example, cloud rendering uses the powerful computing resources of the cloud to place the rendering task on the cloud server, transmits data through the network to complete the rendering, and then returns the result. It is suitable for processing complex scenes. For example, end rendering relies on local device hardware, such as the computer's GPU, CPU, etc. to perform rendering operations, and pays more attention to local resource utilization and instant response. Because different rendering methods such as cloud rendering and end rendering have significant differences in resource utilization, data transmission, rendering algorithms, etc., in order to support different rendering engines in application development at the same time, it is often necessary to adapt different SDKs (Software Development Kits) separately, which makes the development process complicated and the processing costs such as manpower and time are quite high, increasing the processing cost and becoming a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the present application is to provide a compatible rendering method, a compatible rendering device, a compatible rendering equipment, a storage medium and a computer program product, aiming to solve the technical problem of high processing cost when supporting multiple rendering engines.

[0004] To achieve the above object, the present application proposes a compatible rendering method, the method comprising: In response to the adjustment operation on the SDK object, a new SDK object is obtained, wherein the SDK object includes a scene object, a light object, a geometry object and a model object; Allocate a rendering engine for the new SDK object, wherein the rendering engine includes a cloud rendering engine, a terminal rendering engine, and other rendering engines; By calling the interface of the assigned rendering engine, the new SDK object is rendered to obtain a rendering result.

[0005] In one embodiment, the adjustment operation is an editing operation, and the compatible rendering method includes: In response to an edit operation on an attribute of an sdk object, a diff object is obtained according to the changed attributes and attribute values ​​of the sdk object; Parsing the diff objects respectively according to the rendering engine type, and assigning a corresponding rendering engine to a new sdk object restored from the diff object; The new SDK object is rendered by calling the interface of the assigned rendering engine to obtain a rendering result.

[0006] In one embodiment, the step of parsing the diff objects respectively according to the rendering engine type includes: For the cloud rendering engine, the diff object is parsed according to the cloud rendering logic through the cloud rendering object to obtain a first parsing result, and the cloud rendering engine is allocated according to the first parsing result; The end rendering engine parses the diff object according to the end rendering logic through the end rendering object to obtain a second parsing result, and allocates the end rendering engine according to the second parsing result; For other rendering engines, the diff object is parsed according to preset parsing rules through other rendering objects to obtain a third parsing result, and other rendering engines are allocated according to the third parsing result.

[0007] In one embodiment, the adjustment operation is a new operation, and the compatible rendering method includes: In response to the new addition operation on the sdk object attribute, a new sdk object is obtained; Get the attribute value of the newly added attribute of the new sdk object; The interface of the rendering engine is called according to the attribute value to render the new SDK object to obtain a rendering result.

[0008] In one embodiment, the adjustment operation is a deletion operation, and the compatible rendering method includes: In response to the deletion operation on the sdk object attribute, a new sdk object is obtained; According to the deleted attributes of the new SDK object, the interface of the rendering engine is called to render the new SDK object to obtain a rendering result.

[0009] In one embodiment, the method comprises: Add an object call state attribute in the SDK object, wherein the default state of the object call state attribute is the call end state; When calling the rendering engine to render the SDK object, the state of the object calling state attribute is set to the calling state; When the rendering engine is called to complete rendering of the SDK object, the state of the object call state attribute is modified to the call end state.

[0010] In addition, to achieve the above purpose, the present application also proposes a compatible rendering device, the compatible rendering device comprising: an adjustment module, used to obtain a new SDK object in response to an adjustment operation on an SDK object, wherein the SDK object comprises a scene object, a light object, a geometry object and a model object; An allocation module, used to allocate a rendering engine to the new SDK object, wherein the rendering engine includes a cloud rendering engine, a terminal rendering engine, and other rendering engines; The rendering module is used to render the new SDK object by calling the interface of the assigned rendering engine to obtain a rendering result.

[0011] In addition, to achieve the above-mentioned purpose, the present application also proposes a compatible rendering device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the compatible rendering method described above.

[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the compatible rendering method described above are implemented.

[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the compatible rendering method described above are implemented.

[0014] One or more technical solutions proposed in this application have at least the following technical effects: Compared with the prior art, it is necessary to build multiple different SDKs to adapt to different rendering methods, which increases the processing cost. This application obtains a new SDK object in response to the adjustment operation of the SDK object, and then allocates the rendering engine. It only needs to operate on the basis of one set of SDK architecture, reducing the workload of developing multiple sets of SDKs; based on the unified SDK object operation, and then allocates different rendering engines, it can flexibly select the most suitable rendering method according to actual needs, breaking the previous limitation of strictly relying on fixed SDKs to select corresponding rendering methods, so that when facing different rendering scenarios, hardware conditions and business needs, you can choose a suitable rendering engine to complete the rendering task, reducing the processing cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] 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.

[0016] 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 work.

[0017] Figure 1 A flowchart diagram of an embodiment of a compatible rendering method of the present application is provided; Figure 2 A flowchart diagram of another embodiment of the compatible rendering method of the present application is provided; Figure 3 A flowchart of the rendering engine processing provided for the compatible rendering method of this application; Figure 4 A flowchart diagram of another embodiment of the compatible rendering method of the present application is provided; Figure 5 A brief flowchart provided for the compatible rendering method of this application; Figure 6 A schematic diagram of the module structure of a rendering device compatible with this application; Figure 7 A schematic diagram of the device structure of the hardware operating environment involved in the compatible rendering method of this application.

[0018] 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

[0019] 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.

[0020] 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.

[0021] Generally speaking, software development kits (SDKs) are usually designed and built around specific functions or a single core engine. The rendering engine itself has a complex internal architecture, different rendering logic, and its own unique resource requirements and calling methods. To break the routine, it is difficult to integrate multiple rendering engines with different characteristics into a set of SDKs, and to coordinate the work of multiple engines with a single call. It requires a deep and comprehensive understanding of the underlying principles, interface specifications, and data interaction methods of multiple rendering engines. Although there are various rendering engines emerging at present, and there is also a practice of selecting different rendering engines for different scenarios, in most cases, different rendering engines are switched and called through relatively complex methods such as different code modules and configuration files. There is no general solution that can integrate multiple rendering engines directly within a set of SDKs and simplify it to complete multi-engine collaborative work with a single call.

[0022] This application adjusts the SDK object to obtain a new SDK object, flexibly allocates the corresponding rendering engine to the new SDK object, and integrates multiple rendering engines into a set of SDKs. When faced with the need to flexibly switch and comprehensively use different rendering engines to meet diverse rendering needs, a suitable rendering engine is selected through a unified calling method to complete the rendering task, thereby reducing processing costs.

[0023] It should be noted that the execution subject of this embodiment may be a compatible rendering device, 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 an electronic device, a processor, etc. capable of implementing the above functions. The following takes a compatible rendering device as an example to illustrate this embodiment and the following embodiments.

[0024] Based on this, the present application embodiment provides a compatible rendering method, referring to Figure 1 , Figure 1 A flowchart of an embodiment of a compatible rendering method of the present application is shown.

[0025] In this embodiment, the compatible rendering method includes steps S10 to S30: Step S10, in response to the adjustment operation on the SDK object, a new SDK object is obtained, wherein the SDK object includes a scene object, a light object, a geometry object and a model object; It should be noted that some adjustments are made to the original SDK object. The SDK object is a collection of multiple attributes, including scene objects, light objects, geometry objects, and model objects. The SDK object exposes callable APIs (Application Programming Interfaces). Users can save the operations they want to perform in the object by calling the APIs of the SDK object. Scene objects include 3D modeling scenes, etc. Light objects refer to objects used to set the lighting effects in the scene, such as the position, intensity, and color of the light source, etc. Geometry objects refer to objects of various geometric shapes, such as cubes, spheres, and other basic geometric shapes, or complex shapes composed of these basic geometric shapes. Model objects are built object models with specific appearances and attributes, such as character models and building models. By adjusting the SDK object, such as changing the position of an object in the scene, adjusting the intensity of the light, or replacing a model, a new SDK object is obtained. This new object contains the status of the adjusted scene, light, geometry, model, and other related attributes. Adjustment operations can include adding operations, editing operations, and deleting operations.

[0026] Step S20, assigning a rendering engine to the new SDK object, wherein the rendering engine includes a cloud rendering engine, a terminal rendering engine, and other rendering engines; It should be noted that after obtaining a new SDK object, you need to select a suitable rendering engine to render it. Rendering engines include cloud rendering engines, end rendering engines, and other rendering engines. Among them, the cloud rendering engine is an engine that uses cloud computing resources for rendering. It uses the powerful computing power of cloud servers and is suitable for processing complex scenes and high-quality rendering tasks; the end rendering engine is an engine that renders on local devices (such as computers, mobile phones and other terminal devices). It has good real-time performance and is suitable for some scenes with high requirements for interactivity and the performance of local devices can meet the rendering requirements; other rendering engines include some rendering engines for special needs or specific platforms.

[0027] Step S30, rendering the new SDK object by calling the interface of the assigned rendering engine to obtain a rendering result.

[0028] It should be noted that once the rendering engine to be used is determined, the rendering operation is performed by calling the rendering engine's interface. The rendering engine's interface is a channel that allows external programs to interact with the rendering engine. Through this interface, the relevant data of the new SDK object (such as scene layout, lighting settings, geometry and model properties, etc.) is passed to the rendering engine. The rendering engine calculates and processes based on this data, and converts the properties in the new SDK object into visual content such as images or videos that can be displayed on compatible rendering devices. This final visual content is the rendering result.

[0029] In this embodiment, by obtaining a new SDK object in response to the adjustment operation of the SDK object and then assigning a rendering engine, operations only need to be performed based on one set of SDK architecture, thereby reducing the workload of developing multiple sets of SDKs; based on unified SDK object operations and then assigning different rendering engines, the most suitable rendering method can be flexibly selected according to actual needs, breaking the previous limitation of strictly relying on a fixed SDK to select the corresponding rendering method, so that when facing different rendering scenarios, hardware conditions and business needs, a suitable rendering engine can be selected to complete the rendering task, thereby reducing processing costs.

[0030] In one embodiment, the compatible rendering method includes steps T10 to T30: Step T10, adding an object call state attribute to the sdk object, wherein the default state of the object call state attribute is the call end state; It should be noted that an object call state attribute is added to the SDK object to record the state of the SDK object during the calling process. Its default state is set to the call end state, which provides an initial reference point for subsequent tracking of the SDK object call state.

[0031] Step T20, when calling the rendering engine to render the SDK object, setting the state of the object calling state attribute to the calling state; It should be noted that when the rendering engine is called to render the SDK object, the state of the object call state attribute needs to be changed. Setting it to the calling state indicates that the SDK object is being called by the rendering engine and is in the rendering process. For example, in a multi-tasking or multi-threaded environment, this state can be used to determine whether there are other operations that can be performed on this SDK object. If it is in the calling state, you need to wait for the rendering to complete before performing other related operations.

[0032] Step T30, when the rendering engine is called to complete rendering of the SDK object, the state of the object call state attribute is modified to the call end state.

[0033] It should be noted that once the rendering engine has completed the rendering operation of the SDK object, it is necessary to change the state of the object call state attribute again and reset it to the call end state, which means that the call process of the SDK object has ended.

[0034] In one embodiment, a function type is defined in the SDK object to clearly indicate the various states of the function, such as "call ended" and "calling". An attribute named "getStrustTree, the state of the structure tree" is added to the SDK object, and the attribute value defaults to the "call ended" state. When the call operation of the SDK object is triggered, the attribute value of "getStrustTree, the state of the structure tree" is set to the "calling" state. The rendering object of the rendering engine monitors the changes in the attribute value of "getStrustTree, the state of the structure tree". In the calling logic, when it is determined that the attribute of "getStrustTree, the state of the structure tree" exists and the attribute value is "calling", the rendering engine is called for rendering. After the rendering is completed, the attribute value is changed back to the "call ended" state. Only when the SDK object is called again and a specific call operation is triggered, the operation of calling the rendering engine will be executed again to avoid repeated calls.

[0035] In this embodiment, the setting of the object call status attribute helps to clearly track the call status of the SDK object. The status attribute can be used to determine whether the SDK object can be used for other operations, avoiding unnecessary interference operations when the SDK object is being rendered, avoiding repeated calls, achieving orderly collaboration between multiple tasks, and improving concurrent processing capabilities.

[0036] Based on the above embodiment of the present application, in another embodiment of the present application, the same or similar contents as the above embodiment can be referred to the above introduction, and will not be repeated in the following. Figure 2 The compatible rendering method further includes steps D10 to D30: Step D10, in response to the editing operation on the sdk object attribute, obtaining a diff object according to the changed attribute and attribute value of the sdk object; It should be noted that when editing the properties of an SDK object, such as modifying the color property of an object in a scene object, adjusting the intensity property of a light object, etc., the changed property refers to the specific property being edited (such as color, intensity, etc.), and the property value is the specific value assigned to the property after editing. Based on these changed properties and the corresponding property values, a diff object can be obtained. This diff object is essentially an object that records the changed parts of the SDK object. It is mainly used to track and manage the changes in the properties of the SDK object.

[0037] In one embodiment, the step of obtaining a diff object according to the changed attributes and attribute values ​​of the sdk object includes: Determine the changed properties of the new and old SDK objects; According to the changed attributes, the changed attributes of the new and old SDK objects and the attribute values ​​of the changed attributes are merged to obtain a diff object.

[0038] For example: Initial scene object: { objectId: -1, objectType: Scene3D, children: { 12345: { objectId: 12345, objectType: Light3D, lightColor: "red", intensity: "Intensity is 3", }; }; }.

[0039] Edited scene object: { objectId: -1, objectType: Scene3D, children: { 12345: { objectId: 12345, objectType: Light3D, lightColor: “White”, intensity: “Intensity is 5”, }; 56789: { objectId: 56789, objectType: Camera3D, flySpeed: 100, }; }; }。

[0040] Diff object: { objectId: -1, objectType: Scene3D, children: { 12345: { objectId: 12345, objectType: Light3D, lightColor: { newValue: “White”, oldValue: “Red”, }; intensity: { newValue: “Intensity is 5”, oldValue: “Intensity is 3”, }; }; 56789: { newValue: { objectId: 56789, objectType: Camera3D, flySpeed: 100, }; oldValue: null, };}; }.

[0041] Step D20, parsing the diff objects according to the rendering engine types, and assigning corresponding rendering engines to the new sdk objects restored from the diff objects; It should be noted that different types of rendering engines (such as cloud rendering engines, end rendering engines, etc.) have different ways of handling SDK objects. Parsing the diff object means analyzing the changed properties of the SDK object. The new SDK object is restored by parsing the diff object. The new SDK object contains the state after the editing operation. According to the characteristics of the new SDK object (that is, the information adapted to the rendering engine obtained by parsing the diff object), a suitable rendering engine is assigned to it. For example, if the new SDK object is found to have changed properties that are more suitable for the processing capabilities and characteristics of the cloud rendering engine (such as complex light and shadow calculations, etc.) after parsing, the cloud rendering engine is assigned; if it is suitable for the fast rendering requirements of the local device, the end rendering engine is assigned.

[0042] For example, the diff object is restored to obtain a new sdk object: diff object: { objectId: 12345, objectType: Light3D, lightColor: newValue: "white", oldValue: "red", }, intensity: newValue: "Intensity is 5", oldValue: "Intensity is 3", } }.

[0043] New sdk object: { objectId: 12345, objectType: Light3D, lightColor: "white", intensity: "Intensity is 5", }.

[0044] For example, Figure 3 As shown, Figure 3For the specific rendering process in the rendering engine: First, a mapping table is stored in the compatible rendering device, in which the object type (objectType) is associated with the corresponding rendering object (scene object, light object, geometry object and model object). The mapping table includes key-value pairs. For example, the mapping table stores objectType-Light3D, the key is objectType, i.e. the object type, and the value is the light object, i.e. the rendering object. According to the object type (objectType), the corresponding rendering object is obtained, and then the rendering engine to be called is determined.

[0045] Then, traverse and parse the diff object, which contains the attributes of the SDK object and the attributes of the new SDK object, such as object type (objectType), new attribute value (newValue), old attribute value (oldValue), etc. For example: SDK object: objectType: Light3D, lightColor: {oldValue: "red"}; New sdk object: objectType: Light3D, lightColor: {newValue: "white", oldValue: "red"}; diff object: objectType: Light3D, lightColor: {newValue: "white", oldValue: "red"}; From the analysis, we can know that the object type is a light object, the new attribute value of the light color corresponding to the light object is white, and the old attribute value of the light color corresponding to the light object is red.

[0046] At the same time, according to the object type obtained by parsing, the rendering object is obtained to determine the rendering object to be rendered. Parse the diff object to obtain the new attribute value (newValue) and the old attribute value (oldValue). Next, determine what operation to perform on the rendering object based on the new attribute value (newValue) and the old attribute value (oldValue): When there is neither the old attribute value (oldValue) nor the new attribute value (newValue), it indicates a delete operation, and the corresponding delete function in the rendering object is called. When there is no old attribute value (oldValue) and there is a new attribute value (newValue), it indicates a new operation, and the corresponding new function in the rendering object is called. When both exist, it indicates an edit operation, and the edit function in the rendering object is called.

[0047] In one embodiment, step D20 includes A10-A30: Step A10, for the cloud rendering engine, parsing the diff object according to the cloud rendering logic through the cloud rendering object to obtain a first parsing result, and allocating the cloud rendering engine according to the first parsing result; It should be noted that when processing, the cloud rendering engine uses the cloud rendering object to parse the diff object according to the cloud rendering logic. The cloud rendering logic involves considerations such as large-scale data processing, complex computing resource allocation, and cloud storage utilization. During the parsing of the diff object (the object that records the changes in the attributes of the SDK object), the cloud rendering engine will identify the changes related to cloud rendering according to the rules set by the cloud rendering object, for example, which attribute changes will affect large-scale scene rendering, high-precision calculations, etc. in cloud rendering. The first parsing result obtained includes the factors that affect the selection of the rendering engine from the perspective of cloud rendering, such as the attribute changes in the diff object. According to this first parsing result, if the changed SDK object is more suitable for the capabilities of the cloud rendering engine (for example, the changed scene is more complex and requires a lot of computing resources, which the cloud rendering engine can provide), the cloud rendering engine is allocated.

[0048] Step A20, the end rendering engine parses the diff object according to the end rendering logic through the end rendering object to obtain a second parsing result, and allocates the end rendering engine according to the second parsing result; It should be noted that the end rendering engine uses the end rendering object to operate according to the end rendering logic during the parsing process. When the end rendering logic parses the diff object, the end rendering engine will find the attribute changes related to the end rendering according to the rules set by the end rendering object (such as the hardware characteristics of the local device, real-time rendering requirements, etc.). According to this second parsing result, if the changed SDK object is suitable for the capabilities of the end rendering engine (such as the changed scene is relatively simple, the real-time requirements are high, and the local device can meet the rendering requirements), the end rendering engine will be assigned.

[0049] Step A30: For other rendering engines, the diff object is parsed according to preset parsing rules through other rendering objects to obtain a third parsing result, and other rendering engines are allocated according to the third parsing result.

[0050] It should be noted that for rendering engines other than the cloud rendering engine and the end rendering engine, other rendering objects are used for parsing according to preset parsing rules, where the preset parsing rules are formulated based on the characteristics of the other rendering engines themselves, and may be for special rendering algorithms, specific platforms or specific application scenarios. When parsing the diff object, the attribute changes related to these special requirements will be found to obtain a third parsing result. According to this third parsing result, if the changed sdk object is suitable for the capabilities of other rendering engines, then other rendering engines will be assigned.

[0051] In this implementation, the original logic can be extended through a custom rendering object to parse the diff object, thereby handling the special cases of a specific rendering engine. Specifically, parsing is performed according to the category of the rendering engine to obtain parsing results, and the corresponding rendering engine is assigned according to the parsing results. This enables accurate assignment of appropriate tasks to the corresponding rendering engine, thereby improving adaptability in different scenarios.

[0052] Step D30, rendering the new sdk object by calling the interface of the assigned rendering engine to obtain a rendering result.

[0053] It should be noted that a suitable rendering engine is assigned to the new SDK object, and rendering is performed by calling the rendering engine's interface. The new SDK object is passed to the rendering engine, which processes the information according to its own algorithms and functions, such as calculating light and shadow effects, object display effects, etc., and finally converts the new SDK object into visual content such as images and videos that can be displayed on the screen to obtain the rendering result.

[0054] This step can simplify the call to the rendering engine. The functions that need to be implemented by calling the APIs of multiple rendering engines can be implemented by calling the API of the SDK object once.

[0055] In one embodiment, the step of rendering the new SDK object by calling the interface of the assigned rendering engine to obtain the rendering result includes: Determine whether the changed attribute exists in the old SDK object; If the changed attribute exists in the old SDK object, the interface of the rendering engine is called to render the new SDK object according to the attribute value of the changed attribute to obtain the rendering result.

[0056] like Figure 4 As shown, when the changed attribute exists in the old SDK object, the interface of the rendering engine is called to render the new SDK object according to the attribute value of the changed attribute to obtain the rendering result.

[0057] When the changed attribute does not exist in the old SDK object, no processing is performed. This is equivalent to not an edit operation, but a add operation or a delete operation.

[0058] In this embodiment, by specially creating a diff object to record changes, the state changes of the SDK object under different operations can be more clearly understood. In the scenario where the SDK object is edited multiple times, the diff object can accurately reflect the content of each change; by parsing the diff object to allocate the rendering engine, the task can be reasonably allocated to the appropriate rendering engine, so that the rendering effect can better match the scene requirements, and high-quality rendering results can be obtained according to the actual changes of the SDK object and the characteristics of the rendering engine.

[0059] Based on the above embodiment of the present application, in another embodiment of the present application, the same or similar contents as the above embodiment can be referred to the above introduction, and will not be described in detail later. The compatible rendering method also includes: In response to the new addition operation on the sdk object attribute, a new sdk object is obtained; Get the attribute value of the newly added attribute of the new sdk object; The interface of the rendering engine is called according to the attribute value to render the new SDK object to obtain a rendering result.

[0060] It should be noted that when adding properties to an SDK object, it means adding new elements to the original SDK object structure. The original SDK object only contains basic properties such as color and shape. By adding properties such as texture and transparency, a new SDK object is obtained. This new SDK object is different from the original SDK object in data structure. It is an extension of the original object and contains more information for implementing specific functions (such as more complex rendering effects).

[0061] After getting the new SDK object, since new attributes are added, you need to get the attribute values ​​of these new attributes. The attribute values ​​are data used to determine the specific content of the attributes. The purpose of getting the attribute values ​​is to enable the rendering engine to accurately render the new SDK object according to the specific values ​​of the new attributes in subsequent rendering operations.

[0062] According to the attribute values ​​of the newly added attributes of the new SDK object obtained, the interface of the rendering engine is called to perform rendering operations, and the SDK object is converted into a visual image or scene to produce the final rendering effect.

[0063] In this embodiment, by adding attributes to the SDK object, calling the interface of the rendering engine to render the new SDK object with the newly added attributes, a rendering result is obtained. The attribute addition operation can be flexibly performed on the SDK object according to the needs, so that the SDK can meet more diverse needs without the need to redevelop the SDK. The attributes of the SDK object can be quickly added and new rendering results can be obtained, which is more efficient than rebuilding the rendering logic.

[0064] In a feasible implementation manner, the compatible rendering method further includes: obtaining a new sdk object in response to a deletion operation on an sdk object attribute; According to the deleted attributes of the new SDK object, the interface of the rendering engine is called to render the new SDK object to obtain a rendering result.

[0065] It should be noted that when deleting the attributes of an SDK object, it is equivalent to removing the attributes from the SDK object. For example, an SDK object used for rendering originally contains attributes such as color, shape, and texture. If the texture attribute is deleted, the SDK object after the attribute deletion operation becomes a new SDK object.

[0066] After getting the new SDK object (i.e. the object after the attributes are deleted), since its attributes have changed, the rendering engine interface is called according to these deleted attributes for rendering. The rendering engine renders the new SDK object according to the remaining attributes of the new SDK object to obtain a rendering result that conforms to the characteristics of the new SDK object.

[0067] In this embodiment, when a new SDK object is obtained after the attribute deletion operation is performed on the SDK object and rendered, the rendering engine does not need to perform complex calculations related to these attributes when rendering the new SDK object, which can reduce the time and computing resources required for rendering, thereby improving rendering efficiency.

[0068] For example, Figure 5 A brief schematic diagram of the compatible rendering method: first, build an SDK object, including scene objects, light objects, geometry objects, and model objects, adjust the SDK object (add operation, edit operation, delete operation) to obtain a new SDK object, compare the new SDK object with the old SDK object, and obtain the changed attributes in the SDK object; then use the cloud rendering object, end rendering object, and other rendering objects to use the parsing rules of the corresponding rendering engine to parse the result of comparing the new SDK object with the old SDK object; call the API of the corresponding rendering engine according to the parsing result, render the changed attributes in the SDK object, and obtain the rendering result.

[0069] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the compatible rendering method of the present application. More forms of simple transformations based on this technical concept, such as the interaction and combination of various embodiments, are all within the scope of protection of the present application.

[0070] This application also provides a compatible rendering device, please refer to Figure 6 , the compatible rendering device comprises: An adjustment module 10, for obtaining a new SDK object in response to an adjustment operation on the SDK object, wherein the SDK object includes a scene object, a light object, a geometry object and a model object; An allocation module 20, configured to allocate a rendering engine to the new SDK object, wherein the rendering engine includes a cloud rendering engine, a terminal rendering engine, and other rendering engines; The rendering module 30 is used to render the new SDK object by calling the interface of the assigned rendering engine to obtain a rendering result.

[0071] Optionally, the compatible rendering device comprises an editing module: for obtaining a diff object according to the changed attributes and attribute values ​​of the sdk object in response to an editing operation on the attributes of the sdk object; Parsing the diff objects respectively according to the rendering engine type, and assigning a corresponding rendering engine to a new sdk object restored from the diff object; The new SDK object is rendered by calling the interface of the assigned rendering engine to obtain a rendering result.

[0072] Optionally, the editing module is used to parse the diff object for the cloud rendering engine according to the cloud rendering logic through the cloud rendering object to obtain a first parsing result, and allocate the cloud rendering engine according to the first parsing result; The end rendering engine parses the diff object according to the end rendering logic through the end rendering object to obtain a second parsing result, and allocates the end rendering engine according to the second parsing result; For other rendering engines, the diff object is parsed according to preset parsing rules through other rendering objects to obtain a third parsing result, and other rendering engines are allocated according to the third parsing result.

[0073] Optionally, the compatible rendering device includes a new adding module: in response to a new adding operation on an sdk object attribute, a new sdk object is obtained; Get the attribute value of the newly added attribute of the new sdk object; The interface of the rendering engine is called according to the attribute value to render the new SDK object to obtain a rendering result.

[0074] Optionally, the compatible rendering device includes a deletion module: used to obtain a new SDK object in response to a deletion operation on an SDK object attribute; According to the deleted attributes of the new SDK object, the interface of the rendering engine is called to render the new SDK object to obtain a rendering result.

[0075] Optionally, the compatible rendering device comprises a state calling module: used for adding an object calling state attribute in the SDK object, wherein the default state of the object calling state attribute is a calling end state; When calling the rendering engine to render the SDK object, the state of the object calling state attribute is set to the calling state; When the rendering engine is called to complete rendering of the SDK object, the state of the object call state attribute is modified to the call end state.

[0076] The compatible rendering device provided by the present application adopts the compatible rendering method in the above embodiment, which can solve the technical problem of high processing cost when supporting multiple rendering engines. Compared with the prior art, the beneficial effects of the compatible rendering device provided by the present application are the same as the beneficial effects of the compatible rendering method provided by the above embodiment, and other technical features in the compatible rendering device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0077] The present application provides a compatible rendering device, which includes: 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 compatible rendering method in the first embodiment described above.

[0078] Reference below Figure 7 , which shows a schematic diagram of the structure of a compatible rendering device suitable for implementing the embodiment of the present application. The compatible rendering device 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 7 The compatible rendering device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0079] like Figure 7As shown, the compatible rendering device may include a processing device 1001 (e.g., 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 compatible rendering device 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 compatible rendering device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a compatible rendering device 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 instead.

[0080] 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.

[0081] The compatible rendering device provided by the present application adopts the compatible rendering method in the above embodiment, which can solve the technical problem of high processing cost when supporting multiple rendering engines. Compared with the prior art, the beneficial effects of the compatible rendering device provided by the present application are the same as the beneficial effects of the compatible rendering method provided by the above embodiment, and other technical features in the compatible rendering device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0082] 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.

[0083] 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.

[0084] 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 compatible rendering method in the above-mentioned embodiment.

[0085] 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 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 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.

[0086] The computer-readable storage medium may be included in a compatible rendering device; or may exist independently without being assembled into a compatible rendering device.

[0087] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a compatible rendering device, the compatible rendering device: obtains a new SDK object in response to an adjustment operation on an SDK object, wherein the SDK object includes a scene object, a light object, a geometry object, and a model object; allocates a rendering engine to the new SDK object, wherein the rendering engine includes a cloud rendering engine, an end rendering engine, and other rendering engines; renders the new SDK object by calling an interface of the allocated rendering engine to obtain a rendering result.

[0088] 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).

[0089] 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.

[0090] 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.

[0091] 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 compatible rendering method, and can solve the technical problem of high processing costs when supporting multiple rendering engines. 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 compatible rendering method provided in the above-mentioned embodiment, and will not be elaborated here.

[0092] The present application also provides a computer program product, including a computer program, which implements the steps of the compatible rendering method as described above when executed by a processor.

[0093] The computer program product provided by the present application can solve the technical problem of high processing cost when supporting multiple rendering engines. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the compatible rendering method provided by the above embodiment, which will not be repeated here.

[0094] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A compatible rendering method, characterized in that: The compatible rendering method includes: In response to the adjustment operation on the SDK object, a new SDK object is obtained, wherein the SDK object includes a scene object, a light object, a geometry object and a model object; Allocate a rendering engine for the new SDK object, wherein the rendering engine includes a cloud rendering engine, a terminal rendering engine, and other rendering engines; By calling the interface of the assigned rendering engine, the new SDK object is rendered to obtain a rendering result.

2. The compatible rendering method according to claim 1, characterized in that: The adjustment operation is an editing operation, and the compatible rendering method includes: In response to an edit operation on an attribute of an sdk object, a diff object is obtained according to the changed attributes and attribute values ​​of the sdk object; Parsing the diff objects respectively according to the rendering engine type, and assigning a corresponding rendering engine to a new sdk object restored from the diff object; The new SDK object is rendered by calling the interface of the assigned rendering engine to obtain a rendering result.

3. The compatible rendering method according to claim 2, characterized in that: The step of parsing the diff objects respectively according to the rendering engine type includes: For the cloud rendering engine, the diff object is parsed according to the cloud rendering logic through the cloud rendering object to obtain a first parsing result, and the cloud rendering engine is allocated according to the first parsing result; The end rendering engine parses the diff object according to the end rendering logic through the end rendering object to obtain a second parsing result, and allocates the end rendering engine according to the second parsing result; For other rendering engines, the diff object is parsed according to preset parsing rules through other rendering objects to obtain a third parsing result, and other rendering engines are allocated according to the third parsing result.

4. The compatible rendering method according to claim 1, characterized in that: The adjustment operation is a new operation, and the compatible rendering method includes: In response to the new addition operation on the sdk object attribute, a new sdk object is obtained; Get the attribute value of the newly added attribute of the new sdk object; The interface of the rendering engine is called according to the attribute value to render the new SDK object to obtain a rendering result.

5. The compatible rendering method according to claim 1, characterized in that: The adjustment operation is a deletion operation, and the compatible rendering method includes: In response to the deletion operation on the sdk object attribute, a new sdk object is obtained; According to the deleted attributes of the new SDK object, the interface of the rendering engine is called to render the new SDK object to obtain a rendering result.

6. The method according to claim 1, characterized in that The method comprises: Add an object call state attribute in the SDK object, wherein the default state of the object call state attribute is the call end state; When calling the rendering engine to render the SDK object, the state of the object calling state attribute is set to the calling state; When the rendering engine is called to complete rendering of the SDK object, the state of the object call state attribute is modified to the call end state.

7. A compatible rendering device, characterized in that: The compatible rendering device comprises: An adjustment module, used for obtaining a new SDK object in response to an adjustment operation on the SDK object, wherein the SDK object includes a scene object, a light object, a geometry object and a model object; An allocation module, used to allocate a rendering engine to the new SDK object, wherein the rendering engine includes a cloud rendering engine, a terminal rendering engine, and other rendering engines; The rendering module is used to render the new SDK object by calling the interface of the assigned rendering engine to obtain a rendering result.

8. A compatible rendering device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the compatible rendering method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the compatible rendering method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, which implements the steps of the compatible rendering method according to any one of claims 1 to 6 when executed by a processor.

Citation Information

Patent Citations

  • Version compatibility test method and apparatus

    CN104932973A

  • Method and device for calling native application by HTML5 application

    CN110704131A

  • Page rendering method and device, electronic equipment and storage medium

    CN111026396A

  • Component rendering method and device

    CN114816391A

  • Method and device for calling rendering engine in native application and computer readable medium

    CN118113491A