CN115220881A - Process management method, electronic device, process management system, and storage medium - Google Patents

Process management method, electronic device, process management system, and storage medium Download PDF

Info

Publication number
CN115220881A
CN115220881A CN202110419132.8A CN202110419132A CN115220881A CN 115220881 A CN115220881 A CN 115220881A CN 202110419132 A CN202110419132 A CN 202110419132A CN 115220881 A CN115220881 A CN 115220881A
Authority
CN
China
Prior art keywords
information
process management
processes
policy information
mobile phone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110419132.8A
Other languages
Chinese (zh)
Inventor
马宇驰
王菲
赵小虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110419132.8A priority Critical patent/CN115220881A/en
Publication of CN115220881A publication Critical patent/CN115220881A/en
Pending legal-status Critical Current

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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • 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
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Abstract

The application provides a process management method, an electronic device, a process management system and a storage medium. The method comprises the following steps: the method comprises the steps that a first device obtains process information of one or more processes running on a second device in communication connection with the first device; the first device sends process management policy information to the second device, wherein the process management policy information is determined by the first device according to the process information, and the process management policy information is used for representing termination information corresponding to each process in the process. The second device manages the local process according to the process management policy information received from the first device, e.g., terminates and/or merges locally running processes. The second device can actively manage the local process so as to reduce the situation that the process is forcibly terminated by the system.

Description

Process management method, electronic device, process management system, and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a process management method, an electronic device, a process management system, and a computer-readable storage medium.
Background
Currently, the Internet of Things (IoT) technology has a profound impact on the traditional model, whether in the production or living areas.
An intelligent home scene is an important application scene of the internet of things technology. In an intelligent home life scene, each intelligent home device is connected with the control terminal through a network (for example, a wireless network such as bluetooth and WiFi), so that a user can control and manage the intelligent home device through the control terminal to construct an intelligent life scene.
However, the hardware specification of the smart home device is generally low (for example, the memory capacity is small), and when a plurality of processes run on the smart home device, part of the processes may be forcibly terminated by the system due to insufficient memory, which may affect the user experience.
Disclosure of Invention
Some embodiments of the present application provide a process management method, an electronic device, a process management system, and a computer-readable storage medium, which are described below in various aspects, and embodiments and advantages of the following aspects may be mutually referenced.
In a first aspect, the present application provides a process management method for a first device, where the method includes: acquiring process information of one or more processes running on second equipment in communication connection with the first equipment; and sending process management strategy information to the second device, wherein the process management strategy information is determined by the first device according to the process information, and the process management strategy information is used for indicating termination information corresponding to each process in the process.
According to the embodiment of the application, the first device (for example, a mobile phone) determines the process management policy information and provides the process management policy information to the second device (for example, an IoT device), so that the second device can actively optimize the local process according to the process management policy information, and the situation that the process is forcibly terminated is reduced.
In addition, the first device determines the process management policy information, the second device only needs to execute process management according to the process management policy information provided by the first device, and the self computing power is not consumed to determine the process management policy information, so that the computing power overhead of the second device can be saved.
In some embodiments, the process management policy information includes: a type flag of a non-terminable process of the one or more processes; and/or a termination priority of a terminable process of the one or more processes.
In some embodiments, the process information of the process includes first attribute information indicating whether the process is an unmanageable process, and the process management policy information includes a type flag of an unmanageable process of the one or more processes; determining process management policy information according to the process information, comprising: determining a non-terminable process in the one or more processes according to the first attribute information, wherein when the first attribute information indicates that the process is a non-manageable process, the process is determined as the non-terminable process; a type flag of the non-terminable process is added to the process management policy information.
In some embodiments, determining process management policy information from the process information includes: determining an un-terminable process in one or more processes according to the first attribute information and second attribute information, wherein the second attribute information is cloud policy information acquired from a cloud server in communication connection with the first device, and the second attribute information is used for indicating whether the process is an unmanagable process; when one of the first attribute information and the second attribute information indicates that the process is an unmanageable process, determining the process as an untenable process; a type flag of the non-terminable process is added to the process management policy information.
In the implementation mode of the application, the process management strategy information is adjusted according to the cloud strategy information, so that processes on the intelligent household equipment can be actively managed more accurately, the probability that the processes are mistakenly killed is reduced, and the user experience is improved.
In some embodiments, the process information for a process includes one or more items of system resource usage information for the process; the process management policy information includes a termination priority of a terminable process of the one or more processes; determining process management policy information according to the process information, comprising: calculating the system resource occupation score of the process according to the system resource occupation information, wherein the system resource occupation score is the weighted sum of one or more items of system resource occupation information; and determining the termination priority of the process according to the system resource occupation score.
In some embodiments, determining process management policy information from the process information includes: calculating the system resource occupation score of the process according to the system resource occupation information and the weight value adjustment information; the weight adjustment information is cloud strategy information obtained from a cloud server in communication connection with the first device, and the weight adjustment information is used for adjusting the weight of at least one item of system resource occupation information; and determining the termination priority of the process according to the system resource occupation score.
According to the method and the system for the active management of the processes, the process management strategy information is adjusted according to the cloud strategy information, so that the processes on the intelligent home equipment can be actively managed more accurately, the probability that the processes are mistakenly killed is reduced, and user experience is improved.
In some embodiments, the system resource occupancy information for a process includes one or more of: the duration of the process; CPU occupancy of the process; memory occupancy of a process.
In some embodiments, obtaining cloud policy information from a cloud server communicatively coupled to the first device includes: the first equipment acquires cloud strategy information from a cloud server according to a set time interval.
According to the implementation mode of the application, the cloud policy information can be updated regularly, and more accurate process management policy information can be determined.
In a second aspect, an embodiment of the present application provides a process management method, which is used for a second device, where the second device is in communication connection with a first device, and the method includes: sending process information of one or more processes running on a second device to a first device; receiving process management policy information from the first device, wherein the process management policy information is used for indicating termination information corresponding to each process in one or more processes, and is determined according to the process information; at least a portion of the one or more processes are terminated and/or merged based on the process management policy information.
According to the method and the device, the first device (for example, a mobile phone) provides the process management policy information to the second device (for example, an IoT device), so that the second device can actively optimize the local process according to the process management policy information, and the situation that the process is forcibly terminated is reduced.
In addition, in the embodiment of the application, the second device only needs to execute process management according to the process management policy information provided by the first device, and does not need to consume self computing power to determine the process management policy information, so that the computing power overhead of the second device can be saved.
In some embodiments, the process management policy information includes: a type flag of a non-terminable process of the one or more processes; at least a portion of the one or more processes are terminated and/or merged, wherein the terminated process does not include a non-terminable process as determined by the type tag.
In some embodiments, the process management policy information includes a termination priority of a process of the one or more processes that can be terminated; at least some of the one or more processes are terminated and/or merged, wherein the terminated processes do not include processes having a termination priority below a first threshold as determined by a termination priority.
According to the method and the device for processing the second device, the probability that the process is killed by mistake can be reduced, and the influence on normal use of the second device by a user is reduced.
In some embodiments, terminating and/or merging at least a portion of one or more processes includes: and based on the fact that the residual memory capacity of the second equipment is smaller than a second threshold, sequentially terminating the processes with termination priorities higher than the first threshold according to the sequence from high termination priority to low termination priority.
In some embodiments, terminating and/or merging at least a portion of one or more processes includes: and merging at least part of the processes which can be terminated based on the fact that the termination priority of the processes currently operated by the second equipment is below the first threshold value and the residual memory capacity of the second equipment is still smaller than the second threshold value.
In some embodiments, the first threshold and/or the second threshold is obtained by the second device directly or indirectly from the cloud server.
In some embodiments, terminating and/or merging at least a portion of one or more processes includes: at least a portion of the one or more processes are terminated and/or merged while the second device is in a standby state.
When the second device is in standby, the user has no direct interaction with the second device. Therefore, the method and the device for processing the data can reduce the influence on the user experience.
In a third aspect, an embodiment of the present application provides a process management method, which is used for a first device, where the first device is in communication connection with a plurality of second devices, and the method includes: running a first process for a first service; according to a preset rule, selecting target equipment for completing a first service by cooperating with first equipment from a plurality of pieces of second equipment, wherein the plurality of pieces of second equipment can run a second process for completing the first service by cooperating with the first equipment; and sending a first process management instruction to target equipment in the plurality of second equipment, wherein the first process management instruction is used for indicating the target equipment to run the second process.
According to the embodiment of the application, the first device can comprehensively consider a plurality of second devices in a distributed scene, and selects a proper target device from the plurality of second devices to run the second process, so as to optimize user experience.
In addition, the first device determines the process management policy information, the second device only needs to execute process management according to the process management policy information provided by the first device, and the self computing power is not consumed to determine the process management policy information, so that the computing power overhead of the second device can be saved.
In some embodiments, the plurality of second devices are external to the target device and include at least one second device running a second process; the method further comprises the following steps: and sending a second process management instruction to the at least one second device, wherein the second process management instruction is used for indicating the at least one second device to terminate the second process.
According to the embodiment of the application, through the second process management instruction sent by the first device, the second process can be actively terminated by other second devices except the target device, so that the memory occupation condition can be optimized.
In some embodiments, sending the first process management instruction to the target device of the plurality of second devices includes: acquiring a process running state of the target equipment, wherein the process running state is used for indicating whether the target equipment runs a second process; if the target equipment runs the second process, sending a process continuing instruction to the target equipment, wherein the process continuing instruction enables the target equipment to continue to run the second process; and/or if the target equipment does not run the second process, sending an instruction for starting the second process to the target equipment.
In some embodiments, selecting the target device from a plurality of second devices according to a preset rule includes: selecting a target device from the plurality of second devices according to a user operation; or selecting a target device from the plurality of second devices according to the distance between each second device in the plurality of second devices and the first device; or, the target device is selected from a plurality of second devices according to a preset device use priority.
In some embodiments, the user operates as one of: an NFC tag reading operation; performing screen touch operation; and/or the distance between each second device in the plurality of second devices and the first device is acquired by the second device through a wireless ranging technology in a wireless communication mode; the device usage priority is determined according to device capabilities of the plurality of second devices.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: a memory to store instructions for execution by one or more processors of the electronic device; the processor, when executing the instructions in the memory, may cause the electronic device to perform the process management method provided in any embodiment of the first aspect of the present application. The beneficial effects that can be achieved by the fourth aspect can refer to the beneficial effects of any one of the embodiments of the first aspect, and are not described herein again.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: a memory to store instructions for execution by one or more processors of the electronic device; the processor, when executing the instructions in the memory, may cause the electronic device to perform the process management method provided in any embodiment of the second aspect of the present application. The beneficial effects that can be achieved by the fifth aspect can refer to the beneficial effects of any one of the embodiments of the second aspect, and are not described herein again.
In a sixth aspect, an embodiment of the present application provides an electronic device, including: a memory to store instructions for execution by one or more processors of the electronic device; the processor, when executing the instructions in the memory, may cause the electronic device to perform the process management method provided in any embodiment of the third aspect of the present application. The beneficial effects that can be achieved by the sixth aspect can refer to the beneficial effects of any one of the embodiments of the third aspect, and are not described herein again.
In a seventh aspect, an embodiment of the present application provides a process management system, including a first device and a second device, where the first device is configured to execute the process management method provided in any embodiment of the first aspect of the present application, and the second device is configured to execute the process management method provided in any embodiment of the second aspect of the present application. The beneficial effects that can be achieved by the seventh aspect may refer to the beneficial effects of any embodiment of the first aspect of the present application or the beneficial effects of any embodiment of the second aspect of the present application, and are not described herein again.
In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the instructions may cause the computer to perform a process management method provided in any embodiment of the first aspect of the present application, or any manner of the second aspect of the present application, or any manner of the third aspect of the present application. The beneficial effects that can be achieved by the eighth aspect can refer to the beneficial effects of any embodiment of the first aspect of the present application, the beneficial effects of any embodiment of the second aspect of the present application, or the beneficial effects of any embodiment of the third aspect of the present application, and are not described herein again.
Drawings
Fig. 1 is a first application scenario diagram of a process management method according to an embodiment of the present application;
fig. 2a is a first exemplary flowchart of a process management method according to an embodiment of the present application;
FIG. 2b is an exemplary flowchart of a process management process provided by an embodiment of the present application;
fig. 2c is an exemplary flowchart of a process merging process provided in an embodiment of the present application;
fig. 3 is a second exemplary flowchart of a process management method according to an embodiment of the present application;
fig. 4 is a schematic view of an application scenario of a process management method according to an embodiment of the present application;
fig. 5 is a third exemplary flowchart of a process management method according to an embodiment of the present application;
fig. 6 is an exemplary structure diagram of a process management system according to an embodiment of the present application;
fig. 7a is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 7b is a software architecture diagram of an electronic device according to an embodiment of the present application;
FIG. 8 shows a block diagram of an electronic device provided by an embodiment of the application;
fig. 9 shows a schematic structural diagram of a System on Chip (SoC) according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, specific embodiments of the present application will be described in detail with reference to the accompanying drawings.
Fig. 1 shows an application scenario of the internet of things technology, specifically, an intelligent home life scenario. Fig. 1 includes intelligent household devices such as an intelligent desk lamp 210, an intelligent sound box 220a, a television 230b, an intelligent electric cooker 240, and the intelligent household devices are in communication connection with a household gateway 250 through WiFi communication modules. Fig. 1 further includes a mobile phone 100 and a smart speaker 220b, wherein the mobile phone 100 is in communication connection with the home gateway 250 through a WiFi communication module, and the smart speaker 220b is in communication connection with the mobile phone 100 through a bluetooth module. The devices are connected by direct or indirect communication to form a home lan 200.
In the home lan 200 shown in fig. 1, the mobile phone 100 generally plays a role as a central device for controlling and managing smart home devices due to its relatively strong computing power and relatively complete functions. For example, a user may install a device management application on a cell phone (e.g., smart life) TM Mijia, a rice TM Beauty house TM Etc.), and then the smart home device is controlled by operating the mobile phone (for example, the desk lamp 210 is turned on, the music on the mobile phone 100 is turned to the sound box 220a for playing, etc.); for another example, in a distributed service, the mobile phone 100 is generally used as a core computing and communication device, and the smart home device is mainly used as a peripheral device (for example, in a screen projection service, the mobile phone 100 is used as a main device for acquiring video resources, and the television 220b is used as a display device for video pictures).
In addition, the smart home devices have limited ability to perform multiple tasks due to low hardware configuration. For example, the memory capacity of the smart home device is usually small (for example, usually below 1GB or lower), and when a plurality of service processes run on the smart home device, a situation that part of the service processes are forcibly terminated by the system due to insufficient memory space may occur, which may adversely affect the user experience. For example, when a user is playing a game on television, if the game process is forcibly terminated by the system, the user experience will be adversely affected.
Therefore, the embodiment of the application is used for providing a process management method, which is used for improving the memory occupation state of an electronic device (for example, an intelligent home device) and reducing the situation that a process is forcibly terminated by a system.
According to a first embodiment of the present application, in a scenario shown in fig. 1, a smart home device (as a second device) sends process information of a process locally run by the smart home device to a mobile phone 100 (as a first device), and after receiving the process information, the mobile phone determines process management policy information according to the process information, where the policy information is used to indicate termination information corresponding to the process. Then, the mobile phone sends the determined process management policy information to the smart home device, so that the smart home device manages the local process according to the process management policy information, for example, terminates and/or merges one or more local processes. Therefore, the intelligent home equipment can actively terminate a part of local processes, so that the memory occupation state is optimized, and the situation that the processes are forcibly terminated by the system is reduced.
According to a second embodiment of the present application, in a distributed coordination scenario (e.g., in a screen-shooting scenario), after a mobile phone (as a first device) starts a distributed service process (as a first process, e.g., a screen-shooting process), it is determined that two or more devices (referred to as "coordination devices" or "second devices" herein) capable of completing the distributed service in coordination with the mobile phone are included in a home lan. Then, the mobile phone selects a target cooperative device (also referred to as a target device) for completing the distributed service in cooperation with the mobile phone from the two or more cooperative devices according to a preset rule, and sends a first process management instruction to the target cooperative device, where the first process management instruction enables the target cooperative device to run a cooperative process (serving as a second process) for completing the distributed service in cooperation with the mobile phone. In some examples, the mobile phone further sends a second process management instruction to other cooperative devices, other than the target cooperative device, which are running the cooperative process, and the second process management instruction is used for instructing the other cooperative devices, which are running the cooperative process, to terminate the running cooperative process. Therefore, in this example, other cooperative devices that are running the cooperative process may actively terminate their running cooperative process, and thus memory footprint may be optimized.
In two embodiments provided in the present application, the mobile phone is configured to generate process management information (for example, process management policy information in the first embodiment, and a process management instruction in the second embodiment), and after generating the process management information, the mobile phone sends the process management information to the smart home device. And after receiving the process management information, the intelligent home equipment manages the local process according to the process management information. That is to say, in both embodiments, the mobile phone serves as a control device (first device) for generating the process management information, and the smart home device serves as an execution device (second device) for executing the process management according to the process management information. Therefore, the intelligent home equipment can execute the process management according to the process management information sent by the mobile phone, and the calculation power of the intelligent home equipment is not consumed to calculate the process management information, so that the calculation power expense of the intelligent home equipment can be saved. Especially, for some intelligent household devices (such as an electric cooker, a desk lamp and the like) with simpler hardware configuration, the calculation of determining the process management information is difficult to support by the calculation, and the active process management of the intelligent household devices can be realized by the method provided by the application.
It should be noted that, although the scene shown in fig. 1 is an example of an application scene of the technical solution of the present application, the present application is not limited to this. The technical scheme of this application also can be applied to other scenes such as wisdom official working scene, wisdom city scene, intelligent factory scene, wisdom traffic scene, car networking scene.
Although a mobile phone is taken as an example of the first device in the scenario shown in fig. 1, the present application is not limited thereto. In other examples, the first device may also be other computing-capable devices, such as a laptop, tablet, wearable device (e.g., watch, smart glasses, helmet), desktop computer, network device (e.g., gateway, router), car machine, and so forth.
Although the smart home device is taken as an example of the second device in the scenario shown in fig. 1, the present application is not limited thereto. In other examples, the second device may be other IoT devices or electronic devices besides smart home devices, such as vehicle-mounted devices (e.g., car machines, car navigation systems, car speakers), office devices (e.g., projectors, printers), urban public facilities (e.g., road monitoring cameras, fire-fighting devices, bus station displays), and so on, which are not described in detail herein.
Specific embodiments of the present application are described below in conjunction with the scenario illustrated in fig. 1, but it is to be understood that the present application is not limited thereto.
[ EXAMPLES ] A method for producing a semiconductor device
The embodiment provides a process management method. In this embodiment, the smart home device may collect process information of the local process, and send the collected process information to the mobile phone 100. Then, the mobile phone 100 generates process management policy information according to the received process information, and sends the process management policy information to the smart home device. After receiving the process management policy information sent by the mobile phone 100, the smart home device executes a process management process, for example, terminates and/or merges one or more local processes to release the memory occupied by the local processes, so that the memory occupation condition is actively optimized, and the condition that the processes are forcibly terminated by the system is reduced.
In addition, in the embodiment, the process management policy information is determined by using the device with high computing power (specifically, the mobile phone 100), and the smart home device only needs to execute the process management according to the management policy, so that the computing power overhead of the smart home device itself can be saved. Especially for devices such as the rice cooker 240 and the desk lamp 210 which are lack of computing power, the embodiment can make up for the defect that it is difficult to determine the process management strategy information by self-computing power.
The following describes the process management method provided by this embodiment with reference to fig. 2 a. Referring to fig. 2a, the process management method provided in this embodiment includes:
s110: and the intelligent household equipment collects the process information of the local process. In this embodiment, the process information includes one or more of the following items:
process Identification (PID): the unique identifier of the process in the smart home device, and the PID of the process is 938, 1034 for example. The PID is operated to operate the process, for example, terminate the process, query the memory occupancy of the process, etc.
Process Name (Process Name): for example, "com, android", "CastScreen" (screen projection progress), "Tank" (Tank battle game progress), "Browser" (Browser progress), etc. In the Android device, the process name may be a package name of the application APK, or may be a name customized by a user (for example, a name customized in a control file "Android manifest.
A process Start Time (Start Time) and a process End Time (End Time);
duration of process (Duration Time): the duration of the process since the smart home device was powered on. If the process is not terminated, the process duration is the system current time of the intelligent household equipment minus the process starting time (StartTime); if the process has terminated, the process duration is the process End Time (End Time) minus the process start Time (StartTime).
CPU occupancy (CPU Rate): the ratio of the CPU time occupied by the process to the duration T (which may also be understood as the CPU time occupied by the process per unit time) is within the duration T. For example, within a duration of 20ms, if the CPU time taken by process "CastScreen" is 3ms, then the CPU occupancy of process "CastScreen" is 15%.
Memory occupancy Rate (RAM Rate), a ratio of memory capacity occupied by the process to total memory capacity of the smart home device. There are many different calculation methods for the memory capacity occupied by the process, such as VSS, RSS, PSS, USS, and so on. In this embodiment, the memory capacity occupied by the process is a proportion of a shared library occupied memory (PSS), and the PSS includes a process exclusive memory and a shared library memory allocated to the process, so that the memory actually occupied by the process can be reflected more truly. In other embodiments, the method for calculating the memory capacity occupied by the process may also be other methods, for example, a Unique Set Size (USS) process.
Process Attribute (Attribute) for indicating whether a process can be managed or not. In this embodiment, when the attribute value is "Y", it indicates that the process can be managed, and when the attribute value is "N", it indicates that the process cannot be managed. For system-essential processes, as well as some commonly used processes (e.g., "NFC _ reader" (NFC reader process)), the user may not want them to be terminated, and therefore, the attribute value of this type of process may be set to "N". The property values of the processes may be specified by the application and/or system developer, for example, in the control file "android manifest. Xml," or in a special configuration file (for example, a process named "NFC _ reader" is specified as an unmanageable process in the configuration file).
Device State (Device State): including an active state, a standby state, and a power-off state. The active state can be divided into a busy state and an idle state, the busy state is, for example, a state with high CPU occupancy of the device (for example, CPU occupancy is above 40%), and the idle state is, for example, a state with a bright screen of the device but low CPU occupancy (for example, CPU occupancy is below 20%). The standby state is a state in which the device is turned on but does not perform substantial operations, and the device entering the standby state can generally save the power consumption of the device.
Table 1 takes a television 230a as an example, and provides an example of the process information of the smart home device provided in this embodiment. For other smart home devices, reference may be made to the example of the television 230a, which is not described in detail. It should be noted that only a portion of the processes running on television 230a are shown in Table 1 for economy.
Table 1 schedule information of a partial schedule running on the tv 230a (collection time: 13
Figure BDA0003027195540000071
It should be noted that, in the process running process, the CPU occupancy and the memory occupancy of the process are dynamically changed. In order to reflect the CPU occupancy/memory occupancy of the processes more accurately, in table 1, the CPU occupancy/memory occupancy of each process is not the actual CPU occupancy/memory occupancy of the process at the process information collection time (i.e., 13. The CPU occupancy of the process "Guardian" is described below as an example.
In this embodiment, the smart home device queries the CPU occupancy of each local process at a set time interval (in this example, 0.5 hour). Referring to table 1, the start time of the process "Guardian" is 9:12, then, television 230a is at 9:30, 10:00, 10:30, \8230;, 13:00 queries the CPU occupancy rate of the process "Guardian" respectively, so as to obtain 8 CPU occupancy rate values which are respectively marked as M1, M2, \8230;, M8. Then, the mobile phone 100 takes the average value (12.3%) of M1 to M8 as the CPU occupancy of the process "Guardian" in table 1. In addition, the determination method of the memory occupancy rate in table 1 is substantially the same as the determination method of the CPU occupancy rate, and is not described again.
In addition, the schedule information in table 1 is only an exemplary illustration of the schedule information option of the present application, and those skilled in the art may make other modifications, for example, add or subtract schedule information options on the basis of table 1.
In addition, since the hardware configurations of the smart home devices are different, for example, the smart home devices may be devices with higher hardware configurations such as the television 230a, and may also be devices with lower hardware configurations such as the desk lamp, and therefore, the capabilities of the smart home devices for collecting the process information are also different. For this purpose, the embodiment gives priority to collecting partial process information (see table 2 for details). In table 2, the process information option with the collection priority level "high" is the process information that is to be preferentially guaranteed to be collected, the process information option with the collection priority level "medium" is the secondary process information, and when the computing capability and/or the storage capability of the smart home device are limited, the process information may not be collected.
TABLE 2 Collection priority for Process information options
Process information options Collection priority
Duration of process In (1)
CPU occupancy rate Height of
RAM occupancy rate Height of
Process attributes Height of
Device status In
S120: the smart home device sends the collected process information to the mobile phone 100.
In this embodiment, when the communication state between the smart home device and the mobile phone 100 is switched from the disconnection state to the connection state, the smart home device sends the collected process information to the mobile phone 100. The scenario that the communication state of the smart home device and the mobile phone 100 is switched from the disconnected state to the connected state is, for example: the state of the smart home devices in the home lan 200 is switched from an offline state to an online state (for example, a WiFi switch of the smart home devices is turned on); the state of the mobile phone 100 in the home lan 200 is switched from an offline state to an online state (e.g., the user returns home with the mobile phone 100), and so on.
When the smart home device is in a continuous connection state with the mobile phone 100, the smart home device collects process information of a local process according to a set time interval (for example, 0.5 hour, 1 hour, 3 hours, and the like) and synchronizes the newly collected process information to the mobile phone 100.
S130: the mobile phone 100 generates process management policy information according to the process information received from the smart home device, where the process management policy information is used to indicate termination information corresponding to a process on the smart home device. For ease of understanding, the process management policy information provided in the present embodiment is first given below, and then the determination method of the process management policy information is described.
Table 3 exemplarily shows process management policy information provided by the handset 100 to the television 230 a.
According to the process management method provided by the embodiment, the processes on the intelligent household equipment are divided into the terminable processes and the non-terminable processes. For the non-terminable process, the process management policy information includes a non-terminable flag (as a type flag, this embodiment is "maintain") corresponding to the process. For example, table 3 includes a "maintain" flag corresponding to process E, indicating that process E is a non-terminable process.
In addition, the process management policy information also includes the termination priority of each terminable process. Referring to Table 3, the termination priority of Process D is 16.0 and the termination priority of Process A is 13.4. Wherein the higher the "termination priority" is, the more likely it is to be terminated.
Table 3 process management policy information for television 230a
Figure BDA0003027195540000081
Figure BDA0003027195540000091
The following describes a process of determining process management policy information by the mobile phone 100, specifically:
first, the cell phone 100 determines an un-terminable process on the smart home device.
Specifically, the mobile phone 100 determines an un-terminable process among the processes a to E according to a process attribute (as first attribute information) in the received process information (i.e., table 1). If the process attribute value of a process is "N", the handset 100 determines that the process is a non-terminable process and adds a type tag (i.e., "maintain" tag) of the process to the process management policy information. In this embodiment, the mobile phone 100 determines the process E as a non-terminable process.
Second, the handset 100 determines the termination priority in each of the terminable processes. In some examples, handset 100 determines a terminable process based on the process attribute, e.g., when the process attribute value of a process is "Y", handset 100 determines the process as a terminable process (e.g., handset 100 determines process D as a terminable process); in other examples, the cell phone 100 determines the processes in the process information table other than the non-terminable process as terminable processes (e.g., the cell phone 100 determines the processes a to D as terminable processes).
Specifically, the mobile phone 100 determines the system resource occupation score of each terminable process according to the system resource occupation information in the received process information, and takes the system resource occupation score of the process as the termination priority of the process.
Wherein, the system resource occupation information of the process comprises: process duration (DurationTime), CPU occupancy (CPU Rate) of the process, and/or memory occupancy (RAM Rate) of the process. The system resource occupation score of the process is a weighted sum of the above system resource occupation information, specifically: the system resource occupation score of the process P = duration time × K1+ CPU Rate × K2+ RAM Rate × K3 × S. (hereinafter, this formula is referred to as "formula (1)").
Where K1 is a weight of the process duration (in units of s). Considering that the duration of the process is usually a large value, for example, assuming that the process lasts for one hour, the duration time is 3600 (1 hour equals 3600 s), so in this embodiment, K1 is a decimal number (e.g., 0.001) less than 1;
k2 is the weight of the CPU occupancy rate. The CPU occupancy of the process is a decimal (e.g., 0.2) below 1, and in order to increase the proportion of the CPU occupancy in the termination priority P, in this embodiment, K2 is a numerical value (e.g., 10) greater than 1;
the product of K3 and S is the weight of the memory occupancy rate. Where K3 is a number less than 1, e.g., 0.001. And S is a weight value adjusting factor determined according to the memory capacity of the intelligent household equipment. And for different intelligent household devices, the memory capacity is different. Therefore, when the processes run on different smart home devices, the memory occupancy rates of the processes are different. For example, for a process with a memory occupancy of 100K, if the memory capacity of the smart home device is 1MB (i.e., 1024 KB), the memory occupancy of the process is 100/1024 ≈ 0.1; if the memory capacity of the intelligent household equipment is 512KB, the memory occupancy rate of the process is 100/512 ≈ 0.2. For this reason, in the present embodiment, different S values are set for different devices. When the memory capacity of the smart home device is small, the device is sensitive to the memory occupancy of a single process, so that S has a large value (for example, for a device with the memory capacity of less than 512MB, S is 50); conversely, when the memory capacity of the smart home device is large, S has a small value (for example, S is 10 for a device with a memory capacity of 512MB or more).
In this embodiment, the data in table 3 may be obtained by calculating the system resource occupation score of each process according to equation (1).
The above is an exemplary description of the method for determining the resource occupation score of the process, and the application is not limited thereto. For example, in other embodiments, the resource occupancy score for a process is a weighted sum of the process duration and the memory occupancy; alternatively, the termination priority of a process is proportional to the duration of the process.
In addition, in this embodiment, the termination priority of the process is expressed as a system resource occupation score of the process. In other embodiments, the termination priority of a process may be embodied in other forms, for example, by representing the termination priority of a process by a discrete level. For example, the termination priority of a process is classified into four levels of level 1, level 2, level 3, and level 4, where the level 4 process is most likely to be terminated. Illustratively, the ranking may also be determined based on the system resource occupancy score.
In addition, in other embodiments, when the termination priority of the process is calculated, other factors may be additionally considered, for example, whether the process still occupies a memory when the smart home device is in a standby state or not. When the device is in a standby state, the user does not directly interact with the smart home device, and if a process still occupies a memory, it is indicated that the process is likely to be a process that is not needed by the user (provided that the process is a terminable process).
S140: the mobile phone 100 sends the process management policy information to the smart home device.
After the smart home device synchronizes the process information to the mobile phone 100 (i.e., after the smart home device performs step S120), the mobile phone 100 generates process management policy information according to the received process information (i.e., performs step S130), and sends the generated process management policy information to the smart home device.
S150: and the intelligent household equipment executes process management according to the received process management strategy information.
In this embodiment, when the remaining memory capacity of the smart home device is smaller than a set threshold (the set threshold is referred to as a "memory threshold" or a "second threshold"), the smart home device terminates and/or merges one or more processes running locally according to the received process management policy information, so as to actively release a part of the memory, and reduce the situation that the processes are forcibly terminated by the system.
The method for determining the memory threshold is not limited in this embodiment. In some examples, the memory threshold is determined based on usage experience of the smart home device. For example, according to the use experience, when the remaining memory capacity of the smart home device is less than 20% of the memory capacity, the process is easily forced to be terminated, and at this time, 20% of the memory capacity may be used as the memory threshold; in other examples, the memory threshold is determined according to an application on the smart home device. For example, in each application on the smart home device, when the memory capacity occupied by the application with the largest memory occupation amount during running is 200MB, a certain value larger than 200MB is determined as the memory threshold (e.g., 240 MB).
Specifically, referring to fig. 2b, the process of executing the process management by the smart home device includes the following steps:
s151: and the intelligent household equipment determines that the residual memory capacity is smaller than the memory threshold value. The smart home device monitors the memory usage of the smart home device, and when the remaining memory capacity on the smart home device is smaller than a memory threshold, the smart home device starts to execute process management (i.e., the following steps S152 to S154).
S152: and the intelligent household equipment terminates one or more terminable processes running locally according to the termination priority sequence of the processes.
Specifically, the smart home device first terminates the process with the highest termination priority (i.e., process D). After process D is terminated, the memory space occupied by process D is freed. At this time, the intelligent home equipment inquires the residual memory capacity of the intelligent home equipment, and if the residual memory capacity is higher than a memory threshold value, the process management process is ended; if the residual memory capacity is still lower than the memory threshold, the intelligent home equipment terminates the next process (namely, the process A) according to the sequence from high to low of the termination priority. The steps are repeated until one of the following conditions is met: (a) The remaining memory capacity on the smart home device is greater than the memory threshold, or (b) the processes with termination priority higher than a set threshold (referred to herein as a "priority threshold" or a "first threshold") are terminated.
That is, in this embodiment, when the condition (b) is satisfied, even if the remaining memory capacity is still lower than the memory threshold, the smart home device stops the termination process. This is because there is a greater probability that a process with a lower termination priority is a process that the user needs. If the intelligent household equipment is forcibly terminated, normal use of the intelligent household equipment by a user can be influenced (the situation belongs to the situation that the process is killed by mistake). Therefore, the priority threshold is set in the embodiment, and when the termination priority of the process is lower than the set priority threshold, the smart home device does not terminate the process.
In this embodiment, it is assumed that the priority threshold is 8.0, and therefore, when the remaining memory capacity on the television 230a is smaller than the memory threshold, the television 230a terminates the process D, the process a, and the process C in sequence.
In addition, the determination method and specific values of the priority threshold are not limited in this embodiment. In some examples, the priority threshold is determined based on usage experience of the smart home device. For example, according to the use experience, if the priority threshold is preset to be 8.0, the memory occupation condition can be effectively optimized, and the false kill rate of the process is not high, 8.0 can be determined as the priority threshold; but if the process is being mistakenly killed is high, the priority threshold may be adjusted up on an 8.0 basis (e.g., to 10.0).
In addition, the process termination method is not limited in this embodiment. For example, a signal (e.g., kill signal in linux signal mechanism) is sent to the process to be terminated to terminate the process.
S153: and the intelligent household equipment judges whether the residual memory capacity is still lower than the memory threshold value.
When all processes with termination priority levels above the priority level threshold are terminated, the smart home determines whether the remaining memory capacity of the smart home is still smaller than the memory threshold, if so, step S154 is executed to merge a plurality of processes on the smart home device; if not, the process management process is ended.
S154: the intelligent household equipment combines a plurality of processes running locally.
After all processes with termination priority levels above the priority threshold value on the intelligent home equipment are terminated, if the residual memory capacity of the intelligent home equipment is still smaller than the memory threshold value, the intelligent home equipment merges a plurality of processes running locally. The process of the smart home device merging process is described below with reference to table 4. Where table 4 is the continuation table of table 3 listing the termination priorities of another portion of the processes running on television 230 a.
Table 4 Process management policy information for television 230a (continuation table 3)
Process PID Service name Process name Zhiyou (Chinese character' ZhiyouFirst stage
Process A1 54 Service1 android.process.test 7
Process A2 55 Service2 android.process.test 6
In table 4, the process A1 and the process A2 are respectively service processes started by a game process (Tank). According to an operating system mechanism (e.g., an Android system mechanism), when the processes A1 and A2 satisfy the following conditions (1) to (3), the process A1 and the process A2 may be combined into one process.
Condition (1): process A1 and Process A2 share the same signature (i.e., the same sharedUid), and in general, two processes share the same signature meaning that the two processes are from the same developer;
condition (2): the process A1 and the process A2 are different service processes, for example, the process A1 is a log service process, and the process A2 is a control service process;
condition (3): the process A1 and the process A2 point to the same process (process), in other words, the process A1 and the process A2 have the same process name.
The following is an exemplary description of condition (3). Illustratively, the process names of process A1 and process A2 are both "android. The process names of process A1 and process A2 may be defined in their component declarations. Taking process A1 as an example, the component declaration is as follows:
<service
android:name=".Service1"
android:exported="true"
android:process=":android.process.test">
the process name of the service process A1 can be defined as "android.
The process name definition process of the process A2 may refer to the process name definition process of the process A1, which is not described in detail.
When the conditions (1) to (3) are met, the smart home device may combine the process A1 and the process A2 to release a part of the memory space.
Referring to fig. 2c, in this embodiment, a process of merging processes of the smart home devices specifically includes:
s154a: and the intelligent household equipment determines a process to be merged.
Specifically, the smart home device determines whether there is a process (referred to as a "mergeable process") satisfying the above conditions (1) to (3) in the currently running terminable processes. If any, two processes with the highest termination priority are selected as the processes to be merged from the processes satisfying the above conditions (1) to (3). Here, "two processes with the highest termination priority" means: one of the two processes to be merged has the highest priority among all the mergeable processes.
In this embodiment, the smart home device determines the log service process A1 and the control service process A2 as processes to be merged.
S154b: and marking the processes to be merged by the intelligent household equipment.
For example, the smart home device adds a mark "mergeable" to the log service process A1 and the control service process A2 to indicate that the process A1 and the process A2 are processes to be merged.
S154c: when the intelligent home equipment is in a standby state, the processes to be merged (namely the log service process A1 and the control service process A2) are actively stopped. When the equipment is in a standby state, the user and the equipment are not directly interacted, so that the intelligent household equipment terminates the process A1 and the process A2 when in the standby state, and the influence on the normal use of the intelligent household equipment by the user is avoided.
S154d: the smart home device restarts the logging service and the control service and causes the logging service and the control service to run in the same process (e.g., a game process (Tank)).
In this embodiment, by merging the processes, the log service and the control service may share a common library of the system, so that a part of the memory space may be saved to optimize the memory usage. For example, prior to process merging, the log service process A1 occupies approximately 25MB of memory, and the control service process A2 occupies approximately 40MB of memory. After merging, the log service and the control service run in the same process, and the log service and the control service occupy about 50MB of memory in total. Thus, by process merging, about 15MB of memory space may be released.
The above steps S151 to S154 describe the process of executing the process management by the smart home device. Further, in order to reduce the influence on the normal use of the smart home device by the user, the above steps S152 and/or S154c are performed in the standby state of the smart home device.
This is because, if the process is terminated while the smart home device is in the active state, the process currently used by the user may be terminated, which has a large influence on the user experience. For example, when a user is playing a game on television 230a (it is understood that television 230a is active at this time), if the game process is terminated, it will have a large impact on the user. When the intelligent home equipment is in a standby state, the user does not directly interact with the intelligent home equipment, and the influence on the user experience can be reduced as much as possible by terminating the process.
S160: the smart home device feeds back the execution result of the process management to the mobile phone 100. For example, the smart home device sends the terminated and/or merged process list to the mobile phone 100, so as to feed back the execution result of the process management to the mobile phone 100. In this embodiment, the execution result sent by the television 230a to the mobile phone 100 is shown in table 5.
Table 5 process management execution result fed back to the mobile phone 100 by the tv 230a
Figure BDA0003027195540000121
In summary, the present embodiment provides a process management method, where the mobile phone 100 provides process management policy information to the smart home device, and the smart home device performs process management (active termination and/or merging of a plurality of processes running locally) on a local process according to the process management policy information provided by the mobile phone 100, so as to actively optimize a memory occupation situation, reduce a situation of passive termination of a process, and improve user experience.
Further, in this embodiment, the mobile phone 100 provides the process management policy information to the smart home device, so that the smart home device only needs to perform process management according to the process management policy information sent by the mobile phone 100, and does not need to consume computing power of the smart home device to compute the process management policy information, thereby saving computing power of the smart home device. In addition, especially for some intelligent household devices (such as the electric cooker 240, the table lamp 210 and the like) with simple hardware configuration, the calculation for determining the process management information is difficult to support, and the active process management of the intelligent household devices can be realized by the method provided by the application.
It should be noted that the present embodiment is an exemplary illustration of the technical solution of the present application, and those skilled in the art may make other modifications.
For example, in this embodiment, considering that the terminating process has a larger memory benefit (i.e., more memory space can be released), when the remaining memory capacity of the smart home device is still smaller than the memory threshold, the terminating process is considered first (i.e., step S152 is executed). When all the processes with termination priority higher than the priority threshold are terminated, if the merging process is considered again (i.e., step S154 is executed), but the present application is not limited thereto. In other embodiments, the smart home device may preferentially merge the processes, and if the remaining memory capacity of the smart home device is still less than the memory threshold after all the processes that can be merged are merged, the process is terminated. In addition, in other embodiments, the smart home device may perform only one of the process terminating step (i.e., step S152) and the process merging step (i.e., step S154).
For another example, in this embodiment, the smart home device starts a process management process based on that the memory capacity of the smart home device is smaller than the memory threshold. In other embodiments, when the smart home device receives the process management policy information sent by the mobile phone 100, no matter whether the remaining memory capacity of the smart home device is smaller than the memory threshold, the process management process is started, for example, a process with a termination priority higher than the priority threshold is terminated.
[ EXAMPLE II ]
The embodiment provides a process management method. The present embodiment is based on the first embodiment. Different from the first embodiment, in the present embodiment, the mobile phone 100 determines the process management policy information based on the process information acquired from the smart home device and the cloud policy information acquired from the cloud server.
In the first embodiment, in order to actively optimize the memory usage of the smart home device, the smart home device terminates one or more local processes according to the process management policy information sent by the mobile phone 100. The terminated processes may include killed processes (i.e., processes that are not intended to be terminated). For example, in table 4, the terminated process includes a "Browser" process (Browser process), but the user may not want it to be terminated, but may want the process to reside in memory to keep a record of the last web page browsing. Thus, the user may be inconvenienced by terminating the "Browser" process.
The present embodiment is for improving the above-described situation. Specifically, the cloud server collects the execution result of the process management executed by the smart home device (for example, the execution result is uploaded to the cloud server by the mobile phone 100). And after receiving the execution result of the intelligent household equipment, the cloud server evaluates the execution result by a cloud engineer and determines cloud strategy information for adjusting the existing process management strategy according to the evaluation result. Then, the cloud server sends the cloud policy information to the mobile phone 100, so that the mobile phone 100 adjusts the existing process management policy.
It can be understood that, in this embodiment, a feedback mechanism is substantially introduced on the basis of the first embodiment, and the existing process management policy can be adjusted according to the execution result of the process management policy, so that the processes on the smart home device can be actively managed more accurately, the probability that the processes are killed by mistake is reduced, and the user experience is improved.
The following describes the process management method provided in this embodiment in detail. Referring to fig. 3, the process management method provided in this embodiment includes the following steps:
s210: the cloud server issues cloud policy information to the mobile phone 100.
After the existing process management strategy is executed for a period of time, the cloud engineer carries out process evaluation on the execution result of the existing process management strategy, and determines cloud strategy information for adjusting the existing process management strategy according to the evaluation result. Then, the cloud server issues the cloud policy information to the mobile phone 100.
Illustratively, the cloud server synchronizes the latest cloud policy information to the mobile phone 100 periodically, where the synchronization period is, for example, 24 hours, 15 days, a month, and the like, and this embodiment is not limited. It can be understood that a short synchronization period is beneficial to timely updating of the cloud policy information. In other examples, the mobile phone 100 may also download the latest cloud policy information from the cloud server according to a user operation, for example, after the user clicks an "update cloud policy information" button on an interface of the mobile phone 100, the mobile phone 100 downloads the latest cloud policy information from the cloud server.
Table 5 takes the television 230a as an example, and provides an example of the cloud policy information provided in this embodiment. Referring to table 5, the cloud policy information includes one or more of:
(a) A process attribute of the non-terminable process (as second attribute information). According to the execution result of the process management strategy, when the error rate of a process (specifically, a 'Browser' process) is higher, a cloud engineer adjusts the 'Browser' process into a 'unmanagable process', and adds attribute information 'essential' for the 'Browser' process in the cloud strategy information so as to change the 'Browser' process into an unmanagable process;
(b) A weight adjustment factor S (as weight adjustment information). In the first embodiment, the S value in the termination priority calculation formula (i.e., formula (1)) is preset in the handset 100; in this embodiment, the S value is sent from the cloud server to the mobile phone 100. Specifically, the cloud engineer determines an S value corresponding to each smart home device according to an execution result of the process management policy and the memory configuration of the smart home device. For example, when the memory capacity of the smart home device is large (for example, 8 GB), and/or when the overall mistaken killing rate of the process on the smart home device is high, the S value is correspondingly reduced; otherwise, the S value is increased. In this embodiment, the S value of the tv 230a is adjusted from 10 to 5;
(c) A priority threshold. In the first embodiment, the priority threshold is preset in the smart home device; in this embodiment, the priority threshold is issued to the mobile phone 100 by the cloud server, and then provided to the smart home device by the mobile phone 100. Specifically, the cloud engineer adjusts the priority threshold corresponding to each smart home device according to the execution result of the process management policy. For example, when the overall kill error rate of the process on the tv 230a is high, the priority threshold of the tv 230a is adjusted from 8.0 to 9.0 to reduce the probability of the process being terminated.
Table 5 cloud policy information for television 230a
Browser essential
S 5
Priority threshold 9.0
It should be noted that table 5 is an exemplary illustration of the cloud policy information, and those skilled in the art may progress other variations. In other embodiments, the cloud policy information may be more than the options in table 5, for example, the cloud policy information further includes a weight adjustment factor for the process duration and/or the memory occupancy; the cloud policy information may also be less than the options in table 5, e.g., the cloud policy factor does not include a priority threshold; the cloud policy information may also take other forms, for example, the cloud policy information does not give a specific value of the priority threshold, but gives a magnification factor (e.g., 1.2) of the priority threshold. After receiving the scaling coefficient, the smart home device multiplies the scaling coefficient by the original priority threshold to obtain an adjusted priority threshold.
For consistency of description, in the present embodiment, the step S210 is first mentioned. It is understood that step S210 serves as a data preparation process of the process management method, which is relatively independent with respect to a single process management process, and does not need to occur with other steps (steps S220 to S260 described below) of the process management method each time.
S220: the smart home device collects process information of the local process, for example, the process information shown in table 1.
The content of step S220 is substantially the same as that of step S110 in the first embodiment, and therefore, other details in step S220 can refer to the description in the first embodiment and are not repeated.
S230: the smart home device sends the collected process information to the mobile phone 100. When the communication state of the smart home device and the mobile phone 100 is switched from the disconnected state to the connected state, the smart home device transmits the collected process information (e.g., data in table 1) to the mobile phone 100 to synchronize the process information thereof with the mobile phone 100.
The content of step S230 is substantially the same as that of step S120 in the first embodiment, and therefore, other details and modifications in step S230 may refer to the description in step S120 in the first embodiment, and are not repeated.
S240: the mobile phone 100 generates process management policy information according to the process information received from the smart home device and the cloud configuration information received from the cloud server. For ease of understanding, the process management policy information provided in this embodiment is still given first, and then the determination method of the process management policy information is described.
Table 6 shows an example of process management policy information provided in this embodiment, where the process management policy information shown in table 6 is determined according to the process information in table 1 and the cloud policy information in table 5.
TABLE 6 Process management policy information
Process Process name Terminating priority
Process D Guardian 13.7
Process A CastScreen 13.4
Process B Tank 7.5
Process C Browser maintain
Process E NFC_reader maintain
The following describes the process of determining process management policy information by the handset 100. In this embodiment, the process of determining the process management policy information by the mobile phone 100 is as follows:
first, the mobile phone 100 determines that the process cannot be terminated according to the process information (from the smart home device) and the cloud policy information (from the cloud server).
In this embodiment, when determining that the process cannot be terminated, the mobile phone 100 considers, in addition to the process information sent by the smart home device, cloud policy information sent by a cloud server. Specifically, when the process attribute in the process information indicates that a process is an unmanagable process, and/or the process attribute in the cloud policy information indicates that a process is an unmanagable process, the mobile phone 100 determines that the process is an unmanagable process.
Specifically, referring to table 1, the attribute information of the process indicates that the process E is a non-terminable process; according to table 5, the cloud policy information indicates that the Browser process (i.e., process C) is an untenable process, so that the mobile phone 100 determines both process B and process C as untenable processes, and adds type marks "maintain" of process E and process C to the process management policy information to indicate that process E and process C are untenable processes.
Next, the mobile phone 100 determines a termination priority of the terminable process according to the process information (from the smart home device) and the cloud policy information (from the cloud server). Illustratively, the handset 100 determines the processes other than the non-terminable process in the process information table as terminable processes (e.g., the handset 100 determines the process a, the process B, and the process D as terminable processes).
Specifically, the present embodiment calculates the resource occupation score P of the process according to the following equation (1), and determines the resource occupation score P of the process as the termination priority of the process.
P = duration time × K1+ CPU Rate × K2+ RAM Rate × K3 × S equation (1)
However, in this embodiment, S in the formula (1) is obtained from the cloud policy information, and S in the first embodiment is preset in the mobile phone 100. Otherwise, other details of this step are the same as those of step S130 in the embodiment, so that reference may be made to the description in step S130, and further description is omitted.
In other embodiments, when the weight adjustment coefficient of other system resource options (e.g., the weight adjustment coefficient S2 of the CPU occupancy) is included in the cloud policy information, the weight adjustment coefficient may be multiplied by the corresponding item of equation (1) (e.g., the weight occupied by the CPU is adjusted to K2 × S2).
S250: the mobile phone 100 sends the process management policy information to the smart home device.
The content of step S250 is substantially the same as step S140 in the first embodiment, and therefore, other details and modifications in step S250 may refer to the description in step S140 in the first embodiment, and are not repeated.
S260: and the intelligent household equipment executes process management according to the received process management strategy information.
The process of executing the process management by the smart home device in this embodiment is basically the same as that of executing the process management by the smart home device in the first embodiment, that is, when the remaining memory capacity of the smart home device is smaller than the memory threshold, the smart home device terminates one or more terminable processes in sequence according to the order of termination priority from high to low (i.e., step S152); when all the processes with the termination priority above the priority threshold are terminated, but the remaining memory capacity of the smart home device is still less than the memory threshold, the smart home device merges one or more terminable processes (i.e., step S154).
Different from the first embodiment, in the present embodiment, the priority threshold is synchronized to the mobile phone 100 by the cloud server, and then provided to the smart home device by the mobile phone 100, and in the first embodiment, the priority threshold is preset in the smart home device. In addition, other details of this step are substantially the same as step S150 in the first embodiment, so that reference may be made to the description in the first embodiment, and further description is omitted.
S270: the smart home device feeds back the execution result of the process management to the mobile phone 100. For example, the smart home device sends the terminated and/or merged process list to the mobile phone 100, so as to feed back the execution result of the process management to the mobile phone 100.
To sum up, in this embodiment, the mobile phone 100 determines the process management policy information according to the cloud policy information issued by the cloud server. In this way, the mobile phone 100 may dynamically adjust the process management policy information provided to the smart home device according to the execution result of the process management policy, so as to improve the execution effect of the process management policy and improve the user experience.
In addition, in this embodiment, the mobile phone 100 receives the cloud policy information from the cloud server, and provides the process management policy information to the smart home device. In this way, for an intelligent home device that does not support telecommunication (for example, an intelligent home device without WiFi and cellular network communication functions), the cloud policy information issued by the cloud server may also be acquired by the mobile phone 100, so as to execute the dynamically adjusted process management policy.
It should be noted that the above first embodiment and second embodiment are exemplary illustrations of the technical solutions of the present application, and those skilled in the art can make other modifications.
For example, in other embodiments, the process management policy information may also be determined by the smart home device itself. Specifically, after the cloud server issues the cloud policy information to the mobile phone 100, the mobile phone 100 synchronizes the cloud policy information to the smart home device. Then, the smart home device determines the process management policy information according to the obtained cloud policy information and the collected process information (for example, data in table 1) (the determination method may refer to the method for determining the process management policy information by the mobile phone 100 in embodiment two). Then, when the remaining memory capacity on the smart home device is smaller than the memory threshold, the smart home device may perform process management according to the process management policy information determined by the smart home device. In this embodiment, after the smart home device obtains the cloud configuration information, the process management may be executed in a state of being disconnected from the mobile phone 100. That is to say, in this embodiment, the smart home device may perform process management in an offline state.
A second embodiment of the present application is described below with reference to fig. 4. Fig. 4 shows an exemplary application scenario of the present embodiment, specifically, a screen projection scenario. The device in fig. 4 is a part of the device in fig. 1, and specifically includes a mobile phone 100, a television 230a and a television 230b. When a video program is being played on the cell phone 100, the user can post the video on the cell phone 100 to the tv 230a and/or the tv 230b. Since the tv has a larger screen and better sound quality than the cellular phone 100, the user can get a better movie watching experience. In addition, to implement the screen projection function, the mobile phone 100, the television 230a, and the television 230b are respectively installed with a screen projection application.
According to the process management method provided in this embodiment, in the screen projection scenario (as a distributed coordination scenario) shown in fig. 4, after the mobile phone 100 (as a first device) starts the screen projection process (as a first process), it is determined that the home lan includes two or more devices (as second devices or cooperating devices, for example, the television 230a and the television 230 b) that can cooperate with the mobile phone 100 to complete the screen projection service (as a first service or a target service). Then, the mobile phone 100 selects a target cooperative device (also called a "target device", for example, the television 230 b) for completing the screen-casting service in cooperation with the mobile phone 100 from the two or more cooperative devices according to a preset rule, and sends a first process management instruction to the target cooperative device in the multiple cooperative devices, where the first process management instruction is used to instruct the target cooperative device (for example, the television 230 b) to run a screen-casting process (as a second process or a cooperative process) for completing the screen-casting service in cooperation with the mobile phone 100. In some examples, the mobile phone 100 further sends a second process management instruction to other collaboration devices (e.g., the television 230 a) running the screen projection process, except the target collaboration device, and the second process management instruction is used to instruct the other collaboration devices (e.g., the television 230 a) running the screen projection process to terminate the screen projection process running by the other collaboration devices. Thus, in this example, other collaborating devices (e.g., television 230 a) that are running the collaborative process may actively terminate their running collaborative process, and thus memory footprint may be optimized.
It should be noted that, although the screen projection service is taken as an example of the target service (or the first service) in the scenario shown in fig. 4, the application is not limited thereto. In other embodiments, the target service may be a game service, a file storage service, a navigation service, or other services based on distributed technology.
Although a mobile phone is taken as an example of the first device in the scenario shown in fig. 4, the application is not limited thereto. In other embodiments, the first device may be other computing-capable devices, such as a laptop, tablet, wearable device (e.g., watch, smart glasses, helmet), desktop computer, network device (e.g., gateway, router), car machine, and so forth.
Although a television is taken as an example of the second device (or the cooperative device) in the scenario shown in fig. 4, the present application is not limited thereto. In other examples, the second device may be a smart sound box, a smart camera, a smart home device such as a smart home appliance (e.g., a refrigerator, an air conditioner, a water purifier), or other IoT devices or electronic devices other than the smart home device, such as a vehicle-mounted device (e.g., a car machine, a car navigator, a car sound box), an office device (e.g., a projector, a printer), a city public facility (e.g., a road monitoring camera, a fire fighting device, a bus station display screen), or the like, which is not necessarily repeated.
Specific embodiments of the present application are described below in conjunction with the scenario illustrated in fig. 4, but it is to be understood that the present application is not limited thereto.
[ EXAMPLE III ]
Specifically, referring to fig. 1, fig. 4 and fig. 5, the process management method provided in this embodiment includes the following steps:
s310: the mobile phone 100 establishes communication connection with the online smart home devices in the home lan 200.
In this embodiment, the time for establishing the communication connection between the mobile phone 100 and the smart home device is not limited. For example, when the user returns home with the mobile phone 100, or when the communication switch of the mobile phone 100 is turned on (for example, the mobile phone 100 changes from the off state to the on state, and the "flight mode" switch of the mobile phone 100 is turned off), the mobile phone 100 starts a communication connection with the online smart home device in the home lan 200.
The present embodiment does not limit the manner of establishing the communication connection between the mobile phone 100 and the smart home device. The mobile phone 100 may establish a communication connection with the online smart home devices in the home lan 200 through WiFi, bluetooth, etc., and the mobile phone 100 may also establish a communication connection with different smart homes through different communication modes, for example, the mobile phone 100 establishes a communication connection with the speaker 220a through bluetooth, and establishes a communication connection with the speaker 220b through WiFi communication.
S320: the mobile phone 100 obtains device information of each online smart home device.
After establishing communication connection with the online smart home devices in the home lan 200, the mobile phone 100 sends an information acquisition request to each online smart home device to acquire device information of each online smart home device.
In this embodiment, the device information of the smart home device includes one or more of the following:
a Device number (Device ID), a unique identifier of the smart home Device in the home lan 200, by which the mobile phone 100 can determine the smart home Device in the home lan 200. Illustratively, the device number is assigned by a central device (e.g., home gateway, handset 100, etc.) in the home lan 200;
the Device State (Device State) refers to the communication State of the smart home Device, and includes an online State and an offline State;
a Device Type (Device Type), a Device Type of the smart home Device may be a large screen Device, a speaker Device, a car Device, a network Device (e.g., a gateway, a router), a home appliance Device (e.g., a desk lamp, an electric cooker, an air conditioner, a water purifier, a floor sweeping robot), a smart ornament (e.g., an alarm clock, a hygrothermograph, a calendar, etc.), a wearable Device (e.g., glasses, a bracelet, a helmet, etc.);
a Device Service capability (Device Service), services that the smart home Device can support, for example, whether a screen projection Service is supported, whether a navigation Service is supported, whether a stereo music playing Service is supported, and the like. Illustratively, when an application (e.g., a screen projection application) for realizing a certain service is installed on the smart home device, it indicates that the service (e.g., a screen projection service) can be supported;
a device connection Type (Connect Type), a manner in which the smart home device accesses the home lan 200, for example, bluetooth, wiFi P2P, and/or NFC.
Table 7 shows an example of the device information of the smart home device.
Table 7 device information of smart home devices in home lan 200
Figure BDA0003027195540000181
In table 7, since the table lamp 210 and the rice cooker 240 are currently off-line, the mobile phone 100 does not acquire the device service information and the device connection type information of the table lamp 210 and the rice cooker 240.
S330: the mobile phone 100 obtains process information of each smart home device.
The process information of the smart home device includes identification information of a process running on the smart home device, for example, a process name. The mobile phone 100 can obtain the current operating service process of each smart home device through the identification information. In this embodiment, the currently running business processes of the televisions 230a and 230B include a screen projection process, and for convenience of description, the screen projection process on the television 230a is referred to as a "screen projection process a", and the screen projection process on the television 230B is referred to as a "screen projection process B".
S340: the handset 100 starts the target business process. In this embodiment, a screen-casting service is taken as an example of a target service. Specifically, when the user wishes to launch a video program played on the mobile phone 100 onto a television, the "wireless screen launch" button is clicked on the interface of the mobile phone 100, and the mobile phone 100 starts a screen launch process.
S350: the mobile phone 100 determines a target screen projection device (as a target device) according to a preset rule.
After the screen projection process is started, the mobile phone 100 determines the smart home device with the screen projection capability according to the device information acquired in step S330. Specifically, the mobile phone 100 determines the televisions 230a and 230b as smart home devices having a screen-casting capability according to the device type ("large screen") and the device service capability ("screen casting").
Then, the mobile phone 100 selects one of the televisions 230a and 230b as a target screen-projecting device according to a preset rule. The preset rule is not limited in the present embodiment, and several examples are given below.
Example one: the mobile phone 100 determines a target screen projection device according to the user operation.
In some implementations of example one, the user operation is an NFC tag read operation. Specifically, the user brings the NFC reading region of the mobile phone 100 close to the NFC tag of the television 230b, so that the mobile phone 100 reads the tag information in the NFC tag. After reading the NFC tag information of the television 230b, the mobile phone 100 uses the television 230b as a target screen projection device. Since the televisions 230a and 230b are usually located in different rooms (for example, the television 230a is located in a first floor room, and the television 230b is located in a second floor room), when the mobile phone 100 reads the NFC tag of the television 230b, it indicates that the user is located in the room where the television 230b is located at this time, and therefore, the mobile phone 100 determines the television 230b as a target screen projection device, which can meet the user's needs and improve the user experience.
In other implementations of example one, the user operation is a screen touch operation based on a display interface of the cell phone 100. Specifically, after determining that the televisions 230a and 230B both have the screen-projecting capability, the mobile phone 100 displays a button a for selecting the television 230a and a button B for selecting the television 230B on the interface of the mobile phone 100, and then the mobile phone 100 determines the target screen-projecting device according to the user operation. For example, when the user selects button B, the cell phone 100 determines the television 230B as the target screen-casting device.
Example two: the mobile phone 100 determines a target screen projection device according to the distance between the television and the mobile phone 100, for example, the mobile phone 100 determines the television with a short distance as the target screen projection device.
In some implementations, the handset 100 takes as a target cooperating device a device that is within its bluetooth communication range. For example, when the tv 230b is located within the bluetooth communication range of the mobile phone 100 and the tv 230a is located outside the bluetooth communication range of the mobile phone 100, the mobile phone 100 regards the tv 230b as a closer device, and thus, determines the tv 230b as a target screen-casting device;
in other implementation manners, the mobile phone 100 may acquire a specific distance between the mobile phone 100 and the smart home device through a wireless ranging function in a wireless communication manner (e.g., wiFi or bluetooth), and then determine the target cooperative device according to the distance. Specifically, the mobile phone 100 may obtain a specific distance between the mobile phone 100 and the smart home device through a bluetooth proximity (proximity) sensing technology in a bluetooth communication mode or through a WiFi ranging function.
Since users generally prefer to implement distributed functions (e.g., a screen projection function in this embodiment, and music/video playing, lighting on, schedule reminding, etc. functions in other embodiments) using devices that are closer to themselves, this example may provide a better user experience.
Example three: the mobile phone 100 determines a target screen projection device according to a preset device usage priority. In this example, the usage priority of the television 230a and the television 230b is preset in the mobile phone 100, specifically, the usage priority of the television 230b is higher than that of the television 230a, and then, after the mobile phone 100 starts a screen projection process, the mobile phone 100 takes the television 230b as a target screen projection device.
In some implementations, the device usage priority is determined according to device capabilities of televisions 230a and 230b. For example, since the television 230b has a larger screen than the television 230a, the cell phone 100 determines that the television 230b has a higher priority for use.
In other implementations, the device usage priority is user specified. For example, the mobile phone 100 provides a device priority setting interface in the screen-projection application, and the user can set the usage priority of each device through the interface.
S360: the mobile phone 100 sends a process management instruction to the smart home device, and the process management instruction enables the target cooperative device to run the cooperative process, and other cooperative devices except the target cooperative device terminate running the cooperative process.
In this embodiment, the television 230B is determined as the target screen projection device, and therefore, the mobile phone 100 sends a first process management instruction to the television 230B, and the first process management instruction causes the television 230B to run the screen projection process B. In addition, in step S330, the mobile phone 100 knows that the screen casting process B of the television 230B is in the running state, so that the first process management instruction sent by the mobile phone 100 to the television 230 is specifically a process continuation instruction, so that the screen casting process B on the television 230B is changed from an idle (idle) state to a busy (busy) state. The idle state is a state in which the process occupies the memory but does not substantially run on the CPU; the busy state is a state in which a process is essentially running on the CPU. In other embodiments, if the television 230B does not start the screen projection process B, the first process management instruction sent by the mobile phone 100 to the television 230B is specifically a process start instruction, so that the television 230B starts to run the screen projection process B.
In addition, since the television 230a is not determined as the target screen-projecting device, and in step S330, the mobile phone 100 knows that the screen-projecting process a of the television 230a is in the running state, the mobile phone 100 sends a second process management instruction to the television 230a, where the second process management instruction is specifically a process termination instruction, and the process termination instruction may cause the screen-projecting process a on the television 230a to terminate running, so as to optimize the memory usage state of the television 230 a. In other embodiments, if the screen-casting process a on the television 230a is not running, the cell phone 100 may not send process management instructions to the television 230 a.
In this embodiment, the mobile phone 100 sends different process management instructions to different cooperating devices according to the process running conditions of the cooperating devices. However, the present application is not limited to this, and in other embodiments, the mobile phone 100 may send the same process management instruction to each cooperative device, for example, the mobile phone 100 summarizes the above instructions (including the first process management instruction and the second process management instruction) into an instruction list, and sends the instruction list to each cooperative device. After receiving the instruction list, the cooperative device inquires the instruction corresponding to the cooperative device in the instruction list and executes the operation corresponding to the instruction.
S370: the smart home device executes process management according to the process management instruction from the mobile phone 100. Specifically, the television 230B continues to run the screen projection process B according to the process connection instruction from the mobile phone 100, and the television 230a terminates the screen projection process a according to the process termination instruction from the mobile phone 100.
S380: the smart home device feeds back the execution result of the process management to the mobile phone 100. For example, after continuing to operate the screen projection process B, the television 230B sends a message that the screen projection process B continues to operate to the mobile phone 100; after terminating the operation of the screen projection process a, the television 230a sends a message to the mobile phone 100 that the operation of the screen projection process a has been terminated.
In summary, according to the process management method provided by this embodiment, after the mobile phone integrates the process running information of each smart home device, the target device is determined, and a first process management instruction is sent to the target device, where the first process management instruction enables the target cooperative device to run the screen projection process. Therefore, by the process management method provided by the embodiment, the mobile phone can integrate the device information of each smart home device, so that a target cooperative device suitable for a user can be selected from multiple cooperative devices, and the user experience is improved.
In addition, in this embodiment, the mobile phone further sends a second process management instruction to other cooperative devices (devices other than the target device in the multiple cooperative devices) running the cooperative process, where the second process management instruction causes the other cooperative devices other than the target cooperative device to terminate the screen-casting process running by the other cooperative devices. Therefore, by the process management method provided by this embodiment, other cooperative devices (for example, the television 230 a) can actively terminate their running cooperative processes, and thus the memory occupation situation can be optimized.
In addition, according to the implementation manner of the present application, the method provided in example three may be executed in synchronization with the method provided in example one or example two. For example, when the mobile phone executes the method provided in the first embodiment, the method provided in the third embodiment can be executed at the same time.
The following describes a schematic structural diagram of a process management system 300 provided in an embodiment of the present application with reference to fig. 6. Referring to fig. 6, a process management system 300 provided by an embodiment of the present application includes a control device 310 (i.e., a first device, e.g., a cell phone) and an execution device 320 (i.e., a second device, e.g., an IoT device).
Wherein the control device 310 includes:
(1) An application module M311 including applications installed on the control device 310, for example, a device management application (e.g., smart life application) TM Beauty house TM Etc.), screen projection applications, video applications (e.g., youku) TM Love art TM Etc.);
(2) The process management module M312 starts operation when the control device 310 is powered on. In this embodiment, the process management module M312 includes:
IoT device management module M312a: for collecting device information of the execution device 320 (e.g., information in table 7), and process information of the IoT device (e.g., information in table 1, information obtained by the handset in step S330);
the policy decision module M312b: the process management policy information is generated according to process information of a local process of the execution device 320 and/or cloud policy information issued by a cloud server; and generating a process management instruction according to the device information and the process information of the IoT device. The function performed by M312b may correspond to step S130 in fig. 2a, step S240 in fig. 3, step S350 in fig. 5;
the data communication module M312c: for sending external data (e.g., cloud policy information, ioT device information and process information) received by the communication module M313a to the IoT device management module M312a and/or the policy decision module M312b;
(3) A Framework (Framework) module M313 comprising a communication module M313a, wherein:
the communication module M313a: the method comprises the steps of using an NFC module, a WiFi module, a Bluetooth module, a 4G/5G module and the like. For establishing a communication connection with the control device 310; for receiving device information and process information from the execution device 320; the cloud policy information receiving module is used for receiving the cloud policy information from the cloud server; and for sending process management policy information and/or process management instructions to the execution device 320. The function performed by M313a may correspond to steps S120, S140, S160 in fig. 2a, steps S210, S230, S250, S270 in fig. 3, and steps S310, S320, S330, S360, S380 in fig. 5.
The execution device 320 includes:
(1) An application module M321 including applications installed on the execution device 320, for example, a screen-casting application, a game application, a web browsing application, and the like;
(2) When the execution device 320 is powered on, the process management module M322 starts running. In this embodiment, the process management module M322 includes:
the execution module M322a: the system comprises a process management module, a process management module and a processing module, wherein the process management module is used for executing process management according to process management strategy information sent by a mobile phone; and the system is used for terminating, starting or continuing the cooperative process according to the process management instruction sent by the mobile phone. The function performed by M322a may correspond to step S150 in fig. 2a, steps S151-S154 in fig. 2b, steps S154 a-S154 d in fig. 2c, step S240 in fig. 3, step S370 in fig. 5;
the process information collection module M322b: for collecting process information (e.g., information in table 1) and device information (e.g., information in table 7) for local processes. The function performed by M322b may correspond to step S110 in fig. 2a, step S220 in fig. 3;
the policy receiving module M312c: the process management module is used for sending the process management policy information and/or the process management instruction received by the communication module M323 to the execution module M312a;
(3) The communication module M323: including using an NFC module, a WiFi module, a bluetooth module, etc. For establishing a communication connection with the control device 310; and for transmitting device information, process information of the execution device 320 to the control device 310; and is used for receiving process management policy information and/or process management instructions sent from the control device 310; and for sending the execution result of the process management to the control device 310. The functions performed by M323 may correspond to steps S120, S140, S160 in fig. 2a, steps S230, S250, S270 in fig. 3, steps S310, S320, S330, S360, S380 in fig. 5.
Fig. 7a shows a schematic structural diagram of the mobile phone 100 provided in this embodiment. The mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) connector 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer components than shown, or some components may be combined, some components may be separated, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The processor can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose-output (GPIO) interface, and a Subscriber Identity Module (SIM) interface.
The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the mobile phone 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of receiving a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, audio module 170 and wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 with peripheral devices such as the display screen 194, the camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the camera function of the handset 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the mobile phone 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, and the like.
It should be understood that the connection relationship between the modules shown in the embodiment of the present invention is only illustrative, and does not limit the structure of the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the mobile phone 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, the antenna 1 of the handset 100 is coupled to the mobile communication module 150 and the antenna 2 is coupled to the wireless communication module 160 so that the handset 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The mobile phone 100 implements the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the cell phone 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The cellular phone 100 may implement a camera function through the ISP, camera 193, video codec, GPU, display screen 194, and application processor, etc.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV and other formats. In some embodiments, the handset 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the handset 100 is in frequency bin selection, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. Handset 100 may support one or more video codecs. Thus, the mobile phone 100 can play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor, which processes input information quickly by referring to a biological neural network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can realize applications such as intelligent recognition of the mobile phone 100, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in the external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The data storage area may store data (e.g., audio data, a phonebook, etc.) created during use of the handset 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor. The instructions stored in memory 121 may include: instructions that, when executed by at least one of the processors, cause the handset 100 to perform the steps of the process management method provided in embodiments one, two, and/or three of the present application.
The software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily explain a software structure of the mobile phone 100.
Fig. 7b is a block diagram of the software structure of the mobile phone 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 7b, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, bluetooth, music, video, short message, etc. applications.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 7b, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide the communication functions of the handset 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scrollbar text in a status bar at the top of the system, such as a notification of a running application in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
Referring now to FIG. 8, shown is a block diagram of an electronic device 400 in accordance with one embodiment of the present application. The electronic device 400 may include one or more processors 401 coupled to a controller hub 403. For at least one embodiment, the controller hub 403 communicates with the processor 401 via a multi-drop Bus such as a Front Side Bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or similar connection 406. Processor 401 executes instructions that control general types of data processing operations. In one embodiment, the Controller Hub 403 includes, but is not limited to, a Graphics Memory Controller Hub (GMCH) (not shown) and an Input/Output Hub (IOH) (which may be on separate chips) (not shown), where the GMCH includes a Memory and a Graphics Controller and is coupled with the IOH.
The electronic device 400 may also include a coprocessor 402 and memory 404 coupled to the controller hub 403. Alternatively, one or both of the memory and GMCH may be integrated within the processor (as described herein), with the memory 404 and coprocessor 402 coupled directly to the processor 401 and controller hub 403, with the controller hub 403 and IOH in a single chip.
The Memory 404 may be, for example, a Dynamic Random Access Memory (DRAM), a Phase Change Memory (PCM), or a combination of the two. Memory 404 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions therein. A computer-readable storage medium has stored therein instructions, and in particular, temporary and permanent copies of the instructions.
The electronic device 400 as shown in fig. 8 may be implemented as a first device and a second device, respectively. When the electronic device 400 is implemented as a first bluetooth device, the instructions stored in the memory 404 may include: instructions that, when executed by at least one of the processors, cause the first device to perform the steps of the method as performed by the handset, as illustrated in fig. 2a, 2b, 2c, 3, 5. When electronic device 400 is implemented as a second device, the instructions stored in memory 404 may include: instructions that, when executed by at least one of the processors, cause the second device to perform the steps of the method as performed by the smart home device as illustrated in fig. 2a, 2b, 2c, 3, 5.
In one embodiment, the coprocessor 402 is a special-purpose processor, such as, for example, a high-throughput Integrated Core (MIC) processor, a network or communication processor, compression engine, graphics processor, general-purpose computing on graphics processing unit (GPGPU), embedded processor, or the like. The optional nature of coprocessor 402 is represented in FIG. 8 by dashed lines.
In one embodiment, electronic device 400 may further include a Network Interface Controller (NIC) 406. Network interface 406 may include a transceiver to provide a radio interface for electronic device 400 to communicate with any other suitable device (e.g., front end module, antenna, etc.). In various embodiments, the network interface 406 may be integrated with other components of the electronic device 400. The network interface 406 may implement the functions of the communication unit in the above-described embodiments.
The electronic device 400 may further include an Input/Output (I/O) device 405.I/O405 may include: a user interface designed to enable a user to interact with the electronic device 400; the design of the peripheral component interface enables peripheral components to also interact with the electronic device 400; and/or sensors are designed to determine environmental conditions and/or location information associated with electronic device 400.
It is noted that fig. 8 is merely exemplary. That is, although fig. 8 shows that the electronic device 400 includes a plurality of devices, such as a processor 401, a controller hub 403, a memory 404, etc., in practical applications, the device using the methods of the present application may include only a part of the devices of the electronic device 400, for example, may include only the processor 401 and the network interface 406. The nature of the alternative device in fig. 8 is shown in dashed lines.
Referring now to FIG. 9, shown is a block diagram of a System on Chip (SoC) 500 in accordance with an embodiment of the present application. In fig. 9, like parts have the same reference numerals. In addition, the dashed box is an optional feature of more advanced socs. In fig. 9, soC500 includes: an interconnect unit 550 coupled to the processor 510; a system agent unit 580; a bus controller unit 590; an integrated memory controller unit 540; a set or one or more coprocessors 520 which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a Static Random Access Memory (SRAM) unit 530; a Direct Memory Access (DMA) unit 560. In one embodiment, the coprocessor 520 includes a special-purpose processor, such as, for example, a network or communication processor, compression engine, general-purpose computing on graphics processing units (GPGPU), a high-throughput MIC processor, or an embedded processor, among others.
Sram cell 530 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions. A computer-readable storage medium has stored therein instructions, and in particular, temporary and permanent copies of the instructions.
The socs as shown in fig. 9 may be provided in the first device and the second device, respectively. When the SoC is provided in the first device, the sram unit 530 has stored therein instructions, which may include: instructions that, when executed by at least one of the processors, cause the first device to perform the steps of the method as performed by the handset, as illustrated in fig. 2a, 2b, 2c, 3, 5. When the SoC is provided in the second device, the sram unit 530 has stored therein instructions, which may include: instructions that, when executed by at least one of the processors, cause the second device to perform the steps of the method as performed by the smart home device as illustrated in fig. 2a, 2b, 2c, 3, 5.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The method embodiments of the present application may be implemented in software, magnetic components, firmware, etc.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a Processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code can also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
One or more aspects of at least one embodiment may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logic in a processor, which when read by a machine causes the machine to fabricate logic to perform the techniques described herein. These representations, known as "Intellectual Property (IP) cores," may be stored on a tangible computer-readable storage medium and provided to customers or production facilities to load into the manufacturing machines that actually manufacture the logic or processor.
In some cases, an instruction converter may be used to convert instructions from a source instruction set to a target instruction set. For example, the instruction converter may transform (e.g., using a static binary transform, a dynamic binary transform including dynamic compilation), morph, emulate, or otherwise convert the instruction into one or more other instructions to be processed by the core. The instruction converter may be implemented in software, hardware, firmware, or a combination thereof. The instruction converter may be on the processor, off-processor, or partially on and partially off-processor.

Claims (25)

1. A process management method for a first device, the method comprising:
acquiring process information of one or more processes running on second equipment in communication connection with the first equipment;
and sending process management policy information to the second device, wherein the process management policy information is determined by the first device according to the process information, and the process management policy information is used for indicating termination information corresponding to each process in the process.
2. The method of claim 1, wherein the process management policy information comprises:
a type tag of a non-terminable process of the one or more processes; and/or the presence of a gas in the gas,
a termination priority of a terminable process of the one or more processes.
3. The method as claimed in claim 2, wherein the process information of the process comprises first attribute information indicating whether the process is an unmanageable process, and the process management policy information comprises a type flag of an un-terminable process of the one or more processes;
the determining the process management policy information according to the process information includes:
determining a non-terminable process of the one or more processes according to the first attribute information, wherein the process is determined as a non-terminable process when the first attribute information indicates that the process is a non-manageable process;
adding a type mark of the non-terminable process in the process management policy information.
4. The method of claim 3, wherein the determining the process management policy information based on the process information comprises:
determining a non-terminable process in the one or more processes according to the first attribute information and second attribute information, wherein the second attribute information is cloud policy information acquired from a cloud server in communication connection with the first device, and the second attribute information is used for indicating whether the process is a non-manageable process;
when one of the first attribute information and the second attribute information indicates that the process is an unmanageable process, determining the process as a non-terminable process;
and adding a type mark of the non-terminable process in the process management strategy information.
5. The method of claim 2, wherein the process information for the process comprises one or more system resource occupancy information for the process; the process management policy information includes a termination priority of a terminable process of the one or more processes;
the determining the process management policy information according to the process information includes:
calculating a system resource occupation score of the process according to the system resource occupation information, wherein the system resource occupation score is a weighted sum of the one or more items of system resource occupation information;
and determining the termination priority of the process according to the system resource occupation score.
6. The method of claim 5, wherein the determining the process management policy information based on the process information comprises:
calculating the system resource occupation value of the process according to the system resource occupation information and the weight value adjustment information; the weight value adjusting information is cloud policy information obtained from a cloud server in communication connection with the first device, and the weight value adjusting information is used for adjusting the weight value of at least one item of system resource occupation information;
and determining the termination priority of the process according to the system resource occupation score.
7. The method of claim 5, wherein the system resource usage information of the process comprises one or more of: a duration of the process; CPU occupancy of the process; memory occupancy of the process.
8. The method of claim 4 or 6, wherein the obtaining cloud policy information from a cloud server communicatively connected to the first device comprises:
the first equipment acquires the cloud policy information from the cloud server according to a set time interval.
9. A method for process management, for a second device communicatively coupled to a first device, the method comprising:
sending process information of one or more processes running on the second device to the first device;
receiving process management policy information from the first device, where the process management policy information is used to indicate termination information corresponding to each process in the one or more processes, and the process management policy information is determined according to the process information;
terminating and/or merging at least a portion of the one or more processes according to the process management policy information.
10. The method of claim 9, wherein the process management policy information comprises: a type flag of a non-terminable process of the one or more processes;
the terminating and/or merging at least a portion of the one or more processes, wherein the terminated process does not include a non-terminable process determined from the type flag.
11. The method of claim 9, wherein the process management policy information includes a termination priority of a terminable process of the one or more processes;
the terminating and/or merging at least some of the one or more processes, wherein the terminated processes do not include processes having a termination priority below a first threshold determined from the termination priority.
12. The method as claimed in claim 11, wherein said terminating and/or merging at least some of the one or more processes comprises:
and based on that the residual memory capacity of the second device is smaller than a second threshold, sequentially terminating the processes with termination priorities higher than the first threshold according to the sequence from high termination priority to low termination priority.
13. The method of claim 12, wherein the terminating and/or merging at least a portion of the one or more processes further comprises:
merging at least part of the terminable processes based on the determination that the termination priority of the currently running processes of the second device is below the first threshold and the remaining memory capacity of the second device is still less than the second threshold.
14. The method of claim 13, wherein the first threshold and/or the second threshold is obtained by the second device directly or indirectly from a cloud server.
15. The method of claim 9, wherein said terminating and/or merging at least a portion of the one or more processes comprises:
terminating and/or merging at least a portion of the one or more processes when the second device is in a standby state.
16. A process management method for a first device communicatively coupled to a plurality of second devices, the method comprising:
running a first process for a first service;
according to a preset rule, selecting target equipment which is used for completing the first service in cooperation with the first equipment from the plurality of second equipment, wherein the plurality of second equipment can run a second process which is used for completing the first service in cooperation with the first equipment;
and sending a first process management instruction to the target device in the plurality of second devices, wherein the first process management instruction is used for instructing the target device to run the second process.
17. The method of claim 16, wherein the plurality of second devices are external to the target device and include at least one second device running the second process;
the method further comprises:
and sending a second process management instruction to the at least one second device, wherein the second process management instruction is used for instructing the at least one second device to terminate the second process.
18. The method of claim 16, wherein sending the first process management instruction to the target device of the plurality of second devices comprises:
acquiring a process running state of the target device, wherein the process running state is used for indicating whether the target device runs the second process;
if the target device runs the second process, sending a process continuing instruction to the target device, wherein the process continuing instruction enables the target device to continue running the second process; and/or the presence of a gas in the gas,
and if the target equipment does not operate the second process, sending an instruction for starting the second process to the target equipment.
19. The method of claim 16, wherein selecting the target device from the plurality of second devices according to a preset rule comprises:
selecting the target device from the plurality of second devices according to user operation; alternatively, the first and second liquid crystal display panels may be,
selecting the target device from the plurality of second devices according to a distance between each of the plurality of second devices and the first device; alternatively, the first and second electrodes may be,
and selecting the target equipment from the plurality of second equipment according to a preset equipment use priority.
20. The method of claim 19,
the user operation is one of: an NFC tag reading operation; performing screen touch operation; and/or the presence of a gas in the gas,
the distance between each second device in the plurality of second devices and the first device is acquired by the second device through a wireless ranging technology in a wireless communication mode;
the device usage priority is determined according to device capabilities of the plurality of second devices.
21. An electronic device, comprising:
a memory to store instructions for execution by one or more processors of the electronic device;
a processor which, when executing the instructions in the memory, causes the electronic device to perform the process management method of any of claims 1-8.
22. An electronic device, comprising:
a memory to store instructions for execution by one or more processors of the electronic device;
a processor which, when executing the instructions in the memory, causes the electronic device to perform the process management method of any of claims 9-15.
23. An electronic device, comprising:
a memory to store instructions for execution by one or more processors of the electronic device;
a processor which, when executing the instructions in the memory, causes the electronic device to perform the process management method of any of claims 16-20.
24. A process management system, characterized in that the process management system comprises a first device for performing the process management method of any one of claims 1 to 8 and a second device for performing the process management method of any one of claims 9 to 15.
25. A computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to perform the process management method of any one of claims 1 to 20.
CN202110419132.8A 2021-04-19 2021-04-19 Process management method, electronic device, process management system, and storage medium Pending CN115220881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110419132.8A CN115220881A (en) 2021-04-19 2021-04-19 Process management method, electronic device, process management system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110419132.8A CN115220881A (en) 2021-04-19 2021-04-19 Process management method, electronic device, process management system, and storage medium

Publications (1)

Publication Number Publication Date
CN115220881A true CN115220881A (en) 2022-10-21

Family

ID=83605618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110419132.8A Pending CN115220881A (en) 2021-04-19 2021-04-19 Process management method, electronic device, process management system, and storage medium

Country Status (1)

Country Link
CN (1) CN115220881A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303110A (en) * 2022-11-22 2023-06-23 荣耀终端有限公司 Memory garbage recycling method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303110A (en) * 2022-11-22 2023-06-23 荣耀终端有限公司 Memory garbage recycling method and electronic equipment
CN116303110B (en) * 2022-11-22 2023-11-14 荣耀终端有限公司 Memory garbage recycling method and electronic equipment

Similar Documents

Publication Publication Date Title
WO2020192714A1 (en) Device control page display method, related apparatus and system
WO2022257977A1 (en) Screen projection method for electronic device, and electronic device
WO2021233218A1 (en) Screen casting method, screen casting source end, screen casting destination end, screen casting system and storage medium
WO2021185141A1 (en) Wi-fi aware link establishment method and system, electronic device, and storage medium
CN113778574B (en) Card sharing method, electronic equipment and communication system
CN111628916B (en) Method for cooperation of intelligent sound box and electronic equipment
EP4148567A1 (en) Adaptive card generation method, terminal device and server
CN113518144A (en) Display method of application screen opening information and electronic equipment
WO2022017474A1 (en) Task processing method and related apparatus
EP4311314A1 (en) Sleep scheduling method and device
CN112954819B (en) Equipment networking method, electronic equipment and system
CN114079893A (en) Bluetooth communication method, terminal device and computer readable storage medium
WO2023066395A1 (en) Application running method and related device
WO2022160959A1 (en) Always on display method, and terminal device and chip
CN115333941A (en) Method for acquiring application running condition and related equipment
CN115220881A (en) Process management method, electronic device, process management system, and storage medium
CN113572800B (en) Method, system, server and storage medium for acquiring download information of application
WO2023072139A1 (en) Audio playing method, and electronic device and system
CN114500732B (en) Interface display method, electronic equipment and storage medium
CN116847145A (en) Dormancy awakening method and electronic equipment
CN114816686A (en) Processing method of computing task, electronic device and storage medium
CN114554463A (en) Bluetooth communication method, Bluetooth broadcasting method, Bluetooth device, and storage medium
WO2022222780A1 (en) Audio output method, media file recording method, and electronic device
WO2023051036A1 (en) Method and apparatus for loading shader
WO2022188812A1 (en) Method for synchronizing software features between devices, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination