Process management method, device, storage medium and electronic device

By establishing process priority dependencies between boarding applications and target processes in installation-free technology, the boarding application crash caused by the recycling of the installation-free framework process is solved, and the stable operation of the target process and the improvement of user experience is achieved.

CN116263718BActive Publication Date: 2025-05-23BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111523027.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-05-23
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In installation-free technology, the operation of the boarding application depends on the survival of the process of the installation-free framework. However, when memory is insufficient, the system may recycle the process, causing the boarding application to fail to run.

Method used

By establishing a dependency between the process priority of the boarding application and the process priority of the target process of the host application, adjust the process priority of the target process to follow the process priority of the boarding application, thereby ensuring that the life cycle of the target process is not lower than the life cycle of the boarding application.

Benefits of technology

It effectively avoids the boarding application crash caused by the target process being recycled, and ensures a good user experience when using the boarding application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263718B_ABST
    Figure CN116263718B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a process management method, device, storage medium and electronic device, and relates to the field of computer technology. The method includes: obtaining the current process priority of a hosted application; adjusting the process priority of a target process of a host application corresponding to the hosted application to be consistent with the current process priority, and the target process is a process necessary for the host application to create a virtual operating environment for running the hosted application; wherein there is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change with the change of the process priority of the hosted application. Thus, during the operation of the hosted application, it is ensured that the life cycle of the target process is not less than the life cycle of the hosted application, thereby avoiding the problem of the host application crashing due to the recycling of the target process, and ensuring a good user experience for users when using the hosted application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a process management method, device, storage medium and electronic device. Background Art

[0002] In the free installation technology, the host application runs in the free installation framework (engine) of the host application. The free installation framework is the core process of the host application and is used to provide the operating environment required for the host application to run. For the host application, the core process is equivalent to the system process, which manages the data of the host application when it is running, such as the calculation of the process stub and the calculation of the task stack.

[0003] Since the free installation framework runs on the host application, it is only a background process in the host application for saving data. When the memory is insufficient, the system will kill the process running in the background to free up memory. However, since the operation of the host application depends on the free installation framework, if the process of the free installation framework is recycled by the system, it will inevitably cause the host application to fail to run. Therefore, it is particularly important to ensure the survival of the free installation framework process during the operation of the host application. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a process management method, comprising:

[0006] Get the current process priority of the hosted application;

[0007] Adjusting the process priority of a target process of a host application corresponding to the hosted application to be consistent with the current process priority, the target process being a process necessary for the host application to create a virtual operating environment for running the hosted application;

[0008] There is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change following the change of the process priority of the hosted application.

[0009] In a second aspect, the present disclosure provides a process management device, comprising:

[0010] An acquisition module configured to obtain a current process priority of a hosted application;

[0011] an adjustment module configured to adjust the process priority of a target process of a host application corresponding to the hosted application to be consistent with the current process priority, the target process being a process necessary for the host application to create a virtual operating environment for running the hosted application;

[0012] There is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change following the change of the process priority of the hosted application.

[0013] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0014] In a fourth aspect, the present disclosure provides an electronic device, including:

[0015] a storage device having a computer program stored thereon;

[0016] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0017] Based on the above technical solution, the priority of the target process of the host application is adjusted to be consistent with the current process priority of the host application through the pre-established dependency relationship between the process priority of the host application and the process priority of the target process. In this way, during the operation of the host application, the process priority of the target process of the host application is consistent with the current process priority of the host application, ensuring that the life cycle of the target process is not less than the life cycle of the host application, thereby avoiding the problem of the host application crashing due to the recycling of the target process, and ensuring a good user experience for users when using the host application.

[0018] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0020] Figure 1 is a flowchart of a process management method provided according to an exemplary embodiment;

[0021] Figure 2 is a flowchart of establishing a dependency relationship provided according to an exemplary embodiment;

[0022] Figure 3 is a flowchart of a process management method provided according to another exemplary embodiment;

[0023] Figure 4 is a schematic diagram of module connections of a process management device provided according to an exemplary embodiment;

[0024] Figure 5 It is a schematic structural diagram of an electronic device provided according to an exemplary embodiment. DETAILED DESCRIPTION

[0025] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0026] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0027] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0028] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0031] A hosted application is an application that is subordinate to a host application and relies on the operating environment provided by the host application to run. The host application can be referred to as the host, which can be used to represent the application entity that provides the operating environment for the integrated module. For example, if the host application running in the client is a social application, when the module of the mini-program engine is integrated in the social application, the social application can have the ability to open and display the mini-program. For another example, if the host application running in the client is an installation-free platform, the installation-free platform is integrated with an installation-free framework (engine), and the installation-free platform can run other native applications.

[0032] The host application runs in the free installation framework (engine) of the host application. The free installation framework is the core process of the host application and is used to provide the operating environment required for the host application to run. Since the operation of the host application depends on the free installation framework, if the process of the free installation framework is recycled by the system, the host application will inevitably fail to run. Therefore, it is particularly important to ensure the survival of the free installation framework process during the operation of the host application.

[0033] In the related art, there are generally two ways to keep a process alive. The first is to continue running by self-resurrection or resurrection of the process after the process of the free installation framework is recycled by the system. The second is to increase the priority of the process by using a foreground service.

[0034] For the first method, since the boarding application runs in the free installation framework of the host application, the data is stored in the memory. If the process of the free installation framework is recycled, the memory data will be lost. Even if the process of the free installation framework is restarted, its running state will become inconsistent.

[0035] For the second method, the process priority of the free installation framework can only be increased to level "3" through the foreground service. In the free installation application scenario, the process of the free installation framework is still at risk of being recycled by the system. Among them, the process priority from "0" to "15" indicates the priority from high to low. When the process priority of the free installation framework is increased by the foreground service, although the process priority of the free installation framework is increased from level "15" of the background process to level "3" of the visible process, the process priority of the host application running in the foreground is "0", resulting in the system (for example, the Android system) may still recycle the process of the free installation framework when reclaiming memory, causing the host application running in the foreground to crash. Moreover, in the free installation application scenario, using the foreground service to increase the process priority of the free installation framework will cause a notification bar that cannot be cancelled to appear in the display interface, causing trouble for users.

[0036] In view of the above technical problems, the embodiments of the present disclosure provide a process management method, device, storage medium and electronic device. By establishing a dependency relationship between the process priority of the host application and the process priority of the target process of the host application, the process priority of the target process is bound to the process priority of the host application, so that the process priority of the target process is adjusted to be consistent with the current process priority of the host application during the operation of the host application. Among them, the dependency relationship is used to make the process priority of the target process change with the change of the process priority of the host application. The target process is a process necessary for the host application to create a virtual operating environment for running the host application. For example, when the host application is running in the foreground, the current process priority of the host application is "0". According to the dependency relationship, the process priority of the target process is adjusted to "0", so as to ensure that the life cycle of the process of the free installation framework of the host application can be no less than the life cycle of the host application, avoid the problem of the host application crashing due to the recycling of the target process, and ensure a good user experience for users when using the host application.

[0037] A process management method, device, storage medium and electronic device proposed in an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0038] Figure 1 The flowchart of a process management method provided according to an exemplary embodiment is shown in FIG. 1 . The process management method provided in the embodiment of the present disclosure can be executed by an electronic device, and specifically by a process management method device, which can be implemented in software and / or hardware and configured in the electronic device. Please refer to Figure 1 The process management method provided by the embodiment of the present disclosure may include the following steps.

[0039] S110: Obtain the current process priority of the hosted application.

[0040] Here, the current process priority of the hosted application refers to the process priority of the hosted application in the current running state. For example, when the hosted application is running in the foreground, its current process priority is level "0", and when the hosted application is running in the background, its current process priority is level "3". Among them, the current process priority of the hosted application can be determined by the system process.

[0041] S120, adjusting the process priority of the target process of the host application corresponding to the hosted application to be consistent with the current process priority, the target process being a process necessary for the host application to create a virtual operating environment for running the hosted application; wherein there is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change in accordance with the change of the process priority of the hosted application.

[0042] Here, the target process refers to the process that the host application must create for running the virtual operating environment of the hosted application. The target process is the core process of the host application. It provides a virtual operating environment for the hosted application through the installation-free framework. The hosted application is not installed in the system, but runs in the virtual operating environment. The target process can be the main process of the host application or an independent process of the host application, which is used to manage the data of the hosted application during runtime.

[0043] A dependency relationship means that the process priority of the target process depends on the process priority of the hosted application. Under this dependency relationship, the process priority of the target process changes with the process priority of the hosted application. Based on this dependency relationship, the system can adjust the process priority of the target process. For example, when the hosted application is running in the foreground, the current process priority of the hosted application is level "0". According to this dependency relationship, the process priority of the target process is also level "0". When the hosted application is running in the background, the current process priority of the hosted application is level "3". According to this dependency relationship, the process priority of the target process is also level "3".

[0044] It should be understood that the dependency relationship actually binds the process priority of the target process to the process priority of the hosted application, so that during the running of the hosted application, the target process on which the hosted application depends will not be recycled by the system.

[0045] Exemplarily, when the hosted application starts to run, a dependency relationship between the process priority of the target process and the process priority of the hosted application may be established through the service component of the system.

[0046] Therefore, through the pre-established dependency relationship between the process priority of the hosted application and the process priority of the target process, the priority of the target process of the host application is adjusted to be consistent with the current process priority of the hosted application. In the running process of the hosted application, the process priority of the target process of the host application is consistent with the current process priority of the hosted application, ensuring that the life cycle of the target process is not less than the life cycle of the hosted application, thereby avoiding the problem of the host application crashing due to the recycling of the target process, and ensuring a good user experience for users when using the hosted application.

[0047] Figure 2 FIG. 1 is a flow chart of establishing a dependency relationship according to an exemplary embodiment. Figure 2 As shown, the dependencies can be established through the following steps.

[0048] S210, establishing a communication channel between the hosted application and the target process.

[0049] Here, when the hosted application starts running, a communication channel is established between the hosted application and the target process, and the communication channel is used for the hosted application and the target process to perform inter-process communication (IPC). That is, when the hosted application starts running, the hosted application and the target process are controlled to perform inter-process communication.

[0050] In some implementations, a communication channel between the host application and the target process may be established through a process communication component of the system.

[0051] The process communication component represents ContentProvider, one of the four major components of Android, which is used for data interaction and sharing between processes. ContentProvider is a component specially provided by the Android system for developers to share data between different applications. It provides a set of standard interfaces for obtaining and operating data, allowing developers to open their own application data to other applications for addition, deletion, modification and query according to their needs, without worrying about the security issues caused by directly opening database permissions.

[0052] In some implementations, the process communication component establishes a communication channel between the host application and the target process in a robust manner.

[0053] Here, when establishing a communication channel, the process communication component can use a stable method or an unstable method to establish the communication channel. Among them, the application using the unstable type ContentProvider will not be killed due to the death of the remote ContentProvider process, while the application using the stable type ContentProvider will be killed due to the death of the remote ContentProvider process.

[0054] In the installation-free application scenario, the communication channel between the host application and the target process is established in a stable manner by controlling the process communication component. If the target process is recycled by the system, the installation-free application running in the foreground will also be recycled synchronously.

[0055] S220, obtaining a communication handle corresponding to the communication channel, and caching the communication handle in the memory of the hosted application to establish the dependency relationship.

[0056] Here, the communication handle refers to the number of the communication channel established by ContentProvider. Each communication channel has a unique number. When the host application communicates with the target process through ContentProvider, the process priority of the target process will be raised to the same level as the communication source process. Among them, the communication source process is the process of the host application running in the foreground, and its process priority is "0".

[0057] When the host application performs inter-process communication with the target process, the corresponding communication handle is cached in the host application's memory, and after the inter-process communication is completed, the communication handle is not released. At this time, the system will think that the host application has been performing inter-process communication with the target process, thereby establishing a dependency relationship between the process priority of the target process and the process priority of the host application.

[0058] For example, when the host application is running in the foreground, the priority of the host application is "0". After caching the above communication handle in the memory of the host application, the system will consider that the host application has been communicating with the target process, thereby raising the process priority of the target process to be consistent with the process priority of the host application, that is, the process priority of the target process is raised to "0".

[0059] When the host application retreats to the background, the process priority of the host application is reduced from "0" to "3". Since the communication handle is cached in the memory of the host application, the system still considers that the host application is communicating with the target process, and thus increases the process priority of the target process to be consistent with the process priority of the host application, that is, the process priority of the target process is "3".

[0060] It should be understood that if the above dependency is not used to increase the process priority of the target process, when the host application is retired to the background, the process priority of the host application will be reduced to level "13". Obviously, by using the above dependency, the process priority of the target process can be greatly improved, thereby avoiding the flash back problem caused by the target process being recycled by the system during the operation of the host application.

[0061] It is worth noting that since the communication handle is cached in the memory of the host application, when the memory of the host application is reclaimed, the communication handle will also be released, thereby removing the dependency between the process priority of the target process and the process priority of the host application.

[0062] Figure 3 FIG. 1 is a flow chart of a process management method provided according to another exemplary embodiment. Figure 3 As shown, the process management method may include the following steps.

[0063] S310: Obtain the current running status of the hosted application.

[0064] Here, the current running state of the hosted application refers to the real-time running state of the hosted application, such as the foreground running state or the background running state, etc. The current running state of the hosted application can be sensed through the system process or the host application.

[0065] S320: Determine whether to release the dependency relationship according to the current running state.

[0066] Here, since the running of the hosted application depends on the target process of the host application, it can be determined whether to release the dependency between the process priority of the hosted application and the process priority of the target process according to the current running state of the hosted application.

[0067] In some implementations, when the current running state indicates that the hosted application is running in the foreground or in the background, the dependency relationship is maintained.

[0068] Here, when the hosted application is in the foreground running state or the background running state, the hosted application still needs to rely on the virtual running environment created by the target process to run. Therefore, the dependency relationship needs to be maintained so that the process priority of the target process can be consistent with the process priority of the hosted application, thereby avoiding the target process from being recycled by the system.

[0069] As an example, when a dependency relationship is established by means of the above communication handle, a way to maintain the dependency relationship may be to continue to store the above communication handle in the memory of the host application, that is, not to release the communication handle.

[0070] As another example, in the case where a dependency is established through a service component of the system, a way to maintain the dependency may be to continue to establish the dependency through the service component.

[0071] In some implementations, when the current running state indicates that the hosted application has exited running, the dependency relationship is released.

[0072] Here, when the hosted application exits, the target process does not need to continue to create a virtual operating environment for the running of the hosted application. At this time, the dependency between the process priority of the target process and the process priority of the hosted application can be released. That is, after the hosted application exits, the process priority of the target process no longer changes with the process priority of the hosted application.

[0073] As an example, in the case where the dependency is established by the communication handle, the dependency can be released by releasing the communication handle cached in the memory of the host application. At this point, the system no longer considers that the host application and the target process are communicating between processes, thereby releasing the dependency.

[0074] It should be understood that after the hosted application exits, the memory of the hosted application is reclaimed, and the communication handle stored in the memory of the hosted application is also released synchronously.

[0075] It is worth noting that releasing the dependency between the process priority of the host application and the process priority of the target process means releasing the dependency after the host application exits operation. However, when the user starts the host application B again after exiting the host application A, the electronic device re-establishes the dependency between the process priority of the host application B and the process priority of the target process according to the above implementation. In addition, when multiple host applications are running simultaneously in the host application, multiple dependencies may exist. When multiple dependencies exist, the process priority of the target process follows the corresponding highest process priority among the multiple dependencies.

[0076] Figure 4 FIG. 1 is a schematic diagram of module connections of a process management device provided according to an exemplary embodiment. Figure 4 As shown, the embodiment of the present disclosure provides a process management device, and the device 400 may include:

[0077] The acquisition module 401 is configured to acquire the current process priority of the hosted application;

[0078] An adjustment module 402 is configured to adjust the process priority of a target process of a host application corresponding to the hosted application to be consistent with the current process priority, wherein the target process is a process necessary for the host application to create a virtual operating environment for running the hosted application;

[0079] There is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change following the change of the process priority of the hosted application.

[0080] Optionally, the adjustment module 402 includes:

[0081] a channel establishing unit, configured to establish a communication channel between the hosted application and the target process;

[0082] The cache unit is configured to obtain the communication handle corresponding to the communication channel and cache the communication handle in the memory of the host application to establish the dependency relationship.

[0083] Optionally, the channel establishing unit is specifically configured as follows:

[0084] A communication channel between the host application and the target process is established through a process communication component.

[0085] Optionally, the channel establishing unit is specifically configured as follows:

[0086] A communication channel between the host application and the target process is established in a stable manner through the process communication component.

[0087] Optionally, the device 400 further includes:

[0088] A state determination module configured to obtain a current running state of the hosted application;

[0089] The judgment module is configured to determine whether to release the dependency according to the current running state.

[0090] Optionally, the judgment module is specifically configured as follows:

[0091] When the current running state indicates that the hosted application is running in the foreground or in the background, maintaining the dependency relationship;

[0092] When the current running state indicates that the hosted application has exited running, the dependency relationship is released.

[0093] The specific implementation of each functional module of the device in the above embodiment has been described in detail in the part about the method, and will not be repeated here.

[0094] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0095] like Figure 5As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0096] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0097] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains 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 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0098] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0099] In some embodiments, the electronic device can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0100] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0101] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the current process priority of the hosted application; adjusts the process priority of the target process of the host application corresponding to the hosted application to be consistent with the current process priority, and the target process is a process required for the host application to create a virtual operating environment for running the hosted application; wherein there is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change with the change of the process priority of the hosted application.

[0102] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, 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 cases involving 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).

[0103] 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 disclosure. 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 implementations as replacements, 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.

[0104] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0105] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0106] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0107] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0108] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0109] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A process management method, It is characterized in that include: Get the current process priority of the hosted application; Adjusting the process priority of a target process of a host application corresponding to the hosted application to be consistent with the current process priority, the target process being a process necessary for the host application to create a virtual operating environment for running the hosted application; There is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change with the change of the process priority of the hosted application; The dependencies are established by following the steps below: Establishing a communication channel between the hosted application and the target process; A communication handle corresponding to the communication channel is obtained, and the communication handle is cached in the memory of the host application to establish the dependency relationship.

2. The method according to claim 1, It is characterized in that The establishing of a communication channel between the host application and the target process includes: A communication channel between the host application and the target process is established through a process communication component.

3. The method according to claim 2, It is characterized in that The establishing of a communication channel between the host application and the target process through a process communication component includes: A communication channel between the host application and the target process is established in a stable manner through the process communication component.

4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: Obtaining the current running status of the hosted application; Determine whether to release the dependency relationship according to the current running state.

5. The method according to claim 4, It is characterized in that The determining whether to release the dependency relationship according to the current running state includes: When the current running state indicates that the hosted application is running in the foreground or in the background, maintaining the dependency relationship; When the current running state indicates that the hosted application has exited running, the dependency relationship is released.

6. A process management device, It is characterized in that include: An acquisition module configured to obtain a current process priority of a hosted application; an adjustment module configured to adjust the process priority of a target process of a host application corresponding to the hosted application to be consistent with the current process priority, the target process being a process necessary for the host application to create a virtual operating environment for running the hosted application; There is a dependency relationship between the process priority of the hosted application and the process priority of the target process, and the dependency relationship is used to make the process priority of the target process change with the change of the process priority of the hosted application; The adjustment module comprises: a channel establishing unit, configured to establish a communication channel between the hosted application and the target process; The cache unit is configured to obtain the communication handle corresponding to the communication channel and cache the communication handle in the memory of the host application to establish the dependency relationship.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 5 are implemented.

8. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for running applet and computer storage medium

    CN110377369A

  • Terminal application control method, mobile terminal and storage medium

    CN110865879A

  • Running process multiplexing method and device

    CN111913707A