Management and control method and apparatus, and electronic device

By identifying and managing unrelated processes in electronic devices, the impact of background process management on the operation of foreground processes is resolved, ensuring the normal operation and functional efficiency of applications.

WO2025214298A1PCT designated stage Publication Date: 2025-10-16HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/087537
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-11
Filing Date
2025-04-07
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

In the existing technology, when electronic devices manage background processes, the operation of foreground processes is easily affected, making it difficult to meet the running requirements of applications.

Method used

By pre-setting configuration files for target scenarios in electronic devices, unrelated processes can be identified and managed, CPU resources can be released, and the operation of foreground processes can be avoided.

Benefits of technology

This effectively avoids the foreground process being affected by the background process management, ensuring the normal operation and functional efficiency of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025087537_16102025_PF_FP_ABST
    Figure CN2025087537_16102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a management and control method and apparatus, and an electronic device. The method is applied to an electronic device, and comprises: in response to the triggering of a first target scenario, determining a configuration file of the first target scenario on the basis of the first target scenario, wherein the configuration file of the first target scenario comprises: a management and control condition of the first target scenario, and an associated process of the first target scenario; when an electronic device is in the first target scenario, determining whether the current state of the electronic device meets the management and control condition of the first target scenario; and when the current state of the electronic device meets the management and control condition of the first target scenario, managing and controlling a non-associated process of the first target scenario. By means of the management and control method and apparatus and the electronic device of the present application, when the current available load of the electronic device meets a management and control condition, a non-associated process of a target scenario is managed and controlled, thereby releasing CPU resources, and also avoiding the problem that the foreground experience is affected due to an associated process being managed and controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and electronic equipment for management and control

[0001] The present application claims priority to the Chinese patent application No. 202410437301.4, filed on April 11, 2024, and entitled "Method, device and electronic equipment for management and control", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of electronic equipment, in particular to a method, device and electronic equipment for management and control. BACKGROUND

[0003] The current system can manage and control the background processes of the electronic equipment, and the management and control manner can include suppression or killing. That is, the system can configure a central processing unit (CPU) baseline allowed to be used by the background process, and when the running of the background process exceeds the CPU baseline, the system will manage and control the application program of the background process. When the foreground process of the application program is associated with the background process being managed and controlled, the running of the foreground process will be affected when the background process is managed and controlled.

[0004] Therefore, how to meet the running requirements of the application program while avoiding the influence on the foreground process of the application program through management and control is a problem to be solved at present. SUMMARY

[0005] The present application provides a method, device and electronic equipment for management and control. Through the management and control of the application program process, the running requirements of the application program are met while avoiding the influence on the foreground process of the application program.

[0006] In a first aspect, a method for management and control is provided. The method is applied to an electronic equipment and includes: in response to a first target scenario trigger, determining a configuration file of the first target scenario according to the first target scenario, the configuration file of the first target scenario including: a management and control condition of the first target scenario, and an associated process of the first target scenario; when the electronic equipment is in the first target scenario, determining whether the current state of the electronic equipment meets the management and control condition of the first target scenario; and when the current state of the electronic equipment meets the management and control condition of the first target scenario, managing and controlling a non-associated process of the first target scenario, the non-associated process of the first target scenario being a process of the electronic equipment excluding the associated process of the first target scenario.

[0007] It can be understood that the electronic equipment can preset multiple target scenarios, and the first target scenario belongs to any one of the multiple target scenarios. The configuration file of the first target scenario is also pre-set. The configuration files of different target scenarios can be different. The electronic equipment can trigger one target scenario at a time.

[0008] Optionally, the process of the first target scene includes an associated process of the first target scene, and a non-associated process of the first target scene.

[0009] Based on the above scheme, by presetting a target scene and a configuration file of the target scene, when the target scene of the electronic device is triggered, the associated process and the non-associated process of the target scene are determined. When the current state of the electronic device meets the control condition of the target scene, the non-associated process of the target scene is controlled, so that the CPU resource is released, and the application program is run while avoiding the associated process being controlled to affect the implementation of the function under the target scene and the efficiency of the function implementation.

[0010] In combination with the first aspect, in some implementations of the first aspect, the control condition of the first target scene is used to limit a central processing unit (CPU) baseline of the first target scene, and when the electronic device is in the first target scene, determining whether the current state of the electronic device meets the control condition of the first target scene includes: when the electronic device is in the first target scene, determining a first available load of the electronic device according to a first overall load of the electronic device; and determining whether the first available load of the electronic device meets the control condition of the first target scene according to the CPU baseline of the first target scene.

[0011] It should be noted that the first available load of the electronic device can be understood as the current available load of the electronic device. When the current overall load of the electronic device is the central processing unit (CPU) resource currently used by the electronic device.

[0012] For example, if the first overall load of the electronic device is 70%, the first available load of the electronic device is 30%. The control condition of the first target scene includes the CPU baseline of the first target scene. By comparing the size relationship between the CPU baseline of the first target scene and the current available load of the electronic device, it can be determined whether the current available load of the electronic device meets the control condition.

[0013] In combination with the first aspect, in some implementations of the first aspect, the method further includes: when the CPU baseline of the first target scene is greater than the first available load of the electronic device, determining that the first available load of the electronic device meets the control condition of the first target scene; and when the CPU baseline of the first target scene is less than or equal to the first available load of the electronic device, determining that the first available load of the electronic device does not meet the control condition of the first target scene.

[0014] For example, the first target scenario is a photography scenario, the CPU baseline of the photography scenario is 45%, and the first available load of the electronic device is 30%. It can be seen that the CPU baseline of the photography scenario is greater than the first available load of the electronic device, which indicates that the first available load of the electronic device meets the control condition of the photography scenario.

[0015] With reference to the first aspect, in some implementations of the first aspect, before the determining whether the current state of the electronic device meets the control condition of the first target scenario, the method further includes: obtaining a first overall load of the electronic device.

[0016] It should be noted that the current overall load of the electronic device can be obtained at a certain period or every interval of time.

[0017] With reference to the first aspect, in some implementations of the first aspect, the method further includes: the first target scenario is triggered when a first application program is started by a user, and the first application program is associated with the first target scenario.

[0018] It should be noted that the first application program corresponds to the first target scenario, and the first application program can be started by the user through an operation on a user interface, so that the corresponding first target scenario is triggered.

[0019] With reference to the first aspect, in some implementations of the first aspect, the processes of the first target scenario include a first process, a second process and a third process, the first process and the second process are associated processes of the first target scenario, and the third process is a non-associated process of the first target scenario. When the current state of the electronic device meets the control condition of the first target scenario, the method further includes: when the first available load of the electronic device meets the control condition of the first target scenario, the non-associated process of the first target scenario is controlled.

[0020] It should be noted that the configuration file of the first target scenario includes the associated processes of the first target scenario, for example, the first process and the second process, and does not include the third process, that is, the third process is a non-associated process of the first target scenario, that is, the third process is not associated with other processes of the first target scenario. When the current available load of the electronic device meets the control condition of the first target scenario, the other non-associated processes except the associated processes in the first target scenario can be controlled, so that the system can also ensure the normal operation of the foreground processes while releasing the CPU resources.

[0021] With reference to the first aspect, in some implementations of the first aspect, the method further includes: after the first time period, determining whether the electronic device is still in the first target scene; when the electronic device is still in the first target scene, determining whether the current state of the electronic device meets the control condition of the first target scene; and when the current state of the electronic device meets the control condition of the first target scene, controlling the non-associated process of the first target scene.

[0022] For example, the first time period can be 2s.

[0023] That is, after controlling the process of the first target scene once, or determining that the process of the first target scene does not need to be controlled, a period of time is allowed to elapse, and it can be determined whether the process of the first target scene needs to be controlled again. Before determining whether the process of the first target scene needs to be controlled again, it is necessary to determine whether the electronic device is still in the first target scene, and only when the electronic device is still in the first target scene, it is necessary to determine whether the process of the first target scene needs to be controlled again.

[0024] With reference to the first aspect, in some implementations of the first aspect, the method further includes: when the electronic device is not in the first target scene, determining that the electronic device exits the first target scene.

[0025] With reference to the first aspect, in some implementations of the first aspect, when the electronic device is still in the first target scene, determining whether the current state of the electronic device meets the control condition of the first target scene includes: after controlling the non-associated process of the first target scene, reacquiring a second overall load of the electronic device at a preset time; determining a second available load of the electronic device according to the second overall load of the electronic device; and determining whether the second available load of the electronic device meets the control condition of the first target scene according to the CPU baseline of the first target scene.

[0026] It can be understood that the current state of the electronic device includes the second overall load of the electronic device and / or the second available load of the electronic device.

[0027] With reference to the first aspect, in some implementations of the first aspect, the controlling the non-associated process of the first target scene includes: suppressing the non-associated process of the first target scene; or killing the non-associated process of the first target scene.

[0028] It should be noted that suppressing the non-associated process of the first target scene can be understood as reducing the use time of the CPU resource occupied by the non-associated process of the first target scene.

[0029] In a second aspect, a device is provided, comprising: a processing unit configured to determine a configuration file of a first target scene according to the first target scene in response to a trigger of the first target scene, the configuration file of the first target scene comprising: a management condition of the first target scene, and an associated process of the first target scene; the processing unit is further configured to determine whether a current state of the device meets the management condition of the first target scene when the device is in the first target scene; and the processing unit is further configured to manage a non-associated process of the first target scene when the current state of the device meets the management condition of the first target scene, the non-associated process of the first target scene excluding a process of the associated process of the first target scene from the device.

[0030] With reference to the second aspect, in some implementations of the second aspect, the management condition of the first target scene is configured to define a central processing unit (CPU) baseline of the first target scene, and the processing unit is specifically configured to determine a first available load of the device according to a first overall load of the device when the device is in the first target scene; and the processing unit is specifically configured to determine whether the first available load of the device meets the management condition of the first target scene according to the CPU baseline of the first target scene.

[0031] With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to determine that the first available load of the device meets the management condition of the first target scene when the CPU baseline of the first target scene is greater than the first available load of the device; and the processing unit is further configured to determine that the first available load of the device does not meet the management condition of the first target scene when the CPU baseline of the first target scene is less than or equal to the first available load of the device.

[0032] With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to obtain the first overall load of the device.

[0033] With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to determine that the first target scene is triggered when a first application is started by a user, and the first application is associated with the first target scene.

[0034] With reference to the second aspect, in some implementations of the second aspect, the process of the first target scene comprises a first process, a second process, and a third process, the first process and the second process are the associated processes of the first target scene, and the third process is the non-associated process of the first target scene; and the processing unit is specifically configured to manage the third process when the first available load of the device meets the management condition of the first target scene.

[0035] In some implementations of the second aspect, the processing unit is further configured to determine whether the device is still in the first target scenario after the first time period; and when the device is still in the first target scenario, determine whether the current state of the device meets the control condition of the first target scenario; and when the current state of the device meets the control condition of the first target scenario, control the non-associated process of the first target scenario.

[0036] In some implementations of the second aspect, the processing unit is further configured to determine that the device exits the first target scenario when the device is not in the first target scenario.

[0037] In some implementations of the second aspect, when the device is still in the first target scenario, the processing unit is specifically configured to acquire a second overall load of the device at a preset time after controlling the non-associated process of the first target scenario; determine a second available load of the device according to the second overall load of the device; and determine whether the second available load of the device meets the control condition of the first target scenario according to the CPU baseline of the first target scenario.

[0038] In some implementations of the second aspect, the processing unit is specifically configured to suppress the non-associated process of the first target scenario; or the processing unit is specifically configured to kill the non-associated process of the first target scenario.

[0039] In a third aspect, an electronic device is provided, which includes one or more processors, one or more memories, and one or more computer programs stored in the one or more memories, the one or more computer programs including instructions that, when executed by the one or more processors, cause the electronic device to perform the method in the first aspect and any possible implementation manner thereof.

[0040] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and the computer program is executed by a computer to cause the computer to implement the method in the first aspect and any possible implementation manner thereof.

[0041] In a fifth aspect, a computer program product is provided, which includes instructions, and when the computer program product is executed on a computer, the computer is caused to perform the method in the first aspect and any possible implementation manner thereof.

[0042] In a sixth aspect, a chip is provided, which comprises a processor and a data interface, the processor reads instructions stored on a memory through the data interface to perform the method in the first aspect or any possible implementation manner thereof.

[0043] In a possible implementation manner of the sixth aspect, the processor is coupled with the memory through the interface.

[0044] In a possible implementation manner of the sixth aspect, the chip system further comprises the memory, and the memory stores the computer program or the computer instructions. BRIEF DESCRIPTION OF DRAWINGS

[0045] FIG. 1 is a structural schematic diagram of an electronic device.

[0046] FIG. 2 is a software structure block diagram of an electronic device.

[0047] FIG. 3 is a schematic flowchart of a management and control method provided by an embodiment of the present application.

[0048] FIG. 4 is a set of GUIs provided by an embodiment of the present application.

[0049] FIG. 5 is a schematic flowchart of a management and control method provided by an embodiment of the present application.

[0050] FIG. 6 is a schematic flowchart of a management and control method provided by an embodiment of the present application.

[0051] FIG. 7 is a schematic block diagram of an apparatus provided by an embodiment of the present application.

[0052] FIG. 8 is a schematic block diagram of an apparatus provided by an embodiment of the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the present application will be described below with reference to the drawings.

[0054] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and the appended claims of the application, the singular forms "a," "an" and "the" are intended to include both the singular and the plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and / or "including", as used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The term "and / or" used in the context of the present application refers to three relationships: A and / or B, A and B, and A or B. For example, A and / or B can mean that A exists alone, A and B exist together, B exists alone. The character " / " generally represents an "or" relationship between the associated objects.

[0055] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "in a various embodiment" or "in some embodiments" or "in other embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment, but can refer to one or more, but not all, embodiments, unless otherwise specifically specified. The terms "including," "comprising," "having" and variations thereof herein are meant to be broad and encompass the terms "consisting of" and "consisting essentially of" unless otherwise indicated. Thus, for example, a device including, comprising, or having a feature is not necessarily limited to only those embodiments which so include, comprise, or have the feature, but rather, the term "comprising" is used in the sense of open-endedness that means the feature is present, but that other features can also be present.

[0056] The following introduces electronic devices, user interfaces for such electronic devices, and embodiments for using such electronic devices. In some embodiments, an electronic device can be a portable electronic device that also contains other functionality such as personal digital assistant and / or music player functionality, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication functionality (e.g., a smart watch), etc. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices that run an operating system such as Harmony OS, or other operating systems. The portable electronic devices described above can also be other portable electronic devices such as a laptop computer, etc. It should also be understood that in other embodiments, the electronic devices described above can not be portable electronic devices, but rather, can be desktop computers. In other embodiments, the electronic devices can be instruments for measurement, such as an oscilloscope.

[0057] Exemplarily, FIG. 1 shows a structural schematic diagram of an electronic device 100. The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 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 loudspeaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, and the like. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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.

[0058] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0059] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), and the like. Different processing units can be independent devices, or can be integrated in one or more processors.

[0060] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.

[0061] The processor 110 can also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or is using in a loop. If the processor 110 needs to use the instructions or data again, it can call them directly from the memory. This avoids repeated access and reduces the latency of the processor 110, thus improving the efficiency of the system.

[0062] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0063] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0064] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0065] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and radiate as electromagnetic waves through the antenna 1. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

[0066] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110, and disposed in the same device as the mobile communication module 150 or other function modules.

[0067] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.

[0068] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can 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 systems (SBAS).

[0069] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.

[0070] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0071] The electronic device 100 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.

[0072] The ISP is configured to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0073] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. 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, or the like format. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0074] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0075] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0076] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of a biological neural network, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognition applications such as image recognition, face recognition, voice recognition, text understanding, etc.

[0077] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, music, video, etc. Files are saved in the external memory card.

[0078] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), etc.

[0079] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.

[0080] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some of the functions of the audio module 170 can be disposed in the processor 110.

[0081] The speaker 170A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0082] The microphone 170B, also referred to as a "receiver", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the user can listen to the voice through the microphone 170B by holding the microphone 170B close to the ear.

[0083] The microphone 170C, also referred to as a "microphone", "transducer", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound through the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, noise reduction functions can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals, noise reduction, and can also identify the source of the sound, realize the function of directional recording, etc.

[0084] The pressure sensor 180A is configured to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity greater than or equal to a first pressure threshold is applied to an alarm application icon, an instruction to create a new alarm is executed.

[0085] The fingerprint sensor 180H is configured to capture a fingerprint. The electronic device 100 can implement a fingerprint unlock, an application lock access, a fingerprint photograph, a fingerprint call answering, and the like using a captured fingerprint characteristic. For example, when the mobile phone detects a touch operation of a user in a lock screen interface, the mobile phone can capture fingerprint information of the user through the fingerprint sensor 180H, and match the captured fingerprint information with preset fingerprint information in the mobile phone. If the matching is successful, the mobile phone can enter a non-lock screen interface from the lock screen interface.

[0086] The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch screen". The touch sensor 180K is configured to detect a touch operation acting on or near the touch sensor 180K. The touch sensor 180K can transmit the detected touch operation to the application processor to determine a touch event type. A visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0087] FIG. 2 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application. A layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer. The application layer can include a series of application packages.

[0088] As shown in FIG. 2, the application layer can include a camera, a setting, a skin module, a user interface (UI), a third-party application, and the like. Among them, the third-party application can include a gallery, a calendar, a call, a map, a navigation, a WLAN, a Bluetooth, music, a video, a short message, and the like.

[0089] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer can include some pre-defined functions.

[0090] As shown in FIG. 2, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0091] The window manager is used to manage windows programs. The window manager can get the display screen size, determine whether there is a status bar, lock the screen, and take screenshots, etc. The content provider is used to store and obtain data, and make the data accessible to application programs. The data can include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.

[0092] The view system includes visual controls, such as controls that display text, controls that display pictures, etc. The view system can be used to build application programs. The display interface can be composed of one or more views.

[0093] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call hang-up, etc.).

[0094] The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, etc.

[0095] The notification manager enables application programs to display notification information in the status bar, which can be used to convey messages of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of the download, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application program running in the background, and can also be a notification in the form of a dialog window appearing on the screen. For example, prompting text information in the status bar, issuing a prompt sound, the electronic device vibrating, the indicator light flashing, etc.

[0096] The runtime includes the core library and the virtual machine. The Android runtime is responsible for the invocation and management of the Android system.

[0097] The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0098] The application program layer and the application program framework layer run in the virtual machine. The virtual machine executes the java files of the application program layer and the application program framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.

[0099] The system library can include multiple functional modules. For example: the surface manager, the media library, the three-dimensional graphics processing library (for example: OpenGL ES), the two-dimensional graphics engine (for example: SGL), etc.

[0100] The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications.

[0101] The media library supports playback and recording of multiple commonly used audio, video formats, and static image files. The media library can support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like.

[0102] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing.

[0103] The two-dimensional graphics engine is a drawing engine for 2D drawing.

[0104] In addition, the system library can also include a state monitoring service module, such as a physical state identification module, which is used to analyze and identify user gestures; a sensor service module, which is used to monitor sensor data uploaded by various sensors in the hardware layer to determine the physical state of the electronic device 100.

[0105] The kernel layer is between the hardware and the software. The kernel layer at least includes display drivers, camera drivers, audio drivers, and sensor drivers.

[0106] The hardware layer can include various sensors, such as the various sensors introduced in FIG. 1.

[0107] In combination with the electronic device introduced above in FIG. 1 and FIG. 2, in the embodiments of the present application, the electronic device, such as a mobile phone terminal, a tablet computer, and the like, can be a device running various application programs. The electronic device 100 involves physical devices mainly including sensors, decision support systems (DSS) display chips, touch display screens, fingerprint identification modules, and the like hardware components; and kernel software layers such as screen management modules, display drivers, fingerprint drivers, and anti-mis-touch; application program framework layer functions such as anti-mis-touch input, screen control, always-on display (AOD) services, and power management; and application layer services such as special adaptation applications (camera), third-party applications, system hibernation, AOD, and the like.

[0108] With the advancement of science and technology, electronic devices such as mobile phones, tablets, and personal computers can host a variety of applications and provide users with a variety of services. The operation of various application processes requires a certain central processing unit (CPU) baseline. The system can configure a CPU baseline for an application's background processes. When the background process exceeds the allowed CPU baseline, the system can control the application process, including suppressing the process's execution or killing it. However, various application processes may be interdependent. If a foreground process is associated with a background process, when the background process exceeds the allowed CPU baseline, the background process is controlled, which will affect the operation of the associated foreground process. For example, if the foreground process needs to display image data for the user, this image data must be provided by the background process associated with the foreground process. If the background process is killed, it will no longer be able to provide image data to the foreground process, and the user will not be able to access the image data in the user interface. Therefore, when the associated processes are controlled, the functional services provided by the foreground process to the user may be affected. For example, a foreground process needs to display image data for the user. This image data needs to be provided by a background process associated with the foreground process. When the background process is killed, in order to provide the image data to the foreground process, the killed process needs to be re-started in the background. This takes a certain amount of time, causing the foreground process to freeze when displaying the image data to the user, and the user cannot obtain the image data in time. It can be seen that when the associated processes are controlled, the efficiency of the foreground process in providing services to the user may be affected.

[0109] Therefore, in order to solve the problem that when the above-mentioned associated processes are controlled, the operation of the foreground process is affected, resulting in a decline in user experience, the present application provides a control method, device and electronic device. By presetting the target scene and the configuration file corresponding to the preset target scene, it is determined that when the CPU baseline of the target scene exceeds the current available load of the entire machine, the non-associated processes of the target scene are controlled. While ensuring the operation of the application, it can also prevent the associated processes from being controlled and affecting the implementation of functions in the target scene, as well as the efficiency of function implementation.

[0110] As shown in Figure 3, a schematic flow chart of a method for controlling a method, apparatus, and electronic device provided in an embodiment of the present application is shown. Method 300 can be applied to electronic devices carrying application programs, such as mobile terminals and tablet computers. Method 300 is described in detail below.

[0111] S301, triggering a target scene.

[0112] It should be noted that the target scene can be pre-set by the system, and the target scene can be related to a specific application program carried on the electronic device. The system can pre-set a plurality of target scenes.

[0113] In an implementation manner, one target scene is triggered each time.

[0114] For example, the target scene can be the starting of an application program. For example, the starting of a camera application program corresponds to triggering a camera scene. The starting of a game application program corresponds to triggering a game scene.

[0115] It should be noted that the starting of a plurality of similar application programs can correspond to triggering the same target scene. For example, the electronic device carries a camera 1 application program and a camera 2 application program, and when any of the application programs is started, the camera scene is triggered. The electronic device carries a game 1 application program and a game 2 application program, and when any of the application programs is started, the game scene is triggered. The application program triggering the target scene can be an original application program or a third-party application program, and the embodiments of the present application do not limit the same.

[0116] It should be noted that the target scene can be triggered by user operation on the user interface.

[0117] For example, as shown in FIG. 4, a set of graphical user interfaces (graphical user interface, GUI) provided by the present application is shown, and a mobile phone terminal is taken as an example to introduce a manner of triggering a target scene.

[0118] As shown in (a) of FIG. 4, the main interface of the mobile phone terminal is shown. The main interface displays icons of a plurality of application programs, for example, icons of clock, gallery, camera, calendar and the like. The corresponding application program can be started by user operation on the icon of the application program on the main interface. In response to user operation on the camera application program icon 401, the mobile phone terminal can display the GUI as shown in (b) of FIG. 4.

[0119] As shown in (b) of FIG. 4, the interface of the camera application program is shown. The mobile phone terminal starts the camera application program in response to user operation of clicking the camera application program icon 401, and the complete interface of the camera application program is displayed on the front of the mobile phone terminal, indicating that the camera scene is triggered.

[0120] It should be noted that FIG. 4 is only an example to illustrate a manner of starting an application program by clicking an application program icon, and the specific operation of starting an application program in the management method provided by the embodiments of the present application is not limited, and the application program can also be started by user shaking the electronic device or scanning a two-dimensional code.

[0121] S302, acquire a configuration file of the target scenario.

[0122] It should be noted that the configuration file of the target scenario can be pre-set by the system, and the configuration files corresponding to different target scenarios can be different.

[0123] For example, the configuration file of the target scenario can include the associated processes of the target scenario, the CPU baseline of the target scenario, etc.

[0124] It should be noted that different target scenarios have different target scenario identities (IDs), and when the target scenario is triggered, the system can determine the configuration file of the target scenario according to the ID of the triggered target scenario.

[0125] S303, acquire the current whole-machine load.

[0126] It should be noted that the system can acquire the current whole-machine load of the electronic device at a certain period or every interval of a period of time. By acquiring the current whole-machine load of the electronic device, the current available load of the electronic device can be determined.

[0127] For example, if the current whole-machine load of the electronic device is 70%, it indicates that the current available load of the electronic device is 30%.

[0128] It should be noted that the current available load of the electronic device can be used to run or process the processes of the application program.

[0129] S304, when the current available load does not meet the preset condition according to the configuration file of the target scenario and the whole-machine load, control the background process of the target scenario.

[0130] For example, the CPU baseline of the target scenario is determined by the configuration file of the target scenario acquired in the above step S302, and the current available load is determined by the current whole-machine load acquired in the above step S303. The CPU baseline of the target scenario is compared with the current available load. The CPU baseline of the target scenario can be understood as the usage rate of the CPU resources occupied by the target scenario, and the current available load represents the proportion of the available CPU resources of the current system.

[0131] Optionally, when the CPU baseline of the target scenario is less than or equal to the current available load, it indicates that the current available load meets the preset condition, and the background process of the current target scenario does not need to be controlled.

[0132] Optionally, when the CPU baseline of the target scenario is greater than the current available load, it indicates that the current available load does not meet the preset condition, and the background process of the current target scenario needs to be controlled.

[0133] For example, when the CPU baseline of the target scene is 45% and the current available load is 30%, it indicates that the current available load does not meet the preset condition, and the background process of the current target scene needs to be controlled.

[0134] Specifically, in order to avoid that the associated processes of the target scene are affected due to a process being controlled by the system, thereby affecting the experience of some functions under the target scene or reducing the efficiency of function implementation, the associated processes of the target scene included in the configuration file of the target scene can be set as white list processes. Even if the current available load does not meet the preset condition, the above-mentioned associated white list processes will not be controlled, and the processes not belonging to the associated processes in the configuration file of the target scene will be suppressed or killed to release CPU resources and guarantee the user experience in the foreground. The suppression of the process can be understood as reducing the use time of the process occupying the CPU resources.

[0135] It should be noted that the above-mentioned method 300 can be a flow executed in a cycle. The system can determine whether a target scene is entered at a certain period or every interval of a period of time, obtain the current overall load, determine whether the current available load meets the preset condition, and determine whether to control the background process of the target scene.

[0136] In order to facilitate understanding, the following will introduce a schematic flowchart of a control method provided by the embodiment of the application by taking the target scene as the camera scene as an example. The following will introduce the method 500 in detail.

[0137] S501, starting an application program.

[0138] For example, the application program can be started through the user operation as shown in FIG. 4.

[0139] It should be noted that when the interface of the application program is completely displayed in the foreground of the electronic device, it indicates that the starting of the application program is completed.

[0140] It can be understood that the complete display of the interface of the application program in the foreground of the electronic device indicates that the electronic device is currently running the application program in the foreground. It can be seen that the electronic device is currently running only one application program in the foreground. That is, only one target scene is triggered.

[0141] S502, determining that a target scene is entered.

[0142] For example, the system presets the camera scene, and when the electronic device starts the camera application program, the system determines that the target scene (i.e., the camera scene) is entered.

[0143] For another example, the system presets a game scene, and the electronic device carries a game 1 application and a game 2 application. When the electronic device starts one of the two game applications, the system determines that the target scene (i.e., the game scene) is entered.

[0144] In S503, the configuration file is determined according to the target scene ID.

[0145] It should be noted that the system can preset the configuration file of each target scene. For example, in the mobile phone system, a configuration file is preset for the camera 1 application corresponding to the photo scene, and a configuration file is preset for the camera 2 application corresponding to the photo scene. The configuration file can be configured by factory preset or system update.

[0146] For example, the system presets the following configuration file for the photo scene:

[0147] <item id=1011main_proc=”com.huawei.camera”threshold=”45”>

[0148] <proc_name>cameraserver< / proc_name>

[0149] <proc_name>com.huawei.camera:controllerService< / proc_name>

[0150] <proc_name>media.codec< / proc_name>

[0151] In the above configuration file of the photo scene, the target scene ID is 1011, the main process of the target scene is com.huawei.camera, the CPU baseline of the target scene is 45%, and the background processes associated with the main process include cameraserver, com.huawei.camera:controllerService, and media.codec. cameraserver is the service process of the camera, responsible for obtaining the preview function of the camera; com.huawei.camera:controllerService is a sub-process of the cameraserver service process, responsible for assisting the running of the service process; and media.codec is the codec process of the camera, responsible for the encoding and decoding functions of the image data of the camera.

[0152] For example, if the camera server process associated with the main process in the above-mentioned camera scenario is controlled, when the camera application is started, the user interface cannot display the image data acquired in real time by the camera, affecting the user's experience of using the camera application.

[0153] It should be noted that the above-mentioned configuration file is an exemplary configuration file in the camera scenario, and the background process associated with the main process com.huawei.camera in the camera scenario can also be any other process related to the camera function, and the embodiments of the present application do not limit this.

[0154] For example, the system determines the configuration file of the target scene according to the target scene ID of 1011. The system determines that the associated processes of the target scene are com.huawei.camera, camera server, com.huawei.camera:controllerService, and media.codec by analyzing the configuration file. It is determined that the CPU baseline of the target scene is 45%.

[0155] It should be noted that after the system first determines to enter the target scene through step S502 and determines the configuration file according to the target scene ID, the subsequent step S505 can be directly executed, and it is not necessary to determine again whether the system is in the target scene. When the system first executes to the subsequent step S507, after delaying for x seconds, step S504 needs to be executed to confirm whether it is still in the target scene at this time. This is because, as the application program runs, its process can be killed due to insufficient system running memory and other reasons, thereby causing the system to exit the target scene.

[0156] Next, it will be first introduced that the system first determines whether to control the background process of the application program:

[0157] S505, obtaining the current overall load of the electronic device.

[0158] It should be noted that the system can obtain the current overall load of the electronic device at a certain period or every interval.

[0159] For example, the system obtains the current overall load of the electronic device as 70%.

[0160] S506, determining whether the current available load meets the CPU baseline of the target scene.

[0161] It should be noted that before determining whether the current available load meets the CPU baseline of the target scene, the system can determine the current available load according to the current overall load of the electronic device.

[0162] For example, the current overall load is 70%, and the system determines that the current available load is 30%.

[0163] For example, taking the profile of the target scenario determined in step S503 as an example, the CPU baseline of the target scenario is 45%, and the current available load (30%) is less than the CPU baseline (45%) of the target scenario. It can be seen that the current available load does not meet the CPU baseline of the target scenario.

[0164] S507, the background process of the application program is controlled.

[0165] It should be noted that when it is determined that the current available load does not meet the CPU baseline of the target scenario, the system controls the background process of the application program. When it is determined that the current available load meets the CPU baseline of the target scenario, the system does not need to control the background process of the application program.

[0166] Specifically, the system does not control the associated process of the application program, and can control other processes except the associated process.

[0167] For example, taking the profile of the target scenario determined in step S503 as an example, when it is determined that the current available load does not meet the CPU baseline of the target scenario, the system can control other processes except the associated process (cameraserver, com.huawei.camera:controllerService, media.codec) of the main process (com.huawei.camera) included in the profile.

[0168] It should be noted that the background processes (cameraserver, com.huawei.camera:controllerService, media.codec) associated with the main process (com.huawei.camera) can be written in the form of a whitelist into the system memory before the electronic device is shipped. That is, the associated processes in the profile of the target scenario can be stored in the system in the form of a whitelist. If the background processes (cameraserver, com.huawei.camera:controllerService, media.codec) associated with the main process (com.huawei.camera) are controlled, the running of the main process in the foreground will be affected, for example, the main process running in the foreground is stuck. If other background processes except the associated processes of the main process are controlled, the normal running of the foreground main process can be ensured while the CPU resources are released.

[0169] It can be understood that after the system controls the background process of the application program this time, or the system determines that the background process of the application program does not need to be controlled, the next determination of whether to control the background process of the application program can be continued after a period of time (for example, 2s).

[0170] For example, after the system determines whether to control the background process of the application program this time, the following steps can be continued to be executed.

[0171] Optionally, after delaying for x seconds, the system determines again whether to control the background process of the application program.

[0172] S504, determine whether in the target scenario.

[0173] It can be understood that after the system determines that the current available load meets the CPU baseline of the target scenario, or after the system controls the background process of the application program, it is necessary to determine again whether it is still in the target scenario of the above step S502.

[0174] Optionally, when it is determined that it is still in the target scenario, the subsequent step S505 can be continued to be executed.

[0175] Optionally, when it is determined that it is not in the target scenario, the subsequent step S508 is executed.

[0176] S505, obtain the current overall load of the electronic device.

[0177] It can be understood that after delaying for x seconds, the current overall load of the electronic device can change, and therefore, it is necessary to reacquire the current overall load.

[0178] S506, determine whether the current available load meets the CPU baseline of the target scenario.

[0179] It can be understood that it is necessary to determine a new current available load according to the reacquired current overall load, and to determine whether the new current available load meets the CPU baseline of the target scenario by comparing the new current available load with the CPU baseline of the target scenario.

[0180] Optionally, when the current available load meets the CPU baseline of the target scenario, delaying for x seconds, the step S504 can be continued to be executed in a loop.

[0181] Optionally, when the current available load does not meet the CPU baseline of the target scenario, the step S507 of controlling the background process of the application program is executed.

[0182] S508, determine that the target scenario exits.

[0183] It should be noted that if the system determines that it is not in the target scenario, it is determined that the target scenario exits.

[0184] For example, after the system determines that the current available load meets the CPU baseline of the target scenario, or the system manages the background processes of the application program, the application program of the target scenario is killed, the system can mark that the target scenario exits, and the flow ends. When the user starts the preset application program again, so that the electronic device enters the target scenario corresponding to the application program, the steps in the method 500 can be continued to execute.

[0185] As shown in FIG. 6, a schematic flowchart of a management method provided by an embodiment of the present application is shown, which can be applied to electronic devices such as mobile phone terminals, tablet computers, personal computers, and the like. The method 600 will be specifically introduced below.

[0186] S601, in response to a first target scenario trigger, a configuration file of the first target scenario is determined according to the first target scenario.

[0187] It should be noted that the configuration file of the first target scenario includes a management condition of the first target scenario and an associated process of the first target scenario.

[0188] It can be understood that the system can preset multiple target scenarios, and the first target scenario belongs to any one of the multiple target scenarios. The configuration file of the first target scenario is also preset.

[0189] It should be noted that different target scenarios have different target scenario IDs, and the configuration file of the target scenario can be determined according to the target scenario ID.

[0190] For example, as introduced above for the method 500, the first target scenario can be a preset camera scenario, the management condition of the first target scenario in the configuration file of the first target scenario can be the CPU baseline of the first target scenario, that is, 45%, and the associated process of the first target scenario includes com.huawei.camera, cameraserver, com.huawei.camera:controllerService, and media.codec.

[0191] It can be understood that the configuration files of different target scenarios can be different. The electronic device can trigger one target scenario each time.

[0192] It should be noted that the first target scenario can be triggered by the user's operation on the user interface.

[0193] Optionally, when the user starts the first application program, the first target scenario is triggered, and the first application program is associated with the first target scenario.

[0194] For example, the first application program can be started by the user operation as shown in FIG. 4, so as to trigger the first target scenario corresponding to the first application program.

[0195] For example, the first interface is a main interface of a mobile terminal as shown in (a) of FIG. 4, and the icon of the first application program can be an icon 401 of a camera application program. In response to a user clicking the icon 401 of the camera application program, the mobile terminal displays an interface of the camera application program as shown in (b) of FIG. 4, indicating that the camera application program is started, and the corresponding camera scene is triggered.

[0196] S602, when the electronic device is in the first target scene, determine whether the current state of the electronic device meets the control condition of the first target scene.

[0197] It should be noted that the current state of the electronic device includes the current overall load of the electronic device and / or the current available load of the electronic device. The control condition of the first target scene is used to limit the CPU baseline of the first target scene.

[0198] It can be understood that the current overall load of the electronic device is the CPU resource currently used by the electronic device.

[0199] Specifically, when the electronic device is in the first target scene, the first available load of the electronic device is determined according to the first overall load of the electronic device; and whether the first available load of the electronic device meets the control condition of the first target scene is determined according to the CPU baseline of the first target scene.

[0200] For example, if the first overall load of the electronic device is 70%, the first available load of the electronic device is 30%. The configuration file of the first target scene includes the CPU baseline of the first target scene. By comparing the size relationship between the CPU baseline of the first target scene and the current available load of the electronic device, it can be determined whether the current available load of the electronic device meets the control condition.

[0201] Optionally, when the CPU baseline of the first target scene is greater than the first available load of the electronic device, it is determined that the first available load of the electronic device meets the control condition of the first target scene; and when the CPU baseline of the first target scene is less than or equal to the first available load of the electronic device, it is determined that the first available load of the electronic device does not meet the control condition of the first target scene.

[0202] For example, the first target scene is a camera scene, the CPU baseline of the camera scene is 45%, and the first available load of the electronic device is 30%. It can be seen that the CPU baseline of the camera scene is greater than the first available load of the electronic device, which indicates that the first available load of the electronic device meets the control condition.

[0203] It should be noted that the first overall load of the electronic device can be obtained before determining whether the current state of the electronic device meets the control condition of the first target scene in step S602.

[0204] Exemplarily, the current overall load of the electronic device can be acquired at a certain period or every interval of time.

[0205] S603, when the current state of the electronic device meets the management and control condition of the first target scenario, the non-associated process of the first target scenario is managed and controlled.

[0206] It should be noted that the non-associated process of the first target scenario is the process of the electronic device excluding the associated process of the first target scenario.

[0207] Specifically, the management and control of the non-associated process of the first target scenario includes suppressing the non-associated process of the first target scenario or killing the non-associated process of the first target scenario.

[0208] It should be noted that suppressing the non-associated process of the first target scenario can be understood as reducing the use time of the CPU resource occupied by the non-associated process of the first target scenario according to a certain proportion.

[0209] Exemplarily, the process of the first target scenario includes a first process, a second process and a third process, the first process and the second process are the associated processes of the first target scenario, and the third process is the non-associated process of the first target scenario; when the first available load of the electronic device meets the management and control condition of the first target scenario, the third process is managed and controlled.

[0210] It should be noted that the configuration file of the first target scenario includes the associated processes of the first target scenario, for example, the first process and the second process, and does not include the third process, that is, the third process is the non-associated process of the first target scenario, that is, the third process is not associated with other processes of the first target scenario. When the current available load of the electronic device does not meet the preset condition, the other non-associated processes except the associated processes in the first target scenario can be managed and controlled, so that the system can also ensure the normal operation of the foreground process while releasing the CPU resource.

[0211] Optionally, when the first available load of the electronic device does not meet the management and control condition of the first target scenario, the process of the first target scenario does not need to be managed and controlled.

[0212] In an implementation manner, after the first time period, it is determined whether the electronic device is still in the first target scenario; when the electronic device is still in the first target scenario, it is determined whether the current state of the electronic device meets the management and control condition of the first target scenario; when the current state of the electronic device meets the management and control condition of the first target scenario, the non-associated process of the first target scenario is managed and controlled.

[0213] Exemplarily, the first time period can be 2s.

[0214] That is, after controlling the process of the first target scene once or determining that the process of the first target scene does not need to be controlled, a period of time is allowed to elapse, and then it can be determined whether the process of the first target scene needs to be controlled.

[0215] However, before determining whether the process of the first target scene needs to be controlled next time, it needs to be determined whether the electronic device is still in the first target scene, and only when the electronic device is still in the first target scene, it can be determined whether the process of the first target scene needs to be controlled.

[0216] Optionally, when the electronic device is still in the first target scene, a second overall load of the electronic device is acquired again at a preset time after the non-associated process of the first target scene is controlled, a second available load of the electronic device is determined according to the second overall load of the electronic device, and it is determined whether the second available load of the electronic device meets the control condition of the first target scene according to the CPU baseline of the first target scene.

[0217] It can be understood that the current state of the electronic device at this time includes the second overall load of the electronic device and / or the second available load of the electronic device.

[0218] In another implementation manner, when the electronic device is not in the first target scene, it is determined that the electronic device exits the first target scene.

[0219] In the control method provided in the present application, the associated process and the non-associated process of the target scene are determined through the preset target scene and the configuration file corresponding to the preset target scene. When the CPU baseline of the target scene exceeds the current available load, the non-associated process of the target scene is controlled, so that the CPU resource is released, and the application program is run while avoiding the associated process from being controlled to affect the implementation of the function in the target scene and the efficiency of the function implementation.

[0220] The control method provided in the embodiments of the present application is described in detail above in combination with FIGS. 1 to 6. In various embodiments of the present application, the terms and / or descriptions of various embodiments are consistent and can be mutually referenced if there is no special description and logical conflict. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0221] The apparatus provided in the embodiments of the present application will be described in detail below in combination with FIGS. 7 and 8. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments, and therefore, the content not described in detail can be referred to the method embodiments described above, and will not be described here again for the sake of brevity.

[0222] FIG. 7 shows a schematic block diagram of an apparatus 700 provided in the embodiments of the present application, which can include units for performing the control method in FIG. 6.

[0223] Specifically, the apparatus 700 includes a processing unit 710 and a transceiver unit 720.

[0224] Optionally, the apparatus 700 further includes a storage unit, which can be used to store instructions and / or data. The processing unit 710 can read the instructions and / or data in the storage unit, so that the apparatus implements the related actions performed by the electronic device in the foregoing various method embodiments.

[0225] The apparatus 700 can be used to perform the actions performed by the electronic device in the various method embodiments described above. In this case, the apparatus 700 can be a component of the electronic device, for example, the apparatus 700 can also be a chip or an integrated circuit in the electronic device. The processing unit 710 is configured to perform the processing-related operations of the electronic device in the method embodiments described above, and the transceiver unit 720 is configured to perform the transceiving-related operations of the electronic device in the method embodiments described above.

[0226] It should be understood that the specific processes by which the various units perform the corresponding steps described above have been described in detail in the method embodiments described above, and thus will not be described here again for brevity.

[0227] In a specific implementation, the actions performed by the processing unit 710 and the transceiver unit 720 can be implemented by one processor, or can also be implemented by multiple processors.

[0228] FIG. 8 is another schematic block diagram of an apparatus provided by an embodiment of the present application. The apparatus 800 shown in FIG. 8 can include a processor 810, a transceiver 820, and a memory 830. The processor 810, the transceiver 820, and the memory 830 are connected through internal connection paths. The memory 830 is configured to store instructions, and the processor 810 is configured to execute the instructions stored in the memory 830 to implement the methods in the various embodiments described above. Optionally, the memory 830 can be coupled to the processor 810 through an interface, or the memory 830 can be integrated with the processor 810.

[0229] It should be noted that the transceiver 820 described above can include, but is not limited to, a transceiving device such as an input / output interface, to implement the communication between the apparatus 800 and other devices or communication networks.

[0230] The memory 830 can be a volatile memory and / or a nonvolatile memory. The nonvolatile memory can be, for example, a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be, for example, a random access memory (RAM). The RAM can be used as the external cache memory. Examples of the RAM include, but are not limited to, a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous DRAM (SDRAM), a double data rate SDRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a synchlink DRAM (SLDRAM), and a direct rambus RAM (DR RAM).

[0231] It should be noted that when the processor is a general processor, a DSP, an ASIC, a FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, the memory (storage module) can be integrated in the processor.

[0232] It should also be noted that the memory described herein is intended to include, but not limited to, these and any other suitable type of memory.

[0233] The transceiver 820 uses a transceiving device such as, but not limited to, a transceiver to implement the communication between the device 800 and other devices or communication networks to receive / send data / information for implementing the methods in the above embodiments.

[0234] The device 800 can be a chip or circuit disposed in the above electronic device.

[0235] The embodiments of the present application also provide a computer program product, which includes computer program codes, when the computer program codes are run on a computer, the computer is caused to implement the methods in the above embodiments of the present application.

[0236] The embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and when the computer instructions run on a computer, the computer implements the method in the above-mentioned embodiments of the present application.

[0237] The embodiment of the present application further provides a chip, which comprises a circuit for executing the method in the above-mentioned embodiments of the present application.

[0238] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0239] In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; "and / or" herein is a description of the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B can represent: A alone, A and B exist at the same time, and B alone. In the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0240] In the embodiments of the present application, the prefix words such as "first", "second" are only used to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of ordinal words such as ordinal words in the embodiments of the present application does not constitute a limitation on the described objects, and the description of the described objects should refer to the description of the context in the claims or embodiments, and should not constitute an unnecessary limitation because of the use of such prefix words.

[0241] In several embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented by other manners. For example, the above-mentioned device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0242] In each of the embodiments of the present application, the terms and / or descriptions among the embodiments are consistent and can be referred to each other if there is no special description and logical conflict, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0243] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.

[0244] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit.

[0245] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A management and control method, characterized in that: The method is applied to an electronic device, comprising: In response to a first target scene trigger, a configuration file of the first target scene is determined according to the first target scene, where the configuration file of the first target scene includes: The control conditions of the first target scenario and the associated processes of the first target scenario; When the electronic device is in the first target scene, determining whether a current state of the electronic device meets the control conditions of the first target scene; When the current state of the electronic device meets the control conditions of the first target scenario, the non-associated processes of the first target scenario are controlled, and the non-associated processes of the first target scenario are processes of the electronic device excluding the associated processes of the first target scenario.

2. The method according to claim 1, characterized in that The control condition of the first target scenario is used to define the CPU baseline of the first target scenario. Wherein, when the electronic device is in the first target scene, determining whether the current state of the electronic device meets the control conditions of the first target scene includes: When the electronic device is in the first target scenario, determining a first available load of the electronic device according to a first complete load of the electronic device; Determine whether the first available load of the electronic device meets the management and control conditions of the first target scenario based on the CPU baseline of the first target scenario.

3. The method according to claim 2, characterized in that The method further comprises: When the CPU baseline of the first target scenario is greater than the first available load of the electronic device, determining that the first available load of the electronic device meets the control condition of the first target scenario; When the CPU baseline of the first target scenario is less than or equal to the first available load of the electronic device, it is determined that the first available load of the electronic device does not meet the management and control conditions of the first target scenario.

4. The method according to any one of claims 1 to 3, characterized in that Before determining whether the current state of the electronic device meets the control condition of the first target scenario, the method further includes: A first entire device load of the electronic device is obtained.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: When a user starts a first application, the first target scene is triggered, and the first application is associated with the first target scene.

6. The method according to claim 2 or 3, characterized in that The processes of the first target scene include a first process, a second process, and a third process. The first process and the second process are associated processes of the first target scene, and the third process is a non-associated process of the first target scene. When the current state of the electronic device meets the control condition of the first target scenario, controlling the non-associated process of the first target scenario includes: When the first available load of the electronic device meets the control condition of the first target scenario, the third process is controlled.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: After the first time period, determining whether the electronic device is still in the first target scene; When the electronic device is still in the first target scene, determining whether the current state of the electronic device meets the control conditions of the first target scene; When the current state of the electronic device meets the control conditions of the first target scenario, the non-associated processes of the first target scenario are controlled.

8. The method according to claim 7, characterized in that The method further comprises: When the electronic device is not in the first target scene, it is determined that the electronic device exits the first target scene.

9. The method according to claim 7 or 8, characterized in that When the electronic device is still in the first target scene, determining whether the current state of the electronic device meets the control conditions of the first target scene includes: When the electronic device is still in the first target scene, obtaining a second entire device load of the electronic device again at a preset time after controlling the non-associated process of the first target scene; determining a second available load of the electronic device according to a second complete load of the electronic device; Determine whether the second available load of the electronic device meets the management and control conditions of the first target scenario based on the CPU baseline of the first target scenario.

10. The method according to any one of claims 1 to 9, characterized in that The controlling of the non-associated processes of the first target scenario includes: Suppressing non-associated processes of the first target scenario; or Kill non-associated processes of the first target scenario.

11. A control device, characterized in that: include: a processing unit, configured to, in response to a trigger of a first target scene, determine a configuration file of the first target scene according to the first target scene, wherein the configuration file of the first target scene includes: The control conditions of the first target scenario and the associated processes of the first target scenario; The processing unit is further configured to, when the device is in the first target scenario, determine whether a current state of the device meets the control conditions of the first target scenario; The processing unit is further configured to control non-associated processes of the first target scenario when the current state of the device meets the control conditions of the first target scenario. The non-associated processes of the first target scenario are processes of the device excluding associated processes of the first target scenario.

12. The device according to claim 11, characterized in that The control condition of the first target scenario is used to define the CPU baseline of the first target scenario. The processing unit is specifically configured to determine a first available load of the device according to a first complete machine load of the device when the device is in the first target scenario; The processing unit is specifically configured to determine whether the first available load of the device meets the control conditions of the first target scenario based on the central processing unit CPU baseline of the first target scenario.

13. The device according to claim 12, characterized in that The processing unit is further configured to, when the CPU baseline of the first target scenario is greater than the first available load of the device, determine that the first available load of the device meets the control condition of the first target scenario; The processing unit is further configured to determine that the first available load of the device does not meet the management and control conditions of the first target scenario when the CPU baseline of the first target scenario is less than or equal to the first available load of the device.

14. The device according to any one of claims 11 to 13, characterized in that The processing unit is further configured to obtain a first entire machine load of the device.

15. The device according to any one of claims 11 to 14, characterized in that The processing unit is further configured to trigger the first target scene when the user starts the first application, and the first application is associated with the first target scene.

16. The device according to any one of claims 11 to 15, characterized in that The processes of the first target scene include a first process, a second process, and a third process. The first process and the second process are associated processes of the first target scene, and the third process is a non-associated process of the first target scene. The processing unit is specifically configured to control the third process when the first available load of the device meets the control conditions of the first target scenario.

17. The device according to any one of claims 11 to 16, characterized in that The processing unit is further configured to determine whether the device is still in the first target scene after the first time period; The processing unit is further configured to, when the device is still in the first target scene, determine whether the current state of the device meets the control conditions of the first target scene; The processing unit is further configured to control non-associated processes of the first target scenario when the current state of the device meets the control conditions of the first target scenario.

18. The device according to claim 17, characterized in that The processing unit is further configured to determine that the device exits the first target scene when the device is not in the first target scene.

19. The device according to claim 18, characterized in that The processing unit is specifically configured to, when the device is still in the first target scenario, obtain a second entire device load of the device again at a preset time after controlling the non-associated processes of the first target scenario; The processing unit is specifically configured to determine a second available load of the device according to a second entire machine load of the device; The processing unit is specifically configured to determine, based on the CPU baseline of the first target scenario, whether the second available load of the device meets the management and control conditions of the first target scenario.

20. The device according to any one of claims 11 to 19, characterized in that The processing unit is specifically configured to suppress non-related processes of the first target scene; or The processing unit is specifically used to detect and kill non-associated processes of the first target scenario.

21. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories store one or more computer programs, which include instructions. When the instructions are executed by the one or more processors, the electronic device performs the method according to any one of claims 1 to 10.

22. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a computer, the computer is caused to implement the method according to any one of claims 1 to 10.

23. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 10.

24. A chip, characterized in that: The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Thread management and control method, thread management and control device, terminal and storage medium

    CN114461360A

  • Application program running method and device and electronic equipment

    CN116820726A

  • Resource management and control method, and device

    WO2022127632A1

  • Resource management and control method, and electronic device and medium

    WO2023227075A1