CN114022344A - Linux server-based Android container rendering resource sharing method and device - Google Patents

Linux server-based Android container rendering resource sharing method and device Download PDF

Info

Publication number
CN114022344A
CN114022344A CN202210019061.7A CN202210019061A CN114022344A CN 114022344 A CN114022344 A CN 114022344A CN 202210019061 A CN202210019061 A CN 202210019061A CN 114022344 A CN114022344 A CN 114022344A
Authority
CN
China
Prior art keywords
rendering object
rendering
android
container
android container
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.)
Granted
Application number
CN202210019061.7A
Other languages
Chinese (zh)
Other versions
CN114022344B (en
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 CN202210019061.7A priority Critical patent/CN114022344B/en
Publication of CN114022344A publication Critical patent/CN114022344A/en
Application granted granted Critical
Publication of CN114022344B publication Critical patent/CN114022344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides an Android container rendering resource sharing method and device based on a Linux server, and relates to the technical field of internet. The method comprises the following steps: acquiring a first rendering object generated by a target application in a first android container, generating a second rendering object according to the first rendering object, and loading the second rendering object to a video memory; updating a rendering object information list according to the first rendering object and the second rendering object; subsequently, directly applying a second rendering object in the video memory according to the rendering instruction; acquiring a third rendering object generated by the target application in the second android container; updating the rendering object information list according to the second rendering object and the third rendering object; and then directly applying the second rendering object in the video memory according to the rendering instruction. The application can improve the same application of operation in a plurality of android containers, generate same resource and can all exist in the GPU video memory, lead to the problem of the waste of resource, reach and reduce the video memory redundant data, promote the availability factor's of video memory effect.

Description

Linux server-based Android container rendering resource sharing method and device
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to an Android container rendering resource sharing method and device based on a Linux server.
Background
Currently, three-dimensional modeling and virtual reality rendering mostly focus on large-scale industry fields such as movie special effects, game development or real estate. For a rendering program system, it is necessary to continuously operate related hardware such as a Graphics Processing Unit (GPU), a memory, a Central Processing Unit (CPU), and the like through code to complete rendering. Thus, the more resources that are invoked to accomplish the same task, the less efficient the performance. In other words, an excellent system is a system with high resource utilization.
In the process of implementing the invention, the inventor finds that the same resources generated by running the same application in a plurality of Android (Android) containers are all stored in the GPU video memory, which causes resource waste.
Disclosure of Invention
The embodiment of the application provides an Android container rendering resource sharing method and device based on a Linux server, which can solve the problem that the same application runs in a plurality of Android containers, and the same generated resources all exist in a GPU (graphics processing unit) video memory, so that the resources are wasted.
In a first aspect of the application, a Linux server-based Android container rendering resource sharing method is provided, and includes:
the method comprises the steps of obtaining a first rendering object generated by a target application in a first android container, wherein the first android container is any one of a plurality of android containers, and the target application is the same application running in the plurality of android containers;
generating a second rendering object according to the first rendering object, and loading the second rendering object to a video memory;
associating the first rendering object with the second rendering object to obtain first association information;
updating the first associated information to a rendering object information list;
based on a rendering object information list of updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the first android container after the first rendering object, and directly applying the second rendering object in the video memory;
acquiring a third rendering object generated by a target application in a second android container, wherein the second android container is any one of a plurality of android containers except the first android container;
updating a rendering object information list according to the second rendering object and the third rendering object;
and based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the second android container after the third rendering object, and directly applying the second rendering object in the video memory.
By adopting the technical scheme, a first rendering object generated by the target application in the first android container is obtained, a second rendering object is generated according to the first rendering object, and the second rendering object is loaded to the video memory; then, the first rendering object and the second rendering object are correlated to obtain first correlation information; updating the first associated information to a rendering object information list; based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the first android container after the first rendering object, and directly applying a second rendering object in the video memory; then, a third rendering object generated by the target application in the second android container is obtained; updating the rendering object information list according to the second rendering object and the third rendering object; based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in a second android container after the third rendering object, and directly applying the second rendering object in the video memory; in sum, the same applications (namely target applications) running in different android containers (namely the first android container and the second android container) share one video memory resource (namely the second rendering object), the problem that the same applications running in a plurality of android containers generate the same resources and all exist in the GPU video memory, so that resource waste is caused can be solved, and the effects of reducing video memory redundant data and improving the use efficiency of the video memory are achieved.
In one possible implementation manner, the method further includes:
traversing each of the other android containers except the first android container and the second android container in the plurality of android containers, obtaining a rendering instruction based on a rendering object information list of the updated associated information, and directly applying the second rendering object in the video memory.
In a possible implementation manner, the generating a second rendering object according to the first rendering object and loading the second rendering object to a video memory includes:
calculating a hash value of the first rendering object when the first rendering object is loaded;
judging whether the first rendering object and the hash value are in a rendering object information list or not;
and if the hash value does not exist, generating a second rendering object according to the hash value, and loading the second rendering object to a video memory.
In a possible implementation manner, the updating the rendering object information list according to the second rendering object and the third rendering object includes:
when the same data in the first android container and the second android container are loaded, associating the second rendering object with the third rendering object to obtain second associated information;
and updating the second associated information to a rendering object information list.
In a second aspect of the present application, there is provided a Linux server-based Android container rendering resource sharing device, including:
the system comprises a first obtaining module, a second obtaining module and a rendering module, wherein the first obtaining module is used for obtaining a first rendering object generated by a target application in a first android container, the first android container is any one of a plurality of android containers, and the target application is the same application running in the plurality of android containers;
the generating module is used for generating a second rendering object according to the first rendering object and loading the second rendering object to a video memory;
the association module is used for associating the first rendering object with the second rendering object to obtain first association information;
a first updating module, configured to update the first association information to a rendering object information list;
the first application module is used for acquiring a rendering instruction of a rendering object generated from a target application in the first android container after the first rendering object based on a rendering object information list for updating the associated information, and directly applying the second rendering object in the video memory;
a second obtaining module, configured to obtain a third rendering object generated by a target application in a second android container, where the second android container is any one of the android containers except for the first android container;
a second updating module, configured to update the rendering object information list according to the second rendering object and the third rendering object;
and the second application module is used for acquiring a rendering instruction of a rendering object generated from a target application in the second android container after the third rendering object based on the rendering object information list of the updated associated information, and directly applying the second rendering object in the video memory.
In one possible implementation manner, the method further includes:
and the traversing module is used for traversing each of the other android containers except the first android container and the second android container in the plurality of android containers, acquiring a rendering instruction based on a rendering object information list for updating the associated information, and directly applying the second rendering object in the video memory.
In one possible implementation, the generating module includes:
a calculating unit, configured to calculate a hash value of the first rendering object when the first rendering object is loaded;
a judging unit, configured to judge whether the first rendering object and the hash value are in a rendering object information list;
and the generating unit is used for generating a second rendering object according to the hash value if the second rendering object does not exist, and loading the second rendering object to the video memory.
In one possible implementation, the second updating module includes:
the association unit is used for associating the second rendering object with the third rendering object when the same data in the first android container and the second android container are loaded to obtain second association information;
and the updating unit is used for updating the second associated information into a rendering object information list.
In a third aspect of the present application, a Linux server-based Android container rendering resource sharing system is provided, including: a Linux server;
the Linux server comprises:
a plurality of android containers for running a target application;
the renderer is connected with the android containers and used for receiving rendering objects and rendering instructions generated by the target application and rendering the rendering objects;
the video memory is connected with the renderer and used for loading the data of the rendering object;
and the network interface controller is used for building association with the outside.
In one possible implementation manner, the method further includes: a user client and a target application management platform;
the Linux server is connected with the network interface controller, the user client is connected with the network interface controller, and the target application management platform is connected with the network interface controller.
It should be understood that what is described in this summary section is not intended to limit key or critical features of the embodiments of the application, nor is it intended to limit the scope of the application. Other features of the present application will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present application 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 shows a structure diagram of an Android container rendering resource sharing system based on a Linux server in an embodiment of the present application.
Fig. 2 shows a flowchart of a Linux server-based Android container rendering resource sharing method in an embodiment of the present application.
Fig. 3 shows a schematic diagram of resource sharing of rendering by a first android container and a second android container in an embodiment of the present application.
Fig. 4 shows a structure diagram of an Android container rendering resource sharing device based on a Linux server in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The Android container rendering resource sharing method based on the Linux server can be applied to the technical field of the Internet.
Fig. 1 shows a structure diagram of an Android container rendering resource sharing system based on a Linux server in an embodiment of the present application. Referring to fig. 1, the Linux server-based Android container rendering resource sharing system in the present embodiment includes a Linux server 1. The Linux server 1 comprises an Android system container set 13, a renderer, a video memory and a network interface controller 14.
In the embodiment of the present application, the Android system container set 13 includes a plurality of Android containers, and is used for running the target application. The renderer is connected with the android containers and used for receiving rendering objects and rendering instructions generated by the target application and rendering the rendering objects. The video memory is connected with the renderer and used for loading data of rendering objects. The network interface controller 14 is used to build an association with the outside world.
In the embodiment of the application, an Android system container (Android container) includes an Android running environment, that is, a Guest end, where applications to be rendered, including game applications and non-game applications, run in the Android container.
In the embodiment of the application, the plurality of android containers include, but are not limited to, a first android container and a second android container, and the target application is the same application running in the first android container and the second android container. Target applications in the first android container and the second android container are connected with the renderer.
Optionally, the renderer is a shared hardware graphics renderer (Render).
In the embodiment of the application, the shared hardware graphics renderer operates at the Host end of the Linux server 1, can perform graphics acceleration by using a hardware display card of the Linux server 1, and is responsible for receiving a rendering instruction and rendering material data sent by a Guest account (Guest) to perform rendering operation.
In the embodiment of the present application, the shared hardware graphics renderer is in the Android container server 12, and the Android container server 12 further includes an audio encoder, an RTC stack, and a hardware video encoder. The video memory is a GPU video memory 15, and a shared hardware graphics renderer in the Android container server 12 is connected to the GPU video memory 15 through a hardware video encoder, so that the shared hardware graphics renderer receives a rendering object and a rendering instruction generated by a target application, and establishes a connection with the GPU video memory 15.
In the embodiment of the application, the RTC stack in the Android container server is connected to the network interface controller 14, so that the Linux server 1 is associated with the outside. The Android container server 12 is also connected with the Android container manager 11, so that the Android container manager 11 manages each Android container in the Linux server 1.
In some embodiments, the system further comprises: a user client 3 and a target application management platform 2.
The Linux server 1 is connected with the network interface controller 14, the user client 3 is connected with the network interface controller 14, and the target application management platform 2 is connected with the network interface controller 14.
In the embodiment of the present application, the Linux server 1, the user client 3 and the target application management platform 2 are connected through the network interface controller 14. The user client 3 includes a mobile phone, a tablet computer, a notebook computer, an intelligent television and a desktop computer. The target application management platform 2 includes a game management platform and a non-game application management platform.
Fig. 2 shows a flowchart of a Linux server-based Android container rendering resource sharing method in an embodiment of the present application. Referring to fig. 2, the method for sharing Android container rendering resources based on a Linux server in this embodiment includes:
step 201: the method includes the steps that a first rendering object generated by target application in a first android container is obtained, the first android container is any one of a plurality of android containers, and the target application is the same application running in the plurality of android containers.
In the embodiment of the application, the target application in the first android container sends a rendering instruction to the Render, and after the Render acquires the rendering instruction, the Render generates the name of the first rendering object according to the rendering instruction and sends the name to the target application. After receiving the name, the target application sends rendering data (a first rendering object, i.e., rendering material) to the Render through the high-speed communication pipe. The target application is an application needing rendering processing, and comprises a game application and a non-game application.
Optionally, the game application is selected as the target application.
In the embodiment of the present application, the rendering objects (rendering resources) generated by the game application include geometry, viewpoint, texture, and lighting information.
In the embodiment of the application, the Android container rendering resource sharing method based on the Linux server is specifically described by selecting texture resources (texture objects) as rendering objects.
In an embodiment of the application, a first texture object (first rendering object) generated by a game application within a first android container. The first texture object (first render object) is an original texture object that is directly generated by the game application within the first android container. The Render acquires a first texture object (first Render object). The retrieved first texture object (first render object) is used to generate a second texture object (second render object).
Step 202: and generating a second rendering object according to the first rendering object, and loading the second rendering object to a video memory.
In the embodiment of the application, the second rendering object is a shared rendering object processed by an Android container rendering resource sharing system based on a Linux server. The Render will generate a second Render object and load the data of the second Render object.
In the embodiment of the application, the data of the shared rendering object is loaded in the GPU video memory, so that the same rendering object reproduced according to the target application can be conveniently applied. Only one copy of data of the shared rendering object is stored in the GPU video memory. And subsequently, when the game application in the first android container generates the same first rendering object and the same rendering data resource needs to be acquired, the regenerated data of the same rendering object is the directly-called data of the shared rendering object.
Step 203: and associating the first rendering object with the second rendering object to obtain first association information.
In the embodiment of the present application, data of a name in a first rendering object is associated with data of a name in a second rendering object, and a hash value corresponding to rendering data in the first rendering object is associated with a hash value corresponding to rendering data in the second rendering object, so as to obtain association information (i.e., first association information) in which the rendering objects and the hash values are in one-to-one correspondence.
Step 204: and updating the first associated information into a rendering object information list.
In an embodiment of the present application, the rendering object information list includes a rendering object name and a hash value. And updating the first associated information into the rendering object information list, namely updating the name data and the hash value of the first rendering object and the name data and the hash value of the second rendering object into the rendering object information list.
For example, a first rendering object is denoted by a, and the calculated hash value of the rendering data in the first rendering object is denoted by a 1; the second rendering object is denoted by B, and the calculated hash value of the rendering data in the second rendering object is denoted by B1, the rendering object information list is shown in table 1:
table 1: rendering object information list
Rendering an object Value of Hig
A A1
B B1
…… ……
Wherein a1 is the same hash value as B1 because the second rendering object is generated from the first rendering object and associates the first rendering object and the second rendering object.
Step 205: and based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the first android container after the first rendering object, and directly applying the second rendering object in the video memory.
In an embodiment of the present application, the rendering instructions are read-only rendering instructions. After the target application in the first android container generates the first rendering object, the rendering object generated after the first rendering object needs to be rendered, and when the target application in the first android container sends all rendering instructions for referring to the first rendering object, because the data in the first rendering object is the same as the data in the second rendering object and the corresponding hash values are also the same, the target application can directly apply the second rendering object in the video memory.
Step 206: and acquiring a third rendering object generated by the target application in a second android container, wherein the second android container is any one of the plurality of android containers except the first android container.
In this embodiment of the application, the target application in the second android container and the target application in the first android container are the same application, that is, the same application in a plurality of android containers is run.
And acquiring a third rendering object by a shared hardware graphics renderer in the Android container rendering resource sharing system based on the Linux server. And the acquired third rendering object is used for updating the rendering object information list.
Step 207: and updating a rendering object information list according to the second rendering object and the third rendering object.
In this embodiment of the present application, a third rendering object is denoted by C, and a calculated hash value of rendering data in the third rendering object is denoted by C1, so that an updated rendering object information list is shown in table 2:
table 2: updated rendering object information list
Rendering an object Value of Hig
A A1
B B1
C C1
…… ……
In the processed data, the data in the third rendering object and the resource loaded by the second rendering object are the same rendering data, and the hash value calculated according to the rendering data is also the same, so that the shared hardware graphics renderer can obtain the information of the hash value in the rendering object information list.
Step 208: and based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the second android container after the third rendering object, and directly applying the second rendering object in the video memory.
In an embodiment of the present application, the rendering instructions are read-only rendering instructions. After the target application in the second android container generates the third rendering object, the rendering object generated after the third rendering object needs to be rendered, and when the target application in the second android container sends out all rendering instructions for referring to the third rendering object, because the data in the third rendering object is the same as the data in the second rendering object and the corresponding hash values are also the same, the target application can directly apply the second rendering object in the video memory.
At this time, the shared hardware graphics renderer no longer loads the data in the third rendering object into the video memory, but selects to add the association relationship between the third rendering object and the second rendering object to the rendering object information list, and updates the rendering object information list.
Fig. 3 shows a schematic diagram of resource sharing of rendering by a first android container and a second android container in an embodiment of the present application. Referring to fig. 3, it should be noted that, in steps 201 to 208, rendering objects generated in multiple android containers processed are all common resources of the target application.
In the embodiment of the application, the unique resources of each of the first android container and the second android container are still stored in the GPU video memory, and resource sharing processing is not performed on the unique resources, but only on the same data (i.e., shared resources in the android container) in the first android container and the second android container.
By adopting the technical scheme, a first rendering object generated by the target application in the first android container is obtained, a second rendering object is generated according to the first rendering object, and the second rendering object is loaded to the video memory; then, the first rendering object and the second rendering object are correlated to obtain first correlation information; updating the first associated information to a rendering object information list; based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the first android container after the first rendering object, and directly applying a second rendering object in the video memory; then, a third rendering object generated by the target application in the second android container is obtained; updating the rendering object information list according to the second rendering object and the third rendering object; based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in a second android container after the third rendering object, and directly applying the second rendering object in the video memory; in sum, the same applications (namely target applications) running in different android containers (namely the first android container and the second android container) share one video memory resource (namely the second rendering object), the problem that the same applications running in a plurality of android containers generate the same resources and all exist in the GPU video memory, so that resource waste is caused can be solved, and the effects of reducing video memory redundant data and improving the use efficiency of the video memory are achieved.
In some embodiments, the method further comprises: step 109.
Step 109: traversing each of the other android containers except the first android container and the second android container in the plurality of android containers, obtaining a rendering instruction based on a rendering object information list of the updated associated information, and directly applying the second rendering object in the video memory.
In this embodiment of the application, if the number of the android containers is more than two, the same application (i.e., the target application) running in the other android containers except the first android container and the second android container may directly apply the second rendering object in the video memory.
At this time, the shared hardware graphics renderer does not load data of rendering objects generated by the android containers except the first android container and the second android container into the video memory, but selects to add the association relationship between the rendering objects to the rendering object information list, and updates the rendering object information list.
In some embodiments, step 102 comprises: step a 1-step A3.
Step A1: calculating a hash value of the first rendering object when the first rendering object is loaded.
Step A2: and judging whether the first rendering object and the hash value are in a rendering object information list.
Step A3: and if the hash value does not exist, generating a second rendering object according to the hash value, and loading the second rendering object to a video memory.
In the embodiment of the application, the picture hash algorithm includes a mean hash algorithm, a difference hash algorithm and a perceptual hash algorithm.
Optionally, a hash value of the first rendering data is calculated by using a difference hash algorithm. The specific calculation method is as follows:
and (3) reducing the size: the first rendered object (picture) is shrunk to a size of 8x9 (height x width) so that it has 72 pixels.
And (3) converting into a gray-scale image: and converting the scaled picture into a 256-step gray-scale image.
Calculating a difference value: the dHash algorithm works between adjacent pixels such that 8 different differences are generated between 9 pixels per row, for a total of 8 rows, resulting in 64 difference values.
Obtaining a fingerprint: if the pixel on the left is brighter than the pixel on the right, a1 is recorded, otherwise a 0 is recorded.
The embodiment of the application also comprises the following steps: if the first rendering object and the hash value are in the rendering object information list, the renderer directly applies the associated rendering object.
In some embodiments, step 107 comprises: step B1-step B2.
Step B1: and when the same data in the first android container and the second android container are loaded, associating the second rendering object with the third rendering object to obtain second associated information.
Step B2: and updating the second associated information to a rendering object information list.
In the embodiment of the present application, data in the third rendering object is associated with data in the second rendering object, and meanwhile, a hash value corresponding to the data in the third rendering object is associated with a hash value corresponding to the data in the second rendering object, so as to obtain association information (i.e., second association information) in which the rendering objects and the hash values are in one-to-one correspondence.
Next, step 201 to step 208 in the Linux server-based Android container rendering resource sharing method will be described by taking the Texture resource as an example. The specific implementation method comprises the following steps:
a game application within the first android container generates a first texture object.
When texture data is loaded, the hash value of the texture data is calculated.
The renderer looks up in the texture object information list whether the first texture object exists and the information of the hash value.
If so, Render applies the associated Render object directly.
If not, the Render generates a second texture object and loads the texture data normally.
The hash value and information such as the association between the first texture object and the second texture object are recorded in a texture object information list.
And when the subsequent Render executes all read-only rendering instructions which refer to the first texture object and are sent by the first android container, the subsequent Render directly applies the second texture object according to the corresponding relation between the first texture object and the second texture object.
The gaming application within the second android container generates a third texture object.
When the same resource as the texture resource is loaded, because the calculated hash value is the same as the hash value, the Render can find the information of the hash value in the texture object information list, and at this time, the Render no longer loads the texture data into the video memory, but adds the association relationship between the second texture object and the third texture object in the texture object information list.
And when the subsequent Render executes all read-only rendering instructions which refer to the third texture object and are sent by the second android container, directly applying the second texture object according to the corresponding relation between the second texture object and the third texture object.
Through the mode, the hardware graphics renderer (Render, namely the shared hardware graphics renderer) running on the Host end simultaneously provides rendering services for games in a plurality of android containers (Guest), so that rendering resources originally loaded in different game processes are loaded in the same Render process, and then only one part of the same resources can be loaded, and meanwhile, rendering operations are provided for different games, so that one part of video memory resources is shared.
In summary, the Linux server-based Android container rendering resource sharing method can realize that the same application (i.e., the target application) shares one video memory resource.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules referred to are not necessarily required in this application.
The above is a description of method embodiments, and the embodiments of the present application are further described below by way of apparatus embodiments.
Fig. 4 shows a structure diagram of an Android container rendering resource sharing device based on a Linux server according to an embodiment of the present application. Referring to fig. 4, the Linux server-based Android container rendering resource sharing device includes a first obtaining module 401, a generating module 402, an associating module 403, a first updating module 404, a first application module 405, a second obtaining module 406, a second updating module 407, and a second application module 408.
The first obtaining module 401 is configured to obtain a first rendering object generated by a target application in a first android container, where the first android container is any one of a plurality of android containers, and the target application is a same application running in the plurality of android containers.
A generating module 402, configured to generate a second rendering object according to the first rendering object, and load the second rendering object to a video memory.
The associating module 403 is configured to associate the first rendering object with the second rendering object to obtain first association information.
A first updating module 404, configured to update the first association information into a rendering object information list.
A first application module 405, configured to obtain, after the first rendering object, a rendering instruction of a rendering object generated from a target application in the first android container based on a rendering object information list of updated associated information, and directly apply the second rendering object in the video memory.
A second obtaining module 406, configured to obtain a third rendering object generated by the target application in a second android container, where the second android container is any one of the android containers except the first android container.
A second updating module 407, configured to update the rendering object information list according to the second rendering object and the third rendering object.
A second application module 408, configured to obtain, after the third rendering object, a rendering instruction of the rendering object generated from the target application in the second android container based on the rendering object information list with updated associated information, and directly apply the second rendering object in the video memory.
In some embodiments, further comprising:
a traversing module 409, configured to traverse each of the remaining android containers except the first android container and the second android container in the multiple android containers, obtain a rendering instruction based on a rendering object information list of updated associated information, and directly apply the second rendering object in the video memory.
In some embodiments, the generation module 402 includes: the device comprises a calculating unit, a judging unit and a generating unit.
And the calculating unit is used for calculating the hash value of the first rendering object when the first rendering object is loaded.
And the judging unit is used for judging whether the first rendering object and the hash value are in a rendering object information list or not.
And the generating unit is used for generating a second rendering object according to the hash value if the second rendering object does not exist, and loading the second rendering object to the video memory.
In some embodiments, the second update module 407 comprises: an association unit and an update unit.
And the association unit is used for associating the second rendering object with the third rendering object to obtain second association information when the same data in the first android container and the second android container are loaded.
And the updating unit is used for updating the second associated information into a rendering object information list.
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.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (10)

1. A Linux server-based Android container rendering resource sharing method is characterized by comprising the following steps:
the method comprises the steps of obtaining a first rendering object generated by a target application in a first android container, wherein the first android container is any one of a plurality of android containers, and the target application is the same application running in the plurality of android containers;
generating a second rendering object according to the first rendering object, and loading the second rendering object to a video memory;
associating the first rendering object with the second rendering object to obtain first association information;
updating the first associated information to a rendering object information list;
based on a rendering object information list of updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the first android container after the first rendering object, and directly applying the second rendering object in the video memory;
acquiring a third rendering object generated by a target application in a second android container, wherein the second android container is any one of a plurality of android containers except the first android container;
updating a rendering object information list according to the second rendering object and the third rendering object;
and based on the rendering object information list of the updated associated information, obtaining a rendering instruction of a rendering object generated from a target application in the second android container after the third rendering object, and directly applying the second rendering object in the video memory.
2. The method of claim 1, further comprising:
traversing each of the other android containers except the first android container and the second android container in the plurality of android containers, obtaining a rendering instruction based on a rendering object information list of the updated associated information, and directly applying the second rendering object in the video memory.
3. The method of claim 1, wherein the generating a second rendering object from the first rendering object and loading the second rendering object into a video memory comprises:
calculating a hash value of the first rendering object when the first rendering object is loaded;
judging whether the first rendering object and the hash value are in a rendering object information list or not;
and if the hash value does not exist, generating a second rendering object according to the hash value, and loading the second rendering object to a video memory.
4. The method of claim 1, wherein updating the rendering object information list according to the second rendering object and the third rendering object comprises:
when the same data in the first android container and the second android container are loaded, associating the second rendering object with the third rendering object to obtain second associated information;
and updating the second associated information to a rendering object information list.
5. The Android container rendering resource sharing device based on the Linux server is characterized by comprising:
the system comprises a first obtaining module, a second obtaining module and a rendering module, wherein the first obtaining module is used for obtaining a first rendering object generated by a target application in a first android container, the first android container is any one of a plurality of android containers, and the target application is the same application running in the plurality of android containers;
the generating module is used for generating a second rendering object according to the first rendering object and loading the second rendering object to a video memory;
the association module is used for associating the first rendering object with the second rendering object to obtain first association information;
a first updating module, configured to update the first association information to a rendering object information list;
the first application module is used for acquiring a rendering instruction of a rendering object generated from a target application in the first android container after the first rendering object based on a rendering object information list for updating the associated information, and directly applying the second rendering object in the video memory;
a second obtaining module, configured to obtain a third rendering object generated by a target application in a second android container, where the second android container is any one of the android containers except for the first android container;
a second updating module, configured to update the rendering object information list according to the second rendering object and the third rendering object;
and the second application module is used for acquiring a rendering instruction of a rendering object generated from a target application in the second android container after the third rendering object based on the rendering object information list of the updated associated information, and directly applying the second rendering object in the video memory.
6. The apparatus of claim 5, further comprising:
and the traversing module is used for traversing each of the other android containers except the first android container and the second android container in the plurality of android containers, acquiring a rendering instruction based on a rendering object information list for updating the associated information, and directly applying the second rendering object in the video memory.
7. The apparatus of claim 5, wherein the generating module comprises:
a calculating unit, configured to calculate a hash value of the first rendering object when the first rendering object is loaded;
a judging unit, configured to judge whether the first rendering object and the hash value are in a rendering object information list;
and the generating unit is used for generating a second rendering object according to the hash value if the second rendering object does not exist, and loading the second rendering object to the video memory.
8. The apparatus of claim 5, wherein the second update module comprises:
the association unit is used for associating the second rendering object with the third rendering object when the same data in the first android container and the second android container are loaded to obtain second association information;
and the updating unit is used for updating the second associated information into a rendering object information list.
9. The Android container rendering resource sharing system based on the Linux server is characterized by comprising the following components: a Linux server;
the Linux server comprises:
a plurality of android containers for running a target application;
the renderer is connected with the android containers and used for receiving rendering objects and rendering instructions generated by the target application and rendering the rendering objects;
the video memory is connected with the renderer and used for loading the data of the rendering object;
and the network interface controller is used for building association with the outside.
10. The system of claim 9, further comprising: a user client and a target application management platform;
the Linux server is connected with the network interface controller, the user client is connected with the network interface controller, and the target application management platform is connected with the network interface controller.
CN202210019061.7A 2022-01-10 2022-01-10 Linux server-based Android container rendering resource sharing method and device Active CN114022344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210019061.7A CN114022344B (en) 2022-01-10 2022-01-10 Linux server-based Android container rendering resource sharing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210019061.7A CN114022344B (en) 2022-01-10 2022-01-10 Linux server-based Android container rendering resource sharing method and device

Publications (2)

Publication Number Publication Date
CN114022344A true CN114022344A (en) 2022-02-08
CN114022344B CN114022344B (en) 2022-04-05

Family

ID=80069764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210019061.7A Active CN114022344B (en) 2022-01-10 2022-01-10 Linux server-based Android container rendering resource sharing method and device

Country Status (1)

Country Link
CN (1) CN114022344B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114201134A (en) * 2022-02-17 2022-03-18 北京麟卓信息科技有限公司 Optimized display method of Toast in multi-window mode in android compatible environment
CN115857860A (en) * 2023-03-02 2023-03-28 麒麟软件有限公司 Mirror image screen optimization method in Wayland synthesizer
CN117075984A (en) * 2023-10-17 2023-11-17 海马云(天津)信息技术有限公司 Module processing method, device, communication equipment and computer readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617027A (en) * 2013-10-29 2014-03-05 合一网络技术(北京)有限公司 Android-based method and system for constructing image rendering engine
CN104991827A (en) * 2015-06-26 2015-10-21 季锦诚 Method for sharing GPU resources in cloud game
CN111179369A (en) * 2019-12-27 2020-05-19 珠海全志科技股份有限公司 GPU rendering method and device based on android system
CN111291292A (en) * 2020-01-15 2020-06-16 广州虎牙科技有限公司 Page rendering method and device, terminal equipment and storage medium
CN111729293A (en) * 2020-08-28 2020-10-02 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN112988400A (en) * 2021-04-30 2021-06-18 腾讯科技(深圳)有限公司 Video memory optimization method and device, electronic equipment and readable storage medium
CN113127228A (en) * 2021-03-23 2021-07-16 西安万像电子科技有限公司 Graphic rendering method, server, and computer-readable storage medium
CN113220474A (en) * 2021-04-21 2021-08-06 麒麟软件有限公司 Android application sharing Linux system screen data method based on Android-EMUGL
US20210264648A1 (en) * 2018-06-15 2021-08-26 Swiftclass Sa Graphics rendering
CN113849271A (en) * 2021-09-22 2021-12-28 北京百度网讯科技有限公司 Cloud desktop display method, device, equipment, system and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617027A (en) * 2013-10-29 2014-03-05 合一网络技术(北京)有限公司 Android-based method and system for constructing image rendering engine
CN104991827A (en) * 2015-06-26 2015-10-21 季锦诚 Method for sharing GPU resources in cloud game
US20210264648A1 (en) * 2018-06-15 2021-08-26 Swiftclass Sa Graphics rendering
CN111179369A (en) * 2019-12-27 2020-05-19 珠海全志科技股份有限公司 GPU rendering method and device based on android system
CN111291292A (en) * 2020-01-15 2020-06-16 广州虎牙科技有限公司 Page rendering method and device, terminal equipment and storage medium
CN111729293A (en) * 2020-08-28 2020-10-02 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN113127228A (en) * 2021-03-23 2021-07-16 西安万像电子科技有限公司 Graphic rendering method, server, and computer-readable storage medium
CN113220474A (en) * 2021-04-21 2021-08-06 麒麟软件有限公司 Android application sharing Linux system screen data method based on Android-EMUGL
CN112988400A (en) * 2021-04-30 2021-06-18 腾讯科技(深圳)有限公司 Video memory optimization method and device, electronic equipment and readable storage medium
CN113849271A (en) * 2021-09-22 2021-12-28 北京百度网讯科技有限公司 Cloud desktop display method, device, equipment, system and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SUBROTA KUMAR MONDAL 等: "Boosting UI Rendering in Android Applications", 《2020 IEEE 20TH INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY COMPANION (QRS-C)》 *
王海请: "嵌入式GPU硬件加速渲染的纹理传输优化及预取策略研究", 《中国优秀硕士学位论文全文数据库 信息科技辑(月刊)》 *
谷德贺等: "基于LXC的Android系统虚拟化技术", 《计算机系统应用》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114201134A (en) * 2022-02-17 2022-03-18 北京麟卓信息科技有限公司 Optimized display method of Toast in multi-window mode in android compatible environment
CN115857860A (en) * 2023-03-02 2023-03-28 麒麟软件有限公司 Mirror image screen optimization method in Wayland synthesizer
CN117075984A (en) * 2023-10-17 2023-11-17 海马云(天津)信息技术有限公司 Module processing method, device, communication equipment and computer readable storage medium
CN117075984B (en) * 2023-10-17 2023-12-26 海马云(天津)信息技术有限公司 Module processing method, device, communication equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114022344B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN114022344B (en) Linux server-based Android container rendering resource sharing method and device
US8417039B2 (en) Motion detection techniques for improved image remoting
US20130141448A1 (en) Graphics Command Generation Device and Graphics Command Generation Method
US8326092B2 (en) Heterogeneous image processing system
US20160371874A1 (en) Command remoting
CN105979007A (en) Acceleration resource processing method and device and network function virtualization system
US9235452B2 (en) Graphics remoting using augmentation data
CN112529995B (en) Image rendering calculation method and device, storage medium and terminal
CN108389241A (en) The methods, devices and systems of textures are generated in scene of game
CN105247478A (en) Command instruction management
CN112785676B (en) Image rendering method, device, equipment and storage medium
CN112316433A (en) Game picture rendering method, device, server and storage medium
US20130120381A1 (en) Fast rendering of knockout groups using a depth buffer of a graphics processing unit
CN110738720A (en) Special effect rendering method and device, terminal and storage medium
CN113419809B (en) Real-time interactive program interface data rendering method and equipment
CN113645484B (en) Data visualization accelerated rendering method based on graphic processor
CN115309315A (en) Screenshot method, system and medium for X application in Wayland environment
CN114327790A (en) Rendering method of Android container based on Linux system
CN113419806A (en) Image processing method, image processing device, computer equipment and storage medium
US9361540B2 (en) Fast image processing for recognition objectives system
US8587599B1 (en) Asset server for shared hardware graphic data
CN111738903B (en) Method, device and equipment for optimizing layered material of object
CN114820908B (en) Virtual image generation method and device, electronic equipment and storage medium
CN117519996B (en) Data processing method, device, equipment and storage medium
CN113778905B (en) UI design acceptance method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant