3D resource display method and device, storage medium and electronic device
By decoupling Android and 3D resource development through configuration-based remote rendering, the method addresses inefficiencies in traditional car infotainment systems, improving efficiency and flexibility in 3D resource management and cross-platform support.
Patent Information
- Application Number
- CN202510506031.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-15
AI Technical Summary
In in-vehicle infotainment systems, Android development and 3D development are usually handled by different teams, resulting in inefficient updates of 3D resource libraries and prone to error introductions, lacking efficient and accurate solutions.
By reading configuration files in the local memory of the vehicle computer, obtaining the rendering path and path information of the target 3D resources, and using the 3D resource library on the network server for rendering, the complete decoupling of 3D resources and vehicle computer development is achieved, and the rendering engine of the rendering server is used to render 3D resources and display them on the display screen.
It improves development efficiency, realizes independent development and management of 3D resources and Android applications, reduces the application package size, supports flexible resource updates and cross-platform adaptation, and avoids the problems of memory waste and slow resource loading.
Smart Images

Figure CN120321418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle information technology, and in particular, to a method and device for displaying 3D resources, a storage medium, and an electronic device. Background Art
[0002] In the related art, with the rapid development of the automotive industry, in-vehicle infotainment systems are increasingly widely used in vehicles. In-vehicle infotainment systems need to provide a rich user experience, and the introduction of 3D effects has greatly enhanced the user's visual experience. In the traditional development process of in-vehicle applications, the implementation of 3D effects requires integrating 3D-related resource libraries. However, Android development and 3D development are usually responsible for by different teams, and each has a large amount of development content. In this case, every time the 3D resource library or code library is updated, it needs to be merged to see the final complete effect. This method is inefficient and prone to introducing errors.
[0003] In view of the above problems in the related art, no efficient and accurate solution has been found yet. Summary of the Invention
[0004] The present invention provides a method and device for displaying 3D resources, a storage medium, and an electronic device to solve the technical problems in the related art.
[0005] According to an embodiment of the present invention, a method for displaying 3D resources is provided, including: in response to a loading request for a target 3D resource, reading a configuration file in a local memory of a vehicle console, where the configuration file includes path information and configuration information, the path information is used to indicate a storage path of the target 3D resource in a 3D resource library, the 3D resource library runs on a network server separated from the vehicle console, and the configuration information is used to indicate a rendering path of the target 3D resource; obtaining a rendering picture of the target 3D resource according to the configuration file; and displaying the rendering picture on a display screen of the vehicle console.
[0006] Optionally, obtaining a rendering picture of the target 3D resource according to the configuration file includes: reading rendering configuration information, scene configuration information, and path information in the configuration file, where the configuration information includes the rendering configuration information and the scene configuration information; searching for the target 3D resource in the 3D resource library according to the path information; transmitting the target 3D resource to a target rendering server according to the rendering configuration information; and remotely controlling a rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information to obtain a rendering picture to be displayed.
[0007] Optionally, finding the target 3D resource from the 3D resource library according to the path information includes: parsing the root path and the relative path in the path information; constructing a complete path using the root path and the relative path; and finding the target 3D resource from the 3D resource library based on the complete path.
[0008] Optionally, after parsing the root path and the relative path in the path information, the method further includes: determining whether the storage location of the target 3D resource in the 3D resource library is updated; if the storage location of the target 3D resource in the 3D resource library has been updated, obtaining the latest storage location; and reconfiguring the relative path in the path information based on the latest storage location.
[0009] Optionally, transmitting the target 3D resource to the target rendering server according to the rendering configuration information includes: parsing the server package name information in the rendering configuration information, where the server package name information is used to represent the identifier of the rendering server; starting the rendering service of the target rendering server corresponding to the server package name information, and transmitting the target 3D resource to the target rendering server.
[0010] Optionally, remotely controlling the rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information to obtain a rendering picture to be displayed includes: parsing the rendering parameters in the scene configuration information, where the rendering parameters include a scene name and camera configuration parameters; synchronously configuring the actual parameters of the rendering engine in the target rendering server based on the rendering parameters, and rendering the target 3D resource in the rendering engine in the target rendering server to obtain a rendering picture to be displayed.
[0011] Optionally, the rendering engine in the target rendering server renders the target 3D resource to obtain a rendering picture to be displayed includes: running the rendering engine in the first process of the target rendering server, and rendering the target 3D resource to obtain a rendering picture to be displayed; transmitting the rendering picture to a hardware buffer, where the hardware buffer is connected between the vehicle head unit and the target rendering server; and transmitting the rendering picture from the hardware buffer to the second process of the vehicle head unit.
[0012] According to another embodiment of the present invention, a display device for 3D resources is provided, including: a reading module, configured to respond to a loading request of a target 3D resource and read a configuration file in the local memory of the vehicle head unit, wherein the configuration file includes path information and configuration information, the path information is used to indicate the storage path of the target 3D resource in the 3D resource library, the 3D resource library runs on a network server separated from the vehicle head unit, and the configuration information is used to indicate the rendering path of the target 3D resource; an obtaining module, configured to obtain a rendering picture of the target 3D resource according to the configuration file; and a displaying module, configured to display the rendering picture on the display screen of the vehicle head unit.
[0013] Optionally, the obtaining module includes: a reading unit, configured to read the rendering configuration information, scene configuration information, and path information in the configuration file, wherein the configuration information includes the rendering configuration information and scene configuration information; a searching unit, configured to search for the target 3D resource from the 3D resource library according to the path information; a transmitting unit, configured to transmit the target 3D resource to a target rendering server according to the rendering configuration information; and a controlling unit, configured to remotely control a rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information to obtain a rendering picture to be displayed.
[0014] Optionally, the searching unit includes: a parsing subunit, configured to parse a root path and a relative path in the path information; a constructing subunit, configured to construct a complete path by using the root path and the relative path; and a searching subunit, configured to search for the target 3D resource from the 3D resource library based on the complete path.
[0015] Optionally, the searching unit further includes: a judging subunit, configured to judge whether the storage location of the target 3D resource in the 3D resource library is updated after the parsing subunit parses the root path and the relative path in the path information; an obtaining subunit, configured to obtain the latest storage location if the storage location of the target 3D resource in the 3D resource library has been updated; and a reconfiguring subunit, configured to reconfigure the relative path in the path information based on the latest storage location.
[0016] Optionally, the transmitting unit includes: a parsing subunit, configured to parse server package name information in the rendering configuration information, wherein the server package name information is used to represent an identifier of a rendering server; and a transmitting subunit, configured to start a rendering service of a target rendering server corresponding to the server package name information and transmit the target 3D resource to the target rendering server.
[0017] Optionally, the control unit includes: a parsing subunit, configured to parse the rendering parameters in the scene configuration information, where the rendering parameters include a scene name and camera configuration parameters; a rendering subunit, configured to synchronously configure the actual parameters of the rendering engine in the target rendering server based on the rendering parameters, and render the target 3D resource in the rendering engine in the target rendering server to obtain a rendering picture to be displayed.
[0018] Optionally, the rendering subunit is further configured to: run the rendering engine in the first process of the target rendering server, and render the target 3D resource to obtain a rendering picture to be displayed; transmit the rendering picture to a hardware buffer, where the hardware buffer is connected between the vehicle head unit and the target rendering server; transmit the rendering picture from the hardware buffer to the second process of the vehicle head unit.
[0019] According to another aspect of the embodiments of the present application, there is also provided a storage medium, which includes a stored program that executes the above steps when running.
[0020] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; where: the memory is used to store a computer program; the processor is used to execute the steps in the above method by running the program stored on the memory.
[0021] The embodiments of the present application also provide a computer program product containing instructions, which when running on a computer, causes the computer to execute the steps in the above method.
[0022] Advantages of the present invention:
[0023] 1. The development efficiency is improved. The development of the Android side of the vehicle head unit and the 3D resource side is completely decoupled, and developers can work independently, improving work efficiency. The development and debugging of 3D resources will not interfere with the functional development of Android applications.
[0024] 2. Flexible resource update and management. The 3D resources and the Android applications of the vehicle head unit are completely separated, and the 3D resources can be updated and managed independently. There is no need to republish the Android application. Just update the resource path in the configuration file or update the resources through a remote server, and the Android side will automatically load the new 3D resources.
[0025] 3. The application package size is reduced. The 3D resources do not need to be embedded in the Android applications of the vehicle head unit, and the application package size is greatly reduced. All 3D resources can be loaded through the network or local storage, avoiding the problem of too large application packages.
[0026] 4. Load resources on demand. The Android side of the vehicle's in-vehicle computer manages through configuration files and dynamic paths, and only loads specific 3D resources when needed, avoiding problems such as memory waste and slow resource loading.
[0027] 5. Cross-platform support and scalability. Through the separation of the Android side and 3D side resources of the vehicle's in-vehicle computer, resource management becomes more flexible. 3D resources can be adapted to multiple hardware platforms and even support in-vehicle computer systems of different vehicle models. Description of the Drawings
[0028] The drawings described herein are used to provide a further understanding of the present invention and form a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0029] Figure 1 is a hardware structure block diagram of a vehicle according to an embodiment of the present invention;
[0030] Figure 2 is a flowchart of a method for displaying 3D resources according to an embodiment of the present invention;
[0031] Figure 3 is a flowchart of the Android application on the in-vehicle computer loading 3D resources for rendering according to an embodiment of the present invention;
[0032] Figure 4 is a flowchart of the Android application on the in-vehicle computer rendering 3D resources according to an embodiment of the present invention;
[0033] Figure 5 is a structure block diagram of a device for displaying 3D resources according to an embodiment of the present invention. Detailed Embodiments
[0034] In order to enable those skilled in the art of this technology to better understand the solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application. It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.
[0035] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0036] Embodiment 1
[0037] The method embodiment provided by the first embodiment of the present application can be executed in an automobile, a server, a processor, an autonomous driving / assisted driving / smart driving controller or a similar processing device. Taking running on an automobile as an example, Figure 1 is a hardware structure block diagram of an automobile according to an embodiment of the present invention. As Figure 1 shown, the automobile may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processors 102 may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned automobile may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned automobile. For example, the automobile may further include more or fewer components than those Figure 1 shown in the figure, or have a different configuration from that Figure 1 shown in the figure.
[0038] The memory 104 can be used to store automobile programs. For example, software programs and modules of application software, such as the automobile program corresponding to the method for displaying 3D resources of an automobile in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the automobile program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely provided relative to the processor 102, and these remote memories can be connected to the automobile through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by an automobile communication provider. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0040] In this embodiment, a method for displaying 3D resources is provided. Figure 2 It is a flowchart of a method for displaying 3D resources according to an embodiment of the present invention. As Figure 2 shown, the process includes the following steps:
[0041] Step S202, in response to a loading request for a target 3D resource, read a configuration file in the local memory of the in-vehicle computer. Among them, the configuration file includes path information and configuration information. The path information is used to indicate the storage path of the target 3D resource in the 3D resource library, and the 3D resource library runs on a network server separated from the in-vehicle computer. The configuration information is used to indicate the rendering path of the target 3D resource;
[0042] In this embodiment, the 3D resources include 3D models, textures, animations, etc., and the 3D resources are stored in an independent resource library separated from the in-vehicle computer. The resource library can be a directory in the file system or a network storage library. In the resource library, a unique path identifier for each 3D resource is defined, and the path information will be used for positioning when the Android application loads the 3D resource. Taking the operating system of the in-vehicle computer as the Android system as an example.
[0043] Step S204, obtain the rendering picture of the target 3D resource according to the configuration file;
[0044] The target 3D resource is found through the path information in the configuration file, and then the target 3D resource is rendered into a rendering picture (3D animation) to be displayed through the rendering path corresponding to the configuration information in the configuration file, and is sent back to the memory of the in-vehicle computer, and the rendering picture is displayed on the display screen.
[0045] Step S206, display the rendering picture on the display screen of the in-vehicle computer;
[0046] When displaying the rendered image on the display screen of the in-vehicle infotainment system (IVI), use the file I / O provided by Android or a third-party 3D engine (such as Unity or OpenGL) to read the resource file, convert it into a data structure in memory, such as vertices, texture maps, etc., and use the 3D graphics rendering framework supported by Android (such as OpenGL ES) to load the model, texture, and animation into the rendering pipeline and display it on the IVI display screen.
[0047] Through the above steps, in response to the loading request of the target 3D resource, read the configuration file in the local storage of the IVI. The configuration file includes path information and configuration information. The path information is used to indicate the storage path of the target 3D resource in the 3D resource library, and the 3D resource library runs on a network server separated from the IVI. The configuration information is used to indicate the rendering path of the target 3D resource. Obtain the rendered image of the target 3D resource according to the configuration file. Display the rendered image on the display screen of the IVI. The 3D resources and the applications of the vehicle IVI are completely separated, realizing the complete decoupling of the development of the application side and the 3D resource side of the vehicle IVI, solving the technical problem of low efficiency in developing 3D software on the IVI, and improving the flexibility of the IVI to render 3D images.
[0048] In an implementation scenario of this embodiment, obtaining the rendered image of the target 3D resource according to the configuration file includes: reading the rendering configuration information, scene configuration information, and path information in the configuration file, where the configuration information includes the rendering configuration information and the scene configuration information; searching for the target 3D resource in the 3D resource library according to the path information; transmitting the target 3D resource to the target rendering server according to the rendering configuration information; remotely controlling the rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information to obtain the rendered image to be displayed.
[0049] Optionally, the configuration file can be stored in the local resource directory of the Android application in JSON format (such as assets / ). When the application starts, read the configuration file and parse its content to obtain the path of the 3D resource and the attributes of its configuration information.
[0050] In this embodiment, it is also possible to preload and cache the target 3D resource, preload the commonly used resources and cache them in memory or local storage. When the application starts, check the cache first to reduce the repeated loading time. In addition, a verification mechanism can be added to the configuration file to ensure the consistency of the resource path and version. The resource hash verification code (MD5 / SHA-256) can be used to verify the file integrity.
[0051] Optionally, in addition to the path information, the configuration file contains multiple services and their configuration information for rendering 3D scenes in the in-vehicle system. The file content may include: service information and plugin information. The configuration file includes the following parameter items:
[0052] Version information: version: The version number of the configuration file, identifying the version of the current configuration (the value is 1).
[0053] Service information list: Defines a list containing rendering services. Each service contains multiple configuration information.
[0054] For example:
[0055] Service 1: CocosRemoteRenderService
[0056] class_name: Specifies the package name and class name of the service (com.tinnove.renderserver.service.CocosRemoteRenderService).
[0057] configs: Defines the rendering configurations in different scenarios.
[0058] default: The default screen configuration, with a width of 2560 pixels and a height of 1600 pixels.
[0059] config_car: Customized scenario - vehicle center, with the same configuration as the default, but additionally defines a camera list (MainCamera, Canvas / Camera, Canvas-background / Camera) and a scene name (main), as well as a sample size (samples: 4).
[0060] config_nid: Customized scenario - driving small card, with a configuration width of 683 pixels and a height of 846 pixels, including a specific camera (AdasCamera) and anti-aliasing parameters (samples: 4).
[0061] config_apa: Customized scenario - parking card, with a width of 700 pixels and a height of 740 pixels, including the camera configuration for the parking scenario (apa / camera_apa).
[0062] config_apa_run: Customized scenario - driving large card, with a width of 960 pixels and a height of 970 pixels, using the camera for the driving state (apa / camera_apa_run).
[0063] config_scene_tran: Custom scene - transition effect, width 2560 pixels, height 600 pixels, using a dedicated transition camera (TransitionCamera).
[0064] plugins: Plugin configuration, specifying a so file (libpluginDataCocos.so) and corresponding parameters for the service to use.
[0065] Service 2: CocosRemoteRenderService0
[0066] class_name: Specify the package name of the service (com.cocos.game.CocosRemoteRenderService0).
[0067] asset_dirs: Specify the directory path of 3D resources ( / sdcard / CocosRemoteRenderService / data), where 3D resource files are stored.
[0068] configs: Configure the default screen width to 2560 pixels and height to 1600 pixels.
[0069] The above configuration file describes two rendering services, one of which has multiple customized rendering configurations to adapt to different in - vehicle interface requirements (such as vehicle center, driving mini - card, parking card, etc.). Each configuration contains different scenes, camera lists, and anti - aliasing parameters to ensure rendering effects in different scenarios. The plugin part specifies additional.so files, which may provide extensions or optimizations for the rendering process. This configuration file provides flexible control over different rendering scenarios and can be modified or extended according to needs.
[0070] Figure 3 This is the flowchart for an Android application on the in - vehicle device in the embodiment of the present invention to load 3D resources for rendering, including the display application end, rendering service end, and rendering engine end of the in - vehicle device. At the display application end, after the in - vehicle device starts a 3D rendering application, it initializes the application end (client), initializes the 3D rendering View (a basic component in Android for building user interfaces), adds a 3D rendering View Activity (managing the lifecycle of the View), searches for and binds to the rendering service in the matching rendering service end. If successful, it starts the rendering engine at the rendering engine end, loads 3D resources. After the rendering engine is initialized, based on the hardware buffer of the rendering service end, it transmits the rendering result (rendering screen) to the display application end, thereby realizing the display of 3D content.
[0071] In one example, finding the target 3D resource from the 3D resource library according to the path information includes: parsing the root path and the relative path in the path information; constructing a complete path using the root path and the relative path; and finding the target 3D resource from the 3D resource library based on the complete path.
[0072] Determine the root path of the resource library according to the resourceBasePath field in the configuration file, and then combine the relative path in the resources field to construct the complete path of each 3D resource, and then search in the 3D resource library.
[0073] Dynamically specifying the path of the 3D resource through the configuration file can be a local storage path, a network storage path, or other distributed file system paths, greatly improving flexibility.
[0074] Optionally, after parsing the root path and the relative path in the path information, it further includes: determining whether the storage location of the target 3D resource in the 3D resource library has been updated; if the storage location of the target 3D resource in the 3D resource library has been updated, obtaining the latest storage location; and reconfiguring the relative path in the path information based on the latest storage location.
[0075] In one example, transmitting the target 3D resource to the target rendering server according to the rendering configuration information includes: parsing the server package name information in the rendering configuration information, where the server package name information is used to represent the identifier of the rendering server; starting the rendering service of the target rendering server corresponding to the server package name information, and transmitting the target 3D resource to the target rendering server.
[0076] In the configuration file, the key configuration of the rendering configuration information is the server package name information, which is used to indicate the name of the rendering server, and the rendering service is started according to the package name information.
[0077] In one example, remotely controlling the rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information to obtain a rendering picture to be displayed includes: parsing the rendering parameters in the scene configuration information, where the rendering parameters include a scene name and camera configuration parameters; synchronously configuring the actual parameters of the rendering engine in the target rendering server based on the rendering parameters, and rendering the target 3D resource in the rendering engine in the target rendering server to obtain a rendering picture to be displayed.
[0078] Multiple scene configuration information can be added, and the scene name and camera configuration need to be consistent with the rendering design of the rendering engine (such as cocos).
[0079] Optionally, rendering the target 3D resource in the rendering engine of the target rendering server to obtain a rendering screen to be displayed includes: running the rendering engine in the first process of the target rendering server and rendering the target 3D resource to obtain a rendering screen to be displayed; transmitting the rendering screen to a hardware buffer, where the hardware buffer is connected between the vehicle head unit and the target rendering server; and transmitting the rendering screen from the hardware buffer to the second process of the vehicle head unit.
[0080] If the Android application and the 3D engine of the vehicle head unit are in different processes, cross-process communication (IPC) is required to implement resource loading and rendering. In this case, JNI (Java Native Interface) or AIDL (Android Interface Definition Language) can be used for interface communication. The explanation is as follows:
[0081] JNI: Through JNI, the Android application can call the C / C++ code of the 3D engine to load and render 3D resources.
[0082] AIDL: When the Android application and the 3D engine belong to different processes, AIDL provides a cross-process call interface to ensure that the Android side can call functions such as resource loading and rendering on the 3D side.
[0083] Figure 4 It is a flowchart of the Android application on the vehicle head unit rendering 3D resources in an embodiment of the present invention, including: reading a configuration file; parsing the configuration file to obtain a resource path; loading resources; calling a rendering engine; and rendering 3D resources to the screen.
[0084] S41. Read the configuration file. First, the Android application reads the configuration file (usually in JSON or XML format) stored in the local assets or external storage. This configuration file contains the basic path and information of the 3D resources;
[0085] S42. Parse the configuration file to obtain the resource path. After the configuration file is parsed, the Android application extracts the 3D resource path. This path may point to local storage or network resources (such as model files, texture files, etc.);
[0086] S43. Load resources. The Android application loads resources according to the parsed path. This includes 3D model files, textures, animations, etc. During the loading process, the resources may be converted into objects in memory, such as textures or mesh data recognizable by OpenGL;
[0087] S44. Invoke the rendering engine. The Android application uses a rendering engine (such as OpenGL, Vulkan, etc.) to process and draw 3D resources. Through appropriate graphics APIs, the rendering engine prepares these resources for actual graphics output;
[0088] S45. Render 3D resources to the screen. Finally, through the drawing calls of the rendering engine, resources such as 3D models and textures are rendered onto the in-vehicle screen to complete the display of 3D effects.
[0089] The solution of this embodiment has the following effects: Improved development efficiency. The development of the Android side and the 3D side is completely decoupled, and developers can work independently, improving work efficiency. The development and debugging of 3D resources will not interfere with the functional development of Android applications. Flexible resource update and management. The 3D resources and the Android application are completely separated, and the 3D resources can be updated and managed independently. There is no need to republish the Android application. Just update the resource path in the configuration file or update the resources through a remote server, and the Android side will automatically load the new 3D resources. Reduced application package size. The 3D resources do not need to be embedded in the Android application, and the application package size is greatly reduced. All 3D resources can be loaded through the network or local storage, avoiding the problem of too large application packages. Load resources on demand. The Android side manages through the configuration file and dynamic paths, and only loads specific 3D resources when needed, avoiding the problems of memory waste and slow resource loading. Cross-platform support and scalability. Due to the separation of resources on the Android side and the 3D side, resource management becomes more flexible. The 3D resources can be adapted to multiple hardware platforms and even support the in-vehicle systems of different vehicle models.
[0090] Adopting the solution of this embodiment, by decoupling the development and operation of the Android side and the 3D side, using a configuration file to manage the resource paths, and communicating through standardized interfaces (such as JNI, AIDL), the Android application can dynamically load and render 3D resources. This method enables the Android side and the 3D side to be developed and debugged independently, while providing a flexible resource management method, greatly improving the development efficiency, simplifying the maintenance work, and supporting loading resources on demand and cross-platform expansion, meeting the requirements of resource separation between the Android and 3D sides in the in-vehicle system.
[0091] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0092] Embodiment 2
[0093] In this embodiment, a 3D resource display device is further provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0094] Figure 5 is a structural block diagram of a 3D resource display device according to an embodiment of the present invention. As Figure 5 shown, the device includes:
[0095] A reading module 50, configured to respond to a loading request of a target 3D resource, and read a configuration file in the local memory of the vehicle-mounted computer. The configuration file includes path information and configuration information. The path information is used to indicate the storage path of the target 3D resource in the 3D resource library, and the 3D resource library runs on a network server separated from the vehicle-mounted computer. The configuration information is used to indicate the rendering path of the target 3D resource;
[0096] An obtaining module 52, configured to obtain a rendering picture of the target 3D resource according to the configuration file;
[0097] A displaying module 54, configured to display the rendering picture on the display screen of the vehicle-mounted computer.
[0098] Optionally, the obtaining module includes: a reading unit configured to read rendering configuration information, scene configuration information, and path information from the configuration file, where the configuration information includes the rendering configuration information and the scene configuration information; a searching unit configured to search for the target 3D resource from the 3D resource library according to the path information; a transmitting unit configured to transmit the target 3D resource to a target rendering server according to the rendering configuration information; and a controlling unit configured to remotely control a rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information, so as to obtain a rendering picture to be displayed.
[0099] Optionally, the searching unit includes: a parsing subunit configured to parse a root path and a relative path in the path information; a constructing subunit configured to construct a complete path by using the root path and the relative path; and a searching subunit configured to search for the target 3D resource from the 3D resource library based on the complete path.
[0100] Optionally, the searching unit further includes: a determining subunit configured to determine whether a storage location of the target 3D resource in the 3D resource library is updated after the parsing subunit parses the root path and the relative path in the path information; an obtaining subunit configured to obtain a latest storage location if the storage location of the target 3D resource in the 3D resource library has been updated; and a reconfiguring subunit configured to reconfigure the relative path in the path information based on the latest storage location.
[0101] Optionally, the transmitting unit includes: a parsing subunit configured to parse server package name information in the rendering configuration information, where the server package name information is used to represent an identifier of a rendering server; and a transmitting subunit configured to start a rendering service of a target rendering server corresponding to the server package name information and transmit the target 3D resource to the target rendering server.
[0102] Optionally, the controlling unit includes: a parsing subunit configured to parse rendering parameters in the scene configuration information, where the rendering parameters include a scene name and camera configuration parameters; and a rendering subunit configured to synchronously configure actual parameters of a rendering engine in the target rendering server based on the rendering parameters and render the target 3D resource by using the rendering engine in the target rendering server, so as to obtain a rendering picture to be displayed.
[0103] Optionally, the rendering subunit is further configured to: run the rendering engine in a first process of the target rendering server and render the target 3D resource to obtain a rendering picture to be displayed; transmit the rendering picture to a hardware buffer, where the hardware buffer is connected between the vehicle head unit and the target rendering server; and transmit the rendering picture from the hardware buffer to a second process of the vehicle head unit.
[0104] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: all the above modules are located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.
[0105] Embodiment 3
[0106] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, and the computer program is set to execute the steps in any one of the above method embodiments when running.
[0107] Optionally, in this embodiment, the above storage medium can be set to store a computer program for executing the following steps:
[0108] S1. In response to a loading request for a target 3D resource, read a configuration file in the local memory of the vehicle-mounted computer. The configuration file includes path information and configuration information. The path information is used to indicate the storage path of the target 3D resource in the 3D resource library, and the 3D resource library runs on a network server separated from the vehicle-mounted computer. The configuration information is used to indicate the rendering path of the target 3D resource;
[0109] S2. Obtain the rendering screen of the target 3D resource according to the configuration file;
[0110] S3. Display the rendering screen on the display screen of the vehicle-mounted computer.
[0111] Optionally, in this embodiment, the above storage medium may include but is not limited to: various media such as a USB flash drive, a read-only memory (ROM for short), a random access memory (RAM for short), a mobile hard disk, a magnetic disk, or an optical disc that can store computer programs.
[0112] An embodiment of the present invention further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is set to run the computer program to execute the steps in any one of the above method embodiments.
[0113] Optionally, the above electronic device may further include a transmission device and an input / output device. The transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0114] Optionally, in this embodiment, the above processor can be set to execute the following steps through a computer program:
[0115] S1. In response to a loading request for a target 3D resource, read a configuration file from the local memory of the in-vehicle unit, where the configuration file includes path information and configuration information. The path information is used to indicate the storage path of the target 3D resource in the 3D resource library, and the 3D resource library runs on a network server separated from the in-vehicle unit. The configuration information is used to indicate the rendering path of the target 3D resource;
[0116] S2. Obtain the rendering screen of the target 3D resource according to the configuration file;
[0117] S3. Display the rendering screen on the display screen of the in-vehicle unit.
[0118] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.
[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] Through the description of the above implementation manners, those skilled in the art can clearly understand that each implementation manner can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the related technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0121] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "include", "comprise", "contain", and "have" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be executed in the specific order described or illustrated, unless the execution order is explicitly stated. It should also be understood that additional or alternative steps can be used.
[0122] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for displaying 3D resources, characterized in that, Including: In response to a loading request for a target 3D resource, read a configuration file from the local memory of the in-vehicle unit, where the configuration file includes path information and configuration information, the path information is used to indicate the storage path of the target 3D resource in the 3D resource library, the 3D resource library runs on a network server separated from the in-vehicle unit, and the configuration information is used to indicate the rendering path of the target 3D resource; Obtain the rendering picture of the target 3D resource according to the configuration file; Display the rendering picture on the display screen of the in-vehicle unit.
2. The method according to claim 1, wherein Obtaining the rendering picture of the target 3D resource according to the configuration file includes: Read the rendering configuration information, scene configuration information, and path information in the configuration file, where the configuration information includes the rendering configuration information and scene configuration information; Find the target 3D resource from the 3D resource library according to the path information; Transmit the target 3D resource to the target rendering server according to the rendering configuration information; Remotely control the rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information to obtain the rendering picture to be displayed.
3. The method according to claim 2, wherein Finding the target 3D resource from the 3D resource library according to the path information includes: Analyze the root path and relative path in the path information; Construct a complete path using the root path and the relative path; Find the target 3D resource from the 3D resource library based on the complete path.
4. The method according to claim 3, wherein After analyzing the root path and relative path in the path information, the method further includes: Determine whether the storage location of the target 3D resource in the 3D resource library is updated; If the storage location of the target 3D resource in the 3D resource library has been updated, obtain the latest storage location; Reconfigure the relative path in the path information based on the latest storage location.
5. The method according to claim 2, wherein Transmitting the target 3D resource to the target rendering server according to the rendering configuration information includes: Analyze the server package name information in the rendering configuration information, where the server package name information is used to represent the identifier of the rendering server; Start the rendering service of the target rendering server corresponding to the server package name information and transmit the target 3D resource to the target rendering server.
6. The method according to claim 2, characterized in that, Remotely controlling the rendering engine in the target rendering server to render the target 3D resource according to the scene configuration information to obtain the rendering picture to be displayed includes: Analyze the rendering parameters in the scene configuration information, where the rendering parameters include the scene name and camera configuration parameters; Synchronously configure the actual parameters of the rendering engine in the target rendering server based on the rendering parameters, and the rendering engine in the target rendering server renders the target 3D resource to obtain the rendering picture to be displayed.
7. The method according to claim 6, wherein When the rendering engine in the target rendering server renders the target 3D resource to obtain the rendering picture to be displayed includes: Run the rendering engine in the first process of the target rendering server and render the target 3D resource to obtain the rendering picture to be displayed; Transmit the rendered image to a hardware buffer, where the hardware buffer is connected between the in-vehicle computer and the target rendering server; Transmit the rendered image from the hardware buffer to a second process of the in-vehicle computer.
8. A display device for 3D resources, characterized in that, Comprising: A reading module, configured to respond to a loading request for a target 3D resource, and read a configuration file in a local memory of the in-vehicle computer, where the configuration file includes path information and configuration information, the path information is used to indicate a storage path of the target 3D resource in a 3D resource library, the 3D resource library runs on a network server separated from the in-vehicle computer, and the configuration information is used to indicate a rendering path of the target 3D resource; An obtaining module, configured to obtain a rendered image of the target 3D resource according to the configuration file; A display module, configured to display the rendered image on a display screen of the in-vehicle computer.
9. A storage medium, characterized in that, A computer program is stored in the storage medium, where the computer program is configured to execute the method described in any one of claims 1 to 7 when running.
10. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 7.