Application layer transmission method, electronic device, storage medium and product

By transferring the layer of the target application to shared memory in a desktop operating system compatible with the Android system, the problem of poor running effect of Android applications is solved, and more efficient layer transmission and display is achieved, improving the user experience.

CN119782003APending Publication Date: 2025-04-08深圳开鸿数字产业发展有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411882609.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In desktop operating systems compatible with Android systems, the operating effect of Android applications is poor, resulting in large memory overhead, low synthesis performance, slow transmission rate, and poor user experience.

Method used

By receiving shared memory descriptors sent by the desktop operating system, each target application layer of the target application is transmitted to the shared memory, so that the desktop operating system can directly read and display, avoiding the creation of virtual screens and resource occupation.

Benefits of technology

It significantly improves the transfer rate and synthesis performance of application layers, shortens the time for application opening and layer display, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782003A_ABST
    Figure CN119782003A_ABST
Patent Text Reader

Abstract

The present application discloses an application layer transmission method, electronic device, storage medium and product, which relates to the field of cross-system transmission technology and is applied to the Android operating system. The Android operating system is compatible with the desktop operating system, and various target applications are running in the Android operating system, and each target application is displayed on the desktop operating system, including: for any target application among the target applications, receiving the target shared memory descriptor of the target application sent by the desktop operating system; sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display. The present application solves the technical problem of poor application operation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cross-system transmission technology, and in particular to an application layer transmission method, device, electronic device, storage medium and computer program product. Background Art

[0002] When running Android applications in the current desktop operating system compatible with the Android system, it is usually achieved by creating a virtual screen. However, each time an application is opened, a new virtual screen and the corresponding resources of the virtual screen need to be created. Since the application layers are synthesized one by one according to the number of virtual screens, when too many applications are opened, not only will the memory overhead increase, but it will also seriously affect the synthesis performance and reduce the transmission rate. At the same time, when the application is opened for the first time, the corresponding virtual screen needs to be created. This step is very time-consuming. The user needs to wait a long time for the application to refresh, which affects the overall user experience. Therefore, there is a problem of poor application running effect in the current application operating system compatible with the Android system. Summary of the invention

[0003] The main purpose of this application is to provide an application layer transmission method, device, electronic device, storage medium and computer program product, aiming to solve the technical problem of poor application operation effect.

[0004] To achieve the above-mentioned purpose, the present application proposes an application layer transmission method, which is applied to an Android operating system, wherein the Android operating system is compatible with running on a desktop operating system, wherein each target application is running in the Android operating system, and each target application is correspondingly displayed on the desktop operating system. The application layer transmission method comprises:

[0005] For any one of the target applications, receiving a target shared memory descriptor of the target application sent by the desktop operating system;

[0006] Each target application layer of the target application is sent to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display.

[0007] In one embodiment, before the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, the step further includes:

[0008] Determining an application identifier of the target application;

[0009] In each application layer of each target application, each application layer whose layer identifier matches the application identifier is screened, and each application layer that successfully matches is used as each target application layer of the target application.

[0010] In one embodiment, the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor includes:

[0011] When the number of target application layers of the target application is one, writing the target application layer into a target write position in the shared memory corresponding to the target shared memory descriptor;

[0012] When the number of target application layers of the target application is greater than one, the target application layers are synthesized to obtain a synthesis result, and the synthesis result is written to a target write position in the shared memory corresponding to the target shared memory descriptor.

[0013] In one embodiment, the step of synthesizing the target application layers to obtain a synthesis result includes:

[0014] Determine the corresponding layer sequence of each target application layer of the target application;

[0015] The synthesis order of the target application layers is determined according to the layer sequence, and the target application layers are synthesized based on the synthesis order to obtain the synthesis result.

[0016] In one embodiment, the step of determining the corresponding layer sequence of each target application layer of the target application includes:

[0017] Determine the order of application layers in each target application;

[0018] The application layers are hierarchically sorted according to the sequence, and the layer sequence of each application layer is recorded.

[0019] In one embodiment, before the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, the step further includes:

[0020] Traversing the shared memory, and detecting a writable area in the shared memory;

[0021] In the case where a writable area is detected, determining whether the synthesis result exceeds the boundary of the shared memory after being written;

[0022] In the case that the boundary of the shared memory is not exceeded, the writable area is determined to be the target writing position.

[0023] In one embodiment, the application layer transmission method further includes:

[0024] If a notification of failure to create the shared memory of the desktop operating system or failure to write data into the shared memory is received, a transmission channel with the desktop operating system is established;

[0025] The successfully matched target layers are synthesized and compressed and encrypted to obtain an encrypted layer, and the encrypted layer is transmitted to the desktop operating system through the transmission channel, wherein the desktop operating system is used to decrypt the encrypted layer and display it.

[0026] In addition, to achieve the above purpose, the present application also proposes an application layer transmission device, which is applied to an Android operating system, wherein the Android operating system is compatible with running on a desktop operating system, wherein each target application is running in the Android operating system, and each target application is correspondingly displayed on the desktop operating system, wherein the application layer transmission device comprises:

[0027] A receiving module, configured to receive, for any one of the target applications, a target shared memory descriptor of the target application sent by the desktop operating system;

[0028] The transmission module is used to send each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display.

[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the application layer transmission method as described above.

[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the application layer transmission method described above are implemented.

[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the application layer transmission method described above.

[0032] The present application provides an application layer transmission method, which is applied to an Android operating system. The Android operating system is compatible with running on a desktop operating system. Various target applications are running in the Android operating system, and each target application is displayed on the desktop operating system. The application layer transmission method includes: for any target application among the target applications, receiving a target shared memory descriptor about the target application sent by the desktop operating system; sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display.

[0033] This application receives a shared memory descriptor corresponding to the shared memory created for the target application sent by the desktop operating system, and transmits each target application layer of the target application to the shared memory corresponding to the shared memory descriptor. Through the shared memory descriptor, fast and low-latency data transmission between the two operating systems is achieved, avoiding the complex process of synthesizing virtual screens one by one. The application layer can be displayed on the desktop operating system in real time and accurately, significantly improving performance. By utilizing the fast access of shared memory, the desktop operating system can read the application layer in the shared memory and send it for display, significantly shortening the time for application opening and layer display, and improving user experience. Compared with the related solutions that require the creation of a virtual screen, the memory overhead is large and affects performance. This application directly transmits and displays the layer through shared memory, reducing the creation of the virtual screen and the occupation of resources, improving the transmission rate of the layer, and significantly shortening the time for application opening and layer display, solving the problem of poor application running effect in the current application operating system compatible with the Android system, and providing users with a smoother and more efficient experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the layer transmission method for the present application;

[0037] Figure 2 A flowchart of the second embodiment of the layer transmission method for the present application is provided;

[0038] Figure 3 An overall schematic diagram provided for the layer transfer method used in this application;

[0039] Figure 4 This is a schematic diagram of the module structure of the layer transmission device used in the embodiment of the present application;

[0040] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the layer transmission method applied in the embodiment of the present application.

[0041] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0043] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0044] The embodiment of the present application is applied to the Android operating system, and the Android operating system is compatible with running on the desktop operating system. Various target applications are running in the Android operating system, and each target application is displayed on the desktop operating system. The main solution is: for any target application among the target applications, receive the target shared memory descriptor about the target application sent by the desktop operating system; send each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and displays it.

[0045] In this embodiment, for ease of description, the following description is made taking the Android operating system as the execution subject.

[0046] When running Android applications in the current desktop operating system environment compatible with the Android system, the general practice is to create an independent virtual screen and its supporting resources for each application. This mode requires the system to process each virtual screen one by one when synthesizing application layers. When the number of applications increases, not only does the memory consumption increase sharply, the layer synthesis performance also decreases significantly, the transmission rate is limited, and a new virtual screen needs to be built when the application is started for the first time. This process takes a long time and users need to refresh and wait for a long time, which reduces the overall experience.

[0047] The present application provides a solution by transferring each application layer to the corresponding shared memory and passing it to the desktop operating system for display through the shared memory. This eliminates the need to create a virtual screen, reduces resource usage, improves the efficiency of layer synthesis and transmission rate, and significantly shortens the time it takes to open an application and display a layer.

[0048] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an Android operating system, etc. The following takes the Android operating system as an example to illustrate this embodiment and the following embodiments.

[0049] Based on this, the embodiment of the present application provides an application layer transmission method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the layer transmission method used in this application.

[0050] In this embodiment, the application is applied to the Android operating system, the Android operating system is compatible with the desktop operating system, various target applications are running in the Android operating system, and each target application is correspondingly displayed on the desktop operating system. The application layer transmission method includes steps S01 to S02:

[0051] Step S01, for any one of the target applications, receiving a target shared memory descriptor of the target application sent by a desktop operating system;

[0052] It should be noted that the desktop operating system refers to the host environment in which the Android operating system runs, such as Linux, Openharmony, etc. They provide an interface for users to interact with computers and a series of basic functions. Before data is transmitted with the Android operating system, corresponding shared memories will be created for each target application in the Android operating system. The target application refers to an Android application instance running in a desktop operating system compatible with the Android system. It runs on the Android operating system and needs to be displayed on the desktop operating system, such as games, social media applications, etc. Shared memory refers to a mechanism that allows multiple processes to share the same memory area, which is used to achieve fast data exchange between processes. At the same time, the target shared memory descriptor corresponding to each shared memory is sent to the Android operating system. The target shared memory descriptor is a unique identifier of a shared memory segment allocated by the desktop operating system for a specific Android application, which is used for efficient data transmission between Android applications and the desktop operating system. The system receives the shared memory descriptor sent from the desktop operating system to ensure that subsequent layer data can be accurately transmitted to the specified shared memory area.

[0053] In addition, it should be noted that when the desktop operating system sends the target shared memory descriptor, it also sends the application identifier of the target application. The application identifier refers to a string or code that uniquely identifies an application instance and is used to distinguish different applications, such as application package name, process ID, user ID, etc. After the Android operating system receives the application identifier and the corresponding target shared memory descriptor, it binds them together. By binding the application identifier and the shared memory descriptor, a direct association between the application and the shared memory is achieved, which provides a basis for the rapid transmission and synthesis of subsequent layer data.

[0054] It is understandable that since the traditional solution needs to maintain an independent virtual screen and corresponding layer synthesis resources for each application, this not only increases system overhead, but also limits the improvement of application performance. Therefore, step S01 is performed to establish a communication channel through a shared memory descriptor, which provides a unified and efficient data transmission interface between the Android application and the desktop operating system, which can realize fast data transmission and improve data transmission efficiency.

[0055] Step S02, sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display.

[0056] It should be noted that after receiving the target shared memory descriptor, the shared memory corresponding to the target shared memory descriptor is determined, and the target application layer data to be displayed in the target application is sent to the shared memory. The application layer is part of the application interface, which includes various elements and layouts of the application interface. In the Android system, the application interface is usually composed of multiple layers, which form the final interface display when synthesized. Through the shared memory mechanism, the desktop operating system can directly read the application layer data from the shared memory and perform display operations.

[0057] In addition, it should be noted that before sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, it is necessary to synthesize each target application layer of the target application, determine the display order of each synthesized target layer, and assign an execution number to the reading process of each target layer according to the display order of each synthesized target layer. For any target layer among the synthesized target layers, before the reading process of the target layer is executed, the desktop operating system prohibits the execution of a reading process with an execution number greater than the corresponding execution number of the reading process of the target layer, so as to ensure the continuous display of the image, avoid image tearing caused by frame loss, and improve the user experience.

[0058] It is understandable that since the layer synthesis in the traditional solution is performed one by one according to the number of virtual screens, and the corresponding virtual screen needs to be created when the application is opened for the first time, step S02 is performed. By sending the target application layer data to the shared memory, the centralized management and fast reading of the target application layer data are realized, which significantly improves the synthesis performance and transmission rate, reduces the system overhead, and avoids the time-consuming process of creating a virtual screen when the application is opened for the first time, significantly shortening the time for application opening and layer display, providing users with a smoother and more efficient application usage experience.

[0059] In a feasible implementation manner, in step S02, before the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, steps A01 to A02 are also included:

[0060] Step A01, determining an application identifier of a target application;

[0061] It should be noted that the Android operating system receives the application identifier of the target application sent by the desktop operating system. The application identifier is the application identifier assigned to each target application by the desktop operating system before data transmission. Each Android application has a unique application identifier.

[0062] Step A02 , among the application layers of the target applications, the application layers whose layer identifiers match the application identifiers are screened, and the application layers that successfully match are used as the target application layers of the target applications.

[0063] It should be noted that after determining the application identifier of the target application, the system will screen the application layers whose layer identifiers match the application identifiers in each application layer of each target application. The layer identifier is a unique identifier of the application layer, which is used to distinguish different layers within the same application. For example, an application may contain multiple layers, such as a background layer, a button layer, a text layer, etc. Each layer has a unique layer identifier. During the screening process, the system will compare the layer identifier of each layer with the application identifier of the target application one by one, and use the successfully matched application layers as the target application layers of the target application.

[0064] In this implementation, by screening the matching application layers, the system can accurately identify all relevant layers of the target application, ensuring that the target application layers of the target application can be accurately identified and processed, and achieving precise management and optimization of the application layers, thereby improving the application's operating performance and user experience.

[0065] In a feasible implementation manner, in step S02, the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor includes steps A11 to A12:

[0066] Step A11, when the number of target application layers of the target application is one, writing the target application layer into a target write position in the shared memory corresponding to the target shared memory descriptor;

[0067] It should be noted that when the number of target application layers is one, it means that only one layer in the current application interface needs to be updated or rendered. At this time, there is no need to perform a synthesis operation. The target application layer is directly written to the target write location in the shared memory corresponding to the target shared memory descriptor. The target write location refers to one or more address areas pre-allocated and determined in the shared memory for storing layer data. These locations are accessed based on the target shared memory descriptor to ensure data consistency and synchronization.

[0068] Step A12, when the number of target application layers of the target application is greater than one, synthesize the target application layers to obtain a synthesis result, and write the synthesis result to the target write position in the shared memory corresponding to the target shared memory descriptor.

[0069] It should be noted that when the number of target application layers is greater than one, it indicates that the current application interface contains multiple layers, and a graphics rendering engine (such as OpenGL or Vulkan) is used to synthesize the target application layers into a temporary buffer in a synthesis order to form a synthesis result, that is, the content that is finally displayed on the desktop operating system, and the synthesis result is written to a pre-allocated area in the shared memory.

[0070] In this implementation, when the application interface update only involves a single layer, the layer data is directly written to the shared memory, reducing the intermediate processing steps, so that the layer update can be reflected in the user interface more quickly, improving the response speed and smoothness of the application. When the application interface update involves multiple layers, the layers are synthesized in strict accordance with the synthesis order to ensure the accuracy and consistency of the final displayed content, avoiding layer coverage errors or display abnormalities.

[0071] In a feasible implementation manner, in step A12, after the step of synthesizing the target application layers to obtain a synthesis result, steps A21 to A22 are also included:

[0072] Step A21, determining the corresponding layer sequence of each target application layer of the target application;

[0073] It should be noted that the system counts the number of target application layers that successfully match the target application's layer identifier. If the number of successfully matched layers is greater than one, that is, there are multiple layers that match the target application's layer identifier, then the system needs to further determine the positions of these successfully matched target application layers in the overlay order, that is, their layer order.

[0074] Step A22, determining the synthesis order of each target layer according to the layer sequence, synthesizing each target application layer based on the synthesis order to obtain a synthesis result.

[0075] It should be noted that the system determines the order of the successfully matched target application layers in the final synthesized display interface based on the corresponding layer sequence of each application layer determined in step A21. This order is the synthesis order. The synthesis order refers to the process of synthesizing each layer in order from the bottom layer to the top layer in the final synthesized display interface. This order determines which layers will be synthesized into the display interface first and which layers will be covered by subsequent layers. For example, in a chat application, the layer of the chat window should be synthesized above the layer of the message list to ensure that the user can clearly see the current chat content. If the synthesis order is wrong, it may cause the chat window to be covered by the message list, thereby affecting the user experience. The system synthesizes in order from the bottom layer to the top layer to ensure the correctness and clarity of the final display interface.

[0076] In this implementation, by determining the front and back order of each target application layer, the system can ensure that when the final synthesis display interface is displayed, the various layers can be superimposed on each other in the correct order, thereby avoiding problems such as disordered layer display and incorrect coverage relationship, and providing users with a clearer and more orderly user interface. By sorting the layers in a hierarchical order and recording the layer sequence of each target application layer, the system can achieve effective management of the layers, which can not only improve the efficiency of layer processing, but also avoid problems such as chaotic layer management and display anomalies. At the same time, it provides necessary information support for subsequent layer screening, transmission and synthesis, ensuring the correct display and efficient update of the user interface, and improving the user experience.

[0077] In a feasible implementation manner, in step A21, the step of determining the corresponding layer sequence of each target application layer of the target application includes steps A31 to A32:

[0078] Step A31, determining the order of application layers in each target application;

[0079] It should be noted that the application layers in all target applications are traversed, and the order of each layer on the display interface is determined by reading the layer properties or configuration information. The order refers to the arrangement order of the application layers in the vertical direction. It determines which layer will be seen by the user first and which layer will be covered by other layers. It is usually determined based on the Z-axis position of the layer or a specific layer management strategy to ensure that when the display interface is finally synthesized, the layers can be superimposed in the correct order. For example, in a chat application, the chat window layer should be displayed above the message list layer so that the user can clearly see the current chat content.

[0080] Step A32, sorting the application layers in order, and recording the order of the layers of the application layers.

[0081] It should be noted that after determining the order of each application layer, the layers are sorted in layers according to the order. Specifically, the system will arrange the layers from the bottom to the top and assign a unique layer number to each layer. This layer number represents the position of the layer in the stacking order and can be used for subsequent layer management and processing.

[0082] In this implementation, by determining the front-to-back order of each application layer, the system can ensure the correct position of each layer on the final display interface, avoiding the problem of layer confusion, and providing the necessary basis for subsequent layer hierarchical sorting and recording of layer sequence. By sorting the layers in a front-to-back order and recording the layer sequence of each layer, effective management of the layers is achieved, which not only improves the efficiency of layer processing, but also avoids problems such as layer confusion and display abnormalities. At the same time, it provides necessary information support for subsequent layer transmission and synthesis.

[0083] In a feasible implementation manner, in step S02, before the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, steps A41 to A43 are also included:

[0084] Step A41, traverse the shared memory and detect the writable area in the shared memory;

[0085] It should be noted that the system starts a traversal mechanism, which is responsible for checking each area of ​​the shared memory one by one in a predetermined order (such as from low address to high address). For each traversed area, the system checks its current status mark, which usually includes "occupied", "free (writable)", "read-only", etc. When the system detects that an area is marked as "free (writable)", it will record the location and size of this area for subsequent use. The writable area refers to an area in the shared memory that is not currently occupied by other processes and is allowed to be written according to the memory management policy.

[0086] Step A42, when a writable area is detected, determining whether the written synthesis result exceeds the boundary of the shared memory;

[0087] It should be noted that the space required for the synthesis result is calculated, including the size of the synthesis result itself and possible metadata or padding space, and the space required for the synthesis result is compared with the size of the writable area. At the same time, it is also necessary to consider whether the remaining space after writing is sufficient to cope with future small-scale write needs. The boundary of shared memory refers to the total capacity limit of shared memory, as well as the position and size limit of each writable area relative to the entire shared memory. These boundaries ensure that the system can manage memory resources in an orderly and secure manner.

[0088] Step A43: If the shared memory boundary is not exceeded, the writable area is determined to be the target writing position.

[0089] It should be noted that the system marks the area as the target write location and prepares for subsequent write operations, including setting necessary memory access permissions, updating the memory management table, etc.

[0090] In addition, it should be noted that after confirming that the target layer can be safely written to the writable area without exceeding the boundary of the shared memory, it is determined whether there is a reading process for the first non-writable area or the second non-writable area in the process queue, wherein the first non-writable area is the last non-writable area in the shared memory that is closest to the non-writable area formed after the target layer is written to the shared memory, and the second non-writable area is the next non-writable area in the shared memory that is closest to the non-writable area formed after the target layer is written to the shared memory. If there is a reading process for the first non-writable area in the process queue, the first memory space required for the target layer before the second non-writable area is recorded as the target write position; if there is a reading process for the second non-writable area in the process queue, the second memory space required for the target layer after the first non-writable area is recorded as the target write position; if there is no reading process for the first non-writable area or the second non-writable area in the process queue, the first memory or the second memory is randomly selected as the target write position.

[0091] In this implementation, by accurately identifying the writable area, memory waste and unnecessary allocation are avoided. Through boundary checking, it is ensured that the write operation will not exceed the capacity limit of the shared memory, thereby avoiding system crashes and data loss. Boundary checking also helps prevent data from being mistakenly written to adjacent memory areas, thereby improving data security and integrity. By accurately marking the target write location, confusion and errors in the writing process are avoided, thereby improving system stability and efficiency.

[0092] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 The application layer transmission method further includes steps S11 to S12:

[0093] Step S11, if a notification of failure to create a shared memory of the desktop operating system or failure to write data into the shared memory is received, a transmission channel with the desktop operating system is established;

[0094] It should be noted that the system continuously monitors the interaction process with the desktop operating system. If it detects a notification of failure to create shared memory or fail to write data (which may be caused by insufficient memory, permission issues, system conflicts, etc.), the error handling mechanism will be triggered immediately to establish a direct transmission channel with the desktop operating system, including network socket connections, pipe communications, or specific IPC (inter-process communication) mechanisms. To ensure the security of data transmission, the system will authenticate and encrypt the established transmission channel to prevent data from being intercepted or tampered with during transmission.

[0095] Step S12, synthesizing the successfully matched target layer and then compressing and encrypting it to obtain an encrypted layer, and transmitting the encrypted layer to the desktop operating system through a transmission channel, wherein the desktop operating system is used to decrypt the encrypted layer and display it.

[0096] It should be noted that multiple target layers are synthesized to obtain the final image data, and the image data are compressed. In order to ensure the security of data during transmission, the system will encrypt the compressed image data. The encryption algorithm usually includes symmetric encryption (such as AES) or asymmetric encryption (such as RSA), etc. The encrypted image data (i.e., the encrypted layer) is sent to the desktop operating system through the previously established transmission channel. After receiving the encrypted layer, the desktop operating system uses the corresponding decryption algorithm to decrypt the data. The decrypted image data is decompressed and sent to the display device for display.

[0097] In this embodiment, by providing a backup communication solution, the system can automatically switch to other transmission methods when the shared memory fails, thereby ensuring the continuity of data exchange. Through encryption processing, the security problem in the data transmission process is solved. Through compression processing, the amount of data during transmission is reduced, the transmission efficiency is improved, and the application operation effect is optimized.

[0098] For example, to help understand the technical concept or technical principle of this application, please refer to Figure 3 , Figure 3An overall schematic diagram of an application layer transmission method is provided, wherein A represents a desktop operating system, and B represents an Android operating system. APP1', APP2', and APP3' in the desktop operating system A correspond to APP1, APP2, and APP3 in the Android operating system B, respectively, and represent target applications. The target application runs in the Android operating system B, and a corresponding running interface is displayed in the desktop operating system A. Before starting the target application in the Android operating system B, the desktop operating system A first determines the application identifier corresponding to the target application through a service program and creates a corresponding shared memory for the target application. At the same time, the shared memory corresponding to the shared memory and the application identifier are transmitted to the image synthesizer (SurfaceFlinger) in the Android operating system B through network communication (socket), and the shared memory identifier and the application identifier are bound. When multiple target applications are started in the Android operating system B, the application layers of each target application are sorted in a front-to-back order. For example, APP 1, layer1, layer2, layer4 corresponding to APP2, APP3 are arranged in the first layer, and layer3 corresponding to APP2 is arranged in the second layer. When the application layers are synthesized, the application layers whose application identifiers match the layer identifiers of the target application are searched. The application layers finally screened out are the application layers that need to be synthesized by the target application. The screened application layers are synthesized through the image synthesizer (SurfaceFlinger) and transmitted to the corresponding SHM (shared memory). For example, APP1 corresponds to SHM1 (shared memory 1), APP2 corresponds to SHM2 (shared memory 2), and APP3 corresponds to SHM3 (shared memory 3). In desktop operating system A, the synthesized application layers are taken from the corresponding SHM (shared memory) and displayed. For example, the data in SHM2 (shared memory 2) is displayed to the corresponding APP2', where the running interface of APP2 is displayed, which is composed of layer2 and layer3.

[0099] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the layer transmission method used in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0100] The present application also provides an application layer transmission device, which is applied to an Android operating system. The Android operating system is compatible with running on a desktop operating system. Various target applications are running in the Android operating system, and each target application is displayed on the desktop operating system. Please refer to Figure 4 , the application layer transmission device comprises:

[0101] The receiving module 10 is used for receiving, for any one of the target applications, a target shared memory descriptor of the target application sent by the desktop operating system;

[0102] The transmission module 20 is used to send each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display.

[0103] Optionally, the application layer transmission device further includes a matching module 30, and the matching module 30 is further used for:

[0104] Determine an application identifier of the target application;

[0105] In each application layer of each target application, each application layer whose layer identifier matches the application identifier is screened, and each successfully matched application layer is used as each target application layer of the target application.

[0106] Optionally, the transmission module 20 is further used for:

[0107] When the number of target application layers of the target application is one, writing the target application layer into a target write position in the shared memory corresponding to the target shared memory descriptor;

[0108] When the number of target application layers of the target application is greater than one, the target application layers are synthesized to obtain a synthesis result, and the synthesis result is written to a target write position in the shared memory corresponding to the target shared memory descriptor.

[0109] Optionally, the transmission module 20 is further used for:

[0110] Determine the corresponding layer sequence of each target application layer of the target application;

[0111] The synthesis order of each target layer is determined according to the layer sequence, and each target application layer is synthesized based on the synthesis order to obtain a synthesis result.

[0112] Optionally, the transmission module 20 is further used for:

[0113] Determine the order of application layers in each target application;

[0114] Sort the application layers in order, and record the order of each application layer.

[0115] Optionally, the application layer transmission device further includes a determination module 40, and the determination module 40 is further configured to:

[0116] Traverse the shared memory and detect writable areas in the shared memory;

[0117] When a writable area is detected, it is determined whether the written synthesis result exceeds the boundary of the shared memory;

[0118] If the shared memory boundary is not exceeded, the writable area is determined to be the target write location.

[0119] Optionally, the application layer transmission device further includes a second transmission module 50, and the second transmission module 50 is further used for:

[0120] If a notification is received that the shared memory creation of the desktop operating system fails, or that data writing in the shared memory fails, a transmission channel with the desktop operating system is established;

[0121] The successfully matched target layers are synthesized and compressed and encrypted to obtain an encrypted layer, which is then transmitted to a desktop operating system through a transmission channel, wherein the desktop operating system is used to decrypt the encrypted layer and display it.

[0122] The application layer transmission device provided by the present application adopts the application layer transmission method in the above embodiment, which can solve the technical problem of poor application operation effect. Compared with the prior art, the beneficial effects of the application layer transmission device provided by the present application are the same as the beneficial effects of the application layer transmission method provided by the above embodiment, and other technical features in the application layer transmission device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0123] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the application layer transmission method in the above-mentioned embodiment one.

[0124] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, PADs (Portable Application Description: tablet computers), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0125] like Figure 5As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0126] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0127] The electronic device provided by the present application adopts the application layer transmission method in the above embodiment to solve the technical problem of poor application operation effect. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the application layer transmission method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0128] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0130] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the application layer transmission method in the above-mentioned embodiment.

[0131] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0132] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0133] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the application layer transmission device is applied to the Android operating system. The Android operating system is compatible with running on the desktop operating system. Various target applications are running in the Android operating system, and each target application is displayed on the desktop operating system accordingly. For any target application among the target applications, the target shared memory descriptor about the target application sent by the desktop operating system can be received; each target application layer of the target application is sent to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display.

[0134] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0135] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0137] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned application layer transmission method, and can solve the technical problem of poor application operation effect. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the application layer transmission method provided by the above-mentioned embodiment, and will not be repeated here.

[0138] The present application also provides a computer program product, including a computer program, which implements the steps of the application layer transmission method as described above when the computer program is executed by a processor.

[0139] The computer program product provided by this application can solve the technical problem of poor application operation effect. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the application layer transmission method provided by the above embodiment, which will not be repeated here.

[0140] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An application layer transmission method, characterized in that: Applied to an Android operating system, the Android operating system is compatible with running on a desktop operating system, each target application is running in the Android operating system, and each target application is correspondingly displayed on the desktop operating system. The application layer transmission method includes: For any one of the target applications, receiving a target shared memory descriptor of the target application sent by the desktop operating system; Each target application layer of the target application is sent to the shared memory corresponding to the target shared memory descriptor, so that the desktop operating system reads the application layer in the shared memory and sends it for display.

2. The application layer transmission method according to claim 1, characterized in that: Before the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, the step further includes: Determining an application identifier of the target application; In each application layer of each target application, each application layer whose layer identifier matches the application identifier is screened, and each application layer that successfully matches is used as each target application layer of the target application.

3. The application layer transmission method according to claim 1, characterized in that: The step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor comprises: When the number of target application layers of the target application is one, writing the target application layer into a target write position in the shared memory corresponding to the target shared memory descriptor; When the number of target application layers of the target application is greater than one, the target application layers are synthesized to obtain a synthesis result, and the synthesis result is written to a target write position in the shared memory corresponding to the target shared memory descriptor.

4. The application layer transmission method according to claim 3, characterized in that: The step of synthesizing the target application layers to obtain a synthesis result comprises: Determine the corresponding layer sequence of each target application layer of the target application; The synthesis order of the target application layers is determined according to the layer sequence, and the target application layers are synthesized based on the synthesis order to obtain the synthesis result.

5. The application layer transmission method according to claim 4, characterized in that: The step of determining the corresponding layer sequence of each target application layer of the target application comprises: Determine the order of application layers in each target application; The application layers are hierarchically sorted according to the sequence, and the layer sequence of each application layer is recorded.

6. The application layer transmission method according to claim 3, characterized in that: Before the step of sending each target application layer of the target application to the shared memory corresponding to the target shared memory descriptor, the step further includes: Traversing the shared memory, and detecting a writable area in the shared memory; In the case where a writable area is detected, determining whether the synthesis result exceeds the boundary of the shared memory after being written; In the case that the boundary of the shared memory is not exceeded, the writable area is determined to be the target writing position.

7. The application layer transmission method according to claim 1, characterized in that: The application layer transmission method further includes: If a notification of failure to create the shared memory of the desktop operating system or failure to write data into the shared memory is received, a transmission channel with the desktop operating system is established; The successfully matched target layers are synthesized and compressed and encrypted to obtain an encrypted layer, and the encrypted layer is transmitted to the desktop operating system through the transmission channel, wherein the desktop operating system is used to decrypt the encrypted layer and display it.

8. An electronic device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the application layer transmission method as described in any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the application layer transmission method as described in any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the steps of the application layer transmission method as described in any one of claims 1 to 7.