WO2022242412A1 - Method for killing application, and related device - Google Patents

Method for killing application, and related device Download PDF

Info

Publication number
WO2022242412A1
WO2022242412A1 PCT/CN2022/088220 CN2022088220W WO2022242412A1 WO 2022242412 A1 WO2022242412 A1 WO 2022242412A1 CN 2022088220 W CN2022088220 W CN 2022088220W WO 2022242412 A1 WO2022242412 A1 WO 2022242412A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
interval
killing
score
time
Prior art date
Application number
PCT/CN2022/088220
Other languages
French (fr)
Chinese (zh)
Inventor
王云鹏
董浩正
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2022242412A1 publication Critical patent/WO2022242412A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Definitions

  • the embodiments of the present application relate to the field of terminal technologies, and in particular, to a method for killing applications and related equipment.
  • the above settings are too rigid and rigid, and have extremely high requirements for the architect responsible for product planning. It is necessary to ensure that the architect is very familiar with the user experience and the memory business domain before determining the memory baseline of the product.
  • the original design scheme is separated from the actual experience of users, and the product planning can only be adjusted dynamically based on public opinion feedback after listing. The new scheme can only be repaired on the next version of the mobile phone system to be pushed. There is lagging feedback, which affects the actual experience of the product.
  • the embodiment of the present application discloses a method for killing applications and related equipment, which can adjust the user's actual experience of using the mobile phone in time, so that the mobile phone can better understand the user.
  • the first aspect of the present application discloses a method for killing applications, including: obtaining the usage logs of the applications within a preset time period; obtaining the killing time of each application from the usage logs of the applications, and The killing time of each application determines the time for each application to switch to the background and the time to switch to the foreground; calculate the corresponding time interval for each application according to the determined time for each application to switch to the background and the time to switch to the foreground; determine The number of applications running in the foreground within the time interval; and determined based on the time interval corresponding to each application, the number of applications running in the foreground within the time interval, and the base score of each application Evaluation results for each application.
  • the three-dimension management information of the basic score of the application program, the interval time and the number of application programs running in the foreground within the time interval are introduced, and the manslaughter situation of each application program is dynamically evaluated, which fits the needs of the user.
  • the actual usage habits can improve the user's experience of keeping alive the application, minimize or avoid the accidental killing of the application and effectively ensure that the electronic device has enough memory to maintain the stable operation of the foreground application.
  • the determining the evaluation result of each application program includes: calculating the killing score of each application program.
  • the checking and killing score of the application program can be accurately calculated, thereby improving the accuracy of checking and killing the application program.
  • the method further includes: sorting the application programs according to the killing score of each application program.
  • the method further includes: killing the application program according to the evaluation result of each application program when the remaining memory of the electronic device is less than a preset value.
  • the application killing strategy can be adjusted in time according to the evaluation result of the application program, which can not only ensure the priority of checking and killing the application program, but also further ensure that the electronic device has enough memory to maintain the stable operation of the foreground application program .
  • the method further includes: setting a first threshold; and if the remaining memory of the electronic device is less than the preset value, giving priority to the application whose killing score is lower than the first threshold
  • the program performs scanning and killing.
  • the method further includes: setting a second threshold; and optimizing applications whose killing scores exceed the second threshold.
  • the method further includes: setting the preset time period in response to user input.
  • the usage log of the application program includes: an application program background keep-alive log and an application program killing log; wherein, the application program background keep-alive log includes: the application name of each application program , package name, the time each application is switched to the background and the time for each time to switch to the foreground; the application killing log includes: the application name of each application, the package name, the killing Time, killing reasons.
  • the time when the application program cuts to the background determined according to the killing time of each application program indicates the time when the application program was last switched to the background before the killing time; and according to each application program The time when the application program switches to the foreground determined by the killing time indicates the last time when the application program switches to the foreground after the killing time.
  • the time interval can be calculated according to the time when the application was last switched to the background before the application was checked and killed and the time when the application was last switched to the foreground after the application was checked and killed, so as to fit the user's recent usage habits and improve the user's awareness of the application. Keep alive experience.
  • the second aspect of the present application discloses an electronic device, including a processor and a memory; the memory is used to store instructions; and the processor is used to call the instructions in the memory, so that the electronic device executes the method for killing the application.
  • the third aspect of the present application discloses a computer-readable storage medium, where at least one instruction is stored in the computer-readable storage medium, and the method for killing an application is implemented when the at least one instruction is executed by a processor.
  • FIG. 1 is a schematic flowchart of a method for killing an application provided by an embodiment of the present application.
  • FIG. 2 is a detailed flow chart of a method for killing an application provided by an embodiment of the present application.
  • FIG. 3 illustrates an example of determining the time when the application program switches to the background and the time when the application program switches to the foreground according to the scanning and killing time of the application program.
  • Figure 4 illustrates by setting multiple time intervals corresponding to different scores to plot points in the XOY coordinate system and perform trend fitting.
  • Fig. 5 illustrates by setting multiple intervals and applying numbers corresponding to different scores to plot points in the XOY coordinate system and perform trend fitting.
  • Figure 6 illustrates the setting of base points for different applications.
  • Figure 7 illustrates the sorting of applications according to the killing score.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 9 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • the killing mechanism of the Android (Android) application includes: first, the application is classified into foreground (foreground application), visible (visible application), secondary (secondary service), hidden (background application) and so on. According to the importance of different levels, application killing control is carried out.
  • the Low Memory Kill program sets the corresponding numerical value to the status level of each application. When the remaining memory is insufficient, the Low Memory Kill program will kill the application at the corresponding state level to release the memory. If the remaining memory is still insufficient after killing the application, it will continue to kill the application at the previous state level, and so on. Killing all the way to the foreground application will cause the running application or game to crash and seriously affect the user experience.
  • FIG. 1 is a schematic flow chart of a method for Wrong kill assessment provided by an embodiment of the present application.
  • the various reasons for the killing of the application are collected through the method of killing the application provided by the embodiment of the present application, and the method of killing the application is used to evaluate the accidental killing of the application, and according to the evaluation result Dynamically modify the killing strategy to improve the user experience of keeping alive. Please refer to the description of FIG. 2 for details.
  • FIG. 2 is a detailed flow chart of a method for applying wrong kill assessment (Wrong kill assessment) provided by an embodiment of the present application.
  • the method for killing applications provided in the embodiments of the present application may be applied to electronic devices.
  • the electronic device may be a terminal device such as a mobile phone or a tablet computer.
  • the method for killing applications provided by this application improves the priority of applications used by users in daily use, so that the applications that users focus on will not be checked and killed, and the user experience of keeping alive is improved.
  • the methods of killing applications include:
  • Step S11 acquiring usage logs of application programs within a preset time period.
  • the preset time period may refer to a time period of different durations such as the user's last day or several days or a week or a month. In one embodiment, the preset time period may be set in response to user input.
  • the usage log of the application program includes an application program background keep-alive log and an application program killing log.
  • the application program background keep-alive log includes, but is not limited to, the application name of each application program in the N application programs, the package name (package_name), and the time each application program switches to the background each time (that is, each time it was previously The time when the platform is switched to the background) and the time when the foreground is switched each time (that is, the time when the application is started each time).
  • N is a positive integer greater than or equal to 1.
  • the application program killing log includes, but is not limited to, the application name and package name of each application program, the killing time and killing reason of each application program.
  • Step S12 obtaining the killing time of each application program from the usage log of the application program, and determining the time when each application program switches to the background and switches to the foreground according to the killing time of each application.
  • the time when the application program cuts to the background determined according to the killing time of each application program indicates the last time when the application program cuts to the background before the killing time. In one embodiment, the time when the application program switches to the foreground determined according to the killing time of each application program indicates the latest time when the application program switches to the foreground after the killing time.
  • the killing time of each application can be obtained from the killing log of the application, and then the time and time for switching the background of each application are determined from the keeping alive log of the background of the application according to the killing time. Front desk time.
  • the killing time of the application A obtained from the killing log of the application program is T2
  • the last time when the application A switches to the background is T1
  • the killing time T2 the last time when the A application switches to the foreground is T3.
  • Step S13 calculate the time interval T corresponding to each application program according to the determined time when each application program switches to the background and switches to the foreground; determine the interval application number D corresponding to each application program within the time interval T.
  • the time interval T corresponding to each application program is equal to the determined difference between the time when each application program switches to the foreground and the time when it switches to the background.
  • the interval application number D corresponding to each application program in the time interval T indicates the number of application programs switched to the foreground within the time interval T (that is, in the time interval T , the number of applications launched by the electronic device).
  • the interval application number D corresponding to each application program may be obtained from the application program background keep-alive log.
  • the interval application number D corresponding to the A application is equal to 2.
  • Step S14 determine the evaluation result of each application program based on the time interval T corresponding to each application program, the number of applications D in the interval, and the basic score F of each application program.
  • the determining the evaluation result of each application program includes: calculating the killing score S of each application program.
  • multiple time intervals T can be set to correspond to different scores, the multiple time intervals T can be used as the abscissa in the XOY coordinate system, and the scores corresponding to the multiple time intervals T can be Values are plotted as ordinates in the XOY coordinate system, and these points are connected into a curve for trend fitting to obtain the curve function Y1.
  • the reference value of the time interval T when setting the score value corresponding to the time interval T, can be set in advance, and the score value corresponding to the reference value is set to 100 points, which is less than the reference value. If the degree is enhanced, the score is increased, and if the user's sensitivity is greater than the reference value, the user's sensitivity is weakened, and the score is reduced.
  • the boundary value of the time interval T can also be set. When the value of the time interval T is greater than the set boundary value, the user has no bad feeling. When the time interval T is greater than the set boundary value, the corresponding score is 0.
  • the base value of the time interval T is set to 15 minutes
  • the boundary value of the time interval T is set to 60 minutes.
  • the reference value of setting time interval T is 15 minutes, and the corresponding score is 100 minutes, and the boundary value of setting time interval T is 60 minutes;
  • Setting time interval 5 minutes corresponds to score 160;
  • Setting A time interval of 10 minutes corresponds to a score of 130, etc., and the multiple set time intervals T and the corresponding scores are used as coordinate points to draw points in the XOY coordinate system, and all the points drawn are connected into a curve for trend simulation Combined to obtain the curve function Y1.
  • a plurality of interval application numbers D can be set to correspond to different scores, and the plurality of interval application numbers D can be used as the abscissa in the XOY coordinate system, and the multiple interval application numbers D can be used to correspond to the scores respectively. Values are plotted as ordinates in the XOY coordinate system, and these points are connected into a curve for trend fitting to obtain the curve function Y2.
  • the reference value of the interval application number D when setting the score value corresponding to the interval application number D, can be preset, and the score value corresponding to the reference value is set to 100 points, which is less than the reference value The higher the user's sensitivity, the higher the score, and the weaker the user's sensitivity, the lower the score.
  • the boundary value of the interval application number D can also be set. When the value of the interval application number D is greater than the set boundary value, the user has no bad experience. When the interval application number D is greater than the set boundary value, the corresponding The score is 0.
  • the base value of the interval application number D is 4, and the boundary value of the interval application number D is set to 13.
  • the reference value for setting the number of interval applications D is 4, the corresponding score is 100 points, and the boundary value for setting the number of interval applications D is 13; when the number of interval applications D is set to 2, it corresponds to The score value is 160; when the interval application number D is set to 3, the corresponding score value is 130, etc., and the multiple interval application numbers D and the corresponding scores are used as coordinate points in the XOY coordinate system to describe points, and all the described Connect the points into a curve for trend fitting to obtain the curve function Y2.
  • the basic score F of each application program can be set in advance. In one embodiment, the basic score F of each application program can be scored according to the user's usage habits.
  • a table can be created that records the base score for each application.
  • the form includes a plurality of fields, and the plurality of fields include, but are not limited to, the application name of each application, the basic score F, the category of each application (i.e. classification ), package name, etc.
  • the basic score F of the "Glory of the King” application is set to 100 points according to the user's usage habits; the basic score F of the "QQ” application is set to 80 points.
  • the application programs can also be sorted according to the killing score of each application program.
  • a ranking table can be created to record the scoring ranking of the application program every time it is checked and killed.
  • the ranking table includes multiple fields, such as the serial number (SN) of the electronic device, the package name of the application, the time when the application was switched to the background, the time when the application was switched to the foreground, the reason for the application to be checked and killed, The time when the application was checked and killed, the interval time T (minutes), the number of applications in the interval D (pieces), the name of the application, the basic score F, the application classification, and the killing score (scoring data).
  • SN serial number
  • the package name of the application the time when the application was switched to the background
  • the time when the application was switched to the foreground the reason for the application to be checked and killed
  • the time when the application was checked and killed the interval time T (minutes), the number of applications in the interval D (pieces), the name of the application, the basic score F, the application classification, and the killing score (scoring data).
  • the " WeChatTM " application was switched to the background at the time point "2021-04-24 20:40:38", and was killed at the time point "2021-04-24 20:40:38", and then Switch to the front desk at the time point "2021-04-24 20:40:42 " as an example.
  • 40:42" interval application number is 0, then according to the calculation method of the killing score S provided in this case, it can be calculated that the killing score of the " WeChatTM " application is 5.0616 million points.
  • Step S15 when the remaining memory of the electronic device is less than a preset value, the application program is checked and killed according to the evaluation result of each application program, so as to improve the user's experience of keeping alive the application program.
  • priority when checking and killing applications according to the evaluation result of each application program, priority may be given to killing applications with lower checking and killing scores. That is, the higher the killing score, the higher the possibility of manslaughter.
  • a first threshold (for example, 30 points) can also be set, and if the remaining memory of the electronic device is less than the preset value, priority will be given to killing applications whose killing scores are lower than the first threshold.
  • a second threshold such as 80 points may be set, and attention may be paid to the reasons for killing applications whose killing scores exceed the second threshold (for example, the killing of applications whose killing scores exceed the second threshold application optimization, etc.), and execute a set of expert systems in the background to limit the way of killing applications exceeding the second threshold, further improving the actual experience of users.
  • the application killing method provided by the embodiment of the present application can prevent the application from being detected and killed by mistake, improve the accuracy of the application killing, and ensure enough memory to ensure the stable operation of the operating system or the foreground application.
  • FIG. 8 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship among the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), the fifth generation wireless communication system ( 5G, the 5th Generation of wireless communication system), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used 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 or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • 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.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they 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 energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as 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 implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program 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.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "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 called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
  • FIG. 9 is a block diagram of the software structure of the electronic device 100 provided by the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of 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.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), Wrong Kill, etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • Wrong Kill etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the integrated modules of the electronic device 100 are implemented in the form of software function modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above-mentioned embodiments in the present application can also be completed by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium Wherein, when the computer readable instructions are executed by the processor, the steps of the above-mentioned various method embodiments can be realized.
  • the computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes may be in the form of source code, object code, executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random memory access memory (RAM), etc.
  • This embodiment also provides a computer storage medium, wherein computer instructions are stored in the computer storage medium, and when the computer instructions are run on the electronic device, the electronic device is made to perform the above-mentioned related method steps to realize the anti-application in the above-mentioned embodiment Methods.
  • This embodiment also provides a computer program product, which, when running on the electronic device, causes the electronic device to execute the above related steps, so as to implement the method for killing applications in the above embodiment.
  • an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the method for killing applications in the above method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the storage medium includes several instructions for enabling a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Abstract

Embodiments of the present application provide a method for killing an application, and a related device, and relate to the technical field of terminals. The method for killing an application comprises: acquiring, from a use log of an application within a preset period of time, related data of the application, the data comprising the searching and killing time of the application, and the background switching time and foreground switching time of the application. The method for killing an application further comprises: according to the related data, calculating a time interval and an interval application number corresponding to the application; and determining an evaluation result of the application on the basis of the time interval and the interval application number corresponding to each application, and a basic score of the application. The keepalive experience of a user may be effectively improved by using the present embodiments.

Description

杀应用的方法及相关设备Method for killing applications and related equipment
相关申请的交叉引用Cross References to Related Applications
本申请要求在2021-05-21提交中国专利局、申请号为202110558868.3、申请名称为“应用误杀评估方法及相关设备”的中国专利的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent with application number 202110558868.3 and application name "Application Manslaughter Evaluation Method and Related Equipment" filed with China Patent Office on 2021-05-21, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请实施例涉及终端技术领域,尤其涉及一种杀应用的方法及相关设备。The embodiments of the present application relate to the field of terminal technologies, and in particular, to a method for killing applications and related equipment.
背景技术Background technique
受限于安卓底层使用虚拟机进行内存管控,为了保证用户在电子设备(例如,手机)中使用应用程序(简称为“应用”)的实际体验,会将一些重要的进程在电子设备的后台保活。目前的方案是针对不同档次、不同内存大小的电子设备设置后台保活的应用数量以及不同应用的可访问内存大小。例如,对一款高端手机设置的目标为后台平均保活10个应用,并对浏览器设置300M的可访问内存大小等。然后,手机生产商的不同业务域按照这个目标进行产品规划和研发。Limited by the use of a virtual machine at the bottom layer of Android for memory control, in order to ensure the actual experience of users using applications (referred to as "applications") in electronic devices (such as mobile phones), some important processes will be saved in the background of electronic devices. live. The current solution is to set the number of applications kept alive in the background and the accessible memory size of different applications for electronic devices of different grades and different memory sizes. For example, the goal set for a high-end mobile phone is to keep an average of 10 applications alive in the background, and the accessible memory size of the browser is set to 300M. Then, different business domains of mobile phone manufacturers carry out product planning and research and development according to this goal.
但是上述设置过于生硬死板,对负责产品规划的架构师要求极高,需要保证架构师对用户使用体验和内存业务域都十分熟悉后,才能确定产品的内存基线。此外,原有的设计方案与用户的实际体验是割裂的,只能依靠上市后的舆情反馈动态调节产品规划,新的方案只能在下个版本的推送的手机系统上进行修复,对用户实际体验存在滞后性反馈,影响产品的实际体验。However, the above settings are too rigid and rigid, and have extremely high requirements for the architect responsible for product planning. It is necessary to ensure that the architect is very familiar with the user experience and the memory business domain before determining the memory baseline of the product. In addition, the original design scheme is separated from the actual experience of users, and the product planning can only be adjusted dynamically based on public opinion feedback after listing. The new scheme can only be repaired on the next version of the mobile phone system to be pushed. There is lagging feedback, which affects the actual experience of the product.
发明内容Contents of the invention
本申请实施例公开了一种杀应用的方法及相关设备,能及时调节用户使用手机的实际体验,让手机更懂用户。The embodiment of the present application discloses a method for killing applications and related equipment, which can adjust the user's actual experience of using the mobile phone in time, so that the mobile phone can better understand the user.
本申请第一方面公开了一种杀应用的方法,包括:获取预设时间段内的应用程序的使用日志;从所述应用程序的使用日志获取每个应用程序的查杀时间,及根据每个应用程序的查杀时间确定每个应用程序切后台的时间和切前台的时间;根据所确定的每个应用程序切后台的时间和切前台的时间计算每个应用程序对应的时间间隔;确定在所述时间间隔内在前台运行的应用程序的数量;及基于所述每个应用程序对应的时间间隔、在所述时间间隔内在前台运行的应用程序的数量,以及每个应用程序的基础分确定每个应用程序的评估结果。The first aspect of the present application discloses a method for killing applications, including: obtaining the usage logs of the applications within a preset time period; obtaining the killing time of each application from the usage logs of the applications, and The killing time of each application determines the time for each application to switch to the background and the time to switch to the foreground; calculate the corresponding time interval for each application according to the determined time for each application to switch to the background and the time to switch to the foreground; determine The number of applications running in the foreground within the time interval; and determined based on the time interval corresponding to each application, the number of applications running in the foreground within the time interval, and the base score of each application Evaluation results for each application.
采用所述技术方案,引入应用程序的基础分、间隔时间及在所述时间间隔内在前台运行的应用程序的数量三个维度的打点信息,动态评估每个应用程序的误杀情况,贴合 用户的实际使用习惯,提升用户对应用程序的保活体验,尽量减少或避免对应用程序的误杀并可有效确保电子设备具备足够内存以维持前台应用程序的稳定运行。By adopting the technical solution, the three-dimension management information of the basic score of the application program, the interval time and the number of application programs running in the foreground within the time interval are introduced, and the manslaughter situation of each application program is dynamically evaluated, which fits the needs of the user. The actual usage habits can improve the user's experience of keeping alive the application, minimize or avoid the accidental killing of the application and effectively ensure that the electronic device has enough memory to maintain the stable operation of the foreground application.
在一些可选的实施方式中,所述确定每个应用程序的评估结果包括:计算每个应用程序的查杀分值。In some optional implementation manners, the determining the evaluation result of each application program includes: calculating the killing score of each application program.
采用所述技术方案,对应用程序被查杀的情况进行量化,可以提高对应用程序的查杀处理的准确度。By adopting the technical solution, the situation of checking and killing the application program is quantified, which can improve the accuracy of checking and killing the application program.
在一些可选的实施方式中,所述计算每个应用程序的查杀分值包括:基于所述每个应用程序对应的时间间隔获得每个应用程序的第一分值;基于在所述时间间隔内在前台运行的应用程序的数量获得每个应用程序的第二分值;根据S=Y1*Y2*F计算每个应用程序的查杀分值,其中,S代表所述查杀分值;Y1代表所述第一分值;Y2代表所述第二分值;F代表所述基础分。In some optional implementation manners, the calculating the killing score of each application program includes: obtaining the first score value of each application program based on the time interval corresponding to each application program; The number of applications running in the foreground within the interval obtains the second score of each application; calculate the killing score of each application according to S=Y1*Y2*F, where S represents the killing score; Y1 represents the first score; Y2 represents the second score; F represents the base score.
在一些可选的实施方式中,Y1=a1+b1*X+c1*X 2+d1*X 3;其中,a1=206.841793563214;b1=-9.00021943093018;c1=0.134347573391717;d1=-0.000689371112453592;X等于所述时间间隔;Y2=a2+b2*X+c2*X 2+d2*X 3;其中,a2=245.460539460545;b2=-47.6803759965558;c2=3.07527766351345;d2=-0.0655251611134173;X等于所述间隔应用数。 In some optional embodiments, Y1=a1+b1*X+c1*X 2 +d1*X 3 ; wherein, a1=206.841793563214; b1=-9.00021943093018; c1=0.134347573391717; d1=-0.000689371112453592; Y2=a2+b2*X+c2*X 2 +d2*X 3 ; wherein, a2=245.460539460545; b2=-47.6803759965558; c2=3.07527766351345; d2=-0.0655251611134173;
采用所述技术方案,可以准确计算应用程序的查杀分值,从而可以提高对应用程序的查杀处理的准确度。By adopting the technical solution, the checking and killing score of the application program can be accurately calculated, thereby improving the accuracy of checking and killing the application program.
在一些可选的实施方式中,所述方法还包括:根据每个应用程序的查杀分值对应用程序进行排序。In some optional implementation manners, the method further includes: sorting the application programs according to the killing score of each application program.
在一些可选的实施方式中,所述方法还包括:于电子设备的剩余内存小于预设值时根据每个应用程序的评估结果查杀应用程序。In some optional implementation manners, the method further includes: killing the application program according to the evaluation result of each application program when the remaining memory of the electronic device is less than a preset value.
采用所述技术方案,可以根据应用程序的评估结果及时调整应用查杀策略,既可确保对应用程序的查杀优先级,还可进一步确保电子设备具有足够的内存以维持前台应用程序的稳定运行。By adopting the technical solution, the application killing strategy can be adjusted in time according to the evaluation result of the application program, which can not only ensure the priority of checking and killing the application program, but also further ensure that the electronic device has enough memory to maintain the stable operation of the foreground application program .
在一些可选的实施方式中,所述方法还包括:设定第一阈值;及若电子设备的剩余内存小于所述预设值,优先对查杀分值低于所述第一阈值的应用程序进行查杀。In some optional implementation manners, the method further includes: setting a first threshold; and if the remaining memory of the electronic device is less than the preset value, giving priority to the application whose killing score is lower than the first threshold The program performs scanning and killing.
采用所述技术方案,可以提升用户对应用程序的保活体验。By adopting the technical solution, the user's experience of keeping alive the application program can be improved.
在一些可选的实施方式中,所述方法还包括:设置第二阈值;及对查杀分值超过所述第二阈值的应用进行优化。In some optional implementation manners, the method further includes: setting a second threshold; and optimizing applications whose killing scores exceed the second threshold.
采用所述技术方案,可以避免用户常用的应用程序被误杀,进一步提升用户对应用程序的保活体验。By adopting the technical solution, it is possible to prevent the application programs frequently used by users from being accidentally killed, and further improve the user's experience of keeping alive the application programs.
在一些可选的实施方式中,所述方法还包括:响应用户的输入,设置所述预设时间段。采用所述技术方案,可以满足不同用户的需求来提升保活体验。In some optional implementation manners, the method further includes: setting the preset time period in response to user input. By adopting the technical solution, the needs of different users can be met to improve the experience of keeping alive.
在一些可选的实施方式中,所述应用程序的使用日志包括:应用程序后台保活日志和应用程序查杀日志;其中,所述应用程序后台保活日志包括:每个应用程序的应用名、包名、每个应用程序每次切后台的时间和每次切前台的时间;所述应用程序查杀日志包括:每个应用程序的应用名、包名、每次被查杀的查杀时间、查杀原因。In some optional implementation manners, the usage log of the application program includes: an application program background keep-alive log and an application program killing log; wherein, the application program background keep-alive log includes: the application name of each application program , package name, the time each application is switched to the background and the time for each time to switch to the foreground; the application killing log includes: the application name of each application, the package name, the killing Time, killing reasons.
在一些可选的实施方式中,根据每个应用程序的查杀时间所确定的应用程序切后台的时间表示在所述查杀时间之前应用程序最近一次切后台的时间;及根据每个应用程序的查杀时间所确定的应用程序切前台的时间表示在所述查杀时间之后应用程序最近一次切前台的时间。采用所述技术方案,可以根据应用被查杀之前最近一次切后台的时间以及应用被查杀之后最近一次切前台的时间来计算时间间隔,贴合用户最近的使用习惯,提升用户对应用程序的保活体验。In some optional implementation manners, the time when the application program cuts to the background determined according to the killing time of each application program indicates the time when the application program was last switched to the background before the killing time; and according to each application program The time when the application program switches to the foreground determined by the killing time indicates the last time when the application program switches to the foreground after the killing time. By adopting the technical solution, the time interval can be calculated according to the time when the application was last switched to the background before the application was checked and killed and the time when the application was last switched to the foreground after the application was checked and killed, so as to fit the user's recent usage habits and improve the user's awareness of the application. Keep alive experience.
本申请第二方面公开了一种电子设备,包括处理器和存储器;存储器,用于存储指令;处理器,用于调用存储器中的指令,使得电子设备执行所述杀应用的方法。The second aspect of the present application discloses an electronic device, including a processor and a memory; the memory is used to store instructions; and the processor is used to call the instructions in the memory, so that the electronic device executes the method for killing the application.
本申请第三方面公开了一种计算机可读存储介质,计算机可读存储介质存储有至少一个指令,至少一个指令被处理器执行时实现所述杀应用的方法。The third aspect of the present application discloses a computer-readable storage medium, where at least one instruction is stored in the computer-readable storage medium, and the method for killing an application is implemented when the at least one instruction is executed by a processor.
第二方面至第三方面所带来的技术效果可参见上述方法部分各涉及的方法相关的描述,此处不再赘述。For the technical effects brought about by the second aspect to the third aspect, please refer to the descriptions related to the methods involved in the above methods, and details will not be repeated here.
附图说明Description of drawings
图1是本申请实施例提供的一种杀应用的方法的简要流程示意图。FIG. 1 is a schematic flowchart of a method for killing an application provided by an embodiment of the present application.
图2是本申请实施例提供的一种杀应用的方法的详细流程图。FIG. 2 is a detailed flow chart of a method for killing an application provided by an embodiment of the present application.
图3对根据应用程序的查杀时间确定应用程序切后台的时间和切前台的时间进行举例说明。FIG. 3 illustrates an example of determining the time when the application program switches to the background and the time when the application program switches to the foreground according to the scanning and killing time of the application program.
图4对通过设置多个时间间隔分别对应不同分值在XOY坐标系中进行描点并作趋势拟合进行举例说明。Figure 4 illustrates by setting multiple time intervals corresponding to different scores to plot points in the XOY coordinate system and perform trend fitting.
图5对通过设置多个间隔应用数分别对应不同分值在XOY坐标系中进行描点并作趋势拟合进行举例说明。Fig. 5 illustrates by setting multiple intervals and applying numbers corresponding to different scores to plot points in the XOY coordinate system and perform trend fitting.
图6对不同应用设定基础分进行举例说明。Figure 6 illustrates the setting of base points for different applications.
图7举例说明根据查杀分值对应用程序进行排序。Figure 7 illustrates the sorting of applications according to the killing score.
图8是本申请实施例提供的电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图9是本申请实施例提供的电子设备的软件结构框图。FIG. 9 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
需要说明的是,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或多于两个。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。本申请的说明书和权利要求书及附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不是用于描述特定的顺序或先后次序。It should be noted that in the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there can be three types of relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B Can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the drawings are used to distinguish similar objects, not to Describe a specific order or sequence.
安卓(Android)应用的查杀机制包括:首先将应用进行分级,分为foreground(前台应用)、visible(可见应用)、secondary(次要服务)、hidden(后台应用)等。根据不同层级的重要性,进行应用的查杀管控。其中,Low Memory Kill程序对每个应用的状态级别设 定对应的数值。当剩余内存不足时,Low Memory Kill程序就会杀掉对应状态级别的应用,以释放内存。若杀掉应用后剩余内存仍然不足,便会继续杀掉上一个状态级别的应用,以此类推。一直杀到前台应用,这便会造成正运行的应用或游戏闪退,严重影响用户体验。The killing mechanism of the Android (Android) application includes: first, the application is classified into foreground (foreground application), visible (visible application), secondary (secondary service), hidden (background application) and so on. According to the importance of different levels, application killing control is carried out. Wherein, the Low Memory Kill program sets the corresponding numerical value to the status level of each application. When the remaining memory is insufficient, the Low Memory Kill program will kill the application at the corresponding state level to release the memory. If the remaining memory is still insufficient after killing the application, it will continue to kill the application at the previous state level, and so on. Killing all the way to the foreground application will cause the running application or game to crash and seriously affect the user experience.
图1是本申请实施例提供的一种应用误杀评估(Wrong kill评估)方法的简要流程示意图。参阅图1所示,在用户使用手机过程中,通过本申请实施例提供的杀应用的方法收集所查杀应用的各种原因,采用杀应用的方法对应用程序误杀进行评估,并根据评估结果动态修改查杀策略以提升用户保活体验。具体细节请参图2的描述。FIG. 1 is a schematic flow chart of a method for Wrong kill assessment provided by an embodiment of the present application. Referring to Fig. 1, in the process of using the mobile phone by the user, the various reasons for the killing of the application are collected through the method of killing the application provided by the embodiment of the present application, and the method of killing the application is used to evaluate the accidental killing of the application, and according to the evaluation result Dynamically modify the killing strategy to improve the user experience of keeping alive. Please refer to the description of FIG. 2 for details.
图2是本申请实施例提供的一种应用误杀评估(Wrong kill评估)方法的详细流程图。本申请实施例提供的杀应用的方法可以应用于电子设备。所述电子设备可以为手机、平板电脑等终端设备。利用本申请提供的杀应用的方法,提高了用户日常使用应用的优先级,使得用户重点关注的应用不会被查杀,提升用户保活体验。FIG. 2 is a detailed flow chart of a method for applying wrong kill assessment (Wrong kill assessment) provided by an embodiment of the present application. The method for killing applications provided in the embodiments of the present application may be applied to electronic devices. The electronic device may be a terminal device such as a mobile phone or a tablet computer. The method for killing applications provided by this application improves the priority of applications used by users in daily use, so that the applications that users focus on will not be checked and killed, and the user experience of keeping alive is improved.
具体地,杀应用的方法包括:Specifically, the methods of killing applications include:
步骤S11,获取预设时间段内的应用程序的使用日志。Step S11 , acquiring usage logs of application programs within a preset time period.
在本申请一个实施例中,所述预设时间段可以是指用户最近1天或几天或一周或一个月等不同时长的时间段。在一个实施例中,可以响应用户的输入来设置所述预设时间段。In an embodiment of the present application, the preset time period may refer to a time period of different durations such as the user's last day or several days or a week or a month. In one embodiment, the preset time period may be set in response to user input.
在本申请一个实施例中,所述应用程序的使用日志包括应用程序后台保活日志和应用程序查杀日志。In an embodiment of the present application, the usage log of the application program includes an application program background keep-alive log and an application program killing log.
所述应用程序后台保活日志包括,但不限于,N个应用程序中的每个应用程序的应用名、包名(package_name)、每个应用程序每次切后台的时间(也即每次从前台切至后台的时间)和每次切前台的时间(也即每次启动应用程序的时间)。N为大于或等于1的正整数。The application program background keep-alive log includes, but is not limited to, the application name of each application program in the N application programs, the package name (package_name), and the time each application program switches to the background each time (that is, each time it was previously The time when the platform is switched to the background) and the time when the foreground is switched each time (that is, the time when the application is started each time). N is a positive integer greater than or equal to 1.
所述应用程序查杀日志包括,但不限于,每个应用程序的应用名、包名、每次被查杀的查杀时间、查杀原因。The application program killing log includes, but is not limited to, the application name and package name of each application program, the killing time and killing reason of each application program.
步骤S12,从所述应用程序的使用日志获取每个应用程序的查杀时间,及根据每个应用程序的查杀时间确定每个应用程序切后台的时间和切前台的时间。Step S12, obtaining the killing time of each application program from the usage log of the application program, and determining the time when each application program switches to the background and switches to the foreground according to the killing time of each application.
在一个实施例中,根据每个应用程序的查杀时间所确定的应用程序切后台的时间表示在所述查杀时间之前应用程序最近一次切后台的时间。在一个实施例中,根据每个应用程序的查杀时间所确定的应用程序切前台的时间表示在所述查杀时间之后应用程序最近一次切前台的时间。In one embodiment, the time when the application program cuts to the background determined according to the killing time of each application program indicates the last time when the application program cuts to the background before the killing time. In one embodiment, the time when the application program switches to the foreground determined according to the killing time of each application program indicates the latest time when the application program switches to the foreground after the killing time.
在一个实施例中,可以从所述应用程序查杀日志获取每个应用程序的查杀时间,然后根据查杀时间从所述应用程序后台保活日志确定每个应用程序切后台的时间和切前台的时间。In one embodiment, the killing time of each application can be obtained from the killing log of the application, and then the time and time for switching the background of each application are determined from the keeping alive log of the background of the application according to the killing time. Front desk time.
举例而言,参阅图3所示,假设从所述应用程序查杀日志获取到A应用的查杀时间为T2,则从所述应用程序后台保活日志根据查杀时间T2可确定在查杀时间T2之前,A应用最近一次切后台的时间为T1,以及在查杀时间T2之后,A应用最近一次切前台的时间为T3。For example, referring to FIG. 3 , assuming that the killing time of the application A obtained from the killing log of the application program is T2, then it can be determined from the background keep-alive log of the application program according to the killing time T2 that the killing time is T2. Before the time T2, the last time when the application A switches to the background is T1, and after the killing time T2, the last time when the A application switches to the foreground is T3.
步骤S13,根据所确定的每个应用程序切后台的时间和切前台的时间计算每个应用程序对应的时间间隔T;确定在所述时间间隔T内每个应用程序对应的间隔应用数D。Step S13, calculate the time interval T corresponding to each application program according to the determined time when each application program switches to the background and switches to the foreground; determine the interval application number D corresponding to each application program within the time interval T.
本实施例中,每个应用程序对应的时间间隔T等于所确定的每个应用程序切前台的时间与切后台的时间之差。In this embodiment, the time interval T corresponding to each application program is equal to the determined difference between the time when each application program switches to the foreground and the time when it switches to the background.
在一个实施例中,在所述时间间隔T内每个应用程序对应的间隔应用数D表示在所述时间间隔T内,切到前台的应用程序的数目(也即在所述时间间隔T内,电子设备所启动的应用程序的数量)。在一个实施例中,可以根据所述时间间隔T从所述应用程序后台保活日志获取每个应用程序对应的间隔应用数D。In one embodiment, the interval application number D corresponding to each application program in the time interval T indicates the number of application programs switched to the foreground within the time interval T (that is, in the time interval T , the number of applications launched by the electronic device). In an embodiment, according to the time interval T, the interval application number D corresponding to each application program may be obtained from the application program background keep-alive log.
举例而言,仍然参阅图3所示,假设计算得到A应用对应的时间间隔T=T3-T1;在所述时间间隔T3-T1内,有两个应用即B应用和C应用分别切到了前台,因此,A应用对应的间隔应用数D等于2。For example, still referring to FIG. 3 , suppose that the calculated time interval T=T3-T1 corresponding to application A; within the time interval T3-T1, two applications, application B and application C, are switched to the foreground respectively , therefore, the interval application number D corresponding to the A application is equal to 2.
步骤S14,基于每个应用程序对应的时间间隔T、间隔应用数D,以及每个应用程序的基础分F确定每个应用程序的评估结果。Step S14, determine the evaluation result of each application program based on the time interval T corresponding to each application program, the number of applications D in the interval, and the basic score F of each application program.
在本实施例中,所述确定每个应用程序的评估结果包括:计算每个应用程序的查杀分值S。In this embodiment, the determining the evaluation result of each application program includes: calculating the killing score S of each application program.
本实施例中,所述计算每个应用程序的查杀分值S包括:基于每个应用程序对应的时间间隔T获得每个应用程序的第一分值Y1;基于每个应用程序对应的间隔应用数D获得每个应用程序的第二分值Y2;及根据公式S=Y1*Y2*F计算每个应用程序的查杀分值S。In this embodiment, the calculation of the killing score S of each application includes: obtaining the first score Y1 of each application based on the time interval T corresponding to each application; The number of applications D obtains the second score Y2 of each application; and calculates the killing score S of each application according to the formula S=Y1*Y2*F.
在一个实施例中,Y1=a1+b1*X+c1*X 2+d1*X 3;其中,X=T;a1=206.841793563214;b1=-9.00021943093018;c1=0.134347573391717;d1=-0.000689371112453592。 In one embodiment, Y1=a1+b1*X+c1*X 2 +d1*X 3 ; wherein, X=T; a1=206.841793563214; b1=-9.00021943093018; c1=0.134347573391717; d1=-0.000689371112453592.
在一个实施例中,Y2=a2+b2*X+c2*X 2+d2*X 3;其中X=D;a2=245.460539460545;b2=-47.6803759965558;c2=3.07527766351345;d2=-0.0655251611134173。 In one embodiment, Y2=a2+b2*X+c2*X 2 +d2*X 3 ; where X=D; a2=245.460539460545; b2=-47.6803759965558; c2=3.07527766351345; d2=-0.0655251611134173.
在一个实施例中,可以通过设置多个时间间隔T分别对应不同分值,将所述多个时间间隔T作为XOY坐标系中的横坐标,以及将所述多个时间间隔T分别对应的分值作为XOY坐标系中的纵坐标进行描点,并将这些点连成曲线作趋势拟合来获得所述曲线函数Y1。In one embodiment, multiple time intervals T can be set to correspond to different scores, the multiple time intervals T can be used as the abscissa in the XOY coordinate system, and the scores corresponding to the multiple time intervals T can be Values are plotted as ordinates in the XOY coordinate system, and these points are connected into a curve for trend fitting to obtain the curve function Y1.
在本实施例中,在对时间间隔T对应的分值进行设定时,可以预先设定时间间隔T的基准值,并设定基准值对应的分值为100分,小于该基准值用户感受度增强,分值增高,大于基准值用户感受度减弱,分值减低。此外,还可以对时间间隔T的边界值进行设置,当时间间隔T的值大于所设置的边界值时,用户无不良感受,设定时间间隔T大于所设置的边界值时对应的分值为0。在一个实施例中,设置时间间隔T的基准值为15分钟,并设定时间间隔T的边界值为60分钟。In this embodiment, when setting the score value corresponding to the time interval T, the reference value of the time interval T can be set in advance, and the score value corresponding to the reference value is set to 100 points, which is less than the reference value. If the degree is enhanced, the score is increased, and if the user's sensitivity is greater than the reference value, the user's sensitivity is weakened, and the score is reduced. In addition, the boundary value of the time interval T can also be set. When the value of the time interval T is greater than the set boundary value, the user has no bad feeling. When the time interval T is greater than the set boundary value, the corresponding score is 0. In one embodiment, the base value of the time interval T is set to 15 minutes, and the boundary value of the time interval T is set to 60 minutes.
例如,参阅图4所示,设置时间间隔T的基准值为15分钟,对应分值100分,以及设定时间间隔T的边界值为60分钟;设定时间间隔5分钟对应分值160;设置时间间隔10分钟对应分值130等等,将所设定的多个时间间隔T及分别对应的分值作为坐标点在 XOY坐标系中描点,并将所描的所有点连成曲线作趋势拟合获得曲线函数Y1。For example, referring to shown in Figure 4, the reference value of setting time interval T is 15 minutes, and the corresponding score is 100 minutes, and the boundary value of setting time interval T is 60 minutes; Setting time interval 5 minutes corresponds to score 160; Setting A time interval of 10 minutes corresponds to a score of 130, etc., and the multiple set time intervals T and the corresponding scores are used as coordinate points to draw points in the XOY coordinate system, and all the points drawn are connected into a curve for trend simulation Combined to obtain the curve function Y1.
在本实施例中,所获得的曲线函数Y1=a1+b1*X+c1*X 2+d1*X 3与实际描点获得的曲线之间的拟合度R 2可达到0.999111278966183。 In this embodiment, the fitting degree R 2 between the obtained curve function Y1=a1+b1*X+c1*X 2 +d1*X 3 and the curve obtained by actually plotting points can reach 0.999111278966183.
类似地,可以通过设置多个间隔应用数D分别对应不同分值,将所述多个间隔应用数D作为XOY坐标系中的横坐标,以及将所述多个间隔应用数D分别对应的分值作为XOY坐标系中的纵坐标进行描点,并将这些点连成曲线作趋势拟合来获得所述曲线函数Y2。Similarly, a plurality of interval application numbers D can be set to correspond to different scores, and the plurality of interval application numbers D can be used as the abscissa in the XOY coordinate system, and the multiple interval application numbers D can be used to correspond to the scores respectively. Values are plotted as ordinates in the XOY coordinate system, and these points are connected into a curve for trend fitting to obtain the curve function Y2.
在本实施例中,在对间隔应用数D对应的分值进行设定时,可以预先设定间隔应用数D的基准值,并设定基准值对应的分值为100分,小于该基准值用户感受度增强,分值增高,大于基准值用户感受度减弱,分值减低。此外,还可以对间隔应用数D的边界值进行设置,当间隔应用数D的值大于所设置的边界值时,用户无不良感受,设定间隔应用数D大于所设置的边界值时对应的分值为0。在一个实施例中,间隔应用数D的基准值为4个,同时设定间隔应用数D的边界值为13个。In this embodiment, when setting the score value corresponding to the interval application number D, the reference value of the interval application number D can be preset, and the score value corresponding to the reference value is set to 100 points, which is less than the reference value The higher the user's sensitivity, the higher the score, and the weaker the user's sensitivity, the lower the score. In addition, the boundary value of the interval application number D can also be set. When the value of the interval application number D is greater than the set boundary value, the user has no bad experience. When the interval application number D is greater than the set boundary value, the corresponding The score is 0. In one embodiment, the base value of the interval application number D is 4, and the boundary value of the interval application number D is set to 13.
例如,参阅图5所示,设置间隔应用数D的基准值为4个,对应分值100分,以及设定间隔应用数D的边界值为13个;设置间隔应用数D为2个时对应分值160;设置间隔应用数D为3个时对应分值130等,将所述多个间隔应用数D及分别对应的分值作为坐标点在XOY坐标系中描点,并将所描的所有点连成曲线作趋势拟合获得曲线函数Y2。For example, as shown in Figure 5, the reference value for setting the number of interval applications D is 4, the corresponding score is 100 points, and the boundary value for setting the number of interval applications D is 13; when the number of interval applications D is set to 2, it corresponds to The score value is 160; when the interval application number D is set to 3, the corresponding score value is 130, etc., and the multiple interval application numbers D and the corresponding scores are used as coordinate points in the XOY coordinate system to describe points, and all the described Connect the points into a curve for trend fitting to obtain the curve function Y2.
在本实施例中,所获得的曲线函数Y2=a2+b2*X+c2*X 2+d2*X 3与实际描点获得的曲线之间的拟合度R 2可达到0.999165439224973。 In this embodiment, the fitting degree R 2 between the obtained curve function Y2=a2+b2*X+c2*X 2 +d2*X 3 and the curve obtained by actually plotting points can reach 0.999165439224973.
在本实施例中,可以预先设置每个应用程序的基础分F。在一个实施例中,可以根据用户使用习惯对每个应用程序的基础分F进行打分。In this embodiment, the basic score F of each application program can be set in advance. In one embodiment, the basic score F of each application program can be scored according to the user's usage habits.
在一个实施例中,可以创建一个表格,利用该表格记录每个应用程序的基础分F。举例而言,参阅图6所示,所述表格包括多个栏位,所述多个栏位包括,但不限于,每个应用的应用名、基础分F、每个应用的类别(即分类)、包名等。In one embodiment, a table can be created that records the base score for each application. For example, referring to FIG. 6 , the form includes a plurality of fields, and the plurality of fields include, but are not limited to, the application name of each application, the basic score F, the category of each application (i.e. classification ), package name, etc.
例如参阅图6所示,根据用户使用习惯设置“王者荣耀”应用的基础分F为100分;设置“QQ”应用的基础分F为80分。For example, as shown in Figure 6, the basic score F of the "Glory of the King" application is set to 100 points according to the user's usage habits; the basic score F of the "QQ" application is set to 80 points.
在一个实施例中,还可以根据每个应用程序的查杀分值对应用程序进行排序。In one embodiment, the application programs can also be sorted according to the killing score of each application program.
在一个实施例中,可以创建一个排名表来记录应用程序每次被查杀时的打分排名。In one embodiment, a ranking table can be created to record the scoring ranking of the application program every time it is checked and killed.
举例而言,参阅图8所示,排名表包括多个栏位,如电子设备的序列号(SN)、应用程序的包名、应用程序切后台时间、切前台时间、应用被查杀原因、应用被查杀时间、间隔时间T(分钟)、间隔应用数D(个)、应用名、基础分F、应用分类、查杀分值(打分数据)。根据图8所示,以“微信 TM”应用在时间点“2021-04-24 20:40:38”切后台,并在时间点“2021-04-24 20:40:38”被杀,随后在时间点“2021-04-24 20:40:42”切前台为例,若“微信 TM”应用在时间点“2021-04-24 20:40:38”至“2021-04-24 20:40:42”期间的间隔应用数为0,则根据本案提供的查杀分值S计算方法可以计算得出“微信 TM”应用的查杀分值为506.16万分。 For example, as shown in FIG. 8, the ranking table includes multiple fields, such as the serial number (SN) of the electronic device, the package name of the application, the time when the application was switched to the background, the time when the application was switched to the foreground, the reason for the application to be checked and killed, The time when the application was checked and killed, the interval time T (minutes), the number of applications in the interval D (pieces), the name of the application, the basic score F, the application classification, and the killing score (scoring data). As shown in Figure 8, the " WeChatTM " application was switched to the background at the time point "2021-04-24 20:40:38", and was killed at the time point "2021-04-24 20:40:38", and then Switch to the front desk at the time point "2021-04-24 20:40:42 " as an example. 40:42" interval application number is 0, then according to the calculation method of the killing score S provided in this case, it can be calculated that the killing score of the " WeChatTM " application is 5.0616 million points.
步骤S15,于电子设备的剩余内存小于预设值时,根据每个应用程序的评估结果查杀应用程序,以提升用户对应用的保活体验。Step S15 , when the remaining memory of the electronic device is less than a preset value, the application program is checked and killed according to the evaluation result of each application program, so as to improve the user's experience of keeping alive the application program.
在一个实施例中,在根据每个应用程序的评估结果查杀应用程序时,可以针对查杀分值越低的应用程序,优先查杀。即查杀分值越高,误杀的可能性越高。In one embodiment, when checking and killing applications according to the evaluation result of each application program, priority may be given to killing applications with lower checking and killing scores. That is, the higher the killing score, the higher the possibility of manslaughter.
在一个实施例中,也可以设定一个第一阈值(例如30分),若电子设备的剩余内存小于预设值,优先对查杀分值低于第一阈值的应用程序进行查杀。In one embodiment, a first threshold (for example, 30 points) can also be set, and if the remaining memory of the electronic device is less than the preset value, priority will be given to killing applications whose killing scores are lower than the first threshold.
在本实施例中,还可以在后台动态调度分析电子设备在预设时间段内所查杀的应用的查杀原因。具体地,可以设置一个第二阈值例如80分,关注查杀分值超过第二阈值的被查杀的应用的查杀原因(例如,可以对查杀分值超过第二阈值的被查杀的应用进行优化等),并在后台执行一套专家系统对于超过第二阈值的应用的查杀方式作出限制,进一步提升用户的实际体验。通过本申请实施例提供的杀应用的方法,可避免应用被误查杀,提高应用查杀的精准度,并确保足够的内存以保障操作系统或前台应用的稳定运行。In this embodiment, it is also possible to dynamically schedule and analyze the killing reasons of the applications killed by the electronic device within a preset time period in the background. Specifically, a second threshold such as 80 points may be set, and attention may be paid to the reasons for killing applications whose killing scores exceed the second threshold (for example, the killing of applications whose killing scores exceed the second threshold application optimization, etc.), and execute a set of expert systems in the background to limit the way of killing applications exceeding the second threshold, further improving the actual experience of users. The application killing method provided by the embodiment of the present application can prevent the application from being detected and killed by mistake, improve the accuracy of the application killing, and ensure enough memory to ensure the stable operation of the operating system or the foreground application.
图8是本申请实施例提供的电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。FIG. 8 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment 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 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Wherein, the controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。所述存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用所述指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S) 接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。所述总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。所述接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明, 并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship among the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent of the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无 线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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),第五代无线通信系统(5G,the 5th Generation of wireless communication system),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), the fifth generation wireless communication system ( 5G, the 5th Generation of wireless communication system), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used 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 or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一 些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may 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. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they 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 energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as 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 implement a data storage function. Such as saving music, video and other files in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer-executable program codes including instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 . The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program 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.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the receiver 170B can be placed close to the human ear to receive the voice.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of 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 pressure according to the change in capacitance. When a touch operation acts on 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 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手 持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "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 called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N 个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
图9是本申请实施例提供的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。FIG. 9 is a block diagram of the software structure of the electronic device 100 provided by the embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom. The application layer can consist of a series of application packages.
如图9所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in FIG. 9, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图9所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 9, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of 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.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)、Wrong Kill等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), Wrong Kill, etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
所述电子设备100集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,所述计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM)、随机存取存储器(RAM)等。If the integrated modules of the electronic device 100 are implemented in the form of software function modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above-mentioned embodiments in the present application can also be completed by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium Wherein, when the computer readable instructions are executed by the processor, the steps of the above-mentioned various method embodiments can be realized. Wherein, the computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random memory access memory (RAM), etc.
本实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机指令,当所述计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的杀应用的方法。This embodiment also provides a computer storage medium, wherein computer instructions are stored in the computer storage medium, and when the computer instructions are run on the electronic device, the electronic device is made to perform the above-mentioned related method steps to realize the anti-application in the above-mentioned embodiment Methods.
本实施例还提供了一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得电子设备执行上述相关步骤,以实现上述实施例中的杀应用的方法。This embodiment also provides a computer program product, which, when running on the electronic device, causes the electronic device to execute the above related steps, so as to implement the method for killing applications in the above embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,所述装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的杀应用的方法。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the method for killing applications in the above method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将 上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应所述理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者所述技术方案的全部或部分可以以软件产品的形式体现出来,所述软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or part of the contribution to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the software products are stored in a The storage medium includes several instructions for enabling a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the protection scope of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application should be covered within the protection scope of the application . Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (12)

  1. 一种杀应用的方法,其特征在于,所述方法包括:A method for killing applications, characterized in that the method comprises:
    在第一时间点将第一应用切到后台;Switching the first application to the background at the first point in time;
    在所述第一时间点之后,将第一数量的其他应用先后切到前台;在所述第一数量的其他应用先后切到前台,且所述第一应用被杀后,在第二时间点将所述第一应用切到前台,其中,所述第一时间点与所述第二时间点之间的时间段为第一间隔时间,在所述第一间隔时间内,所述第一应用未在前台运行;After the first time point, successively switch a first number of other applications to the foreground; after the first number of other applications are successively switched to the foreground, and the first application is killed, at a second time point switching the first application to the foreground, wherein the time period between the first time point and the second time point is a first interval time, and within the first interval time, the first application not running in the foreground;
    在第三时间点将所述第一应用切到后台;Switching the first application to the background at a third time point;
    从所述第三时间点起,在所述第一间隔时间的时长内,将所述第一数量的其他应用先后切到前台;Starting from the third time point, within the duration of the first interval time, switching the first number of other applications to the foreground successively;
    基于所述第一应用在所述第一间隔时间内被杀,从所述第三时间点起,在所述第一间隔时间的时长内,杀掉所述第一应用;Based on the fact that the first application is killed within the first interval, from the third time point, within the duration of the first interval, kill the first application;
    在第四时间点将所述第一应用切到后台;Switching the first application to the background at a fourth time point;
    在所述第四时间点之后,将第二数量的其他应用先后切到前台,所述第一数量大于所述第二数量;After the fourth time point, successively switching a second number of other applications to the foreground, the first number being greater than the second number;
    在所述第二数量的其他应用先后切到前台,且所述第一应用被杀后,在第五时间点将所述第一应用切到前台,其中,所述第四时间点与所述第五时间点之间的时间段为第二间隔时间,在所述第二间隔时间内,所述第一应用未在前台运行;After the second number of other applications successively switch to the foreground and the first application is killed, switch the first application to the foreground at a fifth time point, wherein the fourth time point is the same as the The time period between the fifth time points is a second interval time, and within the second interval time, the first application is not running in the foreground;
    在第六时间点将所述第一应用切到后台;Switching the first application to the background at the sixth time point;
    从所述第六时间点起,在所述第二间隔时间的时长内,将所述第二数量的其他应用先后切到前台;From the sixth time point, switch the second number of other applications to the foreground successively within the duration of the second interval time;
    基于所述第一应用在所述第二间隔时间内被杀,从所述第六时间点起,在所述第二间隔时间的时长内,杀掉所述第二数量的其他应用中在后台运行的至少一个应用,不杀所述第一应用。Based on the fact that the first application is killed within the second interval, from the sixth time point, within the duration of the second interval, kill the second number of other applications in the background Run at least one application without killing the first application.
  2. 如权利要求1所述的方法,其特征在于,所述第一应用从所述第三时间点起,在所述第一间隔时间的时长内被杀,还基于所述第一数量大于预设数量。The method according to claim 1, wherein the first application is killed within the first interval from the third time point, based on the fact that the first number is greater than a preset quantity.
  3. 如权利要求1所述的方法,其特征在于,从所述第六时间点起,在所述第二间隔时间的时长内,杀掉所述第二数量的应用中在后台运行的至少一个应用,不杀所述第一应用,还基于所述第二数量小于所述预设数量。The method according to claim 1, characterized in that, from the sixth time point, within the duration of the second interval time, at least one application running in the background among the second number of applications is killed , not killing the first application, based on the fact that the second number is smaller than the preset number.
  4. 如权利要求1所述的方法,其特征在于,所述第一间隔时间小于预设时长。The method according to claim 1, wherein the first interval is shorter than a preset duration.
  5. 如权利要求1所述的方法,其特征在于,所述基于所述第一应用在所述第一间隔时间内被杀,从所述第三时间点起,在所述第一间隔时间的时长内,杀掉所述第一应用,包括:The method according to claim 1, wherein, based on the first application being killed within the first interval, starting from the third time point, the duration of the first interval Inside, kill the first app, including:
    基于所述第一应用在所述第一间隔时间内被杀,计算所述第一应用的第一查杀分值;calculating a first killing score of the first application based on the first application being killed within the first interval;
    基于所述第一查杀分值低于第一阈值,从所述第三时间点起,在所述第一间隔时间的时长内,杀掉所述第一应用。Based on the fact that the first killing score is lower than the first threshold, the first application is killed within the first interval from the third time point.
  6. 如权利要求5所述的方法,其特征在于,所述计算所述第一应用的第一查杀分值, 包括:The method according to claim 5, wherein the calculating the first killing score of the first application comprises:
    基于所述第一间隔时间获得所述第一应用的第一分值;obtaining a first score for the first application based on the first interval;
    基于在所述第一间隔时间内切到前台的应用的数量获得所述第一应用的第二分值;及obtaining a second score for the first application based on a number of applications switched to the foreground within the first interval; and
    根据所述第一分值和所述第二分值计算所述第一应用的第一查杀分值。Calculating a first killing score of the first application according to the first score and the second score.
  7. 如权利要求6所述的方法,其特征在于,所述根据所述第一分值和所述第二分值计算所述第一应用的查杀分值,包括:The method according to claim 6, wherein the calculating the killing score of the first application according to the first score and the second score comprises:
    根据S=Y1*Y2*F计算所述第一应用的第一查杀分值,其中,S代表所述第一查杀分值;Y1代表所述第一分值;Y2代表所述第二分值;F代表基础分。Calculate the first killing score of the first application according to S=Y1*Y2*F, wherein S represents the first killing score; Y1 represents the first score; Y2 represents the second Score; F stands for basic score.
  8. 如权利要求7所述的方法,其特征在于,Y1=a1+b1*T+c1*T 2+d1*T 3;其中,a1=206.841793563214;b1=-9.00021943093018;c1=0.134347573391717;d1=-0.000689371112453592;T等于所述第一间隔时间的时长,T的取值范围是(0,60],单位为分钟; The method according to claim 7, wherein Y1=a1+b1*T+c1*T 2 +d1*T 3 ; wherein, a1=206.841793563214; b1=-9.00021943093018; c1=0.134347573391717; d1=-0.000689371112453592 ; T is equal to the duration of the first interval, and the value range of T is (0,60], the unit is minute;
    Y2=a2+b2*X+c2*X 2+d2*X 3;其中,a2=245.460539460545;b2=-47.6803759965558;c2=3.07527766351345;d2=-0.0655251611134173;X等于在所述第一间隔时间内切到前台的应用的数量,X的取值范围是[0,13]。 Y2=a2+b2*X+c2*X 2 +d2*X 3 ; wherein, a2=245.460539460545; b2=-47.6803759965558; c2=3.07527766351345; d2=-0.0655251611134173; The number of applications in the foreground, the value range of X is [0,13].
  9. 如权利要求1所述的方法,其特征在于,所述基于所述第一应用在所述第二间隔时间内被杀,从所述第六时间点起,在所述第二间隔时间的时长内,杀掉所述两个其他应用中的至少一个,不杀所述第一应用,包括:The method according to claim 1, wherein, based on the first application being killed within the second interval, starting from the sixth time point, the duration of the second interval within, killing at least one of the two other applications without killing the first application, including:
    基于所述第一应用在所述第二间隔时间内被杀,计算所述第一应用的第二查杀分值;calculating a second killing score of the first application based on the first application being killed within the second interval;
    基于所述第二查杀分值超过第二阈值,从所述第六时间点起,在所述第二间隔时间的时长内,杀掉所述两个其他应用中的至少一个,不杀所述第一应用。Based on the fact that the second killing score exceeds the second threshold, from the sixth time point, within the duration of the second interval, kill at least one of the two other applications, and do not kill all other applications. Describe the first application.
  10. 如权利要求1-9任一项所述的方法,其特征在于,所述基于所述第一应用在所述第一间隔时间内被杀,从所述第三时间点起,在所述第一间隔时间的时长内,杀掉所述第一应用,包括:The method according to any one of claims 1-9, wherein, based on the first application being killed within the first interval, starting from the third time point, at the second During an interval of time, killing the first application includes:
    基于所述第一应用在所述第一间隔时间内被杀,从所述第三时间点起,在所述第一间隔时间的时长内,确定电子设备的剩余内存小于预设值,杀掉所述第一应用。Based on the fact that the first application is killed within the first interval, from the third time point, within the duration of the first interval, it is determined that the remaining memory of the electronic device is less than a preset value, and kill the first application.
  11. 一种电子设备,其特征在于,包括处理器和存储器;所述存储器,用于存储指令;所述处理器,用于调用所述存储器中的指令,使得所述电子设备执行如权利要求1至10中任一项所述的杀应用的方法。An electronic device, characterized in that it includes a processor and a memory; the memory is used to store instructions; the processor is used to call the instructions in the memory, so that the electronic device performs as claimed in claims 1 to The method for killing applications described in any one of 10.
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有至少一个指令,所述至少一个指令被处理器执行时实现如权利要求1至10中任一项所述的杀应用的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the killing device according to any one of claims 1 to 10 is implemented. Applied method.
PCT/CN2022/088220 2021-05-21 2022-04-21 Method for killing application, and related device WO2022242412A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110558868.3A CN113407300B (en) 2021-05-21 2021-05-21 Application false killing evaluation method and related equipment
CN202110558868.3 2021-05-21

Publications (1)

Publication Number Publication Date
WO2022242412A1 true WO2022242412A1 (en) 2022-11-24

Family

ID=77679259

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/088220 WO2022242412A1 (en) 2021-05-21 2022-04-21 Method for killing application, and related device

Country Status (2)

Country Link
CN (2) CN115373957A (en)
WO (1) WO2022242412A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115373957A (en) * 2021-05-21 2022-11-22 荣耀终端有限公司 Application killing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2538327A1 (en) * 2011-06-16 2012-12-26 Samsung Electronics Co., Ltd. Adaptive Termination and Pre-Launching Policy for Improving Application Startup Time
CN107908273A (en) * 2017-11-14 2018-04-13 广东欧珀移动通信有限公司 application management method, device, storage medium and electronic equipment
CN109976825A (en) * 2014-11-20 2019-07-05 华为终端有限公司 A kind of method and mobile terminal of management application
CN111611020A (en) * 2020-04-14 2020-09-01 上海卓易科技股份有限公司 Application process searching and killing method and device for application program
CN113407300A (en) * 2021-05-21 2021-09-17 荣耀终端有限公司 Application false killing evaluation method and related equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3125503A1 (en) * 2015-07-29 2017-02-01 Telefonica Digital España, S.L.U. A method, a system and computer program products for keeping an end-to-end data connection active
CN105653323B (en) * 2015-12-28 2019-07-02 小米科技有限责任公司 Application management method and device
CN108363529A (en) * 2018-03-20 2018-08-03 青岛海信移动通信技术股份有限公司 The determination method and device of the front stage operation time of Application Program Interface
CN110597451B (en) * 2018-06-12 2021-02-23 华为技术有限公司 Method for realizing virtualized cache and physical machine
CN109388947B (en) * 2018-10-30 2023-06-20 浙江解纷链数字科技有限公司 Background management method, device and computer readable storage medium
CN110221921A (en) * 2019-06-13 2019-09-10 深圳Tcl新技术有限公司 EMS memory management process, terminal and computer readable storage medium
CN111596971B (en) * 2020-05-14 2023-07-14 Oppo广东移动通信有限公司 Application cleaning method and device, storage medium and electronic equipment
CN112307465A (en) * 2020-10-30 2021-02-02 上海中通吉网络技术有限公司 Keep-alive pull-alive method, storage medium and equipment for coping with application program being checked and killed

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2538327A1 (en) * 2011-06-16 2012-12-26 Samsung Electronics Co., Ltd. Adaptive Termination and Pre-Launching Policy for Improving Application Startup Time
CN109976825A (en) * 2014-11-20 2019-07-05 华为终端有限公司 A kind of method and mobile terminal of management application
CN107908273A (en) * 2017-11-14 2018-04-13 广东欧珀移动通信有限公司 application management method, device, storage medium and electronic equipment
CN111611020A (en) * 2020-04-14 2020-09-01 上海卓易科技股份有限公司 Application process searching and killing method and device for application program
CN113407300A (en) * 2021-05-21 2021-09-17 荣耀终端有限公司 Application false killing evaluation method and related equipment

Also Published As

Publication number Publication date
CN113407300B (en) 2022-08-12
CN113407300A (en) 2021-09-17
CN115373957A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2020211701A1 (en) Model training method, emotion recognition method, related apparatus and device
WO2021000807A1 (en) Processing method and apparatus for waiting scenario in application
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
WO2019072178A1 (en) Method for processing notification, and electronic device
CN113961157B (en) Display interaction system, display method and equipment
WO2022037726A1 (en) Split-screen display method and electronic device
CN111913750B (en) Application program management method, device and equipment
WO2021218540A1 (en) Antenna power adjustment method, terminal device and storage medium
CN114115512B (en) Information display method, terminal device, and computer-readable storage medium
CN110727380A (en) Message reminding method and electronic equipment
CN114079893A (en) Bluetooth communication method, terminal device and computer readable storage medium
CN114579389A (en) Application management method, device, equipment and storage medium
CN111343326A (en) Method and related device for acquiring test log
WO2023015956A1 (en) Method for controlling camera, and electronic device and computer-readable storage medium
CN113805797A (en) Network resource processing method, electronic device and computer readable storage medium
CN114115770A (en) Display control method and related device
CN113641271A (en) Application window management method, terminal device and computer readable storage medium
CN111031492A (en) Call demand response method and device and electronic equipment
WO2022242412A1 (en) Method for killing application, and related device
CN113438366A (en) Information notification interaction method, electronic device and storage medium
CN114489469B (en) Data reading method, electronic equipment and storage medium
CN113645595B (en) Equipment interaction method and device
CN115022807A (en) Express delivery information reminding method and electronic equipment
CN116048831B (en) Target signal processing method and electronic equipment

Legal Events

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

Ref document number: 22803736

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE