CN114025238A - Native android application cloud virtualization method based on Linux server - Google Patents

Native android application cloud virtualization method based on Linux server Download PDF

Info

Publication number
CN114025238A
CN114025238A CN202210019064.0A CN202210019064A CN114025238A CN 114025238 A CN114025238 A CN 114025238A CN 202210019064 A CN202210019064 A CN 202210019064A CN 114025238 A CN114025238 A CN 114025238A
Authority
CN
China
Prior art keywords
android
rendered
data
linux
rendering
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
CN202210019064.0A
Other languages
Chinese (zh)
Other versions
CN114025238B (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 CN202210019064.0A priority Critical patent/CN114025238B/en
Publication of CN114025238A publication Critical patent/CN114025238A/en
Application granted granted Critical
Publication of CN114025238B publication Critical patent/CN114025238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44012Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4781Games

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a native android application cloud virtualization method based on a Linux server, and relates to the technical field of the Internet. The method comprises the following steps: establishing an android application running environment based on functions provided by a Linux system kernel; acquiring a rendering instruction and data to be rendered of a target application based on the built android application operating environment; performing data encoding on the rendering instruction and the data to be rendered, and rendering the encoded data to be rendered; and calling the rendered data, and carrying out video coding on the rendered data. According to the android system resource utilization simulator, the problem that the android system running cost is high due to the fact that the simulator is used in the android cloud simulation environment in which the Linux server runs at the current stage can be solved, the large server resource utilization is achieved, and the android system running cost is reduced.

Description

Native android application cloud virtualization method based on Linux server
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to a native android application cloud virtualization method based on a Linux server.
Background
The android simulator can run on a computer and simulate an android mobile phone system, namely android mobile phone application software can be installed, used and uninstalled, an android mobile phone running environment is simulated on the computer, and even if a user does not have mobile phone hardware equipment, the android simulator can be used on the computer to use the android mobile phone application software. Currently, cloud Android cloud game simulation environments based on Android simulators are numerous, but problems of different degrees exist in consideration of concurrency quantity, game experience and compatibility.
In the process of implementing the method, the inventor finds that the Android system is high in running cost due to the fact that a simulator is used in the Android cloud simulation environment run by the Linux server at the present stage.
Disclosure of Invention
The embodiment of the application provides a native Android application cloud virtualization method based on a Linux server, and the method can solve the problem that the Android system is high in running cost due to the fact that a simulator is used in an Android cloud simulation environment in which the Linux server runs at the present stage.
In a first aspect of the present application, a Linux server-based native android application cloud virtualization method is provided, including:
establishing an Android application running environment based on functions provided by a Linux system kernel, wherein the functions provided by the Linux system kernel comprise a Control Groups mechanism, a Namespaces mechanism, a root mechanism, a Binder mechanism, an Ashmem mechanism, a Virtual Network and a Virtual HID;
based on the built Android application running environment, obtaining a rendering instruction and data to be rendered of a target application, wherein the target application is all applications running in any one of a plurality of Android containers;
performing data encoding on the rendering instruction and the data to be rendered, and rendering the encoded data to be rendered;
and calling the rendered data, and carrying out video coding on the rendered data.
By adopting the technical scheme, the Android application running environment is built based on the functions provided by the Linux system kernel, the rendering instruction of the target application and the data to be rendered are coded and rendered based on the built Android application running environment, the rendered data are directly called, and the rendered data are subjected to video coding, so that the problem that the Android system running cost is high due to the fact that the simulator is used in the Android cloud simulation environment of the Linux server running at the present stage can be solved, the server resource is greatly used, and the Android system running cost is reduced.
In a possible implementation manner, the building an Android application operating environment based on the functions provided by the Linux system kernel includes:
setting the process of the target application into a Control Groups based on a Control Groups mechanism provided by a Linux system kernel according to preset setting parameters;
based on a Namespaces mechanism provided by a Linux system kernel, carrying out namespace isolation on the process of the target application;
performing file isolation on the process of the target application based on a root mechanism provided by a Linux system kernel;
providing a Binder device of each android container in the android containers based on a Binder mechanism provided by a Linux system kernel;
based on an Ashmem mechanism provided by a Linux system kernel, mounting the Ashmem equipment in each android container in a plurality of android containers;
providing independent Network equipment for an Android system based on a Virtual Network provided by a Linux system kernel;
and providing an input device for the Android system based on the virtual HID provided by the Linux system kernel.
In a possible implementation manner, the rendering the encoded data to be rendered includes:
transmitting the coded data to be rendered based on a high-speed pipeline transmission mode or a shared memory transmission mode;
and rendering the coded data to be rendered.
In a second aspect of the present application, a Linux server-based native android application cloud virtualization device is provided, including:
the Android application running environment is built based on functions provided by a Linux system kernel, and the functions provided by the Linux system kernel comprise a Control Groups mechanism, a Namespaces mechanism, a root mechanism, a Binder mechanism, an Ashmem mechanism, a Virtual Network and a Virtual HID;
the system comprises an acquisition module, a rendering module and a rendering module, wherein the acquisition module is used for acquiring a rendering instruction and data to be rendered of a target application based on a built Android application running environment, and the target application is all applications running in any one of a plurality of Android containers;
the rendering module is used for carrying out data coding on the rendering instruction and the data to be rendered and rendering the coded data to be rendered;
and the coding module is used for calling the rendered data and carrying out video coding on the rendered data.
In one possible implementation, the building module includes:
the setting unit is used for setting the process of the target application into a Control Groups based on a Control Groups mechanism provided by a Linux system kernel according to preset setting parameters;
the namespace isolation unit is used for carrying out namespace isolation on the process of the target application based on a Namespaces mechanism provided by a Linux system kernel;
the file isolation unit is used for carrying out file isolation on the process of the target application based on a root mechanism provided by a Linux system kernel;
the device comprises a first providing unit, a second providing unit and a third providing unit, wherein the first providing unit is used for providing a Binder device of each android container in the plurality of android containers based on a Binder mechanism provided by a Linux system kernel;
the mounting unit is used for mounting the Ashmem equipment in each android container in the android containers based on an Ashmem mechanism provided by a Linux system kernel;
the second providing unit is used for providing independent Network equipment for the Android system based on a Virtual Network provided by a Linux system kernel;
and the third providing unit is used for providing input equipment for the Android system based on the virtual HID provided by the Linux system kernel.
In one possible implementation, the rendering module includes:
the transmission unit is used for transmitting the coded data to be rendered based on a high-speed pipeline transmission mode or a shared memory transmission mode;
and the rendering unit is used for rendering the coded data to be rendered.
In a third aspect of the present application, a Linux server-based native android application cloud virtualization system is provided, including: a Linux server;
the Linux server comprises:
a plurality of android containers for running a target application;
the RTC stack is used for carrying out data coding on the rendering instruction and the data to be rendered generated by the target application;
the renderer is connected with the android containers and used for receiving the coded rendering instruction and the data to be rendered and rendering the data to be rendered;
the display memory is connected with the renderer and used for loading rendered data;
the hardware video encoder is connected with the video memory and is used for carrying out video encoding on rendered data;
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.
In a fourth aspect of the present application, 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 computer program.
In a fifth aspect of the application, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method.
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 a Linux server-based native android application cloud virtualization system in an embodiment of the present application.
Fig. 2 shows a flowchart of a Linux server-based native android application cloud virtualization method in an embodiment of the present application.
Fig. 3 shows a structure diagram of a Linux server-based native android application cloud virtualization apparatus in an embodiment of the present application.
Fig. 4 shows a schematic structural diagram of an electronic device suitable for implementing embodiments 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 native android application cloud virtualization method based on the Linux server can be applied to the technical field of the Internet.
At present, the Android cloud game simulation environments of the cloud end are numerous, but problems of different degrees exist in consideration of concurrency quantity, game experience and compatibility. At present, an Android cloud simulation environment operated by a Linux server uses a simulator, so that the Android system is high in operation cost, and the Android system isolated by adopting a container scheme such as LXC or Docker has the problem of compatibility.
For example, in the Android cloud simulation environment operated by the Linux server at the present stage, an Android simulator is used for operating a virtual environment, the concurrency number of the Android simulator is limited, and the Android system is high in operation cost. For another example, the compatibility problem of the Docker container and the Android container in the Linux server exists in the Android system isolated by the Docker container scheme.
In order to solve the technical problem, embodiments of the present application provide a native Android application cloud virtualization method based on a Linux server, which can greatly use server resources, provide a high-quality Android system operating environment, and give a user a low-delay game experience. In some embodiments, the Linux server-based native android application cloud virtualization method may be performed by an electronic device.
Fig. 1 shows a structure diagram of a Linux server-based native android application cloud virtualization system in an embodiment of the present application. Referring to fig. 1, the Linux server-based native android application cloud virtualization system in the present embodiment includes a Linux server 1. The Linux server 1 comprises an Android system container set 13, an RTC stack, a renderer, a hardware video encoder, 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 RTC stack is used for carrying out data encoding on the rendering instruction generated by the target application and the data to be rendered. The renderer is connected with the android containers and used for receiving the coded rendering instructions and data to be rendered (rendering material data) and rendering the data to be rendered. The video memory is connected with the renderer and used for loading rendered data. The hardware video encoder is connected with the video memory, and directly calls rendered data (pictures) from the video memory to perform video encoding on the rendered data. 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) contains an Android running environment, and applications to be rendered, including game applications and non-game applications, run in the Android container.
In the embodiment of the application, the target application is all applications which need to be subjected to rendering processing and run in any one of the android containers. In addition, all applications needing rendering processing in any android container can be connected with one renderer or a plurality of renderers.
Optionally, all applications needing rendering processing in any Android container are connected with one renderer, so that the running cost of the Android system is reduced conveniently.
Optionally, the renderer is a hardware graphics renderer.
In the embodiment of the present application, the hardware graphics renderer operates at the Host side of the Linux server 1, and may use a hardware graphics card of the Linux server 1 to perform graphics acceleration, and is responsible for receiving the encoded rendering instruction and the rendering material data that are sent after being encoded by the RTC stack. Meanwhile, the hardware graphics renderer decodes the encoded rendering instruction and rendering material data, and then performs rendering operation.
In the embodiment of the present application, the renderer operates in the Android container server 12, and the Android container server 12 further includes an audio encoder. The video memory is a GPU video memory 15, and a hardware graphics renderer in the Android container server 12 is connected with the GPU video memory 15 through a hardware video encoder, so that the hardware graphics renderer receives data to be rendered and rendering instructions generated by target applications and establishes a connection with the GPU video memory 15.
In the embodiment of the present application, a plurality of Android containers, RTC stacks, renderers, audio encoders, and hardware video encoders are all running in the Android container server 12. Besides the target application, a hardware simulator runs in the android containers.
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 native android application cloud virtualization method in an embodiment of the present application. Referring to fig. 2, the native android application cloud virtualization method based on the Linux server in the embodiment includes:
step 201: the Android application running environment is built based on functions provided by a Linux system kernel, and the functions provided by the Linux system kernel comprise a Control Groups mechanism, a Namespaces mechanism, a root mechanism, a Binder mechanism, an Ashmem mechanism, a Virtual Network and a Virtual HID.
In the embodiment of the application, in the process of establishing the Android application running environment, the Android application running environment is directly based on a Linux system kernel and does not depend on LXC or Docker and other middleware.
Specifically, the establishment of the Virtual android running environment is realized by directly using mechanisms including but not limited to a Control Groups mechanism, a Namespaces mechanism (namespace isolation), a root mechanism, a Binder mechanism, an Ashmem mechanism, a Virtual Network, a Virtual HID and the like in a Linux system kernel.
Step 202: and acquiring a rendering instruction and data to be rendered of a target application based on the built Android application operating environment, wherein the target application is all applications operated in any one of a plurality of Android containers.
In the embodiment of the application, the target application is all applications which need to be rendered and run in any one of the android containers. Related processes for processing rendering instructions and data to be rendered generated in target application are operated in the built Android application operating environment (virtual Android operating environment).
Step 203: and performing data encoding on the rendering instruction and the data to be rendered, and rendering the encoded data to be rendered.
In the embodiment of the present application, the RTC stack in the Linux server performs data encoding on the rendering instruction and the data to be rendered (rendering material data). And a hardware graphics renderer in the Linux server acquires the coded rendering instruction and the data to be rendered, and renders the data to be rendered.
Step 204: and calling the rendered data, and carrying out video coding on the rendered data.
In the embodiment of the present application, generally, if a hardware video encoder in a Linux server needs to encode rendered data, the hardware video encoder needs to copy the rendered data loaded into a video memory into a system memory in a hardware graphics renderer in the Linux server, and then the hardware video encoder calls the rendered data from the system memory, so that the rendered data can be encoded finally.
In the embodiment of the application, based on the built Android application running environment, a hardware video encoder in the Linux server can directly acquire rendered data (pictures) from a video memory in the Linux server and encode the rendered data, so that a copying process from the video memory to a system memory is omitted.
In some embodiments, step 201 comprises: step a 1-step a 7.
Step A1: and setting the process of the target application into a Control Groups group according to preset setting parameters based on a Control Groups mechanism provided by a Linux system kernel.
Step A2: and based on a Namespaces mechanism provided by the Linux system kernel, carrying out namespace isolation on the process of the target application.
Step A3: and carrying out file isolation on the process of the target application based on a root mechanism provided by a Linux system kernel.
Step A4: and providing a Binder device of each android container in the android containers based on a Binder mechanism provided by a Linux system kernel.
Step A5: and mounting the Ashmem equipment in each android container in a plurality of android containers based on an Ashmem mechanism provided by a Linux system kernel.
Step A6: and providing independent Network equipment for the Android system based on a Virtual Network provided by a Linux system kernel.
Step A7: and providing an input device for the Android system based on the virtual HID provided by the Linux system kernel.
In the embodiment of the application, each step from the step A1 to the step A7 is in parallel relationship. When an Android application running environment is built, the steps can be executed in parallel, and can also be executed according to any other arranged step sequence except the step sequence.
In step a1, based on a Control Groups mechanism provided by the Linux system kernel, the target application (all running android applications) processes in an android container are set as a Control group, and resources such as a disk, a CPU, a memory, and the like occupied by the process group are controlled.
In the embodiment of the present application, the preset setting parameters may be set manually or automatically defined by the system according to the requirement. The preset setting parameters comprise hard disk parameters, CPU parameters, memory parameters and name parameters. The hard disk parameters, the CPU parameters and the memory parameters are limited by a system, and the name parameters are not limited.
For example, the total hard disk parameter of the system is 1T, and the hard disk parameter of the Control Groups (Control process Groups) is set to 200G; the system total CPU parameter is 64 cores, and the CPU parameter of the Control Groups is set to be 4 cores; the total memory parameter of the system is 64G, and the memory parameter of the Control Groups is set to be 16G. The hard disk parameters, the CPU parameters and the memory parameters of the set Control Groups do not exceed the total system parameter values. The setting of the Control Groups group name parameter can be set according to personal requirements, or can be automatically defined by the system, for example, setting the name parameter as the first name.
In step a2, based on the Namespaces mechanism provided by the Linux system kernel, a second name is added to the target application process for namespace definition through namespace isolation, thereby realizing process resource isolation between the android container and between the android container and the Linux system. Such as adding a process ID, message queue, etc. to the target application process.
In step a3, based on a root mechanism provided by the Linux system kernel, the root directory of the android running environment in the android container is redirected to a directory on the Linux server, so that file isolation between the android container and between the android container and the Linux system is realized.
Preferably, a directory on the Linux server is a subdirectory under the user directory.
In step a4, based on the Binder mechanism provided by the Linux system kernel, a Binder IPC (inter-process communication) mechanism of the Android operating environment is supported by the Binder fs (pseudo file system for the Android Binder IPC driver), a Binder fs instance is mounted to each Android container, and a Binder device independent of the container is provided.
In step a5, based on the Ashmem mechanism provided by the Linux system kernel, the Ashmem memory sharing mechanism of the android operating environment is supported by mounting the Ashmem device of the Linux system into each android container.
In step a6, providing independent Network devices for Android system operation in each Android container based on a Virtual Network provided by a Linux system kernel.
In step a7, an input device is provided to the Android system based on the virtual HID provided by the Linux system kernel. Including but not limited to a separate touch screen, mouse, keyboard, joystick, etc.
In the embodiment of the application, an Android application running environment (virtual Android running environment) is built based on the steps A1 to A7, an isolated Android system running environment can be created by using a Linux Control Groups mechanism based on a public system kernel, and a lightweight Android container is built.
In the embodiment of the application, the Android application operating environment is built in the steps A1 to A7, and a game picture can be rendered by using hardware equipment based on the built virtual Android operating environment, so that the graphic rendering quality is improved, the rendering efficiency is improved, and an efficient Android system rendering framework is created.
In the embodiment of the application, the Android application operating environment built in the steps A1 to A7 can also realize that the video memory image data are directly coded by using a hardware video coder under the built virtual Android operating environment, so that the delay effect of the game is greatly reduced, and the low-delay Android cloud game service architecture is created.
In some embodiments, step 203 comprises: step B1-step B2.
Step B1: and transmitting the coded data to be rendered based on a high-speed pipeline transmission mode or a shared memory transmission mode.
Step B2: and rendering the coded data to be rendered.
In this embodiment of the present application, based on a shared memory transmission manner, a specific process of transmitting the encoded data to be rendered includes: step b1 to step b 5.
Step b 1: and acquiring the coded rendering instruction and the data to be rendered in the Guest system, and writing the data to be rendered into the shared memory.
Step b 2: and coding the coded rendering instruction and the shared memory information of the data to be rendered in the Guest system.
Step b 3: and outputting the coded shared memory information to a Host system through a pipeline.
Step b 4: and decoding the coded shared memory information in the Host system, and acquiring the coded rendering instruction and the shared memory information where the data to be rendered is located.
Step b 5: and the hardware graphics renderer reads the data to be rendered in the shared memory according to the shared memory information.
In this embodiment of the present application, based on a high-speed pipeline transmission manner, a specific process of transmitting the encoded data to be rendered includes: step b6 to step b 7.
Step b 6: and outputting the coded rendering instruction and the data to be rendered to a Host system hardware graphics renderer through a pipeline.
Step b 7: in the Host system, a hardware graphics renderer decodes the encoded rendering instructions and data to be rendered.
In the embodiment of the present application, the pipes involved in step b3 and step b6 may be socket pipes, goldfish-pipe pipes, or other pipes that can be built between the server and the container.
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. 3 shows a structure diagram of a Linux server-based native android application cloud virtualization apparatus in an embodiment of the present application. Referring to fig. 3, the Linux server-based native android application cloud virtualization apparatus includes a building module 301, an obtaining module 302, a rendering module 303, and an encoding module 304.
The building module 301 is used for building an Android application running environment based on functions provided by a Linux system kernel, wherein the functions provided by the Linux system kernel comprise a Control Groups mechanism, a Namespaces mechanism, a root mechanism, a Binder mechanism, an Ashmem mechanism, a Virtual Network and a Virtual HID.
The obtaining module 302 is configured to obtain a rendering instruction and data to be rendered of a target application based on the built Android application operating environment, where the target application is all applications operating in any one of a plurality of Android containers.
And the rendering module 303 is configured to perform data encoding on the rendering instruction and the data to be rendered, and render the encoded data to be rendered.
And the encoding module 304 is configured to retrieve the rendered data and perform video encoding on the rendered data.
In some embodiments, the building module 301 comprises: the device comprises a setting unit, a name space isolation unit, a file isolation unit, a first providing unit, a mounting unit, a second providing unit and a third providing unit.
And the setting unit is used for setting the process of the target application into a Control Groups according to preset setting parameters based on a Control Groups mechanism provided by a Linux system kernel.
And the namespace isolation unit is used for carrying out namespace isolation on the process of the target application based on a Namespaces mechanism provided by the kernel of the Linux system.
And the file isolation unit is used for carrying out file isolation on the process of the target application based on a root mechanism provided by a Linux system kernel.
The first providing unit is used for providing the Binder device of each android container in the android containers based on a Binder mechanism provided by a Linux system kernel.
And the mounting unit is used for mounting the Ashmem equipment in each android container in the plurality of android containers based on an Ashmem mechanism provided by a Linux system kernel.
And the second providing unit is used for providing independent Network equipment for the Android system based on the Virtual Network provided by the Linux system kernel.
And the third providing unit is used for providing input equipment for the Android system based on the virtual HID provided by the Linux system kernel.
In some embodiments, rendering module 303 includes: a transmission unit and a rendering unit.
The transmission unit is used for transmitting the coded data to be rendered based on a high-speed pipeline transmission mode or a shared memory transmission mode;
and the rendering unit is used for rendering the coded data to be rendered.
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 structural diagram of an electronic device suitable for implementing an embodiment of the present application. As shown in fig. 4, the electronic device 400 shown in fig. 4 includes: a processor 401 and a memory 403. Wherein the processor 401 is connected to the memory 403. Optionally, the electronic device 400 may also include a transceiver 404. It should be noted that the transceiver 404 is not limited to one in practical applications, and the structure of the electronic device 400 is not limited to the embodiment of the present application.
The Processor 401 may be a CPU (Central Processing Unit), a general purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 401 may also be a combination of computing functions, e.g., comprising one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 402 may include a path that transfers information between the above components. The bus 402 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 302 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The Memory 403 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
The memory 403 is used for storing application program codes for executing the scheme of the application, and the execution is controlled by the processor 401. Processor 401 is configured to execute application program code stored in memory 403 to implement the aspects illustrated in the foregoing method embodiments.
Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
The present application provides a computer-readable storage medium, on which a computer program is stored, which, when running on a computer, enables the computer to execute the corresponding content in the foregoing method embodiments. Compared with the prior art, in the embodiment of the application, an Android application running environment is built based on functions provided by a Linux system kernel, a rendering instruction of a target application and data to be rendered are coded and rendered based on the built Android application running environment, the rendered data are directly called, and the rendered data are subjected to video coding.
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 native android application cloud virtualization method based on a Linux server is characterized by comprising the following steps:
establishing an Android application running environment based on functions provided by a Linux system kernel, wherein the functions provided by the Linux system kernel comprise a Control Groups mechanism, a Namespaces mechanism, a root mechanism, a Binder mechanism, an Ashmem mechanism, a Virtual Network and a Virtual HID;
based on the built Android application running environment, obtaining a rendering instruction and data to be rendered of a target application, wherein the target application is all applications running in any one of a plurality of Android containers;
performing data encoding on the rendering instruction and the data to be rendered, and rendering the encoded data to be rendered;
and calling the rendered data, and carrying out video coding on the rendered data.
2. The method according to claim 1, wherein the building of the Android application running environment based on the functions provided by the Linux system kernel comprises:
setting the process of the target application into a Control Groups based on a Control Groups mechanism provided by a Linux system kernel according to preset setting parameters;
based on a Namespaces mechanism provided by a Linux system kernel, carrying out namespace isolation on the process of the target application;
performing file isolation on the process of the target application based on a root mechanism provided by a Linux system kernel;
providing a Binder device of each android container in the android containers based on a Binder mechanism provided by a Linux system kernel;
based on an Ashmem mechanism provided by a Linux system kernel, mounting the Ashmem equipment in each android container in a plurality of android containers;
providing independent Network equipment for an Android system based on a Virtual Network provided by a Linux system kernel;
and providing an input device for the Android system based on the virtual HID provided by the Linux system kernel.
3. The method of claim 1, wherein rendering the encoded data to be rendered comprises:
transmitting the coded data to be rendered based on a high-speed pipeline transmission mode or a shared memory transmission mode;
and rendering the coded data to be rendered.
4. A native android application cloud virtualization device based on a Linux server, comprising:
the Android application running environment is built based on functions provided by a Linux system kernel, and the functions provided by the Linux system kernel comprise a Control Groups mechanism, a Namespaces mechanism, a root mechanism, a Binder mechanism, an Ashmem mechanism, a Virtual Network and a Virtual HID;
the system comprises an acquisition module, a rendering module and a rendering module, wherein the acquisition module is used for acquiring a rendering instruction and data to be rendered of a target application based on a built Android application running environment, and the target application is all applications running in any one of a plurality of Android containers;
the rendering module is used for carrying out data coding on the rendering instruction and the data to be rendered and rendering the coded data to be rendered;
and the coding module is used for calling the rendered data and carrying out video coding on the rendered data.
5. The apparatus of claim 4, wherein the building module comprises:
the setting unit is used for setting the process of the target application into a Control Groups based on a Control Groups mechanism provided by a Linux system kernel according to preset setting parameters;
the namespace isolation unit is used for carrying out namespace isolation on the process of the target application based on a Namespaces mechanism provided by a Linux system kernel;
the file isolation unit is used for carrying out file isolation on the process of the target application based on a root mechanism provided by a Linux system kernel;
the device comprises a first providing unit, a second providing unit and a third providing unit, wherein the first providing unit is used for providing a Binder device of each android container in the plurality of android containers based on a Binder mechanism provided by a Linux system kernel;
the mounting unit is used for mounting the Ashmem equipment in each android container in the android containers based on an Ashmem mechanism provided by a Linux system kernel;
the second providing unit is used for providing independent Network equipment for the Android system based on a Virtual Network provided by a Linux system kernel;
and the third providing unit is used for providing input equipment for the Android system based on the virtual HID provided by the Linux system kernel.
6. The apparatus of claim 4, wherein the rendering module comprises:
the transmission unit is used for transmitting the coded data to be rendered based on a high-speed pipeline transmission mode or a shared memory transmission mode;
and the rendering unit is used for rendering the coded data to be rendered.
7. A native android application cloud virtualization system based on a Linux server, comprising: a Linux server;
the Linux server comprises:
a plurality of android containers for running a target application;
the RTC stack is used for carrying out data coding on the rendering instruction and the data to be rendered generated by the target application;
the renderer is connected with the android containers and used for receiving the coded rendering instruction and the data to be rendered and rendering the data to be rendered;
the display memory is connected with the renderer and used for loading rendered data;
the hardware video encoder is connected with the video memory and is used for carrying out video encoding on rendered data;
and the network interface controller is used for building association with the outside.
8. The system of claim 7, 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.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the computer program, implements the method of any of claims 1-3.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN202210019064.0A 2022-01-10 2022-01-10 Native android application cloud virtualization method based on Linux server Active CN114025238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210019064.0A CN114025238B (en) 2022-01-10 2022-01-10 Native android application cloud virtualization method based on Linux server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210019064.0A CN114025238B (en) 2022-01-10 2022-01-10 Native android application cloud virtualization method based on Linux server

Publications (2)

Publication Number Publication Date
CN114025238A true CN114025238A (en) 2022-02-08
CN114025238B CN114025238B (en) 2022-04-05

Family

ID=80069730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210019064.0A Active CN114025238B (en) 2022-01-10 2022-01-10 Native android application cloud virtualization method based on Linux server

Country Status (1)

Country Link
CN (1) CN114025238B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114758047A (en) * 2022-06-14 2022-07-15 海马云(天津)信息技术有限公司 Server and server-based graphic rendering method
CN114884993A (en) * 2022-05-07 2022-08-09 杭州天宽科技有限公司 Virtual android system for enhancing data security
CN115695857A (en) * 2022-12-29 2023-02-03 北京海誉动想科技股份有限公司 Video coding method and device for cloud application
CN116597025A (en) * 2023-04-24 2023-08-15 北京麟卓信息科技有限公司 Compressed texture decoding optimization method based on heterogeneous instruction penetration

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752594A (en) * 2012-06-21 2012-10-24 浙江大学 Cluster rendering method based on image decoding and decoding and parallel transmission
CN103810021A (en) * 2014-02-19 2014-05-21 福建升腾资讯有限公司 Virtual desktop displaying method based on host machine under VDI and system thereof
CN104156213A (en) * 2014-08-12 2014-11-19 百度在线网络技术(北京)有限公司 Android application running method and device
CN104243440A (en) * 2013-06-21 2014-12-24 辉达公司 Graphics server and method for streaming rendered content via a remote graphics rendering service
US20150082239A1 (en) * 2013-09-13 2015-03-19 Curious Olive, Inc. Remote Virtualization of Mobile Apps with Transformed Ad Target Preview
CN104915200A (en) * 2014-10-20 2015-09-16 晶晨半导体(上海)有限公司 Video frame treatment in mobile operating system
CN110025957A (en) * 2019-03-04 2019-07-19 深圳威尔视觉传媒有限公司 A kind of cloud game service device end-rack structure, client and system
CN110968395A (en) * 2019-10-23 2020-04-07 华为技术有限公司 Method for processing rendering instruction in simulator and mobile terminal
CN111494936A (en) * 2020-02-12 2020-08-07 阿里巴巴集团控股有限公司 Picture rendering method, device, system and storage medium
CN113110910A (en) * 2021-04-20 2021-07-13 上海卓易科技股份有限公司 Method, system and equipment for implementing android container
WO2021254214A1 (en) * 2020-06-20 2021-12-23 华为技术有限公司 Migration method and apparatus for android application program

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752594A (en) * 2012-06-21 2012-10-24 浙江大学 Cluster rendering method based on image decoding and decoding and parallel transmission
CN104243440A (en) * 2013-06-21 2014-12-24 辉达公司 Graphics server and method for streaming rendered content via a remote graphics rendering service
US20150082239A1 (en) * 2013-09-13 2015-03-19 Curious Olive, Inc. Remote Virtualization of Mobile Apps with Transformed Ad Target Preview
CN103810021A (en) * 2014-02-19 2014-05-21 福建升腾资讯有限公司 Virtual desktop displaying method based on host machine under VDI and system thereof
CN104156213A (en) * 2014-08-12 2014-11-19 百度在线网络技术(北京)有限公司 Android application running method and device
CN104915200A (en) * 2014-10-20 2015-09-16 晶晨半导体(上海)有限公司 Video frame treatment in mobile operating system
CN110025957A (en) * 2019-03-04 2019-07-19 深圳威尔视觉传媒有限公司 A kind of cloud game service device end-rack structure, client and system
CN110968395A (en) * 2019-10-23 2020-04-07 华为技术有限公司 Method for processing rendering instruction in simulator and mobile terminal
CN111494936A (en) * 2020-02-12 2020-08-07 阿里巴巴集团控股有限公司 Picture rendering method, device, system and storage medium
WO2021254214A1 (en) * 2020-06-20 2021-12-23 华为技术有限公司 Migration method and apparatus for android application program
CN113110910A (en) * 2021-04-20 2021-07-13 上海卓易科技股份有限公司 Method, system and equipment for implementing android container

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114884993A (en) * 2022-05-07 2022-08-09 杭州天宽科技有限公司 Virtual android system for enhancing data security
CN114884993B (en) * 2022-05-07 2023-12-22 杭州天宽科技有限公司 Virtualized android system for enhancing data security
CN114758047A (en) * 2022-06-14 2022-07-15 海马云(天津)信息技术有限公司 Server and server-based graphic rendering method
CN115695857A (en) * 2022-12-29 2023-02-03 北京海誉动想科技股份有限公司 Video coding method and device for cloud application
CN116597025A (en) * 2023-04-24 2023-08-15 北京麟卓信息科技有限公司 Compressed texture decoding optimization method based on heterogeneous instruction penetration
CN116597025B (en) * 2023-04-24 2023-09-26 北京麟卓信息科技有限公司 Compressed texture decoding optimization method based on heterogeneous instruction penetration

Also Published As

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

Similar Documents

Publication Publication Date Title
CN114025238B (en) Native android application cloud virtualization method based on Linux server
US11909820B2 (en) Method and apparatus for execution of applications in a cloud system
US8675000B2 (en) Command buffers for web-based graphics rendering
Sellers et al. Vulkan programming guide: The official guide to learning vulkan
US8463980B2 (en) Shared memory between child and parent partitions
US20170323418A1 (en) Virtualized gpu in a virtual machine environment
CN110389936B (en) Method, equipment and computer storage medium for starting small program
US10002403B2 (en) Command remoting
US9235452B2 (en) Graphics remoting using augmentation data
CN111966504B (en) Task processing method in graphics processor and related equipment
CN102411786A (en) Low complexity method for motion compensation of dwt based systems
CN110968395B (en) Method for processing rendering instruction in simulator and mobile terminal
US9104452B2 (en) Hybrid remote sessions
CN111408138A (en) Rendering method and device based on game engine and electronic equipment
CN113256481A (en) Task processing method and device in graphic processor, electronic equipment and storage medium
US20140063028A1 (en) Memory Space Mapping Techniques for Server Based Graphics Processing
US20160132346A1 (en) Memory Space Mapping Techniques for Server Based Graphics Processing
CN115695857B (en) Video coding method and device for cloud application
CN115065684A (en) Data processing method, device, equipment and medium
CN114237826A (en) High-speed rendering method and device for android container
CN111008934B (en) Scene construction method, device, equipment and storage medium
CN110038301B (en) Data processing method and device, electronic equipment and storage medium
TW201224925A (en) System and method for multiple native software applications user interface composition
CN116185366A (en) Graph program online development method, system and related equipment based on cloud technology
CN117354532A (en) Video decoding rendering method and device based on multiple display cards

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