Display picture generation method and system
By sending model data of multiple target components to the graphics processor at once through the central processing unit, the problem of high CPU load is solved, resulting in more efficient rendering and more realistic image display, thus improving the user experience.
Patent Information
- Application Number
- CN202411537669.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-10
AI Technical Summary
In existing technologies, frequent data interactions between the central processing unit (CPU) and the graphics processing unit (GPU) result in high CPU load, leading to rendering stutters and unrealistic rendering, which negatively impacts the user experience.
The central processing unit (CPU) sends the model data of multiple target components of the target object to the graphics processing unit (GPU) at once, enabling the GPU to generate the target image model, thereby reducing the number of communications and the amount of data between the CPU and the GPU.
It reduces the CPU load, minimizes rendering stutters, improves rendering efficiency and image realism, and enhances the user experience.
Smart Images

Figure CN119295292A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of screen display technology, and in particular to a display screen generation method and system. Background Art
[0002] With the rapid development of computer technology, the technology of rendering images of objects and displaying them on electronic screens is increasingly used in mobile phones, computers, automobiles and other fields.
[0003] Taking a car as an example, during the driving or parking process of the car, the car screen needs to display the scene reconstruction display screen of the scene where the vehicle is located, and the scene reconstruction display screen includes models of target objects such as traffic participants (such as pedestrians, vehicles, etc.), obstacles, etc. At present, when rendering the model of a target object including a large number of components such as a vehicle, the central processing unit (CPU) usually defines the model data for one of the components of the target object, and sends the defined model data to the graphics processing unit (GPU) so that the GPU renders the corresponding component model according to the model data. Then, the CPU defines the model data for another component of the target object, and sends the defined model data to the GPU so that the GPU renders the corresponding component model according to the model data, thereby completing the rendering of all components of the target object in turn, obtaining a new object model, and generating a scene reconstruction display screen according to the new object model. This display screen generation method requires multiple interactions of model data between the CPU and the GPU when rendering the model of each object component. Therefore, if the number of components to be drawn is large, the CPU usage rate will be high, which will cause the CPU load rate to be high, resulting in rendering jams.
[0004] In the prior art, in order to avoid rendering jams caused by excessive CPU usage, the number of model components that need to be rendered is usually limited. This approach may cause the model of the corresponding target object to be missing in the scene reconstruction display screen in situations where there are dense traffic participants, so that the rendered scene reconstruction screen cannot reflect the actual driving scene, affecting the user's driving experience.
[0005] In addition, for electronic devices such as mobile phones and computers, during the image rendering process, in order to avoid rendering jams caused by excessive CPU usage, the number of model components that need to be rendered is limited, resulting in unrealistic rendered images and affecting user experience. Summary of the invention
[0006] The present application provides a display screen generation method and system for solving the problems in the prior art in which, during the display screen generation process, the CPU load rate is high, resulting in rendering jams, and the rendered screen is unrealistic, affecting the user experience.
[0007] The CPU sends the model data of multiple different target components of the target object to the GPU at one time, so that the GPU can generate the target image model of the target object based on the model data of multiple different components. In this way, when generating the image, the number of communications and the amount of communication data between the CPU and the GPU can be effectively reduced for the rendering of the target object, thereby reducing the load rate of the CPU, thereby reducing the rendering freeze and the unrealistic rendered image, and improving the user experience.
[0008] To solve the above technical problems, in the first aspect, an implementation method of the present application discloses a display screen generating method, which is applied to an electronic device, and the electronic device includes a central processing unit and a graphics processing unit. The method includes: the central processing unit determines target model data of a target object, and sends the target model data to the graphics processing unit, the target object includes multiple target components, and the target model data includes model data of the multiple target components; the graphics processing unit generates a target image model of the target object according to the target model data, so as to generate a display screen according to the target image model.
[0009] In the display screen generation method provided by the implementation of the present application, the central processing unit sends the model data of multiple target components of the target object to the graphics processing unit at one time, so that the graphics processing unit generates a target image model of the target object according to the target model data, and then generates a display screen according to the target image model. In this way, the number of communications and the amount of communication data between the central processing unit and the graphics processing unit can be effectively reduced, and the load rate of the central processing unit can be reduced, thereby reducing the situation of rendering jams and unrealistic rendered images, and improving the user experience.
[0010] According to another specific implementation of the present application, in the display screen generation method disclosed in the implementation of the present application, the model data of the multiple target components are model data of the multiple target components in different states.
[0011] By adopting the above technical solution, the central processing unit sends the model data of multiple target components of the target object to the graphics processor at one time, and can draw image models of the model data of the target object in different states, so that the model rendering efficiency of the target object is higher, the display screen generation efficiency is higher, and the display screen is more realistic.
[0012] According to another specific implementation of the present application, the display screen generation method disclosed in the implementation of the present application, the central processing unit determines the target model data of the target object, including: the central processing unit receives scene reconstruction data of the screen to be displayed, classifies the scene reconstruction data to obtain at least one group of first model data corresponding to the target object, and batches the at least one group of first model data to obtain the target model data of the target object.
[0013] According to another specific implementation of the present application, the implementation of the present application discloses a display screen generation method, wherein the central processing unit includes a data receiving node, a data distribution node and a data processing node, and the central processing unit determines the target model data of the target object, including: the data receiving node receives the scene reconstruction data of the screen to be displayed, and sends the scene reconstruction data to the data distribution node; the data distribution node classifies the scene reconstruction data, filters out the data corresponding to the target object from the scene reconstruction data, obtains at least one group of first model data corresponding to the target object, and sends at least one group of first model data to the data processing node; the data processing node performs data batch processing on at least one group of first model data to obtain the target model data of the target object.
[0014] By adopting the above technical solution, the data corresponding to the target object in the scene reconstruction data is screened out to obtain at least one group of first model data corresponding to the target object, and then the first model data is batch processed to obtain target model data, and the target model data is sent to the graphics processor, so that the graphics processor can generate multiple target image models corresponding to different states of the target object based on the target model data, thereby speeding up the image model rendering efficiency. In addition, only one data interaction is required between the central processing unit and the graphics processor, which can effectively reduce the number of communications and the amount of communication data between the central processing unit and the graphics processor, and reduce the load rate of the central processing unit.
[0015] According to another specific implementation of the present application, the implementation of the present application discloses a display screen generation method, which also includes: the central processing unit determines the initial model data of the target object and sends the initial model data to the graphics processor; the graphics processor generates a target image model of the target object based on the target model data, including: the graphics processor generates a target image model of the target object based on the initial model data and the target model data.
[0016] By adopting the above technical solution, the graphics processor generates a plurality of target image models in different states according to the target model data and the initial model data, and generates the final display screen. In this way, the CPU and the graphics processor can draw a plurality of image models of the same type in different states through a single call.
[0017] According to another specific implementation of the present application, the display screen generation method disclosed in the implementation of the present application, the initial model data is the model data obtained by performing channel addition processing and vertex color addition processing on the model data of the initial model of the target object, and performing instantiation array definition processing on the model data corresponding to the target components in the initial model.
[0018] By adopting the above technical solution, by performing channel addition processing and vertex color addition processing on the model data of the initial model of the target object, and performing instantiation array definition processing on the model data corresponding to the target component in the initial model, the graphics processor can directly update the initial model data based on the target model data to generate image models of different states. In this way, the image model generation efficiency is higher and the CPU load rate is lower.
[0019] According to another specific implementation of the present application, in the display screen generation method disclosed in the implementation of the present application, the initial model data is model data in a model grid.
[0020] By adopting the above technical solution, the model data of the initial model is in a model grid. Thus, the initial model data of a single grid can effectively reduce the communication cost between the CPU and the GPU, reduce the load of the CPU, and thus optimize the rendering process of the target object.
[0021] According to another specific implementation of the present application, the display screen generation method disclosed in the implementation of the present application, the central processing unit determines the target model data of the target object, including: the central processing unit determines the image material ball, and obtains the target model data based on the vertex shader included in the image material ball.
[0022] By adopting the above technical solution, the target model data is obtained using the material ball to display the display screen in real time, making the display effect smoother and more efficient.
[0023] According to another specific implementation of the present application, the display screen generation method disclosed in the implementation of the present application, if the target object is a vehicle, the target parts of the target object include the body parts, light parts, door parts, hood parts and trunk lid parts of the vehicle.
[0024] By adopting the above technical solution, if the target object is a vehicle, multiple different parts such as body parts, headlight parts, door parts, hood parts and trunk lid parts can be rendered at one time, thereby speeding up the rendering efficiency of the vehicle image model.
[0025] According to another specific implementation of the present application, the display screen generation method disclosed in the implementation of the present application, the model data of multiple target parts include position information of body parts, heading angle information of body parts, color status information of body parts, transparency status information of body parts, headlight status information of headlight parts, door status information of door parts, hood status information of hood parts, and trunk lid status information of trunk lid parts.
[0026] By adopting the above technical scheme, based on the position information of body parts, the heading angle information of body parts, the color status information of body parts, the transparency status information of body parts, the light status information of light parts, the door status information of door parts, the hood status information of hood parts and the trunk lid status information of trunk lid parts, the image model of the vehicle in different states can be transmitted and rendered once, thereby reducing the number of interactions between the central processing unit and the graphics processing unit and improving the image model rendering efficiency.
[0027] In the second aspect, the implementation method of the present application also discloses a display screen generation system, which includes a central processing unit and a graphics processor, wherein the central processing unit is used to determine the target model data of the target object and send the target model data to the graphics processor, the target object includes multiple target components, and the target model data includes model data of the multiple target components; the graphics processor is used to generate a target image model of the target object according to the target model data, so as to generate a display screen according to the target image model.
[0028] In a third aspect, the implementation method of the present application also discloses an electronic device, comprising: a processor, and a memory connected to the processor for communication, the processor comprising a central processing unit and a graphics processing unit; the memory stores a computer program, and the processor executes the computer program stored in the memory so that the electronic device implements a display screen generation method provided in any implementation method of the first aspect.
[0029] In a fourth aspect, an implementation method of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement a display screen generation method provided in any one of the implementation methods of the first aspect above.
[0030] In a fifth aspect, an implementation of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements a display screen generation method as provided in any one of the implementations of the first aspect above.
[0031] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can also be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flowchart of a display screen generation method provided in an embodiment of the present application;
[0033] Figure 2 This is a schematic diagram of a process for a central processor to determine target model data provided by an embodiment of the present application;
[0034] Figure 3 It is a flowchart of another display screen generation method provided in an embodiment of the present application;
[0035] Figure 4 It is a flowchart of another display screen generation method provided in an embodiment of the present application;
[0036] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] At present, with the rapid development of computer technology, the technology of rendering three-dimensional images and displaying them on electronic screens is increasingly used in mobile phones, computers, automobiles and other fields.
[0038] Take a car as an example. When the car is driving or parking, the car screen needs to display the scene reconstruction display screen of the scene where the car is located. The scene reconstruction display screen contains a large number of models of traffic participants (such as pedestrians, vehicles, etc.), obstacles (such as street lights, road signs) and other target objects. Models of the same type of target objects share the same mesh data, but when drawing each component of each model, data interaction between the CPU and GPU is required, which wastes performance.
[0039] For example, when rendering a model of a target object including many parts such as a car, the central processing unit (CPU) usually defines the model data for one of the parts of the target object, and sends the defined model data to the graphics processing unit (GPU) so that the GPU renders the corresponding component model according to the model data. Then the CPU defines the model data for another part of the target object, and sends the defined model data to the GPU so that the GPU renders the corresponding component model according to the model data. The rendering of all the parts of the target object is completed at one time, and a new object model is obtained to generate a scene and reconstruct the display screen according to the new object model. This display screen generation method requires model data interaction between the CPU and the GPU when rendering the model parts of each object. Therefore, if the number of parts of the model to be drawn is large, the CPU usage rate will be high, which will cause a high CPU load rate and cause rendering jams.
[0040] In addition, if there are multiple vehicle models in the scene reconstruction display screen, data interaction is required based on the CPU and GPU to render each component of each vehicle model and generate multiple different vehicle models to generate the scene reconstruction display screen.
[0041] In the prior art, in order to avoid rendering jams caused by excessive CPU usage, the number of model components that need to be rendered is usually limited. This approach may cause the corresponding target object model to be missing in the scene reconstruction display screen in places with dense traffic participants, so that the rendered scene reconstruction screen cannot reflect the actual road conditions, affecting the user's driving experience.
[0042] In addition, for electronic devices such as mobile phones and computers, during the image rendering process, in order to avoid rendering jams caused by excessive CPU usage, the number of model components that need to be rendered is limited, resulting in unrealistic rendered images and affecting user experience.
[0043] Based on this, the implementation of the present application provides a display screen generation method and system, where the central processing unit sends the model data of multiple different target components of the target object to the graphics processing unit at one time, so that the graphics processing unit can generate a target image model of the target object based on the model data of multiple different components. In this way, when generating the screen, for the rendering of the target object, the number of communications and the amount of communication data between the central processing unit and the graphics processing unit can be effectively reduced, and the load rate of the central processing unit can be reduced, thereby reducing the rendering jams and the unrealistic rendered images, and improving the user experience.
[0044] Next, see Figure 1 The display screen generation method provided by the implementation of the present application is applied to a display screen generation system, wherein the display screen generation system includes a central processing unit and a graphics processing unit, wherein the central processing unit is used to determine target model data of a target object, and send the target model data to the graphics processing unit, wherein the target object includes multiple target components, and the target model data includes model data of multiple target components. The graphics processing unit is used to generate a target image model of the target object according to the target model data, so as to generate a display screen according to the target image model.
[0045] Furthermore, if Figure 1 As shown, the display screen generation method specifically includes the following steps.
[0046] S100, the central processing unit determines target model data of a target object, and sends the target model data to a graphics processing unit, the target object includes a plurality of target components, and the target model data includes model data of the plurality of target components.
[0047] S200, the graphics processor generates a target image model of the target object according to the target model data, so as to generate a display screen according to the target image model.
[0048] In the display screen generation method provided by the implementation of the present application, the central processing unit sends the model data of multiple target components of the target object to the graphics processing unit at one time, so that the graphics processing unit generates a target image model of the target object according to the target model data, and then generates a display screen according to the target image model. In this way, the number of communications and the amount of communication data between the central processing unit and the graphics processing unit can be effectively reduced, and the load rate of the central processing unit can be reduced, thereby reducing the situation of rendering jams and unrealistic rendered images, and improving the user experience.
[0049] Next, taking the display screen generation system deployed in a vehicle, displaying the screen while the vehicle is driving or parking, and taking the target object to be displayed in the display screen as the vehicle as an example, the display screen generation method provided by the implementation method of the present application is described in detail.
[0050] As mentioned above, if there are multiple vehicle models in the scene reconstruction display screen, data interaction is required based on the CPU and GPU to render each component of each vehicle model and generate multiple different vehicle models to generate the scene reconstruction display screen.
[0051] Therefore, in one implementation of the present application, the CPU determines the target model data of a vehicle (as an example of a target object), the vehicle includes multiple target components, and the target model data of the vehicle includes model data of multiple target components in different states. The CPU can send the model data of multiple target components of the vehicle in different states (that is, the target model data of the vehicle in different states) to the GPU at one time, so that the GPU can render the vehicle model based on the model data of each target component in different states, thereby generating multiple vehicle image models in different states (as an example of the target image model), and then the GPU generates a display screen based on the multiple vehicle image models in different states, so that multiple vehicles in different states can be presented on the display screen. In this way, the CPU can send the model data of multiple target components to the GPU at one time to realize the GPU's rendering of multiple different components of vehicle models in multiple different states, effectively reducing the number of data interactions between the CPU and the GPU, improving the model rendering efficiency, and then improving the display screen generation efficiency.
[0052] In the implementation of the present application, if the target object is a vehicle, the target parts of the target object include body parts, headlight parts, door parts, hood parts and trunk lid parts of the vehicle.
[0053] That is, the display screen generation method provided by the implementation of the present application can perform one-time rendering processing on the vehicle's body parts, headlight parts, door parts, hood parts and trunk lid parts to obtain a complete vehicle model.
[0054] Furthermore, in the implementation of the present application, the model data of multiple target parts include position information of body parts, heading angle information of body parts, color status information of body parts, transparency status information of body parts, headlight status information of headlight parts, door status information of door parts, hood status information of hood parts, and trunk status information of trunk lid parts.
[0055] Exemplarily, the CPU determines position information (e.g., coordinate information) of body parts of the vehicle in the scene reconstruction display screen, heading angle information of the body parts (e.g., angle, front direction, etc.), color status information of the body parts (e.g., normal color, warning color, collision risk color, etc., or white / black, etc.), transparency status information of the body parts (e.g., when other objects block a part of the vehicle, the transparency of the position corresponding to the body part is reduced to 20%, etc.), light status information of the light parts (e.g., brake lights are on, other lights are off, etc.), door status information of the door parts (e.g., the right rear door of the vehicle is in an open state, other doors are in a closed state, etc.), hood status information of the hood parts (e.g., hood is in an open state / hood is in a closed state, etc.), and trunk lid status information of the trunk lid parts (e.g., trunk lid is in an open state / trunk lid is in a closed state, etc.). In this way, the different states of multiple target components of the vehicle can be rendered at one time, without the need to transmit and render model data for each component of the vehicle, which effectively improves the display screen generation performance and reduces the burden on the CPU, thereby providing better effects for the vehicle's screen display in driving or parking scenarios.
[0056] Furthermore, the scene reconstruction display screen includes scene reconstruction data of various types of object models such as vehicles, people, obstacles, etc. Therefore, it is necessary to classify the scene reconstruction data to classify the scene reconstruction data of vehicles, the scene reconstruction data of people, the scene reconstruction data of obstacles, etc., and then perform model rendering processing on each type of object to obtain image models of each type of object in different states.
[0057] Based on this, in another implementation of the present application, the central processing unit determines the target model data of the target object, including: the central processing unit receives scene reconstruction data of the picture to be displayed, classifies the scene reconstruction data, obtains at least one group of first model data corresponding to the target object, and batches the at least one group of first model data to obtain the target model data of the target object.
[0058] Furthermore, if Figure 2 As shown, the central processor includes a data receiving node, a data distribution node and a data processing node. The central processor determines the target model data of the target object specifically including the following steps.
[0059] S110, the data receiving node receives the scene reconstruction data of the picture to be displayed, and sends the scene reconstruction data to the data distributing node.
[0060] Exemplarily, the vehicle's radar, camera and other equipment capture the vehicle's surrounding environment to send scene reconstruction data related to the image to be displayed to a data receiving node. The data receiving node receives the scene reconstruction data, which includes relevant data on objects such as people, vehicles, and obstacles.
[0061] S120, the data distribution node classifies the scene reconstruction data, filters out data corresponding to the target object from the scene reconstruction data, obtains at least one set of first model data corresponding to the target object, and sends the at least one set of first model data to the data processing node.
[0062] Exemplarily, the data distribution node classifies the scene reconstruction data sent by the data receiving node based on a preset classification rule to classify data corresponding to a person (as an example of a target object), data corresponding to a vehicle (as another example of a target object), and data corresponding to an obstacle (as another example of a target object). Further, taking a vehicle as an example, when there is one vehicle, the data corresponding to the vehicle is a set of vehicle model data. When there are multiple vehicles, the data corresponding to the vehicle is multiple sets of vehicle model data, and therefore, the first model data is model data corresponding to multiple sets of vehicles.
[0063] S130: The data processing node performs data batch processing on at least one set of first model data to obtain target model data of the target object.
[0064] Exemplarily, there may be multiple data processing nodes, for example, one data processing node for a person, one data processing node for a vehicle, one data processing node for an obstacle, etc. The data distribution node sends the data corresponding to the person to a data processing node for processing the model data corresponding to the person, sends the data corresponding to the vehicle to a data processing node for processing the model data corresponding to the vehicle, and sends the data corresponding to the obstacle to a data processing node for processing the model data corresponding to the obstacle.
[0065] Taking vehicles as an example, the data processing node performs data batch processing on the first model data of multiple vehicles to obtain target model data of the target object.
[0066] For example, it is necessary to render the door status information of 10 vehicles. The door status information of the first vehicle is that the left front door is open, the door status information of the second vehicle is that the right front door is open, and so on, and the door status information of the tenth vehicle is that the left rear door is open. The data processing node can batch the door status information together to generate a value in the form of [0, 1, ..., 2] to represent the door status of the 10 vehicles.
[0067] Of course, the model data for other target components are batched in the same way, and finally the target model data for the corresponding states of different components of 10 vehicles are generated, and then the target model data are sent to the GPU.
[0068] Furthermore, in the implementation of the present application, when the GPU performs image model rendering processing, it is necessary to obtain the initial model data of the vehicle in advance, and then update the initial model data based on the target model data to be rendered, to obtain target image models corresponding to multiple different states.
[0069] Therefore, in one implementation of the present application, the central processing unit also needs to determine the initial model data of the target object and send the initial model data to the graphics processing unit.
[0070] Exemplarily, a three-dimensional model of the vehicle is pre-constructed, and initial model data of the three-dimensional model is packaged and stored in a central processing unit, which then sends the initial model data to a graphics processor so that the graphics processor generates an image model of the vehicle based on the initial model data when rendering the model.
[0071] In the implementation of the present application, in order to reduce the initial model data of the three-dimensional model, the vehicle three-dimensional model will be pre-processed, for example, using the initial model data that has been batched.
[0072] For example, the three-dimensional models of traffic participants and obstacles in the scene reconstruction display screen (such as the three-dimensional model of the vehicle) are preprocessed so that the initial model data of each three-dimensional model has only one model mesh (that is, the initial model data of the vehicle is in a mesh group to generate a model data file). Furthermore, for vehicle models that need to display different state effects of headlights and doors, additional UV channels can be added to the headlight parts, four doors and two lid parts (that is, door parts, hood parts, and trunk lid parts) (that is, channel addition processing is performed) to distinguish them from the body parts, and vertex colors are added to the headlight parts (that is, vertex color addition processing is performed) to further distinguish between the left front door, left rear door, right front door, right rear door, front hood, and rear hood (that is, trunk lid). In this way, the initial model data of a single mesh that has been batched (that is, the lights, doors, front and rear hoods, and body data are batched) is used to achieve differentiated rendering of opening and closing doors, changing light colors, displaying different light states, and displaying body transparency.
[0073] Furthermore, in the implementation method of the present application, it is also necessary to pre-define the model data that needs to be modified, and instantiate the array definition processing of the model data that needs to be modified, so as to obtain the attribute information of the instantiated array (that is, the target model data) when generating the display screen, and then generate the target image model based on the target model data.
[0074] In the implementation of the present application, based on function interfaces such as glVertexAttribPointer() and glVertexAttribDivisor(), model data such as the position of traffic participants and obstacles (such as vehicles) (that is, the position information of the body parts), the heading angle (that is, the heading angle information of the body parts), the color status (that is, the color status information of the body parts), the four-door and two-lid status (that is, the door status information of the door parts, the hood status information of the hood parts, and the trunk lid status information of the trunk lid parts), the headlight status attributes (that is, the headlight status information of the headlight parts), and whether to reduce the transparency (that is, the transparency status information of the body parts) are defined as instantiated arrays.
[0075] Among them, the position of traffic participants and obstacles (such as vehicles) (that is, the position information of the body parts) is used to indicate the relative position of the vehicle model in the scene reconstruction display screen, the heading angle (that is, the heading angle information of the body parts) is used to indicate the deflection angle of the vehicle model, the color state (that is, the color state information of the body parts) is used to display the color or texture map (such as day and night map) of the traffic participant and obstacle models, the four doors and two lids state (that is, the door state information of the door parts, the hood state information of the hood parts, and the trunk lid state information of the trunk lid parts) is used to display the switch effects of the four doors and two lids, for example, displaying the opening or closing effects of the left front door, left rear door, right front door, right rear door, front hood, and rear hood according to the four doors and two lids state attributes, and the light state attributes (that is, the light state information of the light parts) are used to display the light effects of the vehicle, for example, displaying left turn, right turn or brake light effects according to the light state attributes. These model data can be directly received from the SOA (service-oriented) data captured and transmitted by the camera, and can be directly batched and defined as an instantiated array.
[0076] Whether to reduce transparency (that is, the transparency status information of the vehicle body parts) is determined during driving or parking. The vehicle screen will display a scene reconstruction display screen, which contains a large number of traffic participants and obstacle models. The vehicle camera always looks at the self-vehicle model. Due to the perspective view, when other vehicle models are too close to the self-vehicle model, most of the scene reconstruction display screen information will be blocked. When the height of the other vehicle model is higher than the self-vehicle model and is located behind the self-vehicle model, the blocking is particularly obvious. If the transparency is not reduced, it will affect the driving experience and driving safety. Therefore, the central processor needs to perform ray detection on the other vehicle model to obtain the detection result. If the detection result shows that there is another vehicle that blocks the self-vehicle model, the transparency of the other vehicle is reduced so that the final display screen can clearly display the self-vehicle model. In this way, important information of the scene reconstruction display screen can be avoided from being blocked, thereby providing a better effect for the display of driving or parking scenes.
[0077] Therefore, in the implementation of the present application, the initial model data is obtained by performing channel addition processing and vertex color addition processing on the model data of the initial model of the target object, and performing instantiation array definition processing on the model data corresponding to the target component in the initial model. And the initial model data is model data in a model grid (that is, a single mesh model).
[0078] Further, after the CPU sends the initial model data and the target model data to the GPU, the graphics processor generates a target image model of the target object according to the target model data, including: the graphics processor generates a target image model of the target object according to the initial model data and the target model data.
[0079] Exemplarily, the CPU performs data batching on the first model data to obtain the target model data of the target object, and updates the model data after instantiation array definition processing in the GPU memory through the glBufferSubData() interface, so that the GPU generates multiple target image models in different states according to the updated model data, and performs scene reconstruction display screen drawing to generate the final display screen for display on the vehicle screen. In this way, when drawing the actual display screen, the CPU and GPU can draw multiple image models of the same type with different states through one call.
[0080] Furthermore, in the implementation of the present application, the central processing unit determines the target model data of the target object, including: the central processing unit determines an image material ball, and obtains the target model data based on a vertex shader included in the image material ball.
[0081] For example, an image material ball that supports calling GPU Instancing is pre-written, where the image material ball includes a vertex shader and a fragment shader, etc., and the vertex shader defines and receives the position, heading angle, color status, four-door and two-lid status, and headlight status attributes of traffic participants and obstacles, whether to reduce transparency, and other target model data, and then sends the target model data to the GPU, which processes the target model data and renders the scene reconstruction display screen in real time. In this way, using a plug-in and image material ball that supports GPU Instancing, the scene reconstruction display screen is displayed in real time on the car screen, making the display effect smoother and more efficient.
[0082] The display screen generation method provided by the implementation of this application is mainly to achieve differentiated rendering of the same type of model in multiple different states. Since the data batch processing of the initial model is realized in the three-dimensional modeling stage, the model data of the initial model is in a model grid. In this way, the single mesh model can effectively reduce the communication cost between the CPU and the GPU, reduce the CPU load, and thus optimize the rendering of traffic participants and obstacle models in the field of scene reconstruction. In addition, by updating the instantiated array data through the glBufferSubData() interface, it is possible to generate image models corresponding to different states based on the same model, achieve richer effects, and enhance the user's perception and experience during driving. And by reducing the CPU load, it is possible to better display various traffic participants and obstacles in the scene reconstruction display screen, presenting a more realistic driving environment for users.
[0083] Furthermore, in another implementation of the present application, the display screen generation method provided in the implementation of the present application is actually a high-performance scene reconstruction data optimization display solution, such as Figure 3 As shown, the specific steps include the following steps.
[0084] S310, the CPU receives scene reconstruction data.
[0085] Exemplarily, the vehicle's radar, camera and other equipment capture the vehicle's surrounding environment to send scene reconstruction data related to the image to be displayed to the CPU's data receiving node. The data receiving node receives the scene reconstruction data, which includes relevant data on objects such as people, vehicles, and obstacles.
[0086] S320, the CPU performs data classification, and the same model data is packaged and sent to the corresponding node.
[0087] The data distribution node of the CPU classifies the scene reconstruction data sent by the data receiving node based on preset classification rules to classify the data corresponding to people (as an example of a target object), the data corresponding to vehicles (as another example of a target object), and the data corresponding to obstacles (as another example of a target object), obtains the first model data corresponding to different target objects, and sends the first model data to the data processing node.
[0088] S330, the CPU performs data batch processing, and batches the model's position, status, headlights and other data.
[0089] The data processing node of the exemplary CPU performs data batch processing on the first model data of multiple target objects to obtain target model data of the target objects.
[0090] S340, the CPU updates the model data in the GPU memory through the glBufferSubData() interface.
[0091] Exemplarily, the CPU updates the model data after instantiation array definition processing in the GPU memory through the glBufferSubData() interface.
[0092] S350: The GPU draws the scene reconstruction data on the vehicle screen based on the updated model data to generate a scene reconstruction display screen.
[0093] Exemplarily, the GPU generates a plurality of target image models in different states according to the updated model data, and performs scene reconstruction display screen drawing to generate a final display screen for display on the vehicle screen.
[0094] The display screen generation method provided by the implementation of the present application, in order to optimize the display effect and reduce the CPU load, batches the model data of the initial model of the target object, so that the model data of the headlights, doors, front and rear hoods, body and other parts are batched into a group of single mesh grid data during 3D modeling. During rendering, only the different positions, color states, four doors and two hood states, headlight states, whether to reduce transparency and other target model data of the same model at a certain moment need to be sorted and packaged, and sent to the GPU for screen drawing at one time. In this way, only one communication is required between the CPU and the GPU to draw all the different states of a model, which can improve performance and reduce the burden on the CPU, thereby providing better effects for the display of driving or parking scenes.
[0095] Furthermore, if Figure 4 As shown, the display screen generation method provided by the implementation of the present application also includes the following steps.
[0096] S410, the data receiving node of the CPU receives the scene reconstruction data, and transmits the scene reconstruction data to the data classification node (ie, the data distribution node).
[0097] S420, the data classification node of the CPU performs classification processing on the data, and transmits the classified data to the GPUInstanced node (ie, the data processing node).
[0098] Exemplarily, the data classification node filters out data corresponding to the target object from the scene reconstruction data, obtains at least one set of first model data corresponding to the target object, and sends the first model data to the data processing node.
[0099] S430, the GPUInstanced node (ie, the data processing node) of the CPU is initialized based on the glBufferData() interface and applies for memory space in advance.
[0100] Exemplarily, the GPUInstanced node of the CPU is initialized based on the glBufferData() interface, and applies for memory space from the GPU in advance to store the target model data.
[0101] S440, the GPUInstanced node of the CPU performs data batch processing.
[0102] Exemplarily, the data processing node performs data batch processing on the first model data to obtain target model data of the target object.
[0103] S450, the GPUInstanced node of the CPU updates the model data in the GPU memory based on the glBufferSubData() interface.
[0104] S460, the GPUInstanced node of the CPU makes a call based on the glDrawElementsinstanced() interface to draw multiple identical models with different states.
[0105] S470: GPU draws the scene reconstruction model, generates a display image, and displays it on the screen.
[0106] The display screen generation method provided by the implementation of the present application mainly relates to the fields of computer graphics and screen rendering technology, and in particular to the application of data batching and instantiation array definition of model data. By optimizing the image model rendering process, a large number of image models with the same grid data but different states can be efficiently processed and displayed, which not only improves the rendering performance, but also reduces the memory usage and data processing requirements, avoids repeated data transmission and rendering calls, and greatly improves the rendering performance. In addition, by reducing the number of data interactions and rendering calls between the CPU and the GPU, it is ensured that in a real-time environment, a smoother and more efficient graphics rendering experience is provided for the automotive HMI (Human Machine Interface, also known as the human-machine interface, also known as the car screen) display.
[0107] In the display screen generation method provided by the implementation of the present application, the target object can also be a person, a tree, a road sign, a street lamp, etc. Therefore, the target objects such as a person, a tree, a road sign, a street lamp, etc. can also be rendered at one time in different states to improve the rendering efficiency, thereby improving the display screen generation efficiency.
[0108] In the implementation of the present application, the display screen generation method can also be applied to a cloud server, so that the cloud server deploys a display screen generation system to generate a display screen, and sends the generated display screen to the vehicle so that the vehicle screen displays the display screen.
[0109] Of course, the display screen generation method can also be applied to electronic devices such as mobile phones and computers that need to display images, so that the electronic devices can deploy the display screen generation system, display the image model based on the captured scene, and present the display screen. Figure 5 , Figure 5 The figure shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device may include: a transceiver 121 , a processor 122 , and a memory 123 .
[0110] The processor 122 executes the computer execution instructions stored in the memory, so that the processor 122 executes the technical solution of the display screen generation method in the above embodiment. The processor 122 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital data processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0111] The memory 123 is connected to the processor 122 via a system bus and completes communication between them. The memory 123 is used to store computer program instructions.
[0112] By way of example and not limitation, the memory 123 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 123 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 123 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 123 is a non-volatile solid-state memory. In a particular embodiment, the memory 123 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0113] The transceiver 121 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.
[0114] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0115] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the display screen generation method in the above embodiment.
[0116] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a processor of an electronic device, the processor of the electronic device executes the technical solution of the display screen generation method of the above embodiment.
[0117] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program product, which includes program code. When the program product runs on a processor of an electronic device, the program code is used to enable the processor of the electronic device to execute the steps of the method according to various exemplary implementations of the present application described above in this specification. For example, the electronic device may execute the display screen generation method recorded in the embodiments of the present application.
[0118] The program product may employ any combination of one or more readable media. The readable medium may be a readable data medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0119] The implementation method of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the display screen generation method in the above embodiment.
[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable information processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable information processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable information processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0123] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
[0124] It should be noted that, in addition to the implementation of the present application described in the above-mentioned specific embodiments, those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Although the description of the present application is introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to the implementation. On the contrary, the purpose of introducing the invention in conjunction with the implementation is to cover other options or modifications that may extend based on the claims of the present application. In order to provide an in-depth understanding of the present application, the above description contains many specific details, and the present application may also be implemented without using these details. In addition, in order to avoid confusion or blurring the focus of the present application, some specific details will be omitted in the description. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0125] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0126] Although the present application has been illustrated and described by referring to certain preferred implementations of the present application, it should be understood by those skilled in the art that the above contents are further detailed descriptions of the present application in combination with specific implementations, and it cannot be determined that the specific implementation of the present application is limited to these descriptions. Those skilled in the art may make various changes in form and details, including making several simple deductions or substitutions, without departing from the spirit and scope of the present application.
Claims
1. A method for generating a display screen, characterized in that: Applied to a display screen generation system, the display screen generation system includes a central processing unit and a graphics processing unit, and the method includes: The central processing unit determines target model data of a target object, and sends the target model data to the graphics processing unit, wherein the target object includes a plurality of target components, and the target model data includes model data of the plurality of target components; The graphics processor generates a target image model of the target object according to the target model data, so as to generate a display screen according to the target image model.
2. The display screen generation method according to claim 1, characterized in that: The model data of the plurality of target components are model data of the plurality of target components in different states.
3. The display screen generation method according to claim 2, characterized in that: The central processing unit determines target model data of the target object, including: The central processing unit receives scene reconstruction data of a to-be-displayed picture, classifies the scene reconstruction data to obtain at least one set of first model data corresponding to the target object, and batches the at least one set of first model data to obtain the target model data of the target object.
4. The display screen generation method according to claim 3, characterized in that: The central processor includes a data receiving node, a data distribution node and a data processing node. The central processor receives scene reconstruction data of a to-be-displayed picture, classifies the scene reconstruction data, obtains at least one set of first model data corresponding to the target object, and performs data batch processing on the at least one set of first model data to obtain the target model data of the target object, including: The data receiving node receives scene reconstruction data of a picture to be displayed, and sends the scene reconstruction data to the data distributing node; The data distribution node classifies the scene reconstruction data, filters out data corresponding to the target object from the scene reconstruction data, obtains at least one set of first model data corresponding to the target object, and sends the at least one set of first model data to the data processing node; The data processing node performs data batch processing on the at least one set of first model data to obtain the target model data of the target object.
5. The display screen generation method according to any one of claims 1 to 4, characterized in that: The method further comprises: The central processing unit determines initial model data of the target object, and sends the initial model data to the graphics processing unit; The graphics processor generates a target image model of the target object according to the target model data, including: The graphics processor generates the target image model of the target object according to the initial model data and the target model data.
6. The display screen generation method according to claim 5, characterized in that: The initial model data is model data obtained by performing channel adding processing and vertex color adding processing on the model data of the initial model of the target object, and performing instantiation array definition processing on the model data corresponding to the target component in the initial model.
7. The display screen generation method according to claim 6, characterized in that: The initial model data is model data in a model grid.
8. The display screen generation method according to any one of claims 1 to 7, characterized in that: The central processing unit determines target model data of the target object, including: The central processing unit determines an image material ball, and obtains the target model data based on a vertex shader included in the image material ball.
9. The display screen generation method according to any one of claims 1 to 8, characterized in that: If the target object is a vehicle, the target parts of the target object include a body part, a lamp part, a door part, a hood part, and a trunk lid part of the vehicle.
10. The display screen generation method according to claim 9, characterized in that: The model data of the multiple target components include position information of the body component, heading angle information of the body component, color status information of the body component, transparency status information of the body component, light status information of the light component, door status information of the door component, hood status information of the hood component, and trunk lid status information of the trunk lid component.
11. A display screen generation system, characterized in that: include: The display screen generation system includes a central processing unit and a graphics processing unit, wherein The central processing unit is used to determine target model data of a target object, and send the target model data to the graphics processing unit, wherein the target object includes a plurality of target components, and the target model data includes model data of the plurality of target components; The graphics processor is used to generate a target image model of the target object according to the target model data, so as to generate a display screen according to the target image model.