WO2022170772A1 - 一种应用程序运行加速的方法及设备 - Google Patents

一种应用程序运行加速的方法及设备 Download PDF

Info

Publication number
WO2022170772A1
WO2022170772A1 PCT/CN2021/121460 CN2021121460W WO2022170772A1 WO 2022170772 A1 WO2022170772 A1 WO 2022170772A1 CN 2021121460 W CN2021121460 W CN 2021121460W WO 2022170772 A1 WO2022170772 A1 WO 2022170772A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
user
memory
data
mobile phone
Prior art date
Application number
PCT/CN2021/121460
Other languages
English (en)
French (fr)
Inventor
赵珅
许仲杰
徐传印
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202110559574.2A external-priority patent/CN114942800A/zh
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2022170772A1 publication Critical patent/WO2022170772A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms

Definitions

  • the embodiments of the present application relate to the field of artificial intelligence, and in particular, to a method and device for accelerating the running of an application.
  • a smartphone implements various functions through various applications (application, APP) installed inside.
  • applications application, APP
  • users can listen to audio novels or podcasts through the audiobook APP installed on the smartphone.
  • the user can perform travel navigation, view real-time road conditions, and the like through a navigation APP installed on the smartphone.
  • the embodiments of the present application provide a method and device for accelerating the running of an application program, which solves the problem that the application program startup response speed is relatively slow when a user starts an application program.
  • an embodiment of the present application provides a method for accelerating the execution of an application program, and the method can be applied to an electronic device.
  • the electronic device includes a first memory and a second memory, the first memory is a memory using a volatile storage medium, and the second memory is a memory using a non-volatile storage medium, and the method includes: according to the user profile and/or pre- The set prediction rule is that when it is predicted that the user will use the first application, the first application is loaded in the second memory; the first operation of the user to open the first application is received; in response to the first operation, the second memory is stored.
  • the data of the first application in the first memory is transferred to the first memory; the interface of the first application is displayed according to the data of the first application in the first memory.
  • the electronic device can predict the user's operation behavior based on machine learning, so as to preload the corresponding application before the user opens the application, so that when the user opens the corresponding application, the mobile phone does not need to When the application is loaded, the interface of the application can be directly entered, which improves the startup speed of the application when the user opens the application.
  • the user's operation behavior can be predicted, and the application switched to the background can be kept alive, so that the electronic device can continue to run the corresponding application without reloading after the user switches back to the application. , to improve application responsiveness.
  • predicting that the user will use the first application program includes: predicting that the user will start the first application program; loading the first application program in the second memory includes: loading the first application program Data is loaded into the second memory from the disk of the electronic device.
  • the electronic device can preload the first application into the second memory when predicting that the user may want to start a certain application, such as the first application, so that when the user starts the first application, the electronic device can The first application program is directly started without reloading the first application program, thereby improving the response speed when the user starts the application program.
  • the data of the first application includes first data and second data, and the user's expected operating speed for the service corresponding to the first data is lower than the user's expected operating speed for the service corresponding to the second data;
  • Loading the data of the first application program from the disk of the electronic device into the second memory includes: loading the first data of the first application program from the disk into the second memory; when it is predicted that the user will use the first application program, The method further includes: loading the second data of the first application program from the disk into the first memory.
  • the read and write speed of the first memory is higher than that of the second memory, and applications run faster in the first memory. Therefore, through the above method, after the first application is preloaded on the electronic device, when the user starts the first application, the service that the user expects to run faster in the first application can respond more smoothly and quickly, thereby further improving the user experience. Responsiveness when launching the app.
  • predicting that the user will use the first application includes: predicting that the user will switch the first application running in the background to the foreground to run; loading the first application in the second memory , including: transferring all or part of the data of the first application from the first memory to the second memory.
  • the application program runs in the volatile memory of the electronic device, such as the first memory, and because the first memory uses a volatile storage medium, power is required to maintain to ensure that data is not lost, and the power consumption is relatively high. Therefore, by adopting the above method, the electronic device can transfer the first application from the first memory to the second memory when it is predicted that the user will switch a certain application running in the background, such as the first application to the foreground. Keep alive, thereby reducing the power consumption of the electronic device, and avoiding the situation in which the first application in the background occupies the first memory, causing other applications to run stuttering.
  • the data of the first application includes first data and second data
  • the user's expected operating speed for the service corresponding to the first data is lower than the user's expected operating speed for the service corresponding to the second data
  • Transferring part of the data of the first application program from the first memory to the second memory includes: transferring the first data of the first application program from the first memory to the second memory; and retaining the second data in the first memory.
  • the read and write speed of the first memory is higher than that of the second memory, and applications run faster in the first memory. Therefore, in the above manner, after the electronic device keeps the first application program, when the user switches the first application program to the foreground, the user of the first application program can respond more smoothly and quickly to the service that the user expects to run faster, thereby Further improve responsiveness when users start the application.
  • the user profile and/or the prediction rule are queried for matching user behavior associations
  • the application is the first application, it is predicted that the user will use the first application.
  • the electronic device can predict the application program that the user will use according to various scenarios such as time, location, and operation, thereby improving the accuracy of prediction.
  • the prediction rule includes at least one of the following: when receiving an operation of the user searching for the first application program, predicting that the user will start the first application program; when receiving the user's installation of the first application program When the operation is performed, it is predicted that the user will start the first application; when it is received that the user opens the application classification folder containing the first application, it is predicted that the user will start the first application; among the applications in the application classification file, the first application An application includes outstanding business. Wherein, when the user's operation of installing the first application program is received, it is predicted that the user will start the first application program. For the preloading of the first application program, the first application program can be installed while the first application program is being installed. Preloading can also be preloaded after the first application is installed.
  • the electronic device can relatively accurately associate the application to be used by the user according to the user's operation. Enhance the user experience.
  • the method when it is predicted that the user will use the first application program according to the user portrait and/or a preset prediction rule, before loading the first application program in the second memory, the method further includes: : Count the user behavior of the user on the electronic device, generate a user portrait according to the statistical user behavior, and save the user portrait.
  • the user behavior includes at least one of the following: the user operation, the execution time of the user operation, and the location of the electronic device when the user operation is performed.
  • an embodiment of the present application provides an apparatus for accelerating the execution of an application program.
  • the apparatus can be applied to an electronic device having a first memory and a second memory, and is used to implement the method in the first aspect.
  • the first memory is a memory using a volatile storage medium
  • the second memory is a memory using a non-volatile storage medium.
  • the functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, a processing module and a display module.
  • the processing module can be configured to load the first application in the second memory when it is predicted that the user will use the first application according to the user portrait and/or the preset prediction rule; receive the user to open the first application the first operation; in response to the first operation, transfer the data of the first application program in the second memory to the first memory.
  • the display module may be configured to display the interface of the first application program according to the data of the first application program in the first memory.
  • the processing module is specifically configured to predict that the user will start the first application program; and load the data of the first application program from the disk of the electronic device into the second memory.
  • the data of the first application program includes first data and second data, and the user's expected running speed of the service corresponding to the first data is lower than the user's expected running speed of the service corresponding to the second data; processing The module is specifically configured to load the first data of the first application program from the disk into the second memory; the processing module is further configured to load the second data of the first application program from the disk into the first memory.
  • the processing module is specifically configured to predict that the user will switch the first application running in the background to the foreground running; transfer all or part of the data of the first application from the first memory to in the second memory.
  • the data of the first application program includes first data and second data, and the user's expected running speed of the service corresponding to the first data is lower than the user's expected running speed of the service corresponding to the second data; processing The module is specifically configured to transfer the first data of the first application program from the first memory to the second memory; the second data is retained in the first memory.
  • the processing module is specifically configured to query from the user portrait and/or the prediction rule according to at least one of the current time, the current location of the electronic device and the current operation of the user When the application associated with the matched user behavior is the first application, it is predicted that the user will use the first application.
  • the prediction rule includes at least one of the following: when receiving an operation of the user searching for the first application program, predicting that the user will start the first application program; when receiving the user's installation of the first application program When the operation is performed, it is predicted that the user will start the first application; when it is received that the user opens the application classification folder containing the first application, it is predicted that the user will start the first application; among the applications in the application classification file, the first application An application includes outstanding business.
  • the processing module is further configured to count the user behavior of the user on the electronic device, generate a user portrait according to the statistical user behavior, and save the user portrait.
  • the user behavior includes at least one of the following: user operation, user operation The execution time, the position of the electronic device when the user operation is performed.
  • an embodiment of the present application provides an electronic device, including: a processor, a first memory, a second memory, and a memory for storing executable instructions of the processor.
  • the first memory is a memory using a volatile storage medium
  • the second memory is a memory using a non-volatile storage medium.
  • embodiments of the present application provide a computer-readable storage medium on which computer program instructions are stored.
  • the electronic device is made to implement the method for accelerating the execution of an application program according to any one of the first aspect or possible implementation manners of the first aspect.
  • embodiments of the present application provide a computer program product, comprising computer-readable codes, when the computer-readable codes are executed in an electronic device, the electronic device enables the electronic device to implement the first aspect or the possibility of the first aspect The method for accelerating the execution of an application program described in any one of the implementation manners.
  • an embodiment of the present application provides a device implementation method of a hybrid volatile and non-volatile storage medium, characterized in that, when applied to an electronic device, the method includes: on the same Substrate (substrate), At the same time, a volatile storage medium and a non-volatile storage medium, and a storage controller are integrated; wherein, the volatile storage medium can be: for example, DDR, DDR2, DDR3, DDR4, HBM (ultra-wideband); non-volatile
  • the type of storage medium can be: for example, SLC-NAND, MRAM (Magnetic Radom Access Memory), RRAM (Resistance Radom Access Memory), PCRAM (Phase change Radom Access Memory).
  • the method further includes: the volatile storage medium and the non-volatile storage medium are connected to the storage controller, which can be connected to the same storage controller, and can be connected to different storage controllers.
  • the method further includes: a storage controller (Controller), a Substrate (substrate), and volatile (Volatile) and non-volatile (None-Volatile) storage media thereon, which are packaged Inside a Package (package shell), a bus interface is presented to the outside.
  • a storage controller Controller
  • Substrate Substrate
  • volatile Volatile
  • non-volatile Non-Volatile
  • the package can be Flip-Package, BGA (Ball Grid Array, ball grid array), WLCSP (Wafer Level Chip Scale Package, wafer-level chip scale package), etc.;
  • the bus interface can be an interface, for example, a DDR4 interface that conforms to the JEDEC specification;
  • the bus interface can be two or more interfaces, for example, two sets of DDR4 interfaces conforming to the JEDEC specification.
  • the method further includes: when the Host device accesses the mixed memory:
  • the same physical address end points to volatile or non-volatile memory, and the physical address segments of each other do not overlap (parallel mode); or, the same physical address segment can point to both volatile memory and non-volatile memory.
  • Volatile memory the physical addresses of each other coincide (shadow mode); or, some physical address ends can point to both volatile memory and non-volatile memory, and their physical addresses coincide (shadow mode); Some physical address ends point to volatile or non-volatile memory, and their physical address segments do not coincide with each other (parallel mode).
  • the method further includes: in the parallel mode, after power-off and then power-on, the data of the non-volatile memory is still kept and the data of the volatile memory is lost.
  • the method further includes: in the shadow mode, after power-off and then power-on, the data of the physical address segment to which the shadow mode belongs is still retained.
  • the present application further provides an electronic device, comprising: a memory, one or more processors; the one or more processors and the memory, the camera, the signal processor, the display a screen coupling connection; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions; when the instructions are executed by the electronic device When executed, the electronic device is caused to execute the method of the sixth aspect.
  • the present application further provides a computer-readable storage medium, including computer instructions, which, when the computer instructions are executed on a computer, cause the computer to execute the method of the sixth aspect.
  • FIG. 1 is a schematic diagram of the composition of an internal memory provided by an embodiment of the present application.
  • Fig. 2 is a kind of scene schematic diagram of opening application program provided by the related art
  • FIG. 3 is a schematic diagram of another scenario of opening an application provided by the related art.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a method for accelerating application execution provided by an embodiment of the present application
  • FIG. 7 is a schematic diagram of a scenario when a method for accelerating application execution provided by an embodiment of the present application is applied;
  • FIG. 8 is a schematic diagram of a scenario when another method for accelerating application execution provided by an embodiment of the present application is applied;
  • FIG. 9 is a schematic diagram of a scenario when another method for accelerating application execution provided by an embodiment of the present application is applied.
  • FIG. 10 is a schematic diagram of a scenario when another method for accelerating application execution provided by an embodiment of the present application is applied;
  • FIG. 11 is a schematic diagram of a scenario when another method for accelerating application execution provided by an embodiment of the present application is applied;
  • FIG. 12 is a schematic diagram of a scenario when another method for accelerating application execution provided by an embodiment of the present application is applied;
  • FIG. 13 is a schematic flowchart of a method for accelerating application execution provided by an embodiment of the present application when it is applied;
  • FIG. 14 is a schematic flowchart when another method for accelerating application program execution provided by an embodiment of the present application is applied.
  • 15 is a schematic flowchart of another method for accelerating the execution of an application program provided by an embodiment of the present application.
  • FIG. 16 is a schematic flowchart of another application program execution acceleration method provided by an embodiment of the present application when it is applied;
  • FIG. 17 is a schematic flowchart when another method for accelerating application execution provided by an embodiment of the present application is applied.
  • FIG. 18 is a schematic diagram of the composition of a memory according to an embodiment of the present application.
  • FIG. 19 is a schematic structural diagram of a memory provided by an embodiment of the application.
  • FIG. 20 is a schematic diagram of the composition of a storage system according to an embodiment of the present application.
  • FIG. 21 is a schematic diagram of the composition of an apparatus for accelerating application program execution according to an embodiment of the present application.
  • the internal memory of the current mobile phone may include a volatile memory 112 and a disk 111 .
  • the disk 111 adopts a non-volatile storage medium, the read and write speed is relatively slow, it can be stably stored without losing the storage content in the case of power failure, the power consumption is low, and it can be used to store the data of the application program installed on the mobile phone , but not for application running.
  • the volatile memory 112 adopts a volatile storage medium, which has a relatively fast read and write speed, and requires power to be maintained during storage to ensure that the stored content is not lost.
  • the power consumption is relatively high, and can be used to load and run application programs.
  • the data of all applications in the mobile phone are stored in the disk 111. When the mobile phone loads an application, the data of the application can be loaded from the disk 111 to the volatile memory 112, so that the application can be stored in the volatile memory. 112 runs.
  • a mobile phone When a mobile phone loads an application, it usually needs to load the executable code of the application into the memory (ie, volatile memory), obtain some resources required by the application, and load the relevant threads required for the running of the application.
  • the memory ie, volatile memory
  • the user needs to open the audiobook APP installed on the mobile phone, such as the "Tingshu” APP, to listen to the audiobook.
  • the user can open the “Tingshu” APP by clicking on the icon 201 of the “Tingshu” APP on the desktop of the mobile phone.
  • the mobile phone receives the user's click operation on the icon 201 of the "Tingshu” APP, the mobile phone loads and starts the “Tingshu” APP.
  • the process of loading the “Tingshu” APP on the mobile phone as shown in (b) of FIG.
  • the startup page 202 of the “Tingshu” APP (for example, the opening advertisement page, or the one shown in the figure) is usually displayed. Pages containing APP icons, etc.). This prevents the mobile phone from displaying a blank page when loading the "Tingshu” APP, which affects the user experience.
  • the interface displayed on the mobile phone can jump from the startup page 202 of the “Tingshu” APP to the application page 203 of the “Tingshu” APP (eg, application home page). Therefore, the user can listen to the audio novel by clicking on the relevant content in the application page 203 of the "Listening Book” APP.
  • the application page 203 of the “Tingshu” APP displayed on the mobile phone contains audio recordings of novels such as “Romance of the Three Kingdoms”, “A Dream of Red Mansions”, “Water Margin” and “Journey to the West”.
  • the user when the user goes to work, he needs to open the navigation APP installed on the mobile phone, such as the "Map” APP, to check the road conditions of the line to work.
  • the navigation APP installed on the mobile phone
  • the user can open the “Map” APP by clicking the icon 301 of the “Map” APP on the desktop of the mobile phone.
  • the mobile phone receives the user's click operation on the "Map” APP icon 301, the mobile phone loads and starts the "Map” APP.
  • the startup page 302 of the "Map” APP (for example, a screen-opening advertisement page, or an APP containing APP shown in the figure) is usually displayed. icon pages, etc.). This prevents the mobile phone from displaying a blank page when loading the "map” APP, which affects the user experience.
  • the interface displayed on the mobile phone can jump from the startup page 302 of the "Map” APP to the map interface 303 of the "Map” APP.
  • the mobile phone When the mobile phone displays the map interface 303 of the "Map" APP, the mobile phone also needs to load and obtain the location information of the mobile phone (that is, the user's location positioning), and then as shown in (d) in Figure 3, the mobile phone can display the mobile phone (or The location of the user) in the map, as well as the map information near the location of the mobile phone, so that the user can check the road conditions.
  • the location information of the mobile phone that is, the user's location positioning
  • the mobile phone can display the mobile phone (or The location of the user) in the map, as well as the map information near the location of the mobile phone, so that the user can check the road conditions.
  • the mobile phone needs to reload the first application (the process of reloading the first application is similar to the above-mentioned process of loading the application on the mobile phone), therefore, the user needs to reload the first application. Need to wait for the first application to load.
  • the mobile phone pops up a message reminder 401 of a chat APP, such as a “message” APP.
  • a chat APP such as a “message” APP.
  • the user can click on the message reminder 401 to open the “Information” APP.
  • the mobile phone receives the above operation from the user, as shown in (b) of FIG.
  • the user can reply to messages, chat, etc. in the chat interface 402 of the "message” APP.
  • the mobile phone will recycle the "Shopping” APP from the background due to insufficient mobile phone memory or the "Shopping” APP in the background for too long.
  • the mobile phone receives the user's operation, as shown in (c) in Figure 4, the mobile phone needs to reload the "Shopping” APP, and displays the display during the loading process.
  • an embodiment of the present application provides a method for accelerating the running of an application program.
  • the method can be applied to a scenario where a user opens an application installed in the electronic device or switches back and forth between at least two application programs opened in the electronic device.
  • the method for accelerating the running of an application program may include, during the process of using the application program installed in the electronic device, the electronic device observes and records the operation behavior of the user using the electronic device. After that, the electronic device can generate user portrait information that can represent the user's usage habit of using the application program according to the recorded operation behavior of the user using the electronic device. During the subsequent use of the electronic device by the user, within a specific time range, within a specific location range, when a specific operation occurs, or any combination of the above three, the electronic device can observe the user's operating behavior using the electronic device and user portraits.
  • the information and/or preset prediction rules are used to predict the application programs that the user may want to open (ie, launch) to obtain the predicted application program (ie, the application program that the user will use, such as the first application program).
  • the electronic device may preload the corresponding application (ie, the predicted application) according to the prediction result, and when the user operates to open the predicted application, the electronic device can directly start the application.
  • the electronic device can predict whether the application program switched to the background by the user will continue to be used according to the observed operation behavior of the user using the electronic device and user portrait information. If the electronic device predicts that the user of the application switched to the background may continue to use it, the electronic device may keep the application state alive. Thus, when the user switches back to the application, the electronic device can continue to run the application without reloading.
  • the internal memory of the electronic device may include a magnetic disk 121, a volatile memory 122 (which may be referred to as a first memory in this application), and a non-volatile memory 123 (in this application) may be referred to as the second memory in the application).
  • the magnetic disk 121 is the same as the magnetic disk in an electronic device (such as a mobile phone) in the related art. It adopts a non-volatile storage medium, and the read and write speed is relatively slow. Low. Can be used to store the data of the application installed on the electronic device, but cannot be used for the running of the application.
  • the volatile memory 122 and the non-volatile memory 123 are both memories.
  • the volatile memory 122 adopts a volatile storage medium, which has a fast read and write speed, and requires power to be maintained during storage to ensure that the stored content is not lost. The power consumption is high, and it can be used to load and run application programs.
  • the read and write speed of the non-volatile memory 123 is slightly lower than that of the volatile memory 122 .
  • the non-volatile memory 123 uses a non-volatile storage medium, but as a memory, it is different from the disk 121 that also uses a non-volatile storage medium.
  • the read and write speed of the non-volatile memory is much higher than that of the disk 121.
  • the application program can be preloaded from the disk 121 into the non-volatile memory 123; or when the electronic device needs to keep the application program alive, the application program can be kept alive in the non-volatile memory 123. In volatile memory 123.
  • the electronic device can predict the user's operation behavior based on machine learning, so as to preload the corresponding application before the user opens the application, so that when the user opens the corresponding application, the mobile phone does not need to run the application again.
  • the loading of the application can directly enter the interface of the application, which improves the startup speed of the application when the user opens the application.
  • the user's operation behavior can be predicted, and the application switched to the background can be kept alive, so that the electronic device can continue to run the corresponding application without reloading after the user switches back to the application. , to improve application responsiveness.
  • the above electronic device may be a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch, a smart bracelet) , smart home equipment (such as: TV), car equipment (such as: car computer), smart screen, game console, smart projector, smart TV box, and augmented reality (AR)/virtual reality (virtual reality, VR) equipment, etc.
  • PDA personal digital assistant
  • AR augmented reality
  • VR virtual reality
  • the embodiments of the present application do not specifically limit the specific device form of the electronic device.
  • the above-mentioned electronic device is an electronic device that can run an operating system and install application programs.
  • the operating system running on the electronic device may be system, system etc.
  • FIG. 5 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. That is, exemplarily, the electronic device shown in FIG. 5 may be a mobile phone.
  • the mobile phone may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1.
  • Antenna 2 wireless communication module 560, audio module 570, speaker 570A, receiver 570B, microphone 570C, headphone jack 570D, sensor module 580, buttons 590, motor 591, indicator 592, camera 593 and display screen 594, etc.
  • the mobile phone may further include a mobile communication module 550, a subscriber identification module (subscriber identification module, SIM) card interface 595 and the like.
  • a mobile communication module 550 a mobile communication module 550, a subscriber identification module (subscriber identification module, SIM) card interface 595 and the like.
  • SIM subscriber identification module
  • the sensor module 580 may include a pressure sensor 580A, a gyroscope sensor 580B, an air pressure sensor 580C, a magnetic sensor 580D, an acceleration sensor 580E, a distance sensor 580F, a proximity light sensor 580G, a fingerprint sensor 580H, a temperature sensor 580J, a touch sensor 580K, and an environmental Light sensor 580L, bone conduction sensor 580M, etc.
  • the structure shown in FIG. 5 does not constitute a specific limitation on the mobile phone.
  • the mobile phone may also include more or less components than those shown in FIG. 5, or some components may be combined, or some components may be separated, or different component arrangements, and the like.
  • some of the components shown in FIG. 5 may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 510 may include one or more processing units, for example, the processor 510 may include an application processor (application processor, AP), a modem processor, a graphics processor (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 processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • the controller can be the nerve center and command center of the phone. The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 510 for storing instructions and data.
  • the memory in processor 510 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 510. If the processor 510 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the waiting time of the processor 510 is reduced, thereby increasing the efficiency of the system.
  • the processor 510 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 transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM interface, and/or USB interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • the charging management module 540 is used to receive charging input from the charger. While the charging management module 540 charges the battery 542 , it can also supply power to the mobile phone through the power management module 541 .
  • the power management module 541 is used to connect the battery 542 , the charging management module 540 , and the processor 510 .
  • the power management module 541 can also receive the input of the battery 542 to supply power to the mobile phone.
  • the wireless communication function of the mobile phone can be realized by the antenna 1, the antenna 2, the mobile communication module 550, the wireless communication module 560, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in a cell phone can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 550 can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the mobile phone.
  • the mobile communication module 550 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 550 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 550 can also amplify the signal modulated by the modulation and demodulation processor, and then convert it into electromagnetic waves for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 550 may be provided in the processor 510 .
  • at least part of the functional modules of the mobile communication module 550 may be provided in the same device as at least part of the modules of the processor 510 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to speaker 570A, receiver 570B, etc.), or displays images or videos through display screen 594 .
  • the modem processor may be a stand-alone device.
  • the modulation and demodulation processor may be independent of the processor 510, and may be provided in the same device as the mobile communication module 550 or other functional modules.
  • the wireless communication module 560 can provide wireless local area networks (wireless local area networks, WLAN) (such as Wi-Fi networks), Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS) applied on the mobile phone, Solutions for wireless communication such as frequency modulation (FM), NFC, infrared technology (infrared, IR).
  • the wireless communication module 560 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 560 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 510 .
  • the wireless communication module 560 can also receive the signal to be sent from the processor 510 , perform frequency modulation on it, amplify it, and then convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the mobile phone is coupled with the mobile communication module 550, and the antenna 2 is coupled with the wireless communication module 560, so that the mobile phone 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 (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a 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
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the mobile phone realizes the display function through the GPU, the display screen 594, and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 594 and the application processor.
  • Processor 510 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 594 is used to display images, videos, and the like.
  • Display screen 594 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).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the cell phone may include 1 or N display screens 594, where N is a positive integer greater than 1.
  • the mobile phone can realize the shooting function through the ISP, the camera 593, the video codec, the GPU, the display screen 594, and the application processor.
  • the mobile phone may include 1 or N cameras 593 , where N is a positive integer greater than 1.
  • the external memory interface 520 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone.
  • the external memory card communicates with the processor 510 through the external memory interface 520 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 521 may be used to store computer executable program code, which includes instructions.
  • the processor 510 executes various functional applications and data processing of the mobile phone by executing the instructions stored in the internal memory 521 .
  • the internal memory 521 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the mobile phone.
  • the internal memory 521 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the mobile phone can implement audio functions through an audio module 570, a speaker 570A, a receiver 570B, a microphone 570C, an earphone interface 570D, and an application processor. Such as music playback, recording, etc.
  • FIG. 5 is only an exemplary illustration when the device form of the terminal is a mobile phone.
  • the terminal is a tablet computer, handheld computer, PC, PDA, wearable devices (such as smart watches, smart bracelets), smart home devices (such as TVs), car devices (such as car computers), smart screens,
  • the structure of the terminal may include fewer structures than those shown in FIG. 5 , or may include more structures than those shown in FIG. 5 , which is not limited here.
  • the electronic device may predict and preload the application program according to the user's application program usage habits and/or preset prediction rules.
  • FIG. 6 shows a schematic flowchart of a method for accelerating application execution provided by an embodiment of the present application.
  • the method for accelerating the running of the application program may include the following S601-S603.
  • the mobile phone generates a user portrait.
  • the user portrait may include the user's usage habits of using mobile phones and applications.
  • the mobile phone may generate a user portrait according to the observed operation behavior by observing the user's operation behavior during the user's use of the mobile phone.
  • the user's operation behavior may include the environment (eg, time, location, etc.) when the user uses a certain application program, operations performed by the user using a certain application program, and the like.
  • the user operation behavior observed by the mobile phone is "click the icon of an audiobook APP (such as the "Tingshu” APP) on the desktop at 8:00 in the morning, enter the audiobook APP to listen to the audio novel", “at 8:15 in the morning Open the navigation APP (such as the "map” APP) in the garage to check the road conditions" and so on.
  • the mobile phone After the mobile phone observes the operation behaviors of these users, it can store and record these operation behaviors, so as to generate user portraits based on these operation behaviors. For example, the mobile phone may count the number of times the same operation behavior occurs among the observed operation behaviors of these users. Then, according to a certain time period (eg, the last week, the last month, or the last three months, etc.), the frequency of occurrence of various operation behaviors is calculated. Ultimately, the mobile phone can regard the operation behaviors whose occurrence frequency is higher than a certain threshold as the user's usage habit of using the mobile phone's existing applications, and sort them according to the occurrence frequency of various operation behaviors.
  • a certain time period eg, the last week, the last month, or the last three months, etc.
  • the user's operation behavior observed and stored by the mobile phone may include: getting up at eight in the morning and opening an audiobook APP to listen to an audio novel.
  • the navigation APP will be opened in the garage to check the road conditions. Get up at eight in the morning and open the news app to browse the news. Open the document through the "Office” APP. Open documents through the "Text” app.
  • the mobile phone collects statistics on the user's operation behavior stored in the last month, gets up at 8:00 in the morning, and opens the audiobook APP to listen to the audio novel. The frequency of this behavior in the last month is 90%.
  • the navigation APP will be opened in the garage to check the road conditions, and the frequency of this behavior in the past month is 80%.
  • the mobile phone can use the operation behavior with a frequency higher than 60% as the user's usage habit to generate a user portrait. That is, the user portrait generated by the mobile phone may include: the user usually gets up at 8:00 in the morning and opens the audiobook APP to listen to the audio novel. Users generally open the navigation APP to check the road conditions after arriving at the garage in the morning. When a user needs to open a document, the document is generally opened through the "Office" APP.
  • the mobile phone can also generate the user portrait in other ways.
  • the mobile phone shows the user a questionnaire on the usage habits of the application, and then generates a user portrait based on the questionnaire information filled in by the user, etc.
  • the user profile ie, the user's habit
  • the mobile phone predicts the application that the user may want to open according to the current scene, the user portrait and/or the preset prediction rule.
  • the mobile phone can query the corresponding user operation behavior (or usage habits, user behavior) in the user portrait according to the current scene, and then predict the corresponding user operation behavior according to the queried user operation behavior.
  • the corresponding application is the application that the user may want to open.
  • the mobile phone finds that there is a user operation behavior in the user portrait that "users generally use APP1 when processing pictures". Therefore, the mobile phone can predict that the user may want to open APP1 according to this operation behavior, so that the subsequent mobile phone can perform APP1 according to the prediction. Preloading. When the user clicks the icon of APP1 to open APP1, as shown in (b) of FIG.
  • one of the user operation behaviors (or user behaviors) in the user portrait is "When a user needs to open a document, APP1 is generally used to open the document". Therefore, as shown in (a) of FIG. 8, when the user opens a certain document in the mobile phone, the mobile phone pops up the application program (for example, including APP1, APP2, APP3, etc.). When the mobile phone observes the above operation of the user (that is, the mobile phone observes a scene where the user is about to open a document), the mobile phone can query the user portrait according to the scene. At this time, the mobile phone finds that there is a user operation behavior in the user portrait: "When the user needs to open the document, APP1 is generally used to open the document".
  • the mobile phone can predict that the user may want to open APP1 according to the operation behavior, thereby facilitating the subsequent mobile phone to preload APP1 according to the prediction.
  • the mobile phone can directly open the APP1 according to the preloading and enter the application interface 801 .
  • a user operation behavior (or called user behavior) in the user portrait is "the user often plays the game APP1". Therefore, as shown in FIG. 9 , when the user opens the application category folder "Games" in the mobile phone, the mobile phone can display various game APPs installed in the mobile phone (eg, including game APP1, game APP2, game APP3, etc.). When the mobile phone observes the above operation of the user (that is, the mobile phone observes that the user has opened the "game” application category folder and is ready to play a game scene), the mobile phone can query the user portrait according to the scene. At this time, the mobile phone finds that there is a user operation behavior in the user portrait that "the user often plays the game APP1".
  • game APPs installed in the mobile phone
  • the mobile phone can predict that the user may want to open the game APP1 according to the operation behavior, thereby facilitating the subsequent mobile phone to preload the game APP1 according to the prediction.
  • the mobile phone when the user opens a certain application category folder, the mobile phone can also predict based on whether there is an application program (such as the first application program) in the application category folder that has the user's unfinished business
  • the user may want to open the application to preload the application.
  • the unfinished business of the user may be that the user once opened the application to perform a business operation, and the process of the corresponding business operation or the business process has not ended after the application is closed. For example, as shown in FIG.
  • the mobile phone when the user opens the application category folder "shopping" on the mobile phone, the mobile phone can display various shopping APPs installed in the mobile phone (eg, including shopping APP1, shopping APP2, shopping APP3, etc.).
  • the mobile phone observes the above operations of the user (that is, the mobile phone observes that the user has opened the "shopping" application category folder and is ready to go shopping)
  • the mobile phone can query the user's historical operations using each shopping APP, and then determine according to the historical operations.
  • a shopping APP such as shopping APP1
  • the business of the user purchasing an item has not been completed (for example, the user purchased an item in shopping APP1, and the item is in transit and has not yet arrived), at this time, the mobile phone can predict that the user may want to open it.
  • the shopping APP1 is convenient for subsequent mobile phones to preload the shopping APP1 according to the prediction.
  • the mobile phone can preload the shopping APP1 in advance when the user opens the "shopping" application category folder and prepares to start the shopping APP1 to check the logistics information of the purchased items, so as to improve the response speed of the user opening the shopping APP1.
  • the mobile phone can also allocate the predicted application according to the difference of the predicted application priority (usually, the priority can be preset for different applications).
  • the app preloadable quota of , so that the phone can preload the corresponding app separately according to the quota.
  • the mobile phone can predict that the user may want to open the shopping APP1 according to the existence of unfinished business in the shopping APP1, and also according to the user portrait, the user often uses the shopping APP2. It is predicted that the user may want to open the shopping APP2.
  • the mobile phone can use the preset priority, for example, the priority of the application predicted according to the unfinished business is lower than that of the application predicted according to the user portrait (that is, the priority of the shopping APP1 is lower than the priority of the shopping APP2) , and allocate the preloadable quota for shopping APP1 and shopping APP2.
  • a low-priority shopping APP1 is assigned a preloadable quota of 70% (that is, shopping APP1 can preload 70% of all data), and a high-priority shopping APP2 is assigned a preloadable quota of 30% (that is, shopping APP2 30% of all data can be preloaded). Therefore, the mobile phone can preload the shopping APP1 and the shopping APP2 according to the quota allocated to the shopping APP1 and the shopping APP2, respectively.
  • the phone predicts the application the user is about to open.
  • other implementation examples may also be included.
  • the mobile phone observes that the time is approaching 8:00 in the morning (for example, the current time is 7:58)
  • the mobile phone finds that there is a user operation behavior in the user portrait: "The user usually gets up at 8:00 in the morning and turns on the audio Book APP to listen to audiobooks”.
  • the mobile phone can predict that the user will open the audiobook APP, so that the subsequent mobile phone can preload the audiobook APP according to the prediction.
  • the mobile phone when the mobile phone observes that the time is approaching 8:30 in the morning (for example, the current time is 8:20), the mobile phone finds that there is a user operation behavior in the user portrait: "The user usually runs from 8:30 to 9:00 in the morning. , open the news app to browse the news”. Then, the mobile phone can predict that the user will open the news APP at this time, so that the subsequent mobile phone can preload the news APP according to the prediction.
  • the mobile phone when the mobile phone observes that the time is approaching 12:00 noon (for example, the current time is 12:50), the mobile phone finds that there is a user operation behavior in the user portrait: At 13 o'clock, open the takeaway app and order takeaway.” At this time, the mobile phone can predict that the user will open the food delivery APP, so that the subsequent mobile phone can preload the food delivery APP according to the prediction.
  • the mobile phone finds that there is a user operation behavior in the user portrait: "The user usually At blackjack, open the game app and play the game.” At this time, the mobile phone can predict that the user will open the game APP, so that the subsequent mobile phone can preload the game APP according to the prediction.
  • the mobile phone observes that the current location of the mobile phone (or the location of the user) is a subway station, the mobile phone finds that there is a user operation behavior in the user portrait: "Users usually use the ride APP to scan the code at the subway station to get on the bus. ". At this time, the mobile phone can predict that the user will open the ride APP, so that the subsequent mobile phone can preload the ride APP according to the prediction.
  • the mobile phone can also query the corresponding user operation behavior (or usage habits) in the user portrait according to the currently opened application (that is, the scene when the user opens an application), and then according to the query results
  • the user operation behavior predicts that the application corresponding to the operation behavior is the application that the user may want to open.
  • the user portrait can also include the operation behavior of opening another application after the user opens an application. For example, after users open the food delivery app, they will open the comment app again. After users open the bank APP, they will also open the payment and wealth management APP. After users open the beauty APP, they will also open the gallery APP and so on.
  • the mobile phone When the mobile phone observes that the user has opened the food delivery APP, it will query the user's operation behavior in the user portrait, thereby predicting that the user will open the comment APP. Correspondingly, after the mobile phone observes that the user has opened the bank APP, it will predict that the user will open the payment and wealth management APP. After the mobile phone observes that the user has opened the beauty APP, it will predict that the user will open the gallery APP.
  • the mobile phone can also predict the application that the user may want to open according to the user's current operation behavior (ie, the scene when the user performs an operation) and according to a preset prediction rule.
  • the preset prediction rule includes "when a user searches for an installed application, it is predicted that the user may want to open the searched application". Therefore, as shown in Figure 11, when the user searches for an installed application (such as APP1) in the mobile phone, the mobile phone can display the application searched by the user, such as APP1. At this time, the mobile phone can predict that the user will open the searched APP1 according to the preset prediction rule, so as to facilitate the subsequent mobile phone to preload the APP1 according to the prediction.
  • an installed application such as APP1
  • the preset prediction rule includes "when the user downloads a certain application program (eg APP1), it is predicted that the user may want to open the downloaded application program". Therefore, for example, as shown in (a) of FIG. 12 , when the user downloads APP1 through a click operation in the mobile phone application market, the mobile phone can download and install the APP1 in response to the user's click operation.
  • the mobile phone downloads and installs APP1 as shown in (b) of FIG. 12 , the mobile phone can display the download completed interface, and the download completed interface includes operation controls for the user to open APP1 (for example, as shown in the figure). the "Open" button 1201) shown.
  • the mobile phone can predict that the user will open the downloaded APP1 according to the preset prediction rules, so that the subsequent mobile phone can preload APP1 according to the prediction.
  • the phone can preload the application.
  • the preloading of the application program by the mobile phone may include loading threads or processes necessary for running the application program, and may also load threads or resources required for certain services of the application program.
  • the mobile phone can preload the corresponding content of the application according to the corresponding user operation behavior in the user portrait. For example, in the user portrait, users usually open the news app and slide the app interface to refresh the content, and then click on a certain section to listen or view.
  • the mobile phone can preload the necessary processes or threads for the running of the news APP, and will also refresh the content of the application interface and related resources of a certain section that the user often clicks. Threads or resources required for content are preloaded. So that when the user opens the news APP, the content of the application interface has been refreshed, and the content of a certain section that the user often clicks has also been loaded for the user to view or listen to, thereby further improving the response speed of the mobile phone when opening the application.
  • the internal memory 521 in the mobile phone as shown in FIG. 5 may include a magnetic disk (eg, solid state disk (SSD), hard disk drive (HDD), Nand Flash) , Universal flash storage (universal flash storage, UFS), eMMC, etc.) and volatile memory.
  • a magnetic disk eg, solid state disk (SSD), hard disk drive (HDD), Nand Flash
  • Universal flash storage Universal flash storage, UFS
  • eMMC etc.
  • volatile memory volatile memory.
  • the read and write speed of the disk is relatively slow, it can be stably stored without losing the storage content in the case of power failure, the power consumption is low, and it can be used to store the data of the application program installed on the mobile phone.
  • Volatile memory has a fast read and write speed, and requires power to be maintained during storage to ensure that the storage content is not lost. It has high power consumption and can be used to load and run applications.
  • the phone can preload from disk into volatile memory the predicted apps that the user might want to open (or predicted apps).
  • the mobile phone can directly run the preloaded predicted application in the volatile memory, thereby improving the response speed of the mobile phone when the user opens the corresponding application.
  • the space occupation of the volatile memory is high, the mobile phone is stuck, and the power consumption of the mobile phone is increased.
  • S603 may be performed by preloading an application program on a mobile phone.
  • the mobile phone preloads the predicted application program that the user may want to open through the non-volatile memory.
  • the internal memory 521 in the mobile phone as shown in FIG. 5 may be as shown in (b) of FIG. 1 , including the disk 121 (eg, SSD, HDD, Nand Flash, eMMC, UFS, etc.), volatile memory 122 and non-volatile memory 123.
  • the disk 121 eg, SSD, HDD, Nand Flash, eMMC, UFS, etc.
  • the storage medium of the volatile memory 122 may be a double data rate storage medium (double data rate, DDR), DDR second generation (DDR2), DDR third generation (DDR3), DDR fourth generation (DDR4), high bandwidth storage ( high bandwidth memory, HBM), etc.
  • the storage medium of the non-volatile memory 123 can be single-level cell flash memory (single-level cell-NAND, SLC-NAND), magnetic random access memory (magnetic random access memory, MRAM), resistive variable memory Storage (Resistance Radom Access Memory, RRAM), Phase change Random Access Memory (Phase change Radom Access Memory, PCRAM) and other fast retainable storage (fast none volatile memory, FastNVM).
  • the read and write speed of the above non-volatile memory in this example is slightly lower than that of volatile memory, and much higher than the read and write speed of disk, and can be used as a running state carrier for low-priority applications and processes.
  • the non-volatile memory has the characteristics of non-volatile storage, that is, it can store stably even in the case of power failure, so the power consumption is relatively low.
  • Volatile memory and non-volatile memory can be scheduled with each other, and data can be transferred to each other. For example, scheduling and data transfer between volatile memory and non-volatile memory can be implemented through a memory management module. Volatile memory and non-volatile memory can be set independently or integrated together without limitation.
  • non-volatile memory can store resource data to be accessed by the application (for example, configuration files, multimedia data, etc.), and can also store the runtime code segment of the application. area operation.
  • preloaded applications can be loaded in this non-volatile memory.
  • the corresponding memory pages at runtime of applications, processes or threads that are not perceived by the user can also run in this non-volatile memory. For example, background download, background resource update and other services can also run in the non-volatile memory.
  • the phone can preload the predicted apps that the user might want to open (or predicted apps) from disk into non-volatile memory, or load part of the app into non-volatile memory, Part of it is loaded in volatile memory.
  • the phone can then move the application's data preloaded in non-volatile memory to volatile memory to run the application. Thereby, the response speed of the mobile phone when the user opens the corresponding application is improved.
  • the manner in which the application program performs preload scheduling in the volatile memory and the non-volatile memory may be as follows.
  • the mobile phone when the mobile phone wants to preload a certain application, the mobile phone can schedule the preloading of the application according to whether the application is currently loaded.
  • the confidence level is the possibility of prediction, which can be obtained according to the machine learning prediction algorithm, or based on the user portrait
  • the frequency of the user operation behavior related to the application is obtained. For example, the frequency is directly used as the confidence level. When the frequency is higher, the confidence level is higher.
  • the application program whose confidence level is higher than the first threshold and does not exceed the second threshold value is regarded as the application program that the user has a certain possibility to use, and the application program that is higher than the second threshold value is regarded as the user has a high probability.
  • application to be opened it means that the application is likely to be used by the user, and the mobile phone can load the application from the disk into the non-volatile memory. Therefore, when the subsequent application is opened by the user, the mobile phone can transfer the application data preloaded in the non-volatile memory to the volatile memory to run the application, thereby reducing the volatile memory when the application is preloaded.
  • the mobile phone can load a part of the application (such as the second data) from the disk into volatile memory, and load another part (such as the first data) into non-volatile memory.
  • the part loaded into the volatile memory is usually the user perception (the user perception is the running speed of the application expected by the user.
  • the business with strong user perception is compared with the business with weak user perception.
  • the operating speed expected by users is greater than that expected by users of services with weak user perception) relatively strong interactive threads or processes, while the part loaded into non-volatile memory is usually an additional function with relatively weak user perception .
  • the mobile phone can directly start the operation of the relatively strong user-perceived service in the volatile memory, and transfer the related data of other ancillary services from the non-volatile memory to the volatile memory. It can be run in the volatile memory to further improve the response speed of the mobile phone when opening the application, and take into account the problems of high volatile memory space occupation and high power consumption during preloading.
  • the mobile phone can maintain the current loading state of the application, so that when the subsequent application is opened by the user, the mobile phone can directly run the application in the volatile memory, thereby improving the response speed of the mobile phone when the application is opened.
  • the application to be preloaded has already been loaded, and the application is all loaded in the non-volatile memory. If the confidence that the application may be opened by the user is higher than the first threshold but does not exceed the second threshold, it means that the application is likely to be used by the user, and the mobile phone can maintain the current loading state of the application to facilitate subsequent applications
  • the mobile phone can transfer the application data preloaded in the non-volatile memory to the volatile memory to run the application, thereby reducing the volatile memory space occupation and reducing the time when the application is preloaded. power consumption.
  • the phone can transfer a portion of the app's data from non-volatile memory to in volatile memory.
  • a part of the data transferred to the volatile memory is usually an interactive thread or process with relatively strong user perception, and a part of the data retained in the non-volatile memory is usually an additional function relatively weakly perceived by the user. For example, log uploading, grocery shopping in taxi APPs and other ancillary services.
  • the mobile phone can directly start the operation of the relatively strong user-perceived service in the volatile memory, and transfer the related data of other ancillary services from the non-volatile memory to the volatile memory. It can be run in the volatile memory to further improve the response speed of the mobile phone when opening the application, and take into account the problems of high volatile memory space occupation and high power consumption during preloading.
  • the application to be preloaded has been loaded, and the application exists in both the volatile memory and the non-volatile memory. If the confidence that the application may be opened by the user is higher than the first threshold but does not exceed the second threshold, it means that the application is likely to be used by the user, and the mobile phone can maintain the current loading state of the application to facilitate subsequent applications
  • the mobile phone can transfer the application data preloaded in the non-volatile memory to the volatile memory to run the application, thereby reducing the volatile memory space occupation and reducing the time when the application is preloaded. power consumption.
  • the phone can transfer a portion of the app's data from non-volatile memory to in volatile memory.
  • a part of the data transferred to the volatile memory is usually an interactive thread or process with relatively strong user perception, and a part of the data retained in the non-volatile memory is usually an additional function relatively weakly perceived by the user. For example, log uploading, grocery shopping in taxi APPs and other ancillary services.
  • the mobile phone can directly start the operation of the relatively strong user-perceived service in the volatile memory, and transfer the related data of other ancillary services from the non-volatile memory to the volatile memory. It can be run in the volatile memory to further improve the response speed of the mobile phone when opening the application, and take into account the problems of high volatile memory space occupation and high power consumption during preloading.
  • the mobile phone when the user opens the application, the mobile phone can transfer the data stored in the non-volatile memory of the application. to volatile memory so that the phone can run the application in volatile memory for the user.
  • the mobile phone preloads APP2 by preloading APP2 from the disk into the non-volatile memory as an example.
  • the mobile phone when it finds that APP2 has not been loaded, it can instruct the non-volatile memory to load APP2 from the disk (for example, the non-volatile memory is instructed to load APP2 from the disk through the APP scheduling policy execution module), that is, in The APP2 running segment is loaded in the non-volatile memory, and the running of the APP2 (for example, the APP startup, the running of the APP-specific thread, the allocation of the resources required by the APP, etc.) is completed in the non-volatile memory.
  • the non-volatile memory for example, the non-volatile memory is instructed to load APP2 from the disk through the APP scheduling policy execution module
  • the APP2 running segment is loaded in the non-volatile memory
  • the running of the APP2 for example, the APP startup, the running of the APP-specific thread, the allocation of the resources required by the APP, etc.
  • the mobile phone when the user wants to use APP2, the mobile phone starts to load APP2 after receiving the user's operation to open APP2 (eg, the user opens APP2 by clicking the APP2 icon on the desktop, etc.). At this time, the mobile phone can instruct the non-volatile memory to transfer the running segment data of APP2 (or all data in the running state) to the volatile memory, so that the mobile phone can run the APP2 in the volatile memory for the user to use.
  • the mobile phone can instruct the non-volatile memory to transfer the running segment data of APP2 (or all data in the running state) to the volatile memory, so that the mobile phone can run the APP2 in the volatile memory for the user to use.
  • the mobile phone when the user has not used APP2 for a certain period of time, or after the user has used APP2 to keep APP2 alive in the non-volatile memory for a period of time, the mobile phone can be recovered from the non-volatile memory. Unload (or eliminate, release, recycle) APP2 in memory. For example, the mobile phone can instruct the non-volatile memory to release the running segment data of APP2 through the APP scheduling policy execution module.
  • the non-volatile memory can be used as the carrier of the program runtime, in some possible implementations, when the user wants to open the predicted application (such as APP2), the The data transferred from the non-volatile memory to the volatile memory may only be part of the data in the running segment of the application (for example, some business data with strong user perception), and the part with weak user perception is still in non-volatile memory It runs in the middle, such as log uploading, grocery shopping in the taxi app, etc.
  • User perception is the running speed of the application expected by the user. Usually, the service with strong user perception is compared with the service with weak user perception. The expected running speed of the user of the service with strong user perception is greater than that of the user of the service with weak user perception. desired operating speed.
  • the mobile phone when the user is using APP1 (starting APP1 before the user uses APP1, the mobile phone can load APP1 from the disk through the volatile memory, that is, load APP1 in the volatile memory APP1 running segment), the mobile phone predicts that the user is likely to use APP2. The mobile phone prepares to preload APP2 according to the prediction result.
  • the mobile phone when it finds that APP2 has not been loaded, it can instruct the non-volatile memory to load APP2 from the disk (for example, the non-volatile memory is instructed to load APP2 from the disk through the APP scheduling policy execution module), that is, in The APP2 running segment is loaded in the non-volatile memory, and the running of the APP2 (for example, the APP startup, the running of the APP-specific thread, the allocation of the resources required by the APP, etc.) is completed in the non-volatile memory.
  • the non-volatile memory for example, the non-volatile memory is instructed to load APP2 from the disk through the APP scheduling policy execution module
  • the APP2 running segment is loaded in the non-volatile memory
  • the running of the APP2 for example, the APP startup, the running of the APP-specific thread, the allocation of the resources required by the APP, etc.
  • the mobile phone when the user wants to use APP2, the mobile phone starts to load APP2 after receiving the user's operation to open APP2 (eg, the user opens APP2 by clicking the APP2 icon on the desktop, etc.). At this time, the mobile phone can instruct the non-volatile memory to transfer a part of the data of the running segment of APP2 (or called the first running segment of APP2) to the volatile memory, and retain the data of the running segment of APP2 in the non-volatile memory.
  • the non-volatile memory can instruct the non-volatile memory to transfer a part of the data of the running segment of APP2 (or called the first running segment of APP2) to the volatile memory, and retain the data of the running segment of APP2 in the non-volatile memory.
  • Another part of the data (or called the second running section of APP2), so that the mobile phone can run the first running section and the second running section of the APP2 in the volatile memory and the non-volatile memory respectively, so as to realize the operation of APP2 for the user use.
  • the mobile phone can be recovered from the non-volatile memory. Unload (or eliminate, release, recycle) APP2 in memory.
  • the mobile phone can instruct the non-volatile memory to release the running segment data of APP2 through the APP scheduling policy execution module.
  • the mobile phone can predict in real time which applications the user may want to open in those scenarios. At this time, the mobile phone can preload the applications only when the predicted users will open the applications, thereby reducing the power consumption of the mobile phone due to preloading too many applications.
  • the mobile phone may preload all predicted applications that the user may want to open at one time, regardless of power consumption.
  • these applications can be preloaded into the aforementioned non-volatile memory, so that when the phone is preloaded, power consumption can be kept low even if the phone is no longer charged.
  • multiple levels of storage with different speeds may be added as runtime memory.
  • the application is preloaded, according to the speed of the storage at all levels and the user's perception of the running of the application, the memory segments of the application runtime are loaded into different storages respectively.
  • the taxi owner business such as map, order processing
  • the infrequently used business such as grocery shopping
  • the user perception is very weak.
  • the business e.g. log upload, local machine learning inference
  • These multilevel stores can be either volatile or non-volatile memory.
  • the cross-device and cross-network read and write performance has been higher than the performance of some low-end runtime memory (such as eMMC).
  • eMMC low-end runtime memory
  • the above instance of multi-level storage can also be physically separated from the high-speed operation memory of the current device, such as network attached storage (NAS), cloud storage (Cloud Storage), high-speed network ( For example, other storage (NAS, Cloud Storage or other storage devices) connected to 5G), storage media provided by means of distributed virtualization technology, etc.
  • the electronic device can also predict whether the application program switched by the user to the background will continue to be used according to the observed operation behavior of the user using the electronic device and user portrait information. And keep the corresponding application program alive according to the prediction result.
  • FIG. 15 shows a schematic flowchart of another method for accelerating the execution of an application program provided by an embodiment of the present application. As shown in FIG. 15 , the method for accelerating the execution of an application program may include the following S1501-S1503.
  • the mobile phone generates a user portrait.
  • This S1501 is similar to S601 in the method shown in FIG. 6 , wherein the user portrait may include that the user likes to use a certain application, and the user will generally switch back to the application after opening another application when using an application. Wait for the user's operation behavior.
  • the user portrait may include that the user likes to use a certain application, and the user will generally switch back to the application after opening another application when using an application. Wait for the user's operation behavior.
  • S1501 please refer to the relevant descriptions in S601 for details.
  • the mobile phone predicts the application that the user may continue to use according to the current user's operation behavior scenario and the user portrait.
  • the mobile phone can query the corresponding user operation behavior (or usage habits) in the user portrait according to the current user's operation behavior scenario, and then predict the application related to the operation behavior according to the queried user operation behavior.
  • the program needs to be kept alive.
  • the mobile phone finds that one of the user's operation behaviors in the user portrait is "the user likes to use the shopping APP for shopping", and according to the recorded user's previous operation behavior (such as historical operation behavior), it is found that the shopping APP switched to the background is still in the Product purchase page.
  • the mobile phone can predict that the user may switch back to the shopping APP and continue to use it according to the operation behavior in the user portrait. That is, it is predicted that the shopping APP is an application that the user may continue to use, so that the subsequent mobile phone can keep the shopping APP alive according to the prediction.
  • the mobile phone can keep the application alive.
  • the internal storage 521 in the mobile phone as shown in FIG. 5 may include a magnetic disk (eg, solid state disk (SSD), hard disk drive (HDD), eMMC, UFS, etc.) and Volatile memory.
  • SSD solid state disk
  • HDD hard disk drive
  • eMMC embedded MultiMediaCard
  • UFS Universal System for Mobile Communications
  • Volatile memory has a fast read and write speed, and requires power to be maintained during storage to ensure that the storage content is not lost. It has high power consumption and can be used to load and run applications. As a result, the phone can keep alive in volatile memory applications that the predicted user may continue to use.
  • the mobile phone can keep alive applications in the virtual memory on the disk based on the virtual memory technology that the predicted user may continue to use. Therefore, when the user switches to the application to be continued to be used again, the mobile phone can continue to run the application without reloading, and the response speed of the application is improved.
  • the space occupation of the volatile memory is high, the mobile phone is stuck, and the power consumption of the mobile phone is increased. It is also to avoid problems such as keeping the application alive in the virtual memory, which is affected by the speed of disk read and write, and causes the disk to be frequently read and written, which affects the life of the disk.
  • the embodiment of the present application also provides another implementation manner, for example, the following S1503 may be performed by the mobile phone to keep the application program alive.
  • the mobile phone keeps alive the predicted application program that the user may continue to use through the non-volatile memory.
  • the memory storage 521 in the mobile phone as shown in FIG. 5 may be as shown in (b) of FIG. 1 . That is, it includes a disk 121 (eg, SSD, HDD, Nand Flash, EMMC, UFS, etc.), a volatile memory 122 and a non-volatile memory 123 .
  • a disk 121 eg, SSD, HDD, Nand Flash, EMMC, UFS, etc.
  • the storage medium of the volatile memory 122 may be a double data rate storage medium (double data rate, DDR), DDR second generation (DDR2), DDR third generation (DDR3), DDR fourth generation (DDR4), high bandwidth storage ( high bandwidth memory, HBM), etc.
  • the storage medium of the non-volatile memory 123 can be single-level cell flash memory (single-level cell-NAND, SLC-NAND), magnetic random access memory (magnetic random access memory, MRAM), resistive variable memory Storage (Resistance Radom Access Memory, RRAM), phase change random access memory (Phase change Radom Access Memory, PCRAM) and other fast retentive storage (fast none volatile memory, FastNVM).
  • the read and write speed of the above non-volatile memory in this example is slightly lower than that of volatile memory, and much higher than the read and write speed of disk, and can be used as a running state carrier for low-priority applications and processes.
  • the non-volatile memory has the characteristics of non-volatile storage, that is, it can store stably even in the case of power failure, so the power consumption is relatively low.
  • Volatile memory and non-volatile memory can be scheduled with each other, and data can be transferred to each other. For example, scheduling and data transfer between volatile memory and non-volatile memory can be implemented through a memory management module. Volatile memory and non-volatile memory can be set independently or integrated together without limitation.
  • non-volatile memory can store resource data to be accessed by the application (for example, configuration files, multimedia data, etc.), and can also store the runtime code segment of the application. area operation. To reduce power consumption and use of volatile memory, applications can be kept alive in this non-volatile memory.
  • the phone can move the applications that the predicted user may continue to use (or called the predicted applications to continue to use) from the volatile memory to the non-volatile memory for keeping alive.
  • the phone can move the application's data kept alive in non-volatile memory to volatile memory to continue running the application.
  • the application program that the user wants to continue to use is prevented from being cleared in the background, and the response speed of the mobile phone when the user switches back to the application program is improved.
  • the manner in which the application program is scheduled in the volatile memory and the non-volatile memory may be as follows.
  • the confidence level of the application may continue to be used by the user (the confidence level is the possibility of prediction, which can be obtained according to the machine learning prediction algorithm, or according to the user profile).
  • the frequency of the user operation behavior related to the application is obtained. For example, the frequency is directly used as the confidence level. When the frequency is higher, the confidence level is higher.
  • the first threshold and the second threshold It can be set according to the actual situation, so that the application program whose confidence level is higher than the first threshold and does not exceed the second threshold value is regarded as the application program that the user has a certain possibility to continue to use, and the application program that is higher than the second threshold value is regarded as the user has a high probability. may continue to use the application), it means that the application is likely to be continued to be used by the user, and the mobile phone can transfer the data of the application from the volatile memory to the non-volatile memory.
  • the mobile phone can re-transfer the application program from the non-volatile memory to the volatile memory to continue running. Reduce the footprint and power consumption of volatile memory when the application is kept alive.
  • the confidence that the application program may be continuously used by the user exceeds the second threshold, it means that the application program is likely to be continuously used by the user.
  • the mobile phone can maintain the running state of the application in the volatile memory, that is, keep the application alive in the volatile memory.
  • the mobile phone can continue to run directly in the volatile memory, thereby improving the response speed of the mobile phone when the user switches back to the application to continue to use.
  • the mobile phone can first keep the application alive in the volatile memory, so that when the user switches back to the application, the mobile phone can continue to run the application in the volatile memory. Over time, if the user has not switched back to the application kept alive in the volatile memory and continues to use it, the mobile phone can gradually transfer the content of the application kept alive in the volatile memory to the non-volatile memory. in sexual memory. This reduces the space occupation and power consumption of volatile memory when the application is kept alive.
  • the mobile phone can save the application stored in the non-volatile memory.
  • the data of the program is transferred to the volatile memory, so that the mobile phone can continue to run the application in the volatile memory for the user to continue to use.
  • APP1 For example, take the user switching APP1 to the background, opening APP2 for use, and the mobile phone predicting that the user may continue to use APP1 as an example.
  • the user switches APP1 to the background (at this time, the running segment data of APP1 will be kept in the volatile memory).
  • the mobile phone can load APP2 for the user to use.
  • the mobile phone can instruct the volatile memory to load APP2 or APP1 from the disk (for example, the volatile memory is instructed to load APP2 or APP1 from the disk through the APP scheduling policy execution module), and when the volatile memory is loaded Complete the operation of APP2 or APP1 (for example, APP startup, APP-specific thread running, allocation of resources required by APP, etc.) in the non-volatile memory.
  • APP2 or APP1 for example, APP startup, APP-specific thread running, allocation of resources required by APP, etc.
  • the mobile phone predicts that the user may continue to use APP1 in the future, and the mobile phone can keep APP1 alive according to the prediction result. At this time, the mobile phone can instruct the volatile memory to transfer the running segment data of APP1 to the non-volatile memory to keep it alive. As shown in (c) of Figure 16, when the user switches back to APP1 and continues to use it, the mobile phone can instruct the non-volatile memory to transfer the running segment data of APP1 to the volatile memory, so that the mobile phone is in the volatile memory. The APP1 continues to run in the memory for the user to continue to use.
  • the mobile phone can uninstall APP1 from the non-volatile memory.
  • the method shown in (c) of FIG. 13 which will not be repeated here.
  • non-volatile memory can be used as the carrier of the program runtime
  • the user switches back to the corresponding application (such as APP1)
  • the The data transferred from the non-volatile memory to the volatile memory may only be part of the data in the running segment of the application (for example, the part of the business data with strong user perception), and the part with weak user perception is still in non-volatile Running in memory, such as log uploading, grocery shopping in a taxi app, etc.
  • the mobile phone when the mobile phone needs to keep the application program (such as APP1) alive in the non-volatile memory, the mobile phone can also save a part of the data (or called second data) of the running segment of the application program (for example, The part of the service data with strong user perception) is kept in the volatile memory, and another part of the data (or called the first data) (for example, the part of the service data with weak user perception) is transferred to the non-volatile memory .
  • User perception is the running speed of the application expected by the user.
  • the service with strong user perception is compared with the service with weak user perception.
  • the expected running speed of the user of the service with strong user perception is greater than that of the user of the service with weak user perception. desired operating speed.
  • the user switches APP1 to the background (at this time, the running segment data of APP1 will remain in the volatile memory), when APP2 is to be used, the mobile phone can load APP2 for the user use.
  • the mobile phone can instruct the volatile memory to load APP2 or APP1 from the disk (for example, the volatile memory is instructed to load APP2 or APP1 from the disk through the APP scheduling policy execution module), and when the volatile memory is loaded Complete the operation of APP2 or APP1 (for example, APP startup, APP-specific thread running, allocation of resources required by APP, etc.) in the non-volatile memory.
  • the volatile memory for example, APP startup, APP-specific thread running, allocation of resources required by APP, etc.
  • the mobile phone predicts that the user may continue to use APP1 in the future, and the mobile phone can keep APP1 alive according to the prediction result.
  • the mobile phone can instruct the volatile memory to keep a part of the data of the running segment of APP1 (or called the first running segment of APP1) in the volatile memory, and keep another part of the data of the running segment of APP1 (or called the first running segment of APP1) in the volatile memory.
  • APP1 second running segment is transferred to non-volatile memory to keep APP1 alive.
  • the mobile phone can instruct the non-volatile memory to transfer the data of the second running segment of APP1 to the volatile memory, so that the mobile phone is in the easy-to-use memory.
  • the APP1 (that is, the first running segment and the second running segment of the running APP1, that is, the running segment where the APP1 is running) continues to run in the volatile memory for the user to continue to use.
  • the mobile phone can also gradually keep the first running segment of APP1 in the volatile memory. Moved to non-volatile memory. Thus, the space of the volatile memory occupied by the data of APP1 is reduced.
  • the power consumption problem may also be ignored, and all applications in the background that are predicted to be continued to be used by the user may be kept alive.
  • the central processing unit uses random access memory (RAM), such as DDR3, DDR4, DDR5, etc., for fast data access, and uses storage (such as HDD hard disk, or SSD solid-state hard disk) to Persistent access to data.
  • RAM random access memory
  • storage such as HDD hard disk, or SSD solid-state hard disk
  • DDR-SDRAM is a power-down volatile device.
  • DDR-SDRAM In order to save data, DDR-SDRAM needs to constantly "refresh" the stored data - due to semiconductor leakage, the data needs to be rewritten regularly - which consumes high power consumption; in addition, when the system encounters a sudden power failure , its stored content will be lost.
  • Storage for persistent access to data is a slow device.
  • the system wants to write data to Storage it usually encounters long delays and waits.
  • the IO (Input output) performance caused by the synchronous disk write command (Sync Write) of key data drops instantly.
  • Some embodiments of the present application provide a memory that mixes volatile and non-volatile storage media, which can implement at least one of the following:
  • OS Operating System
  • the fast-access data can be powered off without losing it, and the power can be powered off after the writing is completed, so as to ensure power saving.
  • some embodiments provided by the present application may include one or more of the following (multiple sub-items in each item can be selected according to actual conditions to adopt one sub-item or multiple sub-items):
  • the volatile storage medium may be, for example, DDR, DDR2, DDR3, DDR4, HBM (ultra-wideband), and the like.
  • the non-volatile storage medium can be: for example, SLC-NAND, MRAM (Magnetic Radom Access Memory), RRAM (Resistance Radom Access Memory), PCRAM (Phase change Radom Access Memory), etc.
  • Volatile storage media and non-volatile storage media connected to the storage controller.
  • it can be connected to the same storage controller, or it can be connected to different storage controllers.
  • the storage controller (Controller), Substrate (substrate) and the volatile (Volatile) and non-volatile (None-Volatile) storage media on it are encapsulated inside a Package (encapsulation shell) and present a bus interface to the outside world .
  • the package can be Flip-Package, BGA (Ball Grid Array, Ball Grid Array), WLCSP (Wafer Level Chip Scale Package, Wafer Level Chip Scale Package) and the like.
  • the bus interface may be an interface, eg, a JEDEC-compliant DDR4 interface.
  • the bus interface can be two or more interfaces, for example, two sets of DDR4 interfaces conforming to the JEDEC specification.
  • the same physical address end points to volatile or non-volatile memory, and the physical address segments of each other do not overlap (parallel mode).
  • the same physical address segment can point to both volatile memory and non-volatile memory, and their physical addresses overlap each other (shadow mode shown in FIG. 18 ).
  • some physical address ends can point to both volatile memory and non-volatile memory, and their physical addresses overlap each other (shadow mode); while other physical address ends point to volatile or non-volatile memory memory, the physical address segments of each other do not coincide (parallel mode as shown in Figure 18).
  • connection 1902 is an internal connection.
  • 1903 is DDR4, 8Gbx4 constitutes a volatile memory group, 1904 is FastNVM, and 1Gbx4 constitutes a non-volatile memory group.
  • 1905 is responsible for the interface with the Host for the DDR controller, and is also responsible for managing the DDR4 group and the Fast NVM group.
  • the device is a mixed memory of 4GB+1GB.
  • 1906 is a plastic case, on which the device model number is marked. Others, such as glue and Filler, are omitted in the schematic diagram.
  • 1901 is the SubStrate substrate.
  • 1903 is DDR4, 8Gbx4 constitutes a volatile memory group, and
  • 1904 is a FastNVM 1Gbx4 that constitutes a non-volatile memory group.
  • the bottom is the BGA pad 1907, and the pitch is 0.45mm.
  • the DDR4 1903 may be a Micron DDR4 particle of the 1Alpha nm process node; the FastNVM 1904 (NVM: None-Volatile Memory) may be a Global Foundry 1Gb DDR4 particle of the 28nm node; the DDR controller may be an ASIC ( 22nm node custom controller developed by Application Specific IC; IC: Integrated Chip).
  • the substrate can be 0.15mm; the bonding wire can be gold wire; after the device packaging is completed, the Package Level test can be performed on the ATE (Auto Test Equipment) machine.
  • the system on chip accesses the hybrid storage (Hybrid DDR4-SDRAM) through the DDR4 (Dual-Data Rate 4) bus interface, and can access its internal non-volatile memory by accessing different physical address segments. Volatile or volatile memory.
  • the physical address segment seen by the Host can access both volatile and non-volatile memory at the same time. For example, by configuring the MR and storage of mixed storage particles, set different Modes to access different memories.
  • the volatile memory can also be HBM (High Bandwidth memory) ultra-wideband 3D-DRAM, such as HBM with a width of 512bits and a capacity of 1GB;
  • HBM High Bandwidth memory
  • the non-volatile memory can also be, for example, 3D-Xpoint PCM (Phase Change Memory) phase change memory, or RRAM (Resistance Radom Access Memory) resistive memory, or 3D-SLC NAND flash memory, and so on.
  • 3D-Xpoint PCM Phase Change Memory
  • RRAM Resistance Radom Access Memory
  • connection between the Host and the hybrid memory can also be to access different types of internal memory through two sets of DDR4 interfaces respectively; or to access the volatile memory through the DDR4 interface and access the non-volatile memory through PCIe4.0x4.
  • the main difference between the Intel Optane DIMM (Dual Inline Memory Module, in-line memory module) particle and some embodiments of the present application is that it is not a chip, but a PCB board, which cannot be flexibly used as a device; it is The 3D-Xpoint non-volatile medium is made into a memory stick, but it is not made into a volatile medium, and it is not a hybrid type.
  • the main difference between the hybrid DIMM strip and some embodiments of the present application is that its non-volatile memory Host cannot be accessed, and only when the system is powered down, a control chip on the DIMM strip is used for external backup power. Next, quickly move the memory data to FLASH to save; it is not a chip, but a PCB (Printed Circuit Board) board, which cannot be used flexibly as a device.
  • PCB Printed Circuit Board
  • the electronic device can predict the user's operation behavior based on machine learning, so as to preload the corresponding application program before the user opens the application program, so that when the user opens the corresponding application program, the mobile phone There is no need to load the application, and the interface of the application can be directly entered, which improves the startup speed of the application when the user opens the application.
  • the user's operation behavior can be predicted, and the application switched to the background can be kept alive, so that the electronic device can continue to run the corresponding application without reloading after the user switches back to the application. , to improve application responsiveness.
  • the embodiments of the present application further provide an apparatus for accelerating application execution.
  • the apparatus can be applied to electronic equipment for implementing the methods in the foregoing embodiments.
  • the functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • FIG. 21 shows a schematic structural diagram of an apparatus for accelerating application program execution. As shown in FIG. 21 , the apparatus includes: a display module 2101 , a processing module 2102 , and the like.
  • the processing module 2102 can be configured to load the first application in the second memory when predicting that the user will use the first application according to the user portrait and/or preset prediction rules; receive the user to open the first application The first operation of the program; in response to the first operation, transfer the data of the first application program in the second memory to the first memory.
  • the display module 2101 can be configured to display the interface of the first application program according to the data of the first application program in the first memory.
  • the processing module 2102 is specifically configured to predict that the user will start the first application program; load the data of the first application program from the disk of the electronic device into the second memory.
  • the data of the first application program includes first data and second data, and the user's expected running speed of the service corresponding to the first data is lower than the user's expected running speed of the service corresponding to the second data; processing The module 2102 is specifically configured to load the first data of the first application program from the disk into the second memory; the processing module 2102 is further configured to load the second data of the first application program from the disk into the first memory.
  • the processing module 2102 is specifically configured to predict that the user will switch the first application running in the background to the foreground running; transfer all or part of the data of the first application from the first memory into the second memory.
  • the data of the first application program includes first data and second data, and the user's expected running speed of the service corresponding to the first data is lower than the user's expected running speed of the service corresponding to the second data; processing Module 2102 is specifically configured to transfer the first data of the first application from the first memory to the second memory; the second data is retained in the first memory.
  • the processing module 2102 is specifically configured to, according to at least one of the current time, the current location of the electronic device and the current operation of the user, from the user portrait and/or the prediction rule When the application program associated with the matched user behavior is the first application program, it is predicted that the user will use the first application program.
  • the prediction rule includes at least one of the following: when receiving an operation of the user searching for the first application program, predicting that the user will start the first application program; when receiving the user's installation of the first application program When the operation is performed, it is predicted that the user will start the first application; when it is received that the user opens the application classification folder containing the first application, it is predicted that the user will start the first application; among the applications in the application classification file, the first application An application includes outstanding business.
  • the processing module 2102 is further configured to count the user behavior of the user on the electronic device, generate a user portrait according to the statistical user behavior, and save the user portrait.
  • the user behavior includes at least one of the following: user operation, user The execution time of the operation, the position of the electronic device when the user operation is performed.
  • units in the above apparatus is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated.
  • all the units in the device can be realized in the form of software calling through the processing element; also can all be realized in the form of hardware; some units can also be realized in the form of software calling through the processing element, and some units can be realized in the form of hardware.
  • each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function.
  • all or part of these units can be integrated together, and can also be implemented independently.
  • the processing element described here may also be called a processor, which may be an integrated circuit with signal processing capability.
  • each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
  • the units in the above apparatus may be one or more integrated circuits configured to implement the above method, such as: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of at least two of these integrated circuit forms.
  • the processing element can be a general-purpose processor, such as a CPU or other processors that can invoke programs.
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • the unit of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler.
  • the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the method described in the above method embodiments.
  • the storage element may be a storage element on the same chip as the processing element, ie, an on-chip storage element.
  • the program for performing the above method may be in a storage element on a different chip from the processing element, ie, an off-chip storage element.
  • the processing element calls or loads the program from the off-chip storage element to the on-chip storage element, so as to call and execute the methods described in the above method embodiments.
  • an embodiment of the present application may further provide an apparatus, such as an electronic device, which may include a processor and a memory for storing instructions executable by the processor.
  • an electronic device which may include a processor and a memory for storing instructions executable by the processor.
  • the processor When the processor is configured to execute the above-mentioned instructions, the electronic device implements the method for accelerating the execution of an application program described in the foregoing embodiments.
  • the memory may be located within the electronic device or external to the electronic device.
  • the processor includes one or more.
  • the unit of the apparatus for implementing each step in the above method may be configured as one or more processing elements, and these processing elements may be provided on the corresponding electronic equipment described above, and the processing elements here may be integrated circuits , for example: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form chips.
  • an embodiment of the present application further provides a chip, which can be applied to the above-mentioned electronic device.
  • the chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit, so as to realize the above method embodiments. Methods.
  • Embodiments of the present application further provide a computer program product, including computer instructions for running an electronic device, such as the above-mentioned electronic device.
  • the disclosed apparatus and method may be implemented in other manners.
  • 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 may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to cause a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all of the methods described in the various embodiments of the present application. or part of the steps.
  • the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.
  • the embodiments of the present application may further provide a computer-readable storage medium on which computer program instructions are stored.
  • the electronic device is made to implement the method for accelerating the execution of an application program as described in the foregoing method embodiments.

Landscapes

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

Abstract

一种应用程序运行加速的方法及设备,涉及人工智能领域,解决了在用户启动应用程序时,应用程序启动响应速度相对较慢的问题。具体方案为:应用于具有第一内存和第二内存的电子设备,第一内存是采用易失性存储介质的内存,第二内存是采用非易失性存储介质的内存。电子设备根据用户画像和/或预设的预测规则,在预测到用户将要使用第一应用程序时,在第二内存中加载第一应用程序;接收用户开启第一应用程序的第一操作;响应于第一操作,将第二内存中的第一应用程序的数据转移到第一内存中;根据第一内存中的第一应用程序的数据,显示第一应用程序的界面。

Description

一种应用程序运行加速的方法及设备
本申请要求于2021年05月21日提交国家知识产权局、申请号为202110559574.2、申请名称为“一种应用程序运行加速的方法及设备”的中国专利申请的优先权,要求于2021年02月09日提交国家知识产权局、申请号为202110182539.3、申请名称为“一种应用程序运行加速的方法及设备”的中国专利申请的优先权,要求于2021年02月09日提交国家知识产权局、申请号为202110182302.5、申请名称为“一种混合易失型与非易失型存储介质的器件实现方法及其装置”的中国专利申请的优先权,以及要求于2021年02月10日提交国家知识产权局、申请号为202110185585.9、申请名称为“一种应用程序运行加速的方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及人工智能领域,尤其涉及一种应用程序运行加速的方法及设备。
背景技术
随着智能手机的不断发展,性能不断升级,功能也不断丰富,人们使用智能手机的频率越来越高。一般智能手机通过内部安装的各种应用程序(application,APP)来实现丰富的功能。例如,用户可以通过智能手机上安装的有声书类APP收听有声小说或播客等。又例如,用户可以通过智能手机上安装的导航类APP进行出行导航、查看实时路况等。
通常,用户在使用智能手机上安装的某个应用程序时,首先需要打开该应用程序,等待智能手机将该应用程序加载完成之后,用户才能够使用该应用程序。智能手机对应用程序进行加载时,通常需要将应用程序的可执行代码载入到内存中,并获取应用程序所需的一些资源,以及加载应用程序运行所需的相关线程,需要一定的加载时间。因此,在用户启动应用程序时,需要较长的等待时间以等待智能手机将应用程序加载完成,应用程序启动响应速度相对较慢。
发明内容
本申请实施例提供一种应用程序运行加速的方法及设备,解决了在用户启动应用程序时,应用程序启动响应速度相对较慢的问题。
为了达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供一种应用程序运行加速的方法,该方法可应用于电子设备。该电子设备包括第一内存和第二内存,第一内存是采用易失性存储介质的内存,第二内存是采用非易失性存储介质的内存,该方法包括:根据用户画像和/或预设的预测规则,在预测到用户将要使用第一应用程序时,在第二内存中加载第一应用程序;接收用户开启第一应用程序的第一操作;响应于第一操作,将第二内存中的第一应用程序的数据转移到第一内存中;根据第一内存中的第一应用程序的数据,显示第一应用程序的界面。
采用上述技术方案,电子设备可以基于机器学习对用户的操作行为进行预测,以在用户打开应用程序之前,将相应的应用程序进行预加载,从而时用户打开相应的应用程序时,手机不需要再进行应用程序的加载,可以直接进入应用的界面,提高用户打开该应用程序时应用程序的启动速度。或者,在用户切换应用程序到后台后,可以预测用户 的操作行为,对切换到后台的应用程序进行保活,从而使用户切回应用程序后电子设备可继续运行相应的应用程序而不用重新加载,提高应用程序响应速度。
在一种可能的实现方式中,预测到用户将要使用第一应用程序,包括:预测到用户将要启动第一应用程序;在第二内存中加载第一应用程序,包括:将第一应用程序的数据从电子设备的磁盘加载到第二内存中。
如此,能够使电子设备在预测到用户可能要启动某个应用程序,如第一应用程序时,将第一应用程序预加载到第二内存中,从而当用户启动第一应用程序时电子设备能够直接启动第一应用程序而不需要再加载第一应用程序,从而提高用户启动应用程序时的响应速度。
在另一种可能的实现方式中,第一应用程序的数据包括第一数据和第二数据,用户对第一数据对应业务期望的运行速度小于用户对第二数据对应业务期望的运行速度;将第一应用程序的数据从电子设备的磁盘加载到第二内存中,包括:将第一应用程序的第一数据从磁盘加载到第二内存中;在预测到用户将要使用第一应用程序时,方法还包括:将第一应用程序的第二数据从磁盘加载到第一内存中。
由于第一内存采用易失性存储介质,第二内存采用非易失性存储介质,因此第一内存的读写速度高于第二内存,应用程序在第一内存中运行的速度更快。因此,通过上述方式,能够使电子设备预加载第一应用程序后,在用户启动第一应用程序时将第一应用程序用户期望运行速度更快的业务更加顺畅快速的进行响应,从而进一步提高用户启动应用程序时响应速度。
在另一种可能的实现方式中,预测到用户将要使用第一应用程序,包括:预测到用户会将处于后台运行的第一应用程序切换到前台运行;在第二内存中加载第一应用程序,包括:将第一应用程序的全部或部分数据从第一内存转移到第二内存中。
通常应用程序运行时是在电子设备的易失性内存中,如第一内存中,并且由于第一内存采用易失性存储介质,因此需要电量维持以保证数据不丢失,功耗较高。因此采用上述方式,能够使电子设备在预测到用户会将处于后台运行的某个应用程序,如第一应用程序切换到前台运行时,将第一应用程序从第一内存转移到第二内存进行保活,从而降低电子设备功耗,并且避免处于后台的第一应用程序占用第一内存造成第一内存占用较高其他应用程序运行卡顿的情况。
在另一种可能的实现方式中,第一应用程序的数据包括第一数据和第二数据,用户对第一数据对应业务期望的运行速度小于用户对第二数据对应业务期望的运行速度;将第一应用程序的部分数据从第一内存转移到第二内存中,包括:将第一应用程序的第一数据从第一内存转移到第二内存;第二数据保留在第一内存中。
由于第一内存采用易失性存储介质,第二内存采用非易失性存储介质,因此第一内存的读写速度高于第二内存,应用程序在第一内存中运行的速度更快。因此,通过上述方式,能够使电子设备保活第一应用程序后,在用户将第一应用程序切换到前台时将第一应用程序用户期望运行速度更快的业务更加顺畅快速的进行响应,从而进一步提高用户启动应用程序时响应速度。
在另一种可能的实现方式中,在根据当前的时间、电子设备当前所处的位置和用户当前的操作中的至少一种,从用户画像和/或预测规则中查询相匹配的用户行为关联的应用程序为第一应用程序时,预测用户将要使用第一应用程序。
如此,能够使电子设备根据时间,地点,操作等多种场景预测用户将要使用的应用 程序,从而提高预测的准确性。
在另一种可能的实现方式中,预测规则包括以下中的至少一个:当接收到用户搜索第一应用程序的操作时,预测用户将要启动第一应用程序;当接收到用户安装第一应用程序的操作时,预测用户将要启动第一应用程序;当接收到用户打开包含第一应用程序的应用分类文件夹时,预测用户将要启动第一应用程序;应用分类文件内的各应用程序中,第一应用程序包括未完成业务。其中,当接收到用户安装第一应用程序的操作时,预测用户要启动第一应用程序,对于第一应用程序的预加载,可以在安装第一应用程序的过程中边安装第一应用程序边预加载,也可以在第一应用程序安装完成之后再预加载。
如此,能够使电子设备根据用户的操作相对准确的联想出用户将要使用的应用程序。增强用户的使用体验。
在另一种可能的实现方式中,在根据用户画像和/或预设的预测规则,在预测到用户将要使用第一应用程序时,在第二内存中加载第一应用程序之前,方法还包括:统计用户对电子设备的用户行为,根据统计的用户行为生成用户画像,保存用户画像,用户行为包括以下至少一个:用户操作,用户操作的执行时间,执行用户操作时电子设备所处的位置。
第二方面,本申请实施例提供一种应用程序运行加速的装置,该装置可以应用于具有第一内存和第二内存的电子设备,用于实现上述第一方面中的方法。其中,第一内存是采用易失性存储介质的内存,第二内存是采用非易失性存储介质的内存。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,处理模块和显示模块等。
其中,处理模块,可以用于根据用户画像和/或预设的预测规则,在预测到用户将要使用第一应用程序时,在第二内存中加载第一应用程序;接收用户开启第一应用程序的第一操作;响应于第一操作,将第二内存中的第一应用程序的数据转移到第一内存中。显示模块,可以用于根据第一内存中的第一应用程序的数据,显示第一应用程序的界面。
在另一种可能的实现方式中,处理模块,具体用于预测到用户将要启动第一应用程序;将第一应用程序的数据从电子设备的磁盘加载到第二内存中。
在另一种可能的实现方式中,第一应用程序的数据包括第一数据和第二数据,用户对第一数据对应业务期望的运行速度小于用户对第二数据对应业务期望的运行速度;处理模块,具体用于将第一应用程序的第一数据从磁盘加载到第二内存中;处理模块,还用于将第一应用程序的第二数据从磁盘加载到第一内存中。
在另一种可能的实现方式中,处理模块,具体用于预测到用户会将处于后台运行的第一应用程序切换到前台运行;将第一应用程序的全部或部分数据从第一内存转移到第二内存中。
在另一种可能的实现方式中,第一应用程序的数据包括第一数据和第二数据,用户对第一数据对应业务期望的运行速度小于用户对第二数据对应业务期望的运行速度;处理模块,具体用于将第一应用程序的第一数据从第一内存转移到第二内存;第二数据保留在第一内存中。
在另一种可能的实现方式中,处理模块,具体用于在根据当前的时间、电子设备当前所处的位置和用户当前的操作中的至少一种,从用户画像和/或预测规则中查询相匹配的用户行为关联的应用程序为第一应用程序时,预测用户将要使用第一应用程序。
在另一种可能的实现方式中,预测规则包括以下中的至少一个:当接收到用户搜索第 一应用程序的操作时,预测用户将要启动第一应用程序;当接收到用户安装第一应用程序的操作时,预测用户将要启动第一应用程序;当接收到用户打开包含第一应用程序的应用分类文件夹时,预测用户将要启动第一应用程序;应用分类文件内的各应用程序中,第一应用程序包括未完成业务。
在另一种可能的实现方式中,处理模块,还用于统计用户对电子设备的用户行为,根据统计的用户行为生成用户画像,保存用户画像,用户行为包括以下至少一个:用户操作,用户操作的执行时间,执行用户操作时电子设备所处的位置。
第三方面,本申请实施例提供一种电子设备,包括:处理器,第一内存,第二内存,用于存储该处理器可执行指令的存储器。第一内存是采用易失性存储介质的内存,第二内存是采用非易失性存储介质的内存。该处理器被配置为执行上述指令时,使得该电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的应用程序运行加速的方法。
第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的应用程序运行加速的方法。
第五方面,本申请实施例提供一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的应用程序运行加速的方法。
应当理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
第六方面,本申请实施例提供一种混合易失型与非易失型存储介质的器件实现方法,其特征在于,应用于电子设备,所述方法包括:在同一个Substrate(基板)上,同时集成了易失型存储介质和非易失型存储介质,以及存储控制器;其中,易失型存储介质可以是:例如,DDR,DDR2,DDR3,DDR4,HBM(超宽带);非易失型存储介质可以是:例如,SLC-NAND,MRAM(Magnetic Radom Access Memory),RRAM(Resistance Radom Access Memory),PCRAM(Phase change Radom Access Memory)。
在一种可能的实现方式中,方法还包括:易失型存储介质和非易失型存储介质,连接到存储控制器,可以连接到同一个存储控制器,可以连接到不同的存储控制器。
在另一种可能的实现方式中,方法还包括:存储控制器(Controller)、Substrate(基板)及其上的易失型(Volatile)和非易失型(None-Volatile)存储介质,被封装在一个Package(封装外壳)内部,对外呈现出总线接口。
封装可以是Flip-Package、BGA(Ball Grid Array,球栅阵)、WLCSP(Wafer Level Chip Scale Package,晶片级别芯片规模封装)等;总线接口可以是一个接口,例如,符合JEDEC规范的DDR4接口;总线接口可以是二个或多个接口,例如,符合JEDEC规范的两组DDR4接口。
在另一种可能的实现方式中,方法还包括:当Host器件访问混合存储器时:
同一个物理地址端,指向易失型或者非易失型存储器,彼此的物理地址段不重合(并行模式);或者,同一个物理地址段,既可以指向易失型存储器,也可以指向非易失型存储器,彼此的物理地址重合(影子模式);或者,有些物理地址端,既可以指向易失型存储器,也可以指向非易失型存储器,彼此的物理地址重合(影子模式);而另一些物理地址端,指向易失型或者非易失型存储器,彼此的物理地址段不重合(并行模式)。
在另一种可能的实现方式中,方法还包括:并行模式时,掉电后再上电,非易失型存储器的数据依然保持、易失型存储器数据丢失。
在另一种可能的实现方式中,方法还包括:影子模式时,掉电后再上电,影子模式所属物理地址段的数据依然保持。
第七方面,本申请还提供一种电子设备,包括:存储器,一个或多个处理器;所述一个或多个处理器与所述存储器、所述摄像头、所述信号处理器、所述显示屏耦合连接;以及一个或多个计算机程序,其中,所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令;当所述指令被所述电子设备执行时,使得所述电子设备执行上述第六方面的方法。
第八方面,本申请还提供一种计算机可读存储介质,包括计算机指令,当所述计算机指令在计算机上运行时,使得所述计算机执行上述第六方面的方法。
附图说明
图1为本申请实施例提供的一种内部存储器的组成示意图;
图2为相关技术提供的一种打开应用程序的场景示意图;
图3为相关技术提供的另一种打开应用程序的场景示意图;
图4为相关技术提供的另一种打开应用程序的场景示意图;
图5为本申请实施例提供的一种电子设备的结构示意图;
图6为本申请实施例提供的一种应用程序运行加速的方法的流程示意图;
图7为本申请实施例提供的一种应用程序运行加速的方法应用时的场景示意图;
图8为本申请实施例提供的另一种应用程序运行加速的方法应用时的场景示意图;
图9为本申请实施例提供的另一种应用程序运行加速的方法应用时的场景示意图;
图10为本申请实施例提供的另一种应用程序运行加速的方法应用时的场景示意图;
图11为本申请实施例提供的另一种应用程序运行加速的方法应用时的场景示意图;
图12为本申请实施例提供的另一种应用程序运行加速的方法应用时的场景示意图;
图13为本申请实施例提供的一种应用程序运行加速的方法应用时的流程示意图;
图14为本申请实施例提供的另一种应用程序运行加速的方法应用时的流程示意图;
图15为本申请实施例提供的另一种应用程序运行加速的方法的流程示意图;
图16为本申请实施例提供的另一种应用程序运行加速的方法应用时的流程示意图;
图17为本申请实施例提供的另一种应用程序运行加速的方法应用时的流程示意图;
图18为本申请实施例提供的一种存储器的组成示意图;
图19为本申请实施例提供的一种存储器的结构示意图;
图20为本申请实施例提供的一种存储系统的组成示意图;
图21为本申请实施例提供的一种应用程序运行加速的装置的组成示意图。
具体实施方式
通常用户在使用手机上安装的应用程序时,需要先通过触摸点击的方式打开手机上的应用程序。在手机接收到用户打开应用程序的操作时,手机需要对应用程序进行加载,当手机将应用程序加载完成之后,用户才能够使用该应用程序。其中,如图1中的(a)所示,目前手机的内部存储器可以包括易失性内存112和磁盘111。其中,磁盘111采用非易失性存储介质,读写速度相对较慢,可以在掉电的情况下稳定存储不丢失存储内容,功耗较低,能够用于存储手机上安装的应用程序的数据,但不能用于应用程序的运行。易失性内存112采用易失性存储介质,读写速度较快,在存储时需要电量维持以保证存 储内容不丢失,功耗较高,能够用于加载和运行应用程序。手机中所有应用程序的数据均存储在磁盘111中,当手机加载应用程序时,可以将该应用程序的数据从磁盘111中加载到易失性内存112中,以使应用程序在易失性内存112中运行。
手机在加载应用程序时,通常需要将应用程序的可执行代码载入到内存(即易失性内存)中,并获取应用程序所需的一些资源,以及加载应用程序运行所需的相关线程。
例如,当用户需要打开手机上安装的有声书类APP,如,“听书”APP,收听有声小说时。如图2中的(a)所示,用户可以通过点击手机桌面中的“听书”APP的图标201,以打开“听书”APP。当手机接收到用户对“听书”APP的图标201的点击操作时,手机便加载启动该“听书”APP。手机加载该“听书”APP的过程中,如图2中的(b)所示,通常会显示该“听书”APP的启动页202(如,开屏广告页面,或者图中所示的包含APP图标的页面等)。从而避免手机在加载该“听书”APP时显示空白页,影响用户体验。当手机将“听书”APP加载完成之后,如图2中的(c)所示,手机显示的界面可以从“听书”APP的启动页202跳转到“听书”APP的应用页面203(如,应用首页)。从而用户可以通过点击“听书”APP的应用页面203内的相关内容以收听有声小说。例如,如图2中的(c)所示,手机显示的“听书”APP的应用页面203中包含有《三国演义》、《红楼梦》、《水浒传》以及《西游记》等小说的有声版本对应的封面图片。用户可以通过点击这些小说的封面图片,以使手机播放相应的小说。例如,当用户点击《三国演义》的封面图片时,手机接收到上述点击操作时,便能够播放《三国演义》的有声版本,以供用户收听。
又例如,当用户上班时,需要打开手机上安装的导航类APP,如,“地图”APP,查看上班线路的路况时。如图3中的(a)所示,用户可以通过点击手机桌面中的“地图”APP的图标301,以打开“地图”APP。当手机接收到用户对“地图”APP图标301的点击操作时,手机便加载启动该“地图”APP。手机加载该“地图”APP的过程中,如图3中的(b)所示,通常会显示该“地图”APP的启动页302(如,开屏广告页面,或者图中所示的包含APP图标的页面等)。从而避免手机在加载该“地图”APP时显示空白页,影响用户体验。当手机将“地图”APP加载完成之后,如图3中的(c)所示,手机显示的界面可以从“地图”APP的启动页302跳转到“地图”APP的地图界面303。在手机显示“地图”APP的地图界面303时,手机还需要加载获取手机的位置信息(即用户的位置定位),然后如图3中的(d)所示,手机才能显示出手机(或者说用户)在地图中的位置,以及手机位置附近的地图信息,以供用户查看路况。
在用户使用手机上安装的应用程序的过程中,还经常会出现应用程序间相互切换的场景。即,正在使用某个应用程序,如,第一应用程序时,又将另一个应用程序,如,第二应用程序切换到前台,相应地第一应用程序切换到后台。在使用第二应用程序一段时间后,再将第一应用程序切换回前台使用。在该场景下,通常受到手机的后台管理和电源管理策略限制,当用户使用第二应用程序时间过长或第二应用程序占用系统内存资源较多时,手机可能会将切换到后台的第一应用程序回收掉。此时,如果用户要从第二应用程序切换回第一应用程序,则手机需要重新加载第一应用程序(重新加载第一应用程序的过程与上述手机加载应用程序的过程类似),因此,用户需要等待第一应用程序的加载。
例如,如图4中的(a)所示,当用户正在使用电商类APP,如,“购物”APP进行购物时,手机弹出聊天类APP,如“信息”APP的消息提醒401。此时,如图4中的(a) 所示,用户可以点击该消息提醒401以打开“信息”APP。当手机接收到用户的上述操作时,如图4中的(b)所示,手机可以将“购物”APP切换到后台,并打开“信息”APP,显示聊天界面402。用户可以在“信息”APP的聊天界面402中回复消息,聊天等。在用户使用“信息”APP的过程中,由于手机内存不足或“购物”APP在后台的时间过长等原因,手机会将“购物”APP从后台回收掉。此时,当用户想要重新切回“购物”APP时,手机接收到用户的操作,如图4中的(c)所示,手机则需要重新加载“购物”APP,并在加载过程中显示“购物”APP的启动页403。
由以上可以看到,当用户打开手机上安装的应用程序,或用户切换回长时间未使用的上次使用的应用程序时,手机需要加载相应的应用程序。加载应用程序的过程中,由于需要将应用程序的可执行代码载入到内存中,并获取应用程序所需的一些资源,以及加载应用程序运行所需的相关线程。因此,用户需要较长的等待时间以等待手机将应用程序加载完成,应用程序启动响应速度相对较慢。
为了解决上述问题,本申请实施例提供了一种应用程序运行加速的方法。该方法可以应用于用户打开电子设备中安装的某个应用或在电子设备中开启的至少两个应用程序间来回切换的场景中。
在本申请实施例中,该应用程序运行加速的方法可以包括,在用户使用电子设备中安装的应用程序的过程中,电子设备对用户使用电子设备的操作行为进行观测和记录。之后,电子设备可根据记录的用户使用电子设备的操作行为,生成能够表示用户使用应用程序的使用习惯的用户画像信息。后续用户使用电子设备过程中,在特定时间范围内、特定地点范围内、特定操作时或者上述三种的任意组合发生时,电子设备可根据观测到的用户使用电子设备的操作行为,以及用户画像信息和/或预设的预测规则,对用户可能要打开(即启动)的应用程序进行预测,以得到预测的应用程序(即用户将要使用的应用程序,如第一应用程序)。电子设备可根据预测结果,对相应的应用程序(即预测的应用程序)进行预加载,当用户操作打开预测的应用程序时,电子设备便能够直接启动该应用程序。或者,电子设备可根据观测到的用户使用电子设备的操作行为,以及用户画像信息,对用户切换到后台的应用程序是否还会继续使用进行预测。若电子设备预测到切换到后台的应用程序用户可能还会继续使用,则电子设备可对该应用程序状态进行保活。从而当用户切换回该应用程序时,电子设备可继续运行该应用程序,而无需重新加载。
其中,如图1中的(b)所示,电子设备的内部存储器可以包括磁盘121,易失性内存122(在本申请中可称为第一内存)以及非易失性内存123(在本申请中可称为第二内存)。该磁盘121与相关技术中电子设备(如手机)内的磁盘相同,采用非易失性存储介质,读写速度相对较慢,可以在掉电的情况下稳定存储不丢失存储内容,功耗较低。能够用于存储电子设备上安装的应用程序的数据,但不能用于应用程序的运行。而易失性内存122和非易失性内存123均为内存。易失性内存122采用易失性存储介质,读写速度较快,在存储时需要电量维持以保证存储内容不丢失,功耗较高,能够用于加载和运行应用程序。非易失性内存123的读写速度稍低于易失性内存122。非易失性内存123采用非易失性存储介质,但其作为内存与同样采用非易失性存储介质的磁盘121不同,非易失性内存的读写速度远高于磁盘121的读写速度,可以用做低优先级应用程序、进程的运行态载体(即运行低优先级应用程序、进程),而磁盘121不能运行应用程序、进程等。示例地,当电子设备需要预加载应用程序时,可以将应用程序从磁盘121预加载到非易失性内存123中;或者当电子设备需要保活应用程序时,可以将应用程序保活在 非易失性内存123中。
如此,电子设备可以基于机器学习对用户的操作行为进行预测,以在用户打开应用程序之前,将相应的应用程序进行预加载,从而时用户打开相应的应用程序时,手机不需要再进行应用程序的加载,可以直接进入应用的界面,提高用户打开该应用程序时应用程序的启动速度。或者,在用户切换应用程序到后台后,可以预测用户的操作行为,对切换到后台的应用程序进行保活,从而使用户切回应用程序后电子设备可继续运行相应的应用程序而不用重新加载,提高应用程序响应速度。
以下,将结合附图对本申请实施例提供的应用程序运行加速的方法进行说明。
在本申请实施例中,上述电子设备可以是手机、平板电脑、手持计算机,PC,蜂窝电话,个人数字助理(personal digital assistant,PDA),可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,智能投影仪,智能电视盒,以及增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等。本申请实施例对于电子设备的具体设备形态不作特殊限制。
在本申请实施例中,上述电子设备是可以运行操作系统,安装应用程序的电子设备。可选地,电子设备运行的操作系统可以是
Figure PCTCN2021121460-appb-000001
系统,
Figure PCTCN2021121460-appb-000002
系统等。
示例地,以电子设备为手机为例,图5示出了本申请实施例提供的一种电子设备的结构示意图。也即,示例性的,图5所示的电子设备可以是手机。
如图5所示,手机可以包括处理器510,外部存储器接口520,内部存储器521,通用串行总线(universal serial bus,USB)接口530,充电管理模块540,电源管理模块541,电池542,天线1,天线2,无线通信模块560,音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,传感器模块580,按键590,马达591,指示器592,摄像头593以及显示屏594等。
可选地,手机还可以包括移动通信模块550,用户标识模块(subscriber identification module,SIM)卡接口595等。
其中,传感器模块580可以包括压力传感器580A,陀螺仪传感器580B,气压传感器580C,磁传感器580D,加速度传感器580E,距离传感器580F,接近光传感器580G,指纹传感器580H,温度传感器580J,触摸传感器580K,环境光传感器580L,骨传导传感器580M等。
可以理解的是,图5所示的结构并不构成对手机的具体限定。在一些实施例中,手机也可以包括比图5所示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置等。又或者,图5所示的一些部件可以以硬件,软件或软件和硬件的组合实现。
处理器510可以包括一个或多个处理单元,例如:处理器510可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。控制器可以是手机的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器510中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器510中的存储器为高速缓冲存储器。该存储器可以保存处理器510刚用过或循环使用的 指令或数据。如果处理器510需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器510的等待时间,因而提高了系统的效率。
在一些实施例中,处理器510可以包括一个或多个接口。接口可以包括集成电路(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)接口,SIM接口,和/或USB接口等。
充电管理模块540用于从充电器接收充电输入。充电管理模块540为电池542充电的同时,还可以通过电源管理模块541为手机供电。电源管理模块541用于连接电池542,充电管理模块540,以及处理器510。电源管理模块541也可接收电池542的输入为手机供电。
手机的无线通信功能可以通过天线1,天线2,移动通信模块550,无线通信模块560,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。手机中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
当手机包括移动通信模块550时,移动通信模块550可以提供应用在手机上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块550可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块550可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块550还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块550的至少部分功能模块可以被设置于处理器510中。在一些实施例中,移动通信模块550的至少部分功能模块可以与处理器510的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器570A,受话器570B等)输出声音信号,或通过显示屏594显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器510,与移动通信模块550或其他功能模块设置在同一个器件中。
无线通信模块560可以提供应用在手机上的包括无线局域网(wireless local area networks,WLAN)(如Wi-Fi网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),NFC,红外技术(infrared,IR)等无线通信的解决方案。无线通信模块560可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块560经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器510。无线通信模块560还可以从处理器510接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机的天线1和移动通信模块550耦合,天线2和无线通信模块560耦合,使得手机可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术 可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或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)。
手机通过GPU,显示屏594,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏594和应用处理器。处理器510可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏594用于显示图像,视频等。显示屏594包括显示面板。显示面板可以采用液晶显示屏(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)等。在一些实施例中,手机可以包括1个或N个显示屏594,N为大于1的正整数。
手机可以通过ISP,摄像头593,视频编解码器,GPU,显示屏594以及应用处理器等实现拍摄功能。在一些实施例中,手机可以包括1个或N个摄像头593,N为大于1的正整数。
外部存储器接口520可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机的存储能力。外部存储卡通过外部存储器接口520与处理器510通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器521可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器510通过运行存储在内部存储器521的指令,从而执行手机的各种功能应用以及数据处理。内部存储器521可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器521可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
手机可以通过音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
当然,可以理解的,上述图5所示仅仅为终端的设备形态为手机时的示例性说明。若终端是平板电脑,手持计算机,PC,PDA,可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,以及AR/VR设备等其他设备形态时,终端的结构中可以包括比图5中所示更少的结构,也可以包括比图5中所示更多的结构,在此不作限制。
以下实施例中的方法均可以在具有上述硬件结构的电子设备中实现。下面将结合附图对本申请实施例进行举例说明。
在本申请实施例中,电子设备可以根据用户的应用程序使用习惯和/或预设的预测规 则对应用程序预测和预加载。
以电子设备为手机,电子设备预测用户可能要打开的应用程序并进行预加载为例。图6示出了本申请实施例提供的一种应用程序运行加速的方法的流程示意图。如图6所示,该应用程序运行加速的方法可以包括以下S601-S603。
S601、手机生成用户画像。其中,用户画像可以包括用户使用手机以及应用程序的使用习惯。
作为一种实施方式,手机可以通过观测用户使用手机过程中用户的操作行为,根据观测到的操作行为生成用户画像。示例地,用户的操作行为可以包括用户使用某个应用程序时的环境(如,时间,地点等),用户使用某个应用程序所进行的操作等。例如,手机观测的用户操作行为是“早上八点在桌面上点击有声书类APP,(如“听书”APP)的图标,进入有声书类APP收听有声小说”,“早上八点十五分在车库打开导航类APP(如“地图”APP)查询路况”等。手机观测到这些用户的操作行为后,可以将这些操作行为存储记录起来,以便根据这些操作行为生成用户画像。示例地,手机可以对观测得到的这些用户的操作行为中,相同操作行为发生的次数进行统计。然后,根据一定的时间周期(如,最近一周,最近一个月或最近三个月等)对各种操作行为发生的频率进行计算。最终,手机可以将发生频率高于一定阈值的操作行为作为用户使用手机已经应用程序的使用习惯,并根据各种操作行为的发生频率的大小进行排序。例如,手机观测并存储的用户的操作行为可以包括:早上八点起床,并打开有声书类APP收听有声小说。早上在车库会打开导航类APP查看路况。早上八点起床,并打开新闻类APP浏览新闻。通过“办公”APP打开文档。通过“文本”APP打开文档。其中,手机通过对最近一个月存储的用户的操作行为进行统计,早上八点起床,并打开有声书类APP收听有声小说,该行为最近一个月发生的频率为90%。早上在车库会打开导航类APP查看路况,该行为最近一个月发生的频率为80%。早上八点起床,并打开新闻类APP浏览新闻,该行为最近一个月发生的频率为30%。通过“办公”APP打开文档,该行为最近一个月发生的频率为88%。通过“文本”APP打开文档,该行为最近一个月发生的频率为10%。此时,手机可以将发生频率高于60%的操作行为作为用户使用习惯以生成用户画像。即手机生成的用户画像可以包括:用户一般早上八点起床,并打开有声书类APP收听有声小说。用户一般早上到车库后会打开导航类APP查看路况。用户需要打开文档时一般通过“办公”APP打开文档。
当然,在其他一些实施方式中,手机还可以通过其他方式生成用户画像。例如,手机向用户展示应用程序使用习惯的问卷,然后根据用户填写的问卷信息生成用户画像等,此处不做限制。另外,在其他一些实施方式中,用户画像(即用户的习惯)还可以通过序列预测、频繁模式挖掘等机器学习方法得到。
S602、手机根据当前所处的场景,以及用户画像和/或预设的预测规则,预测用户可能要打开的应用程序。
作为一种实施方式,手机可以根据当前所处的场景,在用户画像中查询对应的用户操作行为(或称为使用习惯、用户行为),然后根据查询到的用户操作行为预测与该操作行为相对应的应用程序为用户可能要打开的应用程序。
例如,用户画像中有一个用户操作行为(或称为用户行为)是“用户一般在处理图片时采用APP1”。因此,如图7中的(a)所示,当用户在手机中打开某个图片,并准备处理图片(如,修图等)时。手机弹出可供用户选择的安装在手机中的处理图片的应用程 序(如,包括APP1、APP2、APP3等)。当手机观测到用户的上述操作时(即手机观测到用户准备处理图片的场景),则手机可以根据该场景在用户画像中进行查询。此时,手机查询到用户画像中有一个用户操作行为是“用户一般在处理图片时采用APP1”,因此,手机可以根据该操作行为预测用户可能要打开APP1,从而便于后续手机根据预测对APP1进行预加载。当用户点击APP1的图标以打开APP1时,如图7中的(b)所示,手机接收到用户打开APP1的操作后,可以直接根据预加载打开该APP1进入到应用界面701。
又例如,用户画像中有一个用户操作行为(或称为用户行为)是“用户需要打开文档时一般采用APP1打开文档”。因此,如图8中的(a)所示,当用户在手机中打开某个文档时,手机弹出可供用户选择的安装在手机中的可打开文档的应用程序(如,包括APP1、APP2、APP3等)。当手机观测到用户的上述操作时(即手机观测到用户准备打开文档的场景),则手机可以根据该场景在用户画像中进行查询。此时,手机查询到用户画像中有一个用户操作行为是“用户需要打开文档时一般采用APP1打开文档”。因此,手机可以根据该操作行为预测用户可能要打开APP1,从而便于后续手机根据预测对APP1进行预加载。当用户点击APP1的图标以打开APP1时,如图8中的(b)所示,手机接收到用户打开APP1的操作后,可以直接根据预加载打开该APP1进入到应用界面801。
又例如,用户画像中有一个用户操作行为(或称为用户行为)是“用户经常玩游戏APP1”。因此,如图9所示,当用户在手机中打开应用分类文件夹“游戏”时,手机可显示手机中安装的各个游戏APP(如,包括游戏APP1、游戏APP2、游戏APP3等)。当手机观测到用户的上述操作时(即手机观测到用户打开了“游戏”应用分类文件夹,准备玩游戏的场景),则手机可以根据该场景在用户画像中进行查询。此时,手机查询到用户画像中有一个用户操作行为是“用户经常玩游戏APP1”。因此,手机可以根据该操作行为预测用户可能要打开游戏APP1,从而便于后续手机根据预测对游戏APP1进行预加载。其中,在一些其他实施方式中,当用户打开某个应用分类文件夹时,手机还可以根据该应用分类文件夹中是否存在某个应用程序(如第一应用程序)具有用户未完成业务来预测用户可能要打开该应用程序,从而对该应用程序进行预加载。用户未完成的业务可以是用户曾经打开该应用程序进行业务操作,关闭应用程序后相应业务操作的进程或业务流程还没有结束等。例如,如图10所示,当用户在手机中打开应用分类文件夹“购物”时,手机可以显示手机中安装的各个购物APP(如,包括购物APP1、购物APP2、购物APP3等)。当手机观测到用户的上述操作时(即手机观测到用户打开了“购物”应用分类文件夹,准备进行购物的场景),则手机可以查询用户使用各个购物APP的历史操作,然后根据历史操作确定某个购物APP(如购物APP1)中有用户购买物品的业务还未完成(如用户在购物APP1中购买了物品,该物品正在运输中还没有到货),此时手机可以预测用户可能要打开购物APP1,从而便于后续手机根据预测对购物APP1进行预加载。使手机能够在用户打开“购物”应用分类文件夹准备启动购物APP1查看购买的物品的物流信息时,提前对购物APP1进行预加载提高用户打开购物APP1的响应速度。需要说明的是,当手机预测到用户可能会打开的应用程序不止一个时,手机还可以根据预测到的应用程序的优先级(通常可以对不同应用程序预设优先级)的不同来分配预测到的应用程序可预加载的配额,从而使手机可以根据配额分别预加载相应的应用程序。例如,以图10所示为例,在用户打开“购物”应用分类文件夹时,手机可以根据购物APP1存在未完成业务预测用户可能要打开购物APP1,还根据用户画像中用户经常使用购物APP2 而预测用户可能要打开购物APP2。此时,手机可以根据预先设置的优先级,如根据未完成业务预测出的应用程序的优先级低于根据用户画像预测出的应用程序(即购物APP1的优先级低于购物APP2的优先级),对购物APP1和购物APP2可预加载的配额进行分配。如,低优先级的购物APP1分配可预加载的配额为70%(即购物APP1可预加载全部数据的70%),高优先级的购物APP2分配可预加载的配额为30%(即购物APP2可预加载全部数据的30%)。从而手机可以根据对购物APP1和购物APP2分配的配额分别预加载购物APP1和购物APP2。
当然,上述仅为手机预测用户要打开的应用程序的示例。在实际应用中,还可以包括其他实施示例。例如,当手机观测到时间快到早上八点了(如,当前时间为七点五十八分),手机查询到用户画像中有一个用户操作行为是“用户通常早上八点起床,并打开有声书APP收听有声书”。则手机此时可以预测到用户将要打开有声书APP,从而便于后续手机根据预测对有声书APP进行预加载。或者,当手机观测到时间快到早上八点半了(如,当前时间为八点二十分),手机查询到用户画像中有一个用户操作行为是“用户通常在早上八点半至九点,打开新闻APP浏览新闻”。则手机此时可以预测到用户将要打开新闻APP,从而便于后续手机根据预测对新闻APP进行预加载。又或者,当手机观测到时间快到中午十二点了(如,当前时间为十二点五十分),手机查询到用户画像中有一个用户操作行为是“用户通常在中午十二点至十三点,打开外卖APP点外卖”。则手机此时可以预测到用户将要打开外卖APP,从而便于后续手机根据预测对外卖APP进行预加载。又或者,当手机观测到时间快到晚上二十点了(如,当前时间为十九点五十五分),手机查询到用户画像中有一个用户操作行为是“用户通常在二十点至二十一点,打开游戏APP玩游戏”。则手机此时可以预测到用户将要打开游戏APP,从而便于后续手机根据预测对游戏APP进行预加载。又或者,当手机观测到手机当前所处位置(或者说用户所处位置)为地铁站,手机查询到用户画像中有一个用户操作行为是“用户通常在地铁站使用乘车APP扫码乘车”。则手机此时可以预测到用户将要打开乘车APP,从而便于后续手机根据预测对乘车APP进行预加载。
作为另一种实施方式,手机还可以根据当前所打开的应用(即用户打开某个应用时的场景),在用户画像中查询对应的用户操作行为(或称为使用习惯),然后根据查询到的用户操作行为预测与该操作行为相对应的应用程序为用户可能要打开的应用程序。
例如,用户在打开外卖APP后准备点外卖时,通常还会再打开点评APP以查看外卖商家的相关点评。用户在打开银行APP后查看资产信息时,通常还会再打开支付理财APP进行理财或支付等操作。用户在打开美颜APP后准备修图时,通常还会再打开图库APP来选择图片。因此,用户画像中还可以包括用户打开某个应用程序后,还会再打开另一个应用程序的操作行为。如,用户打开外卖APP后,还会再打开点评APP。用户打开银行APP后,还会再打开支付理财APP。用户打开美颜APP后,还会再打开图库APP等。当手机观测到用户打开了外卖APP后,会查询用户画像中的用户操作行为,从而预测用户将要打开点评APP。相应地,手机观测到用户打开了银行APP后,会预测用户将要打开支付理财APP。手机观测到用户打开了美颜APP后,会预测用户将要打开图库APP。
作为另一种实施方式,手机还可以根据用户当前的操作行为(即用户进行某项操作时的场景),按照预设的预测规则,预测用户可能要打开的应用程序。
例如,预设的预测规则包括“当用户搜索安装的应用程序时,则预测用户可能要打开搜索的应用程序”。因此,如图11所示,当用户在手机中搜索安装的某个应用程序(如 APP1)时,手机可以显示出用户搜索的应用程序,如APP1。此时,手机可以根据预设的预测规则预测用户将要打开搜索的APP1,从而便于后续手机根据预测对APP1进行预加载。
又例如,预设的预测规则包括“当用户下载某个应用程序(如APP1)时,则预测用户可能要打开下载的应用程序”。因此,示例地,如图12中的(a)所示,当用户在手机应用市场中通过点击操作下载APP1时,手机可以响应于用户的点击操作下载并安装该APP1。当手机下载并安装完成APP1时,如图12中的(b)所述,手机可以显示下载完成的界面,在该下载完成的界面中包括有便于用户打开APP1的操作控件(例如,图中所示的“打开”按钮1201)。在用户还没有通过点击“打开”按钮1201等操作来打开APP1时,手机可以根据预设的预测规则预测用户将要打开下载的APP1,从而便于后续手机根据预测对APP1进行预加载。
当手机预测到用户可能将要打开的应用程序后,手机可以对该应用程序进行预加载。其中,手机对应用程序的预加载可以包括加载应用程序的运行必需线程或进程,还可以加载应用程序某些业务所需的线程或资源。例如,手机可以根据用户画像中相应的用户操作行为预加载应用程序相应的内容。如,用户画像中有用户通常打开新闻APP后会滑动应用界面以刷新内容,然后再点击某个板块进行收听或查看的操作行为。此时,当手机预测到用户可能将要打开新闻APP时,手机可以将新闻APP的运行必需进程或线程进行预加载,还会将实现刷新应用界面内容,以及用户常点击的某个板块的相关资源内容所需的线程或资源进行预加载。以便于用户打开新闻APP时,应用界面的内容已经刷新好,用户常点击的某个板块的内容也已经加载好供用户查看或收听,从而进一步提高手机打开应用程序时的响应速度。
作为一种实施方式,如图5所示的手机中的内部存储器521可以包括磁盘(例如,固态硬盘(solid state disk,SSD),硬盘驱动器(hard disk drive,HDD),Nand闪存(Nand Flash),通用闪存存储(universal flash storage,UFS),eMMC等)和易失性内存。其中,磁盘读写速度相对较慢,可以在掉电的情况下稳定存储不丢失存储内容,功耗较低,能够用于存储手机上安装的应用程序的数据。易失性内存读写速度较快,在存储时需要电量维持以保证存储内容不丢失,功耗较高,能够用于加载和运行应用程序。因此,手机可以将预测的用户可能要打开的应用程序(或称为预测的应用程序)从磁盘中预加载到易失性内存中。当用户打开预测的应用程序时,手机则可以直接在易失性内存中运行已经预加载的该预测的应用程序,从而提高用户打开相应应用程序时手机的响应速度。
可选地,为了避免手机将预测的应用程序在易失性内存中进行预加载,而导致易失性内存的空间占用较高,使手机产生卡顿现象,以及使手机功耗增加。本申请实施例中还提供了另一种实施方式,例如手机预加载应用程序可以执行以下S603。
S603、手机通过非易失性内存预加载预测的用户可能要打开的应用程序。
示例地,如图5所示的手机中的内部存储器521可以如图1中的(b)所示,包括磁盘121(例如,SSD、HDD、Nand Flash、eMMC、UFS等),易失性内存122以及非易失性内存123。其中,易失性内存122的存储介质可以是双倍数据速率存储介质(double data rate,DDR),DDR二代(DDR2),DDR三代(DDR3),DDR四代(DDR4),高带宽存储(high bandwidth memory,HBM)等,非易失性内存123的存储介质可以是单层单元闪存(single-levelcell-NAND,SLC-NAND),磁性随机存储(magnetic radom access memory,MRAM),阻变式存储(Resistance Radom Access Memory,RRAM), 相变随机存储(Phase change Radom Access Memory,PCRAM)等快速可保持存储(fast none volatile memory,FastNVM)。
需要说明的是,本示例中的上述非易失性内存的读写速度稍低于易失性内存,远高于磁盘的读写速度,可以用做低优先级应用、进程的运行态载体。该非易失性内存具有非易失性存储特性,即在掉电的情况下也能够稳定存储,因此功耗相对较低。易失性内存和非易失性内存之间可以相互调度,数据可以相互转移。例如,可以通过内存管理模块来实现易失性内存和非易失性内存之间的调度和数据转移。易失性内存和非易失性内存可以独立设置也可以集成在一起此处不做限制。
非易失性内存作为低功耗内存,其可以存储应用程序要访问的资源数据(例如,配置文件、多媒体数据等),还可以存储应用程序的运行时代码段,应用程序可以直接在该内存区运行。为了降低功耗对于预加载的应用程序可加载在该非易失性内存中。用户感知不强的应用程序、进程或线程等运行时相应的内存页也可以在该非易失性内存中运行。例如,后台下载,后台资源更新等业务也可在该非易失性内存中运行。
因此,手机可以将预测的用户可能要打开的应用程序(或称为预测的应用程序)从磁盘中预加载到非易失性内存中,或者将应用程序一部分加载在非易失性内存中,一部分加载在易失性内存中。当用户打开预测的应用程序时,手机则可以将预加载在非易失性内存中的该应用程序的数据移动到易失性内存中以运行该应用程序。从而提高用户打开相应应用程序时手机的响应速度。
其中,作为一种实现方式,手机预加载应用程序时,应用程序在易失性内存和非易失性内存中进行预加载调度的方式可以如以下示例。
示例地,当手机要预加载某个应用程序时,手机可以根据该应用程序当前是否已经被加载过,对该应用程序的预加载进行相应的调度。
例如,当要预加载的应用程序未被加载过,且如果该应用程序可能被用户打开的置信度(置信度为预测的可能性,可以是根据机器学习预测算法得到,还可以根据用户画像中该应用程序相关的用户操作行为的频率大小得到,如将频率直接作为置信度,当频率越高时置信度越高)高于第一阈值而未超过第二阈值(第一阈值和第二阈值可根据实际情况设置,以便将置信度高于第一阈值未超过第二阈值的应用程序作为用户有一定可能性要使用的应用程序,将高于第二阈值的应用程序作为用户有很大可能要打开的应用程序),则说明该应用程序有一定可能被用户使用,手机可以从磁盘中将该应用程序加载到非易失性内存中。从而便于后续应用程序被用户打开时,手机能够将非易失性内存中预加载的应用程序数据转移到易失性内存中以运行应用程序,从而在应用程序预加载时减小易失性内存空间占用和降低功耗。或者,如果该应用程序可能被用户打开的置信度超过了第二阈值,则说明该应用程序有很大可能被用户使用,手机可以从磁盘中将该应用程序的一部分(如第二数据)加载到易失性内存中,将另一部分(如第一数据)加载到非易失性内存中。其中,加载到易失性内存的部分通常为用户感知(用户感知即用户期望的应用程序的运行速度,通常用户感知较强的业务与用户感知较弱的业务相比,用户感知较强的业务的用户期望的运行速度大于用户感知较弱的业务的用户期望的运行速度)相对较强的交互类线程或进程,而加载到非易失性内存的部分通常为用户感知相对较弱的附加功能。例如,日志上传、打车APP中的买菜等附属业务等。从而便于后续应用程序被用户打开时,手机能够直接将用户感知相对较强的业务在易失性内存中开始运行,而将其他附属业务等相关的数据从非易失性内存中转移到易失性内存中再进行运行, 进一步提升手机打开应用程序时的响应速度,并兼顾预加载时易失性内存空间占用高和功耗高的问题。
又例如,当要预加载的应用程序已被加载过,且该应用程序全部被加载在易失性内存中。则手机可以维持该应用程序目前的加载状态,以便于后续应用程序被用户打开时,手机能够直接在易失性内存中直接运行该应用程序,从而提高手机打开该应用程序时的响应速度。
又例如,当要预加载的应用程序已被加载过,且该应用程序全部被加载在非易失性内存中。如果该应用程序可能被用户打开的置信度高于第一阈值而未超过第二阈值,则说明该应用程序有一定可能被用户使用,手机可以维持该应用程序目前的加载状态,以便于后续应用程序被用户打开时,手机能够将非易失性内存中预加载的应用程序数据转移到易失性内存中以运行应用程序,从而在应用程序预加载时减小易失性内存空间占用和降低功耗。或者,如果该应用程序可能被用户打开的置信度超过了第二阈值,则说明该应用程序有很大可能被用户使用,手机可以从非易失性内存中将该应用程序的一部分数据转移到易失性内存中。其中,转移到易失性内存中的一部分数据通常为用户感知相对较强的交互类线程或进程,而保留在非易失性内存中的一部分数据通常为用户感知相对较弱的附加功能。例如,日志上传、打车APP中的买菜等附属业务等。从而便于后续应用程序被用户打开时,手机能够直接将用户感知相对较强的业务在易失性内存中开始运行,而将其他附属业务等相关的数据从非易失性内存中转移到易失性内存中再进行运行,进一步提升手机打开应用程序时的响应速度,并兼顾预加载时易失性内存空间占用高和功耗高的问题。
又例如,当要预加载的应用程序已被加载过,且该应用程序在易失性内存和非易失性内存中均存在。如果该应用程序可能被用户打开的置信度高于第一阈值而未超过第二阈值,则说明该应用程序有一定可能被用户使用,手机可以维持该应用程序目前的加载状态,以便于后续应用程序被用户打开时,手机能够将非易失性内存中预加载的应用程序数据转移到易失性内存中以运行应用程序,从而在应用程序预加载时减小易失性内存空间占用和降低功耗。或者,如果该应用程序可能被用户打开的置信度超过了第二阈值,则说明该应用程序有很大可能被用户使用,手机可以从非易失性内存中将该应用程序的一部分数据转移到易失性内存中。其中,转移到易失性内存中的一部分数据通常为用户感知相对较强的交互类线程或进程,而保留在非易失性内存中的一部分数据通常为用户感知相对较弱的附加功能。例如,日志上传、打车APP中的买菜等附属业务等。从而便于后续应用程序被用户打开时,手机能够直接将用户感知相对较强的业务在易失性内存中开始运行,而将其他附属业务等相关的数据从非易失性内存中转移到易失性内存中再进行运行,进一步提升手机打开应用程序时的响应速度,并兼顾预加载时易失性内存空间占用高和功耗高的问题。
需要说明的是,当手机根据预测对预测的用户可能要打开的应用程序进行了预加载之后,则当用户打开该应用程序时,手机可以将非易失性内存中存储该应用程序的数据转移到易失性内存中,以使手机可以在易失性内存中运行该应用程序供用户使用。
示例地,以用户正在使用APP1,手机预测的用户可能要打开的应用程序为APP2,且手机采用将APP2从磁盘中预加载到非易失性内存中的方式进行APP2预加载为例。
如图13中的(a)所示,当用户正在使用APP1时(在用户使用APP1之前启动APP1时,手机可以通过易失性内存从磁盘中加载APP1,即在易失性内存中加载APP1运行 段),手机预测到用户可能将要使用APP2。手机根据预测结果,准备预加载APP2。此时,手机发现APP2当前未被加载过,则可以指示非易失性内存从磁盘中加载APP2(例如,通过APP调度策略执行模块来指示非易失性内存从磁盘中加载APP2),即在非易失性内存中加载APP2运行段,并在非易失性内存中完成APP2的运行(例如,APP启动,APP特定线程的运行,APP所需资源的分配等)。如图13中的(b)所示,当用户要使用APP2时,手机接收到用户打开APP2的操作(如用户通过点击桌面上的APP2图标等方式以打开APP2)则开始加载APP2。此时,手机可以指示非易失性内存将APP2的运行段数据(或者说运行态的全部数据)转移到易失性内存中,以使手机在易失性内存中运行该APP2供用户使用。如图13中的(c)所示,当用户一定时间内还未使用APP2时,或者用户使用完APP2将APP2在非易失性内存中保活一段时间后,手机则可以从非易失性内存中卸载(或者说淘汰,释放,回收)APP2。例如,手机可以通过APP调度策略执行模块指示非易失性内存将APP2的运行段数据释放掉。
需要注意的是,由于易失性内存和非易失性内存均可作为程序运行时的载体,因此,在一些可能的实施方式中,当用户要打开预测的应用程序(如APP2)时,从非易失性内存转移到易失性内存的数据可能仅是应用程序运行段数据的一部分(如,用户感知较强的部分业务数据),其中用户感知较弱的部分仍在非易失性内存中运行,例如日志上传、打车app中的买菜业务等。用户感知即用户期望的应用程序的运行速度,通常用户感知较强的业务与用户感知较弱的业务相比,用户感知较强的业务的用户期望的运行速度大于用户感知较弱的业务的用户期望的运行速度。
例如,如图14中的(a)所示,当用户在使用APP1时(在用户使用APP1之前启动APP1时,手机可以通过易失性内存从磁盘中加载APP1,即在易失性内存中加载APP1运行段),手机预测到用户可能将要使用APP2。手机根据预测结果,准备预加载APP2。此时,手机发现APP2当前未被加载过,则可以指示非易失性内存从磁盘中加载APP2(例如,通过APP调度策略执行模块来指示非易失性内存从磁盘中加载APP2),即在非易失性内存中加载APP2运行段,并在非易失性内存中完成APP2的运行(例如,APP启动,APP特定线程的运行,APP所需资源的分配等)。如图14中的(b)所示,当用户要使用APP2时,手机接收到用户打开APP2的操作(如用户通过点击桌面上的APP2图标等方式以打开APP2)则开始加载APP2。此时,手机可以指示非易失性内存将APP2的运行段的一部分数据(或称为APP2第一运行段)转移到易失性内存中,在非易失性内存中保留APP2的运行段的另一部分数据(或称为APP2第二运行段),以使手机在易失性内存和非易失性内存中分别运行该APP2的第一运行段和第二运行段,以实现运行APP2供用户使用。如图14中的(c)所示,当用户一定时间内还未使用APP2时,或者用户使用完APP2将APP2在非易失性内存中保活一段时间后,手机则可以从非易失性内存中卸载(或者说淘汰,释放,回收)APP2。例如,手机可以通过APP调度策略执行模块指示非易失性内存将APP2的运行段数据释放掉。
其中,手机可以实时预测用户在那些场景下可能要打开哪些应用程序。此时,手机可以仅在预测到的应用程序用户将要打开时,对这些应用程序进行预加载,从而降低因预加载过多的应用程序而增加手机功耗。当然,若手机检测到其正在充电,则手机可以不考虑功耗,一次性将所有预测到的用户可能要打开的应用程序全部进行预加载。并且,可以将这些应用程序预加载到上述非易失性内存中,从而当手机预加载完成后即使手机不再充电,也能保持较低功耗。
作为另一种实施实现方式,在手机现有的高速运存和低速存储之间,可以增加多级不同速度的存储作为运行时内存。在应用预加载时,根据各级存储的速度以及用户对应用程序运行的感知,将应用程序运行时内存段分别加载到不同的存储中。例如,对于打车APP,将打车主业务(例如地图、订单处理)加载到高速运行时内存,将使用不频繁的业务(例如买菜)加载到次一级的运行时内存,将用户感知很弱的业务(例如日志上传、本地机器学习推理)加载到再次一级的运行时内存。这些多级存储可以是易失性内存,也可以是非易失性内存。
作为另一种实施实现方式,得益于网络速度的高速提升以及虚拟化、分布式技术的发展,跨设备、跨网络的读写性能已经高于一些低端运行时内存(如eMMC)的性能。上述多级存储的实例还可以在物理上和当前设备的高速运行时内存是分离的,例如有线局域网内的网络附属存储(network attached storage,NAS)、云端存储(Cloud Storage)、通过高速网络(例如5G)连接到的其他存储(NAS、Cloud Storage或其他存储器件)、借助分布式虚拟化技术提供的存储介质等。
在本申请实施例中,电子设备还可以根据观测到的用户使用电子设备的操作行为,以及用户画像信息,对用户切换到后台的应用程序是否还会继续使用进行预测。并根据预测结果对相应的应用程序进行保活。
以电子设备为手机,电子设备预测用户切换到后台的应用程序可能还会继续使用并进行保活为例。图15示出了本申请实施例提供的另一种应用程序运行加速的方法的流程示意图。如图15所示,该应用程序运行加速的方法可以包括以下S1501-S1503。
S1501、手机生成用户画像。该S1501与图6所示的方法中的S601类似,其中,用户画像中可以包括用户喜欢使用某个应用程序,用户使用某个应用程序时打开另一应用程序后一般还会切回该应用程序等用户的操作行为。关于S1501的其他说明具体可参考S601中的相关说明。
S1502、手机根据当前用户的操作行为场景,以及用户画像,预测用户可能要继续使用的应用程序。
作为一种实施方式,手机可以根据当前用户的操作行为场景,在用户画像中查询对应的用户操作行为(或称为使用习惯),然后根据查询到的用户操作行为预测与该操作行为相关的应用程序需要保活。
例如,用户画像中有一个用户操作行为(或称为用户行为)是“用户喜欢使用购物APP进行购物”。因此,当用户在手机中使用购物APP时将购物APP切换到后台,并打开了另一个应用,如聊天APP时。则手机可以根据该用户操作行为场景,在用户画像中进行查询。此时,手机查询到用户画像中有一个用户操作行为是“用户喜欢使用购物APP进行购物”并且根据记录的用户之前的操作行为(如称为历史操作行为)发现切换到后台的购物APP还处于商品选购页面。因此,手机可以根据该用户画像中的操作行为预测用户有可能还会切回购物APP并继续使用。即预测购物APP为用户可能要继续使用的应用程序,以便后续手机根据该预测对购物APP进行保活。
当手机预测到用户可能要继续使用的应用程序后,手机可以对该应用程序进行保活。
作为一种实施方式,如图5所示的手机中的内部存储521可以包括磁盘(例如,固态硬盘(solid state disk,SSD),硬盘驱动器(hard disk drive,HDD)、eMMC、UFS等)和易失性内存。其中,磁盘读写速度相对较慢,可以在掉电的情况下稳定存储不丢失存储内容,功耗较低,能够用于存储手机上安装的应用程序的数据。易失性内存读写速度 较快,在存储时需要电量维持以保证存储内容不丢失,功耗较高,能够用于加载和运行应用程序。因此,手机可以将预测的用户可能要继续使用的应用程序在易失性内存中进行保活。或者,手机可以基于虚拟内存技术,将预测的用户可能要继续使用的应用程序在磁盘上的虚拟内存内进行保活。从而当用户再次切换到要继续使用的应用程序时,手机能够继续运行该应用程序而不用重新加载,提高应用程序响应速度。
可选地,为了避免手机将应用程序保活在易失性内存中,造成易失性内存的空间占用较高,是手机产生卡顿现象,以及增加手机功耗。也为了避免将应用程序保活在虚拟内存中,受磁盘读写速度影响造成卡顿,以及导致磁盘频繁读写而影响磁盘寿命等问题。本申请实施例还提供了另一种实施方式,例如手机对应用程序进行保活可以执行以下S1503。
S1503、手机通过非易失性内存对预测的用户可能要继续使用的应用程序进行保活。
示例地,如图5所示的手机中的内存存储器521可以如图1中的(b)所示。即包括磁盘121(例如,SSD、HDD、Nand Flash、EMMC、UFS等),易失性内存122以及非易失性内存123。其中,易失性内存122的存储介质可以是双倍数据速率存储介质(double data rate,DDR),DDR二代(DDR2),DDR三代(DDR3),DDR四代(DDR4),高带宽存储(high bandwidth memory,HBM)等,非易失性内存123的存储介质可以是单层单元闪存(single-levelcell-NAND,SLC-NAND),磁性随机存储(magnetic radom access memory,MRAM),阻变式存储(Resistance Radom Access Memory,RRAM),相变随机存储(Phase change Radom Access Memory,PCRAM)等快速可保持存储(fast none volatile memory,FastNVM)。
需要说明的是,本示例中的上述非易失性内存的读写速度略低于易失性内存,远高于磁盘的读写速度,可以用做低优先级应用、进程的运行态载体。该非易失性内存具有非易失性存储特性,即在掉电的情况下也能够稳定存储,因此功耗相对较低。易失性内存和非易失性内存之间可以相互调度,数据可以相互转移。例如,可以通过内存管理模块来实现易失性内存和非易失性内存之间的调度和数据转移。易失性内存和非易失性内存可以独立设置也可以集成在一起此处不做限制。
非易失性内存作为低功耗内存,其可以存储应用程序要访问的资源数据(例如,配置文件、多媒体数据等),还可以存储应用程序的运行时代码段,应用程序可以直接在该内存区运行。为了降低功耗和对易失性内存的占用,可以将应用程序保活在该非易失性内存中。
因此,手机可以将预测的用户可能要继续使用的应用程序(或称为预测的要继续使用的应用程序)从易失性内存转移到非易失性内存进行保活。当用户切换回预测的要继续使用的应用程序时,手机则可以将保活在非易失性内存中的该应用程序的数据移动到易失性内存中以继续运行该应用程序。从而避免用户要继续使用的应用程序被后台清掉,提高用户切换回应用程序时手机的响应速度。
其中,作为一种实现方式,手机保活应用程序时,应用程序在易失性内存和非易失性内存中进行调度的方式可以如以下示例。
示例地,当手机要保活某个应用程序时,若该应用程序可能被用户继续使用的置信度(置信度为预测的可能性,可以是根据机器学习预测算法得到,还可以根据用户画像中该应用程序相关的用户操作行为的频率大小得到,如将频率直接作为置信度,当频率越高时置信度越高)高于第一阈值而未超过第二阈值(第一阈值和第二阈值可根据实际 情况设置,以便将置信度高于第一阈值未超过第二阈值的应用程序作为用户有一定可能性要继续使用的应用程序,将高于第二阈值的应用程序作为用户有很大可能要继续使用的应用程序),则说明该应用程序有一定可能被用户继续使用,手机可以从易失性内存中将该应用程序的数据转移到非易失性内存中。从而便于后续应用程序被用户切回前台继续使用时,手机能够将该应用程序从非易失性内存中重新转移到易失性内存中继续运行。减小应用程序保活时易失性内存的空间占用和功耗。或者,如果该应用程序可能被用户继续使用的置信度超过了第二阈值,则说明该应用程序有很大可能被用户继续使用。手机可以维持该应用程序在易失性内存中的运行状态,即将该应用程序保活在易失性内存中。以便于后续应用程序被用户切回前台继续使用时,手机能够直接在易失性内存中继续运行,从而提高手机在用户切换回应用程序继续使用时的响应速度。又或者,手机可以先将应用程序保活在易失性内存中,以便于用户切换回该应用程序时,手机能够继续在易失性内存中继续运行该应用程序。而随着时间的推移,若用户还没有切换回保活在易失性内存中的应用程序继续使用时,手机可以逐步将保活在易失性内存中的应用程序的内容转移到非易失性内存中。从而降低应用程序保活时易失性内存的空间占用和功耗。
需要说明的是,当手机根据预测对预测的用户可能要继续使用的应用程序进行保活之后,则当用户切换回该应用程序继续使用时,手机可以将非易失性内存中存储的该应用程序的数据转移到易失性内存中,以使手机在易失性内存中继续运行该应用程序供用户继续使用。
示例地,以用户将APP1切换到后台,打开APP2进行使用,手机预测用户可能要继续使用APP1为例。
如图16中的(a)所示,用户将APP1切换到后台(此时,APP1的运行段数据将保留在易失性内存中),要使用APP2时,手机可以加载APP2以供用户使用。其中,用户启动APP1和APP2时均可以是手机指示易失性内存从磁盘加载APP2或APP1(例如,通过APP调度策略执行模块来指示易失性内存从磁盘加载APP2或APP1),并在易失性内存中完成APP2或APP1的运行(例如,APP启动,APP特定线程的运行,APP所需资源的分配等)。如图16中的(b)所示,当用户使用APP2时间较长时,手机预测到用户后续可能要继续使用APP1,则手机可根据预测结果来保活APP1。此时,手机可以指示易失性内存将APP1的运行段数据转移到非易失性内存中进行保活。如图16中的(c)所示,当用户切回APP1继续使用时,手机则可以指示非易失性内存将APP1的运行段数据转移到易失性内存中,以使手机在易失性内存中继续运行该APP1供用户继续使用。其中,若用户长时间还没有切回APP1以继续使用,则手机可以从非易失性内存中将APP1卸载。具体可以参考如图13中的(c)所示的方式,此处不做赘述。
需要注意的是,由于易失性内存和非易失性内存均可作为程序运行时的载体,因此,在一些可能的实施方式中,当用户切回相应的应用程序(如APP1)时,从非易失性内存转移到易失性内存的数据可能仅是该应用程序运行段数据的一部分(如,用户感知较强的部分业务数据),其中用户感知较弱的部分仍在非易失性内存中运行,例如日志上传、打车app中的买菜业务等。
在一些实施例中,当手机需要将应用程序(如APP1)在非易失性内存中进行保活时,手机还可以将应用程序运行段的一部分数据(或称为第二数据)(如,用户感知较强的部分业务数据)保留在易失性内存中,而将另一部分数据(或称为第一数据)(如,用户感 知较弱的部分业务数据)转移到非易失性内存中。用户感知即用户期望的应用程序的运行速度,通常用户感知较强的业务与用户感知较弱的业务相比,用户感知较强的业务的用户期望的运行速度大于用户感知较弱的业务的用户期望的运行速度。
例如,如图17中的(a)所示,用户将APP1切换到后台(此时,APP1的运行段数据将保留在易失性内存中),要使用APP2时,手机可以加载APP2以供用户使用。其中,用户启动APP1和APP2时均可以是手机指示易失性内存从磁盘加载APP2或APP1(例如,通过APP调度策略执行模块来指示易失性内存从磁盘加载APP2或APP1),并在易失性内存中完成APP2或APP1的运行(例如,APP启动,APP特定线程的运行,APP所需资源的分配等)。如图17中的(b)所示,当用户使用APP2时间较长时,手机预测到用户后续可能要继续使用APP1,则手机可根据预测结果来保活APP1。此时,手机可以指示易失性内存将APP1的运行段的一部分数据(或称为APP1第一运行段)保留在易失性内存中,而将APP1的运行段的另一部分数据(或称为APP1第二运行段)转移到非易失性内存中以对APP1进行保活。如图17中的(c)所示,当用户切回APP1继续使用时,手机则可以指示非易失性内存将APP1的第二运行段数据转移到易失性内存中,以使手机在易失性内存中继续运行该APP1(即运行APP1的第一运行段和第二运行段,也即运行APP1的运行段)供用户继续使用。其中,随着时间的推移,以及手机对用户可能要切回APP1继续使用的预测概率(如,置信度)的降低,手机还可以逐步的将保留在易失性内存中的APP1第一运行段转移到非易失性内存中。从而减少APP1的数据占用的易失性内存的空间。
需要说明的是,在一些其他实施例中,当手机检测到其正在充电时,还可以不考虑功耗问题,将预测出的用户可能要继续使用的所有处于后台的应用程序进行保活。
基于上述图6以及图15所示的方法流程,下面将结合图18-图20来介绍和存储器(如,上述的易失性内存以及非易失性内存)相关的实施例:
诸如PC机、智能手机、平板电脑等电子设备,是日常生产生活中所必须的电子设备。在这些设备中,中央处理器使用随机访问存储器(radom access memory,RAM),例如DDR3、DDR4、DDR5等,进行数据的快速存取,而使用存储器Storage(例如HDD硬盘,或者SSD固态硬盘)来持久存取数据。
其中,目前常用于数据快速存取的RAM是DDR-SDRAM,这是一种掉电易失的器件。为了保存数据,DDR-SDRAM需要不断地“刷新“所保存的数据——由于半导体漏电的原因,需要定期将数据重写一遍——会消耗较高的功耗;另外,当系统遭遇突然掉电时,其存储的内容会丢失。
持久存取数据的Storage,是一种慢速设备。当系统要将数据写入Storage时,通常会遇到较长的延迟和等待。例如:关键数据的同步写盘命令(Sync Write)导致的IO(Input output)性能瞬间下降。
本申请的一些实施例提供了一种混合了易失型和非易失型存储介质的存储器,可以实现以下中的至少一项:
提升操作系统(Operating System,OS)的同步写性能,使被大量使用的数据库的性能提高
使快速存取的数据掉电不丢失,并可实现写入完成后即可断电,保证功耗节省。
参考图18-图20,本申请提供的一些实施例可以包括以下中的一项或多项(各项中的多个子项可以根据实际情况选择是采用一个子项或是多个子项):
在同一个基板(Substrate)上,同时集成了易失型存储介质和非易失型存储介质,以及存储控制器。其中,易失型存储介质可以是:例如,DDR,DDR2,DDR3,DDR4,HBM(超宽带)等。非易失型存储介质可以是:例如,SLC-NAND,MRAM(Magnetic Radom Access Memory),RRAM(Resistance Radom Access Memory),PCRAM(Phase change Radom Access Memory)等。
易失型存储介质和非易失型存储介质,连接到存储控制器。
其中,可以连接到同一个存储控制器,或,可以连接到不同的存储控制器。
存储控制器(Controller)、Substrate(基板)及其上的易失型(Volatile)和非易失型(None-Volatile)存储介质,被封装在一个Package(封装外壳)内部,对外呈现出总线接口。
封装可以是Flip-Package、BGA(Ball Grid Array,球栅阵)、WLCSP(Wafer Level Chip Scale Package,晶片级别芯片规模封装)等。
总线接口可以是一个接口,例如,符合JEDEC规范的DDR4接口。
总线接口可以是二个或多个接口,例如,符合JEDEC规范的两组DDR4接口。
当Host器件访问混合存储器时:
同一个物理地址端,指向易失型或者非易失型存储器,彼此的物理地址段不重合(并行模式)。
或者,同一个物理地址段,既可以指向易失型存储器,也可以指向非易失型存储器,彼此的物理地址重合(如图18中所示的影子模式)。
或者,有些物理地址端,既可以指向易失型存储器,也可以指向非易失型存储器,彼此的物理地址重合(影子模式);而另一些物理地址端,指向易失型或者非易失型存储器,彼此的物理地址段不重合(如图18中所示的并行模式)。
并行模式时,掉电后再上电,非易失型存储器的数据依然保持、易失型存储器数据丢失。
影子模式时,掉电后再上电,影子模式所属物理地址段的数据依然保持。
本申请实施例提供的一种并行结构,其实现方式如图19所示:
1901为SubStrate基板。连线1902为内部连线。1903为DDR4,8Gbx4组成易失型存储器组,1904为FastNVM,1Gbx4组成非易失型存储器组。1905为DDR控制器负责与Host接口,同时负责管理DDR4组与Fast NVM组。器件为4GB+1GB的混合型存储器。1906为塑封外壳,在其上标注器件型号。其它如胶与Filler,在示意图中省略。
1901为SubStrate基板。1903为DDR4,8Gbx4组成易失型存储器组,1904为FastNVM 1Gbx4组成非易失型存储器组。底部为BGA焊盘1907,间距(Pitch)为0.45mm。
在一种具体的实施例中,DDR4 1903可以为1Alpha nm工艺节点的Micron DDR4颗粒;FastNVM 1904(NVM:None-Volatile Memory)可以为28nm节点的Global Foundry 1Gb DDR4颗粒;DDR控制器可以为ASIC(Application Specific IC;IC:Integrated Chip)开发的22nm节点定制控制器。基板可以为0.15mm;绑定线可以为金线;器件封装完成后可以再ATE(Auto Test Equipment)机台进行Package Level测试。
如图20所示,片上系统(system on chip,SoC)通过DDR4(Dual-Data Rate 4)总线接口访问混合存储(Hybrid DDR4-SDRAM),通过访问不同的物理地址段,可以访问其内部的非易失或者易失型存储器。
上述实施例其它可能的替代方案还可以包括以下中的一项或多项:
Host看到的物理地址段,可以同时访问易失型和非易失型存储器。例如,通过配置混合存储颗粒的MR及存储,设置不同的Mode模式,以访问不同的存储器。
易失型存储器还可以是HBM(High Bandwidth memory)超宽带3D-DRAM,例如512bits宽度,容量1GB的HBM;
非易失型存储器还可以是例如3D-Xpoint PCM(Phase Change Memory)相变存储器,或者RRAM(Resistance Radom Access Memory)阻变存储器,或者3D-SLC NAND闪存存储器,等等。
Host与混合存储器的连接方式,还可以是分别通过两组DDR4的接口,来分别访问内部不同型号的存储器;或者通过DDR4接口访问易失型存储器,通过PCIe4.0x4来访问非易失型存储器。
Intel Optane DIMM(Dual Inline Memory Module,直插式内存条)颗粒与本申请的一些实施例的主要不同点是,其:不是一颗芯片,而是一个PCB板,无法作为器件灵活使用;其是把3D-Xpoint非易失介质做成内存条,但是并没有做上去易失型的介质,不属于混合型。
混合DIMM条与本申请的一些实施例的的主要不同点是,其:其非易失存储器Host无法访问,仅当系统掉电时,由DIMM条上的一个控制芯片,在外部备电的帮助下,把内存的数据快速搬到FLASH上保存;不是一颗芯片,而是一个PCB(Printed Circuit Board)板,无法作为器件灵活使用。
采用以上实施例中的方法,电子设备可以基于机器学习对用户的操作行为进行预测,以在用户打开应用程序之前,将相应的应用程序进行预加载,从而时用户打开相应的应用程序时,手机不需要在进行应用程序的加载,可以直接进入应用的界面,提高用户打开该应用程序时应用程序的启动速度。或者,在用户切换应用程序到后台后,可以预测用户的操作行为,对切换到后台的应用程序进行保活,从而使用户切回应用程序后电子设备可继续运行相应的应用程序而不用重新加载,提高应用程序响应速度。
对应于前述实施例中的方法,本申请实施例还提供一种应用程序运行加速的装置。该装置可以应用于电子设备,用于实现前述实施例中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。例如,图21示出了一种应用程序运行加速的装置的结构示意图,如图21所示,该装置包括:显示模块2101、处理模块2102等。
其中,处理模块2102,可以用于根据用户画像和/或预设的预测规则,在预测到用户将要使用第一应用程序时,在第二内存中加载第一应用程序;接收用户开启第一应用程序的第一操作;响应于第一操作,将第二内存中的第一应用程序的数据转移到第一内存中。显示模块2101,可以用于根据第一内存中的第一应用程序的数据,显示第一应用程序的界面。
在另一种可能的实现方式中,处理模块2102,具体用于预测到用户将要启动第一应用程序;将第一应用程序的数据从电子设备的磁盘加载到第二内存中。
在另一种可能的实现方式中,第一应用程序的数据包括第一数据和第二数据,用户对第一数据对应业务期望的运行速度小于用户对第二数据对应业务期望的运行速度;处理模块2102,具体用于将第一应用程序的第一数据从磁盘加载到第二内存中;处理模块2102,还用于将第一应用程序的第二数据从磁盘加载到第一内存中。
在另一种可能的实现方式中,处理模块2102,具体用于预测到用户会将处于后台运 行的第一应用程序切换到前台运行;将第一应用程序的全部或部分数据从第一内存转移到第二内存中。
在另一种可能的实现方式中,第一应用程序的数据包括第一数据和第二数据,用户对第一数据对应业务期望的运行速度小于用户对第二数据对应业务期望的运行速度;处理模块2102,具体用于将第一应用程序的第一数据从第一内存转移到第二内存;第二数据保留在第一内存中。
在另一种可能的实现方式中,处理模块2102,具体用于在根据当前的时间、电子设备当前所处的位置和用户当前的操作中的至少一种,从用户画像和/或预测规则中查询相匹配的用户行为关联的应用程序为第一应用程序时,预测用户将要使用第一应用程序。
在另一种可能的实现方式中,预测规则包括以下中的至少一个:当接收到用户搜索第一应用程序的操作时,预测用户将要启动第一应用程序;当接收到用户安装第一应用程序的操作时,预测用户将要启动第一应用程序;当接收到用户打开包含第一应用程序的应用分类文件夹时,预测用户将要启动第一应用程序;应用分类文件内的各应用程序中,第一应用程序包括未完成业务。
在另一种可能的实现方式中,处理模块2102,还用于统计用户对电子设备的用户行为,根据统计的用户行为生成用户画像,保存用户画像,用户行为包括以下至少一个:用户操作,用户操作的执行时间,执行用户操作时电子设备所处的位置。
应理解以上装置中单元或模块(以下均称为单元)的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。
例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以称为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。
在一个例子中,以上装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或这些集成电路形式中至少两种的组合。
再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如CPU或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
在一种实现中,以上装置实现以上方法中各个对应步骤的单元可以通过处理元件调度程序的形式实现。例如,该装置可以包括处理元件和存储元件,处理元件调用存储元件存储的程序,以执行以上方法实施例所述的方法。存储元件可以为与处理元件处于同一芯片上的存储元件,即片内存储元件。
在另一种实现中,用于执行以上方法的程序可以在与处理元件处于不同芯片上的存储元件,即片外存储元件。此时,处理元件从片外存储元件调用或加载程序于片内存储元件上,以调用并执行以上方法实施例所述的方法。
例如,本申请实施例还可以提供一种装置,如:电子设备,可以包括:处理器,用于 存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如前述实施例所述的应用程序运行加速的方法。该存储器可以位于该电子设备之内,也可以位于该电子设备之外。且该处理器包括一个或多个。
在又一种实现中,该装置实现以上方法中各个步骤的单元可以是被配置成一个或多个处理元件,这些处理元件可以设置于对应上述的电子设备上,这里的处理元件可以为集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或者这些类集成电路的组合。这些集成电路可以集成在一起,构成芯片。
例如,本申请实施例还提供一种芯片,该芯片可以应用于上述电子设备。芯片包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;处理器通过接口电路从电子设备的存储器接收并执行计算机指令,以实现以上方法实施例中所述的方法。
本申请实施例还提供一种计算机程序产品,包括电子设备,如上述电子设备,运行的计算机指令。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,如:程序。该软件产品存储在一个程序产品,如计算机可读存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
例如,本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述方法实施例中所述的应用程序运行加速的方法。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何 在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种应用程序运行加速的方法,其特征在于,所述方法应用于电子设备,所述电子设备包括第一内存和第二内存,所述第一内存是采用易失性存储介质的内存,所述第二内存是采用非易失性存储介质的内存,所述方法包括:
    根据用户画像和/或预设的预测规则,在预测到用户将要使用第一应用程序时,在所述第二内存中加载所述第一应用程序;
    接收用户开启所述第一应用程序的第一操作;
    响应于所述第一操作,将所述第二内存中的所述第一应用程序的数据转移到所述第一内存中;
    根据所述第一内存中的所述第一应用程序的数据,显示所述第一应用程序的界面。
  2. 根据权利要求1所述的方法,其特征在于,所述预测到用户将要使用第一应用程序,包括:预测到用户将要启动所述第一应用程序;
    所述在所述第二内存中加载所述第一应用程序,包括:
    将所述第一应用程序的数据从所述电子设备的磁盘加载到所述第二内存中。
  3. 根据权利要求2所述的方法,其特征在于,所述第一应用程序的数据包括第一数据和第二数据,用户对所述第一数据对应业务期望的运行速度小于用户对所述第二数据对应业务期望的运行速度;
    所述将所述第一应用程序的数据从所述电子设备的磁盘加载到所述第二内存中,包括:
    将所述第一应用程序的所述第一数据从所述磁盘加载到所述第二内存中;
    在预测到用户将要使用所述第一应用程序时,所述方法还包括:
    将所述第一应用程序的所述第二数据从所述磁盘加载到所述第一内存中。
  4. 根据权利要求1所述的方法,其特征在于,所述预测到用户将要使用第一应用程序,包括:预测到用户会将处于后台运行的所述第一应用程序切换到前台运行;
    所述在所述第二内存中加载所述第一应用程序,包括:
    将所述第一应用程序的全部或部分数据从所述第一内存转移到所述第二内存中。
  5. 根据权利要求4所述的方法,其特征在于,所述第一应用程序的数据包括第一数据和第二数据,用户对所述第一数据对应业务期望的运行速度小于用户对所述第二数据对应业务期望的运行速度;
    所述将所述第一应用程序的部分数据从所述第一内存转移到所述第二内存中,包括:
    将所述第一应用程序的所述第一数据从所述第一内存转移到所述第二内存;所述第二数据保留在所述第一内存中。
  6. 根据权利要求1所述的方法,其特征在于,
    在根据当前的时间、所述电子设备当前所处的位置和用户当前的操作中的至少一种,从所述用户画像和/或所述预测规则中查询相匹配的用户行为关联的应用程序为所述第一应用程序时,预测用户将要使用所述第一应用程序。
  7. 根据权利要求6所述的方法,其特征在于,所述预测规则包括以下中的至少一个:
    当接收到用户搜索所述第一应用程序的操作时,预测用户将要启动所述第一应用程序;
    当接收到用户安装所述第一应用程序的操作时,预测用户将要启动所述第一应用程序;
    当接收到用户打开包含所述第一应用程序的应用分类文件夹时,预测用户将要启动所述第一应用程序;所述应用分类文件内的各应用程序中,所述第一应用程序包括未完成业务。
  8. 一种电子设备,其特征在于,包括:处理器,第一内存,第二内存,用于存储所述处理器可执行指令的存储器,所述第一内存是采用易失性存储介质的内存,所述第二内存是采用非易失性存储介质的内存;
    所述处理器被配置为执行所述指令时,使得所述电子设备实现如权利要求1至7任一项所述的方法。
  9. 一种计算机可读存储介质,其上存储有计算机程序指令;其特征在于,
    当所述计算机程序指令被电子设备执行时,使得电子设备实现如权利要求1至7任一项所述的方法。
  10. 一种计算机程序产品,其特征在于,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,使得电子设备实现如权利要求1至7任一项所述的方法。
PCT/CN2021/121460 2021-02-09 2021-09-28 一种应用程序运行加速的方法及设备 WO2022170772A1 (zh)

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
CN202110182302.5 2021-02-09
CN202110182302 2021-02-09
CN202110182539.3 2021-02-09
CN202110182539 2021-02-09
CN202110185585.9 2021-02-10
CN202110185585 2021-02-10
CN202110559574.2A CN114942800A (zh) 2021-02-09 2021-05-21 一种应用程序运行加速的方法及设备
CN202110559574.2 2021-05-21

Publications (1)

Publication Number Publication Date
WO2022170772A1 true WO2022170772A1 (zh) 2022-08-18

Family

ID=82838176

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121460 WO2022170772A1 (zh) 2021-02-09 2021-09-28 一种应用程序运行加速的方法及设备

Country Status (1)

Country Link
WO (1) WO2022170772A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562967A (zh) * 2022-11-10 2023-01-03 荣耀终端有限公司 一种应用程序预测方法、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120324481A1 (en) * 2011-06-16 2012-12-20 Samsung Electronics Co. Ltd. Adaptive termination and pre-launching policy for improving application startup time
CN106775820A (zh) * 2016-11-10 2017-05-31 宇龙计算机通信科技(深圳)有限公司 应用程序管理的方法及装置
CN109947496A (zh) * 2017-12-20 2019-06-28 广东欧珀移动通信有限公司 应用程序预加载方法、装置、存储介质及移动终端
CN109976821A (zh) * 2017-12-14 2019-07-05 广东欧珀移动通信有限公司 应用程序加载方法、装置、终端及存储介质
CN110442380A (zh) * 2019-07-03 2019-11-12 武汉深之度科技有限公司 一种数据预热方法及计算设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120324481A1 (en) * 2011-06-16 2012-12-20 Samsung Electronics Co. Ltd. Adaptive termination and pre-launching policy for improving application startup time
CN106775820A (zh) * 2016-11-10 2017-05-31 宇龙计算机通信科技(深圳)有限公司 应用程序管理的方法及装置
CN109976821A (zh) * 2017-12-14 2019-07-05 广东欧珀移动通信有限公司 应用程序加载方法、装置、终端及存储介质
CN109947496A (zh) * 2017-12-20 2019-06-28 广东欧珀移动通信有限公司 应用程序预加载方法、装置、存储介质及移动终端
CN110442380A (zh) * 2019-07-03 2019-11-12 武汉深之度科技有限公司 一种数据预热方法及计算设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562967A (zh) * 2022-11-10 2023-01-03 荣耀终端有限公司 一种应用程序预测方法、电子设备及存储介质
CN115562967B (zh) * 2022-11-10 2023-10-13 荣耀终端有限公司 一种应用程序预测方法、电子设备及存储介质

Similar Documents

Publication Publication Date Title
US9626126B2 (en) Power saving mode hybrid drive access management
US20130147526A1 (en) Methods of controlling clocks in system on chip including function blocks, systems on chips and semiconductor systems including the same
US20040024955A1 (en) Application processors and memory architecture for wireless applications
US20090198854A1 (en) File storage for a computing device with handheld and extended computing units
WO2021088881A1 (zh) 一种选择图片的方法和电子设备
US9575663B2 (en) Solid state drive and operation method thereof
CN113553130B (zh) 应用执行绘制操作的方法及电子设备
US20170078160A1 (en) Method for processing services and electronic device for the same
US20190235967A1 (en) Effective Data Change Based Rule to Enable Backup for Specific VMware Virtual Machine
WO2019075962A1 (zh) 一种图标显示方法、设备及系统
WO2022170772A1 (zh) 一种应用程序运行加速的方法及设备
CN104156248A (zh) 一种在开机过程中显示定制化信息的方法和bios芯片
JP5946251B2 (ja) 半導体装置およびシステム
US20240111595A1 (en) Application deployment method, distributed operating system, electronic device, and storage medium
WO2021057565A1 (zh) 处理方法及移动设备
CN114942800A (zh) 一种应用程序运行加速的方法及设备
WO2022170923A1 (zh) 一种数据读写方法和混合型存储器
WO2022179249A1 (zh) 功能页面显示方法及电子设备
WO2022247495A1 (zh) 音频焦点的控制方法及相关装置
CN114489471A (zh) 一种输入输出处理方法和电子设备
CN114816686A (zh) 计算任务的处理方法、电子设备以及存储介质
WO2024087830A1 (zh) 应用启动方法及电子设备
WO2023174200A1 (zh) 界面显示方法及相关装置
CN116027878B (zh) 功耗调整方法和电子设备
WO2023207683A1 (zh) 应用压缩方法、解压缩方法及电子设备

Legal Events

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

Ref document number: 21925423

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21925423

Country of ref document: EP

Kind code of ref document: A1