CN114327790A - Rendering method of Android container based on Linux system - Google Patents

Rendering method of Android container based on Linux system Download PDF

Info

Publication number
CN114327790A
CN114327790A CN202210019058.5A CN202210019058A CN114327790A CN 114327790 A CN114327790 A CN 114327790A CN 202210019058 A CN202210019058 A CN 202210019058A CN 114327790 A CN114327790 A CN 114327790A
Authority
CN
China
Prior art keywords
rendering
camera
android container
application
configuring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210019058.5A
Other languages
Chinese (zh)
Inventor
李瑞亮
雷小刚
郭建君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Weiling Times Technology Co Ltd
Original Assignee
Beijing Weiling Times Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Weiling Times Technology Co Ltd filed Critical Beijing Weiling Times Technology Co Ltd
Priority to CN202210019058.5A priority Critical patent/CN114327790A/en
Publication of CN114327790A publication Critical patent/CN114327790A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the disclosure provides a rendering method, a rendering device, rendering equipment and a computer-readable storage medium based on an Android container of a Linux system. The method comprises the steps of obtaining application requirements stored in an Android container, and configuring at least one Camera; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application; receiving rendering materials and corresponding rendering instructions sent by the applications in the Android container; and based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, performing parallel rendering on the image and/or video information in the display card corresponding to each Camera. In this way, the rendering efficiency of the image is improved.

Description

Rendering method of Android container based on Linux system
Technical Field
Embodiments of the present disclosure relate generally to the field of data processing, and more particularly, to a rendering method, apparatus, device, and computer-readable storage medium based on a Linux system Android container.
Background
Many natural graphs in nature exist and change in a very complex and irregular manner, and with the acceleration of computer virtualization, visualization and rapid computing processes, the scale of graph data processing is getting larger and larger, and the requirements for rendering performance and quality are rising rapidly, and the method has become a bottleneck in game engine technology. Today, game scenes are increasingly complicated and the scale is huge, generated mass data enter the computing era of parallel processing, the method for improving the rendering performance and the quality by simply increasing the number of graphics processors is not a good method, and the optimization method for improving the real-time rendering performance and the quality of the graphics is worthy of research.
Disclosure of Invention
According to the embodiment of the disclosure, a rendering scheme based on an Android container of a Linux system is provided.
In a first aspect of the disclosure, a rendering method based on an Android container in a Linux system is provided. The method comprises the following steps:
acquiring application requirements stored in an Android container, and configuring at least one Camera; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application;
receiving rendering materials and corresponding rendering instructions sent by the applications in the Android container; and based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, performing parallel rendering on the image and/or video information in the display card corresponding to each Camera.
Further, the obtaining of the application requirements stored in the Android container and the configuring of the at least one Camera include:
and configuring Camera according to the running scene of the application.
Further, the configuring Camera according to the running scene of the application includes:
if the application scene is VR, configuring 2 cameras in the Android container;
and if the application scene is a multi-user scene, respectively configuring one Camera for each user in the Android container.
Further, the air conditioner is provided with a fan,
one graphics card resource may carry one or more cameras.
Further, the parallel rendering of the image and/or video information in the display card corresponding to each Camera includes:
encoding the image and/or video information in the Android container;
and sending the encoded data to a graphics renderer in the Linux system, and decoding the encoded data by the graphics renderer to execute rendering operation.
Further, the graphics renderer decodes the encoded data, and performing rendering operations includes:
and the graphics renderer sends the decoded data to the allocated display card resources, and the rendering operation is executed in parallel through the corresponding display cards.
Further, the air conditioner is provided with a fan,
and after all the display cards finish rendering one frame, issuing a rendering instruction of the next frame through the graphics renderer.
In a second aspect of the disclosure, a rendering device based on an Android container of a Linux system is provided. The device includes:
the acquisition module is used for acquiring application requirements stored in the Android container and configuring at least one Camera; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application;
the rendering module is used for receiving rendering materials and corresponding rendering instructions sent by the applications in the Android container; and based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, performing parallel rendering on the image and/or video information in the display card corresponding to each Camera.
In a third aspect of the disclosure, an electronic device is provided. The electronic device includes: a memory having a computer program stored thereon and a processor implementing the method as described above when executing the program.
In a fourth aspect of the present disclosure, a computer readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, implements a method as in accordance with the first aspect of the present disclosure.
According to the rendering method based on the Linux system Android container, at least one Camera is configured by acquiring the application requirement stored in the Android container; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application; receiving rendering materials and corresponding rendering instructions sent by the applications in the Android container; based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, the image and/or video information is rendered in parallel in the display card corresponding to each Camera, so that the Android container can directly send the rendering instruction and the data to the graphics hardware of the Linux operating system for rendering, a plurality of display cards can simultaneously provide the same Android container with the capability of synchronous real-time rendering, and the graphics rendering requirement of a higher frame rate is met.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
FIG. 1 illustrates a schematic diagram of an exemplary operating environment in which embodiments of the present disclosure can be implemented;
fig. 2 illustrates a flowchart of a Linux system Android container based rendering method according to an embodiment of the present disclosure;
fig. 3 illustrates a block diagram of a Linux system Android container based rendering apparatus according to an embodiment of the present disclosure;
FIG. 4 illustrates a block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
FIG. 1 shows a schematic diagram of an application framework 100 in which embodiments of the present disclosure can be implemented. The framework 100 comprises an Android system, a Wayland, a pulseAudio and a Linux kernel, wherein the Android container and the Linux host operating system share a kernel, the pulseAudio is a cross-platform voice service which can work through a network on the host operating system, and the Andriod container interacts with audio hardware of the host system through the Android container. It should be noted that Wayland is a set of communication protocol between the display server and the client, and when the device is used in the architecture, the Wayland composer can be used as the display server, so that the client and the Wayland composer can directly communicate. Wayland can be used on both traditional desktops and mobile devices, with more and more windows and graphics systems beginning to be compatible with the Wayland protocol. Wayland realizes a set of libraries for communication between display servers and clients based on domain socket, and defines a set of extensible communication protocols in an XML form. This protocol is divided into the Wayland core protocol and the extension protocol.
The noun explains:
linux Server (Host) refers to a Server running a Linux operating system;
android System Container (Guest) which is a Container running on the linux System, contains an Andorid running environment and can run Android applications;
the Hardware Graphics renderer operates on Host, can use a display card on a server to perform Hardware accelerated rendering, receives rendering material data and rendering instructions sent by Guest, and performs rendering operation.
Fig. 2 shows a flowchart of a rendering method based on a Linux system Android container according to an embodiment of the present disclosure, including:
s210, acquiring application requirements stored in an Android container, and configuring at least one Camera; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application;
in some embodiments, a requirement of an application in a Guest android container is received, and at least one Camera is set according to an operation scene of the application;
if the application scene is VR, configuring 2 cameras in the Android container;
if the application scene is a multi-user scene, configuring a Camera for each user in the Android container; the Camera is used for capturing images and/or video information in the running process of the application.
In some embodiments, Camera information sent by an application in Guest is received, and a display card is allocated to Camera according to performance requirements (one display card can carry one or more cameras); the display card is used for rendering operation for the Camera.
S220, receiving rendering materials and corresponding rendering instructions sent by the applications in the Android container; and based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, performing parallel rendering on the image and/or video information in the display card corresponding to each Camera.
In some embodiments, rendering materials (texture data and the like) and corresponding rendering instructions sent by an application in the Android container are received, and video memory resources are allocated and filled in an allocated video card;
further, according to the position, angle and other information of each Camera, different rendering operations are executed on each display card;
rendering is carried out on a VR scene through two display cards, wherein one display card is used for rendering a left-eye picture, and the other display card is used for rendering a right-eye picture; namely, based on the different characteristics of the pictures seen by the left and right eyes in the VR application, the rendering material is simultaneously loaded on the two display cards, and the left and right eye pictures are respectively rendered on the two display cards.
Aiming at a multi-user scene, each Camera renders different pictures seen by each user;
if the application is a 3D game, game pictures of a first person perspective, a third person perspective, or other angles of fighting perspectives and the like can be rendered at the same time;
if the application is a 3D virtual stage, pictures with various viewing angles can be rendered at the same time.
In particular, the amount of the solvent to be used,
encoding the image and/or video information in the Android container;
and sending the coded data to a graphics renderer in the Linux system, decoding the coded data by the graphics renderer, sending the decoded data to the allocated display card resources, and executing rendering operation in parallel through the corresponding display cards.
Further, still include:
and after all the display cards finish rendering one frame, issuing a rendering instruction of the next frame through the graphics renderer.
According to the embodiment of the disclosure, the following technical effects are achieved:
for the scenario of "running an android application on a server", since no server graphics card and driver are available in the market at the present time for direct loading and use in Guest, in order to use the hardware graphics acceleration capability of the graphics card on the server, a Render needs to be run in a server Host system for graphics rendering, and in the Guest system in a container, rendering material data and rendering commands are encoded, and then the encoded rendering material data and rendering commands are transmitted to the Render in the Host and decoded by the Render to perform rendering operation.
In the invention, all rendering material data and rendering instructions used by the applications in Guest are decoded and distributed to a GPU (graphics card) through a Render, so that the Render can conveniently distribute rendering resources to a plurality of graphics cards at the same time and Render on a plurality of graphics cards at the same time. The Android container can directly send rendering instructions and data to the graphics hardware of the Linux operating system for rendering, so that a plurality of display cards can simultaneously provide the capability of synchronous real-time rendering for the same Android container, and the graphics rendering requirement of a higher frame rate is met.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that acts and modules referred to are not necessarily required by the disclosure.
The above is a description of embodiments of the method, and the embodiments of the apparatus are further described below.
Fig. 3 illustrates a block diagram of a Linux system Android container based rendering apparatus 300 according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus 300 includes:
an obtaining module 310, configured to obtain an application requirement stored in an Android container, and configure at least one Camera; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application;
the rendering module 320 is configured to receive rendering materials and corresponding rendering instructions sent by the applications in the Android container; and based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, performing parallel rendering on the image and/or video information in the display card corresponding to each Camera.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 4 shows a schematic block diagram of an electronic device 400 that may be used to implement embodiments of the present disclosure. As shown, device 400 includes a Central Processing Unit (CPU) 401 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 402 or loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, or the like; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408 such as a magnetic disk, optical disk, or the like; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Processing unit 401 performs various methods and processes described above, such as method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by CPU 401, one or more steps of method 200 described above may be performed. Alternatively, in other embodiments, the CPU 401 may be configured to perform the method 200 in any other suitable manner (e.g., by way of firmware).
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System On Chip (SOCs), load programmable logic devices (CPLDs), and the like.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A rendering method based on an Android container of a Linux system is characterized by comprising the following steps:
acquiring application requirements stored in an Android container, and configuring at least one Camera; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application;
receiving rendering materials and corresponding rendering instructions sent by the applications in the Android container; and based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, performing parallel rendering on the image and/or video information in the display card corresponding to each Camera.
2. The method according to claim 1, wherein the obtaining the application requirements stored in the Android container, and the configuring at least one Camera comprises:
and configuring Camera according to the running scene of the application.
3. The method of claim 2, wherein configuring Camera according to the running scene of the application comprises:
if the application scene is VR, configuring 2 cameras in the Android container;
and if the application scene is a multi-user scene, respectively configuring one Camera for each user in the Android container.
4. The method of claim 3,
one graphics card resource may carry one or more cameras.
5. The method of claim 4, wherein the parallel rendering of the image and/or video information in the graphics card corresponding to each Camera comprises:
encoding the image and/or video information in the Android container;
and sending the encoded data to a graphics renderer in the Linux system, and decoding the encoded data by the graphics renderer to execute rendering operation.
6. The method of claim 5, wherein the graphics renderer decodes the encoded data, and wherein performing the rendering operation comprises:
and the graphics renderer sends the decoded data to the allocated display card resources, and the rendering operation is executed in parallel through the corresponding display cards.
7. The method of claim 6,
and after all the display cards finish rendering one frame, issuing a rendering instruction of the next frame through the graphics renderer.
8. The rendering device based on the Linux system Android container is characterized by comprising:
the acquisition module is used for acquiring application requirements stored in the Android container and configuring at least one Camera; simultaneously distributing display card resources for the Camera; the Camera is used for capturing images and/or video information in the running process of the application;
the rendering module is used for receiving rendering materials and corresponding rendering instructions sent by the applications in the Android container; and based on the rendering material, the corresponding rendering instruction and the position and angle information of each Camera, performing parallel rendering on the image and/or video information in the display card corresponding to each Camera.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202210019058.5A 2022-01-10 2022-01-10 Rendering method of Android container based on Linux system Pending CN114327790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210019058.5A CN114327790A (en) 2022-01-10 2022-01-10 Rendering method of Android container based on Linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210019058.5A CN114327790A (en) 2022-01-10 2022-01-10 Rendering method of Android container based on Linux system

Publications (1)

Publication Number Publication Date
CN114327790A true CN114327790A (en) 2022-04-12

Family

ID=81025342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210019058.5A Pending CN114327790A (en) 2022-01-10 2022-01-10 Rendering method of Android container based on Linux system

Country Status (1)

Country Link
CN (1) CN114327790A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117149341A (en) * 2023-10-31 2023-12-01 成都阿加犀智能科技有限公司 Method, device, equipment and medium for displaying Linux GUI program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117149341A (en) * 2023-10-31 2023-12-01 成都阿加犀智能科技有限公司 Method, device, equipment and medium for displaying Linux GUI program
CN117149341B (en) * 2023-10-31 2024-01-05 成都阿加犀智能科技有限公司 Method, device, equipment and medium for displaying Linux GUI program

Similar Documents

Publication Publication Date Title
US10354430B2 (en) Image update method, system, and apparatus
WO2020228511A1 (en) Image occlusion processing method, device, apparatus and computer storage medium
US20180084292A1 (en) Web-based live broadcast
US20170323418A1 (en) Virtualized gpu in a virtual machine environment
US10679426B2 (en) Method and apparatus for processing display data
US10002403B2 (en) Command remoting
US20240096007A1 (en) Rendering Method, Device, and System
CN108762934B (en) Remote graphic transmission system and method and cloud server
CN109829964B (en) Web augmented reality rendering method and device
EP3975126A1 (en) Method and system for cloud-native 3d-scene game
CN112057851A (en) Multi-display-card-based real-time rendering method for single-frame picture
CN113457160A (en) Data processing method and device, electronic equipment and computer readable storage medium
US20190317795A1 (en) Memory access method for use in multi-operating systems and electronic device
CN104765636B (en) A kind of synthetic method and device of remote desktop image
CN112316433A (en) Game picture rendering method, device, server and storage medium
US20150317765A1 (en) Deep image data compression
CN112423111A (en) Graphic engine and graphic processing method suitable for player
US10929079B2 (en) Video display method, electronic device and computer program product
CN114327790A (en) Rendering method of Android container based on Linux system
US20180285129A1 (en) Systems and methods for providing computer interface interaction in a virtualized environment
CN111462289B (en) Image rendering method, device and system
US20170109113A1 (en) Remote Image Projection Method, Sever And Client Device
CN114077489A (en) Model loading method and related device
US10616559B1 (en) Virtual stereo device redirection for virtual desktops
CN115861510A (en) Object rendering method, device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination