WO2023060893A1 - Storage space management method and apparatus, and device and storage medium - Google Patents

Storage space management method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2023060893A1
WO2023060893A1 PCT/CN2022/093357 CN2022093357W WO2023060893A1 WO 2023060893 A1 WO2023060893 A1 WO 2023060893A1 CN 2022093357 W CN2022093357 W CN 2022093357W WO 2023060893 A1 WO2023060893 A1 WO 2023060893A1
Authority
WO
WIPO (PCT)
Prior art keywords
target device
storage space
instruction
partition
memory
Prior art date
Application number
PCT/CN2022/093357
Other languages
French (fr)
Chinese (zh)
Inventor
成凯
Original Assignee
深圳市广和通无线股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市广和通无线股份有限公司 filed Critical 深圳市广和通无线股份有限公司
Publication of WO2023060893A1 publication Critical patent/WO2023060893A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0632Configuration or reconfiguration of storage systems by initialisation or re-initialisation of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of storage, and in particular to a storage space management method, device, device and storage medium.
  • sub-projects in the same project are distinguished by adding project compilation options in the compilation script.
  • the software run by each sub-project is highly similar, but developers need to develop or maintain each sub-project, which will increase the number of official versions of the project, increase the number of compiled versions and the workload of the testing department, and lead to
  • the project management and control in the software code is complex, and the project branches are complicated.
  • the present application relates to a storage space management method, the method comprising:
  • the size of the current storage space is updated to the software data required for the operation of the target device.
  • the management instructions include restart recovery instructions, erase instructions, and partition alignment instructions
  • the acquisition of the storage space size of the memory in the target device through the management instruction includes:
  • the current storage space size of the memory in the target device is acquired.
  • the target device after saving the size of the current storage space into the software data required for the operation of the target device, it further includes:
  • the current storage space size of the memory in the target device is obtained according to the partition alignment instruction Previously, also included:
  • the partition alignment instruction after obtaining the current storage space size of the memory in the target device, before updating the current storage space size to the software data required for the target device to run, further includes :
  • the memory includes at least one memory partition
  • the obtaining the current storage space size of the memory in the target device according to the partition alignment instruction includes:
  • the sum of the storage space sizes of each partition is used as the current storage space size of the memory in the target device.
  • the present application relates to a storage space management device, and the device includes:
  • the reading module is used to read the preset management instructions in the specified partition when the target device is turned on for the first time;
  • An acquisition module configured to acquire the current storage space size of the memory in the target device through the management instruction
  • An update module configured to update the size of the current storage space into the software data required for the operation of the target device.
  • the present application relates to electronic equipment, including a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other through the communication bus;
  • the memory is used to store computer programs
  • the processor is configured to execute the program stored in the memory to implement the storage space management method described in this application.
  • the present application relates to a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the storage space management method described in the present application is implemented.
  • FIG. 1 is a schematic diagram of the process steps of the implementation of the storage space management method provided in an embodiment of the present application
  • FIG. 2 is an example diagram of a mics partition format provided in another embodiment of the present application.
  • FIG. 3 is a schematic structural connection diagram of a storage space management device provided in another embodiment of the present application.
  • FIG. 4 is a schematic diagram of structural connection of an electronic device provided in another embodiment of the present application.
  • the storage space management method provided in the embodiment of the present application may be implemented by a software algorithm.
  • the algorithm corresponding to the method can be preset in the processor of the target device.
  • the target device may be any one of smart phones, tablet computers, smart bracelets, smart refrigerators and other types of electronic devices.
  • the process steps implemented by the storage space management method are as follows:
  • Step 102 when the target device is turned on for the first time, read the preset management instructions in the specified partition.
  • the management instruction is saved in a designated partition of the target device in advance.
  • the management instruction is read from the instruction partition.
  • the specified partition may be any storage partition in the memory of the target device, for example, the specified partition may be a miscellaneous (mics) partition.
  • the management instruction can be converted into ASCII ciphertext in advance, and the translated ciphertext can be written into the image to be upgraded by the misc partition through a software tool, so as to be used in the subsequent storage space management method of the target device.
  • a mics partition format is shown in FIG. 2 , in which management instructions are written in hexadecimal, and numbers and letters in FIG. 2 represent hexadecimal numbers.
  • the management instruction in the misc partition can be read through the preset Read From Partition function.
  • the recovery environment of the target device is initialized, so that the target device can execute the restart recovery command.
  • an electronic device based on the Linux system Linux system is a UNIX-like operating system that is freely used and freely disseminated
  • UEFI Unified Extensible Firmware Interface
  • Initializing the recovery (recovery) environment of the target device is realized during the initialization process.
  • Step 104 obtain the current storage space size of the memory in the target device through the management instruction.
  • the preset management instruction is used to obtain the current storage space size of the memory in the target device. That is, after the target device is turned on and before the user uses it, the current storage space size is first obtained, so that the target device can be used normally.
  • the memory in the target device can be Embedded Multi Media Card (EMMC for short), Universal Flash Storage (UFS for short), and any other type of memory that can implement this method.
  • EMMC Embedded Multi Media Card
  • UFS Universal Flash Storage
  • the protection scope of the application is not limited by the specific type of memory.
  • the management instructions include restart recovery instructions, erase instructions and partition alignment instructions. Obtain the storage space size of the memory in the target device through the management command.
  • the specific implementation process is as follows: save the erase command and partition alignment command into the buffer control block; restart the target device according to the restart recovery command, and read the buffer control block Erase instruction and partition alignment instruction in; according to the erase instruction, delete the original storage space size in the software data; according to the partition alignment instruction, obtain the current storage space size of the memory in the target device.
  • a buffer control block (Buffer Control Block, BCB for short) is a storage block capable of storing instruction data.
  • BCB Buffer Control Block
  • the target device After the target device reads the management command, it first saves the erase command and the partition alignment command in the BCB, and then enters the recovery environment after rebooting through the boot-recovery command. In the recovery environment after reboot, read the erase command and partition alignment command in BCB again. Then delete the original storage space size in the software data according to the erasing instruction. Then according to the partition alignment instruction, the current storage space size of the memory in the target device is acquired.
  • BCB Buffer Control Block
  • the partition alignment instruction after deleting the original storage space size in the software data according to the erase instruction, before obtaining the current storage space size of the memory in the target device according to the partition alignment instruction, delete the erase instruction stored in the buffer control block.
  • the partition alignment instruction after obtaining the current storage space size of the memory in the target device, before updating the current storage space size to the software data required for the target device to run, delete the partition alignment instruction stored in the buffer control block.
  • the erase instruction stored in the BCB when executed, the erase instruction in the BCB is immediately deleted; when the partition alignment instruction stored in the BCB is executed, the partition alignment instruction in the BCB is immediately deleted to ensure that the partition alignment instruction in the BCB is executed.
  • the erase instruction and partition alignment instruction are only used once, avoiding the process of repeatedly executing instructions.
  • the preset management instruction in the specified partition is deleted.
  • the storage space management process for the target device only needs to be performed once, and the target device does not need to repeatedly execute the process.
  • the preset management command in the specified partition is deleted, and when the target device is turned on again, the storage space management process will not be started again through the management command. Avoid the boot delay that occurs when the storage space is managed every time the boot is started, and improve the user experience.
  • the memory includes at least one storage partition.
  • the partition alignment instruction obtain the current storage space size of the memory in the target device.
  • the specific process is: according to the partition alignment instruction, obtain the partition storage space size corresponding to at least one storage partition that can be used by the user; The sum is used as the current storage space size of the memory in the target device.
  • partition alignment means reasonable boundary alignment between the partition and the memory. Through the process of partition alignment, it is possible to accurately know the partition storage space size corresponding to each storage partition that can be used by users, such as the size of user data (userdata) or the size of cache (cache). Through the storage space size of each partition, a more accurate current storage space size available to the user can be obtained, paving the way for the normal operation of the target device.
  • the partition alignment function can be enabled by enabling the partition alignment (ALIGN_PARTITIONS_TO_PERFORMANCE_BOUNDARY) feature.
  • the partition alignment ALIGN_PARTITIONS_TO_PERFORMANCE_BOUNDARY
  • the target device will automatically align all partitions and recalculate the userdate size after the device is restored to factory settings.
  • Step 106 updating the current storage space size into the software data required for the target device to run.
  • the current storage space size is updated to the software data required for the target device to run, so that the target device starts running based on the current storage space size. That is, the target device has completed the self-adaptation of the storage space.
  • the target device is restarted so that the target device can be used normally.
  • the target device automatically completes the process of rebooting the target device, which can avoid the problem of poor user experience caused by manual operation by the user, and make the target device more intelligent.
  • the target device when the target device is turned on for the first time, it reads the preset management command in the specified partition, obtains the current storage space size of the memory in the target device through the management command, and updates the current storage space size to In the software data required for the target device to run. That is to say, when the target device is turned on for the first time, the current storage space size of the target device memory is obtained through management instructions, and then the operation of the target device is realized based on the current storage space size, rather than through the previously written storage space. The size of the space to run the software. When the software data runs on another new device with a different size of the current storage space, the method can adapt to the storage space instead of redeveloping the software data for the new device. By adapting to the current storage space of the target device, the process of adapting a set of software data to multiple hardware devices is realized, which greatly reduces the development difficulty of developers and improves development efficiency.
  • the device mainly include:
  • the reading module 302 is used to read the preset management instructions in the specified partition when the target device is turned on for the first time;
  • An acquisition module 304 configured to acquire the current storage space size of the memory in the target device through a management instruction
  • the update module 306 is configured to update the current storage space size into the software data required for the target device to run.
  • Another embodiment of the present application also provides an electronic device.
  • the memories 420 communicate with each other through the communication bus 430 .
  • the memory 420 stores programs executable by the processor 410, and the processor 410 executes the programs stored in the memory 420 to implement the storage space management method described in the above embodiments.
  • the communication bus 430 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI for short) bus or an Extended Industry Standard Architecture (EISA for short) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus 430 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 4 , but it does not mean that there is only one bus or one type of bus.
  • the memory 420 may include a random access memory (Random Access Memory, RAM for short), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • the memory may also be at least one storage device located away from the aforementioned processor 410 .
  • the above-mentioned processor 410 can be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc., and can also be a digital signal processor (Digital Signal Processing, referred to as DSP). ), Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the electronic device provided in this embodiment may specifically be a module capable of realizing a communication function or a terminal device including the module, and the terminal device may be a mobile terminal or a smart terminal.
  • the mobile terminal can be at least one of mobile phones, tablet computers, notebook computers, etc.
  • the smart terminal can be specifically smart cars, smart watches, shared bicycles, smart cabinets and other terminals containing wireless communication modules
  • the module can be specifically wireless Communication module, such as any one of 2G communication module, 3G communication module, 4G communication module, 5G communication module, NB-IOT communication module, etc.
  • a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium.
  • the computer program is run on a computer, the computer is made to execute the above-mentioned embodiment.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.) to another website site, computer, server or data center.
  • DSL digital subscriber line
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk), and the like.

Abstract

The present application relates to a storage space management method and apparatus, and a device and a storage medium, which are in the field of storages. The method comprises: after a target device is powered on for the first time, reading a preset management instruction in a specified partition; acquiring the current size of the storage space of a memory in the target device by means of the management instruction; and updating the current size of the storage space to software data that is required for the running of the target device.

Description

存储空间管理方法、装置、设备及存储介质Storage space management method, device, equipment and storage medium
本申请要求于2021年10月12日提交中国国家知识产权局,申请号为202111187852.2、发明名称为“存储空间管理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111187852.2 and the title of the invention "storage space management method, device, equipment and storage medium" submitted to the State Intellectual Property Office of China on October 12, 2021, the entire content of which is passed References are incorporated in this application.
技术领域technical field
本申请涉及存储领域,尤其涉及一种存储空间管理方法、装置、设备及存储介质。The present application relates to the field of storage, and in particular to a storage space management method, device, device and storage medium.
背景技术Background technique
随着科技的不断发展,智能手机等电子设备逐渐在人们的生活中占据重要位置。一些电子设备的项目中,由于电子设备的硬件存储器相应的存储空间大小是固定的。所以为了适应更多的用于需求,同一个项目中的电子设备,存在除了存储器的存储空间大小不一样,但是其他元器件参数均一样的情况,也就是同一个项目中存在存储空间不同的多个子项目。如智能手机,很多情况下是同一个型号的手机,包括64G存储器的子型号手机、128G存储器的子型号手机以及256G存储器的子型号手机等。With the continuous development of science and technology, electronic devices such as smartphones gradually occupy an important position in people's lives. In some items of electronic equipment, the corresponding storage space size of the hardware memory of the electronic equipment is fixed. Therefore, in order to meet more application requirements, the electronic equipment in the same project, except for the storage space of the memory, has different parameters, but the parameters of other components are the same, that is, there are many different storage spaces in the same project. sub-items. For example, smart phones are in many cases the same model of mobile phone, including sub-model mobile phones with 64G memory, sub-model mobile phones with 128G memory, and sub-model mobile phones with 256G memory.
基于上述,同一个项目中的子项目,通过在编译脚本中增加项目编译选项来进行区别。而各个子项目运行的软件则高度相似,但是,开发人员却需要针对每一个子项目进行开发或维护,既会增加项目正式版本的数量,导致增加编译版本次数及测试部的工作量,又导致软件代码中对项目管控复杂,项目分支繁杂,开发过程中容易出现子项目之间版本互刷导致不能开机的情况,大大增加了开发难度,降低开发效率。Based on the above, sub-projects in the same project are distinguished by adding project compilation options in the compilation script. The software run by each sub-project is highly similar, but developers need to develop or maintain each sub-project, which will increase the number of official versions of the project, increase the number of compiled versions and the workload of the testing department, and lead to The project management and control in the software code is complex, and the project branches are complicated. During the development process, it is easy to have versions between sub-projects that cannot be started, which greatly increases the difficulty of development and reduces the development efficiency.
发明内容Contents of the invention
第一方面,本申请涉及存储空间管理方法,所述方法包括:In a first aspect, the present application relates to a storage space management method, the method comprising:
当目标设备首次开机后,读取指定分区中预设的管理指令;When the target device is turned on for the first time, read the preset management commands in the designated partition;
通过所述管理指令,获取所述目标设备中存储器的当前存储空间大小;Obtain the current storage space size of the memory in the target device through the management instruction;
将所述当前存储空间大小,更新至所述目标设备运行所需要的软件数据中。The size of the current storage space is updated to the software data required for the operation of the target device.
在某些实施方案中,所述管理指令包括重启恢复指令、擦除指令和分区对齐指令;In some embodiments, the management instructions include restart recovery instructions, erase instructions, and partition alignment instructions;
所述通过所述管理指令,获取所述目标设备中存储器的存储空间大小,包括:The acquisition of the storage space size of the memory in the target device through the management instruction includes:
将所述擦除指令和所述分区对齐指令保存至缓冲控制块中;storing the erase command and the partition alignment command in a buffer control block;
根据所述重启恢复指令,重新启动所述目标设备,并读取所述缓冲控制块中的所述擦除指令和所述分区对齐指令;Restart the target device according to the restart recovery instruction, and read the erase instruction and the partition alignment instruction in the buffer control block;
根据所述擦除指令,删除所述软件数据中的原始存储空间大小;According to the erasing instruction, delete the original storage space size in the software data;
根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小。According to the partition alignment instruction, the current storage space size of the memory in the target device is acquired.
在某些实施方案中,所述将所述当前存储空间大小,保存至所述目标设备运行所需要的软件数据中之后,还包括:In some embodiments, after saving the size of the current storage space into the software data required for the operation of the target device, it further includes:
重新启动所述目标设备,以使所述目标设备正常使用。Rebooting the target device to enable normal use of the target device.
在某些实施方案中,所述根据所述擦除指令,删除所述软件数据中的原始存储空间大小之后,所述根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小之 前,还包括:In some embodiments, after the original storage space size in the software data is deleted according to the erasing instruction, the current storage space size of the memory in the target device is obtained according to the partition alignment instruction Previously, also included:
删除所述缓冲控制块中保存的所述擦除指令;deleting the erase instruction stored in the buffer control block;
所述根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小之后,所述将所述当前存储空间大小,更新至所述目标设备运行所需要的软件数据中之前,还包括:According to the partition alignment instruction, after obtaining the current storage space size of the memory in the target device, before updating the current storage space size to the software data required for the target device to run, further includes :
删除所述缓冲控制块中保存的所述分区对齐指令。and deleting the partition alignment instruction stored in the buffer control block.
在某些实施方案中,所述目标设备首次开机之后,所述读取指定分区中预设的管理指令之前,还包括:In some implementations, after the target device is turned on for the first time, before the reading of the preset management instructions in the designated partition, further includes:
初始化所述目标设备的恢复环境,以使所述目标设备能够执行所述重启恢复指令。Initializing the recovery environment of the target device, so that the target device can execute the restart recovery instruction.
在某些实施方案中,所述存储器包括至少一个存储分区;In some embodiments, the memory includes at least one memory partition;
所述根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小,包括:The obtaining the current storage space size of the memory in the target device according to the partition alignment instruction includes:
根据所述分区对齐指令,获取所述至少一个存储分区分别对应的用户能够使用的分区存储空间大小;Acquiring, according to the partition alignment instruction, the size of the partition storage space available to the user corresponding to the at least one storage partition;
将所述每一个分区存储空间大小的总和,作为所述目标设备中存储器的当前存储空间大小。The sum of the storage space sizes of each partition is used as the current storage space size of the memory in the target device.
第二方面,本申请涉及存储空间管理装置,所述装置包括:In a second aspect, the present application relates to a storage space management device, and the device includes:
读取模块,用于当目标设备首次开机后,读取指定分区中预设的管理指令;The reading module is used to read the preset management instructions in the specified partition when the target device is turned on for the first time;
获取模块,用于通过所述管理指令,获取所述目标设备中存储器的当前存储空间大小;An acquisition module, configured to acquire the current storage space size of the memory in the target device through the management instruction;
更新模块,用于将所述当前存储空间大小,更新至所述目标设备运行所需要的软件数据中。An update module, configured to update the size of the current storage space into the software data required for the operation of the target device.
第三方面,本申请涉及电子设备,包括处理器、存储器和通信总线,其中,处理器和存储器通过通信总线完成相互间的通信;In a third aspect, the present application relates to electronic equipment, including a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other through the communication bus;
所述存储器,用于存储计算机程序;The memory is used to store computer programs;
所述处理器,用于执行所述存储器中所存储的程序,实现本申请所述的存储空间管理方法。The processor is configured to execute the program stored in the memory to implement the storage space management method described in this application.
第四方面,本申请涉及计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请所述的存储空间管理方法。In a fourth aspect, the present application relates to a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the storage space management method described in the present application is implemented.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.
图1为本申请一实施例中提供的存储空间管理方法实现的流程步骤示意图;FIG. 1 is a schematic diagram of the process steps of the implementation of the storage space management method provided in an embodiment of the present application;
图2为本申请另一实施例中提供的一种mics分区格式的示例图;FIG. 2 is an example diagram of a mics partition format provided in another embodiment of the present application;
图3为本申请另一实施例中提供的存储空间管理装置的结构连接示意图;FIG. 3 is a schematic structural connection diagram of a storage space management device provided in another embodiment of the present application;
图4为本申请另一实施例中提供的电子设备的结构连接示意图。FIG. 4 is a schematic diagram of structural connection of an electronic device provided in another embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present application.
本申请实施例中提供的存储空间管理方法,可通过软件算法实现。该方法对应的算法可预先设置于目标设备的处理器中。该目标设备可以为智能手机、平板电脑、智能手环、智能冰箱以及其他类型的电子设备中的任意一种。The storage space management method provided in the embodiment of the present application may be implemented by a software algorithm. The algorithm corresponding to the method can be preset in the processor of the target device. The target device may be any one of smart phones, tablet computers, smart bracelets, smart refrigerators and other types of electronic devices.
一个实施例中,如图1所示,存储空间管理方法实现的流程步骤如下:In one embodiment, as shown in FIG. 1, the process steps implemented by the storage space management method are as follows:
步骤102,当目标设备首次开机后,读取指定分区中预设的管理指令。 Step 102, when the target device is turned on for the first time, read the preset management instructions in the specified partition.
本实施例中,管理指令是预先保存至目标设备的指定分区的。当目标设备开机后,则从指令分区中读取该管理指令。其中,指定分区可以为目标设备的存储器中任意一个存储分区,例如,指定分区可以为杂项(mics)分区。In this embodiment, the management instruction is saved in a designated partition of the target device in advance. When the target device is turned on, the management instruction is read from the instruction partition. Wherein, the specified partition may be any storage partition in the memory of the target device, for example, the specified partition may be a miscellaneous (mics) partition.
本实施例中,可以预先将管理指令转换成ASCII码的密文,通过软件工具,将翻译好的密文写入misc分区要升级的镜像中,以用于目标设备后续的存储空间管理方法。一种mics分区格式如图2所示,该格式中通过十六进制来实现管理指令的写入,图2中的数字和字母表示十六进制数字。In this embodiment, the management instruction can be converted into ASCII ciphertext in advance, and the translated ciphertext can be written into the image to be upgraded by the misc partition through a software tool, so as to be used in the subsequent storage space management method of the target device. A mics partition format is shown in FIG. 2 , in which management instructions are written in hexadecimal, and numbers and letters in FIG. 2 represent hexadecimal numbers.
本实施例中,可以通过预设的分区读取(Read From Partition)函数,实现读取misc分区中的管理指令。In this embodiment, the management instruction in the misc partition can be read through the preset Read From Partition function.
一个实施例中,目标设备首次开机之后,读取指定分区中预设的管理指令之前,初始化目标设备的恢复环境,以使目标设备能够执行重启恢复指令。例如,基于Linux系统(Linux系统是一种免费使用和自由传播的类UNIX操作系统)的电子设备在开机时,首先进入设备开机的准备阶段,即统一可扩展固件接口(Unified Extensible Firmware Interface,简称UEFI)阶段,然后进入Linux系统后,开始初始化(Init)过程。初始化目标设备的恢复(recovery)环境则在初始化过程中实现。In one embodiment, after the target device is turned on for the first time, but before reading the preset management command in the specified partition, the recovery environment of the target device is initialized, so that the target device can execute the restart recovery command. For example, when an electronic device based on the Linux system (Linux system is a UNIX-like operating system that is freely used and freely disseminated) is turned on, it first enters the preparation stage for starting the device, that is, the Unified Extensible Firmware Interface (Unified Extensible Firmware Interface, referred to as UEFI) stage, and then after entering the Linux system, the initialization (Init) process begins. Initializing the recovery (recovery) environment of the target device is realized during the initialization process.
步骤104,通过管理指令,获取目标设备中存储器的当前存储空间大小。 Step 104, obtain the current storage space size of the memory in the target device through the management instruction.
本实施例中,预设的管理指令用于获取目标设备中存储器的当前存储空间大小。也就是在目标设备开机后,用户使用之前,首先获取当前存储空间大小,以使目标设备能够正常使用。In this embodiment, the preset management instruction is used to obtain the current storage space size of the memory in the target device. That is, after the target device is turned on and before the user uses it, the current storage space size is first obtained, so that the target device can be used normally.
本实施例中,目标设备中的存储器可以为嵌入式存储器(Embedded Multi Media Card,简称EMMC)、通用闪存存储(Universal Flash Storage,简称UFS)以及其他类型能够实现本方法的任意一种存储器,本申请的保护范围不以存储器的具体类型为限制。In this embodiment, the memory in the target device can be Embedded Multi Media Card (EMMC for short), Universal Flash Storage (UFS for short), and any other type of memory that can implement this method. The protection scope of the application is not limited by the specific type of memory.
一个实施例中,管理指令包括重启恢复指令、擦除指令和分区对齐指令。通过管理指令,获取目标设备中存储器的存储空间大小,具体实现过程如下:将擦除指令和分区对齐指令保存至缓冲控制块中;根据重启恢复指令,重新启动目标设备,并读取缓冲控制块中的擦除指令和分区对齐指令;根据擦除指令,删除软件数据中的原始存储空间大小;根据分区对齐指令,获取目标设备中存储器的当前存储空间大小。In one embodiment, the management instructions include restart recovery instructions, erase instructions and partition alignment instructions. Obtain the storage space size of the memory in the target device through the management command. The specific implementation process is as follows: save the erase command and partition alignment command into the buffer control block; restart the target device according to the restart recovery command, and read the buffer control block Erase instruction and partition alignment instruction in; according to the erase instruction, delete the original storage space size in the software data; according to the partition alignment instruction, obtain the current storage space size of the memory in the target device.
本实施例中,缓冲控制块(Buffer Control Block,简称BCB)是一个能够保存指令数据的存储区块。目标设备读取管理指令后,先将擦除指令和分区对齐指令保存至BCB中,然后通过重启恢复(boot-recovery)指令,重启后进入恢复(recovery)环境中。在重启后的recovery环境中,再次读取BCB中的擦除指令和分区对齐指令。然后根据擦除指令, 删除软件数据中的原始存储空间大小。再根据分区对齐指令,获取目标设备中存储器的当前存储空间大小。In this embodiment, a buffer control block (Buffer Control Block, BCB for short) is a storage block capable of storing instruction data. After the target device reads the management command, it first saves the erase command and the partition alignment command in the BCB, and then enters the recovery environment after rebooting through the boot-recovery command. In the recovery environment after reboot, read the erase command and partition alignment command in BCB again. Then delete the original storage space size in the software data according to the erasing instruction. Then according to the partition alignment instruction, the current storage space size of the memory in the target device is acquired.
一个实施例中,根据擦除指令,删除软件数据中的原始存储空间大小之后,根据分区对齐指令,获取目标设备中存储器的当前存储空间大小之前,删除缓冲控制块中保存的擦除指令。根据分区对齐指令,获取目标设备中存储器的当前存储空间大小之后,将当前存储空间大小,更新至目标设备运行所需要的软件数据中之前,删除缓冲控制块中保存的分区对齐指令。In one embodiment, after deleting the original storage space size in the software data according to the erase instruction, before obtaining the current storage space size of the memory in the target device according to the partition alignment instruction, delete the erase instruction stored in the buffer control block. According to the partition alignment instruction, after obtaining the current storage space size of the memory in the target device, before updating the current storage space size to the software data required for the target device to run, delete the partition alignment instruction stored in the buffer control block.
本实施例中,当保存在BCB中擦除指令执行后,则立即删除BCB中的擦除指令;当保存在BCB中分区对齐指令执行后,则立即删除BCB中的分区对齐指令,保证BCB中的擦除指令和分区对齐指令仅使用一次,避免出现重复执行指令的过程。In this embodiment, when the erase instruction stored in the BCB is executed, the erase instruction in the BCB is immediately deleted; when the partition alignment instruction stored in the BCB is executed, the partition alignment instruction in the BCB is immediately deleted to ensure that the partition alignment instruction in the BCB is executed. The erase instruction and partition alignment instruction are only used once, avoiding the process of repeatedly executing instructions.
一个实施例中,通过管理指令,获取目标设备中存储器的当前存储空间大小之后,删除指定分区中预设的管理指令。In one embodiment, after obtaining the current storage space size of the memory in the target device through the management instruction, the preset management instruction in the specified partition is deleted.
本实施例中,目标设备进入使用阶段后,目标设备的存储器是固定的,不会随时发生变化。所以,针对目标设备进行的存储空间管理过程进行一次即可,不需要目标设备反复执行该过程。而获取目标设备中存储器的当前存储空间大小之后,删除指定分区中预设的管理指令,当目标设备再次开机时,则不会再次通过管理指令启动存储空间管理的过程。避免每次开机进行存储空间管理出现的开机延迟,提高用户的体验感。In this embodiment, after the target device enters the use stage, the memory of the target device is fixed and will not change at any time. Therefore, the storage space management process for the target device only needs to be performed once, and the target device does not need to repeatedly execute the process. After the current storage space size of the memory in the target device is obtained, the preset management command in the specified partition is deleted, and when the target device is turned on again, the storage space management process will not be started again through the management command. Avoid the boot delay that occurs when the storage space is managed every time the boot is started, and improve the user experience.
一个实施例中,存储器包括至少一个存储分区。根据分区对齐指令,获取目标设备中存储器的当前存储空间大小,具体过程为:根据分区对齐指令,获取至少一个存储分区分别对应的用户能够使用的分区存储空间大小;将每一个分区存储空间大小的总和,作为目标设备中存储器的当前存储空间大小。In one embodiment, the memory includes at least one storage partition. According to the partition alignment instruction, obtain the current storage space size of the memory in the target device. The specific process is: according to the partition alignment instruction, obtain the partition storage space size corresponding to at least one storage partition that can be used by the user; The sum is used as the current storage space size of the memory in the target device.
本实施例中,分区对齐意味着分区与存储器之间合理的边界对齐。通过分区对齐的过程,能够准确的获知每一个存储分区分别对应的用户能够使用的分区存储空间大小,例如用户数据(userdata)大小或高速缓存(cache)大小。通过每一个分区存储空间大小,能够获得更为准确的用户可以使用的当前存储空间大小,为目标设备的正常运行做好铺垫。In this embodiment, partition alignment means reasonable boundary alignment between the partition and the memory. Through the process of partition alignment, it is possible to accurately know the partition storage space size corresponding to each storage partition that can be used by users, such as the size of user data (userdata) or the size of cache (cache). Through the storage space size of each partition, a more accurate current storage space size available to the user can be obtained, paving the way for the normal operation of the target device.
本实施例中,分区对齐功能可以通过使能分区对齐(ALIGN_PARTITIONS_TO_PERFORMANCE_BOUNDARY)特性来开启。当ALIGN_PARTITIONS_TO_PERFORMANCE_BOUNDARY特性开启时,目标设备在设备恢复出厂设置后,就会自动对齐所有分区及重新计算出userdate大小。In this embodiment, the partition alignment function can be enabled by enabling the partition alignment (ALIGN_PARTITIONS_TO_PERFORMANCE_BOUNDARY) feature. When the ALIGN_PARTITIONS_TO_PERFORMANCE_BOUNDARY feature is enabled, the target device will automatically align all partitions and recalculate the userdate size after the device is restored to factory settings.
步骤106,将当前存储空间大小,更新至目标设备运行所需要的软件数据中。 Step 106, updating the current storage space size into the software data required for the target device to run.
本实施例中,得到当前存储空间大小后,则将该当前存储空大小,更新至目标设备运行所需要的软件数据中,以使目标设备基于当前存储空间大小启动运行。也就是目标设备完成了存储空间的自适应。In this embodiment, after the current storage space size is obtained, the current storage space size is updated to the software data required for the target device to run, so that the target device starts running based on the current storage space size. That is, the target device has completed the self-adaptation of the storage space.
一个实施例中,将当前存储空间大小,保存至目标设备运行所需要的软件数据中之后,重新启动目标设备,以使目标设备正常使用。In one embodiment, after the current storage space size is saved in the software data required for the target device to run, the target device is restarted so that the target device can be used normally.
本实施例中,目标设备自动完成目标设备重新启动(reboot)的过程,可以避免用户手动操作造成体验差的问题,使目标设备更加智能化。In this embodiment, the target device automatically completes the process of rebooting the target device, which can avoid the problem of poor user experience caused by manual operation by the user, and make the target device more intelligent.
本申请提供的存储空间管理方法,当目标设备首次开机后,读取指定分区中预设的管理指令,通过管理指令,获取目标设备中存储器的当前存储空间大小,将当前存储空间大小,更新至目标设备运行所需要的软件数据中。也就是说,当目标设备第一次开机时,通 过管理指令获得该目标设备存储器的当前存储空间大小,然后基于该当前存储空间大小,来实现目标设备的运行,而不是通过事先写入的存储空间大小来运行软件。当软件数据运行于另一个当前存储空间大小不同的新设备时,通过本方法,即可自适应存储空间,而不是针对新设备再次开发软件数据。通过自适应目标设备的当前存储空间大小,实现了一套软件数据适应多个硬件设备的过程,大大降低了开发人员的开发难度,提高开发效率。In the storage space management method provided by this application, when the target device is turned on for the first time, it reads the preset management command in the specified partition, obtains the current storage space size of the memory in the target device through the management command, and updates the current storage space size to In the software data required for the target device to run. That is to say, when the target device is turned on for the first time, the current storage space size of the target device memory is obtained through management instructions, and then the operation of the target device is realized based on the current storage space size, rather than through the previously written storage space. The size of the space to run the software. When the software data runs on another new device with a different size of the current storage space, the method can adapt to the storage space instead of redeveloping the software data for the new device. By adapting to the current storage space of the target device, the process of adapting a set of software data to multiple hardware devices is realized, which greatly reduces the development difficulty of developers and improves development efficiency.
基于同一构思,本申请的另一个实施例中提供了一种存储空间管理装置,该装置的具体实施可参见方法实施例部分的描述,重复之处不再赘述,如图3所示,该装置主要包括:Based on the same idea, another embodiment of the present application provides a storage space management device. For the specific implementation of the device, please refer to the description of the method embodiment, and the repetition will not be repeated. As shown in Figure 3, the device mainly include:
读取模块302,用于当目标设备首次开机后,读取指定分区中预设的管理指令;The reading module 302 is used to read the preset management instructions in the specified partition when the target device is turned on for the first time;
获取模块304,用于通过管理指令,获取目标设备中存储器的当前存储空间大小;An acquisition module 304, configured to acquire the current storage space size of the memory in the target device through a management instruction;
更新模块306,用于将当前存储空间大小,更新至目标设备运行所需要的软件数据中。The update module 306 is configured to update the current storage space size into the software data required for the target device to run.
基于同一构思,本申请的另一种实施例中还提供了一种电子设备,如图4所示,该电子设备主要包括:处理器410、存储器420和通信总线430,其中,处理器410和存储器420通过通信总线430完成相互间的通信。其中,存储器420中存储有可被处理器410执行的程序,处理器410执行存储器420中存储的程序,实现上述实施例所描述的存储空间管理方法。Based on the same idea, another embodiment of the present application also provides an electronic device. As shown in FIG. The memories 420 communicate with each other through the communication bus 430 . Wherein, the memory 420 stores programs executable by the processor 410, and the processor 410 executes the programs stored in the memory 420 to implement the storage space management method described in the above embodiments.
上述电子设备中提到的通信总线430可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该通信总线430可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus 430 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI for short) bus or an Extended Industry Standard Architecture (EISA for short) bus or the like. The communication bus 430 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 4 , but it does not mean that there is only one bus or one type of bus.
存储器420可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选地,存储器还可以是至少一个位于远离前述处理器410的存储装置。The memory 420 may include a random access memory (Random Access Memory, RAM for short), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor 410 .
上述的处理器410可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等,还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor 410 can be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc., and can also be a digital signal processor (Digital Signal Processing, referred to as DSP). ), Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
其中,本实施例提供的电子设备,具体可以为能够实现通信功能的模组或包含该模组的终端设备等,该终端设备可以为移动终端或智能终端。移动终端具体可以为手机、平板电脑、笔记本电脑等中的至少一种;智能终端具体可以是智能汽车、智能手表、共享单车、智能柜等含有无线通信模组的终端;模组具体可以为无线通信模组,例如2G通信模组、3G通信模组、4G通信模组、5G通信模组、NB-IOT通信模组等中的任意一种。Wherein, the electronic device provided in this embodiment may specifically be a module capable of realizing a communication function or a terminal device including the module, and the terminal device may be a mobile terminal or a smart terminal. Specifically, the mobile terminal can be at least one of mobile phones, tablet computers, notebook computers, etc.; the smart terminal can be specifically smart cars, smart watches, shared bicycles, smart cabinets and other terminals containing wireless communication modules; the module can be specifically wireless Communication module, such as any one of 2G communication module, 3G communication module, 4G communication module, 5G communication module, NB-IOT communication module, etc.
在本申请的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序在计算机上运行时,使得计算机执行上述实施例中所描述的存储空间管理方法。In yet another embodiment of the present application, a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium. When the computer program is run on a computer, the computer is made to execute the above-mentioned embodiment. The storage space management method described.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个 计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、微波等)方式向另外一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如软盘、硬盘、磁带等)、光介质(例如DVD)或者半导体介质(例如固态硬盘)等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk), and the like.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this document, relational terms such as "first" and "second" are used to distinguish one entity or operation from another entity or operation without necessarily requiring or implying that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
以上所述是本申请的具体实施方式,使本领域技术人员能够理解或实现本申请。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above descriptions are specific implementation manners of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims (10)

  1. 存储空间管理方法,其包括:A storage space management method, comprising:
    当目标设备首次开机后,读取指定分区中预设的管理指令;When the target device is turned on for the first time, read the preset management commands in the designated partition;
    通过所述管理指令,获取所述目标设备中存储器的当前存储空间大小;Obtain the current storage space size of the memory in the target device through the management instruction;
    将所述当前存储空间大小,更新至所述目标设备运行所需要的软件数据中。The size of the current storage space is updated to the software data required for the operation of the target device.
  2. 根据权利要求1所述的方法,其中,所述管理指令包括重启恢复指令、擦除指令和分区对齐指令;The method according to claim 1, wherein the management instruction includes a restart recovery instruction, an erase instruction, and a partition alignment instruction;
    所述通过所述管理指令,获取所述目标设备中存储器的存储空间大小,包括:The acquisition of the storage space size of the memory in the target device through the management instruction includes:
    将所述擦除指令和所述分区对齐指令保存至缓冲控制块中;storing the erase command and the partition alignment command in a buffer control block;
    根据所述重启恢复指令,重新启动所述目标设备,并读取所述缓冲控制块中的所述擦除指令和所述分区对齐指令;Restart the target device according to the restart recovery instruction, and read the erase instruction and the partition alignment instruction in the buffer control block;
    根据所述擦除指令,删除所述软件数据中的原始存储空间大小;According to the erasing instruction, delete the original storage space size in the software data;
    根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小。According to the partition alignment instruction, the current storage space size of the memory in the target device is obtained.
  3. 根据权利要求1所述的方法,其中,所述将所述当前存储空间大小,保存至所述目标设备运行所需要的软件数据中之后,还包括:The method according to claim 1, wherein, after saving the size of the current storage space into the software data required for the operation of the target device, further comprising:
    重新启动所述目标设备,以使所述目标设备正常使用。Rebooting the target device to enable normal use of the target device.
  4. 根据权利要求1所述的方法,其中,所述通过所述管理指令,获取所述目标设备中存储器的当前存储空间大小之后,还包括:The method according to claim 1, wherein, after obtaining the current storage space size of the memory in the target device through the management instruction, further comprising:
    删除所述指定分区中预设的所述管理指令。and deleting the management instruction preset in the specified partition.
  5. 根据权利要求2所述的方法,其中,所述根据所述擦除指令,删除所述软件数据中的原始存储空间大小之后,所述根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小之前,还包括:The method according to claim 2, wherein, after deleting the original storage space size in the software data according to the erasing instruction, obtaining the memory size in the target device according to the partition alignment instruction Before the current storage size, it also includes:
    删除所述缓冲控制块中保存的所述擦除指令;deleting the erase instruction stored in the buffer control block;
    所述根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小之后,所述将所述当前存储空间大小,更新至所述目标设备运行所需要的软件数据中之前,还包括:According to the partition alignment instruction, after obtaining the current storage space size of the memory in the target device, before updating the current storage space size to the software data required for the target device to run, further includes :
    删除所述缓冲控制块中保存的所述分区对齐指令。and deleting the partition alignment instruction stored in the buffer control block.
  6. 根据权利要求2所述的方法,其中,所述目标设备首次开机之后,所述读取指定分区中预设的管理指令之前,还包括:The method according to claim 2, wherein after the target device is turned on for the first time and before the reading of the preset management instructions in the designated partition, further comprising:
    初始化所述目标设备的恢复环境,以使所述目标设备能够执行所述重启恢复指令。Initializing the recovery environment of the target device, so that the target device can execute the restart recovery instruction.
  7. 根据权利要求2所述的方法,其中,所述存储器包括至少一个存储分区;The method of claim 2, wherein the memory comprises at least one memory partition;
    所述根据所述分区对齐指令,获取所述目标设备中存储器的当前存储空间大小,包括:The obtaining the current storage space size of the memory in the target device according to the partition alignment instruction includes:
    根据所述分区对齐指令,获取所述至少一个存储分区分别对应的用户能够使用的分区存储空间大小;Acquiring, according to the partition alignment instruction, the size of the partition storage space available to the user corresponding to the at least one storage partition;
    将所述每一个分区存储空间大小的总和,作为所述目标设备中存储器的当前存储空间大小。The sum of the storage space sizes of each partition is used as the current storage space size of the memory in the target device.
  8. 存储空间管理装置,其包括:A storage space management device, which includes:
    读取模块,用于当目标设备首次开机后,读取指定分区中预设的管理指令;The reading module is used to read the preset management instructions in the specified partition when the target device is turned on for the first time;
    获取模块,用于通过所述管理指令,获取所述目标设备中存储器的当前存储空间大小;An acquisition module, configured to acquire the current storage space size of the memory in the target device through the management instruction;
    更新模块,用于将所述当前存储空间大小,更新至所述目标设备运行所需要的软件数据中。An update module, configured to update the size of the current storage space into the software data required for the operation of the target device.
  9. 电子设备,其包括:处理器、存储器和通信总线,其中,处理器和存储器通过通信总线完成相互间的通信;An electronic device, including: a processor, a memory, and a communication bus, wherein the processor and the memory complete communication with each other through the communication bus;
    所述存储器,用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述存储器中所存储的程序,实现权利要求1至7任一项所述存储空间管理方法的步骤。The processor is configured to execute the program stored in the memory to implement the steps of the storage space management method according to any one of claims 1 to 7.
  10. 计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至7任一项所述存储空间管理方法的步骤。A computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the storage space management method described in any one of claims 1 to 7 are implemented.
PCT/CN2022/093357 2021-10-12 2022-05-17 Storage space management method and apparatus, and device and storage medium WO2023060893A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111187852.2 2021-10-12
CN202111187852.2A CN114020211B (en) 2021-10-12 2021-10-12 Storage space management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023060893A1 true WO2023060893A1 (en) 2023-04-20

Family

ID=80055743

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/093357 WO2023060893A1 (en) 2021-10-12 2022-05-17 Storage space management method and apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN114020211B (en)
WO (1) WO2023060893A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020211B (en) * 2021-10-12 2024-03-15 深圳市广和通无线股份有限公司 Storage space management method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572365A (en) * 2013-10-18 2015-04-29 中国长城计算机深圳股份有限公司 Memory self-adapting method and device
CN107451023A (en) * 2017-08-18 2017-12-08 济南浪潮高新科技投资发展有限公司 It is a kind of based on uboot internal memory from adaptation method
CN107479969A (en) * 2017-07-31 2017-12-15 深圳天珑无线科技有限公司 Data processing method and device
US20190286354A1 (en) * 2018-03-19 2019-09-19 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Selecting and compressing target files to obtain additional free data storage space to perform an operation in a virtual machine
CN111538684A (en) * 2018-12-28 2020-08-14 美光科技公司 Host adaptive memory device optimization
CN111694580A (en) * 2019-03-13 2020-09-22 杭州宏杉科技股份有限公司 Method and device for upgrading and initializing storage device and electronic device
CN114020211A (en) * 2021-10-12 2022-02-08 深圳市广和通无线股份有限公司 Storage space management method, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1939860B1 (en) * 2006-11-30 2009-03-18 Harman Becker Automotive Systems GmbH Interactive speech recognition system
JP5121439B2 (en) * 2007-12-26 2013-01-16 株式会社東芝 Nonvolatile semiconductor memory device
US8731062B2 (en) * 2008-02-05 2014-05-20 Ntt Docomo, Inc. Noise and/or flicker reduction in video sequences using spatial and temporal processing
CN104765697A (en) * 2015-03-10 2015-07-08 安科智慧城市技术(中国)有限公司 Embedded device interaction method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572365A (en) * 2013-10-18 2015-04-29 中国长城计算机深圳股份有限公司 Memory self-adapting method and device
CN107479969A (en) * 2017-07-31 2017-12-15 深圳天珑无线科技有限公司 Data processing method and device
CN107451023A (en) * 2017-08-18 2017-12-08 济南浪潮高新科技投资发展有限公司 It is a kind of based on uboot internal memory from adaptation method
US20190286354A1 (en) * 2018-03-19 2019-09-19 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Selecting and compressing target files to obtain additional free data storage space to perform an operation in a virtual machine
CN111538684A (en) * 2018-12-28 2020-08-14 美光科技公司 Host adaptive memory device optimization
CN111694580A (en) * 2019-03-13 2020-09-22 杭州宏杉科技股份有限公司 Method and device for upgrading and initializing storage device and electronic device
CN114020211A (en) * 2021-10-12 2022-02-08 深圳市广和通无线股份有限公司 Storage space management method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114020211A (en) 2022-02-08
CN114020211B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
WO2019047571A1 (en) Request processing method, system on chip, and public cloud management component
WO2017166447A1 (en) Method and device for loading kernel module
US10810017B2 (en) Systems and methods for handling firmware driver dependencies in host operating systems while applying updates from bootable image file
WO2020001112A1 (en) Application method for platform supporting multiple types of devices, and mobile terminal
US9672362B2 (en) Systems and methods for secure delivery of public keys for operating system drivers
US10503489B1 (en) Updating firmware via a remote utility
CN109828774B (en) Server system and starting method thereof
US10430181B1 (en) Retrieving updated firmware code
CN107135462B (en) Bluetooth pairing method of UEFI firmware and computing system thereof
US20230266958A1 (en) Method for creating private image in public cloud and related device
US8560299B2 (en) Opening a message catalog file for a language that is not installed
WO2023060893A1 (en) Storage space management method and apparatus, and device and storage medium
WO2019144621A1 (en) Method, apparatus, and server for acquiring uefi os startup item
CN112148337A (en) Firmware upgrading method and device
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
CN109522174B (en) Method, device, terminal and storage medium for controlling adb enabling
CN111913753A (en) Method and system for changing starting mode in cloud migration of windows system
CN111782474A (en) Log processing method and device, electronic equipment and medium
WO2019100704A1 (en) Starting method for multi-mode iot device, multi-mode iot device, and storage medium
US9003364B2 (en) Overriding system attributes and function returns in a software subsystem
CN112181467B (en) Method and device for upgrading memory firmware of terminal, terminal and storage medium
CN111722880B (en) Equipment production method and device, terminal equipment and medium
US11340882B2 (en) Systems and methods for enforcing update policies while applying updates from bootable image file
US11314603B2 (en) Recovery image downloads via data chunks
CN112988192A (en) Version updating method and device, electronic equipment and storage medium

Legal Events

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

Ref document number: 22879843

Country of ref document: EP

Kind code of ref document: A1