WO2023077858A1 - 应用栈管理方法、装置、电子设备和存储介质 - Google Patents

应用栈管理方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2023077858A1
WO2023077858A1 PCT/CN2022/105300 CN2022105300W WO2023077858A1 WO 2023077858 A1 WO2023077858 A1 WO 2023077858A1 CN 2022105300 W CN2022105300 W CN 2022105300W WO 2023077858 A1 WO2023077858 A1 WO 2023077858A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
target
manager
operating system
stack
Prior art date
Application number
PCT/CN2022/105300
Other languages
English (en)
French (fr)
Inventor
李京
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023077858A1 publication Critical patent/WO2023077858A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to an application stack management method, device, electronic equipment, storage medium, computer program product and computer program.
  • the Linux operating system can support the application program running the Android (Android) operating system.
  • the Linux operating system supports the application programs of the Android operating system
  • the application programs of the Linux operating system are usually added to an application stack for management, and the application programs of the Android operating system are Program additions are managed in another application stack.
  • the embodiments of the present disclosure provide an application stack management method, device, electronic equipment, storage medium, computer program product and computer program.
  • the present disclosure provides an application stack management method, which is applied to an electronic device, and the electronic device runs a first operating system and a second operating system running in the first operating system in a containerized manner.
  • the method is characterized in that include:
  • the first target application is an application program of the second operating system included in the first operating system
  • the first target operation is an operation of the first target application triggered on a current application of the first operating system
  • controlling the first operating system to adjust the first target operation according to the first target operation A target application and the position of the current application in the first application stack.
  • the first operating system includes a first application manager
  • the second operating system includes a second application manager
  • the method further includes:
  • the performing the first target operation includes:
  • the controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation includes:
  • the controlling the first application includes:
  • the desktop controlling the first operating system sends the start operation request to the first target application through the first application manager and the second application manager;
  • start operation is the start operation of the first target application triggered by the user on the current application
  • control of the first application manager to the first target application through the second application manager The application sends a start operation request including:
  • controlling the current application to send the start operation request to the first target application through the first application manager and the second application manager.
  • the first operating system further includes a window manager
  • the executing the first target operation includes:
  • controlling the window manager to switch the window of the first target application to the background, and controlling the window manager to send a background switching success message to the first application manager;
  • the controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation includes:
  • controlling the first application manager to move the position of the first target application down by one bit in the direction of the bottom of the stack in the first application stack, and adjust the current application to the top of the stack.
  • the first operating system further includes a task manager
  • the executing the first target operation includes:
  • controlling the window manager to switch the window of the first target application to the foreground, and controlling the window manager to send a foreground switching success message to the first application manager;
  • the controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation includes:
  • Controlling the first application manager to move the position of the current application down one bit in the direction of the bottom of the stack in the first application stack, and adjust the first target application to the top of the stack.
  • the executing the first target operation includes:
  • controlling the task manager to send a shutdown operation request to the first target application through the first application manager and the second application manager;
  • the controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation includes:
  • the method after controlling the first application manager to add the first target application at the top of the first application stack, the method further includes:
  • controlling the first operating system to adjust positions of the second target application, the first target application, and the current application in the first application stack according to the second target operation.
  • the method when the startup operation is a startup operation of the first target application triggered by a user on the desktop of the first operating system, the method further includes:
  • the present disclosure also provides an application stack management device, including:
  • a first acquiring unit configured to acquire a first target operation of a user on a first target application; wherein, the first target application is an application program of a second operating system included in the first operating system;
  • a first execution unit configured to execute the first target operation
  • a first control unit configured to, when determining that the first target operation is an operation of the first target application triggered on a current application of the first operating system, control the first operating system according to the first operating system.
  • a target operation adjusts the positions of the first target application and the current application in the first application stack.
  • the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor.
  • the processor executes the program, it implements the application stack management described in any of the above. method steps.
  • the present disclosure also provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the application stack management methods described above are implemented.
  • the present disclosure also provides a computer program product, including a computer program.
  • a computer program product including a computer program.
  • the steps of any one of the application stack management methods described above are implemented.
  • the present disclosure also provides a computer program.
  • the computer program When the computer program is executed by a processor, the steps of any one of the application stack management methods described above are implemented.
  • the present disclosure provides an application stack management method, device, electronic equipment, storage medium, computer program product, and computer program, in which the first target operation of the user on the first target application of the second operating system is obtained on the first operating system , execute the first target operation, and after the execution of the first target operation ends, when it is determined that the first target operation is the operation of the first target application triggered on the current application of the first operating system, control the first operating system according to the first target
  • the operation adjusts the positions of the first target application and the current application in the first application stack, and the starting relationship between the current application of the first operating system and the first target application of the second operating system is reflected in the first application stack, so as to facilitate
  • the first operating system determines the applications to be displayed on the current desktop according to the first application stack.
  • FIG. 1 is one of the schematic flow diagrams of the application stack management method provided by the present disclosure
  • FIG. 2 is the second schematic flow diagram of the application stack management method provided by the present disclosure
  • Fig. 3 is the third schematic flow diagram of the application stack management method provided by the present disclosure.
  • Fig. 4 is one of the schematic structural diagrams of the first application stack provided by the present disclosure.
  • FIG. 5 is the fourth schematic flow diagram of the application stack management method provided by the present disclosure.
  • FIG. 6 is the fifth schematic flow diagram of the application stack management method provided by the present disclosure.
  • FIG. 7 is the sixth schematic flow diagram of the application stack management method provided by the present disclosure.
  • Fig. 8 is the seventh schematic flow diagram of the application stack management method provided by the present disclosure.
  • FIG. 9 is the second structural diagram of the first application stack provided by the present disclosure.
  • FIG. 10 is a schematic structural diagram of an application stack management device provided by the present disclosure.
  • Fig. 11 is a schematic diagram of the physical structure of the electronic device provided by the present disclosure.
  • the electronic device is provided with at least two systems, such as a first operating system and a second operating system, and the second operating system runs in a containerized manner on in the first operating system.
  • containerization is a Linux container (Linux Container, LXC) implemented based on the characteristics of the Linux kernel, which makes full use of the characteristics of control groups (Control group) and namespace (Namespace) to isolate processes and resources , enabling efficient and lightweight implementation of the second operating system.
  • the electronic device may be a mobile device such as a mobile phone or a tablet computer.
  • the first operating system and the second operating system may be the same, for example, both the first operating system and the second operating system are Linux or both are Android; the first operating system and the second operating system are both Linux or Android;
  • the second operating system may also be different, for example, one of the first operating system and the second operating system is Linux, and the other is Android.
  • the Android application icon and the Linux application icon are displayed on the desktop of the Linux system side at the same time, and the user can click the Android application icon to perform related operations on the Android application.
  • the task manager on the side displays application screenshots of all running Android applications and Linux applications, and the user clicks on an application screenshot in the task manager to pull the application corresponding to the application screenshot to the foreground to run; the user You can also close the corresponding application by taking a screenshot of the application from the task manager, so that the application can exit normally.
  • an application program APP generally refers to an application having one or more functions in an operating system, such as instant messaging software, shopping software, music player, video player, and the like.
  • the application programs of the Linux operating system are usually added to an application stack for management, and the application programs of the Android operating system are Program additions are managed in another application stack.
  • the application program of the Linux operating system calls the application program of the Android operating system, or when the application program of the Android operating system calls the application program of the Linux operating system, the startup between the application program of the Linux operating system and the application program of the Android operating system cannot be reflected. relation.
  • the application stack management method of the present disclosure is described below with reference to FIGS. 1-9 .
  • Fig. 1 is one of the flow diagrams of the application stack management method provided by the present disclosure. As shown in Fig. 1, the method provided by this embodiment is applied to an electronic device, and the electronic device runs a first operating system and runs in a containerized manner In the second operating system in the first operating system, the method includes:
  • Step 110 acquiring a first target operation of the user on the first target application.
  • the first target application is an application program of the second operating system included in the first operating system.
  • Step 120 execute the first target operation.
  • the specific process of executing the first target operation is also different, please refer to the description of the following embodiments for details.
  • Step 130 When it is determined that the first target operation is an operation of the first target application triggered on the current application of the first operating system, control the first operating system to adjust The positions of the first target application and the current application in the first application stack.
  • the first target operation when it is determined that the first target operation is executed, it is also necessary to determine whether the first target operation is an operation triggered on the current application of the first operating system.
  • the first operating system is controlled to adjust the positions of the first target application and the current application in the first application stack according to the first target operation, reflecting the start-up relationship between the applications of the two operating systems.
  • each first target application of the second operating system corresponds to a proxy object of the first target application on the side of the first operating system, and each proxy object of the first target application includes the name information and the corresponding current state; in the second operating system, the name information of the first target application is also stored in correspondence with the current state, so as to realize the first target application in the first operating system and the first target application in the second operating system
  • the state of the target application is synchronized.
  • the application stack management method executes the first target operation when the user obtains the first target operation of the first target application of the second operating system on the first operating system, and executes the first target operation after the execution of the first target operation , when determining that the first target operation is an operation of the first target application triggered on the current application of the first operating system, controlling the first operating system to adjust the first target application and the current application in the first application stack according to the first target operation
  • the first application stack embodies the start-up relationship between the current application of the first operating system and the first target application of the second operating system, so that the first operating system can determine the current desktop to be displayed according to the first application stack. application.
  • the first operating system includes a first application manager
  • the second operating system includes a second application manager
  • the method further includes the following steps:
  • executing the first target operation may be implemented in the following manner:
  • controlling the first application manager to send a start operation request to the first target application through the second application manager; controlling the first target application to execute the first target operation, and controlling the first target application
  • the application sends a launch success message to the first application manager through the second application manager.
  • the startup operation is the startup operation of the first target application triggered by the user on the desktop of the first operating system
  • controlling the desktop of the first operating system through the first application manager and the second application manager sending the launch operation request to the first target application.
  • start operation is the start operation of the first target application triggered by the user on the current application
  • control the current application to send the information to the The first target application sends the start operation request.
  • controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation may be implemented in the following manner:
  • FIG. 2 is the second schematic flow diagram of the application stack management method provided by the present disclosure.
  • the first operating system includes the first application manager and the desktop of the first operating system
  • the second operating system includes the first Two application managers and the first target application
  • the socket (socket) connection between the first application manager and the second application manager can be connected inside the electronic device to realize the connection between the first operating system and the second operating system Interaction
  • Figure 2 is a scenario where the desktop of the first operating system starts the first target application
  • the specific application stack management process is: Step 201, establishing a communication connection between the first application manager and the second application manager;
  • Step 202 the user triggers the start operation of the first target application of the second operating system on the desktop of the first operating system;
  • step 203 when the desktop of the first operating system detects the user's start operation of the first target application, it sends a message to the first target application.
  • the application manager sends a start operation request, and the start operation request is used to request to start the first target application; step 204, when the first application manager receives the start operation request, it parses the start operation request to obtain the first target application identification information, according to the identification information of the first target application, it is determined whether the first target application is an application program of the second operating system, and when it is determined that the first target application is an application program of the second operating system, the first application manager sends The second application manager of the operating system sends a start operation request; step 205, the second application manager forwards the received start operation request to the first target application; step 206, when the first target application receives the start operation request , execute the startup operation, that is, place the first target application on the foreground for display; step 207, the first target application returns a startup success message to the second application manager; step 208, the second application manager forwards the startup success message to the first The first application manager of the operating system; step 209, when the first application manager receives the startup success message, it determines
  • the first application manager further includes step 210, adding The current state of the first target application is set as the foreground running state.
  • the current state of the first target application may also be set as the foreground running state.
  • the current state of the first target application in the second operating system is the same as the current state of the first target application in the first operating system, and both are in the foreground running state, thereby realizing the application in the first operating system and the second operating system. Synchronization of state.
  • FIG. 3 is the third schematic flow diagram of the application stack management method provided by the present disclosure.
  • the first operating system includes the first application manager and the current application
  • the second operating system includes the second application manager and the first target application.
  • FIG. 3 is a scenario where the current application of the first operating system starts the first target application.
  • step 301 establishing a link between the first application manager and the second application manager Communication connection
  • step 302 the user triggers the start operation of the first target application of the second operating system in the current application of the first operating system running on the first operating system
  • step 303 the current application of the first operating system detects When the user performs a start-up operation on the first target application, a start-up operation request is sent to the first application manager, and the start-up operation request is used to request start-up of the first target application
  • Step 304 the first application manager receives the start-up operation request , the identification information of the first target application is obtained by parsing the start operation request, and it is determined whether the first target application is an application program of the second operating system according to the identification information of the first target application.
  • the first application manager sends a start operation request to the second application manager of the second operating system; step 305, the second application manager forwards the received start operation request to the first target application; Step 306, when the first target application receives the start operation request, execute the start operation, that is, place the first target application on the foreground for display; Step 307, the first target application returns a start success message to the second application manager; Step 308, The second application manager forwards the startup success message to the first application manager of the first operating system; step 309, when the first application manager receives the startup success message, it determines that the first operating system has installed the first target application At this time, the first target application is added to the top of the first application stack, and at this time, in the first application stack, the current application is located at the bottom of the first target application, so that the first application manager can The positional relationship between the first target application and the current application in the first application stack displays the first target application in the foreground, and puts the current application in the background; FIG. 4 is one of the structural diagrams
  • the first application manager further includes step 310, adding The current state of the first target application is set as the foreground running state.
  • the current state of the first target application can also be set as the foreground running state, so as to realize the integration of the application states in the first operating system and the second operating system. Synchronize.
  • the second application manager when the second application manager receives the startup success message sent by the first target application, it may also set the current state of the first target application as the foreground running state on the side of the second operating system.
  • the first operating system further includes a window manager; when the first target operation includes a background switching operation, executing the first target operation may be implemented in the following manner:
  • controlling the desktop of the first operating system to send a background switching operation request to the window manager; controlling the window manager to switch the window of the first target application to the background, and controlling the window manager to send the window manager to the background
  • the first application manager sends a background switching success message.
  • controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation may be implemented in the following manner:
  • controlling the first application manager to move the position of the first target application down by one bit in the direction of the bottom of the stack in the first application stack, and adjust the current application to the top of the stack.
  • FIG. 5 is the fourth schematic flow diagram of the application stack management method provided by the present disclosure.
  • the first operating system includes a first application manager, a desktop and a window manager of the first operating system, and a second
  • the operating system includes a second application manager and a first target application.
  • FIG. 5 is a scenario based on switching the started first target application from the foreground to the background in the first operating system.
  • Step 501 The user triggers the background switching operation of the first target application of the second operating system on the desktop of the first operating system (for example, the user clicks the minimized icon in the first target application window or clicks the home button); step 502, the first operation When the desktop of the system detects the user's background switching operation on the first target application, it sends a background switching operation request to the window manager and the first application manager respectively, and the background switching operation request is used to request that the first target application be removed from the foreground.
  • the desktop of the system detects the user's background switching operation on the first target application, it sends a background switching operation request to the window manager and the first application manager respectively, and the background switching operation request is used to request that the first target application be removed from the foreground.
  • step 503 when the window manager receives the background switching operation request, minimize the window of the first target application and place it in the background; step 504, the window manager sends a background switching success message to the first application manager ; Step 505, when the first application manager receives the background switching success message, in the first application stack, the position of the first target application is moved down one bit along the bottom direction of the stack, and the current application is adjusted to the top of the stack . In this way, the first application manager can display the current application in the foreground and put the first target application in the background according to the positional relationship between the first target application and the current application in the first application stack.
  • step 506 is also included.
  • the first application manager receives the background switching success message sent by the window manager, it also needs to analyze the background switching operation request to obtain the first target According to the identification information of the application, it is determined whether the first target application is an application program of the second operating system according to the identification information of the first target application.
  • the first application manager When it is determined that the first target application is an application program of the second operating system, the first application manager sends The second application manager of the second operating system sends a background switching operation request; step 507, the second application manager forwards the received background switching operation request to the first target application; step 508, the first target application receives When the background switching operation request is made, the window of the first target application is minimized so that the first target application is in the background; step 509, the first target application returns a background switching success message to the second application manager; step 510, the second application manager When receiving the background switching success message, adjust the position of the first target application in its own application stack according to all the applications currently running in the second operating system, and set the current state of the first target application to the background freezing state; step 511 , the second application manager also forwards the background switching success message to the first application manager of the first operating system; Step 512, when the first application manager receives the background switching success message, it determines that the first operating system has already transferred the first application manager to the first operating system.
  • a target application is switched from the foreground to the background.
  • the current state of the first target application is set to the background frozen state in the proxy object of the created target application.
  • the first operating system is notified.
  • the target application of the kernel is in a frozen state.
  • the kernel of the first operating system receives the notification message, the target application is prohibited from obtaining the focus, which means that the first target application is deprived of the central processing unit (Central Processing Unit, CPU for short). ) time slice.
  • the current state of the first target application in the second operating system is the same as the current state of the first target application in the first operating system, realizing the synchronization of the application states in the first operating system and the second operating system.
  • the first operating system further includes a task manager; when the first target operation includes a foreground switching operation, executing the first target operation may be implemented in the following manner:
  • controlling the task manager to send a foreground switching operation request to the window manager; controlling the window manager to switch the window of the first target application to the foreground, and controlling the window manager to switch the window of the first application to the foreground
  • the manager sends a foreground switching success message.
  • controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation may be implemented in the following manner:
  • Controlling the first application manager to move the position of the current application down one bit in the direction of the bottom of the stack in the first application stack, and adjust the first target application to the top of the stack.
  • FIG. 6 is the fifth schematic flow diagram of the application stack management method provided by the present disclosure.
  • the first operating system includes a first application manager, a task manager, and a window manager
  • the second operating system includes The second application manager and the first target application.
  • FIG. 6 is a scenario based on switching the started first target application from the background to the foreground in the first operating system.
  • the specific application stack management process is as follows: step 601, the user The task manager of an operating system triggers the foreground switching operation of the first target application of the second operating system (for example, the user clicks the icon thumbnail of the first target application in the task manager); step 602, the task manager detects When the user performs a foreground switching operation on the first target application, a foreground switching operation request is sent to the window manager; step 603, when the window manager receives the foreground switching operation request, the window of the first target application is placed in the foreground; step 604 , the window manager sends the foreground switch success message to the first application manager through the task manager; Step 605, when the first application manager receives the foreground switch success message, it will move the position of the current application along the Move down one bit in the direction of the bottom of the stack, and adjust the first target application to the top of the stack. In this way, the first application manager can display the first target application in the foreground and put the current application in the background according to the positional relationship between the first target
  • step 606 the task manager sends a foreground switching operation request to the first application manager, and the foreground switching operation request is used to request switching the first target application from the background to the foreground;
  • Step 607 When the first application manager receives the foreground switching operation request, it parses the foreground switching operation request to obtain the identification information of the first target application, and determines whether the first target application is the first target application according to the identification information of the first target application.
  • the application program of the second operating system when determining that the first target application is an application program of the second operating system, the first application manager sends a foreground switching operation request to the second application manager of the second operating system; step 608, the second The application manager then forwards the received foreground switching operation request to the first target application; step 609, when the first target application receives the foreground switching operation request, it displays the window of the first target application on the desktop, so that the first target application The application is in the foreground; step 610, the first target application returns a foreground switching success message to the second application manager; step 611, the second application manager, when receiving the foreground switching success message, The program adjusts the position of the first target application in its own application stack, and sets the current state of the first target application as the foreground running state; step 612, the second application manager also forwards the foreground switching success message to the first operating system's The first application manager; step 613, when the first application manager receives the foreground switching success message, it is determined that the
  • the kernel of the first operating system When the first target application is in the foreground running state, the kernel of the first operating system is notified that the target application is already in the foreground running state. The kernel of the first operating system is in the foreground running state.
  • the notification message When the notification message is received, the target application is allowed to acquire the focus, and can occupy a CPU time slice to run normally. In this way, the current state of the first target application in the second operating system is the same as the current state of the first target application in the first operating system, thereby realizing synchronization of application states in the first operating system and the second operating system.
  • performing the first target operation may be implemented in the following manner:
  • controlling the task manager to send a closing operation request to the first target application through the first application manager and the second application manager; controlling the first target application to execute the closing operation, and controlling all The first target application sends a shutdown success message to the first application manager through the second application manager.
  • controlling the first operating system to adjust the positions of the first target application and the current application in the first application stack according to the first target operation may be implemented in the following manner:
  • the first application manager is controlled to perform a pop operation of the first target application in the first application stack.
  • FIG. 7 is the sixth schematic flow diagram of the application stack management method provided by the present disclosure.
  • the first operating system includes a first application manager and a task manager
  • the second operating system includes a second application manager and the first target application
  • FIG. 7 is a scenario based on closing the first target application in the task manager of the first operating system.
  • the specific application stack management process is: Step 701.
  • the user triggers the second operation in the task manager Closing operation of the first target application of the system; step 702, when the task manager detects the closing operation of the first target application by the user, it sends a closing operation request to the first application manager, and the closing operation request is used to request to close the first target application A target application; step 703, when the first application manager receives the closing operation request, it parses the closing operation request to obtain the identification information of the first target application, and determines whether the first target application is based on the identification information of the first target application is an application program of the second operating system, when it is determined that the first target application is an application program of the second operating system, the first application manager sends a closing operation request to the second application manager of the second operating system; step 704, the second The second application manager forwards the received closing operation request to the first target application; step 705, the first target application executes the closing operation when receiving the closing operation request; step 706, the first target application sends the second application management The device returns a closing success message; step 707, the second application manager forward
  • the first application manager performs a pop-up operation of the first target application in the first application stack. After the first target application is popped out, if the first target application Start, then display the desktop at this time; if the first target application is started from the current application program, then display the current application at this time; Step 709, delete the created proxy object of the first target application.
  • the current state of the first target application in the second operating system is the same as the current state of the first target application in the first operating system, both of which are in the closed state, thereby realizing the application in the first operating system and the second operating system Synchronization of state.
  • the method further includes the following steps:
  • the second target application is an application program of the first operating system or an application program of the second operating system; the second target operation may be the start operation of the second target application, or the background operation of the second target application A switching operation, or a foreground switching operation of the second target application, or a closing operation of the second target application.
  • FIG. 8 is the seventh schematic flow diagram of the application stack management method provided by the present disclosure.
  • the first operating system includes a first application manager and a second target application
  • the second operating system includes a second application The manager and the first target application.
  • FIG. 8 is a scene of the start operation of the second target application of the first operating system triggered by the user on the started first target application in the first operating system.
  • Step 801 the user triggers the start operation of the second target application of the second operating system in the first target application; Step 802, when the first target application of the second operating system detects the start operation of the second target application by the user, Send a start operation request to the second application manager, where the start operation request is used to request to start the second target application; step 803, when receiving the start operation request, the second application manager parses the start operation request to obtain the second
  • the identification information of the target application determines whether the second target application is an application program of the first operating system according to the identification information of the second target application.
  • the second application manager When determining that the second target application is an application program of the first operating system, the second application manager Send a start operation request to the first application manager of the first operating system; step 804, the first application manager forwards the received start operation request to the second target application; step 805, the second target application receives the start operation request When an operation request is made, perform a startup operation, that is, place the second target application on the foreground for display; step 806, the second target application returns a startup success message to the first application manager; step 807, the first application manager receives the startup success message , add the second target application at the top of the first application stack, and at this time in the first application stack, the first target application is located between the current application and the second target application, so that the first application manager
  • the second target application may be displayed in the foreground according to the positional relationship among the first target application, the second target application and the current application in the first application stack, and the first target application and the current application may be placed in the background.
  • Fig. 9 is the second structural diagram of the first application stack provided by the present disclosure. As shown in Fig. 9, the second target application of the first operating system points to the stack top of the first application stack, and the current application of the first operating system points to the At the bottom of an application stack, the first target application of the second operating system is located between the second target application and the current application.
  • the background switching operation, foreground switching operation, and closing operation for the second target application are similar to the background switching operation, foreground switching operation, and closing operation of the first target application. Corresponding descriptions of the background switching operation, the foreground switching operation, and the closing operation will not be repeated here.
  • the method when the launching operation is the launching operation of the first target application triggered by the user on the desktop of the first operating system, the method further includes the following steps:
  • the second application stack is a stack that only stores the first target application.
  • the first application manager adds the first target application to the top of the second application stack, realizing Separate management of the first target application triggered from the desktop; in this way, when the first target application is closed, the first application manager controls the first target application to perform a stack operation in the second application stack, and the desktop is displayed at this time.
  • the application stack management device provided by the present disclosure is described below, and the application stack management device described below and the application stack management method described above can be referred to in correspondence.
  • Fig. 10 is a schematic structural diagram of an application stack management device provided by the present disclosure. As shown in Fig. 10 , the application stack management device includes a first acquisition unit 1010, a first execution unit 1020, and a first control unit 1030; wherein:
  • the first acquiring unit 1010 is configured to acquire a user's first target operation on a first target application; wherein, the first target application is an application program of the second operating system included in the first operating system;
  • a first executing unit 1020 configured to execute the first target operation
  • the first control unit 1030 is configured to, when it is determined that the first target operation is an operation of the first target application triggered on the current application of the first operating system, control the first operating system to The first target operation adjusts the positions of the first target application and the current application in the first application stack.
  • the application stack management device executes the first target operation when the user's first target operation on the first target application of the second operating system is obtained on the first operating system, and after the execution of the first target operation is completed , when determining that the first target operation is an operation of the first target application triggered on the current application of the first operating system, controlling the first operating system to adjust the first target application and the current application in the first application stack according to the first target operation
  • the first application stack embodies the start-up relationship between the current application of the first operating system and the first target application of the second operating system, so that the first operating system can determine the current desktop to be displayed according to the first application stack. application.
  • the first operating system includes a first application manager, and the second operating system includes a second application manager; the device further includes an establishment unit;
  • an establishing unit configured to establish a connection between the first application manager and the second application manager
  • the first execution unit 1020 is specifically configured to:
  • the first control unit 1030 is specifically used for:
  • the first execution unit 1020 is further specifically configured to:
  • the desktop controlling the first operating system sends a start operation request to the first target application through the first application manager and the second application manager.
  • the first execution unit 1020 is further specifically configured to:
  • controlling the current application to send a start operation request to the first target application through the first application manager and the second application manager.
  • the first operating system further includes a window manager; when the first target operation includes a background switching operation, the first execution unit 1020 is further specifically configured to:
  • controlling the window manager to switch the window of the first target application to the background, and controlling the window manager to send a background switching success message to the first application manager;
  • the first control unit 1030 is also specifically configured to:
  • controlling the first application manager to move the position of the first target application down by one bit in the direction of the bottom of the stack in the first application stack, and adjust the current application to the top of the stack.
  • the first operating system further includes a task manager; when the first target operation includes a foreground switching operation, the first execution unit 1020 is further specifically configured to:
  • controlling the window manager to switch the window of the first target application to the foreground, and controlling the window manager to send a foreground switching success message to the first application manager;
  • the first control unit 1030 is also specifically configured to:
  • Controlling the first application manager to move the position of the current application down one bit in the direction of the bottom of the stack in the first application stack, and adjust the first target application to the top of the stack.
  • the first execution unit 1020 is further specifically configured to:
  • controlling the task manager to send a shutdown operation request to the first target application through the first application manager and the second application manager;
  • the first control unit 1030 is also specifically configured to:
  • the device further includes a second acquisition unit, a second execution unit, and a second control unit;
  • the second acquiring unit is configured to acquire the second target operation of the second target application triggered by the user on the first target application; wherein the second target application is an application program of the first operating system or the applications for the second operating system;
  • a second execution unit configured to execute the second target operation
  • a second control unit configured to control the first operating system to adjust the positions of the second target application, the first target application, and the current application in the first application stack according to the second target operation .
  • the device further includes a third control unit
  • a third control unit configured to control the first application manager to add the first target application to the top of a second application stack; wherein, the second application stack only stores the first target application stack.
  • Fig. 11 is a schematic diagram of the physical structure of the electronic device provided by the present disclosure.
  • the electronic device may include: a processor (processor) 1110, a communication interface (Communications Interface) 1120, a memory (memory) 1130 and a communication bus 1140 , wherein, the processor 1110 , the communication interface 1120 , and the memory 1130 communicate with each other through the communication bus 1140 .
  • the processor 1110 may call the logic instructions in the memory 1130 to execute the application stack management method, the method includes: obtaining a first target operation of the user on the first target application; wherein the first target application is the first operation an application program of the second operating system included in the system;
  • the first target operation is an operation of the first target application triggered on a current application of the first operating system
  • controlling the first operating system to adjust the first target operation according to the first target operation A target application and the position of the current application in the first application stack.
  • the above-mentioned logic instructions in the memory 1130 may be implemented in the form of software function units and may be stored in a computer-readable storage medium when sold or used as an independent product.
  • the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
  • the present disclosure also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can Executing the application stack management method provided by the above-mentioned methods, the method includes: acquiring a first target operation of a user on a first target application; wherein, the first target application is the second target application included in the first operating system. operating system applications;
  • the first target operation is an operation of the first target application triggered on a current application of the first operating system
  • controlling the first operating system to adjust the first target operation according to the first target operation A target application and the position of the current application in the first application stack.
  • the present disclosure also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it is implemented to execute the application stack management method provided by the above methods, the method includes : Obtaining a first target operation performed by a user on a first target application; wherein, the first target application is an application program of the second operating system included in the first operating system;
  • the first target operation is an operation of the first target application triggered on a current application of the first operating system
  • controlling the first operating system to adjust the first target operation according to the first target operation A target application and the position of the current application in the first application stack.
  • the present disclosure also provides a computer program, which is implemented when executed by a processor to execute the application stack management method provided by the above methods, the method includes: obtaining the first target operation of the user on the first target application ; Wherein, the first target application is an application program of the second operating system included in the first operating system;
  • the first target operation is an operation of the first target application triggered on a current application of the first operating system
  • controlling the first operating system to adjust the first target operation according to the first target operation A target application and the position of the current application in the first application stack.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative effort.
  • each implementation can be implemented by means of software plus a necessary general hardware platform, and of course also by hardware.
  • the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

Landscapes

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

Abstract

本公开提供一种应用栈管理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序,应用于电子设备,该电子设备运行第一操作系统和以容器化运行在第一操作系统中的第二操作系统,其中方法包括:获取用户对第一目标应用的第一目标操作;第一目标应用为第一操作系统包括的第二操作系统的应用程序;执行第一目标操作;在确定第一目标操作为在第一操作系统的当前应用上触发的操作时,控制第一操作系统调整第一目标应用和当前应用在第一应用栈中的位置。本公开提供的应用栈管理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序,在第一应用栈中体现了第一操作系统的当前应用和第二操作系统的第一目标应用之间的启动关系,便于第一操作系统根据第一应用栈确定当前桌面需要显示的应用。

Description

应用栈管理方法、装置、电子设备和存储介质
本公开要求于2021年11月08日提交中国专利局、申请号为202111316070.4、申请名称为“应用栈管理方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及计算机技术领域,尤其涉及一种应用栈管理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序。
背景技术
随着计算机技术的发展,为了扩展Linux操作系统下的应用程序(Application,简称APP),丰富应用环境,Linux操作系统上可支持运行安卓(Android)操作系统的应用程序。
现有技术中,在Linux操作系统支持Android操作系统的应用程序的方案中,在Linux操作系统侧,通常将Linux操作系统自身的应用程序添加在一个应用栈中进行管理,将Android操作系统的应用程序添加在另一个应用栈中进行管理。
发明内容
针对现有技术存在的问题,本公开实施例提供一种应用栈管理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序。
本公开提供一种应用栈管理方法,应用于电子设备,所述电子设备运行第一操作系统和以容器化运行在所述第一操作系统中的第二操作系统,其特征在于,所述方法包括:
获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序;
执行所述第一目标操作;
在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
根据本公开提供的一种应用栈管理方法,所述第一操作系统包括第一应用管理器,所述第二操作系统包括第二应用管理器;所述方法还包括:
建立所述第一应用管理器与所述第二应用管理器的连接;
在所述第一目标操作包括启动操作时,所述执行所述第一目标操作包括:
控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送启动操作请求;
控制所述第一目标应用执行所述第一目标操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送启动成功消息;
所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置包括:
控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶。
根据本公开提供的一种应用栈管理方法,在所述启动操作为用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,所述控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送启动操作请求包括:
控制所述第一操作系统的桌面通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送所述启动操作请求;
在所述启动操作为用户在所述当前应用上触发的所述第一目标应用的启动操作时,所述控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送启动操作请求包括:
控制所述当前应用通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送所述启动操作请求。
根据本公开提供的一种应用栈管理方法,所述第一操作系统还包括窗口管理器;
在所述第一目标操作包括后台切换操作时,所述执行所述第一目标操作包括:
控制所述第一操作系统的桌面向所述窗口管理器发送后台切换操作请求;
控制所述窗口管理器将所述第一目标应用的窗口切换至后台,并控制所述窗口管理器向所述第一应用管理器发送后台切换成功消息;
所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置包括:
控制所述第一应用管理器在所述第一应用栈中将所述第一目标应用的位置沿着栈底方向下移一位,并将所述当前应用调整至栈顶。
根据本公开提供的一种应用栈管理方法,所述第一操作系统还包括任务管理器;
在所述第一目标操作包括前台切换操作时,所述执行所述第一目标操作包括:
控制所述任务管理器向所述窗口管理器发送前台切换操作请求;
控制所述窗口管理器将所述第一目标应用的窗口切换至前台,并控制所述窗口管理器向所述第一应用管理器发送前台切换成功消息;
所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置包括:
控制所述第一应用管理器在所述第一应用栈中将所述当前应用的位置沿着栈底方向下移一位,并将所述第一目标应用调整至栈顶。
根据本公开提供的一种应用栈管理方法,在所述第一目标操作包括关闭操作时,所述执行所述第一目标操作包括:
控制所述任务管理器通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送关闭操作请求;
控制所述第一目标应用执行所述关闭操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送关闭成功消息;
所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置包括:
控制所述第一应用管理器在所述第一应用栈中执行所述第一目标应用的出栈操作。
根据本公开提供的一种应用栈管理方法,在所述控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶之后,所述方法还包括:
获取用户在所述第一目标应用上触发的第二目标应用的第二目标操作;其中,所述第二目标应用为所述第一操作系统的应用程序或者所述第二操作系统的应用程序;
执行所述第二目标操作;
控制所述第一操作系统根据所述第二目标操作调整所述第二目标应用、所述第一目标应用和所述当前应用在所述第一应用栈中的位置。
根据本公开提供的一种应用栈管理方法,在所述启动操作为用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,所述方法还包括:
控制所述第一应用管理器将所述第一目标应用添加在第二应用栈的栈顶;其中,所述第二应用栈为只存储所述第一目标应用的栈。
本公开还提供一种应用栈管理装置,包括:
第一获取单元,用于获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为第一操作系统包括的第二操作系统的应用程序;
第一执行单元,用于执行所述第一目标操作;
第一控制单元,用于在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
本公开还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一种所述应用栈管理方法的步骤。
本公开还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述应用栈管理方法的步骤。
本公开还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述应用栈管理方法的步骤。
本公开还提供一种计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述应用栈管理方法的步骤。
本公开提供的一种应用栈管理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序,在第一操作系统上获取到用户对第二操作系统的第一目标应用的第一目标操作时,执行第一目标操作,执行第一目标操作结束后,在确定第一目标操作为第一操作系统的当前应用上触发的第一目标应用的操作时,控制第一操作系统根据第一目标操作调整第一目标应用和当前应用在第一应用栈中的位置,在第一应用栈中体现了第一操作系统的当前应用和第二操作系统的第一目标应用之间的启动关系,便于第一操作系统根据第一应用栈确定当前桌面需要显示的应用。
附图说明
为了更清楚地说明本公开或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例, 对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本公开提供的应用栈管理方法的流程示意图之一;
图2是本公开提供的应用栈管理方法的流程示意图之二;
图3是本公开提供的应用栈管理方法的流程示意图之三;
图4是本公开提供的第一应用栈的结构示意图之一;
图5是本公开提供的应用栈管理方法的流程示意图之四;
图6是本公开提供的应用栈管理方法的流程示意图之五;
图7是本公开提供的应用栈管理方法的流程示意图之六;
图8是本公开提供的应用栈管理方法的流程示意图之七;
图9是本公开提供的第一应用栈的结构示意图之二;
图10是本公开提供的应用栈管理装置的结构示意图;
图11是本公开提供的电子设备的实体结构示意图。
具体实施方式
为使本公开的目的、技术方案和优点更加清楚,下面将结合本公开中的附图,对本公开中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
首先,对本公开实施例涉及的应用场景进行介绍。
本公开实施例的方法可以应用于电子设备,在一实施例中该电子设备中设置有至少两个系统,例如第一操作系统和第二操作系统,第二操作系统以容器化的方式运行在第一操作系统中。如本领域技术人员所知,容器化即以Linux内核特性为基础实现的Linux容器(Linux Container,LXC),其充分利用了控制组(Control group)和命名空间(Namespace)特性,隔离进程和资源,使得第二操作系统高效、轻量的实现。该电子设备可以为手机、平板电脑等移动装置。
在本公开的实施例中,尽管没有明确描述,第一操作系统和第二操作系统可以是相同的,例如第一操作系统和第二操作系统均为Linux或均为Android;第一操作系统和第二操作系统也可以是不同的,例如第一操作系统和第二操作系统中一者为Linux,一者为Android。在第一操作系统为Linux,第二操作系统为Android时,在Linux系统侧的桌面上同时显示Android应用图标和Linux应用图标,用户可以点击Android应用图标对Android应用进行相关操作,而且在Linux系统侧的任务管理器中显示有所有已运行的Android应用和Linux应用的应用截图,用户点击任务管理器中的某个应用截图,即可实现将该应用截图对应的应用拉升到前台运行;用户也可以从任务管理器中通过对应用截图的操作来关闭对应的应用,使得应用能够正常退出。
在本公开的实施例中,应用程序APP泛指在操作系统中具有一个或多个功能的应用,例如即时通讯软件、购物软件、音乐播放器、视频播放器等。
现有技术中,在Linux操作系统支持Android操作系统的应用程序的方案中,在Linux操作系统侧,通常将Linux操作系统自身的应用程序添加在一个应用栈中进行管理,将Android操作系统的应用程序添加在另一个应用栈中进行管理。这样,在Linux操作系统的应用程序调用安卓的应用程序,或者安卓操作系统的应用程序调用Linux操作系统的应用程序时,无法体现Linux操作系统的应用程序与安卓操作系统的应用程序之间的启动关系。
下面结合图1-图9描述本公开的应用栈管理方法。
图1是本公开提供的应用栈管理方法的流程示意图之一,如图1所示,本实施例提供的方法,应用于电子设备,电子设备中运行有第一操作系统和以容器化方式运行在第一操作系统中的第二操作系统,该方法包括:
步骤110、获取用户对第一目标应用的第一目标操作。
其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序。
步骤120、执行所述第一目标操作。
具体地,根据第一目标操作的不同,执行第一目标操作的具体过程也不同,具体参见下面实施例的描述。
步骤130、在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
具体地,在确定执行完第一目标操作时,还需确定第一目标操作是否为在第一操作系统的当前应用上触发的操作,在确定第一目标操作为在第一操作系统的当前应用上触发的操作时,此时控制第一操作系统根据第一目标操作调整第一目标应用和当前应用在第一应用栈中的位置,已体现对两个操作系统的应用之间的启动关系。
需要说明的是,第二操作系统的每个第一目标应用在第一操作系统侧均对应一个该第一目标应用的代理对象,每个第一目标应用的代理对象包括该第一目标应用的名称信息和对应的当前状态;在第二操作系统中,也将第一目标应用的名称信息与当前状态对应存储,以实现第一操作系统中第一目标应用和第二操作系统中的第一目标应用的状态同步。
本公开提供的一种应用栈管理方法,在第一操作系统上获取到用户对第二操作系统的第一目标应用的第一目标操作时,执行第一目标操作,执行第一目标操作结束后,在确定第一目标操作为第一操作系统的当前应用上触发的第一目标应用的操作时,控制第一操作系统根据第一目标操作调整第一目标应用和当前应用在第一应用栈中的位置,在第一应用栈中体现了第一操作系统的当前应用和第二操作系统的第一目标应用之间的启动关系,便于第一操作系统根据第一应用栈确定当前桌面需要显示的应用。
在一实施例中,所述第一操作系统包括第一应用管理器,所述第二操作系统包括第二应用管理器,所述方法还包括以下步骤:
建立所述第一应用管理器与所述第二应用管理器的连接。
可选的,在所述第一目标操作包括启动操作时,执行所述第一目标操作可通过以下方式实现:
控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送启动操作请求;控制所述第一目标应用执行所述第一目标操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送启动成功消息。
具体地,在所述启动操作为用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,控制所述第一操作系统的桌面通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送所述启动操作请求。
在所述启动操作为用户在所述当前应用上触发的所述第一目标应用的启动操作时,控制所述当前应用通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送所述启动操作请求。
可选的,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置可通过以下方式实现:
控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶。
具体地,图2是本公开提供的应用栈管理方法的流程示意图之二,如图2所示,第一操作系统包括第一应用管理器和第一操作系统的桌面,第二操作系统包括第二应用管理器和第一目标应用,电子设备内部可以通过第一应用管理器和第二应用管理器之间的套接字(socket)连接,实现第一操作系统和第二操作系统之间的交互,图2为基于第一操作系统的桌面启动第一目标应用的场景,具体应用栈管理流程为:步骤201、建立第一应用管理器和第二应用管理器之间的通信连接;步骤202、用户在第一操作系统的桌面上触发第二操作系统的第一目标应用的启动操作;步骤203、第一操作系统的桌面在检测到用户对第一目标应用的启动操作时,向第一应用管理器发送启动操作请求,该启动操作请求用于请求启动第一目标应用;步骤204、第一应用管理器在接收到该启动操作请求时,从启动操作请求中解析得到第一目标应用的标识信息,根据第一目标应用的标识信息确定第一目标应用是否为第二操作系统的应用程序,在确定第一目标应用为第二操作系统的应用程序时,第一应用管理器向第二操作系统的第二应用管理器发送启动操作请求;步骤205、第二应用管理器再将接收到的启动操作请求转发给第一目标应用;步骤206、第一目标应用在接收到启动操作请求时,执行启动操作,即将第一目标应用置于前台显示;步骤207、第一目标应用向第二应用管理器返回启动成功消息;步骤208、第二应用管理器再将启动成功消息转发给第一操作系统的第一应用管理器;步骤209、第一应用管理器在接收到启动成功消息时,确定第一操作系统已经将第一目标应用启动,此时将第一目标应用添加在第一应用栈的栈顶,便于第一操作系统根据第一应用栈将第一目标应用显示在前台。
需要说明的是,如图2所示,第一应用管理器在将第一目标应用添加在第一应用栈的栈顶之后,还包括步骤210、在创建的第一目标应用的代理对象中将第一目标应用的当前状态设置为前台运行状态。在第二操作系统侧,也可以将第一目标应用的当前状态设置为前台运行状态。这样,第二操作系统中第一目标应用的当前状态和第一操作系统中该第一目标应用的当前状态相同,都是前台运行状态,从而实现了第一操作系统和第二操作系统中应用状态的同步。
具体地,图3是本公开提供的应用栈管理方法的流程示意图之三,如图3所示,第一操作系统包括第一应用管理器和当前应用,第二操作系统包括第二应用管理器和第一目标应用,图3为基于第一操作系统的当前应用启动第一目标应用的场景,具体应用栈管理流程为:步骤301、建立第一应用管理器和第二应用管理器之间的通信连接;步骤302、用户在第一操作系统上运行的第一操作系统的当前应用中触发第二操作系统的第一目标应用的启动操作;步骤303、第一操作系统的当前应用在检测到用户对第一目标应用的启动操作时,向第一应用管 理器发送启动操作请求,该启动操作请求用于请求启动第一目标应用;步骤304、第一应用管理器在接收到该启动操作请求时,从启动操作请求中解析得到第一目标应用的标识信息,根据第一目标应用的标识信息确定第一目标应用是否为第二操作系统的应用程序,在确定第一目标应用为第二操作系统的应用程序时,第一应用管理器向第二操作系统的第二应用管理器发送启动操作请求;步骤305、第二应用管理器再将接收到的启动操作请求转发给第一目标应用;步骤306、第一目标应用在接收到启动操作请求时,执行启动操作,即将第一目标应用置于前台显示;步骤307、第一目标应用向第二应用管理器返回启动成功消息;步骤308、第二应用管理器再将启动成功消息转发给第一操作系统的第一应用管理器;步骤309、第一应用管理器在接收到启动成功消息时,确定第一操作系统已经将第一目标应用启动,此时将第一目标应用添加在第一应用栈的栈顶,而此时在第一应用栈中,当前应用位于第一目标应用的底端,这样,第一应用管理器就可以根据第一应用栈中第一目标应用和当前应用的位置关系将第一目标应用显示在前台,将当前应用置于后台;图4是本公开提供的第一应用栈的结构示意图之一,如图4所示,第一目标应用指向第一应用栈的栈顶,当前应用指向第一应用栈的栈底。
需要说明的是,如图3所示,第一应用管理器在将第一目标应用添加在第一应用栈的栈顶之后,还包括步骤310、在创建的第一目标应用的代理对象中将第一目标应用的当前状态设置为前台运行状态,在第二操作系统侧,也可以将第一目标应用的当前状态设置为前台运行状态,实现第一操作系统和第二操作系统中应用状态的同步。
需要说明的是,第二应用管理器在接收到第一目标应用发送的启动成功消息时,还可以在第二操作系统侧将第一目标应用的当前状态设置为前台运行状态。
在一实施例中,所述第一操作系统还包括窗口管理器;在所述第一目标操作包括后台切换操作时,执行所述第一目标操作可通过以下方式实现:
控制所述第一操作系统的桌面向所述窗口管理器发送后台切换操作请求;控制所述窗口管理器将所述第一目标应用的窗口切换至后台,并控制所述窗口管理器向所述第一应用管理器发送后台切换成功消息。
可选的,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置可通过以下方式实现:
控制所述第一应用管理器在所述第一应用栈中将所述第一目标应用的位置沿着栈底方向下移一位,并将所述当前应用调整至栈顶。
具体地,图5是本公开提供的应用栈管理方法的流程示意图之四,如图5所示,第一操作系统包括第一应用管理器、第一操作系统的桌面和窗口管理器,第二操作系统包括第二应用管理器和第一目标应用,图5为基于在第一操作系统中将已启动的第一目标应用从前台切换至后台的场景,具体应用栈管理流程为:步骤501、用户在第一操作系统的桌面上触发第二操作系统的第一目标应用的后台切换操作(例如,用户点击第一目标应用窗口中的最小化图标或者点击home键);步骤502、第一操作系统的桌面在检测到用户对第一目标应用的后台切换操作时,分别向窗口管理器和第一应用管理器发送后台切换操作请求,该后台切换操作请求用于请求将第一目标应用从前台切换至后台;步骤503、窗口管理器在接收到后台切换操作请求时,将第一目标应用的窗口最小化,置于后台;步骤504、窗口管理器向第一应用管理器发送后台切换成功消息;步骤505、第一应用管理器在接收到该后台切换成功消息时,在第 一应用栈中将第一目标应用的位置沿着栈底方向下移一位,并将当前应用调整至栈顶。这样,第一应用管理器就可以根据第一应用栈中第一目标应用和当前应用的位置关系将当前应用显示在前台,将第一目标应用置于后台。
需要说明的是,如图5所示,还包括步骤506、第一应用管理器在接收到窗口管理器发送的后台切换成功消息时,还需要对后台切换操作请求进行解析,解析得到第一目标应用的标识信息,根据第一目标应用的标识信息确定第一目标应用是否为第二操作系统的应用程序,在确定第一目标应用为第二操作系统的应用程序时,第一应用管理器向第二操作系统的第二应用管理器发送后台切换操作请求;步骤507、第二应用管理器再将接收到的后台切换操作请求转发给第一目标应用;步骤508、第一目标应用在接收到后台切换操作请求时,最小化第一目标应用的窗口,使得第一目标应用位于后台;步骤509、第一目标应用向第二应用管理器返回后台切换成功消息;步骤510、第二应用管理器在接收到后台切换成功消息时,根据第二操作系统当前运行的所有应用程序调整第一目标应用在自身应用栈中的位置,并将第一目标应用的当前状态设置为后台冻结状态;步骤511、第二应用管理器还将后台切换成功消息转发给第一操作系统的第一应用管理器;步骤512、第一应用管理器在接收到后台切换成功消息时,确定第一操作系统已经将第一目标应用从前台切换至后台,此时在创建的目标应用的代理对象中将第一目标应用的当前状态设置为后台冻结状态,第一目标应用处于后台冻结状态时,通知第一操作系统的内核该目标应用已处于冻结状态,第一操作系统的内核在接收到该通知消息时,禁止该目标应用获取焦点,也就意味着第一目标应用被剥夺中央处理器(Central Processing Unit,简称CPU)时间片。这样,第二操作系统中第一目标应用的当前状态和第一操作系统中该第一目标应用的当前状态相同,实现了第一操作系统和第二操作系统中应用状态的同步。
在一实施例中,所述第一操作系统还包括任务管理器;在所述第一目标操作包括前台切换操作时,执行所述第一目标操作可通过以下方式实现:
控制所述任务管理器向所述窗口管理器发送前台切换操作请求;控制所述窗口管理器将所述第一目标应用的窗口切换至前台,并控制所述窗口管理器向所述第一应用管理器发送前台切换成功消息。
可选的,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置可通过以下方式实现:
控制所述第一应用管理器在所述第一应用栈中将所述当前应用的位置沿着栈底方向下移一位,并将所述第一目标应用调整至栈顶。
具体地,图6是本公开提供的应用栈管理方法的流程示意图之五,如图6所示,第一操作系统包括第一应用管理器、任务管理器和窗口管理器,第二操作系统包括第二应用管理器和第一目标应用,图6为基于在第一操作系统中将已启动的第一目标应用从后台切换至前台的场景,具体应用栈管理流程为:步骤601、用户在第一操作系统的任务管理器中触发第二操作系统的第一目标应用的前台切换操作(例如,用户点击任务管理器中第一目标应用的图标缩略图);步骤602、任务管理器在检测到用户对第一目标应用的前台切换操作时,向窗口管理器发送前台切换操作请求;步骤603、窗口管理器在接收到前台切换操作请求时,将第一目标应用的窗口置于前台;步骤604、窗口管理器通过任务管理器向第一应用管理器发送前台切换成功消息;步骤605、第一应用管理器在接收到该前台切换成功消息时,在第一应用栈中将 当前应用的位置沿着栈底方向下移一位,并将第一目标应用调整至栈顶。这样,第一应用管理器就可以根据第一应用栈中第一目标应用和当前应用的位置关系将第一目标应用显示在前台,将当前应用置于后台。
需要说明的是,如图6所示,还包括步骤606、任务管理器向第一应用管理器发送前台切换操作请求,该前台切换操作请求用于请求将第一目标应用从后台切换至前台;步骤607、第一应用管理器在接收到该前台切换操作请求时,从前台切换操作请求中解析得到第一目标应用的标识信息,根据第一目标应用的标识信息确定第一目标应用是否为第二操作系统的应用程序,在确定第一目标应用为第二操作系统的应用程序时,第一应用管理器向第二操作系统的第二应用管理器发送前台切换操作请求;步骤608、第二应用管理器再将接收到的前台切换操作请求转发给第一目标应用;步骤609、第一目标应用在接收到前台切换操作请求时,将第一目标应用的窗口显示在桌面,使得第一目标应用位于前台;步骤610、第一目标应用向第二应用管理器返回前台切换成功消息;步骤611、第二应用管理器在接收到前台切换成功消息时,根据第二操作系统当前运行的所有应用程序调整第一目标应用在自身应用栈中的位置,并将第一目标应用的当前状态设置为前台运行状态;步骤612、第二应用管理器还将前台切换成功消息转发给第一操作系统的第一应用管理器;步骤613、第一应用管理器在接收到前台切换成功消息时,确定第一操作系统已经将第一目标应用从后台切换至前台,此时在创建的第一目标应用的代理对象中将第一目标应用的当前状态设置为前台运行状态,第一目标应用处于前台运行状态时,通知第一操作系统的内核该目标应用已处于前台运行状态,第一操作系统的内核在接收到该通知消息时,允许该目标应用获取焦点,能够占用CPU时间片正常运行。这样,第二操作系统中第一目标应用的当前状态和第一操作系统中该第一目标应用的当前状态相同,从而实现了第一操作系统和第二操作系统中应用状态的同步。
在一实施例中,在所述第一目标操作包括关闭操作时,执行所述第一目标操作可通过以下方式实现:
控制所述任务管理器通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送关闭操作请求;控制所述第一目标应用执行所述关闭操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送关闭成功消息。
可选的,控制第一操作系统根据第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置可通过以下方式实现:
控制第一应用管理器在第一应用栈中执行第一目标应用的出栈操作。
具体地,图7是本公开提供的应用栈管理方法的流程示意图之六,如图7所示,第一操作系统包括第一应用管理器和任务管理器,第二操作系统包括第二应用管理器和第一目标应用;图7为基于在第一操作系统的任务管理器中将第一目标应用关闭的场景,具体应用栈管理流程为:步骤701、用户在任务管理器中触发第二操作系统的第一目标应用的关闭操作;步骤702、任务管理器在检测到用户对第一目标应用的关闭操作时,向第一应用管理器发送关闭操作请求,该关闭操作请求用于请求关闭第一目标应用;步骤703、第一应用管理器在接收到该关闭操作请求时,从关闭操作请求中解析得到第一目标应用的标识信息,根据第一目标应用的标识信息确定第一目标应用是否为第二操作系统的应用程序,在确定第一目标应用为第二操作系统的应用程序时,第一应用管理器向第二操作系统的第二应用管理器发送关闭操作请求;步骤704、第二应用管理器再将接收到的关闭操作请求转发给第一目标应用;步骤705、 第一目标应用在接收到关闭操作请求时,执行关闭操作;步骤706、第一目标应用向第二应用管理器返回关闭成功消息;步骤707、第二应用管理器再将关闭成功消息转发给第一操作系统的第一应用管理器;步骤708、第一应用管理器在接收到关闭成功消息时,确定第一操作系统已经将第一目标应用关闭,此时第一应用管理器在第一应用栈中执行第一目标应用的出栈操作,在第一目标应用出栈后,若第一目标应用从桌面启动,则此时显示桌面;若第一目标应用从当前应用程序中启动,则此时显示当前应用;步骤709、将创建的第一目标应用的代理对象删除。这样,第二操作系统中第一目标应用的当前状态和第一操作系统中该第一目标应用的当前状态相同,都是已关闭状态,从而实现了第一操作系统和第二操作系统中应用状态的同步。
在一实施例中,在所述控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶之后,该方法还包括以下步骤:
获取用户在所述第一目标应用上触发的第二目标应用的第二目标操作;执行所述第二目标操作;控制所述第一操作系统根据所述第二目标操作调整所述第二目标应用、所述第一目标应用和所述当前应用在所述第一应用栈中的位置。
其中,所述第二目标应用为所述第一操作系统的应用程序或者所述第二操作系统的应用程序;第二目标操作可以为第二目标应用的启动操作,或者第二目标应用的后台切换操作,或者第二目标应用的前台切换操作,或者第二目标应用的关闭操作。
具体地,图8是本公开提供的应用栈管理方法的流程示意图之七,如图8所示,第一操作系统包括第一应用管理器和第二目标应用,第二操作系统包括第二应用管理器和第一目标应用,图8为第一操作系统中用户在已启动的第一目标应用上触发的第一操作系统的第二目标应用的启动操作的场景,具体应用栈管理流程为:步骤801、用户在第一目标应用中触发第二操作系统的第二目标应用的启动操作;步骤802、第二操作系统的第一目标应用在检测到用户对第二目标应用的启动操作时,向第二应用管理器发送启动操作请求,该启动操作请求用于请求启动第二目标应用;步骤803、第二应用管理器在接收到该启动操作请求时,从启动操作请求中解析得到第二目标应用的标识信息,根据第二目标应用的标识信息确定第二目标应用是否为第一操作系统的应用程序,在确定第二目标应用为第一操作系统的应用程序时,第二应用管理器向第一操作系统的第一应用管理器发送启动操作请求;步骤804、第一应用管理器再将接收到的启动操作请求转发给第二目标应用;步骤805、第二目标应用在接收到启动操作请求时,执行启动操作,即将第二目标应用置于前台显示;步骤806、第二目标应用向第一应用管理器返回启动成功消息;步骤807、第一应用管理器在接收到启动成功消息时,将第二目标应用添加在第一应用栈的栈顶,而此时在第一应用栈中,第一目标应用位于当前应用和第二目标应用之间,这样,第一应用管理器就可以根据第一应用栈中第一目标应用、第二目标应用和当前应用的位置关系将第二目标应用显示在前台,将第一目标应用和当前应用置于后台。图9是本公开提供的第一应用栈的结构示意图之二,如图9所示,第一操作系统的第二目标应用指向第一应用栈的栈顶,第一操作系统的当前应用指向第一应用栈的栈底,第二操作系统的第一目标应用位于第二目标应用和当前应用之间。
需要说明的是,针对第二目标应用的后台切换操作、前台切换操作和关闭操作均与第一目标应用的后台切换操作、前台切换操作和关闭操作类似,具体可参考上述关于第一目标应用的后台切换操作、前台切换操作和关闭操作的对应描述,在此不再赘述。
在一实施例中,在所述启动操作为用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,该方法还包括以下步骤:
控制第一应用管理器将第一目标应用添加在第二应用栈的栈顶。
其中,所述第二应用栈为只存储所述第一目标应用的栈。
具体地,在确定启动操作为用户在第一操作系统的桌面上触发的第一目标应用的启动操作时,第一应用管理器将第一目标应用添加在第二应用栈的栈顶,实现了单独对从桌面触发的第一目标应用的管理;这样,当第一目标应用关闭时,第一应用管理器控制第一目标应用在第二应用栈中执行出栈操作,此时就显示桌面。
下面对本公开提供的应用栈管理装置进行描述,下文描述的应用栈管理装置与上文描述的应用栈管理方法可相互对应参照。
图10是本公开提供的应用栈管理装置的结构示意图,如图10所示,应用栈管理装置包括第一获取单元1010、第一执行单元1020和第一控制单元1030;其中:
第一获取单元1010,用于获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序;
第一执行单元1020,用于执行所述第一目标操作;
第一控制单元1030,用于在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
本公开提供的一种应用栈管理装置,在第一操作系统上获取到用户对第二操作系统的第一目标应用的第一目标操作时,执行第一目标操作,执行第一目标操作结束后,在确定第一目标操作为第一操作系统的当前应用上触发的第一目标应用的操作时,控制第一操作系统根据第一目标操作调整第一目标应用和当前应用在第一应用栈中的位置,在第一应用栈中体现了第一操作系统的当前应用和第二操作系统的第一目标应用之间的启动关系,便于第一操作系统根据第一应用栈确定当前桌面需要显示的应用。
基于上述任一实施例,所述第一操作系统包括第一应用管理器,所述第二操作系统包括第二应用管理器;所述装置还包括建立单元;
建立单元,用于建立第一应用管理器与第二应用管理器的连接;
在第一目标操作包括启动操作时,第一执行单元1020具体用于:
控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送启动操作请求;
控制所述第一目标应用执行所述第一目标操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送启动成功消息;
所述第一控制单元1030具体用于:
控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶。
基于上述任一实施例,在所述启动操作为用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,所述第一执行单元1020还具体用于:
控制所述第一操作系统的桌面通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送启动操作请求。
在所述启动操作为用户在所述当前应用上触发的所述第一目标应用的启动操作时,所述第一执行单元1020还具体用于:
控制所述当前应用通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送启动操作请求。
基于上述任一实施例,所述第一操作系统还包括窗口管理器;在所述第一目标操作包括后台切换操作时,所述第一执行单元1020还具体用于:
控制所述第一操作系统的桌面向所述窗口管理器发送后台切换操作请求;
控制所述窗口管理器将所述第一目标应用的窗口切换至后台,并控制所述窗口管理器向所述第一应用管理器发送后台切换成功消息;
所述第一控制单元1030还具体用于:
控制所述第一应用管理器在所述第一应用栈中将所述第一目标应用的位置沿着栈底方向下移一位,并将所述当前应用调整至栈顶。
基于上述任一实施例,所述第一操作系统还包括任务管理器;在所述第一目标操作包括前台切换操作时,所述第一执行单元1020还具体用于:
控制所述任务管理器向所述窗口管理器发送前台切换操作请求;
控制所述窗口管理器将所述第一目标应用的窗口切换至前台,并控制所述窗口管理器向所述第一应用管理器发送前台切换成功消息;
所述第一控制单元1030还具体用于:
控制所述第一应用管理器在所述第一应用栈中将所述当前应用的位置沿着栈底方向下移一位,并将所述第一目标应用调整至栈顶。
基于上述任一实施例,在所述第一目标操作包括关闭操作时,所述第一执行单元1020还具体用于:
控制所述任务管理器通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送关闭操作请求;
控制所述第一目标应用执行所述关闭操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送关闭成功消息;
所述第一控制单元1030还具体用于:
控制所述第一应用管理器在所述第一应用栈中执行所述第一目标应用的出栈操作。
基于上述任一实施例,所述装置还包括第二获取单元、第二执行单元和第二控制单元;
第二获取单元,用于获取用户在所述第一目标应用上触发的第二目标应用的第二目标操作;其中,所述第二目标应用为所述第一操作系统的应用程序或者所述第二操作系统的应用程序;
第二执行单元,用于执行所述第二目标操作;
第二控制单元,用于控制所述第一操作系统根据所述第二目标操作调整所述第二目标应用、所述第一目标应用和所述当前应用在所述第一应用栈中的位置。
基于上述任一实施例,所述装置还包括第三控制单元;
第三控制单元,用于控制所述第一应用管理器将所述第一目标应用添加在第二应用栈的栈顶;其中,所述第二应用栈为只存储所述第一目标应用的栈。
图11是本公开提供的电子设备的实体结构示意图,如图11所示,该电子设备可以包括:处理器(processor)1110、通信接口(Communications Interface)1120、存储器(memory)1130和通信总线1140,其中,处理器1110,通信接口1120,存储器1130通过通信总线1140完成相互间的通信。处理器1110可以调用存储器1130中的逻辑指令,以执行应用栈管理方法,该方法包括:获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序;
执行所述第一目标操作;
在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
此外,上述的存储器1130中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
另一方面,本公开还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各方法所提供的应用栈管理方法,该方法包括:获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序;
执行所述第一目标操作;
在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
又一方面,本公开还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的应用栈管理方法,该方法包括:获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序;
执行所述第一目标操作;
在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
再一方面,本公开还提供一种计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的应用栈管理方法,该方法包括:获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序;
执行所述第一目标操作;
在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的精神和范围。

Claims (20)

  1. 一种应用栈管理方法,应用于电子设备,所述电子设备运行第一操作系统和以容器化运行在所述第一操作系统中的第二操作系统,所述方法包括:
    获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为所述第一操作系统包括的所述第二操作系统的应用程序;
    执行所述第一目标操作;
    在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
  2. 根据权利要求1所述的应用栈管理方法,其中,所述第一操作系统包括第一应用管理器,所述第二操作系统包括第二应用管理器;所述方法还包括:
    建立所述第一应用管理器与所述第二应用管理器的连接;
    在所述第一目标操作包括启动操作时,所述执行所述第一目标操作包括:
    控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送启动操作请求;
    控制所述第一目标应用执行所述第一目标操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送启动成功消息;
    所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在所述第一应用栈中的位置包括:
    控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶。
  3. 根据权利要求2所述的应用栈管理方法,其中,在所述启动操作为所述用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,所述控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送所述启动操作请求包括:
    控制所述第一操作系统的桌面通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送所述启动操作请求;
    在所述启动操作为所述用户在所述当前应用上触发的所述第一目标应用的启动操作时,所述控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送所述启动操作请求包括:
    控制所述当前应用通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送所述启动操作请求。
  4. 根据权利要求2所述的应用栈管理方法,其中,所述第一操作系统还包括窗口管理器;
    在所述第一目标操作包括后台切换操作时,所述执行所述第一目标操作包括:
    控制所述第一操作系统的桌面向所述窗口管理器发送后台切换操作请求;
    控制所述窗口管理器将所述第一目标应用的窗口切换至后台,并控制所述窗口管理器向所述第一应用管理器发送后台切换成功消息;
    所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在所述第一应用栈中的位置包括:
    控制所述第一应用管理器在所述第一应用栈中将所述第一目标应用的位置沿着栈底方向下移一位,并将所述当前应用调整至所述栈顶。
  5. 根据权利要求4所述的应用栈管理方法,其中,所述第一操作系统还包括任务管理器;
    在所述第一目标操作包括前台切换操作时,所述执行所述第一目标操作包括:
    控制所述任务管理器向所述窗口管理器发送前台切换操作请求;
    控制所述窗口管理器将所述第一目标应用的窗口切换至前台,并控制所述窗口管理器向所述第一应用管理器发送前台切换成功消息;
    所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在所述第一应用栈中的位置包括:
    控制所述第一应用管理器在所述第一应用栈中将所述当前应用的位置沿着所述栈底方向下移一位,并将所述第一目标应用调整至所述栈顶。
  6. 根据权利要求5所述的应用栈管理方法,其中,在所述第一目标操作包括关闭操作时,所述执行所述第一目标操作包括:
    控制所述任务管理器通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送关闭操作请求;
    控制所述第一目标应用执行所述关闭操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送关闭成功消息;
    所述控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在所述第一应用栈中的位置包括:
    控制所述第一应用管理器在所述第一应用栈中执行所述第一目标应用的出栈操作。
  7. 根据权利要求2或3所述的应用栈管理方法,其中,在所述控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶之后,所述方法还包括:
    获取所述用户在所述第一目标应用上触发的第二目标应用的第二目标操作;其中,所述第二目标应用为所述第一操作系统的应用程序或者所述第二操作系统的应用程序;
    执行所述第二目标操作;
    控制所述第一操作系统根据所述第二目标操作调整所述第二目标应用、所述第一目标应用和所述当前应用在所述第一应用栈中的位置。
  8. 根据权利要求2或3所述的应用栈管理方法,其中,在所述启动操作为用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,所述方法还包括:
    控制所述第一应用管理器将所述第一目标应用添加在第二应用栈的栈顶;其中,所述第二应用栈为只存储所述第一目标应用的栈。
  9. 一种应用栈管理装置,包括:
    第一获取单元,用于获取用户对第一目标应用的第一目标操作;其中,所述第一目标应用为第一操作系统包括的第二操作系统的应用程序;
    第一执行单元,用于执行所述第一目标操作;
    第一控制单元,用于在确定所述第一目标操作为在所述第一操作系统的当前应用上触发的所述第一目标应用的操作时,控制所述第一操作系统根据所述第一目标操作调整所述第一目标应用和所述当前应用在第一应用栈中的位置。
  10. 根据权利要求9所述的应用栈管理装置,其中,所述第一操作系统包括第一应用管理器,所述第二操作系统包括第二应用管理器;所述装置还包括建立单元;
    所述建立单元用于建立所述第一应用管理器与所述第二应用管理器的连接;
    在所述第一目标操作包括启动操作时,所述第一执行单元用于:
    控制所述第一应用管理器通过所述第二应用管理器向所述第一目标应用发送启动操作请求;
    控制所述第一目标应用执行所述第一目标操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送启动成功消息;
    所述第一控制单元用于:
    控制所述第一应用管理器将所述第一目标应用添加在所述第一应用栈的栈顶。
  11. 根据权利要求10所述的应用栈管理装置,其中,在所述启动操作为所述用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,所述第一执行单元还用于:
    控制所述第一操作系统的桌面通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送启动操作请求;
    在所述启动操作为所述用户在所述当前应用上触发的所述第一目标应用的启动操作时,所述第一执行单元还用于:
    控制所述当前应用通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送启动操作请求。
  12. 根据权利要求10所述的应用栈管理装置,其中,所述第一操作系统还包括窗口管理器;
    在所述第一目标操作包括后台切换操作时,所述第一执行单元还用于:
    控制所述第一操作系统的桌面向所述窗口管理器发送后台切换操作请求;
    控制所述窗口管理器将所述第一目标应用的窗口切换至后台,并控制所述窗口管理器向所述第一应用管理器发送后台切换成功消息;
    所述第一控制单元还用于:
    控制所述第一应用管理器在所述第一应用栈中将所述第一目标应用的位置沿着栈底方向下移一位,并将所述当前应用调整至所述栈顶。
  13. 根据权利要求12所述的应用栈管理装置,其中,所述第一操作系统还包括任务管理器;
    在所述第一目标操作包括前台切换操作时,所述第一执行单元还用于:
    控制所述任务管理器向所述窗口管理器发送前台切换操作请求;
    控制所述窗口管理器将所述第一目标应用的窗口切换至前台,并控制所述窗口管理器向所述第一应用管理器发送前台切换成功消息;
    所述第一控制单元还用于:
    控制所述第一应用管理器在所述第一应用栈中将所述当前应用的位置沿着所述栈底方向下移一位,并将所述第一目标应用调整至所述栈顶。
  14. 根据权利要求13所述的应用栈管理装置,其中,在所述第一目标操作包括关闭操作时,所述第一执行单元还用于:
    控制所述任务管理器通过所述第一应用管理器和所述第二应用管理器向所述第一目标应用发送关闭操作请求;
    控制所述第一目标应用执行所述关闭操作,并控制所述第一目标应用通过所述第二应用管理器向所述第一应用管理器发送关闭成功消息;
    所述第一控制单元还用于:
    控制所述第一应用管理器在所述第一应用栈中执行所述第一目标应用的出栈操作。
  15. 根据权利要求10或11所述的应用栈管理装置,其中,所述装置还包括第二获取单元、第二执行单元和第二控制单元;
    所述第二获取单元,用于获取所述用户在所述第一目标应用上触发的第二目标应用的第二目标操作;其中,所述第二目标应用为所述第一操作系统的应用程序或者所述第二操作系统的应用程序;
    所述第二执行单元,用于执行所述第二目标操作;
    所述第二控制单元,用于控制所述第一操作系统根据所述第二目标操作调整所述第二目标应用、所述第一目标应用和所述当前应用在所述第一应用栈中的位置。
  16. 根据权利要求10或11所述的应用栈管理装置,其中,在所述启动操作为用户在所述第一操作系统的桌面上触发的所述第一目标应用的启动操作时,所述装置还包括第三控制单元;
    所述第三控制单元,用于控制所述第一应用管理器将所述第一目标应用添加在第二应用栈的栈顶;其中,所述第二应用栈为只存储所述第一目标应用的栈。
  17. 一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至8任一项所述应用栈管理方法的步骤。
  18. 一种非暂态计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述应用栈管理方法的步骤。
  19. 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述应用栈管理方法的步骤。
  20. 一种计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8任一项所述应用栈管理方法的步骤。
PCT/CN2022/105300 2021-11-08 2022-07-12 应用栈管理方法、装置、电子设备和存储介质 WO2023077858A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111316070.4 2021-11-08
CN202111316070.4A CN114281491A (zh) 2021-11-08 2021-11-08 应用栈管理方法、装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023077858A1 true WO2023077858A1 (zh) 2023-05-11

Family

ID=80868798

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105300 WO2023077858A1 (zh) 2021-11-08 2022-07-12 应用栈管理方法、装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN114281491A (zh)
WO (1) WO2023077858A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114281491A (zh) * 2021-11-08 2022-04-05 北京鲸鲮信息系统技术有限公司 应用栈管理方法、装置、电子设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200278895A1 (en) * 2019-02-28 2020-09-03 Crowdstrike, Inc. Container application for android-based devices
CN112286667A (zh) * 2020-11-18 2021-01-29 安徽鸿程光电有限公司 应用程序控制方法、装置、电子设备及介质
CN113407293A (zh) * 2021-08-19 2021-09-17 北京鲸鲮信息系统技术有限公司 窗口管理方法、装置、设备和存储介质
CN114281491A (zh) * 2021-11-08 2022-04-05 北京鲸鲮信息系统技术有限公司 应用栈管理方法、装置、电子设备和存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200278895A1 (en) * 2019-02-28 2020-09-03 Crowdstrike, Inc. Container application for android-based devices
CN112286667A (zh) * 2020-11-18 2021-01-29 安徽鸿程光电有限公司 应用程序控制方法、装置、电子设备及介质
CN113407293A (zh) * 2021-08-19 2021-09-17 北京鲸鲮信息系统技术有限公司 窗口管理方法、装置、设备和存储介质
CN114281491A (zh) * 2021-11-08 2022-04-05 北京鲸鲮信息系统技术有限公司 应用栈管理方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN114281491A (zh) 2022-04-05

Similar Documents

Publication Publication Date Title
US9549007B2 (en) User interface widget unit sharing for application user interface distribution
WO2016066130A1 (zh) 一种应用程序数据在终端之间迁移的方法、装置和系统
RU2420797C2 (ru) Предоставление возможности применения команды изменения графического окна к дистанционно сгенерированному графическому окну
US20190220307A1 (en) Client live migration for a virtual machine
WO2023077868A1 (zh) 应用状态同步方法、装置、电子设备和存储介质
EP2945337A2 (en) Method, system and server for service switching
US11743512B2 (en) Methods for NBMP deployments through 5G FLUS control
US10389832B2 (en) Remote casting of media content
KR20140123076A (ko) 디바이스 제어 방법 및 장치
CN106027631B (zh) 一种数据传输方法及装置
US11196778B2 (en) NBMP workflow management in 5G flus
US20210271491A1 (en) Application processing method, device, electronic device and storage medium
WO2023077858A1 (zh) 应用栈管理方法、装置、电子设备和存储介质
CN113810761A (zh) 多终端交互方法、装置及系统
TWI668634B (zh) 基於軟體容器提供雲端服務之系統及方法
CN114691273A (zh) 用户界面返回方法、装置、电子设备和存储介质
EP3890376B1 (en) Managing connections between a user device and peripheral devices
US10904746B2 (en) Implementation method, apparatus and system for remote access
WO2023020092A1 (zh) 基于多人协作的资源处理方法、装置及系统
CN118069279A (zh) 用于虚拟桌面底层结构解决方案的自适应实时通信插件
CN114035893A (zh) 虚拟机管理方法以及系统
CN113986368A (zh) 基于Linux的相机控制方法、装置、设备及存储介质
US11042714B2 (en) Synchronizing the language of a remote session with a client's language
US11601491B2 (en) Network-based media processing (NBMP) workflow management direct access in 5G framework for live uplink streaming (FLUS)
CN114143315B (zh) 边缘云系统、主机访问方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22888893

Country of ref document: EP

Kind code of ref document: A1