CN115543600A - Memory space management method and memory space management device - Google Patents
Memory space management method and memory space management device Download PDFInfo
- Publication number
- CN115543600A CN115543600A CN202110742761.4A CN202110742761A CN115543600A CN 115543600 A CN115543600 A CN 115543600A CN 202110742761 A CN202110742761 A CN 202110742761A CN 115543600 A CN115543600 A CN 115543600A
- Authority
- CN
- China
- Prior art keywords
- memory
- application
- file system
- file
- mentioned
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/122—File system administration, e.g. details of archiving or snapshots using management policies
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请提供了一种内存空间管理方法和内存空间管理装置,在降低性能开销的同时,有效提高使用用户态内存文件系统的安全性。该方法包括:在启动第一应用的第一进程时,根据上述第一应用的应用标识为上述第一应用分配第一内存,该第一内存具有上述第一应用的应用标识,该应用标识用于指示上述第一内存为第一应用独占;将该第一内存映射到上述第一应用的第一进程的地址空间,上述第一内存初始化为第一文件系统实例;当该第一应用的第一进程访问第一文件路径时,若该第一文件路径为缓存路径,则将上述访问定向至所述第一文件系统实例中。
The present application provides a memory space management method and a memory space management device, which effectively improve the security of using a user state memory file system while reducing performance overhead. The method includes: when starting the first process of the first application, allocating a first memory for the first application according to the application identifier of the first application, the first memory has the application identifier of the first application, and the application identifier is used To indicate that the first memory is exclusive to the first application; map the first memory to the address space of the first process of the first application, and initialize the first memory as a first file system instance; when the first application's first When a process accesses the first file path, if the first file path is a cache path, the access is directed to the first file system instance.
Description
技术领域technical field
本申请涉及终端存储领域,尤其涉及一种内存空间管理方法和空间管理装置。The present application relates to the field of terminal storage, in particular to a memory space management method and a space management device.
背景技术Background technique
终端设备上很多应用的缓存文件的读写输入/输出(input/output,I/O)量占据整体读写的I/O量的80%以上,且缓存文件的尺寸都比较小,多数缓存文件的丢失不会对应用的运行造成影响,因此很适合利用内存文件系统进行数据保存。但是,传统的内存文件系统依赖于内核的实现,需要频繁地触发系统调用进入内核,会带来很大的软件开销,因此还可以使用用户态的内存文件系统保存缓存文件,可以有效避免系统调用的时间开销,提高缓存文件的读写I/O速度,提升用户体验。但是,目前在终端设备商用的用户态文件系统只有(file system in user space,FUSE),该文件系统依然需要通过系统调用进入内核态,带来性能开销。或者可以考虑针对持久化内存的文件系统(persistent memory filesystem,PMFS),但该系统由于缺乏适合上述终端设备应用环境的保护机制,不能为用户私有数据提供很好的安全性。The read and write input/output (input/output, I/O) volume of cache files of many applications on terminal devices accounts for more than 80% of the overall read and write I/O volume, and the size of cache files is relatively small. Most cache files The loss of the file will not affect the operation of the application, so it is very suitable to use the memory file system for data storage. However, the traditional in-memory file system relies on the implementation of the kernel, which needs to frequently trigger system calls to enter the kernel, which will bring a lot of software overhead. Therefore, the user-mode in-memory file system can also be used to save cache files, which can effectively avoid system calls Time overhead, improve the read and write I/O speed of cached files, and improve user experience. However, the only file system in user space (FUSE) currently commercially available on terminal devices is the file system in user space (FUSE), which still needs to enter the kernel state through system calls, which brings performance overhead. Alternatively, a persistent memory filesystem (PMFS) can be considered, but this system cannot provide good security for user private data due to the lack of a protection mechanism suitable for the application environment of the above-mentioned terminal equipment.
因此,目前亟需一种内存空间管理方法,以解决上述内存文件系统缺乏应用环境的保护机制,不能为用户私有数据提供很好的安全性的问题。Therefore, there is an urgent need for a memory space management method to solve the problem that the above-mentioned memory file system lacks a protection mechanism for the application environment and cannot provide good security for user private data.
发明内容Contents of the invention
本申请提供一种内存空间管理方法和空间管理装置,在降低性能开销的同时,有效提高使用用户态内存文件系统的安全性。The present application provides a memory space management method and a space management device, which can effectively improve the security of using a user state memory file system while reducing performance overhead.
第一方面,提供了一种内存空间管理方法,包括:在启动第一应用的第一进程时,根据上述第一应用的应用标识为上述第一应用分配第一内存,上述第一内存具有上述第一应用的应用标识,上述应用标识用于指示该第一内存为上述第一应用独占;将上述第一内存映射到上述第一应用的第一进程的地址空间,上述第一内存初始化为第一文件系统实例;当上述第一应用的第一进程访问第一文件路径时,若该第一文件路径为缓存路径,则将上述访问定向至上述第一文件系统实例中。In a first aspect, a memory space management method is provided, including: when starting a first process of a first application, allocating a first memory for the first application according to an application identifier of the first application, the first memory having the above-mentioned The application identifier of the first application, the application identifier is used to indicate that the first memory is exclusive to the first application; the first memory is mapped to the address space of the first process of the first application, and the first memory is initialized as the first memory A file system instance; when the first process of the first application accesses the first file path, if the first file path is a cache path, the access is directed to the first file system instance.
在本申请实施例中,终端设备可以向多个应用分别分配不同的内存,以供上述多个应用在对应的内存中创建、读或写文件,其中,终端设备可以记录多个内存地址,其中每一块内存可以对应一个文件系统的实例,即终端设备可以在上述多个内存上分别构建获得多个完整的用户态内存文件系统,以实现直接在上述内存中进行文件的管理,有效提高读写性能,又因为每一块内存对应唯一的应用ID,使得各个应用之间相互隔离,避免了应用之间的相互窥探,进而提高使用用户态内存文件系统的安全性。In this embodiment of the present application, the terminal device can allocate different memory to multiple applications, so that the above multiple applications can create, read or write files in the corresponding memory, wherein the terminal device can record multiple memory addresses, where Each block of memory can correspond to an instance of a file system, that is, the terminal device can build multiple complete user-mode memory file systems on the above-mentioned multiple memories, so as to realize file management directly in the above-mentioned memory, effectively improving read and write performance, and because each block of memory corresponds to a unique application ID, each application is isolated from each other, avoiding mutual snooping between applications, and thus improving the security of using the user-mode memory file system.
结合第一方面,在第一方面的某些实现方式中,在上述根据上述第一应用的应用标识为该第一应用分配第一内存之前,上述方法还包括:确定是否初次为上述第一应用分配内存;若初次为上述第一应用分配内存,将该第一内存的大小设置为第一数值,该第一数值为预设值;上述根据上述第一应用的应用标识为上述第一应用分配第一内存,还包括:获取上述第一应用的权限信息,该权限信息用于表示上述第一应用的读写权限;基于上述第一应用的权限信息,设置上述第一内存的被读写权限。With reference to the first aspect, in some implementation manners of the first aspect, before allocating the first memory to the first application according to the application identifier of the first application, the method further includes: determining whether the first application is Allocate memory; if memory is allocated for the above-mentioned first application for the first time, the size of the first memory is set to a first value, and the first value is a preset value; the above-mentioned first application is allocated according to the application identification of the above-mentioned first application The first memory further includes: obtaining permission information of the first application, the permission information is used to indicate the read and write permission of the first application; based on the permission information of the first application, setting the read and write permission of the first memory .
结合第一方面,在第一方面的某些实现方式中,上述方法还包括:若不是初次为上述第一应用分配内存,确定为该第一应用分配内存的次数;将上述第一内存的大小设置为第二数值,该第二数值是根据上述次数确定的。In combination with the first aspect, in some implementations of the first aspect, the above method further includes: if it is not the first time to allocate memory for the first application, determine the number of memory allocations for the first application; set the size of the first memory Set as the second value, the second value is determined according to the above times.
结合第一方面,在第一方面的某些实现方式中,上述第二数值为上述次数和上述第一数值的乘积。With reference to the first aspect, in some implementation manners of the first aspect, the aforementioned second numerical value is a product of the aforementioned number of times and the aforementioned first numerical value.
结合第一方面,在第一方面的某些实现方式中,上述方法还包括:在启动上述第一应用的第二进程时,若上述第一应用的应用标识对应的第一内存已经分配,将上述第一内存映射到上述第二进程的地址空间;当上述第二进程访问第二文件路径时,若上述第二文件路径为缓存路径,则将上述访问定向至上述第一文件系统实例中。With reference to the first aspect, in some implementations of the first aspect, the method further includes: when starting the second process of the first application, if the first memory corresponding to the application identifier of the first application has been allocated, The first memory is mapped to the address space of the second process; when the second process accesses the second file path, if the second file path is a cache path, the access is directed to the first file system instance.
结合第一方面,在第一方面的某些实现方式中,上述方法还包括:在上述第一内存不足的情况下,为上述第一应用分配第二内存,上述第二内存的大小大于上述第一内存大小。With reference to the first aspect, in some implementation manners of the first aspect, the above method further includes: when the above first memory is insufficient, allocating a second memory for the above first application, and the size of the above second memory is larger than the above first application. A memory size.
结合第一方面,在第一方面的某些实现方式中,上述为上述第一应用分配第二内存,还包括:将上述第一内存中的数据拷贝至上述第二内存;回收上述第一内存。In combination with the first aspect, in some implementations of the first aspect, the above-mentioned allocating the second memory for the above-mentioned first application further includes: copying the data in the above-mentioned first memory to the above-mentioned second memory; reclaiming the above-mentioned first memory .
结合第一方面,在第一方面的某些实现方式中,上述访问包括对文件的创建、读或写中的至少一个。With reference to the first aspect, in some implementation manners of the first aspect, the foregoing access includes at least one of creating, reading, or writing a file.
结合第一方面,在第一方面的某些实现方式中,在上述启动第一应用的第一进程之前,上述方法还包括:创建守护进程,所述守护进程用于管理至少一个文件系统实例,上述至少一个文件系统实例包括上述第一文件系统实例;启动上述守护进程,并通过上述守护进程获取至少一个应用的权限信息,上述至少一个应用包括上述第一应用;利用上述守护进程创建并初始化至少一个内存的地址,上述至少一个内存包括所述第一内存。With reference to the first aspect, in some implementation manners of the first aspect, before starting the first process of the first application, the above method further includes: creating a daemon process, the daemon process is used to manage at least one file system instance, The above-mentioned at least one file system instance includes the above-mentioned first file system instance; start the above-mentioned daemon process, and obtain permission information of at least one application through the above-mentioned daemon process, and the above-mentioned at least one application includes the above-mentioned first application; use the above-mentioned daemon process to create and initialize at least An address of a memory, the at least one memory includes the first memory.
第二方面,提供了一种内存空间管理装置,包括:分配模块和处理模块;其中,分配模块,用于在启动第一应用的第一进程时,根据上述第一应用的应用标识为上述第一应用分配第一内存,该第一内存具有所述第一应用的应用标识,上述应用标识用于指示上述第一内存为上述第一应用独占;处理模块,用于将上述第一内存映射到上述第一应用的第一进程的地址空间,上述第一内存初始化为第一文件系统实例;当上述第一应用的第一进程访问第一文件路径时,若上述第一文件路径为缓存路径,则将上述访问定向至所述第一文件系统实例中。In a second aspect, a memory space management device is provided, including: an allocation module and a processing module; wherein, the allocation module is configured to, when starting the first process of the first application, identify the first application as the first application according to the application identification of the first application An application allocates a first memory, the first memory has an application identifier of the first application, and the application identifier is used to indicate that the first memory is exclusively used by the first application; a processing module is configured to map the first memory to The address space of the first process of the first application, the first memory is initialized as a first file system instance; when the first process of the first application accesses the first file path, if the first file path is a cache path, Then direct the above access to the first file system instance.
结合第二方面,在第二方面的某些实现方式中,上述处理模块用于:确定是否初次为上述第一应用分配内存;若初次为上述第一应用分配内存,将上述第一内存的大小设置为第一数值,该第一数值为预设值;获取上述第一应用的权限信息,上述权限信息用于表示该第一应用的读写权限;基于该第一应用的权限信息,设置上述第一内存的被读写权限。In combination with the second aspect, in some implementations of the second aspect, the processing module is configured to: determine whether to allocate memory for the first application for the first time; if the memory is allocated for the first application for the first time, set the size of the first memory to Set as a first value, the first value is a preset value; obtain permission information of the above-mentioned first application, and the above-mentioned permission information is used to indicate the read-write permission of the first application; based on the permission information of the first application, set the above-mentioned The read and write permission of the first memory.
结合第二方面,在第二方面的某些实现方式中,上述处理模块用于:若不是初次为上述第一应用分配内存,确定为上述第一应用分配内存的次数;将上述第一内存的大小设置为第二数值,上述第二数值是根据上述次数确定的。In combination with the second aspect, in some implementation manners of the second aspect, the above-mentioned processing module is configured to: if it is not the first time to allocate memory for the above-mentioned first application, determine the number of memory allocations for the above-mentioned first application; The size is set as a second value, and the second value is determined according to the number of times.
结合第二方面,在第二方面的某些实现方式中,上述第二数值为上述次数和上述第一数值的乘积。With reference to the second aspect, in some implementation manners of the second aspect, the aforementioned second numerical value is a product of the aforementioned number of times and the aforementioned first numerical value.
结合第二方面,在第二方面的某些实现方式中,上述处理模块用于:在启动上述第一应用的第二进程时,若上述第一应用的应用标识对应的第一内存已经分配,将上述第一内存映射到上述第二进程的地址空间;当上述第二进程访问第二文件路径时,若上述第二文件路径为缓存路径,则将上述访问定向至上述第一文件系统实例中。With reference to the second aspect, in some implementation manners of the second aspect, the above-mentioned processing module is configured to: when starting the second process of the above-mentioned first application, if the first memory corresponding to the application identifier of the above-mentioned first application has been allocated, Map the above-mentioned first memory to the address space of the above-mentioned second process; when the above-mentioned second process accesses the second file path, if the above-mentioned second file path is a cache path, then direct the above-mentioned access to the above-mentioned first file system instance .
结合第二方面,在第二方面的某些实现方式中,上述分配模块用于:在上述第一内存不足的情况下,为上述第一应用分配第二内存,上述第二内存的大小大于上述第一内存大小。With reference to the second aspect, in some implementation manners of the second aspect, the allocation module is configured to: allocate a second memory for the first application when the first memory is insufficient, and the size of the second memory is larger than the above-mentioned The first memory size.
结合第二方面,在第二方面的某些实现方式中,上述处理模块用于:将上述第一内存中的数据拷贝至所述第二内存;回收上述第一内存。With reference to the second aspect, in some implementation manners of the second aspect, the processing module is configured to: copy data in the first memory to the second memory; reclaim the first memory.
结合第二方面,在第二方面的某些实现方式中,上述访问包括对文件的创建、读或写中的至少一个。With reference to the second aspect, in some implementation manners of the second aspect, the foregoing access includes at least one of creating, reading, or writing a file.
结合第二方面,在第二方面的某些实现方式中,上述处理模块用于:创建守护进程,该守护进程用于管理至少一个文件系统实例,上述至少一个文件系统实例包括上述第一文件系统实例;启动上述守护进程,并通过上述守护进程获取至少一个应用的权限信息,该至少一个应用包括所述第一应用;利用上述守护进程创建并初始化至少一个内存的地址,上述至少一个内存包括上述第一内存。With reference to the second aspect, in some implementation manners of the second aspect, the above-mentioned processing module is configured to: create a daemon process, and the daemon process is used to manage at least one file system instance, and the above-mentioned at least one file system instance includes the above-mentioned first file system Example; start the above-mentioned daemon process, and obtain permission information of at least one application through the above-mentioned daemon process, the at least one application includes the first application; use the above-mentioned daemon process to create and initialize the address of at least one memory, and the above-mentioned at least one memory includes the above-mentioned first memory.
第三方面,提供了另一种内存空间管理装置,包括处理器,该处理器与存储器耦合,可用于执行存储器中的指令,以实现上述第一方面中任一种可能实现方式中的方法。可选地,该装置还包括存储器。可选地,该装置还包括通信接口,处理器与通信接口耦合。In a third aspect, another memory space management device is provided, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory, so as to implement the method in any possible implementation manner of the above first aspect. Optionally, the device further includes a memory. Optionally, the device further includes a communication interface, and the processor is coupled to the communication interface.
第四方面,提供了一种处理器,包括:输入电路、输出电路和处理电路。处理电路用于通过输入电路接收信号,并通过输出电路发射信号,使得处理器执行上述第一方面中任一种可能实现方式中的方法。In a fourth aspect, a processor is provided, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation manner of the first aspect above.
在具体实现过程中,上述处理器可以为芯片,输入电路可以为输入管脚,输出电路可以为输出管脚,处理电路可以为晶体管、门电路、触发器和各种逻辑电路等。输入电路所接收的输入的信号可以是由例如但不限于接收器接收并输入的,输出电路所输出的信号可以是例如但不限于输出给发射器并由发射器发射的,且输入电路和输出电路可以是同一电路,该电路在不同的时刻分别用作输入电路和输出电路。本申请实施例对处理器及各种电路的具体实现方式不做限定。In a specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop, and various logic circuits. The input signal received by the input circuit may be received and input by, for example but not limited to, the receiver, the output signal of the output circuit may be, for example but not limited to, output to the transmitter and transmitted by the transmitter, and the input circuit and the output The circuit may be the same circuit, which is used as an input circuit and an output circuit respectively at different times. The embodiment of the present application does not limit the specific implementation manners of the processor and various circuits.
第五方面,提供了一种处理装置,包括处理器和存储器。该处理器用于读取存储器中存储的指令,并可通过接收器接收信号,通过发射器发射信号,以执行上述第一方面中任一种可能实现方式中的方法。In a fifth aspect, a processing device is provided, including a processor and a memory. The processor is used to read instructions stored in the memory, and may receive signals through the receiver and transmit signals through the transmitter, so as to execute the method in any possible implementation manner of the first aspect above.
可选地,处理器为一个或多个,存储器为一个或多个。Optionally, there are one or more processors, and one or more memories.
可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be separated from the processor.
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型以及存储器与处理器的设置方式不做限定。In a specific implementation process, the memory may be a non-transitory (non-transitory) memory, such as a read-only memory (read only memory, ROM), which may be integrated with the processor on the same chip, or may be respectively arranged in different On the chip, the embodiment of the present application does not limit the type of the memory and the configuration of the memory and the processor.
上述第五方面中的处理装置可以是一个芯片,该处理器可以通过硬件来实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。The processing device in the above-mentioned fifth aspect may be a chip, and the processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; When implemented, the processor may be a general-purpose processor, which is realized by reading the software code stored in the memory, and the memory may be integrated in the processor, or it may be located outside the processor and exist independently.
第六方面,提供了一种计算机程序产品,计算机程序产品包括:计算机程序(也可以称为代码,或指令),当计算机程序被运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a sixth aspect, a computer program product is provided, and the computer program product includes: a computer program (also referred to as code, or instruction), which, when the computer program is run, causes the computer to perform any one of the possible implementations in the first aspect above. methods in methods.
第七方面,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序(也可以称为代码,或指令)当其在计算机上运行时,使得计算机执行上述第一方面中任一种可能实现方式中的方法。In a seventh aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores a computer program (also referred to as code, or an instruction) which, when run on a computer, enables the computer to execute the above-mentioned first aspect. A method in any of the possible implementations.
附图说明Description of drawings
图1是本申请实施例提供的一种终端设备的系统架构示意图;FIG. 1 is a schematic diagram of a system architecture of a terminal device provided in an embodiment of the present application;
图2是本申请实施例提供的又一终端设备示意图;FIG. 2 is a schematic diagram of another terminal device provided by an embodiment of the present application;
图3是本申请实施例提供的内存空间管理方法的示意性流程图;FIG. 3 is a schematic flowchart of a memory space management method provided by an embodiment of the present application;
图4是本实施例提供的又一终端设备的示意性框图;FIG. 4 is a schematic block diagram of another terminal device provided in this embodiment;
图5是本申请实施例提供的用户态内存文件系统结构的示意图;FIG. 5 is a schematic diagram of a user mode memory file system structure provided by an embodiment of the present application;
图6是本申请实施例提供的节点表的示意图;FIG. 6 is a schematic diagram of a node table provided by an embodiment of the present application;
图7是本申请实施例提供的空间池的示意图;Fig. 7 is a schematic diagram of the spatial pool provided by the embodiment of the present application;
图8是本申请实施例提供的用户态内存文件系统与现有内存文件系统的性能对比示意图;FIG. 8 is a schematic diagram of performance comparison between the user mode memory file system provided by the embodiment of the present application and the existing memory file system;
图9是本申请实施例提供的一种内存空间管理装置的示意性框图;FIG. 9 is a schematic block diagram of a memory space management device provided by an embodiment of the present application;
图10是本申请实施例提供的又一内存空间管理装置的示意性框图。Fig. 10 is a schematic block diagram of another memory space management device provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below with reference to the accompanying drawings.
在介绍本申请实施例提供的方法和装置之前,先做出以下几点说明。Before introducing the method and device provided by the embodiment of the present application, the following points are explained first.
第一,在下文示出的实施例中,各术语及英文缩略语,例如基准数据或差分数据等,均为方便描述而给出的示例性举例,不应对本申请构成任何限定。本申请并不排除在已有或未来的协议中定义其它能够实现相同或相似功能的术语的可能。First, in the embodiments shown below, various terms and English abbreviations, such as benchmark data or differential data, are illustrative examples given for convenience of description, and should not constitute any limitation to the present application. This application does not exclude the possibility of defining other terms that can achieve the same or similar functions in existing or future agreements.
第二,在下文示出的实施例中第一、第二以及各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围。Second, the first, second and various numbers in the embodiments shown below are only for convenience of description, and are not used to limit the scope of the embodiments of the present application.
第三,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b和c中的至少一项(个),可以表示:a,或b,或c,或a和b,或a和c,或b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。Third, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (one) of a, b and c may represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, wherein a, b, c can be single or multiple.
本申请适用于可以执行读写操作的存储设备,如可以为手机(mobile phone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、个人数字助理(personal digital assistant,PDA)等终端设备,本申请实施例对此并不限定。This application is applicable to storage devices that can perform read and write operations, such as mobile phones, tablet computers, notebook computers, palmtop computers, mobile internet devices (mobile internet device, MID), wearable devices, virtual reality (virtual reality) reality (VR) equipment, augmented reality (augmented reality, AR) equipment, wireless terminals in industrial control (industrial control), wireless terminals in self driving (self driving), wireless terminals in remote medical surgery (remote medical surgery) , wireless terminals in smart grid, wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, personal digital assistants digital assistant, PDA) and other terminal equipment, which is not limited in this embodiment of the present application.
为了使本申请的目的、技术方案更加清楚直观,下面将结合附图及实施例,对本申请实施例提供的方法和装置进行详细说明。应理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose and technical solution of the present application more clear and intuitive, the methods and devices provided in the embodiments of the present application will be described in detail below with reference to the drawings and the embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
示例性地,图1为本申请实施例提供的一种终端设备的系统架构示意图。Exemplarily, FIG. 1 is a schematic diagram of a system architecture of a terminal device provided in an embodiment of the present application.
如图1所示,终端设备包括处理器110、收发器120和显示单元170。其中,显示单元170可以包括显示屏。As shown in FIG. 1 , the terminal device includes a
可选地,该终端设备还可以包括存储器130。处理器110、收发器120和存储器130之间可以通过内部连接通路互相通信,传递控制和/或数据信号,该存储器130用于存储计算机程序,该处理器110用于从该存储器130中调用并运行该计算机程序。Optionally, the terminal device may also include a
可选地,终端设备还可以包括天线140,用于将收发器120输出的无线信号发送出去。Optionally, the terminal device may further include an
上述处理器110可以和存储器130合成一个处理装置,更常见的是彼此独立的部件,处理器110用于执行存储器130中存储的程序代码来实现上述功能。具体实现时,该存储器130也可以集成在处理器110中,或者,独立于处理器110。The above-mentioned
除此之外,为了使得终端设备的功能更加完善,该终端设备还可以包括输入单元160、音频电路180、摄像头190和传感器101等中的一个或多个,该音频电路还可以包括扬声器182、麦克风184等。In addition, in order to improve the functions of the terminal device, the terminal device may also include one or more of an
可选地,上述终端设备还可以包括电源150,用于给终端设备中的各种器件或电路提供电源。Optionally, the terminal device may further include a
可以理解的是,图1所示的终端设备中的各个模块的操作和/或功能,分别为了实现下述方法实施例中的相应流程。具体可参见下述方法实施例中的描述,为避免重复,此处适当省略详细描述。It can be understood that the operations and/or functions of each module in the terminal device shown in FIG. 1 are respectively for implementing corresponding processes in the following method embodiments. For details, reference may be made to the descriptions in the following method embodiments. To avoid repetition, detailed descriptions are appropriately omitted here.
可以理解的是,图1所示的终端设备中的处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signalprocessor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。It can be understood that the
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments,
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头190等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments,
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频电路180耦合,实现处理器110与音频电路180之间的通信。在一些实施例中,音频电路180可以通过I2S接口向收发器120传递音频信号,实现通过蓝牙耳机接听语音通话的功能。The I2S interface can be used for audio communication. In some embodiments,
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频电路180与收发器120可以通过PCM总线接口耦合。在一些实施例中,音频电路180也可以通过PCM接口向收发器120传递音频信号,实现通过蓝牙耳机接听语音通话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与收发器120。例如:处理器110通过UART接口与收发器120中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频电路180可以通过UART接口向收发器120传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the
MIPI接口可以被用于连接处理器110与显示单元170,摄像头190等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头190通过CSI接口通信,实现终端设备的拍摄功能。处理器110和显示单元170通过DSI接口通信,实现终端设备的显示功能。The MIPI interface can be used to connect the
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头190,显示单元170,收发器120,音频模电路180,传感器101等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备的结构限定。在本申请另一些实施例中,终端设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation on the terminal device. In other embodiments of the present application, the terminal device may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
可以理解的是,图1所示的电源150用于给处理器110,存储器130,显示单元170,摄像头190,输入单元160和收发器120等供电。It can be understood that the
天线140用于发射和接收电磁波信号。终端设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线140复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The
收发器120可以提供应用在终端设备上的包括无线局域网(wireless local areanetworks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequencymodulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。收发器120可以是集成至少一个通信处理模块的一个或多个器件。收发器120经由天线140接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。收发器120还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线140转为电磁波辐射出去。The
在一些实施例中,终端设备的天线140和收发器120耦合,使得终端设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packetradio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-divisioncode division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(globalpositioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite basedaugmentation systems,SBAS)。In some embodiments, the
终端设备通过GPU,显示单元170,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示单元170和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device implements the display function through the GPU, the display unit 170, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display unit 170 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
显示单元170用于显示图像,视频等。显示单元170包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dotlight emitting diodes,QLED)等。在一些实施例中,终端设备可以包括1个或N个显示单元170,N为大于1的正整数。The display unit 170 is used to display images, videos and the like. The display unit 170 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dotlight emitting diodes, QLED), etc. In some embodiments, the terminal device may include 1 or N display units 170, where N is a positive integer greater than 1.
终端设备可以通过ISP,摄像头190,视频编解码器,GPU,显示单元170以及应用处理器等实现拍摄功能。The terminal device can realize the shooting function through the ISP, the
ISP用于处理摄像头190反馈的数据。例如,录制视频时,打开摄像头,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头190中。The ISP is used for processing data fed back by the
摄像头190用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备可以包括1个或N个摄像头190,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal equipment selects the frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。终端设备可以支持一种或多种视频编解码器。这样,终端设备可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. An end device can support one or more video codecs. In this way, the terminal device can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of terminal equipment can be realized through NPU, such as: image recognition, face recognition, speech recognition, text understanding, etc.
存储器130可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。存储器130可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,存储器130可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在存储器130的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备的各种功能应用以及数据处理。The
终端设备可以通过音频电路180,扬声器182,麦克风184,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device may implement an audio function through an
音频电路180用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频电路180还可以用于对音频信号编码和解码。在一些实施例中,音频电路180可以设置于处理器110中,或将音频电路180的部分功能模块设置于处理器110中。The
扬声器182,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备可以通过扬声器182收听音乐,或收听免提通话。Speaker 182, also called "horn", is used to convert audio electrical signals into sound signals. The terminal device can listen to music through the speaker 182, or listen to hands-free calls.
麦克风184,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过靠近麦克风184发声,将声音信号输入到麦克风184。终端设备可以设置至少一个麦克风184。在另一些实施例中,终端设备可以设置两个麦克风184,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备还可以设置三个,四个或更多麦克风184,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 184, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can input a sound signal into the microphone 184 by speaking near the microphone 184 . The terminal device may be provided with at least one microphone 184 . In other embodiments, the terminal device may be provided with two microphones 184, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the terminal device can also be equipped with three, four or more microphones 184 to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
1、文件系统1. File system
操作系统中负责管理和存储文件信息的软件机构称为文件管理系统,简称文件系统。从系统角度来看,文件系统是对文件存储设备的空间进行组织和分配,负责文件存储并对存入的文件进行保护和检索的系统。具体地说,它负责为用户建立文件,存入、读出、修改、转储文件,控制文件的存取,当用户不再使用时撤销文件等。The software organization responsible for managing and storing file information in the operating system is called a file management system, or file system for short. From a system point of view, a file system is a system that organizes and allocates the space of a file storage device, is responsible for file storage, and protects and retrieves stored files. Specifically, it is responsible for creating files for users, storing, reading, modifying, and dumping files, controlling file access, and revoking files when users no longer use them.
2、内核态(kernel mode)2. Kernel mode
运行操作系统程序,操作硬件,其中中央处理器(central processing unit,CPU)可以访问内存的所有数据,包括外围设备,例如硬盘,网卡等,CPU也可以从一个程序切换到另一个程序。Run the operating system program and operate the hardware, in which the central processing unit (central processing unit, CPU) can access all data in the memory, including peripheral devices, such as hard disks, network cards, etc., and the CPU can also switch from one program to another.
3、用户态(user mode)3. User mode
运行用户程序,只能受限的访问内存,且不允许访问外围设备,CPU资源可以被其他高权限程序抢夺占。When running user programs, only limited access to memory is allowed, and access to peripheral devices is not allowed. CPU resources can be robbed by other high-privilege programs.
终端设备上应用的缓存文件的读写量占据总体读写量相当大的一部分,且该应用的缓存文件的尺寸都比较小,以及该缓存文件的丢失不会对应用的运行造成影响,因此很适合利用内存文件系统进行数据保存,如利用传统内存文件系统(如Ramfs),该传统内存文件可以提供了健壮的文件权限管理机制,但是终端设备应用的缓存文件读写会带大量的小尺寸I/O,从而会触发大量系统调用,导致过多的软件开销,影响文件读写性能。因此可以使用用户态的内存文件系统保存缓存文件,它可以避免系统调用的时间开销,显著地改善缓存文件的读写I/O速度,提升用户体验。The read and write volume of the application's cache file on the terminal device occupies a considerable part of the overall read and write volume, and the size of the application's cache file is relatively small, and the loss of the cache file will not affect the operation of the application, so it is very easy It is suitable to use the memory file system for data storage, such as using the traditional memory file system (such as Ramfs), the traditional memory file can provide a robust file permission management mechanism, but the cache file read and write of the terminal device application will bring a large number of small size I /O, which will trigger a large number of system calls, resulting in excessive software overhead and affecting file read and write performance. Therefore, the user-mode memory file system can be used to save cache files, which can avoid the time overhead of system calls, significantly improve the read and write I/O speed of cache files, and improve user experience.
在一种实现方式中,利用传统用户态文件系统,可以有效绕开系统调用,以及传统的Linux I/O栈,得到了比传统内存文件系统更高的I/O速度。但是,目前在终端设备商用的用户态文件系统只有FUSE,该文件系统中包含一个内核模块(fuse)和一个用户空间守护进程(daemon),如在Linux中,对文件的访问都是统一通过VFS层提供的内核接口进行的,因此当一个进程(称为user)访问由daemon实现的文件系统时,依然需要途径VFS,当VFS接到user进程对文件的访问请求,并且判断出该文件是属于某个用户态文件系统,就会将这个请求转交给一个名为fuse的内核模块。而后,fuse将该请求转换为和daemon之间约定的协议格式,传送给daemon进程。所以该用户态文件系统依然需要通过系统调用进入内核态,带来性能开销。In one implementation, the traditional user-mode file system can effectively bypass the system call and the traditional Linux I/O stack, and obtain a higher I/O speed than the traditional memory file system. However, at present, the only commercial user mode file system in terminal equipment is FUSE, which contains a kernel module (fuse) and a user space daemon (daemon). For example, in Linux, the access to files is unified through VFS The kernel interface provided by the layer, so when a process (called user) accesses the file system implemented by the daemon, it still needs to go through VFS. A user mode file system will forward this request to a kernel module named fuse. Then, fuse converts the request into the protocol format agreed with the daemon, and transmits it to the daemon process. Therefore, the user mode file system still needs to enter the kernel mode through system calls, which brings performance overhead.
在另一种实现方式中,可以利用针对持久化内存的文件系统PMFS,但由于该系统缺乏适合终端设备应用环境的保护机制,不能为用户私有数据提供很好的安全性。In another implementation, the file system PMFS for persistent memory can be used, but because the system lacks a protection mechanism suitable for the application environment of the terminal device, it cannot provide good security for the user's private data.
有鉴于此,本申请实施例提供的内存空间管理方法,可以通过将内存的地址映射到对应应用的地址空间,每一块内存对应一个文件系统的实例,即在一块内存上可以构建一个完整的用户态内存文件系统,以将缓存文件的读写迁移到该用户态内存文件系统中进行,改善整体的文件读写速度,减少系统调用带来的软件开销,且每一块内存对应唯一的应用,即各个内存拥有不用的应用ID,由于各个应用的内存之间相互独立,避免了应用之间的相互窥探,有效提高处于用户态的文件的安全性。In view of this, the memory space management method provided by the embodiment of the present application can map the address of the memory to the address space of the corresponding application, and each piece of memory corresponds to an instance of the file system, that is, a complete user can be built on a piece of memory. state memory file system to migrate the reading and writing of cache files to the user state memory file system, improve the overall file reading and writing speed, reduce the software overhead caused by system calls, and each block of memory corresponds to a unique application, that is, Each memory has a different application ID. Since the memory of each application is independent of each other, mutual snooping between applications is avoided, and the security of files in user mode is effectively improved.
图2是本申请实施例提供的终端设备200的示意图。如图2所示,终端设备200中部署有:应用和在对应内存上构建的用户态内存文件系统,其中,每一块内存都会有一个唯一的应用标识,因此每一块内存是一个应用独占的空间,且每一块内存对应一个文件系统实例,该文件系统实例指的是可以在一块内存上构造一个完整文件系统,以使应用可以在对应的内存中进行读写操作。例如,应用1可以在内存1中进行读写操作,其他应用也是类似的,为避免重复,此处不再做赘述。FIG. 2 is a schematic diagram of a terminal device 200 provided by an embodiment of the present application. As shown in Figure 2, the terminal device 200 is deployed with: applications and a user-mode memory file system built on the corresponding memory, wherein each piece of memory has a unique application identifier, so each piece of memory is an exclusive space for an application , and each block of memory corresponds to a file system instance, which means that a complete file system can be constructed on a block of memory, so that applications can perform read and write operations in the corresponding memory. For example, application 1 can perform read and write operations in memory 1, and other applications are similar. To avoid repetition, details are not repeated here.
应理解,本申请实施例提供的终端设备可以安装不同的操作系统,如安卓操作系统、独立操作系统(independent system operator,ISO)等,本申请对此不作限定。It should be understood that the terminal device provided in the embodiment of the present application may be installed with different operating systems, such as an Android operating system, an independent system operator (ISO), etc., which is not limited in the present application.
图3是本申请实施例提供的内存空间管理方法300的示意性流程图。该方法300可以适用于上述图2所示的终端设备200,除此之外还可以适用于其他设备,本申请实施例对此不做限定。如图3所示,方法300包括下列步骤:FIG. 3 is a schematic flowchart of a memory
S301,在启动第一应用的第一进程时,根据该第一应用的应用标识为该第一应用分配第一内存。S301. When starting a first process of a first application, allocate a first memory for the first application according to an application identifier of the first application.
应理解,上述第一内存具有所述第一应用的应用标识,该应用表示用于指示上述第一内存为该第一应用独占。It should be understood that the first memory has an application identifier of the first application, and the application indication is used to indicate that the first memory is exclusively occupied by the first application.
S302,将上述第一内存映射到上述第一应用的第一进程的地址空间,上述第一内存初始化为第一文件系统实例。S302. Map the first memory to the address space of the first process of the first application, and initialize the first memory as a first file system instance.
S303,当上述第一应用的第一进程访问第一文件路径时,若该第一文件路径为缓存路径,则将该访问定向至上述第一文件系统实例中。S303. When the first process of the first application accesses the first file path, if the first file path is a cache path, direct the access to the first file system instance.
同上,终端设备也可以在启动第二应用的第一进程时,根据该第二应用的应用标识为该第二应用分配第三内存,将该第三内存映射到所述第二应用的第二进程的地址空间,上述第三内存初始化为第二文件系统实例,且当上述第二应用的第一进程访问第三文件路径时,若终端设备确定该第三文件路径为缓存路径,则将上述访问定向至上述第二文件系统实例中。As above, when starting the first process of the second application, the terminal device may allocate a third memory for the second application according to the application identifier of the second application, and map the third memory to the second process of the second application. The address space of the process, the above-mentioned third memory is initialized as the second file system instance, and when the first process of the above-mentioned second application accesses the third file path, if the terminal device determines that the third file path is a cache path, the above-mentioned Access is directed to the above-mentioned second file system instance.
应理解,该第三内存和上述第一内存不同,该第三内存具有上述第二应用的应用标识,该应用标识用于指示该第三内存为上述第二应用独占。It should be understood that the third memory is different from the first memory, and the third memory has an application identifier of the second application, and the application identifier is used to indicate that the third memory is exclusively used by the second application.
可选地,终端设备在为上述第一应用和第二应用分别分配上述第一内存和上述第二内存之外,还可以为上述应用分配公有内存。Optionally, in addition to allocating the first memory and the second memory to the first application and the second application respectively, the terminal device may also allocate a public memory to the application.
应理解,该公有内存可以用来保存多个文件,该多个文件分别用于记录上述第一应用、第二应用和其它多个应用的应用标识和读写权限信息,即该公有内存为上述第一应用、第二应用和其他多个应用共享的内存。It should be understood that the public memory can be used to save multiple files, and the multiple files are respectively used to record the application identification and read and write permission information of the above-mentioned first application, the second application, and other multiple applications, that is, the public memory is the above-mentioned Memory shared by the first application, the second application, and other multiple applications.
在本申请实施例中,终端设备可以向多个应用分别分配不同的内存,以供上述多个应用在对应的内存中创建、读或写文件,其中,终端设备可以记录多个内存地址,其中每一块内存可以对应一个文件系统的实例,即终端设备可以在上述多个内存上分别构建获得多个完整的用户态内存文件系统,以实现直接在上述内存中进行文件的管理,有效提高读写性能,又因为每一块内存对应唯一的应用ID,使得各个应用之间相互隔离,避免了应用之间的相互窥探,进而提高使用用户态内存文件系统的安全性。In this embodiment of the present application, the terminal device can allocate different memory to multiple applications, so that the above multiple applications can create, read or write files in the corresponding memory, wherein the terminal device can record multiple memory addresses, where Each block of memory can correspond to an instance of a file system, that is, the terminal device can build multiple complete user-mode memory file systems on the above-mentioned multiple memories, so as to realize file management directly in the above-mentioned memory, effectively improving read and write performance, and because each block of memory corresponds to a unique application ID, each application is isolated from each other, avoiding mutual snooping between applications, and thus improving the security of using the user-mode memory file system.
作为一个可选的实施例,在为上第一应用分配第一内存之前,终端设备还可以获取该第一应用的权限信息,基于该第一应用的权限信息,设置上述第一内存的被读写权限。As an optional embodiment, before allocating the first memory to the first application, the terminal device may also acquire the permission information of the first application, and set the readable status of the first memory based on the permission information of the first application. Write permission.
应理解,上述权限信息用于表示该第一应用的读写权限信息。It should be understood that the above permission information is used to represent the read and write permission information of the first application.
示例性地,若上述第一应用只能对上述第一内存执行读操作,则终端设备可以将上述第一内存的被读写权限设置为只能被读,此外,读写和只写的情况,与上述实施例类似,为避免重复此处不再做赘述。For example, if the above-mentioned first application can only perform read operations on the above-mentioned first memory, the terminal device can set the read-write permission of the above-mentioned first memory to be read-only. In addition, in the case of read-write and write-only , which is similar to the foregoing embodiment, and will not be repeated here to avoid repetition.
可选地,在为上述第一应用分配第一内存之前,终端设备还可以确定是否初次为上述第一应用分配内存,进而确定为上述目标应用分配的内存的大小。Optionally, before allocating the first memory for the first application, the terminal device may also determine whether to allocate memory for the first application for the first time, and then determine the size of the memory allocated for the target application.
在第一种情况中,终端设备确定初次为该第一应用分配内存,则可以在内存空间充足的情况下,将上述第一内存的大小设置为第一数值,该第一数值为预设值。In the first case, the terminal device determines that memory is allocated for the first application for the first time, then it may set the size of the above-mentioned first memory as a first value when the memory space is sufficient, and the first value is a preset value .
可选地,在第一种情况中,终端设备还可以在内存空间充足的情况下,根据上述第一应用实际需要的内存大小为该第一应用分配大小为第一数值的第一内存,该第一数值可以与上述第一应用实际需求的内存大小的数值相同,即根据第一应用的内存需求分配私有内存,可以在满足该第一应用使用的前提下,有效节省内存空间。Optionally, in the first case, when the memory space is sufficient, the terminal device may also allocate a first memory with a size of a first value to the first application according to the memory size actually required by the first application. The first value may be the same as the value of the memory size actually required by the first application, that is, allocating private memory according to the memory requirement of the first application can effectively save memory space on the premise of meeting the requirements of the first application.
在第二种情况中,终端设备确定不是初次为上述第一应用分配内存,则可以确定为上述第一应用分配内存的次数,并可以在内存空间充足的情况下,将上述第一内存的大小设置为第二数值,该第二数值可以根据上述次数确定,如上述第二数值可以为上述次数和上述第一数值的乘积。In the second case, the terminal device determines that it is not the first time to allocate memory for the above-mentioned first application, then it can determine the number of memory allocations for the above-mentioned first application, and can set the size of the above-mentioned first memory to Set as a second value, the second value can be determined according to the above-mentioned times, for example, the above-mentioned second value can be the product of the above-mentioned times and the above-mentioned first value.
可选地,在第二种情况中,终端设备还可以在确定为上述第一应用分配内存的次数大于或者等于预设次数的情况下,将上述第一内存的大小设置为第二数值。Optionally, in the second case, the terminal device may also set the size of the first memory as a second value when it is determined that the number of memory allocations for the first application is greater than or equal to a preset number of times.
应理解,若终端设备不是初次为上述第一应用分配内存,或者为该目标应用分配内存的次数大于或者等于预设次数,则可以认为该第一应用需要较大私有内存的几率较高,所以终端设备可以在内存空间充足的情况下,为目标应用分配的内存的大小根据其分配次数的增长而增长,以提高为上述第一应用分配内存的效率。It should be understood that if the terminal device does not allocate memory for the above-mentioned first application for the first time, or the number of memory allocations for the target application is greater than or equal to the preset number of times, it can be considered that the probability that the first application needs a large private memory is relatively high, so When the memory space is sufficient, the terminal device can increase the size of the memory allocated for the target application according to the increase of the number of allocations, so as to improve the memory allocation efficiency for the above-mentioned first application.
作为一个可选的实施例,终端设备还可以在启动上述第一应用的第二进程时,若上述第一应用的应用标识对应的上述第一内存已经分配,则终端设备可以将该第一内存映射到该第二进程的地址空间;且当该第二进程访问第二文件路径时,若该第二文件路径为缓存路径,则终端设备可以将该访问定向至上述第一文件系统实例中。As an optional embodiment, when the terminal device starts the second process of the above-mentioned first application, if the above-mentioned first memory corresponding to the application identifier of the above-mentioned first application has been allocated, the terminal device can use the first memory Mapped to the address space of the second process; and when the second process accesses the second file path, if the second file path is a cache path, the terminal device can direct the access to the first file system instance.
应理解,上述第一应用的其他进程可以复用该第一应用的第一进程的第一内存,即将同一块内存的物理地址可以映射到同一个应用不同进程的地址空间,这里的地址空间是指虚拟地址,所以为保证上述第一应用的各个进程的使用,终端设备可以在上述第一应用的所有进程被销毁后,销毁上述第一内存。It should be understood that other processes of the above-mentioned first application can reuse the first memory of the first process of the first application, that is, the physical address of the same piece of memory can be mapped to the address space of different processes of the same application, where the address space is refers to a virtual address, so in order to ensure the use of each process of the above-mentioned first application, the terminal device may destroy the above-mentioned first memory after all the processes of the above-mentioned first application are destroyed.
可选地,终端设备还可以在上述第一内存不足的情况下,为上述第一应用分配第二内存,并将该第二内存的地址映射到上述第一应用的第一进程的地址空间和/或第二进程的地址空间,将所述第一内存中的数据拷贝至所述第二内存,回收所述第一内存,以便上述第一应用在上述第二内存中进行缓存文件的读写操作,该第二内存的标识与上述第一内存的标识相同。Optionally, the terminal device may also allocate a second memory for the above-mentioned first application when the above-mentioned first memory is insufficient, and map the address of the second memory to the address space of the first process of the above-mentioned first application and /or the address space of the second process, copying the data in the first memory to the second memory, reclaiming the first memory, so that the above-mentioned first application can read and write cache files in the above-mentioned second memory Operation, the identifier of the second memory is the same as the identifier of the above-mentioned first memory.
应理解,上述访问包括对文件的创建、读或写中的至少一个。It should be understood that the above access includes at least one of creation, reading or writing of files.
应理解,除上述实施例提供的按需分配内存和根据分配次数分配内存之外,还可以使用其他的内存的分配策略,本申请对此不作限定。It should be understood that, in addition to allocating memory on demand and allocating memory according to the number of allocations provided in the above embodiments, other memory allocation strategies may also be used, which is not limited in this application.
在为上述目标应用分配内存之前,终端设备还可以创建守护进程,该守护进程用于管理上述用文件系统实例,启动该守护进程,并可以通过该守护进程获取至少一个应用的权限信息,上述至少一个应用包括上述第一应用和第二应用,并利用该守护进程创建并初始化至少一个内存的地址,所述至少一个内存包括上述第一内存、第二内存和第三内存。Before allocating memory for the above-mentioned target application, the terminal device can also create a daemon process, which is used to manage the above-mentioned file system instance, start the daemon process, and obtain permission information of at least one application through the daemon process, the above-mentioned at least An application includes the above-mentioned first application and the second application, and uses the daemon process to create and initialize the address of at least one memory, and the at least one memory includes the above-mentioned first memory, second memory and third memory.
示例性地,上述守护进程可以为UCProc,终端设备可以通过修改安卓源码的开源项目(android open source project,AOSP)的代码,在安卓启动时在init进程创建UCProc进程,并通过/data/system/packages.xml文件获取各个应用的读写权限情况,该文件记录了安卓系统当中安装包(android package,APK)的所有属性,权限等信息,当系统中的APK安装、删除、升级时,该文件就会被更新。Exemplarily, the above-mentioned daemon process can be UCProc, and the terminal device can create a UCProc process in the init process when Android starts by modifying the code of the open source project (android open source project, AOSP) of the Android source code, and pass /data/system/ The packages.xml file obtains the read and write permissions of each application. This file records all the attributes, permissions and other information of the installation package (android package, APK) in the Android system. When the APK in the system is installed, deleted, or upgraded, the file will be updated.
下面以安卓系统为例,结合终端设备对上述方法300进行详细的描述。The Android system is taken as an example below to describe the
图4是本实施例提供的又一终端设备的示意性框图,如图4所示,有三部分组成,在第一部分中示出了多个应用的进程,如应用1的进程,应用2的进程,…,应用N的进程,以及示出了文件系统实例1构建的文件系统的结构,包括超级块、节点表和空间池。Fig. 4 is a schematic block diagram of another terminal device provided by this embodiment. As shown in Fig. 4, it consists of three parts. The first part shows the processes of multiple applications, such as the process of application 1 and the process of application 2 , ..., the process of application N, and shows the structure of the file system constructed by file system instance 1, including superblock, node table and space pool.
第二部分中示出守护UCProc,如图4所示,该UCProc进程可以通过空间管理器记录多个内存地址,以及多个文件系统实例,文件系统实例1,文件系统实例2,…,文件系统实例N。The second part shows the guardian UCProc, as shown in Figure 4, the UCProc process can record multiple memory addresses and multiple file system instances through the space manager, file system instance 1, file system instance 2, ..., file system Example N.
第三部分中示出了上述多个内存地址对应的多个内存,内存1,内存2,…,内存N,且每一块内存对应一个文件系统实例,如图4所示,其中内存1对应文件系统实例1,内存2对应文件系统实例2,以及内存N对应文件系统实例N,该文件系统实例可以在上述对应内存上构造一个完整文件系统,该文件系统的结构如第一部分所示。The third part shows multiple memories corresponding to the above multiple memory addresses, memory 1, memory 2, ..., memory N, and each block of memory corresponds to a file system instance, as shown in Figure 4, where memory 1 corresponds to a file System instance 1, memory 2 corresponds to file system instance 2, and memory N corresponds to file system instance N. This file system instance can construct a complete file system on the above-mentioned corresponding memory. The structure of the file system is shown in the first part.
对应上述S201,当应用1的进程为上述第一应用的第一进程,在应用1的进程启动时,应用1可以通过通信机制binder向进程间通信(inter-process pommunication,IPC)管理器发送请求消息,该请求消息用于申请上述内存,以供该应用1缓存文件,IPC管理器接收并解析该请求消息,获得上述应用1的标识,读写权限信息,申请私有内存的尺寸信息,以及是否为初次申请私有内存等信息,然后通知上述进程UCProc,进程UCProc基于上述请求消息中的应用1的标识,读写权限信息,申请私有内存的尺寸信息,以及是否为初次申请私有内存等信息,通过匿名共享内存(anonymous shared memory-ashmem,Ashmem)为上述应用1分配内存(即上述第一内存或第二内存)。Corresponding to the above S201, when the process of application 1 is the first process of the above-mentioned first application, when the process of application 1 is started, application 1 may send a request to the inter-process communication (inter-process pommunication, IPC) manager through the communication mechanism binder message, the request message is used to apply for the above-mentioned memory for the application 1 to cache files, and the IPC manager receives and parses the request message to obtain the above-mentioned application 1’s identification, read and write permission information, size information of the requested private memory, and whether In order to apply for information such as private memory for the first time, and then notify the above-mentioned process UCProc, the process UCProc is based on the identification of application 1 in the above request message, the read and write permission information, the size information of the private memory to apply for, and whether it is the first time to apply for private memory and other information, through Anonymous shared memory (anonymous shared memory-ashmem, Ashmem) allocates memory (that is, the first memory or the second memory) for the above-mentioned application 1 .
示例性地,进程UCProc可以传递内存的权限信息,内存的地址信息(即上述第一内存的地址信息或第二内存的地址信息)和上述公有内存的地址信息到IPC管理器,IPC管理器可以对该内存的权限信息,内存的地址信息和公有内存的地址信息进行打包,并利用安卓的binder机制将该数据包发送至上述申请私有内存的应用1的进程,其中,IPC管理器可以通过使用default Service Manager函数获得当前service manager的功能,然后IPC管理器可以通过继承IInterface类、BpInterface类和BnInterface类,进而获得上述binder的相关操作。Exemplarily, the process UCProc can transfer the permission information of the memory, the address information of the memory (that is, the address information of the above-mentioned first memory or the address information of the second memory) and the address information of the above-mentioned public memory to the IPC manager, and the IPC manager can The permission information of the memory, the address information of the memory and the address information of the public memory are packaged, and the binder mechanism of Android is used to send the data packet to the process of the above-mentioned application 1 applying for the private memory, wherein the IPC manager can use The default Service Manager function obtains the function of the current service manager, and then the IPC manager can obtain the related operations of the above binder by inheriting the IInterface class, the BpInterface class and the BnInterface class.
应理解,本申请还可以使用binder以外的其他进程的通信机制,本申请对此不作限定。It should be understood that the present application may also use communication mechanisms of processes other than the binder, which is not limited in the present application.
可选地,终端设备可以判断是否初次为上述应用1分配内存,进而为应用1分配不同大小的私有内存。Optionally, the terminal device may determine whether to allocate memory for the above-mentioned application 1 for the first time, and then allocate private memory of different sizes to application 1.
示例性地,若终端设备确定初次为上述应用1分配内存,则终端设备可以为应用1分配大小为第一数值X的第一私有内存。Exemplarily, if the terminal device determines to allocate memory for the above-mentioned application 1 for the first time, the terminal device may allocate the first private memory whose size is the first value X to the application 1.
若终端设备确定不是初次为上述应用1分配内存,则终端设备可以获取为该应用1分配内存的次数N,并基于该次数,为该应用1分配大小为第二数值N*X的第二内存。If the terminal device determines that it is not the first time to allocate memory for the above-mentioned application 1, the terminal device may obtain the number N of memory allocations for the application 1, and allocate a second memory with a size of a second value N*X for the application 1 based on the number of times. .
可选地,在确定初次分配内存的情况下,终端设备还可以根据应用1实际请求的内存的大小,为应用1分配同等大小的内存。Optionally, in the case of determining to allocate memory for the first time, the terminal device may also allocate memory of the same size to Application 1 according to the size of memory actually requested by Application 1 .
应用1可以接收来自上述进程UCProc的数据包,并解包,获得为上述应用1分配的内存的地址信息,并将该内存的地址映射到当前应用1的进程的地址空间中,初始化获得该内存上对应的用户态内存文件系统,图5示出了本申请实施例提供的用户态内存文件系统结构的示意图,即上述图4第一部分中示出的文件系统的结构,如图5所示,该文件系统的结构包含超级块、节点表、空间池、数据段等,其中超级块用于记录上述文件系统的总体信息,如应用对应的私有内存空间的尺寸,或该私有内存剩余内存空间的尺寸等,该节点表用于管理节点,该空间池用于管理文件数据的元数据,以及数据段用于管理目录项和常规文件数据。Application 1 can receive the data packet from the above-mentioned process UCProc, unpack it, obtain the address information of the memory allocated for the above-mentioned application 1, and map the address of the memory to the address space of the process of the current application 1, and initialize to obtain the memory Figure 5 shows a schematic diagram of the structure of the user-mode memory file system provided by the embodiment of the present application, that is, the structure of the file system shown in the first part of Figure 4 above, as shown in Figure 5, The structure of the file system includes super blocks, node tables, space pools, data segments, etc., where the super blocks are used to record the overall information of the above file system, such as the size of the private memory space corresponding to the application, or the remaining memory space of the private memory Size, etc., the node table is used to manage nodes, the space pool is used to manage metadata of file data, and the data segment is used to manage directory entries and regular file data.
图6为本申请实施例提供的上述节点表的示意图,如图6所示,该节点表包括节点表锁,和节点表信息,其中节点表信息包括节点ID和节点地址,其中节点ID和节点地址一一对应,如节点ID1对应节点1地址,节点ID2对应节点2地址,…,节点IDN对应节点N地址。Figure 6 is a schematic diagram of the above-mentioned node table provided by the embodiment of the present application. As shown in Figure 6, the node table includes a node table lock and node table information, wherein the node table information includes a node ID and a node address, wherein the node ID and node address Addresses are in one-to-one correspondence, for example, node ID 1 corresponds to the address of node 1 , node ID 2 corresponds to the address of node 2 , ..., node ID N corresponds to the address of node N.
图7为本申请实施例提供的上述空间池的示意图,如图7所示,该空间池包括空间池锁和空间池信息,其中空间池信息包括子分配器,该子分配器对应有效块和位图,如子分配器1,子分配器2,…,子分配器N分别对应各自的有效块和位图。Fig. 7 is a schematic diagram of the above-mentioned space pool provided by the embodiment of the present application. As shown in Fig. 7, the space pool includes a space pool lock and space pool information, wherein the space pool information includes a sub-allocator, and the sub-allocator corresponds to valid blocks and Bitmaps, such as sub-allocator 1 , sub-allocator 2 , ..., sub-allocator N correspond to their valid blocks and bitmaps respectively.
在本申请实施例中,在缓存文件空间管理上使用了按需分配,则表明上述用户态文件系统需要具有动态扩展的特性,所以如上述图5所示,将元数据和文件数据分离,使得在扩容时,终端设备可以一次性拷贝不同区域的数据,减少文件系统扩容重建带来的开销。In the embodiment of this application, the on-demand allocation is used in the cache file space management, which indicates that the above-mentioned user mode file system needs to have the characteristics of dynamic expansion, so as shown in Figure 5 above, the metadata and file data are separated, so that During expansion, terminal devices can copy data in different areas at one time, reducing the overhead caused by file system expansion and reconstruction.
应理解,上述内存上的用户态文件系统的结构还可以为其他不同的设计,本申请对此不作限定。It should be understood that the structure of the above-mentioned user mode file system on the internal memory may also be of other different designs, which is not limited in this application.
可选地,在上述步骤的基础上,若上述应用1存在待缓存的目标文件(即第一文件)时,终端设备可以确定该目标文件的路径,且在确定该路径为上述应用1缓存文件的路径的情况下,将该目标文件写入上述为应用1分配的内存中,提高缓存文件的读写性能。Optionally, on the basis of the above steps, if the above-mentioned application 1 has a target file to be cached (that is, the first file), the terminal device may determine the path of the target file, and after determining that the path is the cache file of the above-mentioned application 1 In the case of the path, the target file is written into the above-mentioned memory allocated for application 1, so as to improve the read and write performance of the cache file.
示例性地,终端设备对目标文件进行访问时,可以先对该目标文件的缓存路径进行识别,区分出上述路径的位置,对应应用的名称,然后在确定上述目标文件的缓存路径为上述应用1对应的缓存文件的路径的情况下,终端设备可以选择本申请提供的用户态内存文件系统的接口,即可以将上述访问定向至上述该应用1对应的内存中的文件系统实例(即第一文件系统实例中)。Exemplarily, when the terminal device accesses the target file, it may first identify the cache path of the target file, distinguish the location of the above path, and the name of the corresponding application, and then determine that the cache path of the above target file is the above application 1 In the case of the path of the corresponding cache file, the terminal device can select the interface of the user-mode memory file system provided by this application, that is, the above-mentioned access can be directed to the file system instance in the memory corresponding to the above-mentioned application 1 (that is, the first file system instance).
可选地,在将上述目标文件写入上述应用1对应的内存中的情况下,终端设备可以直接在该应用1对应的内存中对该目标文件执行读操作,无需触发依赖内核,降低软件的开销,提高目标文件的读写I/O速度,提升用户体验。Optionally, when the above-mentioned target file is written into the memory corresponding to the above-mentioned application 1, the terminal device can directly perform a read operation on the target file in the memory corresponding to the application 1, without triggering the dependency on the kernel, reducing the software's Overhead, improve the read and write I/O speed of the target file, and improve user experience.
示例性地,若上述目标文件保存的路径是上述应用1的对应的缓存文件的路径,终端设备会收到文件描述符fd,并可以根据该文件描述符的值选择接口,如在fd>=UCFS_FD_BASE的情况下,终端设备可以选择本申请提供的在私有内存上构建的用户态内存文件系统的接口,否则,采用原生的C库接口,通过传统内存文件系统,如Ramfs等,对上述目标文件进行写管理。Exemplarily, if the path where the above-mentioned target file is saved is the path of the corresponding cache file of the above-mentioned application 1, the terminal device will receive the file descriptor fd, and can select an interface according to the value of the file descriptor, such as fd>= In the case of UCFS_FD_BASE, the terminal device can choose the interface of the user-mode memory file system built on the private memory provided by this application, otherwise, use the native C library interface, and use the traditional memory file system, such as Ramfs, to process the above target files Perform write management.
在本申请实施例中,由于使用用户态的内存文件系统,避免了基于闪存的传统文件系统由于介质原因,导致访问速度比内存慢的问题,以及避免了基于内核的传统内存文件系统由于系统调用频繁带来过多软件开销的问题,如图8所示,本申请与目前终端设备上主流的内存文件系统Ramfs相比,小尺寸I/O下性能改善最高可以达到一倍,且90%的缓存文件的尺寸在512KB以下,因此不需要大量的内存的去保存缓存文件,且接口的改动在libc库进行,应用本身不需要做任何改动。此外,当读写文件数据时,本申请还可以根据该文件的特性,定向相应的接口,大幅度提高文件的读写性能。In the embodiment of the present application, due to the use of the user-mode memory file system, the problem that the access speed of the traditional file system based on flash memory is slower than that of the memory due to media reasons is avoided, and the traditional memory file system based on the kernel is avoided due to system calls. Frequently bring too much software overhead, as shown in Figure 8, compared with Ramfs, the mainstream memory file system on the current terminal device, the performance improvement of this application can be doubled under small-sized I/O, and 90% of the The size of the cache file is below 512KB, so there is no need for a large amount of memory to save the cache file, and the interface changes are performed in the libc library, and the application itself does not need to make any changes. In addition, when reading and writing file data, the present application can also direct the corresponding interface according to the characteristics of the file, so as to greatly improve the reading and writing performance of the file.
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
上述本申请提供的实施例中,从终端设备作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,存储可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。In the above-mentioned embodiments provided in the present application, the method provided in the embodiments of the present application is introduced from the perspective of a terminal device serving as an execution subject. In order to realize the functions in the methods provided by the above embodiments of the present application, the storage may include hardware structures and/or software modules, and the above functions may be realized in the form of hardware structures, software modules, or hardware structures plus software modules. Whether one of the above-mentioned functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
下面将结合图9和图10,详细描述本申请实施例提供的缓存文件的空间管理装置。The space management apparatus for cache files provided by the embodiment of the present application will be described in detail below with reference to FIG. 9 and FIG. 10 .
图9示出了本申请实施例提供的内存空间管理装置900,包括:分配模块901和处理模块902。FIG. 9 shows a memory space management device 900 provided by an embodiment of the present application, including: an allocation module 901 and a processing module 902 .
其中,分配模块901用于:在启动第一应用的第一进程时,根据上述第一应用的应用标识为上述第一应用分配第一内存,该第一内存具有所述第一应用的应用标识,上述应用标识用于指示上述第一内存为上述第一应用独占;处理模块902用于:将上述第一内存映射到上述第一应用的第一进程的地址空间,上述第一内存初始化为第一文件系统实例;当上述第一应用的第一进程访问第一文件路径时,若上述第一文件路径为缓存路径,则将上述访问定向至所述第一文件系统实例中。Wherein, the allocating module 901 is configured to: when starting the first process of the first application, allocate a first memory for the first application according to the application identifier of the first application, and the first memory has the application identifier of the first application , the above-mentioned application identifier is used to indicate that the above-mentioned first memory is exclusively used by the above-mentioned first application; the processing module 902 is used to: map the above-mentioned first memory to the address space of the first process of the above-mentioned first application, and initialize the above-mentioned first memory to the first process A file system instance; when the first process of the first application accesses the first file path, if the first file path is a cache path, the access is directed to the first file system instance.
可选地,该处理模块902用于:确定是否初次为上述第一应用分配内存;若初次为上述第一应用分配内存,将上述第一内存的大小设置为第一数值,该第一数值为预设值;获取上述第一应用的权限信息,上述权限信息用于表示该第一应用的读写权限;基于该第一应用的权限信息,设置上述第一内存的被读写权限。Optionally, the processing module 902 is configured to: determine whether memory is allocated for the first application for the first time; if memory is allocated for the first application for the first time, set the size of the first memory as a first value, and the first value is Preset value; obtaining permission information of the first application, the permission information is used to indicate the read and write permission of the first application; based on the permission information of the first application, setting the read and write permission of the first memory.
可选地,该处理模块902用于:若不是初次为上述第一应用分配内存,确定为上述第一应用分配内存的次数;将上述第一内存的大小设置为第二数值,上述第二数值是根据上述次数确定的。Optionally, the processing module 902 is configured to: if it is not the first time to allocate memory for the first application, determine the number of memory allocations for the first application; set the size of the first memory as a second value, and the second value It is determined according to the above times.
可选地,上述第二数值为上述次数和上述第一数值的乘积。Optionally, the above-mentioned second numerical value is the product of the above-mentioned times and the above-mentioned first numerical value.
可选地,该处理模块902用于:在启动上述第一应用的第二进程时,若上述第一应用的应用标识对应的第一内存已经分配,将上述第一内存映射到上述第二进程的地址空间;当上述第二进程访问第二文件路径时,若上述第二文件路径为缓存路径,则将上述访问定向至上述第一文件系统实例中。Optionally, the processing module 902 is configured to: when starting the second process of the first application, if the first memory corresponding to the application identifier of the first application has been allocated, map the first memory to the second process address space; when the second process accesses the second file path, if the second file path is a cache path, direct the access to the first file system instance.
可选地,该分配模块901用于:在上述第一内存不足的情况下,为上述第一应用分配第二内存,上述第二内存的大小大于上述第一内存大小。Optionally, the allocating module 901 is configured to: allocate a second memory for the first application when the first memory is insufficient, and the size of the second memory is larger than the size of the first memory.
可选地,该处理模块902用于:将上述第一内存中的数据拷贝至所述第二内存;回收上述第一内存。Optionally, the processing module 902 is configured to: copy the data in the first memory to the second memory; reclaim the first memory.
可选地,上述访问包括对文件的创建、读或写中的至少一个。Optionally, the above-mentioned access includes at least one of creating, reading or writing the file.
可选地,该处理模块902用于:创建守护进程,该守护进程用于管理至少一个文件系统实例,上述至少一个文件系统实例包括上述第一文件系统实例;启动上述守护进程,并通过上述守护进程获取至少一个应用的权限信息,该至少一个应用包括所述第一应用;利用上述守护进程创建并初始化至少一个内存的地址,上述至少一个内存包括上述第一内存。Optionally, the processing module 902 is configured to: create a daemon process, the daemon process is used to manage at least one file system instance, the at least one file system instance includes the first file system instance; start the daemon process, and pass the daemon process The process obtains permission information of at least one application, the at least one application includes the first application; and the address of at least one memory is created and initialized by using the daemon process, and the at least one memory includes the first memory.
应理解,这里的装置900以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,装置900可以具体为上述实施例中的终端设备,或者,上述实施例中终端设备的功能可以集成在装置900中,装置900可以用于执行上述方法实施例中与终端设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the apparatus 900 here is embodied in the form of functional modules. The term "module" herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processor, etc.) and memory, incorporated logic, and/or other suitable components to support the described functionality. In an optional example, those skilled in the art can understand that the apparatus 900 may specifically be the terminal device in the above embodiment, or the functions of the terminal device in the above embodiment may be integrated in the apparatus 900, and the apparatus 900 may be used to execute In order to avoid repetition, the procedures and/or steps corresponding to the terminal device in the foregoing method embodiments are not repeated here.
上述装置900具有实现上述方法中终端设备执行的相应步骤的功能;上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。The above-mentioned apparatus 900 has the function of realizing corresponding steps executed by the terminal device in the above-mentioned method; the above-mentioned functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在本申请的实施例,图9中的装置900也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。In the embodiment of the present application, the device 900 in FIG. 9 may also be a chip or a chip system, for example: a system on chip (system on chip, SoC).
图10示出了本申请实施例提供的另一内存空间管理装置1000。该装置1000包括:处理器1001、存储器1002、通信接口1003以及总线1004。其中,存储器1002用于存储指令,该处理器1001用于执行该存储器1002存储的指令。处理器1001、存储器1002和通信接口1003通过总线1004实现彼此之间的通信连接。FIG. 10 shows another memory space management device 1000 provided by the embodiment of the present application. The device 1000 includes: a
其中,处理器1001用于:在启动第一应用的第一进程时,根据上述第一应用的应用标识为上述第一应用分配第一内存,该第一内存具有所述第一应用的应用标识,上述应用标识用于指示上述第一内存为上述第一应用独占;将上述第一内存映射到上述第一应用的第一进程的地址空间,上述第一内存初始化为第一文件系统实例;当上述第一应用的第一进程访问第一文件路径时,若上述第一文件路径为缓存路径,则将上述访问定向至所述第一文件系统实例中。Wherein, the
可选地,该处理器1001用于:确定是否初次为上述第一应用分配内存;若初次为上述第一应用分配内存,将上述第一内存的大小设置为第一数值,该第一数值为预设值;获取上述第一应用的权限信息,上述权限信息用于表示该第一应用的读写权限;基于该第一应用的权限信息,设置上述第一内存的被读写权限。Optionally, the
可选地,该处理器1001用于:若不是初次为上述第一应用分配内存,确定为上述第一应用分配内存的次数;将上述第一内存的大小设置为第二数值,上述第二数值是根据上述次数确定的。Optionally, the
可选地,上述第二数值为上述次数和上述第一数值的乘积。Optionally, the above-mentioned second numerical value is the product of the above-mentioned times and the above-mentioned first numerical value.
可选地,该处理器1001用于:在启动上述第一应用的第二进程时,若上述第一应用的应用标识对应的第一内存已经分配,将上述第一内存映射到上述第二进程的地址空间;当上述第二进程访问第二文件路径时,若上述第二文件路径为缓存路径,则将上述访问定向至上述第一文件系统实例中。Optionally, the
可选地,该处理器1001用于:在上述第一内存不足的情况下,为上述第一应用分配第二内存,上述第二内存的大小大于上述第一内存大小。Optionally, the
可选地,该处理器1001用于:将上述第一内存中的数据拷贝至所述第二内存;回收上述第一内存。Optionally, the
可选地,上述访问包括对文件的创建、读或写中的至少一个。Optionally, the above-mentioned access includes at least one of creating, reading or writing the file.
可选地,该处理器1001用于:创建守护进程,该守护进程用于管理至少一个文件系统实例,上述至少一个文件系统实例包括上述第一文件系统实例;启动上述守护进程,并通过上述守护进程获取至少一个应用的权限信息,该至少一个应用包括所述第一应用;利用上述守护进程创建并初始化至少一个内存的地址,上述至少一个内存包括上述第一内存。Optionally, the
应理解,装置1000可以具体为上述实施例中的终端设备,或者,上述实施例中终端设备的功能可以集成在装置1000中,装置1000可以用于执行上述方法实施例中与终端设备对应的各个步骤和/或流程。可选地,该存储器1002可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器1001可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与存储设备对应的各个步骤和/或流程。It should be understood that the apparatus 1000 may specifically be the terminal device in the foregoing embodiments, or, the functions of the terminal device in the foregoing embodiments may be integrated into the apparatus 1000, and the apparatus 1000 may be used to execute various functions corresponding to the terminal apparatus in the foregoing method embodiments. steps and/or processes. Optionally, the
应理解,在本申请实施例中,该处理器可以是中央处理单元(Central ProcessingUnit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present application, the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general processors, digital signal processors (DSP), application specific integrated circuits (ASIC) , Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor executes the instructions in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (21)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110742761.4A CN115543600A (en) | 2021-06-30 | 2021-06-30 | Memory space management method and memory space management device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110742761.4A CN115543600A (en) | 2021-06-30 | 2021-06-30 | Memory space management method and memory space management device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115543600A true CN115543600A (en) | 2022-12-30 |
Family
ID=84722931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110742761.4A Pending CN115543600A (en) | 2021-06-30 | 2021-06-30 | Memory space management method and memory space management device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115543600A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116166442A (en) * | 2023-03-16 | 2023-05-26 | 上海移远通信技术股份有限公司 | Task execution method, electronic device, and computer-readable storage medium |
CN118445056A (en) * | 2023-09-14 | 2024-08-06 | 上海荣耀智慧科技开发有限公司 | Memory calling method, electronic device and storage medium |
-
2021
- 2021-06-30 CN CN202110742761.4A patent/CN115543600A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116166442A (en) * | 2023-03-16 | 2023-05-26 | 上海移远通信技术股份有限公司 | Task execution method, electronic device, and computer-readable storage medium |
CN118445056A (en) * | 2023-09-14 | 2024-08-06 | 上海荣耀智慧科技开发有限公司 | Memory calling method, electronic device and storage medium |
CN118445056B (en) * | 2023-09-14 | 2025-01-28 | 上海荣耀智慧科技开发有限公司 | Memory calling method, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116244067B (en) | Virtual memory management method and electronic equipment | |
WO2021052437A1 (en) | Application start method and electronic device | |
CN116136826B (en) | Memory access method, chip, electronic device and computer readable storage medium | |
CN117407326B (en) | Memory access method and device | |
WO2024041219A1 (en) | Memory management method, electronic device, chip system, and readable storage medium | |
WO2022042245A1 (en) | Method for determining physical address, and chip system | |
WO2021169379A1 (en) | Permission reuse method, permission reuse-based resource access method, and related device | |
CN114461375B (en) | Memory resource management method and electronic equipment | |
WO2021104259A1 (en) | Method and terminal for data sharing between fast application and native application | |
CN115543600A (en) | Memory space management method and memory space management device | |
EP4513334A1 (en) | Memory management method and electronic device | |
CN117130541B (en) | Storage space configuration method and related equipment | |
CN114461589A (en) | Method for reading compressed file, file system and electronic equipment | |
WO2022042363A1 (en) | Shared library multiplexing method and electronic device | |
CN116954876A (en) | Memory management method and electronic device | |
CN113950033B (en) | Data transmission methods and equipment | |
CN113760192B (en) | Data reading method, data reading apparatus, storage medium, and program product | |
WO2023065815A1 (en) | File system deployment method and apparatus, file system extension method and apparatus, device, and storage medium | |
WO2024140279A1 (en) | File transfer method and electronic device | |
CN116561351A (en) | Thumbnail storage method and electronic device | |
WO2024007944A1 (en) | Method for extending memory isolation domain, and electronic device | |
CN117520279A (en) | File storage methods and electronic devices | |
WO2024032430A1 (en) | Memory management method and electronic device | |
CN115840528A (en) | Method for setting waterline of storage disc, electronic equipment and storage medium | |
CN117786706A (en) | Access control methods and electronic devices |
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 |