CN117707639B - Application start acceleration method, electronic device and storage medium - Google Patents
Application start acceleration method, electronic device and storage medium Download PDFInfo
- Publication number
- CN117707639B CN117707639B CN202311113384.3A CN202311113384A CN117707639B CN 117707639 B CN117707639 B CN 117707639B CN 202311113384 A CN202311113384 A CN 202311113384A CN 117707639 B CN117707639 B CN 117707639B
- Authority
- CN
- China
- Prior art keywords
- file
- application
- hpb
- list
- mapping
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44557—Code layout in executable memory
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请提供了一种应用启动加速方法、电子设备及存储介质。在该方法中,在应用启动前将与应用启动相关文件的L2P映射加载到主机内存中,以使应用启动过程中可以基于主机内存缓存的文件L2P映射去UFS装置中读取文件,无需再去UFS装置中查询相关文件L2P映射,以此提升文件读取速度,进而达到加速应用启动的效果,同时也不会给主机内存增加过多压力。
The present application provides an application startup acceleration method, an electronic device, and a storage medium. In the method, before the application is started, the L2P mapping of the application startup-related files is loaded into the host memory, so that during the application startup process, the file can be read from the UFS device based on the L2P mapping of the file cached in the host memory, without having to query the L2P mapping of the related file in the UFS device, thereby improving the file reading speed, thereby achieving the effect of accelerating the application startup, and at the same time will not add too much pressure to the host memory.
Description
技术领域Technical Field
本申请涉及智能终端技术领域,尤其涉及一种应用启动加速方法、电子设备及存储介质。The present application relates to the field of smart terminal technology, and in particular to an application startup acceleration method, an electronic device, and a storage medium.
背景技术Background technique
智能手机、平板电脑等电子设备已经成为人们生活中一个重要的组成部分,用户可以使用智能手机、平板电脑等电子设备中提供的各种应用程序(以下简称应用)来听音乐、玩游戏等等,以减轻现代快节奏生活所带来的压力。Electronic devices such as smartphones and tablets have become an important part of people's lives. Users can use various applications (hereinafter referred to as applications) provided in electronic devices such as smartphones and tablets to listen to music, play games, etc. to relieve the stress brought by modern fast-paced life.
在用户使用智能手机、平板电脑等电子设备的过程中,可能会多次打开应用程序。其中,应用程序的启动速度对用户体验的提升是一个重要的因素。因此,如何提升应用启动速度是需要解决的问题。When users use electronic devices such as smartphones and tablets, they may open applications multiple times. Among them, the startup speed of applications is an important factor in improving user experience. Therefore, how to improve the startup speed of applications is a problem that needs to be solved.
发明内容Summary of the invention
本申请提供一种应用启动加速方法、电子设备及存储介质。在该方法中,在应用启动前将与应用启动相关文件的L2P映射加载到主机内存中,以使应用启动过程中可以基于主机内存缓存的文件L2P映射去UFS装置中读取文件,无需再去UFS装置中查询相关文件L2P映射,以此提升文件读取速度,进而达到加速应用启动的效果。The present application provides an application startup acceleration method, an electronic device, and a storage medium. In the method, before the application is started, the L2P mapping of the application startup-related files is loaded into the host memory, so that during the application startup process, the file can be read from the UFS device based on the file L2P mapping cached in the host memory, without having to query the related file L2P mapping in the UFS device, thereby improving the file reading speed and achieving the effect of accelerating the application startup.
第一方面,本申请实施例提供一种应用启动加速方法。该方法应用于电子设备中,电子设备包括主机和UFS装置,包括:电子设备监听到第一应用即将启动;在第一应用启动之前,电子设备获取第一文件LBA列表,在UFS装置中读取与第一文件LBA列表对应的第一文件L2P映射,并将第一文件L2P映射缓存至主机内存的HPB内存区域;其中,第一文件LBA列表是基于第一文件列表生成的,第一文件列表中的文件为与第一应用对应的影响应用进程性能的应用文件;HPB内存区域中还缓存有与第二文件LBA列表对应的第二文件L2P映射,第二文件LBA列表是基于第二文件列表生成的,第二文件列表中的文件为影响应用进程性能的系统文件;第一应用启动;其中,在第一应用启动的过程中,基于HPB内存区域中缓存的第一文件L2P映射和第二文件L2P映射,在UFS装置中读取相关文件。In the first aspect, an embodiment of the present application provides an application startup acceleration method. The method is applied to an electronic device, the electronic device includes a host and a UFS device, including: the electronic device monitors that a first application is about to be started; before the first application is started, the electronic device obtains a first file LBA list, reads a first file L2P mapping corresponding to the first file LBA list in the UFS device, and caches the first file L2P mapping to the HPB memory area of the host memory; wherein the first file LBA list is generated based on the first file list, and the files in the first file list are application files corresponding to the first application that affect the performance of the application process; the HPB memory area also caches a second file L2P mapping corresponding to the second file LBA list, the second file LBA list is generated based on the second file list, and the files in the second file list are system files that affect the performance of the application process; the first application is started; wherein, during the process of starting the first application, the relevant files are read in the UFS device based on the first file L2P mapping and the second file L2P mapping cached in the HPB memory area.
示例性的,第一应用可以指的是基于用户使用数据统计得到的热点应用。第一文件列表是与第一应用对应的应用热点文件列表。Exemplarily, the first application may refer to a hot application obtained based on user usage data statistics. The first file list is an application hot file list corresponding to the first application.
示例性的,第二文件列表是指系统热点文件列表。Exemplarily, the second file list refers to a system hotspot file list.
这样,在应用启动前有针对性地将与应用启动相关文件的L2P映射加载到主机内存中,以使应用启动过程中可以基于主机内存缓存的文件L2P映射去UFS装置中读取文件,无需再去UFS装置中查询相关文件L2P映射,以此提升文件读取速度,进而达到加速应用启动的效果。由于加载到主机内存中的文件L2P映射是具有针对性的,不会给主机内存增加过多压力,而且在应用启动过程中,基于主机内存缓存的文件L2P映射查询到相关文件PBA的概率是相当大的。In this way, before the application is started, the L2P mapping of the files related to the application startup is loaded into the host memory in a targeted manner, so that during the application startup process, the file can be read from the UFS device based on the L2P mapping of the file cached in the host memory, without having to query the L2P mapping of the related file in the UFS device, thereby improving the file reading speed and thus achieving the effect of accelerating the application startup. Since the L2P mapping of the file loaded into the host memory is targeted, it will not add too much pressure to the host memory, and during the application startup process, the probability of querying the PBA of the related file based on the L2P mapping of the file cached in the host memory is quite large.
根据第一方面,该方法还包括:在电子设备的开机阶段,电子设备获取第二文件列表,根据第二文件列表生成第二文件LBA列表;电子设备在UFS装置中读取与第二文件LBA列表对应的第二文件L2P映射,并将第二文件L2P映射缓存至HPB内存区域。According to the first aspect, the method also includes: during the power-on phase of the electronic device, the electronic device obtains a second file list and generates a second file LBA list based on the second file list; the electronic device reads a second file L2P mapping corresponding to the second file LBA list in a UFS device, and caches the second file L2P mapping to an HPB memory area.
这样,在电子设备开机阶段,将系统热点文件的L2P映射预先加载至主机内存中,使得各个应用在启动过程中都可以基于主机内存缓存的系统文件L2P映射查询相关文件PBA,加速相关系统文件的读取速度。In this way, during the startup phase of the electronic device, the L2P mapping of the system hotspot file is preloaded into the host memory, so that each application can query the relevant file PBA based on the system file L2P mapping cached in the host memory during the startup process, thereby accelerating the reading speed of the relevant system files.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
电子设备监听到第一应用安装;在第一应用安装后,电子设备获取与第一应用对应的第一文件列表;电子设备根据第一文件列表,生成第一文件LBA列表。The electronic device monitors the installation of the first application; after the first application is installed, the electronic device obtains a first file list corresponding to the first application; the electronic device generates a first file LBA list according to the first file list.
这样,在每个应用(或者是每个热点应用)的安装阶段,生成与其对应的应用常用文件LBA列表,便于在应用启动之前将相应的文件L2P映射加载至主机内存。In this way, during the installation phase of each application (or each hot application), a corresponding application common file LBA list is generated, so that the corresponding file L2P mapping can be loaded into the host memory before the application is started.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
电子设备监听到第一应用更新或编译优化;在第一应用更新或编译优化后,电子设备更新与第一应用对应的第一文件列表;电子设备根据更新后的第一文件列表,对第一文件LBA列表进行更新。The electronic device monitors the update or compilation optimization of the first application; after the first application is updated or compiled and optimized, the electronic device updates the first file list corresponding to the first application; the electronic device updates the first file LBA list according to the updated first file list.
这样,当应用存在更新或编译优化时,对与其对应的常用文件LBA列表进行更新,以此确保根据该文件LBA列表加载相应的文件L2P映射的准确性,进而提高在主机内存中查询到文件PBA的概率。In this way, when an application is updated or compiled and optimized, the corresponding common file LBA list is updated to ensure the accuracy of loading the corresponding file L2P mapping according to the file LBA list, thereby increasing the probability of querying the file PBA in the host memory.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
电子设备获取第三文件列表;第三文件列表是基于第一应用的使用情形对第一文件列表更新而生成的;电子设备根据第三文件列表,对第一文件LBA列表进行更新。The electronic device obtains a third file list; the third file list is generated by updating the first file list based on the usage scenario of the first application; the electronic device updates the first file LBA list according to the third file list.
这样,根据应用的使用情形,对与其对应的常用文件LBA列表进行更新,以此确保根据该文件LBA列表加载相应的文件L2P映射的准确性,进而提高在主机内存中查询到文件PBA的概率。In this way, according to the usage scenario of the application, the corresponding common file LBA list is updated to ensure the accuracy of loading the corresponding file L2P mapping according to the file LBA list, thereby increasing the probability of querying the file PBA in the host memory.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
电子设备监听到第一应用被卸载;在第一应用被卸载后,电子设备删除第一文件LBA列表;如果HPB内存区域中缓存有与第一文件LBA列表对应的第一文件L2P映射,则清空HPB内存区域中的第一文件L2P映射。The electronic device monitors that the first application is uninstalled; after the first application is uninstalled, the electronic device deletes the first file LBA list; if the first file L2P mapping corresponding to the first file LBA list is cached in the HPB memory area, the first file L2P mapping is cleared in the HPB memory area.
这样,在应用被卸载的场景下,删除与其对应的常用文件LBA列表,继而清空主机内存中相应的文件L2P映射,避免对主机内存造成浪费。In this way, when an application is uninstalled, the corresponding common file LBA list is deleted, and then the corresponding file L2P mapping in the host memory is cleared, thereby avoiding wasting the host memory.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
电子设备监听到第二应用即将启动;在第二应用启动之前,电子设备获取第三文件LBA列表,在UFS装置中读取与第三文件LBA列表对应的第三文件L2P映射,并将第三文件L2P映射缓存至主机内存的HPB内存区域;其中,第三文件LBA列表是基于第四文件列表生成的,第四文件列表中的文件为与第二应用对应的影响应用进程性能的应用文件;第二应用启动;其中,在第二应用启动的过程中,基于HPB内存区域中缓存的第三文件L2P映射和第二文件L2P映射,在UFS装置中读取相关文件。The electronic device detects that a second application is about to be started; before the second application is started, the electronic device obtains a third file LBA list, reads a third file L2P mapping corresponding to the third file LBA list in a UFS device, and caches the third file L2P mapping to an HPB memory area of a host memory; wherein the third file LBA list is generated based on a fourth file list, and the files in the fourth file list are application files corresponding to the second application that affect the performance of the application process; the second application is started; wherein, during the process of starting the second application, relevant files are read in the UFS device based on the third file L2P mapping and the second file L2P mapping cached in the HPB memory area.
这样,针对任意一个应用(或热点应用),都可以在其启动前有针对性地将与应用启动相关文件的L2P映射加载到主机内存中,以使应用启动过程中可以基于主机内存缓存的文件L2P映射去UFS装置中读取文件。In this way, for any application (or hot application), the L2P mapping of files related to application startup can be loaded into the host memory before it is started, so that files can be read from the UFS device based on the L2P mapping of files cached in the host memory during application startup.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
在第二应用启动之后,电子设备监听到第一应用即将启动;电子设备确定HPB内存区域中缓存有第一文件L2P映射;第一应用启动;其中,在第一应用启动的过程中,基于HPB内存区域中缓存的第一文件L2P映射和第二文件L2P映射,在UFS装置中读取相关文件。After the second application is started, the electronic device monitors that the first application is about to be started; the electronic device determines that the first file L2P mapping is cached in the HPB memory area; the first application is started; wherein, during the process of starting the first application, based on the first file L2P mapping and the second file L2P mapping cached in the HPB memory area, the relevant files are read in the UFS device.
这样,HPB内存区域可以同时缓存有与多个应用分别对应的应用文件L2P映射,即使前台应用在这多个应用之间来回切换,每此应用切换启动时均可以基于主机缓存的文件L2P映射读取相关文件,以此提升应用切换启动的速度。而且,与每个应用对应的应用文件L2P映射,其所在主机内存都不会太多,不会给主机内存造成压力。In this way, the HPB memory area can cache the application file L2P mappings corresponding to multiple applications at the same time. Even if the foreground application switches back and forth between these multiple applications, each application switch can read the relevant files based on the file L2P mapping cached by the host, thereby improving the speed of application switching startup. Moreover, the application file L2P mapping corresponding to each application will not be too much in the host memory, which will not cause pressure on the host memory.
考虑到HPB内存区域占用主机DRAM内存越多,给主机DRAM内存带来压力就越大,本实施例可以对HPB内存区域缓存的应用文件L2P映射的上限进行设置,例如HPB内存区域中可以同时缓存与n个(例如10个)热点应用对应的应用文件L2P映射。当HPB内存区域中已缓存与n个热点应用对应的应用文件L2P映射时,若用户再启动另一个热点应用,则电子设备可以基于预设刷新策略先将HPB内存区域中已缓存的与某个热点应用对应的应用文件L2P映射清空,再将另一个热点应用对应的文件L2P映射写入相应的HPB内存区域。例如,电子设备可以将HPB内存区域中与文件LBA查询频次较低的一个或多个热点应用对应的应用文件L2P映射清空。或者,电子设备可以基于预设刷新策略确定可被覆盖的HPB内存区域,并将另一个热点应用对应的文件L2P映射写入此可被覆盖的HPB内存区域,达到文件L2P映射置换的效果。示例性的,电子设备可以将缓存与文件LBA查询频次较低的一个或多个热点应用对应的应用文件L2P映射的HPB内存区域作为可被覆盖的HPB内存区域。Considering that the more the HPB memory area occupies the host DRAM memory, the greater the pressure on the host DRAM memory, this embodiment can set the upper limit of the application file L2P mapping cached in the HPB memory area, for example, the application file L2P mapping corresponding to n (for example, 10) hot applications can be cached in the HPB memory area at the same time. When the application file L2P mapping corresponding to n hot applications has been cached in the HPB memory area, if the user starts another hot application, the electronic device can first clear the application file L2P mapping corresponding to a hot application cached in the HPB memory area based on the preset refresh policy, and then write the file L2P mapping corresponding to another hot application into the corresponding HPB memory area. For example, the electronic device can clear the application file L2P mapping corresponding to one or more hot applications with a low file LBA query frequency in the HPB memory area. Alternatively, the electronic device can determine the HPB memory area that can be covered based on the preset refresh policy, and write the file L2P mapping corresponding to another hot application into this HPB memory area that can be covered, so as to achieve the effect of file L2P mapping replacement. Exemplarily, the electronic device may use the HPB memory area of the cache and application file L2P mapping corresponding to one or more hot applications with a low file LBA query frequency as the HPB memory area that can be covered.
根据第一方面,或者以上第一方面的任意一种实现方式,在电子设备确定HPB内存区域中缓存有第一文件L2P映射之后,还包括:According to the first aspect, or any implementation of the first aspect above, after the electronic device determines that the L2P mapping of the first file is cached in the HPB memory area, the method further includes:
如果在缓存第一文件L2P映射之后第一文件LBA列表被更新,则电子设备重新获取第一文件LBA列表,在UFS装置中读取与第一文件LBA列表对应的第四文件L2P映射,并将第四文件L2P映射对HPB内存区域中缓存的第一文件L2P映射进行更新。If the first file LBA list is updated after the first file L2P mapping is cached, the electronic device reacquires the first file LBA list, reads the fourth file L2P mapping corresponding to the first file LBA list in the UFS device, and updates the first file L2P mapping cached in the HPB memory area with the fourth file L2P mapping.
这样,能够确保根据应用的文件LBA列表加载相应的应用文件L2P映射的准确性,进而提高在主机内存中查询到文件PBA的概率。In this way, the accuracy of loading the corresponding application file L2P mapping according to the application file LBA list can be ensured, thereby improving the probability of querying the file PBA in the host memory.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
电子设备获取第五文件列表;第五文件列表是基于多个应用的使用情形对第二文件列表更新而生成的;根据第五文件列表生成第四文件LBA列表;电子设备在UFS装置中读取与第四文件LBA列表对应的第五文件L2P映射,并根据第五文件L2P映射对HPB内存区域中缓存的第二文件L2P映射进行更新。The electronic device obtains a fifth file list; the fifth file list is generated by updating the second file list based on the usage scenarios of multiple applications; a fourth file LBA list is generated according to the fifth file list; the electronic device reads a fifth file L2P mapping corresponding to the fourth file LBA list in the UFS device, and updates the second file L2P mapping cached in the HPB memory area according to the fifth file L2P mapping.
这样,根据应用的使用情形,对系统热点文件LBA列表进行更新,以此确保根据该文件LBA列表加载相应的系统文件L2P映射的准确性,进而提高在主机内存中查询到相关系统文件PBA的概率。In this way, the system hotspot file LBA list is updated according to the application usage scenario to ensure the accuracy of loading the corresponding system file L2P mapping according to the file LBA list, thereby increasing the probability of querying the relevant system file PBA in the host memory.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
在第一应用的启动过程中,如果根据HPB内存区域中缓存的第一文件L2P映射和第二文件L2P映射查询不到与第一目标文件LBA对应的PBA,则电子设备将第一目标文件LBA,添加至第一文件LBA列表中,对第一文件LBA列表进行更新;其中,第一目标文件LBA所对应的文件非系统文件。During the startup process of the first application, if the PBA corresponding to the first target file LBA cannot be found according to the first file L2P mapping and the second file L2P mapping cached in the HPB memory area, the electronic device adds the first target file LBA to the first file LBA list and updates the first file LBA list; wherein the file corresponding to the first target file LBA is not a system file.
这样,根据基于HPB内存区域中缓存的文件L2P映射查询文件PBA的结果,对应用热点文件LBA列表进行更新,以此确保根据该文件LBA列表加载相应的应用文件L2P映射的准确性,进而提高在主机内存中查询到相关应用文件PBA的概率。In this way, according to the result of querying the file PBA based on the file L2P mapping cached in the HPB memory area, the application hot file LBA list is updated to ensure the accuracy of loading the corresponding application file L2P mapping according to the file LBA list, thereby increasing the probability of querying the relevant application file PBA in the host memory.
根据第一方面,或者以上第一方面的任意一种实现方式,该方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
在任意应用的启动过程中,如果根据HPB内存区域中缓存的第二文件L2P映射查询不到与第二目标文件LBA对应的PBA,则电子设备将第二目标文件LBA,添加至第二文件LBA列表中,对第二文件LBA列表进行更新;其中,第二目标文件LBA所对应的文件为系统文件。During the startup process of any application, if the PBA corresponding to the second target file LBA cannot be found according to the second file L2P mapping cached in the HPB memory area, the electronic device adds the second target file LBA to the second file LBA list and updates the second file LBA list; wherein the file corresponding to the second target file LBA is a system file.
这样,根据基于HPB内存区域中缓存的文件L2P映射查询系统文件PBA的结果,对系统热点文件LBA列表进行更新,以此确保根据该文件LBA列表加载相应的系统文件L2P映射的准确性,进而提高在主机内存中查询到相关系统文件PBA的概率。In this way, according to the result of querying the system file PBA based on the file L2P mapping cached in the HPB memory area, the system hot file LBA list is updated to ensure the accuracy of loading the corresponding system file L2P mapping according to the file LBA list, thereby improving the probability of querying the relevant system file PBA in the host memory.
第二方面,本申请实施例提供一种电子设备。该电子设备包括:一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序存储在存储器上,当计算机程序被一个或多个处理器执行时,使得电子设备执行第一方面以及第一方面中任意一项的应用启动加速方法。In a second aspect, an embodiment of the present application provides an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device executes the first aspect and the application startup acceleration method of any one of the first aspects.
第二方面以及第二方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第二方面以及第二方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
第三方面,本申请实施例提供一种计算机可读存储介质。该计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得电子设备执行第一方面以及第一方面中任意一项的应用启动加速方法。In a third aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium includes a computer program, and when the computer program is executed on an electronic device, the electronic device executes the application startup acceleration method of the first aspect and any one of the first aspects.
第三方面以及第三方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第三方面以及第三方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
第四方面,本申请实施例提供一种计算机程序产品,包括计算机程序,当计算机程序被运行时,使得计算机执行如第一方面或第一方面中任意一项的应用启动加速方法。In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed, enables a computer to execute an application startup acceleration method as in the first aspect or any one of the first aspects.
第四方面以及第四方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第四方面以及第四方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
第五方面,本申请提供了一种芯片,该芯片包括处理电路、收发管脚。其中,该收发管脚和该处理电路通过内部连接通路互相通信,该处理电路执行如第一方面或第一方面中任意一项的应用启动加速方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the application startup acceleration method as in the first aspect or any one of the first aspects to control the receiving pin to receive a signal, and to control the sending pin to send a signal.
第五方面以及第五方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第五方面以及第五方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1a为示例性示出的应用场景示意图;FIG. 1a is a schematic diagram of an exemplary application scenario;
图1b为示例性示出的应用场景示意图;FIG1b is a schematic diagram of an exemplary application scenario;
图2为示例性示出的HPB机制示意图;FIG2 is a schematic diagram showing an exemplary HPB mechanism;
图3a为示例性示出的基于HPB缓存的L2P映射读取UFS装置中数据的示意图;FIG. 3a is a schematic diagram showing an exemplary method of reading data in a UFS device using L2P mapping based on HPB cache;
图3b为示例性示出的基于UFS装置的SRAM缓存的L2P映射读取UFS装置中数据的示意图;FIG3 b is a schematic diagram showing an exemplary method of reading data in a UFS device based on L2P mapping of an SRAM cache of the UFS device;
图3c为示例性示出的基于UFS装置的闪存中的L2P映射读取UFS装置中数据的示意图;FIG. 3 c is a schematic diagram exemplarily showing reading data in a UFS device based on L2P mapping in a flash memory of the UFS device;
图3d为示例性示出的基于不同方式读取UFS装置中数据时的延迟对比示意图;FIG3 d is a schematic diagram showing a comparison of delays when reading data in a UFS device in different ways;
图4为示例性示出的电子设备的硬件结构示意图;FIG4 is a schematic diagram showing an exemplary hardware structure of an electronic device;
图5为示例性示出的电子设备的软件结构示意图;FIG5 is a schematic diagram showing an exemplary software structure of an electronic device;
图6a为示例性示出的模块交互示意图;FIG6a is a schematic diagram showing exemplary module interaction;
图6b为示例性示出的主机内存HPB内存区域中缓存L2P映射的示意图;FIG6 b is a schematic diagram showing an exemplary cache L2P mapping in the HPB memory area of the host memory;
图6c为示例性示出的模块交互示意图;FIG6c is a schematic diagram showing exemplary module interactions;
图6d为示例性示出的主机内存HPB内存区域中缓存L2P映射的变化示意图;FIG6d is a schematic diagram showing an exemplary change of cache L2P mapping in the HPB memory area of the host memory;
图6e为示例性示出的模块交互示意图;FIG6e is a schematic diagram showing exemplary module interactions;
图6f为示例性示出的主机内存HPB内存区域中缓存L2P映射的变化示意图;FIG6f is a schematic diagram showing an exemplary change of cache L2P mapping in the HPB memory area of the host memory;
图6g为示例性示出的模块交互示意图;FIG6g is a schematic diagram showing exemplary module interaction;
图7a为示例性示出的模块交互示意图;FIG7a is a schematic diagram showing exemplary module interaction;
图7b为示例性示出的主机内存HPB内存区域中缓存L2P映射的变化示意图;FIG. 7 b is a schematic diagram showing an exemplary change of cache L2P mapping in the HPB memory area of the host memory;
图8a为示例性示出的模块交互示意图;FIG8a is a schematic diagram showing exemplary module interaction;
图8b为示例性示出的主机内存HPB内存区域中缓存L2P映射的变化示意图。FIG. 8 b is a schematic diagram showing an exemplary change of cache L2P mapping in the HPB memory area of the host memory.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
随着科学技术的不断发展,电子技术也得到了飞速的发展,电子产品的种类也越来越多,人们也享受到了科技发展带来的各种便利。现在人们可以通过各种类型的电子设备,享受随着科技发展带来的舒适生活。例如,智能手机、平板电脑等电子设备已经成为人们生活中一个重要的组成部分,用户可以使用智能手机、平板电脑等电子设备中提供的各种应用程序(以下简称应用)来听音乐、玩游戏等等,以减轻现代快节奏生活所带来的压力。With the continuous development of science and technology, electronic technology has also developed rapidly, and the types of electronic products have increased. People have also enjoyed the convenience brought by the development of science and technology. Now people can enjoy the comfortable life brought by the development of science and technology through various types of electronic devices. For example, electronic devices such as smart phones and tablets have become an important part of people's lives. Users can use various applications (hereinafter referred to as applications) provided in electronic devices such as smart phones and tablets to listen to music, play games, etc., to relieve the pressure brought by modern fast-paced life.
在用户使用智能手机、平板电脑等电子设备的过程中,可能会多次启动电子设备中的应用程序。针对电子设备中的一个应用程序而言,其启动可以包括应用冷启动和应用热启动。When a user uses an electronic device such as a smart phone or a tablet computer, the application program in the electronic device may be started multiple times. For an application program in the electronic device, the startup may include a cold startup and a hot startup.
当应用启动时,电子设备后台没有该应用的进程,这时系统会重新创建一个新的进程分配给该应用,这种应用启动方式就叫做应用冷启动(后台不存在该应用的进程)。应用程序冷启动时,因为系统会重新创建一个新的进程分配给该应用,所以会先创建和初始化Application类,再创建和初始化MainActivity类(包括一系列的测量、布局、绘制),最后显示在电子设备界面上。例如,用户在电子设备中首次打开某个应用时,或者是在清除当前应用缓存数据后用户再在电子设备中打开某个应用时,应用的启动方式为冷启动。示例性的,如图1a所示,在电子设备后台没有相机应用进程的情况下,用户点击相机应用的图标,响应于用户操作,电子设备启动相机应用,显示相机应用的界面。此时,相机应用的启动方式为冷启动。When the application is started, there is no process of the application in the background of the electronic device. At this time, the system will recreate a new process and assign it to the application. This application startup method is called application cold start (the process of the application does not exist in the background). When the application is cold started, because the system will recreate a new process and assign it to the application, it will first create and initialize the Application class, then create and initialize the MainActivity class (including a series of measurements, layouts, and drawing), and finally display it on the electronic device interface. For example, when a user opens an application for the first time in an electronic device, or when the user opens an application in an electronic device after clearing the current application cache data, the application is started in a cold start mode. Exemplarily, as shown in Figure 1a, when there is no camera application process in the background of the electronic device, the user clicks the icon of the camera application. In response to the user's operation, the electronic device starts the camera application and displays the interface of the camera application. At this time, the camera application is started in a cold start mode.
当应用已经被打开,但是由于用户按下返回键、Home键等按键使得电子设备显示桌面或其他应用程序界面,此时若用户重新打开该应用,这种应用启动方式叫做应用热启动(后台已经存在该应用的进程)。应用程序热启动时,因为系统从已有的进程中来启动应用,所以系统不会再执行与Application类对应的操作,而是直接执行与MainActivity类对应的操作。也即,应用热启动时,系统只需要创建和初始化MainActivity类,而不必创建和初始化Application类。示例性的,如图1b中所示,电子设备中的相机应用已启动,也即电子设备后台存在相机应用的进程的情况下,用户可以重新打开相机应用,以使相机应用重新在电子设备前台运行。此时,相机应用的启动方式为热启动。When the application has been opened, but the user presses the back key, Home key, etc. to make the electronic device display the desktop or other application interface, if the user reopens the application at this time, this application startup method is called application hot start (the process of the application already exists in the background). When the application is hot started, because the system starts the application from the existing process, the system will no longer perform operations corresponding to the Application class, but directly execute operations corresponding to the MainActivity class. That is, when the application is hot started, the system only needs to create and initialize the MainActivity class, without having to create and initialize the Application class. Exemplarily, as shown in Figure 1b, the camera application in the electronic device has been started, that is, when there is a process of the camera application in the background of the electronic device, the user can reopen the camera application to make the camera application run again in the foreground of the electronic device. At this time, the startup method of the camera application is hot start.
无论是应用冷启动还是应用热启动,应用程序的启动速度对用户体验的提升均是一个重要的因素。多数用户都会希望启动应用程序的速度能够尽可能快。随着应用程序提供的功能越来越多,启动应用程序时所需要加载的资源也越来越多,使得应用启动速度越来越慢。因此,如何提升应用程序的启动速度是需要解决的问题。Whether it is a cold start or a hot start, the startup speed of an application is an important factor in improving the user experience. Most users want to start the application as quickly as possible. As applications provide more and more functions, more and more resources need to be loaded when starting the application, making the application startup slower and slower. Therefore, how to improve the startup speed of the application is a problem that needs to be solved.
在应用程序启动过程中,通常是在应用程序开始启动之后,先读取相关文件,再基于相关文件加载应用进程,然后等待应用进程进行界面布局以及显示。其中,影响应用进程性能的文件(具体可以为IO block文件)可分为两类,一类为通用的系统文件,每种应用程序均可访问此类文件,另一类为应用程序本身涉及的文件,应用程序A本身涉及的文件只有应用程序A需要访问。可以理解的,无论是通用的系统文件,还是某个应用程序使用的文件,都是存储在电子设备的存储设备上的。During the application startup process, usually after the application starts to start, the relevant files are read first, then the application process is loaded based on the relevant files, and then the application process is waited for to layout and display the interface. Among them, the files that affect the performance of the application process (specifically, IO block files) can be divided into two categories, one is the general system files, which can be accessed by each application, and the other is the files involved in the application itself, and the files involved in application A itself are only needed to be accessed by application A. It can be understood that whether it is a general system file or a file used by a certain application, it is stored on the storage device of the electronic device.
UFS(Univeral Flash Storage,通用闪存存储),作为非易失存储器(NonVolatile Memory,NVM)的存储技术,正逐渐取代MMC(Multi Media Card,多媒体卡)和eMMC(embedded Multi Media Card,嵌入式多媒体卡)成为智能手机等电子设备的主要存储标准。UFS可以给智能手机等电子设备带来更高的读写速度,更可靠的稳定性。其中,在本申请实施例中,电子设备中用于存储文件数据的存储设备为UFS设备(或称UFS装置)。UFS (Univeral Flash Storage), as a storage technology for non-volatile memory (NVM), is gradually replacing MMC (Multi Media Card) and eMMC (embedded Multi Media Card) to become the main storage standard for electronic devices such as smartphones. UFS can bring higher read and write speeds and more reliable stability to electronic devices such as smartphones. Among them, in the embodiment of the present application, the storage device used to store file data in the electronic device is a UFS device (or UFS device).
HPB(Host Performance Booster,主机性能提升器)管理机制,是UFS的一个特性,在UFS3.1协议中开始引入,是利用电子设备(例如智能手机、平板电脑等)主机(Host)端的内存(如DRAM(Dynamic Random Access Memory,动态随机存取存储器))缓存UFS设备主控(UFSDevice Controller)的L2P(Logical address to Physical address,逻辑地址到物理地址)映射表,来提升UFS设备的读取性能,尤其是UFS设备长时间使用后的随机读取性能。HPB (Host Performance Booster) management mechanism is a feature of UFS. It was introduced in the UFS3.1 protocol. It uses the memory (such as DRAM (Dynamic Random Access Memory)) on the host side of electronic devices (such as smartphones, tablets, etc.) to cache the L2P (Logical address to Physical address) mapping table of the UFS device controller (UFSDevice Controller) to improve the read performance of UFS devices, especially the random read performance of UFS devices after long-term use.
对于一个文件来说,文件系统会为其分配若干个逻辑区块(Logical Block)用于存储文件数据。文件数据最终都是要存储在存储设备上,即与文件对应的这些逻辑块都是要写到存储设备的闪存物理块上去。For a file, the file system will allocate several logical blocks for storing file data. The file data will eventually be stored on the storage device, that is, the logical blocks corresponding to the file will be written to the flash physical blocks of the storage device.
对于UFS设备而言,由于一个LBA(Logical Block Adress,逻辑区块地址)的数据可能存储在闪存的任意一个物理位置,因此UFS设备需要维护一张逻辑区块地址到PBA(Physical Block Adress,逻辑区块地址)的映射关系表,即L2P映射表(也可以简称为L2P表)。L2P映射表是一个大的数组:索引为LBA,内容是该LBA在闪存的PBA。当存储设备根据某个LBA读取数据时,首先查找L2P映射表获得该LBA对应的PBA,然后根据该PBA读取与该LBA对应的存储数据。For UFS devices, since the data of an LBA (Logical Block Adress) may be stored in any physical location of the flash memory, the UFS device needs to maintain a mapping table from the logical block address to the PBA (Physical Block Adress), namely the L2P mapping table (also referred to as the L2P table). The L2P mapping table is a large array: the index is LBA, and the content is the PBA of the LBA in the flash memory. When the storage device reads data according to a certain LBA, it first searches the L2P mapping table to obtain the PBA corresponding to the LBA, and then reads the storage data corresponding to the LBA according to the PBA.
如图2所示,对于UFS设备来说,一般不设置DRAM,只设置小容量的SRAM(StaticRandom-Access Memory,静态随机存取存储器)。因此,L2P映射表大多被存储在快闪存储器装置(如基于NAND或NOR的快闪存储器装)中,UFS设备固件也可以按需加载部分L2P映射关系到UFS设备的SRAM中。UFS设备的L2P映射表被多级缓存。As shown in Figure 2, for UFS devices, DRAM is generally not set, only a small capacity SRAM (Static Random-Access Memory) is set. Therefore, the L2P mapping table is mostly stored in a flash memory device (such as a NAND or NOR-based flash memory device), and the UFS device firmware can also load part of the L2P mapping relationship into the SRAM of the UFS device on demand. The L2P mapping table of the UFS device is cached in multiple levels.
继续参照图2,基于HPB特性,可以在电子设备(例如智能手机、平板电脑等)主机端的内存(如DRAM)缓存UFS设备的L2P(Logical address to Physical address,逻辑地址到物理地址)映射表,来提升UFS设备的读取性能。Continuing with reference to FIG. 2 , based on the HPB feature, the L2P (Logical address to Physical address) mapping table of the UFS device can be cached in the memory (such as DRAM) on the host side of the electronic device (such as a smartphone, tablet computer, etc.) to improve the read performance of the UFS device.
针对支持HPB特性的电子设备,主机可以基于主机端的内存缓存的L2P映射表在UFS设备中读取相关数据,并在基于主机端的内存缓存的L2P映射表查询不到与LBA对应的PBA时,继续基于UFS设备的SRAM缓存的L2P映射表在UFS设备中读取相关数据,以及在基于UFS设备的SRAM缓存的L2P映射表查询不到与LBA对应的PBA时,继续基于UFS设备的快闪存储器装置中存储的L2P映射表在UFS设备中读取相关数据。For electronic devices that support the HPB feature, the host can read relevant data in the UFS device based on the L2P mapping table of the host-side memory cache, and when the PBA corresponding to the LBA cannot be found based on the L2P mapping table of the host-side memory cache, the host can continue to read relevant data in the UFS device based on the L2P mapping table of the SRAM cache of the UFS device, and when the PBA corresponding to the LBA cannot be found based on the L2P mapping table of the SRAM cache of the UFS device, the host can continue to read relevant data in the UFS device based on the L2P mapping table stored in the flash memory device of the UFS device.
针对支持HPB特性的电子设备,主机可以基于UFS设备的SRAM缓存的L2P映射表在UFS设备中读取相关数据,以及在基于UFS设备的SRAM缓存的L2P映射表查询不到与LBA对应的PBA时,继续基于UFS设备的快闪存储器装置中存储的L2P映射表在UFS设备中读取相关数据。For electronic devices that support the HPB feature, the host can read relevant data in the UFS device based on the L2P mapping table cached in the SRAM of the UFS device, and when the PBA corresponding to the LBA cannot be found in the L2P mapping table cached in the SRAM of the UFS device, the host continues to read relevant data in the UFS device based on the L2P mapping table stored in the flash memory device of the UFS device.
如图3a所示,当主机根据文件的LBA读取文件数据时,如果在主机DRAM缓存的L2P映射表中查询到与该LBA对应的PBA,则可以将该PBA发送至UFS设备存储系统中的地址转换模块进行地址转换,继而可以根据转换后的地址在快闪存储装置中读取到相应的文件数据。As shown in Figure 3a, when the host reads file data according to the LBA of the file, if the PBA corresponding to the LBA is queried in the L2P mapping table of the host DRAM cache, the PBA can be sent to the address conversion module in the UFS device storage system for address conversion, and then the corresponding file data can be read in the flash storage device according to the converted address.
如图3b所示,当主机根据文件的LBA读取文件数据时,如果在UFS设备中SRAM缓存的L2P映射表中查询到与该LBA对应的PBA,则可以将该PBA发送至UFS设备存储系统中的地址转换模块进行地址转换,继而可以根据转换后的地址在快闪存储装置中读取到相应的文件数据。As shown in Figure 3b, when the host reads file data according to the LBA of the file, if the PBA corresponding to the LBA is queried in the L2P mapping table of the SRAM cache in the UFS device, the PBA can be sent to the address conversion module in the UFS device storage system for address conversion, and then the corresponding file data can be read in the flash storage device according to the converted address.
如图3c所示,当主机根据文件的LBA读取文件数据时,如果在UFS设备中SRAM缓存的L2P映射表中未查询到与该LBA对应的PBA,则继续在UFS设备中快闪存储装置存储的L2P映射表中查询与该LBA对应的PBA,并在查询到与该LBA对应的PBA之后,将该PBA发送至UFS设备存储系统中的地址转换模块进行地址转换,继而可以根据转换后的地址在快闪存储装置中读取到相应的文件数据。As shown in Figure 3c, when the host reads file data according to the LBA of the file, if the PBA corresponding to the LBA is not found in the L2P mapping table cached in the SRAM of the UFS device, the PBA corresponding to the LBA will continue to be queried in the L2P mapping table stored in the flash storage device of the UFS device, and after the PBA corresponding to the LBA is found, the PBA is sent to the address conversion module in the storage system of the UFS device for address conversion, and then the corresponding file data can be read in the flash storage device according to the converted address.
针对图3a、图3b、图3c所示的LBA查询命中方式,图3d示出了相应的文件读取延迟的对比示意图。如图3d所示,主机基于主机端内存缓存的L2P映射表在UFS设备中读取相关数据时(也即主机查询的LBA在主机端内存缓存的L2P映射表中命中)的延迟,与主机基于UFS设备的SRAM缓存的L2P映射表在UFS设备中读取相关数据时(也即主机查询的LBA在UFS设备的SRAM缓存的L2P映射表中命中)的延迟大致相同,延迟时长均较短,也即用户感知延迟比较短,且延迟主要是由在UFS设备的快闪存储装置中读取数据而生成。而,主机基于UFS设备的SRAM缓存的L2P映射表未查询到PBA(也即主机查询的LBA在UFS设备的SRAM缓存的L2P映射表中未命中),再基于UFS设备的快闪存储器装置中存储的L2P映射表在UFS设备中读取相关数据时(也即主机查询的LBA在UFS设备的快闪存储装置存储的L2P映射表中命中),延迟就会增加,此时用户感知到的就比较长,而且延迟主要来自于在UFS设备的快闪存储装置中查询L2P映射表,以及在UFS设备的快闪存储装置中读取数据。For the LBA query hit mode shown in Figures 3a, 3b, and 3c, Figure 3d shows a comparative schematic diagram of the corresponding file read delay. As shown in Figure 3d, the delay when the host reads the relevant data in the UFS device based on the L2P mapping table of the host-side memory cache (that is, the LBA queried by the host hits the L2P mapping table of the host-side memory cache) is roughly the same as the delay when the host reads the relevant data in the UFS device based on the L2P mapping table of the SRAM cache of the UFS device (that is, the LBA queried by the host hits the L2P mapping table of the SRAM cache of the UFS device), and the delay duration is relatively short, that is, the user-perceived delay is relatively short, and the delay is mainly generated by reading data in the flash storage device of the UFS device. However, when the host fails to query the PBA based on the L2P mapping table of the SRAM cache of the UFS device (that is, the LBA queried by the host does not hit the L2P mapping table of the SRAM cache of the UFS device), and then reads related data in the UFS device based on the L2P mapping table stored in the flash memory device of the UFS device (that is, the LBA queried by the host hits the L2P mapping table stored in the flash storage device of the UFS device), the delay will increase. At this time, the user will feel a longer delay, and the delay mainly comes from querying the L2P mapping table in the flash storage device of the UFS device and reading data in the flash storage device of the UFS device.
关于HPB特性,目前并没有多少设备厂商使用,原因在于HPB特性会消耗主机端较大的内存(如DRAM内存)。例如,一个容量为512G的UFS设备,如果将其一半物理地址对应的L2P映射表缓存到主机端,就需要占用主机端512M的内存。而且,在这种情况下,主机基于其内存缓存的L2P映射表查询到与LBA对应的PBA的理论概率也只有50%。如果主机基于其内存缓存的L2P映射表未查询到与LBA对应的PBA,则主机还需要再基于UFS设备端SRAM或快闪存储装置中的L2P映射表重新查询与LBA对应的PBA。相比于,主机直接基于UFS设备端SRAM或快闪存储装置中的L2P映射表重新查询与LBA对应的PBA,此种情形还会增加由“主机基于其内存缓存的L2P映射表进行查询但未命中”而产生的时延。随着UFS设备容量的增加,HPB特性消耗主机端的内存就会更多,无疑会增加主机端的内存压力。一旦主机端内存缓存的L2P映射表未命中主机查询的LBA,就会使得UFS设备的读取性能进一步下降。As for the HPB feature, not many device manufacturers use it at present, because the HPB feature consumes a large amount of host memory (such as DRAM memory). For example, if a UFS device with a capacity of 512G caches the L2P mapping table corresponding to half of its physical addresses on the host side, it will need to occupy 512M of host memory. Moreover, in this case, the theoretical probability that the host will query the PBA corresponding to the LBA based on the L2P mapping table cached in its memory is only 50%. If the host does not query the PBA corresponding to the LBA based on the L2P mapping table cached in its memory, the host needs to re-query the PBA corresponding to the LBA based on the L2P mapping table in the SRAM or flash storage device on the UFS device side. Compared with the host directly re-querying the PBA corresponding to the LBA based on the L2P mapping table in the SRAM or flash storage device on the UFS device side, this situation will also increase the latency caused by "the host queries based on the L2P mapping table cached in its memory but misses". As the capacity of the UFS device increases, the HPB feature will consume more host memory, which will undoubtedly increase the memory pressure on the host side. Once the L2P mapping table of the host-side memory cache misses the LBA queried by the host, the read performance of the UFS device will be further reduced.
本申请实施例提供了一种应用启动加速方法。在该方法中,采用面向用户体验的HBP管理机制,提升应用启动时电子设备读取相关文件的速度,以此达到加速应用启动的有益效果。其中,本申请实施例所采用的面向用户体验的HBP管理机制,不仅只需占用较少的主机端内存(如DRAM内存),而且还能降低在主机端内存缓存的L2P映射表中查询不到相关文件LBA的概率。The embodiment of the present application provides an application startup acceleration method. In this method, a user experience-oriented HBP management mechanism is adopted to improve the speed at which the electronic device reads related files when the application is started, thereby achieving the beneficial effect of accelerating the startup of the application. Among them, the user experience-oriented HBP management mechanism adopted by the embodiment of the present application not only only requires less host-side memory (such as DRAM memory), but also reduces the probability of not being able to query the LBA of the related file in the L2P mapping table of the host-side memory cache.
如图4所示为电子设备100的结构示意图。可选地,电子设备100可以为终端,也可以称为终端设备,终端可以为蜂窝电话(cellular phone)或平板电脑(pad)等具有摄像头的设备,本申请不做限定。需要说明的是,电子设备100的结构示意图可以适用于图1a~图1b中的智能手机。应该理解的是,图4所示的电子设备100仅是电子设备的一个范例,并且电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图4中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。As shown in FIG. 4 , a schematic diagram of the structure of the electronic device 100 is shown. Optionally, the electronic device 100 may be a terminal, which may also be referred to as a terminal device. The terminal may be a device with a camera such as a cellular phone or a tablet computer (pad), which is not limited in this application. It should be noted that the schematic diagram of the structure of the electronic device 100 may be applicable to the smart phones in FIG. 1a to FIG. 1b. It should be understood that the electronic device 100 shown in FIG. 4 is only an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in FIG. 4 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application-specific integrated circuits.
电子设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器,陀螺仪传感器,加速度传感器,温度传感器,运动传感器,气压传感器,磁传感器,距离传感器,接近光传感器,指纹传感器,触摸传感器,环境光传感器,骨传导传感器等。The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an acceleration sensor, a temperature sensor, a motion sensor, an air pressure sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如UFS存储卡,实现扩展电子设备100的存储能力。外部存储卡(UFS存储卡)通过外部存储器接口120与处理器110通信,实现数据存储功能。在本实施例中,UFS存储卡支持HPB特性。The external memory interface 120 can be used to connect an external memory card, such as a UFS memory card, to expand the storage capacity of the electronic device 100. The external memory card (UFS memory card) communicates with the processor 110 through the external memory interface 120 to implement a data storage function. In this embodiment, the UFS memory card supports the HPB feature.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理,例如使得电子设备100实现本申请实施例中的应用启动加速方法。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121, such as enabling the electronic device 100 to implement the application startup acceleration method in the embodiment of the present application. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
图5是本申请实施例的电子设备100的软件结构框图。FIG. 5 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
电子设备100的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android Runtime)和系统库,以及内核层。The layered architecture of the electronic device 100 divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android Runtime) and the system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图5所示,应用程序包可以包括通话、日历、地图、导航、音乐、视频、短信息、相机、图库等应用程序。As shown in FIG. 5 , the application package may include applications such as call, calendar, map, navigation, music, video, short message, camera, gallery, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
如图5所示,应用程序框架层可以包括HPB管理代理(HPB管理Agent),包管理器(或称包管理服务(Package Manager Service,PMS)),活动管理器(或称活动管理服务(Activity Manager Service,AMS)),窗口管理器(或称窗口管理服务(Window ManagerService,WMS)),视图系统,资源管理器,通知管理器等。As shown in Figure 5, the application framework layer may include an HPB management agent (HPB Management Agent), a package manager (or Package Manager Service (PMS)), an activity manager (or Activity Manager Service (AMS)), a window manager (or Window Manager Service (WMS)), a view system, a resource manager, a notification manager, and the like.
其中,HPB管理Agent,指的是内核层HPB管理模块的代理服务,其可以调用HPB管理模块执行与HPB相关的操作。The HPB management agent refers to the agent service of the HPB management module in the kernel layer, which can call the HPB management module to perform operations related to the HPB.
在Android系统中,AMS、PMS和WMS是三个重要的系统服务,它们负责管理应用程序的生命周期、处理应用程序的安装和卸载,以及管理应用程序的窗口视图。In the Android system, AMS, PMS and WMS are three important system services, which are responsible for managing the life cycle of applications, handling the installation and uninstallation of applications, and managing the window views of applications.
AMS作为活动管理器服务,它主要负责管理和跟踪所有应用程序的活动任务和生命周期。当一个应用程序被打开时,AMS会启动该应用程序的进程,并给应用程序分配处理器资源和内存。当应用程序不再处于前台或后台,或者当系统内存不足时,AMS会终止或杀死这个应用程序的进程。As an activity manager service, AMS is mainly responsible for managing and tracking the activity tasks and life cycles of all applications. When an application is opened, AMS starts the process of the application and allocates processor resources and memory to the application. When the application is no longer in the foreground or background, or when the system memory is insufficient, AMS terminates or kills the process of the application.
PMS作为包管理器服务,主要负责在Android设备上安装、管理和卸载应用程序。当一个新的应用程序被安装时,PMS将识别应用程序的所有组件(如Activity、Service和Broadcast Receiver等),并为这些组件分配相应的权限。同时,PMS还监控已安装应用程序的状态,确保应用程序的完整性和安全性。As a package manager service, PMS is mainly responsible for installing, managing, and uninstalling applications on Android devices. When a new application is installed, PMS will identify all components of the application (such as Activity, Service, and Broadcast Receiver, etc.) and assign corresponding permissions to these components. At the same time, PMS also monitors the status of installed applications to ensure the integrity and security of the applications.
WMS作为窗口管理器服务,它主要负责管理Android设备上的窗口视图,并控制应用程序的界面和正确的显示和输入。WMS负责管理应用程序窗口的位置、大小和布局,照顾多任务操作和应用程序之间的切换,从而确保用户界面稳定、流畅和一致。As a window manager service, WMS is mainly responsible for managing the window view on the Android device and controlling the application interface and the correct display and input. WMS is responsible for managing the position, size and layout of the application window, taking care of multitasking and switching between applications, thus ensuring a stable, smooth and consistent user interface.
电源管理模块,可以理解为与电源管理系统对应的位于应用框架层的功能模块,可以用于检测电子设备是否进入关机流程等。The power management module can be understood as a functional module located in the application framework layer corresponding to the power management system, which can be used to detect whether the electronic device has entered the shutdown process, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知信息被用于告知下载完成,消息提醒等。通知信息还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如,通知信息可以是在状态栏提示文本信息,发出的提示音,电子设备的振动,指示灯的闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, notification information is used to inform the completion of downloads, message reminders, etc. Notification information can also appear in the system top status bar in the form of icons or scroll bar text, such as notifications of applications running in the background, or in the form of dialog windows on the screen. For example, notification information can be a text message in the status bar, a prompt sound, a vibration of an electronic device, a flashing indicator light, etc.
Android Runtime包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。如图5所示,内核层至少包含HPB管理模块、UFS主机驱动模块、文件系统模块、电源管理模块、显示驱动、传感器驱动等。其中,硬件至少包括处理器、显示屏、传感器、UFS设备等。The kernel layer is the layer between hardware and software. As shown in Figure 5, the kernel layer at least includes the HPB management module, UFS host driver module, file system module, power management module, display driver, sensor driver, etc. Among them, the hardware at least includes the processor, display screen, sensor, UFS device, etc.
在本实施例中,HPB管理模块可以用于实现文件列表(File list)管理、LBA列表(list)管理,以及HPB内存区域(region)管理等。其中,HPB内存区域可以理解为主机端基于HPB协议缓存UFP设备L2P映射表的内存区域(如DRAM区域)。In this embodiment, the HPB management module can be used to implement file list management, LBA list management, and HPB memory region management, etc. The HPB memory region can be understood as a memory region (such as a DRAM region) where the host caches the UFP device L2P mapping table based on the HPB protocol.
在本实施例中,UFS主机驱动模块可以用于对实现对HPB内存区域进行刷新。In this embodiment, the UFS host driver module can be used to refresh the HPB memory area.
文件系统模块,可以理解为与文件系统对应的位于内核层的功能模块,可以用于实现对文件的管理,例如为每个文件分配逻辑区块等。The file system module can be understood as a functional module located in the kernel layer corresponding to the file system, which can be used to implement file management, such as allocating logical blocks to each file.
可以理解的是,图5示出的软件结构中的层以及各层中包含的部件,并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请不做限定。It is understandable that the layers in the software structure shown in FIG5 and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
可以理解的是,电子设备为了实现本申请实施例中的应用启动加速方法,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It is understandable that in order to implement the application startup acceleration method in the embodiment of the present application, the electronic device includes hardware and/or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
本申请实施例提供的应用启动加速方法可以应用于电子设备(如智能手机等)的任意一个应用程序的启动流程中。可选的,在电子设备中也可以设置白名单,以使本申请实施例提供的应用启动加速方法可以应用于白名单中任意一个应用程序的启动流程中。示例性的,白名单中的应用程序为热点应用。The application startup acceleration method provided in the embodiment of the present application can be applied to the startup process of any application of an electronic device (such as a smart phone, etc.). Optionally, a whitelist can also be set in the electronic device so that the application startup acceleration method provided in the embodiment of the present application can be applied to the startup process of any application in the whitelist. Exemplarily, the application in the whitelist is a hot application.
考虑到影响应用进程性能的文件可分为两类,一类为通用的系统文件,每种应用程序均可访问此类文件,另一类为应用程序本身涉及的文件,应用程序A本身涉及的文件只有应用程序A需要访问。据此,在本申请实施例中,HPB管理模块管理两类文件LBA列表(list),一类是系统热点文件LBA list,根据应用启动过程中的系统热点文件list生成,另一类是应用文件LBA list(或称应用热点文件LBA list),根据应用启动过程中所使用的应用文件list(或称应用热点文件list)生成。其中,不同应用程序对应不同的应用文件LBAlist。Considering that the files that affect the performance of the application process can be divided into two categories, one is the general system files, which can be accessed by each application, and the other is the files involved in the application itself. The files involved in application A itself are only needed to be accessed by application A. Accordingly, in the embodiment of the present application, the HPB management module manages two types of file LBA lists, one is the system hotspot file LBA list, which is generated according to the system hotspot file list during the application startup process, and the other is the application file LBA list (or application hotspot file LBA list), which is generated according to the application file list (or application hotspot file list) used during the application startup process. Among them, different applications correspond to different application file LBA lists.
这样,在某个应用启动前,根据与该应用对应的应用文件LBA list预刷新主机内存中的HPB内存区域,也即将与应用文件LBA list对应的文件L2P映射刷新至HPB内存区域,能够减少该应用启动以及后续使用过程中读取相关文件的延时,尽量避免发生IO缺页的问题。In this way, before an application is started, the HPB memory area in the host memory is pre-refreshed according to the application file LBA list corresponding to the application, that is, the file L2P mapping corresponding to the application file LBA list is refreshed to the HPB memory area, which can reduce the delay in reading related files during the startup of the application and subsequent use, and try to avoid IO page fault problems.
下述以几个场景为例,对本申请实施例提供的应用启动加速方法进行解释说明。The following uses several scenarios as examples to explain the application startup acceleration method provided in the embodiments of the present application.
场景一scene one
在本场景中,以用户单独使用电子设备中的一个热点应用为例,对应用安装、应用更新、应用编译优化、应用启动以及电子设备开关机等情形下的相关处理流程进行解释说明。In this scenario, taking the example of a user using a hot application in an electronic device alone, the relevant processing procedures for application installation, application update, application compilation optimization, application startup, and powering on and off the electronic device are explained.
如图6a、图6c、图6e、图6g所示为各模块的交互示意图。参照图6a,本申请实施例提供的应用启动加速方法的流程,具体包括:Figures 6a, 6c, 6e and 6g are schematic diagrams of the interaction of the modules. Referring to Figure 6a, the process of the application startup acceleration method provided in the embodiment of the present application specifically includes:
S201,在电子设备初始化阶段,HPB管理模块在主机DRAM中申请HPB内存区域。S201, during the initialization phase of the electronic device, the HPB management module applies for an HPB memory area in the host DRAM.
其中,HPB内存区域用于缓存与应用启动或运行相关的文件的L2P映射。The HPB memory area is used to cache L2P mappings of files related to application startup or operation.
可以理解的,电子设备初始化阶段可以为电子设备的开机阶段。It can be understood that the electronic device initialization phase may be a power-on phase of the electronic device.
可选的,当HPB管理模块在主机DRAM中申请HPB内存区域之后,若当前不存在系统热点文件LBA list,则可以指示UFS Host驱动模块先加载UFS设备的部分L2P映射到HPB内存区域。Optionally, after the HPB management module applies for the HPB memory area in the host DRAM, if there is no system hotspot file LBA list, the UFS Host driver module can be instructed to first load part of the L2P mapping of the UFS device to the HPB memory area.
S202,HPB管理Agent获取系统热点文件list。S202, the HPB management agent obtains a system hot file list.
其中,系统热点文件,可以指的是访问频次较高的系统文件,不随应用切换而变化。Among them, system hot files may refer to system files with high access frequency, which do not change with application switching.
系统热点文件list,指的是由通用的系统热点文件组成的文件列表。示例性的,系统热点文件list中包括但不限于系统文件名、开始页数、页数量等。The system hotspot file list refers to a file list composed of common system hotspot files. Exemplarily, the system hotspot file list includes but is not limited to the system file name, the starting page number, the number of pages, etc.
特定版本的应用程序,在启动过程中所使用的文件页基本相同,所以可以对应用程序启动过程中所使用的文件列表进行监测,进而得到在应用启动过程中的系统热点文件列表,以及与每个应用对应的应用常用文件列表。关于识别系统热点文件的方法,以及识别应用常用文件列表的方法,可以参见已有技术,在此不再赘述。The file pages used by a specific version of an application during startup are basically the same, so the file list used during the application startup process can be monitored to obtain a system hotspot file list during the application startup process and a list of commonly used application files corresponding to each application. For methods of identifying system hotspot files and methods of identifying commonly used application file lists, please refer to the existing technology and will not be repeated here.
S203,HPB管理Agent调用HPB管理模块生成系统热点文件LBA list。S203, the HPB management agent calls the HPB management module to generate a system hotspot file LBA list.
系统热点文件LBA list,指的是由系统热点文件的LBA组成的LBA列表。示例性的,系统热点文件LBA list中包括但不限于系统文件名、逻辑区块以及LBA等。一个系统文件可以对应于一个或多个逻辑区块,每个逻辑区块对应的一个LBA。The system hotspot file LBA list refers to an LBA list composed of the LBAs of the system hotspot file. Exemplarily, the system hotspot file LBA list includes but is not limited to the system file name, logical block, and LBA, etc. A system file can correspond to one or more logical blocks, and each logical block corresponds to an LBA.
示例性的,HPB管理Agent调用HPB管理模块提供的相关函数,以通过HPB管理模块生成与系统热点文件list对应的系统热点文件LBA list。Exemplarily, the HPB management agent calls a related function provided by the HPB management module to generate a system hotspot file LBA list corresponding to the system hotspot file list through the HPB management module.
S204,HPB管理模块根据系统热点文件list生成系统热点文件LBA list,并向HPB管理Agent返回生成结果。S204, the HPB management module generates a system hotspot file LBA list according to the system hotspot file list, and returns the generation result to the HPB management Agent.
示例性的,HPB管理模块针对系统热点文件list中的每个系统文件,查询文件系统为其分配的逻辑区块,得到与每个系统文件对应的LBA list,继而可以得到与系统热点文件list对应的系统热点文件LBA list。Exemplarily, the HPB management module queries the logical blocks allocated by the file system for each system file in the system hot file list, obtains the LBA list corresponding to each system file, and then obtains the system hot file LBA list corresponding to the system hot file list.
例如,系统热点文件list中包括N1个系统文件,则与系统热点文件list对应的系统热点文件LBA list中包括与这N1个系统文件分别对应的LBA,一个系统文件对应一个或多个LBA。For example, the system hotspot file list includes N1 system files, and the system hotspot file LBA list corresponding to the system hotspot file list includes LBAs corresponding to the N1 system files, respectively. One system file corresponds to one or more LBAs.
HPB管理模块向HPB管理Agent返回的生成结果,用于指示是否已生成。在HPB管理模块生成系统热点文件LBA list之后,向HPB管理Agent返回用于指示已生成系统热点文件LBA list的生成结果。The generation result returned by the HPB management module to the HPB management agent is used to indicate whether the system hotspot file LBA list has been generated. After the HPB management module generates the system hotspot file LBA list, the generation result indicating that the system hotspot file LBA list has been generated is returned to the HPB management agent.
S205,HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新。S205, the HPB management agent calls the HPB management module to refresh the HPB memory area.
示例性的,HPB管理Agent调用HPB管理模块提供的相关函数,以通过HPB管理模块对HPB内存区域中的文件L2P映射进行刷新。具体的,在本步骤中,HPB管理Agent调用HPB管理模块将与系统热点文件LBA list对应的L2P映射写入主机内存中的HPB内存区域。Exemplarily, the HPB management agent calls the relevant function provided by the HPB management module to refresh the file L2P mapping in the HPB memory area through the HPB management module. Specifically, in this step, the HPB management agent calls the HPB management module to write the L2P mapping corresponding to the system hotspot file LBA list into the HPB memory area in the host memory.
S206,HPB管理模块向UFS Host驱动模块发送HPB内存区域刷新指令。S206: The HPB management module sends an HPB memory area refresh instruction to the UFS Host driver module.
在本步骤中,HPB内存区域刷新指令,用于指示UFS Host驱动模块将与系统热点文件LBA list对应的L2P映射写入主机内存中的HPB内存区域。In this step, the HPB memory area refresh instruction is used to instruct the UFS Host driver module to write the L2P mapping corresponding to the system hotspot file LBA list into the HPB memory area in the host memory.
S207,UFS Host驱动模块根据HPB内存区域刷新指令,将与系统热点文件LBA list对应的文件L2P映射写入主机内存中的HPB内存区域,并向HPB管理模块返回刷新结果,HPB管理模块向HPB管理Agent返回刷新结果。S207, the UFS Host driver module writes the file L2P mapping corresponding to the system hot file LBA list into the HPB memory area in the host memory according to the HPB memory area refresh instruction, and returns the refresh result to the HPB management module, and the HPB management module returns the refresh result to the HPB management Agent.
针对系统热点文件LBA list中的每个LBA,UFS Host驱动模块分别向UFS设备查询与其对应的L2P映射。例如,系统热点文件LBAlist中包括M1个LBA,则与系统热点文件LBAlist对应的文件L2P映射中包括与这M1个LBA分别对应的L2P映射。For each LBA in the system hotspot file LBA list, the UFS Host driver module queries the UFS device for the corresponding L2P mapping. For example, if the system hotspot file LBAlist includes M1 LBAs, the file L2P mapping corresponding to the system hotspot file LBAlist includes L2P mappings corresponding to the M1 LBAs.
S208,包管理器监听到应用1安装,向HPB管理Agent发送指示信息1。S208: The package manager monitors the installation of application 1 and sends instruction information 1 to the HPB management agent.
包管理器可以通过其监听接口在第一时间感知是否有应用安装。当包管理器监听到某个应用安装时,向HPB管理Agent发送相应的指示信息,以告知HPB管理Agent当前有应用正在安装。The package manager can detect whether an application is installed at the first time through its monitoring interface. When the package manager monitors the installation of an application, it sends corresponding indication information to the HPB management agent to inform the HPB management agent that an application is currently being installed.
示例性的,指示信息可以包括但不限于应用包名,以及指示类型。在指示信息1中,应用包名为应用1的包名,指示类型为应用安装指示。Exemplarily, the indication information may include but is not limited to an application package name and an indication type. In indication information 1, the application package name is the package name of application 1, and the indication type is an application installation indication.
S209,HPB管理Agent根据指示信息1,获取与应用1对应的文件list1。S209 , the HPB management agent obtains the file list1 corresponding to the application 1 according to the instruction information 1 .
与应用对应的文件list,指的是由应用在启动过程和/或运行过程中的应用常用文件、应用热点文件(非系统文件)组成的文件列表。示例性的,与某个应用对应的文件list中包括但不限于文件名、开始页数、页数量等。The file list corresponding to the application refers to a file list consisting of common application files and application hot files (non-system files) during the startup process and/or running process of the application. Exemplarily, the file list corresponding to a certain application includes but is not limited to the file name, the starting page number, the number of pages, etc.
示例性的,在应用1安装时,HPB管理Agent可以根据应用安装包名目录进行遍历,得到与应用1对应的文件list。For example, when application 1 is installed, the HPB management agent may traverse the directory of the application installation package name to obtain a file list corresponding to application 1.
HPB管理Agent根据指示信息1,确定应用1正在安装,需要获取与应用1对应的文件list1,并调用HPB管理模块生成与应用1对应的文件LBA list1。The HPB management agent determines, according to the indication information 1 , that the application 1 is being installed, and needs to obtain the file list 1 corresponding to the application 1 , and calls the HPB management module to generate the file LBA list 1 corresponding to the application 1 .
S210,HPB管理Agent调用HPB管理模块生成与应用1对应的文件LBA list1。S210 , the HPB management agent calls the HPB management module to generate a file LBA list1 corresponding to the application 1 .
与应用对应的文件LBA list,指的是由应用启动过程和/或运行过程中的应用常用文件的LBA组成的LBA列表。示例性的,与应用对应的文件LBA list中包括但不限于应用文件名、逻辑区块以及LBA等。一个应用文件可以对应于一个或多个逻辑区块,每个逻辑区块对应的一个LBA。The file LBA list corresponding to the application refers to an LBA list composed of LBAs of commonly used files of the application during the application startup process and/or running process. Exemplarily, the file LBA list corresponding to the application includes but is not limited to the application file name, logical block, and LBA, etc. An application file can correspond to one or more logical blocks, and each logical block corresponds to an LBA.
示例性的,HPB管理Agent调用HPB管理模块提供的相关函数,以通过HPB管理模块生成与应用1对应的文件LBA list1。Exemplarily, the HPB management agent calls a related function provided by the HPB management module to generate a file LBA list 1 corresponding to the application 1 through the HPB management module.
S211,HPB管理模块生成与应用1对应的文件LBA list1,并向HPB管理Agent返回生成结果。S211, the HPB management module generates a file LBA list 1 corresponding to the application 1, and returns the generation result to the HPB management Agent.
示例性的,HPB管理模块针对与应用1对应的文件list1中的每个应用文件,查询文件系统为其分配的逻辑区块,得到与每个应用文件对应的LBA list,继而可以得到与文件list1对应的文件LBA list1,也即与应用1对应的文件LBA list1。Exemplarily, the HPB management module queries the logical blocks allocated by the file system for each application file in file list1 corresponding to application 1, obtains the LBA list corresponding to each application file, and then obtains the file LBA list1 corresponding to file list1, that is, the file LBA list1 corresponding to application 1.
例如,与应用1对应的文件list1中包括N2个应用文件,则与应用1对应的文件LBAlist1中包括与这N2个应用文件分别对应的LBA,一个应用文件对应一个或多个LBA。For example, the file list1 corresponding to application 1 includes N2 application files, and the file LBAlist1 corresponding to application 1 includes LBAs corresponding to the N2 application files respectively, and one application file corresponds to one or more LBAs.
HPB管理模块向HPB管理Agent返回的生成结果,用于指示是否已生成。在HPB管理模块生成与应用1对应的文件LBA list1之后,向HPB管理Agent返回用于指示已生成与应用1对应的文件LBA list1的生成结果。The generation result returned by the HPB management module to the HPB management agent indicates whether the file LBA list1 corresponding to application 1 has been generated. After the HPB management module generates the file LBA list1 corresponding to application 1, the generation result indicating that the file LBA list1 corresponding to application 1 has been generated is returned to the HPB management agent.
S212,活动管理器监听到应用1即将启动,向HPB管理Agent发送指示信息2。S212: The activity manager monitors that application 1 is about to start, and sends indication information 2 to the HPB management agent.
活动管理器可以通过其监听接口在第一时间感知是否有应用即将启动。当活动管理器监听到有应用即将启动时,向HPB管理Agent发送相应的指示信息,以告知HPB管理Agent当前有应用正在安装。其中,应用启动可以是指应用冷启动,也可以是指应用热启动(如后台运行切换到前台运行)。The activity manager can detect whether an application is about to be started through its monitoring interface at the first time. When the activity manager monitors that an application is about to be started, it sends corresponding indication information to the HPB management agent to inform the HPB management agent that an application is currently being installed. Among them, application startup can refer to application cold start or application hot start (such as switching from background operation to foreground operation).
示例性的,指示信息可以包括但不限于应用包名,以及指示类型。在指示信息2中,应用包名为应用1的包名,指示类型为应用启动指示。Exemplarily, the indication information may include but is not limited to an application package name and an indication type. In indication information 2, the application package name is the package name of application 1, and the indication type is an application start indication.
S213,HPB管理Agent根据指示信息2,判断是否存在与应用1对应的文件LBA list,是则执行S214。S213, the HPB management agent determines whether there is a file LBA list corresponding to the application 1 according to the indication information 2, and if so, executes S214.
HPB管理Agent在获知应用1即将启动时,判断是否存在与应用1对应的文件LBAlist,如果不存在,则无法依据本实施例提供的方法对应用1启动流程进行加速,而是依据已有技术实现应用1的启动流程。在此情况下,HPB管理Agent可以重新获取与应用1对应的文件list1,并调用HPB管理模块生成与应用1对应的文件LBA list1(也即执行S209~S211)。这样,在应用1下次启动时,即可依据本实施例提供的方法对应用1启动流程进行加速。When the HPB management agent learns that application 1 is about to be started, it determines whether there is a file LBAlist corresponding to application 1. If not, the startup process of application 1 cannot be accelerated according to the method provided by this embodiment, but the startup process of application 1 is implemented according to the existing technology. In this case, the HPB management agent can re-acquire the file list1 corresponding to application 1 and call the HPB management module to generate the file LBA list1 corresponding to application 1 (that is, execute S209 to S211). In this way, when application 1 is started next time, the startup process of application 1 can be accelerated according to the method provided by this embodiment.
S214,HPB管理Agent判断与应用1对应的文件L2P映射是否加载至HPB内存区域,若否,则执行S215。S214, the HPB management agent determines whether the file L2P mapping corresponding to the application 1 is loaded into the HPB memory area, if not, executing S215.
如果与应用1对应的文件L2P映射未被加载至HPB内存区域,则HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新,以将与应用1对应的文件L2P映射是否加载至HPB内存区域,否则不对HPB内存区域进行刷新(此时流程可以跳转至S218)。If the file L2P mapping corresponding to application 1 is not loaded into the HPB memory area, the HPB management agent calls the HPB management module to refresh the HPB memory area to check whether the file L2P mapping corresponding to application 1 is loaded into the HPB memory area. Otherwise, the HPB memory area is not refreshed (the process can jump to S218 at this time).
S215,HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新。S215, the HPB management agent calls the HPB management module to refresh the HPB memory area.
示例性的,HPB管理Agent调用HPB管理模块提供的相关函数,以通过HPB管理模块对HPB内存区域中的文件L2P映射进行刷新。具体的,在本步骤中,HPB管理Agent调用HPB管理模块将与应用1文件LBA list1对应的L2P映射写入主机内存中的HPB内存区域。Exemplarily, the HPB management agent calls the relevant function provided by the HPB management module to refresh the file L2P mapping in the HPB memory area through the HPB management module. Specifically, in this step, the HPB management agent calls the HPB management module to write the L2P mapping corresponding to the application 1 file LBA list1 into the HPB memory area in the host memory.
S216,HPB管理模块向UFS Host驱动模块发送HPB内存区域刷新指令。S216: The HPB management module sends an HPB memory area refresh instruction to the UFS Host driver module.
在本步骤中,HPB内存区域刷新指令,用于指示UFS Host驱动模块将与应用1文件LBA list1对应的文件L2P映射写入主机内存中的HPB内存区域。In this step, the HPB memory area refresh instruction is used to instruct the UFS Host driver module to write the file L2P mapping corresponding to the application 1 file LBA list1 into the HPB memory area in the host memory.
S217,UFS Host驱动模块根据HPB内存区域刷新指令,将与文件LBA list1对应的文件L2P映射写入主机内存中的HPB内存区域,并向HPB管理模块返回刷新结果,HPB管理模块向HPB管理Agent返回刷新结果。S217, the UFS Host driver module writes the file L2P mapping corresponding to the file LBA list1 into the HPB memory area in the host memory according to the HPB memory area refresh instruction, and returns the refresh result to the HPB management module, and the HPB management module returns the refresh result to the HPB management Agent.
针对与应用1对应的文件LBA list1中的每个LBA,UFS Host驱动模块分别向UFS设备查询与其对应的文件L2P映射,并将这些文件L2P映射作为与应用1对应的文件L2P映射写入HPB内存区域。例如,与应用1对应的文件LBA list1中包括M2个LBA,则与应用1对应的(也即与文件LBA list1对应的)文件L2P映射中包括与这M2个LBA分别对应的L2P映射。For each LBA in the file LBA list1 corresponding to application 1, the UFS Host driver module queries the UFS device for the corresponding file L2P mapping, and writes these file L2P mappings into the HPB memory area as the file L2P mappings corresponding to application 1. For example, if the file LBA list1 corresponding to application 1 includes M2 LBAs, the file L2P mapping corresponding to application 1 (that is, corresponding to the file LBA list1) includes L2P mappings corresponding to the M2 LBAs.
S218,应用1启动,在应用1启动的过程中,系统基于HPB内存区域缓存的文件L2P映射在UFS设备中读取相关文件。S218, application 1 is started. During the process of starting application 1, the system reads relevant files in the UFS device based on the L2P mapping of the files cached in the HPB memory area.
示例性的,如图6b所示,在主机DRAM的HPB内存区域中,包括系统热点文件L2P映射缓存,以及与应用1对应的文件L2P映射缓存。这样,在应用1启动时,系统可以基于HPB内存区域中缓存的系统热点文件L2P映射,在UFS设备中读取相关系统热点文件,以及基于HPB内存区域中缓存的与应用1对应的文件L2P映射,在UFS设备中读取与应用1对应的常用应用文件,不再需要从UFS设备中读取相关文件L2P映射,以此提升文件读取速度,继而达到加速应用1启动或运行的效果。Exemplarily, as shown in FIG6b, the HPB memory area of the host DRAM includes a system hotspot file L2P mapping cache and a file L2P mapping cache corresponding to application 1. In this way, when application 1 is started, the system can read the relevant system hotspot files in the UFS device based on the system hotspot file L2P mapping cached in the HPB memory area, and read the common application files corresponding to application 1 in the UFS device based on the file L2P mapping corresponding to application 1 cached in the HPB memory area. It is no longer necessary to read the relevant file L2P mapping from the UFS device, thereby improving the file reading speed, and then achieving the effect of accelerating the startup or operation of application 1.
在一种可选的实施方式中,在应用1启动前,电子设备还可以将与应用1对应的服务文件进行预加载。其中,在电子设备进行文件预加载时,也可以基于HPB内存区域中缓存的相关文件L2P映射在UFS设备中读取相关文件,以此提升文件读取速度,达到加速文件预加载的效果。In an optional implementation, before application 1 is started, the electronic device may also preload the service file corresponding to application 1. When the electronic device preloads the file, the relevant file may be read in the UFS device based on the L2P mapping of the relevant file cached in the HPB memory area, thereby improving the file reading speed and achieving the effect of accelerating file preloading.
继续参照图6c,本申请实施例提供的应用启动加速方法的流程,具体还包括:Continuing to refer to FIG. 6c , the process of the application startup acceleration method provided in the embodiment of the present application further includes:
S301,包管理器监听到应用1更新或编译优化,向HBP管理Agent发送指示信息3。S301, the package manager monitors that application 1 is updated or compiled for optimization, and sends instruction information 3 to the HBP management Agent.
示例性的,指示信息可以包括但不限于应用包名,以及指示类型。在指示信息3中,应用包名为应用1的包名,指示类型为应用更新或应用编译优化。Exemplarily, the indication information may include but is not limited to an application package name and an indication type. In indication information 3, the application package name is the package name of application 1, and the indication type is application update or application compilation optimization.
S302,HBP管理Agent更新与应用1对应的文件list1。S302, the HBP management Agent updates the file list1 corresponding to the application 1.
在应用1更新或编译优化之后,HBP管理Agent重新获取与应用1对应的文件list作为文件list1。After application 1 is updated or compiled and optimized, the HBP management agent re-acquires the file list corresponding to application 1 as file list1.
S303,HBP管理Agent调用HBP管理模块对与应用1对应的文件LBA list1进行更新。S303 , the HBP management Agent calls the HBP management module to update the file LBA list1 corresponding to the application 1 .
示例性的,HPB管理Agent调用HPB管理模块提供的相关函数,以通过HPB管理模块更新与某个应用对应的文件LBA list。Exemplarily, the HPB management agent calls a related function provided by the HPB management module to update a file LBA list corresponding to a certain application through the HPB management module.
S304,HBP管理模块根据更新后的文件list1对与应用1对应的文件LBA list1进行更新,并向HBP管理Agent返回更新结果。S304, the HBP management module updates the file LBA list1 corresponding to the application 1 according to the updated file list1, and returns the update result to the HBP management Agent.
HBP管理模块根据更新后的文件list1,重新生成与应用1对应的文件LBA list作为文件LBA list1,并向HBP管理Agent返回用于指示更新完成的更新结果。The HBP management module regenerates the file LBA list corresponding to the application 1 as the file LBA list 1 according to the updated file list 1, and returns an update result indicating the completion of the update to the HBP management Agent.
S305,活动管理器监听到应用1即将启动,向HBP管理Agent发送指示信息4。S305: The activity manager monitors that application 1 is about to start, and sends indication information 4 to the HBP management Agent.
示例性的,指示信息可以包括但不限于应用包名,以及指示类型。在指示信息4中,应用包名为应用1的包名,指示类型为应用启动。Exemplarily, the indication information may include but is not limited to an application package name and an indication type. In indication information 4, the application package name is the package name of application 1, and the indication type is application startup.
S306,HPB管理Agent根据指示信息4,判断是否存在与应用1对应的文件LBA list,是则执行S307。S306, the HPB management agent determines whether there is a file LBA list corresponding to the application 1 according to the indication information 4, and if so, executes S307.
S307,HPB管理Agent判断与应用1对应的文件L2P映射是否加载至HPB内存区域,若是,则执行S308。S307, the HPB management agent determines whether the file L2P mapping corresponding to the application 1 is loaded into the HPB memory area, and if so, executes S308.
S308,HPB管理Agent判断与应用1对应的文件LBA list1是否被更新,若是,则执行S309。S308, the HPB management agent determines whether the file LBA list1 corresponding to the application 1 is updated, and if so, executes S309.
如果在将与文件LBA list1对应的文件L2P映射缓存值HPB内存区域之后,与应用1对应的文件LBA list1未被更新,则HPB管理Agent无需调用HPB管理模块对HPB内存区域进行刷新。如果在将与文件LBA list1对应的文件L2P映射缓存值HPB内存区域之后,与应用1对应的文件LBA list1被更新,则HPB管理Agent需要调用HPB管理模块对HPB内存区域进行刷新,以保证HPB内存区域缓存的与应用1对应的文件L2P映射的准确性,提高在HPB内存区域中能够查询到相关文件LBA的概率。If the file LBA list1 corresponding to application 1 is not updated after the file L2P mapping corresponding to file LBA list1 is cached in the HPB memory area, the HPB management agent does not need to call the HPB management module to refresh the HPB memory area. If the file LBA list1 corresponding to application 1 is updated after the file L2P mapping corresponding to file LBA list1 is cached in the HPB memory area, the HPB management agent needs to call the HPB management module to refresh the HPB memory area to ensure the accuracy of the file L2P mapping corresponding to application 1 cached in the HPB memory area, and to improve the probability of being able to query the relevant file LBA in the HPB memory area.
S309,HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新。S309, the HPB management agent calls the HPB management module to refresh the HPB memory area.
S310,HPB管理模块向UFS Host驱动模块发送HPB内存区域刷新指令。S310, the HPB management module sends an HPB memory area refresh instruction to the UFS Host driver module.
在本步骤中,HPB内存区域刷新指令,可以用于指示UFS Host驱动模块将HPB内存区域中与应用1对应的文件L2P映射进行更新。例如,HPB内存区域刷新指令,可以用于指示UFS Host驱动模块将HPB内存区域中与应用1对应的文件L2P映射清空,再将与应用1文件LBA list1(更新后的)对应的文件L2P映射重新写入主机内存中的HPB内存区域。再例如,HPB内存区域刷新指令,可以用于指示UFS Host驱动模块使用与应用1更新后的文件LBAlist对应的文件L2P映射,对HPB内存区域中与应用1更新前的文件LBA list对应的文件L2P映射进行置换或覆盖。In this step, the HPB memory area refresh instruction can be used to instruct the UFS Host driver module to update the file L2P mapping corresponding to application 1 in the HPB memory area. For example, the HPB memory area refresh instruction can be used to instruct the UFS Host driver module to clear the file L2P mapping corresponding to application 1 in the HPB memory area, and then rewrite the file L2P mapping corresponding to the application 1 file LBA list1 (updated) to the HPB memory area in the host memory. For another example, the HPB memory area refresh instruction can be used to instruct the UFS Host driver module to use the file L2P mapping corresponding to the file LBA list after the application 1 is updated, and replace or overwrite the file L2P mapping corresponding to the file LBA list before the application 1 is updated in the HPB memory area.
S311,UFS Host驱动模块根据HPB内存区域刷新指令,将HPB内存区域缓存的与应用1对应的文件L2P映射进行更新,并向HPB管理模块返回内存刷新结果,HPB管理模块向HPB管理Agent返回内存刷新结果。S311, the UFS Host driver module updates the L2P mapping of the file corresponding to the application 1 cached in the HPB memory area according to the HPB memory area refresh instruction, and returns the memory refresh result to the HPB management module, and the HPB management module returns the memory refresh result to the HPB management Agent.
示例性的,UFS Host驱动模块根据HPB内存区域刷新指令,将HPB内存区域中与应用1对应的文件L2P映射清空,再从UFS设备中读取与应用1文件LBA list1(更新后的)对应的文件L2P映射,并将这些文件L2P映射作为与应用1对应的文件L2P映射重新写入主机内存中的HPB内存区域。Exemplarily, the UFS Host driver module clears the file L2P mapping corresponding to application 1 in the HPB memory area according to the HPB memory area refresh instruction, then reads the file L2P mapping corresponding to application 1 file LBA list1 (updated) from the UFS device, and rewrites these file L2P mappings as the file L2P mappings corresponding to application 1 to the HPB memory area in the host memory.
如图6d所示,在UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新前,HPB内存区域包括系统热点文件L2P映射缓存,以及对应于应用1更新前的文件LBA list的文件L2P映射缓存;在UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新时,先清空对应于应用1更新前的文件LBA list的文件L2P映射缓存,再将对应于应用1更新后的文件LBA list的文件L2P映射写入HPB内存区域(或者,先将对应于应用1更新后的文件LBA list的文件L2P映射写入HPB内存区域,再清空对应于应用1更新前的文件LBA list的文件L2P映射缓存)。也即,在UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新后,HPB内存区域包括系统热点文件L2P映射缓存,以及对应于应用1更新后的文件LBAlist的文件L2P映射缓存。As shown in FIG6d, before the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction, the HPB memory area includes the system hotspot file L2P mapping cache and the file L2P mapping cache corresponding to the file LBA list before the application 1 is updated; when the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction, the file L2P mapping cache corresponding to the file LBA list before the application 1 is updated is first cleared, and then the file L2P mapping corresponding to the file LBA list after the application 1 is updated is written into the HPB memory area (or, the file L2P mapping corresponding to the file LBA list after the application 1 is updated is first written into the HPB memory area, and then the file L2P mapping cache corresponding to the file LBA list before the application 1 is updated is cleared). That is, after the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction, the HPB memory area includes the system hotspot file L2P mapping cache and the file L2P mapping cache corresponding to the file LBA list after the application 1 is updated.
又示例性的,UFS Host驱动模块根据HPB内存区域刷新指令,使用与应用1更新后的文件LBA list对应的文件L2P映射,对HPB内存区域中与应用1更新前的文件LBA list对应的文件L2P映射进行置换或覆盖。As another example, the UFS Host driver module uses the file L2P mapping corresponding to the file LBA list after application 1 updates according to the HPB memory area refresh instruction to replace or overwrite the file L2P mapping corresponding to the file LBA list before application 1 updates in the HPB memory area.
S312,应用1启动,在应用1启动的过程中,系统基于HPB内存区域缓存的文件L2P映射在UFS设备中读取相关文件。S312, application 1 is started. During the process of starting application 1, the system reads relevant files in the UFS device based on the L2P mapping of the files cached in the HPB memory area.
本流程未尽详细解释之处可以参照前文,在此不再赘述。For details not explained in this process, please refer to the previous text and will not be repeated here.
这样,在应用存在更新或编译优化时,对应用对应的文件LBA list进行更新,并基于更新后的文件LBA list刷新HPB内存区域中与该应用对应的文件L2P映射,以此确保HPB内存区域缓存的与应用1对应的文件L2P映射的准确性,提高在HPB内存区域中能够查询到与应用1启动或运行相关的文件LBA的概率。In this way, when the application is updated or compiled and optimized, the file LBA list corresponding to the application is updated, and the file L2P mapping corresponding to the application in the HPB memory area is refreshed based on the updated file LBA list, so as to ensure the accuracy of the file L2P mapping corresponding to application 1 cached in the HPB memory area, and improve the probability of querying the file LBA related to the startup or operation of application 1 in the HPB memory area.
继续参照图6e,本申请实施例提供的应用启动加速方法的流程,具体还包括:Continuing to refer to FIG. 6e , the process of the application startup acceleration method provided in the embodiment of the present application further includes:
S401,包管理器监听到应用1卸载,向HPB管理Agent发送指示信息5。S401, the package manager monitors that application 1 is uninstalled, and sends instruction information 5 to the HPB management agent.
示例性的,指示信息可以包括但不限于应用包名,以及指示类型。在指示信息5中,应用包名为应用1的包名,指示类型为应用卸载。Exemplarily, the indication information may include but is not limited to an application package name and an indication type. In indication information 5, the application package name is the package name of application 1, and the indication type is application uninstallation.
S402,HPB管理Agent根据指示信息5,删除与应用1对应的文件list1。S402 , the HPB management agent deletes the file list1 corresponding to the application 1 according to the instruction information 5 .
S403,HPB管理Agent调用HPB管理模块删除与应用1对应的文件LBA list1。S403 , the HPB management agent calls the HPB management module to delete the file LBA list1 corresponding to the application 1 .
HPB管理Agent判断是否存在与应用1对应的文件LBA list,若是,则调用HPB管理模块删除与应用1对应的文件LBA list。The HPB management agent determines whether there is a file LBA list corresponding to application 1, and if so, calls the HPB management module to delete the file LBA list corresponding to application 1.
示例性的,HPB管理Agent调用HPB管理模块提供的相关函数,以通过HPB管理模块删除与某个应用对应的文件LBA list。Exemplarily, the HPB management agent calls a related function provided by the HPB management module to delete the file LBA list corresponding to a certain application through the HPB management module.
S404,HPB管理模块删除与应用1对应的文件LBA list1,向HPB管理Agent发送删除结果。S404, the HPB management module deletes the file LBA list1 corresponding to the application 1, and sends the deletion result to the HPB management Agent.
S405,HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新。S405, the HPB management agent calls the HPB management module to refresh the HPB memory area.
S406,HPB管理模块向UFS Host驱动模块发送HPB内存区域刷新指令。S406: The HPB management module sends an HPB memory area refresh instruction to the UFS Host driver module.
S407,UFS Host驱动模块根据刷新指令,将HPB内存区域缓存的与应用1对应的文件L2P映射清空,并向HPB管理模块返回内存刷新结果,HPB管理模块向HPB管理Agent返回内存刷新结果。S407, the UFS Host driver module clears the L2P mapping of the file corresponding to the application 1 cached in the HPB memory area according to the refresh instruction, and returns the memory refresh result to the HPB management module, and the HPB management module returns the memory refresh result to the HPB management Agent.
如图6f所示,在UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新前(也即应用1卸载之前),HPB内存区域包括系统热点文件L2P映射缓存,以及对应于应用1的文件LBA list的文件L2P映射缓存;在应用1卸载之后,UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新时,清空HPB内存区域中对应于应用1的文件LBA list的文件L2P映射缓存。As shown in FIG6f , before the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction (that is, before application 1 is uninstalled), the HPB memory area includes the system hotspot file L2P mapping cache and the file L2P mapping cache corresponding to the file LBA list of application 1; after application 1 is uninstalled, when the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction, the file L2P mapping cache corresponding to the file LBA list of application 1 in the HPB memory area is cleared.
本流程未尽详细解释之处可以参照前文,在此不再赘述。For details not explained in this process, please refer to the previous text and will not be repeated here.
这样,在应用卸载时,删除与应用对应的文件LBA list,继而清空HPB内存区域与该文件LBA list对应的文件L2P映射,以避免浪费主机DRAM的HPB内存空间。In this way, when the application is uninstalled, the file LBA list corresponding to the application is deleted, and then the file L2P mapping corresponding to the file LBA list in the HPB memory area is cleared to avoid wasting the HPB memory space of the host DRAM.
继续参照图6g,本申请实施例提供的应用启动加速方法的流程,具体还包括:Continuing to refer to FIG. 6g , the process of the application startup acceleration method provided in the embodiment of the present application further includes:
S501,电源管理模块监听到电子设备即将关机,向HPB管理Agent发送指示信息6。S501: The power management module monitors that the electronic device is about to shut down, and sends an instruction message 6 to the HPB management Agent.
其中,指示信息6用于指示电子设备即将关机。Among them, indication information 6 is used to indicate that the electronic device is about to be shut down.
S502,HPB管理Agent存储系统热点文件list,以及与每个应用对应的文件list。S502: The HPB management agent stores a list of hot files in the system and a list of files corresponding to each application.
在电子设备即将关机时,HPB管理Agent将系统热点文件list,以及与每个应用对应的文件list存储至UFS设备,以使电子设备下次开机时可以在UFS设备中读取。When the electronic device is about to shut down, the HPB management agent stores the system hotspot file list and the file list corresponding to each application in the UFS device, so that the electronic device can read them in the UFS device when it is turned on next time.
S503,HPB管理Agent调用HPB管理模块存储文件LBA list。S503, the HPB management agent calls the HPB management module to store the file LBA list.
示例性的,HPB管理Agent调用HPB管理模块提供的相关函数,以通过HPB管理模块存储文件LBA list。Exemplarily, the HPB management agent calls a related function provided by the HPB management module to store the file LBA list through the HPB management module.
S504,HPB管理模块存储系统热点文件LBA list,以及与每个应用对应的文件LBAlist,向HPB管理Agent返回存储结果。S504, the HPB management module stores the system hotspot file LBA list and the file LBAlist corresponding to each application, and returns the storage result to the HPB management Agent.
HPB管理模块将系统热点文件LBA list,以及与每个应用对应的文件LBA list,存储至UFS设备,以使电子设备下次开机时可以在UFS设备中读取。The HPB management module stores the system hotspot file LBA list and the file LBA list corresponding to each application in the UFS device, so that the electronic device can read it in the UFS device when it is turned on next time.
S505,电源管理模块监听到电子设备开机,向HPB管理Agent发送指示信息7。S505: The power management module detects that the electronic device is turned on and sends instruction information 7 to the HPB management Agent.
其中,指示信息7用于指示电子设备开机。The indication information 7 is used to instruct the electronic device to turn on.
S506,在电子设备的初始化阶段,HPB管理模块在主机DRAM中申请HPB内存区域。S506, during the initialization phase of the electronic device, the HPB management module applies for an HPB memory area in the host DRAM.
S507,HPB管理Agent接收到指示信息7之后,判断是否存在系统热点文件LBAlist,若是,则执行S508。S507, after receiving the instruction information 7, the HPB management agent determines whether there is a system hotspot file LBAlist, and if so, executes S508.
如果不存在系统热点文件LBA list,则可以执行如图6a所示的S202~S207,以生成系统热点文件LBA list,继而基于系统热点文件LBA list刷新HPB内存区域,在此不再赘述。If the system hotspot file LBA list does not exist, S202 to S207 as shown in FIG. 6a may be executed to generate a system hotspot file LBA list, and then the HPB memory area is refreshed based on the system hotspot file LBA list, which will not be described in detail here.
S508,HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新。S508, the HPB management agent calls the HPB management module to refresh the HPB memory area.
S509,HPB管理模块向UFS Host驱动模块发送HPB内存区域刷新指令。S509: The HPB management module sends an HPB memory area refresh instruction to the UFS Host driver module.
在本步骤中,HPB内存区域刷新指令,用于指示UFS Host驱动模块将与系统热点文件LBA list对应的文件L2P映射写入HPB内存区域。In this step, the HPB memory area refresh instruction is used to instruct the UFS Host driver module to write the file L2P mapping corresponding to the system hot file LBA list into the HPB memory area.
S510,UFS Host驱动模块读取与系统热点文件LBA list对应的文件L2P映射,并写入HPB内存区域,并向HPB管理模块返回刷新结果,HPB管理模块向HPB管理Agent返回刷新结果。S510, the UFS Host driver module reads the file L2P mapping corresponding to the system hotspot file LBA list, writes it into the HPB memory area, and returns the refresh result to the HPB management module, and the HPB management module returns the refresh result to the HPB management Agent.
UFS Host驱动模块根据HPB内存区域刷新指令,在UFS设备中读取与系统热点文件LBA list对应的文件L2P映射,并将与系统热点文件LBA list对应的文件L2P映射写入HPB内存区域。The UFS Host driver module reads the file L2P mapping corresponding to the system hot file LBA list in the UFS device according to the HPB memory area refresh instruction, and writes the file L2P mapping corresponding to the system hot file LBA list into the HPB memory area.
本流程未尽详细解释之处可以参照前文,在此不再赘述。For details not explained in this process, please refer to the previous text and will not be repeated here.
这样,在后续应用启动的过程中,系统即可基于HPB内存区域中缓存的系统热点文件L2P映射在UFS设备中读取相关系统热点文件,提升文件读取速度,继而达到加速应用启动的效果。In this way, during the subsequent application startup process, the system can read the relevant system hot files in the UFS device based on the L2P mapping of the system hot files cached in the HPB memory area, thereby improving the file reading speed and achieving the effect of accelerating application startup.
在电子设备重新开机后,关于电子设备中任一热点应用的启动情形,可以参照图6a所示的S212~S218,在此不再赘述。After the electronic device is restarted, the activation of any hotspot application in the electronic device may be described in S212 to S218 shown in FIG. 6 a , which will not be described in detail herein.
场景二Scene 2
在本场景中,以用户同时使用电子设备中多个热点应用为例,对本申请实施例提供的应用启动加速方法进行解释说明。在下述流程中,以用户将电子设备的前台应用在应用1和应用2之间切换为例,进行解释说明。In this scenario, the application startup acceleration method provided by the embodiment of the present application is explained by taking the case that a user uses multiple hot applications in an electronic device at the same time as an example. In the following process, the user switches the foreground application of the electronic device between application 1 and application 2 as an example for explanation.
如图7a所示为各模块的交互示意图。参照图7a,本申请实施例提供的应用启动加速方法的流程,具体包括:FIG7a is a schematic diagram of the interaction between the modules. Referring to FIG7a , the process of the application startup acceleration method provided in the embodiment of the present application specifically includes:
S601,电子设备中的应用1启动后,应用1被切换到后台运行或关闭。S601, after application 1 in the electronic device is started, application 1 is switched to background operation or closed.
在应用1启动后,用户将应用1在前台退出,应用1被切换到后台运行,或者用户将应用1关闭。After application 1 is started, the user exits application 1 in the foreground, application 1 is switched to run in the background, or the user closes application 1.
S602,活动管理器监听到应用2即将启动,向HPB管理Agent发送指示信息8。S602: The activity manager monitors that application 2 is about to start, and sends an indication message 8 to the HPB management agent.
示例性的,指示信息可以包括但不限于应用包名,以及指示类型。在指示信息8中,应用包名为应用2的包名,指示类型为应用启动指示。Exemplarily, the indication information may include but is not limited to an application package name and an indication type. In indication information 8, the application package name is the package name of application 2, and the indication type is an application start indication.
S603,HPB管理Agent根据指示信息8,判断是否存在与应用2对应的文件LBA list,是则执行S604。S603, the HPB management agent determines whether there is a file LBA list corresponding to the application 2 according to the indication information 8, and if so, executes S604.
其中,在与应用2对应的文件LBA list,可以是在应用2安装时生成的,也可以是在应用2某次启动时生成的,并在电子关机时存储至UFS设备中。The LBA list of the file corresponding to the application 2 may be generated when the application 2 is installed, or may be generated when the application 2 is started for a certain time, and is stored in the UFS device when the computer is shut down.
S604,HPB管理Agent判断与应用2对应的文件L2P映射是否加载至HPB内存区域,若否,则执行S605。S604, the HPB management agent determines whether the file L2P mapping corresponding to the application 2 is loaded into the HPB memory area, if not, executing S605.
S605,HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新。S605, the HPB management agent calls the HPB management module to refresh the HPB memory area.
S606,HPB管理模块向UFS Host驱动模块发送HPB内存区域刷新指令。S606: The HPB management module sends an HPB memory area refresh instruction to the UFS Host driver module.
在本步骤中,HPB内存区域刷新指令用于指示将与应用2对应的文件L2P映射写入HPB内存区域。In this step, the HPB memory area refresh instruction is used to instruct to write the file L2P mapping corresponding to the application 2 into the HPB memory area.
S607,UFS Host驱动模块根据HPB内存区域刷新指令,将与应用2的文件LBA list对应的文件L2P映射写入主机内存中的HPB内存区域,并向HPB管理模块返回刷新结果,HPB管理模块向HPB管理Agent返回刷新结果。S607, the UFS Host driver module writes the file L2P mapping corresponding to the file LBA list of application 2 into the HPB memory area in the host memory according to the HPB memory area refresh instruction, and returns the refresh result to the HPB management module, and the HPB management module returns the refresh result to the HPB management Agent.
针对与应用2对应的文件LBA list2中的每个LBA,UFS Host驱动模块分别向UFS设备查询与其对应的文件L2P映射,并将这些文件L2P映射作为与应用2对应的文件L2P映射写入HPB内存区域。For each LBA in the file LBA list2 corresponding to application 2, the UFS Host driver module queries the UFS device for the corresponding file L2P mapping, and writes these file L2P mappings as the file L2P mappings corresponding to application 2 into the HPB memory area.
如图7b所示,在应用2未启动前,在主机DRAM的HPB内存区域中,包括系统热点文件L2P映射缓存,以及与应用1对应的文件L2P映射缓存。在应用2即将启动时,HPB内存区域被刷新,在刷新后的HPB内存区域中,包括系统热点文件L2P映射缓存,与应用1对应的文件L2P映射缓存,以及与应用2对应的文件L2P映射缓存。As shown in FIG7b , before application 2 is started, the HPB memory area of the host DRAM includes the system hotspot file L2P mapping cache and the file L2P mapping cache corresponding to application 1. When application 2 is about to be started, the HPB memory area is refreshed, and the refreshed HPB memory area includes the system hotspot file L2P mapping cache, the file L2P mapping cache corresponding to application 1, and the file L2P mapping cache corresponding to application 2.
S608,应用2启动,在应用2启动的过程中,系统基于HPB内存区域缓存的文件L2P映射在UFS设备中读取相关文件。S608, application 2 is started. During the process of starting application 2, the system reads relevant files in the UFS device based on the L2P mapping of the files cached in the HPB memory area.
S609,在应用2切换到后台运行或关闭后,活动管理器监听到应用1即将启动,向HPB管理Agent发送指示信息9。S609: After application 2 is switched to background operation or closed, the activity manager monitors that application 1 is about to start, and sends indication information 9 to the HPB management agent.
在指示信息9中,应用包名为应用1的包名,指示类型为应用启动指示。In indication information 9, the application package name is the package name of application 1, and the indication type is an application start indication.
S610,HPB管理Agent根据指示信息9,判断是否存在与应用1对应的文件LBA list,是则执行S611。S610, the HPB management agent determines whether there is a file LBA list corresponding to the application 1 according to the indication information 9, and if so, executes S611.
其中,在与应用1对应的文件LBA list,可以是在应用1安装时生成的,也可以是在应用1某次启动时生成的,并在电子关机时存储至UFS设备中。The LBA list of the file corresponding to the application 1 may be generated when the application 1 is installed, or may be generated when the application 1 is started for a certain time, and is stored in the UFS device when the computer is shut down.
S611,HPB管理Agent判断与应用1对应的文件L2P映射是否加载至HPB内存区域,若是,则执行S612。S611, the HPB management agent determines whether the file L2P mapping corresponding to the application 1 is loaded into the HPB memory area, and if so, executes S612.
S612,应用1启动,在应用1启动的过程中,系统基于HPB内存区域缓存的文件L2P映射在UFS设备中读取相关文件。S612, application 1 is started. During the process of starting application 1, the system reads relevant files in the UFS device based on the L2P mapping of the files cached in the HPB memory area.
本流程未尽详细解释之处可以参照前文,在此不再赘述。For details not explained in this process, please refer to the previous text and will not be repeated here.
由于HPB内存区域中,包括系统热点文件L2P映射缓存,与应用1对应的文件L2P映射缓存,以及与应用2对应的文件L2P映射缓存,所以用户切换使用应用1和应用2时,无论哪个应用即将启动,都可以基于HPB内存区域中缓存的文件L2P映射读取UFS设备中的文件,提升文件读取速度,进而达到加速应用启动的效果。Since the HPB memory area includes the system hotspot file L2P mapping cache, the file L2P mapping cache corresponding to application 1, and the file L2P mapping cache corresponding to application 2, when the user switches between application 1 and application 2, no matter which application is about to be started, the file in the UFS device can be read based on the file L2P mapping cached in the HPB memory area, thereby improving the file reading speed and accelerating the application startup.
考虑到HPB内存区域占用主机DRAM内存越多,给主机DRAM内存带来压力就越大,本实施例可以对HPB内存区域缓存的应用文件L2P映射的上限进行设置,例如HPB内存区域中可以同时缓存与n个(例如10个)热点应用对应的应用文件L2P映射。当HPB内存区域中已缓存与n个热点应用对应的应用文件L2P映射时,若用户再启动另一个热点应用,则电子设备可以基于预设刷新策略先将HPB内存区域中已缓存的与某个热点应用对应的应用文件L2P映射清空,再将另一个热点应用对应的文件L2P映射写入相应的HPB内存区域。例如,电子设备可以将HPB内存区域中与文件LBA查询频次较低的一个或多个热点应用对应的应用文件L2P映射清空。或者,电子设备可以基于预设刷新策略确定可被覆盖的HPB内存区域,并将另一个热点应用对应的文件L2P映射写入此可被覆盖的HPB内存区域,达到文件L2P映射置换的效果。示例性的,电子设备可以将缓存与文件LBA查询频次较低的一个或多个热点应用对应的应用文件L2P映射的HPB内存区域,作为可被覆盖的HPB内存区域。Considering that the more the HPB memory area occupies the host DRAM memory, the greater the pressure on the host DRAM memory, this embodiment can set the upper limit of the application file L2P mapping cached in the HPB memory area, for example, the application file L2P mapping corresponding to n (for example, 10) hot applications can be cached in the HPB memory area at the same time. When the application file L2P mapping corresponding to n hot applications has been cached in the HPB memory area, if the user starts another hot application, the electronic device can first clear the application file L2P mapping corresponding to a hot application cached in the HPB memory area based on the preset refresh policy, and then write the file L2P mapping corresponding to another hot application into the corresponding HPB memory area. For example, the electronic device can clear the application file L2P mapping corresponding to one or more hot applications with a low file LBA query frequency in the HPB memory area. Alternatively, the electronic device can determine the HPB memory area that can be covered based on the preset refresh policy, and write the file L2P mapping corresponding to another hot application into this HPB memory area that can be covered, so as to achieve the effect of file L2P mapping replacement. Exemplarily, the electronic device may use the HPB memory area of the cache and application file L2P mapping corresponding to one or more hot applications with a low file LBA query frequency as the HPB memory area that can be covered.
场景三Scene 3
在本场景中,电子设备对系统热点文件list以及与每个应用对应的应用文件list进行动态更新,继而对相应的系统热点文件LBA list以及与每个应用对应的应用文件LBAlist进行动态更新。这样,在根据系统热点文件LBA list以及应用文件LBA list对HPB内存区域进行刷新后,能够确保HPB内存区域中缓存的文件L2P映射的精准性,避免给HPB内存资源造成浪费,也能提升在HPB内存区域中查询到相关文件LBA的概率。In this scenario, the electronic device dynamically updates the system hot file list and the application file list corresponding to each application, and then dynamically updates the corresponding system hot file LBA list and the application file LBA list corresponding to each application. In this way, after refreshing the HPB memory area according to the system hot file LBA list and the application file LBA list, the accuracy of the L2P mapping of the files cached in the HPB memory area can be ensured, avoiding waste of HPB memory resources, and increasing the probability of querying the relevant file LBA in the HPB memory area.
如图8a所示为各模块的交互示意图。参照图8a,本申请实施例提供的应用启动加速方法的流程,具体包括:FIG8a is a schematic diagram of the interaction between the modules. Referring to FIG8a, the process of the application startup acceleration method provided in the embodiment of the present application specifically includes:
S701,HPB管理Agent获取更新后的系统热点文件list。S701, the HPB management agent obtains an updated system hotspot file list.
随着设备系统的更新,或者用户行为习惯的变化,热点应用可能会发生变化,系统热点文件可能会发生变化,与每个应用对应的常用文件也可能会发生变化。因此,在本申请实施例中,HPB管理Agent会对系统热点文件list、与每个热点应用对应的应用文件list进行动态更新。As the device system is updated or user behavior changes, hot applications may change, system hot files may change, and common files corresponding to each application may also change. Therefore, in the embodiment of the present application, the HPB management agent dynamically updates the system hot file list and the application file list corresponding to each hot application.
在本申请实施例中,可以针对每个应用程序启动及运行过程所涉及的系统文件及应用文件进行统计,并根据统计结果动态更新系统热点文件list,以及与每个应用对应的应用文件list。例如,将使用频率超过阈值1的系统文件作为系统热点文件。再例如,针对每个热点应用自身使用的文件,若文件使用频率超过阈值2,则将该文件作为与相应热点应用对应的应用热点文件。In an embodiment of the present application, statistics can be collected for system files and application files involved in the startup and operation process of each application, and the system hot file list and the application file list corresponding to each application can be dynamically updated according to the statistical results. For example, system files with a usage frequency exceeding threshold 1 are used as system hot files. For another example, for files used by each hot application itself, if the file usage frequency exceeds threshold 2, the file is used as an application hot file corresponding to the corresponding hot application.
示例性的,HPB管理Agent可以在云服务器侧获取更新后的系统热点文件list,也可以在电子设备的相关功能块侧获取更新后的系统热点文件list,还可以自身根据相关统计结果生成更新后的系统热点文件list,本实施例对此不做限定。Exemplarily, the HPB management agent can obtain the updated system hotspot file list on the cloud server side, or on the relevant functional block side of the electronic device, or generate the updated system hotspot file list based on relevant statistical results, which is not limited in this embodiment.
S702,HPB管理Agent更新系统热点文件list。S702, the HPB management agent updates the system hot file list.
HPB管理Agent可以使用更新后的系统热点文件list来替换已有的系统热点文件list,达到更新系统热点文件list的效果。The HPB management agent can use the updated system hot file list to replace the existing system hot file list, thereby achieving the effect of updating the system hot file list.
S703,HPB管理Agent调用HPB管理模块更新系统热点文件LBA list。S703, the HPB management agent calls the HPB management module to update the system hotspot file LBA list.
S704,HPB管理模块根据系统热点文件list,更新系统热点文件LBA list,并向HPB管理Agent返回更新结果。S704, the HPB management module updates the system hot file LBA list according to the system hot file list, and returns the update result to the HPB management Agent.
HBP管理模块根据更新后的系统热点文件list,重新生成系统热点文件LBA list,来替换已有的系统热点文件LBA list,并向HBP管理Agent返回用于指示更新完成的更新结果。The HBP management module regenerates the system hotspot file LBA list according to the updated system hotspot file list to replace the existing system hotspot file LBA list, and returns an update result indicating the completion of the update to the HBP management Agent.
作为一种可选的实施方式,还可以对每个应用程序启动及运行过程所涉及的在HPB内存区域中未查询到文件LBA的事件(或称文件LBA miss事件)进行统计,并将与LBAmiss事件对应的文件LBA更新到相应的文件LBA list中。例如,在某个应用程序的启动过程中,当HPB内存区域中查询某个系统文件的LBA时,若未查询到相应的文件L2P映射,则确定发生文件LBA miss事件,并将该系统文件的LBA添加至系统热点文件LBA list,对系统热点文件LBA list进行更新。As an optional implementation, the events in which the file LBA is not queried in the HPB memory area (or the file LBA miss event) involved in the startup and operation process of each application can also be counted, and the file LBA corresponding to the LBAmiss event is updated to the corresponding file LBA list. For example, during the startup process of a certain application, when the LBA of a certain system file is queried in the HPB memory area, if the corresponding file L2P mapping is not queried, it is determined that a file LBA miss event occurs, and the LBA of the system file is added to the system hotspot file LBA list, and the system hotspot file LBA list is updated.
S705,HPB管理Agent调用HPB管理模块对HPB内存区域进行刷新。S705, the HPB management agent calls the HPB management module to refresh the HPB memory area.
S706,HPB管理模块向UFS Host驱动模块发送HPB内存区域刷新指令。S706: The HPB management module sends an HPB memory area refresh instruction to the UFS Host driver module.
在本步骤中,HPB内存区域刷新指令,可以用于指示UFS Host驱动模块将HPB内存区域中与系统热点文件LBAlist对应的文件L2P映射进行更新。例如,HPB内存区域刷新指令,可以用于指示UFS Host驱动模块将HPB内存区域中与系统热点文件LBA list对应的文件L2P映射清空,再将与系统热点文件LBA list(更新后的)对应的文件L2P映射重新写入主机内存中的HPB内存区域。再例如,HPB内存区域刷新指令,可以用于指示UFS Host驱动模块使用与更新后的系统热点文件LBA list对应的文件L2P映射,对HPB内存区域中与更新前的系统热点文件LBA list对应的文件L2P映射进行置换或覆盖。In this step, the HPB memory area refresh instruction can be used to instruct the UFS Host driver module to update the file L2P mapping corresponding to the system hotspot file LBAlist in the HPB memory area. For example, the HPB memory area refresh instruction can be used to instruct the UFS Host driver module to clear the file L2P mapping corresponding to the system hotspot file LBA list in the HPB memory area, and then rewrite the file L2P mapping corresponding to the system hotspot file LBA list (updated) to the HPB memory area in the host memory. For another example, the HPB memory area refresh instruction can be used to instruct the UFS Host driver module to use the file L2P mapping corresponding to the updated system hotspot file LBA list to replace or overwrite the file L2P mapping corresponding to the system hotspot file LBA list before the update in the HPB memory area.
S707,UFS Host驱动模块根据HPB内存区域刷新指令,将HPB内存区域缓存的与系统热点文件LBA list对应的文件L2P映射进行更新,并向HPB管理模块返回内存刷新结果,HPB管理模块向HPB管理Agent返回内存刷新结果。S707, the UFS Host driver module updates the file L2P mapping corresponding to the system hot file LBA list cached in the HPB memory area according to the HPB memory area refresh instruction, and returns the memory refresh result to the HPB management module, and the HPB management module returns the memory refresh result to the HPB management Agent.
示例性的,UFS Host驱动模块根据HPB内存区域刷新指令,将HPB内存区域中与系统热点文件LBA list对应的文件L2P映射清空,再从UFS设备中读取与系统热点文件LBAlist(更新后的)对应的文件L2P映射,并将这些文件L2P映射作为与系统热点文件LBA list对应的文件L2P映射重新写入主机内存中的HPB内存区域。Exemplarily, the UFS Host driver module clears the file L2P mapping corresponding to the system hot file LBA list in the HPB memory area according to the HPB memory area refresh instruction, then reads the file L2P mapping corresponding to the system hot file LBA list (updated) from the UFS device, and rewrites these file L2P mappings as the file L2P mappings corresponding to the system hot file LBA list to the HPB memory area in the host memory.
如图8b所示,在UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新前,HPB内存区域包括对应于更新前的系统热点文件LBA list的系统热点文件L2P映射缓存;在UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新时,先清空对应于更新前的系统热点文件LBA list的系统热点文件L2P映射缓存,再将对应于更新后的系统热点文件LBA list的系统热点文件L2P映射写入HPB内存区域(或者,先将对应于更新后的系统热点文件LBA list的系统热点文件L2P映射写入HPB内存区域,再清空对应于更新前的系统热点文件LBA list的系统热点文件L2P映射缓存)。也即,在UFS Host驱动模块根据HPB内存区域刷新指令对HPB内存区域刷新后,HPB内存区域包括对应于更新后的系统热点文件LBA list的系统热点文件L2P映射缓存。As shown in FIG8b, before the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction, the HPB memory area includes a system hot file L2P mapping cache corresponding to the system hot file LBA list before the update; when the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction, the system hot file L2P mapping cache corresponding to the system hot file LBA list before the update is first cleared, and then the system hot file L2P mapping corresponding to the updated system hot file LBA list is written into the HPB memory area (or, the system hot file L2P mapping corresponding to the updated system hot file LBA list is first written into the HPB memory area, and then the system hot file L2P mapping cache corresponding to the system hot file LBA list before the update is cleared). That is, after the UFS Host driver module refreshes the HPB memory area according to the HPB memory area refresh instruction, the HPB memory area includes a system hot file L2P mapping cache corresponding to the updated system hot file LBA list.
又示例性的,UFS Host驱动模块根据HPB内存区域刷新指令,使用更新后的系统热点文件LBA list对应的文件L2P映射,对HPB内存区域中与更新前的系统热点文件LBA list对应的文件L2P映射进行置换或覆盖。In another exemplary embodiment, the UFS Host driver module uses the file L2P mapping corresponding to the updated system hot file LBA list to replace or overwrite the file L2P mapping corresponding to the system hot file LBA list before the update in the HPB memory area according to the HPB memory area refresh instruction.
这样,动态地对系统热点文件LBA list进行更新,并基于更新后的系统热点文件LBA list刷新HPB内存区域中的系统热点文件L2P映射,以此确保HPB内存区域缓存的系统热点文件L2P映射的准确性,提高在HPB内存区域中能够查询到与应用启动或运行相关的系统热点文件LBA的概率。In this way, the system hotspot file LBA list is dynamically updated, and the system hotspot file L2P mapping in the HPB memory area is refreshed based on the updated system hotspot file LBA list, so as to ensure the accuracy of the system hotspot file L2P mapping cached in the HPB memory area and improve the probability of querying the system hotspot file LBA related to application startup or operation in the HPB memory area.
S708,HPB管理Agent获取更新后的与应用3对应的应用文件list。S708 , the HPB management agent obtains the updated application file list corresponding to application 3 .
示例性的,HPB管理Agent可以在云服务器侧获取更新后的与应用3对应的应用文件list,也可以在电子设备的相关功能块侧获取更新后的与应用3对应的应用文件list,还可以自身根据相关统计结果生成更新后的与应用3对应的应用文件list,本实施例对此不做限定。Exemplarily, the HPB management agent can obtain the updated application file list corresponding to application 3 on the cloud server side, or obtain the updated application file list corresponding to application 3 on the relevant functional block side of the electronic device, or generate the updated application file list corresponding to application 3 based on relevant statistical results. This embodiment does not limit this.
S709,HPB管理Agent更新后的与应用3对应的应用文件list。S709, the HPB management agent updates the application file list corresponding to the application 3.
HPB管理Agent可以使用更新后的应用文件list来替换已有的应用文件list,达到更新与应用3对应的应用文件list的效果。The HPB management agent can use the updated application file list to replace the existing application file list, thereby achieving the effect of updating the application file list corresponding to application 3.
S710,HPB管理Agent调用HBP管理模块对与应用3对应的文件LBA list进行更新。S710 , the HPB management agent calls the HBP management module to update the file LBA list corresponding to application 3 .
S711,HBP管理模块根据更新后的文件list对与应用3对应的文件LBA list进行更新,并向HBP管理Agent返回更新结果。S711, the HBP management module updates the file LBA list corresponding to the application 3 according to the updated file list, and returns the update result to the HBP management Agent.
HBP管理模块根据更新后的文件list,重新生成与应用3对应的文件LBA list,来替换已有的与应用3对应的文件LBA list,并向HBP管理Agent返回用于指示更新完成的更新结果。The HBP management module regenerates the file LBA list corresponding to the application 3 according to the updated file list to replace the existing file LBA list corresponding to the application 3, and returns an update result indicating the completion of the update to the HBP management Agent.
作为一种可选的实施方式,还可以对每个应用程序启动及运行过程所涉及的在HPB内存区域中未查询到文件LBA的事件(或称文件LBA miss事件)进行统计,并将与LBAmiss事件对应的文件LBA更新到相应的文件LBA list中。例如,在某个应用程序的启动过程中,当HPB内存区域中查询某个应用文件的LBA时,若未查询到相应的文件L2P映射,则确定发生文件LBA miss事件,并将该应用文件的LBA添加至与这个应用对应的应用文件LBAlist中,对与这个应用对应的应用文件LBA list进行更新。As an optional implementation, the events in which the file LBA is not queried in the HPB memory area (or the file LBA miss event) involved in the startup and operation process of each application can also be counted, and the file LBA corresponding to the LBAmiss event is updated to the corresponding file LBA list. For example, during the startup process of a certain application, when the LBA of a certain application file is queried in the HPB memory area, if the corresponding file L2P mapping is not queried, it is determined that a file LBA miss event occurs, and the LBA of the application file is added to the application file LBAlist corresponding to this application, and the application file LBA list corresponding to this application is updated.
本流程未尽详细解释之处可以参照前文,在此不再赘述。For details not explained in this process, please refer to the previous text and will not be repeated here.
这样,动态对与每个热点应用对应的文件LBA list进行更新,在热点应用启动前,根据当前更新的文件LBA list刷新HPB内存区域中的应用热点文件L2P映射,以此确保HPB内存区域缓存的应用热点文件L2P映射的准确性,提高在HPB内存区域中能够查询到与应用启动或运行相关的应用热点文件LBA的概率,以此提高文件读取速度,达到加速应用启动的效果。In this way, the file LBA list corresponding to each hot application is dynamically updated. Before the hot application is started, the application hot file L2P mapping in the HPB memory area is refreshed according to the currently updated file LBA list, so as to ensure the accuracy of the application hot file L2P mapping cached in the HPB memory area, and improve the probability of querying the application hot file LBA related to the application startup or operation in the HPB memory area, so as to improve the file reading speed and achieve the effect of accelerating the application startup.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的应用启动加速方法。This embodiment also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the application startup acceleration method in the above-mentioned embodiment.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的应用启动加速方法。This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement the application startup acceleration method in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的应用启动加速方法。In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the application startup acceleration method in the above-mentioned method embodiments.
其中,本实施例提供的电子设备(如手机等)、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic device (such as a mobile phone, etc.), computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311113384.3A CN117707639B (en) | 2023-08-30 | 2023-08-30 | Application start acceleration method, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311113384.3A CN117707639B (en) | 2023-08-30 | 2023-08-30 | Application start acceleration method, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117707639A CN117707639A (en) | 2024-03-15 |
CN117707639B true CN117707639B (en) | 2024-07-12 |
Family
ID=90161265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311113384.3A Active CN117707639B (en) | 2023-08-30 | 2023-08-30 | Application start acceleration method, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117707639B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12405884B1 (en) * | 2024-04-25 | 2025-09-02 | Dell Products L.P. | Context-aware firmware-mapped host memory buffer (HMB) management system |
CN118708263B (en) * | 2024-08-30 | 2024-11-29 | 合肥康芯威存储技术有限公司 | Memory and acceleration method for starting time thereof |
CN119473167B (en) * | 2025-01-13 | 2025-05-06 | 合肥兆芯电子有限公司 | Method for adjusting capacity of shared buffer area and storage system |
CN120295937B (en) * | 2025-06-11 | 2025-09-12 | 深圳星火半导体科技有限公司 | Data processing method and device of storage device, medium and computer equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109710185A (en) * | 2018-12-19 | 2019-05-03 | 麒麟合盛网络技术股份有限公司 | Data processing method and device |
CN114968949A (en) * | 2022-05-23 | 2022-08-30 | 三星(中国)半导体有限公司 | Method for caching data, host device and storage system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113900582B (en) * | 2020-06-22 | 2024-08-16 | 慧荣科技股份有限公司 | Data processing method and corresponding data storage device |
CN112905111A (en) * | 2021-02-05 | 2021-06-04 | 三星(中国)半导体有限公司 | Data caching method and data caching device |
-
2023
- 2023-08-30 CN CN202311113384.3A patent/CN117707639B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109710185A (en) * | 2018-12-19 | 2019-05-03 | 麒麟合盛网络技术股份有限公司 | Data processing method and device |
CN114968949A (en) * | 2022-05-23 | 2022-08-30 | 三星(中国)半导体有限公司 | Method for caching data, host device and storage system |
Also Published As
Publication number | Publication date |
---|---|
CN117707639A (en) | 2024-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117707639B (en) | Application start acceleration method, electronic device and storage medium | |
EP4109230B1 (en) | Storage system, file storage and reading method, and terminal device | |
CN113590501B (en) | Data storage method and related equipment | |
CN113778662B (en) | Memory recovery method and device | |
US9734073B2 (en) | System and method for flash read cache with adaptive pre-fetch | |
CN113590509B (en) | Page exchange method, storage system and electronic equipment | |
US12293078B2 (en) | Storage space organization method and electronic device | |
CN114185494B (en) | Memory anonymous page processing method, electronic device and readable storage medium | |
EP4354305B1 (en) | Data exchange method and apparatus | |
CN116541180B (en) | Memory allocation method, electronic equipment and storage medium | |
WO2023070462A1 (en) | File deduplication method and apparatus, and device | |
WO2025026114A1 (en) | Storage processing method, electronic device, and readable storage medium | |
CN116400938B (en) | Operating system upgrading method, device and storage medium | |
US11237741B2 (en) | Electronic device and control method for controlling memory | |
WO2023198103A1 (en) | Inter-process communication method and electronic device | |
CN115981565A (en) | Memory, data storage method and electronic device | |
CN114490442A (en) | File segment adjustment method and electronic device | |
CN117369735B (en) | Data storage method, electronic device and storage medium | |
CN116662222B (en) | Cache management method and related equipment | |
CN114741205B (en) | Anonymous page recycling method and electronic device | |
CN119917025A (en) | Data writing method, device, electronic device and readable storage medium | |
WO2025112472A1 (en) | Control method for electronic device, electronic device, and storage medium | |
CN120561028A (en) | Flash memory access method, electronic equipment and storage medium | |
CN118626218A (en) | Resource scheduling method and electronic equipment | |
CN116700866A (en) | Window rendering method, device, and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |