WO2018028121A1 - 数据分区的存储空间管理方法及装置 - Google Patents

数据分区的存储空间管理方法及装置 Download PDF

Info

Publication number
WO2018028121A1
WO2018028121A1 PCT/CN2016/112266 CN2016112266W WO2018028121A1 WO 2018028121 A1 WO2018028121 A1 WO 2018028121A1 CN 2016112266 W CN2016112266 W CN 2016112266W WO 2018028121 A1 WO2018028121 A1 WO 2018028121A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage space
data partition
preset threshold
data
preset
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.)
Ceased
Application number
PCT/CN2016/112266
Other languages
English (en)
French (fr)
Inventor
简妹湘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
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 Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Publication of WO2018028121A1 publication Critical patent/WO2018028121A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing

Definitions

  • the present invention relates to the field of data storage technologies, and in particular, to a storage space management method and apparatus for data partitioning.
  • the partition of the android device includes the system partition and the data partition.
  • Data partitions are used to store various types of user data and applications that users can read and write. Erasing this partition is equivalent to restoring the factory settings, which is the state when the android system was first started, or the state after the last installation of the official or third-party ROM. It is generally necessary to set a capacity limit for data partitions, and to prevent hackers from illegally writing data to the data partition, or to prevent malicious files from being maliciously destroyed by creating illegal files.
  • Android system generally uses DSMS (Device Storage Monitor Service) to monitor the status of the internal storage space of the system. If the remaining storage space of the device is less than a certain threshold (the default is 10% of the storage space, this value can be set), the user will be sent a warning of insufficient remaining space. The user releases some space.
  • DSMS Device Storage Monitor Service
  • the DSMS detects the remaining space of the data partition every 1 minute.
  • the cache When the available space of the data partition is less than the threshold (between 10% and 500M of the total partition size), the cache will be automatically cleared; the cache is cleared and then calculated.
  • the free space of the data partition if it is still less than the threshold, will send a warning notice to the notification bar and send an ACTION_DEVICE_STORAGE_LOW broadcast.
  • the user can open the application manager and manually clear the application data to increase the available space of the data partition.
  • the application itself can also listen to the ACTION_DEVICE_STORAGE_LOW broadcast to do some special processing. For example, the email application will stop when it receives the broadcast. The current operation of sending and receiving mail.
  • the DSMS service When the DSMS service detects that the space is full, it will send a broadcast with full space; if the remaining space is detected to be greater than the threshold, and the previous low space or insufficient space is issued, the above prompt will be canceled and the ACTION_DEVICE_STORAGE_OK broadcast will be sent. If the amount of data downloaded during this minute is very large, it is possible that the full-filled broadcast has not yet been sent, and the data partition is full, causing the application to fail to function properly.
  • the invention provides a storage space management method and device for data partitioning, which aims to timely discover that the storage space of the data partition is insufficient, and prevent the storage space from being insufficient from full to full and causing the application to fail to operate normally.
  • the present invention provides a storage space management method for a data partition, and the storage space management method of the data partition includes:
  • the remaining storage space in the data partition is detected according to the second preset frequency, where the second preset frequency is greater than the first preset frequency;
  • the warning information that the storage space is full and the application data management interface are displayed, so that the user performs data clearing based on the application data management interface to release the storage space, where
  • the second preset threshold is smaller than the first preset threshold
  • the warning information indicating that the storage space is insufficient and the application data management interface are displayed, so that the user performs data clearing based on the application data management interface to release the storage space;
  • the storage space management method of the data partition further includes:
  • the value of the preset attribute is set to mark the storage amount of the data partition to be greater than or equal to the second preset threshold.
  • the present invention provides a storage space management method for a data partition, and the storage space management method of the data partition includes:
  • the remaining storage space in the data partition is detected according to the second preset frequency, where the second preset frequency is greater than the first preset frequency;
  • the warning information that the storage space is full and the application data management interface are displayed, so that the user performs data clearing based on the application data management interface to release the storage space, where
  • the second preset threshold is smaller than the first preset threshold.
  • the storage space management method of the data partition further includes:
  • the write function is called to write data to the data partition.
  • the storage space management method of the data partition further includes:
  • the warning information indicating that the storage space is insufficient and the application data management interface are displayed, so that the user performs data clearing based on the application data management interface to release the storage space.
  • the storage space management method of the data partition further includes:
  • the step of setting the value of the preset attribute to mark the remaining storage space of the data partition as being smaller than the second preset threshold is performed.
  • the storage space management method of the data partition further includes:
  • the value of the preset attribute is set to mark the storage amount of the data partition to be greater than or equal to the second preset threshold.
  • the present invention further provides a storage space management device for a data partition, where the storage space management device of the data partition includes:
  • a partition monitoring module configured to detect a remaining storage space of the data partition according to the first preset frequency
  • the information prompting module is configured to display, when the remaining storage space is less than the second preset threshold, the warning information that the storage space is full, wherein the second preset threshold is smaller than the first preset threshold;
  • the interface display module is configured to display an application data management interface for the user to perform data clearing based on the application data management interface to release the storage space when detecting that the remaining storage space is less than a second preset threshold.
  • the storage space management device of the data partition further includes:
  • a system attribute module configured to: when detecting that the remaining storage space is less than a second preset threshold, set a value of the preset attribute to mark the remaining storage space of the data partition to be smaller than a second preset threshold;
  • a data reading and writing module configured to determine, according to the value of the preset attribute, whether a remaining storage space of the data partition is smaller than a second preset threshold, before each write write function writes data to the data partition; Sending the prompt information of the read/write abnormality to the application layer if the remaining storage space is less than the second preset threshold; if the remaining storage space is greater than or equal to the second preset threshold, calling the write function to write to the data partition data.
  • the information prompting module is further configured to: when detecting that the remaining storage space amount is less than a first preset threshold, displaying warning information that the storage space is insufficient;
  • the interface display module is further configured to display an application data management interface for the user to perform data clearing based on the application data management interface to release the storage space when detecting that the remaining storage space amount is less than the first preset threshold.
  • the storage space management device of the data partition further includes:
  • a state determining module configured to determine, when the remaining storage space is less than a second preset threshold, whether the system is currently in a startup state
  • the system attribute module is further configured to: if the system is currently in a state of completing startup, set a value of the preset attribute to mark the remaining storage space of the data partition to be smaller than a second preset threshold.
  • system attribute module is further configured to: when detecting that the remaining storage space is greater than or equal to a second preset threshold, set a value of the preset attribute to mark a storage quantity of the data partition It is greater than or equal to the second preset threshold.
  • the storage space management method and device for data partitioning detects the remaining storage space of the data partition according to a certain frequency in the process of writing data to the data partition, and when detecting that the remaining storage space is smaller than the first preset threshold The frequency of the remaining storage space in the detection data partition is increased, the frequency of detecting the remaining storage space is optimized, and the remaining storage space of the partition is found to be insufficient.
  • the remaining storage space is detected to be smaller than the second preset threshold, the data is indicated.
  • the remaining storage space of the partition is not much. If a certain amount of data is written, the data partition may be filled, which may affect the normal operation of the application. Therefore, when it is detected that the remaining storage space is less than the second preset threshold.
  • a warning message is issued, and an application data management interface is displayed at the same time, so that the user can perform data clearing based on the application data management interface to release the storage space, which can prevent the storage space from being quickly insufficient to full and causing the application to fail to operate normally. .
  • FIG. 1 is a flowchart of a first embodiment of a storage space management method for a data partition according to the present invention
  • FIG. 2 is a flowchart of a second embodiment of a storage space management method for a data partition according to the present invention
  • FIG. 3 is a schematic diagram of functional modules of a first embodiment of a storage space management device for a data partition according to the present invention
  • FIG. 4 is a schematic diagram of functional modules of a second embodiment of a storage space management device for a data partition according to the present invention.
  • FIG. 5 is a schematic diagram of functional modules of a third embodiment of a storage space management apparatus for a data partition according to the present invention.
  • the invention provides a storage space management method for data partitioning.
  • FIG. 1 a flowchart of a first embodiment of a storage space management method for a data partition of the present invention is shown.
  • the storage space management method of the data partition includes:
  • Step S10 detecting a remaining storage space of the data partition according to the first preset frequency
  • step S20 when it is detected that the remaining storage space is smaller than the first preset threshold, the remaining storage space in the data partition is detected according to the second preset frequency, where the second preset frequency is greater than the first preset frequency.
  • the method provided in this embodiment is applicable to a mobile terminal such as a mobile phone or a tablet computer with an intelligent operating system.
  • a mobile terminal such as a mobile phone or a tablet computer with an intelligent operating system.
  • the following is an example of a mobile phone with an android operating system installed.
  • the various steps in the method proposed by this embodiment can be implemented by different functional modules.
  • the detection of the size of the remaining storage space of the data partition is performed periodically. For example, the detection may be performed according to the first preset frequency. When it is detected that the remaining storage space is less than the first preset threshold, the current remaining storage space is considered to be insufficient.
  • the module for detecting the amount of remaining storage space can send an ACTION_DEVICE_STORAGE_LOW broadcast to inform other function modules that the current storage space is insufficient. In order to prevent the application from running incorrectly during the process of writing data, the remaining operation is accelerated.
  • the detection of the storage space that is, detecting the remaining storage space of the data partition according to the second preset frequency.
  • the size of the first preset threshold may be set according to the total size of the data partition of the mobile phone, for example, may be set to be between 10% and 500M of the total size of the data partition; the first preset frequency may be every 40 Detected once every second to 1 minute, the second preset frequency is less than the first preset frequency, for example, it can be detected every 10-30 seconds.
  • Step S30 when it is detected that the remaining storage space is less than the second preset threshold, displaying warning information that the storage space is full and an application data management interface, so that the user performs data clearing based on the application data management interface to release the storage space.
  • the second preset threshold is smaller than the first preset threshold.
  • the user may clear the application data based on the data management interface of the application, to The storage space is released.
  • the warning information is sent in the notification bar, and the user does not easily notice that the method proposed in this embodiment can make the user intuitively see the warning that the space is full, and the user can intuitively see the warning that the space is full. Quickly clean up application data, without requiring the user to manually open the data management application and clean up the data in a timely manner.
  • the module for detecting the amount of remaining storage space sends an ACTION_DEVICE_STORAGE_NOT_FULL broadcast to inform other function modules that the current storage space is full.
  • the second preset threshold is smaller than the first preset threshold, and optionally, the second preset threshold is 1/4 of the first preset threshold.
  • the warning information indicating that the storage space is insufficient and the application data management interface are issued.
  • the remaining storage space still has a margin, as the write data proceeds, the remaining The amount of information will be smaller and smaller, in order to enable the user to clean the application data early to release the storage space, and when the remaining storage space is detected to be less than the first preset threshold, the warning information indicating insufficient storage space and the application data management interface are displayed. For the user to perform data cleaning based on the application data management interface to release the storage space.
  • the storage space management method for the data partition proposed in this embodiment detects the remaining storage space of the data partition according to a certain frequency in the process of writing data to the data partition, and when detecting that the remaining storage space is smaller than the first preset threshold, Increase the frequency of the remaining storage space in the detection data partition, optimize the frequency of detecting the remaining storage space, and find out that the remaining storage space of the partition is insufficient.
  • the data partition is indicated at this time. The remaining storage space is not much. If a certain amount of data is written, the data partition may be filled, which may affect the normal operation of the application.
  • the storage space management method of the data partition of the present invention further includes:
  • Step S40 when it is detected that the remaining storage space is less than the second preset threshold, setting a value of the preset attribute to mark the remaining storage space of the data partition to be smaller than a second preset threshold;
  • Step S50 before each write to the write function to write data to the data partition, determine, according to the value of the preset attribute, whether the remaining storage space of the data partition is smaller than a second preset threshold;
  • Step S60 Send the prompt information of the read/write abnormality to the application layer if the remaining storage space is smaller than the second preset threshold.
  • Step S70 If the remaining storage space is greater than or equal to the second preset threshold, the write function is called to write data to the data partition.
  • the method in this embodiment provides a preset attribute and a module for setting a value of the preset attribute.
  • the preset attribute is sys.device.storage.low, and the default value is false, when detecting When the remaining storage space is less than the second preset threshold, set the value of sys.device.storage.low to true, that is, the current storage space is insufficient.
  • the storage space is released. Therefore, when it is detected that the remaining storage space is greater than or equal to a second preset threshold, setting a value of the preset attribute to use the data.
  • the amount of storage of the partition is marked as greater than or equal to the second predetermined threshold. That is, when it is detected that the remaining storage space is greater than or equal to the second preset threshold, the value of sys.device.storage.low is set to false, that is, the current remaining storage space is sufficient.
  • the function Posix.write is called to continue the write operation.
  • the module for setting the value of the preset attribute is shared to the shared memory after setting the attribute value. Therefore, for the data read/write module, the method for obtaining the preset attribute value is used to determine whether the available space of the data partition is smaller than the second.
  • the preset threshold greatly improves efficiency compared to directly calculating the available space of the data partition.
  • a third embodiment of the storage space management method of the data partition of the present invention is proposed based on the first embodiment or the second embodiment.
  • the value of the system attribute sys.boot_completed is set to indicate whether the system has been started. If the system is confirmed to be in the running state after the startup is completed, the preset attribute sys.device.storage.low is set to true, and vice versa. Set to false.
  • the mobile phone may restart the system due to the setting of the application during the process of writing data, and setting the value of the preset attribute needs to be set when the system is started up and running normally, therefore, in this case
  • the system property sys.boot_completed will be obtained before then. The value of the value to determine whether the system is currently in the running state after the completion of the startup. After confirming that the system is running after the startup is completed, set the default attribute sys.device.storage.low.
  • the invention also proposes a storage space management device for data partitioning.
  • FIG. 3 it is a schematic diagram of functional modules of a first embodiment of a storage space management apparatus for data partitioning according to the present invention.
  • the storage space management device of the data partition includes:
  • the partition monitoring module 10 is configured to detect a remaining storage space of the data partition according to the first preset frequency
  • the device proposed in this embodiment may be a mobile terminal such as a mobile phone or a tablet computer with a smart operating system.
  • the following is an example of a mobile phone with an android operating system installed.
  • the various functional modules included in the device proposed by this embodiment are used to perform different functions.
  • the partition monitoring module 10 periodically detects the size of the remaining storage space of the data partition. For example, the detection may be performed according to the first preset frequency. When it is detected that the remaining storage space is less than the first preset threshold, the current remaining storage space is considered. At this time, the partition monitoring module 10 can send an ACTION_DEVICE_STORAGE_LOW broadcast to inform other functional modules that the current storage space is insufficient. In order to prevent the application from running wrong during the process of writing data, the remaining storage is accelerated. The detection of the space, that is, detecting the remaining storage space of the data partition according to the second preset frequency.
  • the size of the first preset threshold may be set according to the total size of the data partition of the mobile phone, for example, may be set to be between 10% and 500M of the total size of the data partition; the first preset frequency may be every 40 Detected once every second to 1 minute, the second preset frequency is less than the first preset frequency, for example, it can be detected every 10-30 seconds.
  • the information prompting module 20 is configured to display, when the remaining storage space is less than the second preset threshold, the warning information that the storage space is full, wherein the second preset threshold is smaller than the first preset threshold;
  • the interface display module 30 is configured to display an application data management interface for the user to perform data clearing based on the application data management interface to release the storage space when detecting that the remaining storage space is less than a second preset threshold.
  • the information prompting module 20 displays the warning information that the storage space is full, and the interface display module 30 displays the application data management interface, and the user can use the data based on the application.
  • the management interface clears the application data to release the storage space.
  • the warning information is sent in the notification bar, and the user does not easily notice that the method proposed in this embodiment can make the user intuitively view relative to the existing notification mode.
  • the warning that the space is full, and the application data is quickly cleaned up, the user does not need to manually open the data management application, and the data is cleaned in time.
  • the partition monitoring module 10 sends an ACTION_DEVICE_STORAGE_NOT_FULL broadcast to inform other functional modules that the current storage space is full.
  • the second preset threshold is smaller than the first preset threshold, and optionally, the second preset threshold is 1/4 of the first preset threshold.
  • the information prompting module 20 issues a warning message that the storage space is insufficient when the remaining storage space is insufficient, and the interface display module 30 displays the application data management interface.
  • the margin will become smaller and smaller, in order to enable the user to clean the application data early to release the storage space, and display the storage space when detecting that the remaining storage space is less than the first preset threshold. Insufficient warning information and an application data management interface for the user to perform data cleaning based on the application data management interface to release storage space.
  • the storage space management device of the data partition proposed in this embodiment detects the remaining storage space of the data partition according to a certain frequency in the process of writing data to the data partition, and when detecting that the remaining storage space is smaller than the first preset threshold, Increase the frequency of the remaining storage space in the detection data partition, optimize the frequency of detecting the remaining storage space, and find out that the remaining storage space of the partition is insufficient.
  • the data partition is indicated at this time. The remaining storage space is not much. If a certain amount of data is written, the data partition may be filled, which may affect the normal operation of the application.
  • the storage space management device of the data partition further includes:
  • the system attribute module 40 is configured to: when detecting that the remaining storage space is less than a second preset threshold, set a value of the preset attribute to mark the remaining storage space of the data partition to be smaller than a second preset threshold;
  • the data reading and writing module 50 is configured to determine, according to the value of the preset attribute, whether the remaining storage space of the data partition is smaller than a second preset threshold, before each write to the data function is written to the data partition;
  • the data reading and writing module 50 is further configured to: if the remaining storage space is less than the second preset threshold, send the prompt information of the read/write abnormality to the application layer; and if the remaining storage space is greater than or equal to the second preset threshold, A write function is called to write data to the data partition.
  • This embodiment provides a preset attribute.
  • the preset attribute is sys.device.storage.low, and the default value is false.
  • the sys.device is used.
  • the value of .storage.low is set to true, that is, the current storage space is insufficient.
  • the system attribute module 40 sets the value of the preset attribute to The storage amount of the data partition is marked as being greater than or equal to the second predetermined threshold. That is, when it is detected that the remaining storage space is greater than or equal to the second preset threshold, the system attribute module 40 sets the value of sys.device.storage.low to false, that is, the current remaining storage space is sufficient.
  • the data read/write module 50 adds the value judgment of the preset attribute before each time the function Posix.write is called to write data to the partition. Determining, according to the value of the preset attribute, whether the remaining storage space of the current data partition is less than a second preset threshold. If the value of sys.device.storage.low is true, the data read/write module 50 sends a read/write exception to the application layer. If the value of sys.device.storage.low is false, the data read/write module 50 calls the function Posix.
  • the system attribute module 40 shares the shared memory. Therefore, for the data read/write module 50, the method for obtaining the preset attribute value determines whether the available space of the data partition is smaller than the second preset threshold than the direct calculation. The usable space of the data partition greatly improves efficiency.
  • a third embodiment of the storage space management apparatus of the data partition of the present invention is proposed based on the first embodiment or the second embodiment.
  • the storage space management device of the data partition further includes:
  • the state determining module 60 is configured to determine, when the remaining storage space is less than the second preset threshold, whether the system is currently in the state of completing the startup;
  • the system attribute module 40 is further configured to: if the system is currently in the state of completing the startup, set a value of the preset attribute to mark the remaining storage space of the data partition to be smaller than a second preset threshold.
  • the system attribute module 40 sets the preset attribute sys.device.storage.low by setting the value of the system attribute sys.boot_completed to indicate whether the system has been started. True, otherwise it is set to false.
  • the state judging module 60 will acquire the system before this.
  • the value of the attribute sys.boot_completed to determine whether the system is currently in the running state after the startup is completed.
  • the system property module 40 sets the preset attribute sys.device.storage.low.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

一种数据分区的存储空间管理方法及装置,所述方法包括:按照第一预设频率检测数据分区的剩余存储空间(S10);当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率(S20);当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,其中,所述第二预设阈值小于所述第一预设阈值(S30)。所述方法及装置能及时发现数据分区的存储空间不足,预防出现存储空间快速从不足到全满而导致应用无法正常运行的情况。

Description

数据分区的存储空间管理方法及装置
技术领域
本发明涉及数据存储技术领域,尤其涉及一种数据分区的存储空间管理方法及装置。
背景技术
android设备的分区包括系统分区,数据分区。数据分区用于存储各类用户数据与应用程序,是用户可以读写的。擦除这个分区,等同于恢复出厂设置,也就是android系统第一次启动时的状态,或者是最后一次安装官方或第三方ROM后的状态。一般需要对数据分区设定容量限额,并且防止黑客向数据分区非法写入数据,或者防止创建非法文件对数据分区进行恶意破坏。
因为运行中的android系统大部分用户操作的数据都会默认保存在数据分区,如新下载安装的应用数据、应用运行的缓存数据、应用下载的图片视频等文件,使数据分区容易被填满而导致android系统异常。各个应用可以都有检测数据分区可用空间的措施,但大多数情况下应用只是在进行下载任务之前检测一下数据分区的可用空间,并不会在下载过程中间歇的检测。当多个应用同时下载数据时,他们在下载前检测data可用空间都是够用的,但可能会出现多个应用同时下载时,数据分区被“填满”的问题。
android系统一般使用DSMS(Device Storage Monitor Service)服务来监测系统内部存储空间的状态,如果设备的剩余存储空间小于某一个阀值(默认是存储空间的10%,这个值可以设置)时将会向用户发送剩余空间不足的警告,让用户释放一些空间。下面以数据分区为例,说明一下这个流程:
DSMS每隔1分钟检测一下数据分区剩余空间的大小,当数据分区可用空间小于阀值(分区总大小的10%到500M之间)时,会自动进行一次清缓存的操作;清除缓存后再计算数据分区的可用空间,如果还是小于阀值,则会给通知栏发送一个警告通知,并发送ACTION_DEVICE_STORAGE_LOW广播。用户可以开启应用管理器,手动对各个应用数据进行清除以达到增加数据分区可用空间的目的,同时应用自身也可以监听ACTION_DEVICE_STORAGE_LOW广播来做一些特殊的处理,例如,Email应用接受到此广播时会停止当前的收发邮件的操作。DSMS服务检测到空间已满,会发送空间已满的广播;检测到剩余空间已经大于阀值,而之前发出过存储空间低或者空间不足的提示,会取消上述提示并发送ACTION_DEVICE_STORAGE_OK广播。如果这一分钟内下载的数据量非常大,有可能空间已满的广播还没有发出,数据分区就已经满了,导致应用无法正常运行。
发明内容
本发明提供一种数据分区的存储空间管理方法及装置,旨在及时发现数据分区的存储空间不足,预防出现存储空间快速从不足到全满而导致应用无法正常运行的情况。
为实现上述目的,本发明提供一种数据分区的存储空间管理方法,该数据分区的存储空间管理方法包括:
按照第一预设频率检测数据分区的剩余存储空间;
当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,其中,所述第二预设阈值小于所述第一预设阈值;
当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间;
当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
若系统当前处于完成启动的状态,则执行设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值的步骤;
所述按照第二预设频率检测数据分区中剩余存储空间的步骤之后,所述数据分区的存储空间管理方法还包括:
当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
为实现上述目的,本发明提供一种数据分区的存储空间管理方法,该数据分区的存储空间管理方法包括:
按照第一预设频率检测数据分区的剩余存储空间;
当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,其中,所述第二预设阈值小于所述第一预设阈值。
可选地,所述数据分区的存储空间管理方法还包括:
当检测到所述剩余存储空间小于第二预设阈值时,设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值;
在每次调用写函数向所述数据分区写入数据之前,根据所述预设属性的值判断所述数据分区的剩余存储空间是否小于第二预设阈值;
若剩余存储空间小于第二预设阈值,则向应用层发送读写异常的提示信息;
若剩余存储空间大于或者等于所述第二预设阈值,则调用写函数向所述数据分区写入数据。
可选地,所述数据分区的存储空间管理方法还包括:
当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
可选地,所述数据分区的存储空间管理方法还包括:
当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
若系统当前处于完成启动的状态,则执行设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值的步骤。
可选地,所述按照第二预设频率检测数据分区中剩余存储空间的步骤之后,所述数据分区的存储空间管理方法还包括:
当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
此外,为实现上述目的,本发明还提供一种数据分区的存储空间管理装置,该数据分区的存储空间管理装置包括:
分区监测模块,用于按照第一预设频率检测数据分区的剩余存储空间;
以及,当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
信息提示模块,用于当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息,其中,所述第二预设阈值小于所述第一预设阈值;
界面显示模块,用于当检测到所述剩余存储空间小于第二预设阈值时,显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
可选地,所述数据分区的存储空间管理装置还包括:
系统属性模块,用于当检测到所述剩余存储空间小于第二预设阈值时,设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值;
数据读写模块,用于在每次调用写函数向所述数据分区写入数据之前,根据所述预设属性的值判断所述数据分区的剩余存储空间是否小于第二预设阈值;以及 ,若剩余存储空间小于第二预设阈值,则向应用层发送读写异常的提示信息;若剩余存储空间大于或者等于所述第二预设阈值,则调用写函数向所述数据分区写入数据。
可选地,所述信息提示模块还用于:当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息;
所述界面显示模块还用于:当检测到所述剩余存储空间量小于第一预设阈值时,显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
可选地,所述数据分区的存储空间管理装置还包括:
状态判断模块,用于当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
所述系统属性模块还用于:若系统当前处于完成启动的状态,则设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值。
可选地,所述系统属性模块还用于:当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
本发明提出的数据分区的存储空间管理方法及装置,在向数据分区写入数据的过程中,按照一定的频率检测数据分区的剩余存储空间,当检测到剩余存储空间小于第一预设阈值时,增大检测数据分区中剩余存储空间的频率,优化检测剩余存储空间大小的频率,及早发现分区剩余存储空间不足的情况,当检测到剩余存储空间小于第二预设阈值时,说明此时数据分区的剩余存储空间已经不多,如果再有一定量的数据写入,可能会导致数据分区被写满,进而影响到应用的正常运行,因此,在检测到剩余存储空间小于第二预设阈值时,即发出警告信息,同时显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,能够预防出现存储空间快速从不足到全满而导致应用无法正常运行的情况。
附图说明
图1为本发明数据分区的存储空间管理方法第一实施例的流程图;
图2为本发明数据分区的存储空间管理方法第二实施例的流程图;
图3为本发明数据分区的存储空间管理装置第一实施例的功能模块示意图;
图4为本发明数据分区的存储空间管理装置第二实施例的功能模块示意图;
图5为本发明数据分区的存储空间管理装置第三实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种数据分区的存储空间管理方法。参照图1所示,为本发明数据分区的存储空间管理方法第一实施例的流程图。
在本实施例中,该数据分区的存储空间管理方法包括:
步骤S10,按照第一预设频率检测数据分区的剩余存储空间;
步骤S20,当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
本实施例提出的方法适用于具有智能操作系统的手机、平板电脑等移动终端,以下以安装有android操作系统的手机为例进行说明。该实施例提出的方法中的各个步骤可以由不同的功能模块来实现。
手机上安装有各种各样的应用,这些应用在运行过程中,会出现向数据分区,即手机的存储空间,写入数据的情况,例如下载图片、下载文件等。
定时地对数据分区的剩余存储空间的大小进行检测,例如,可以按照第一预设频率进行检测,当检测到剩余存储空间小于第一预设阈值时,认为当前的剩余存储空间已经不足,此时,用于检测剩余存储空间量的模块可以发送ACTION_DEVICE_STORAGE_LOW广播,以告知其他的功能模块,当前的存储空间已经不足,为了防止在写入数据的过程中发生空间已满导致应用运行出错,加快剩余存储空间的检测,即按照第二预设频率对数据分区的剩余存储空间进行检测。
一般情况下,第一预设阈值的大小可以根据手机的数据分区的总大小来设置,例如,可以设置为数据分区的总大小的10%到500M之间;第一预设频率可以是每40秒至1分钟检测一次,第二预设频率小于第一预设频率,例如,可以是每10-30秒检测一次。
步骤S30,当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,其中,所述第二预设阈值小于所述第一预设阈值。
当按照第二预设频率检测到剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息,以及应用数据管理界面,用户可以基于该应用该数据管理界面,清除应用数据,以释放存储空间,现有技术中,在通知栏发送警示信息,用户不容易注意到,本实施例提出的方式相对于现有的通知方式,能够使用户直观的看到空间已满的警告,并且快速地对应用数据进行清理,不需要用户再手动去开启数据管理应用,及时地进行数据的清理。
此时,用于检测剩余存储空间量的模块发送ACTION_DEVICE_STORAGE_NOT_FULL广播,以告知其他的功能模块,当前的存储空间已满。
本实施例中,第二预设阈值小于第一预设阈值,可选地,第二预设阈值为第一预设阈值的1/4。
进一步地,作为一种实施方式,在剩余存储空间不足时,发出存储空间不足的警告信息以及应用数据管理界面,此时,虽然剩余存储空间仍有余量,但是随着写数据的进行,余量会越来越小,为了使用户能够及早地对应用数据进行清理,以释放存储空间,在检测到剩余存储空间小于第一预设阈值时,显示存储空间不足的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清理以释放存储空间。
本实施例提出的数据分区的存储空间管理方法,在向数据分区写入数据的过程中,按照一定的频率检测数据分区的剩余存储空间,当检测到剩余存储空间小于第一预设阈值时,增大检测数据分区中剩余存储空间的频率,优化检测剩余存储空间大小的频率,及早发现分区剩余存储空间不足的情况,当检测到剩余存储空间小于第二预设阈值时,说明此时数据分区的剩余存储空间已经不多,如果再有一定量的数据写入,可能会导致数据分区被写满,进而影响到应用的正常运行,因此,在检测到剩余存储空间小于第二预设阈值时,即发出警告信息,同时显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,能够预防出现存储空间快速从不足到全满而导致应用无法正常运行的情况。
基于第一实施例提出本发明数据分区的存储空间管理方法的第二实施例。参照图2所示,在本实施例中,在步骤S10之后,该数据分区的存储空间管理方法还包括:
步骤S40,当检测到所述剩余存储空间小于第二预设阈值时,设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值;
步骤S50,在每次调用写函数向所述数据分区写入数据之前,根据所述预设属性的值判断所述数据分区的剩余存储空间是否小于第二预设阈值;
步骤S60,若剩余存储空间小于第二预设阈值,则向应用层发送读写异常的提示信息;
步骤S70,若剩余存储空间大于或者等于所述第二预设阈值,则调用写函数向所述数据分区写入数据。
本实施例的方法中提供一预设属性和一用于设置该预设属性的值的模块,可选地,该预设属性为sys.device.storage.low,其默认值为false,当检测到剩余存储空间小于第二预设阈值时,将sys.device.storage.low的值设置为true,即当前存储空间不足。
进一步地,由于用户对应用数据清理后,存储空间被释放,因此,当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。也就是说,在检测到剩余存储空间大于或者等于第二预设阈值时,将sys.device.storage.low的值设置为false,即当前剩余存储空间充足。
由于绝大部分的Android应用写文件都是通过FileOutputStream、OutputStreamWriter、FileWriter等java io类来实现的,而这些类最终会调用到IoBridge.java的write函数,对于用于向数据分区中写入数据的数据读写模块来说,在每次调用函数Posix.write往分区写数据时之前,增加对上述预设属性的值判断,根据该预设属性的值来判断当前的数据分区的剩余存储空间是否小于第二预设阈值。若sys.device.storage.low的值为true,则向应用层发送读写异常,若sys.device.storage.low的值为false,则调用函数Posix.write继续执行写操作。用于设置该预设属性的值的模块在设置属性值后,会分享至共享内存,因此,对于数据读写模块来说,使用获取预设属性值的方式判断数据分区可用空间是否小于第二预设阈值比直接计算数据分区的可用空间来说,极大地提高了效率。
基于第一实施例或者第二实施例提出本发明数据分区的存储空间管理方法的第三实施例。在本实施例中,在检测到剩余存储空间小于第二预设阈值时,判断系统是否处于完成启动状态;若系统当前处于完成启动的状态,则执行设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值的步骤。
本实施例中通过设置系统属性sys.boot_completed的值来表示系统是否已经启动完成,如果确认系统是在启动完成后的运行状态,则设置预设属性sys.device.storage.low为true,反之则置为false。
由于手机在写数据的过程中可能由于应用的设置等原因出现系统重新启动的情况,而设置预设属性的值则需要在系统启动完成,并且正常运行时,才能够进行设置,因此,在本实施中,在设置系统属性之前,无论是将sys.device.storage.low的值设置为true,还是将sys.device.storage.low的值设置为false,在此之前都会获取系统属性sys.boot_completed的值,以判断系统是否当前处于完成启动的后的运行状态。在确认系统是在启动完成后的运行状态时,再对预设属性sys.device.storage.low进行设置。
本发明还提出一种数据分区的存储空间管理装置。
参照图3所示,为本发明数据分区的存储空间管理装置第一实施例的功能模块示意图。
在该实施例中,该数据分区的存储空间管理装置包括:
分区监测模块10,用于按照第一预设频率检测数据分区的剩余存储空间;
以及,当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
本实施例提出的装置可以是具有智能操作系统的手机、平板电脑等移动终端,以下以安装有android操作系统的手机为例进行说明。该实施例提出的装置所包含的各个功能模块用于执行不同的功能。
手机上安装有各种各样的应用,这些应用在运行过程中,会出现向数据分区,即手机的存储空间,写入数据的情况,例如下载图片、下载文件等。分区监测模块10定时地对数据分区的剩余存储空间的大小进行检测,例如,可以按照第一预设频率进行检测,当检测到剩余存储空间小于第一预设阈值时,认为当前的剩余存储空间已经不足,此时,分区监测模块10可以发送ACTION_DEVICE_STORAGE_LOW广播,以告知其他的功能模块,当前的存储空间已经不足,为了防止在写入数据的过程中发生空间已满导致应用运行出错,加快剩余存储空间的检测,即按照第二预设频率对数据分区的剩余存储空间进行检测。
一般情况下,第一预设阈值的大小可以根据手机的数据分区的总大小来设置,例如,可以设置为数据分区的总大小的10%到500M之间;第一预设频率可以是每40秒至1分钟检测一次,第二预设频率小于第一预设频率,例如,可以是每10-30秒检测一次。
信息提示模块20,用于当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息,其中,所述第二预设阈值小于所述第一预设阈值;
界面显示模块30,用于当检测到所述剩余存储空间小于第二预设阈值时,显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
当按照第二预设频率检测到剩余存储空间小于第二预设阈值时,信息提示模块20显示存储空间已满的警告信息,界面显示模块30显示应用数据管理界面,用户可以基于该应用该数据管理界面,清除应用数据,以释放存储空间,现有技术中,在通知栏发送警示信息,用户不容易注意到,本实施例提出的方式相对于现有的通知方式,能够使用户直观的看到空间已满的警告,并且快速地对应用数据进行清理,不需要用户再手动去开启数据管理应用,及时地进行数据的清理。
此时,分区监测模块10发送ACTION_DEVICE_STORAGE_NOT_FULL广播,以告知其他的功能模块,当前的存储空间已满。
本实施例中,第二预设阈值小于第一预设阈值,可选地,第二预设阈值为第一预设阈值的1/4。
进一步地,作为一种实施方式,信息提示模块20在剩余存储空间不足时,发出存储空间不足的警告信息,界面显示模块30显示应用数据管理界面,此时,虽然剩余存储空间仍有余量,但是随着写数据的进行,余量会越来越小,为了使用户能够及早地对应用数据进行清理,以释放存储空间,在检测到剩余存储空间小于第一预设阈值时,显示存储空间不足的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清理以释放存储空间。
本实施例提出的数据分区的存储空间管理装置,在向数据分区写入数据的过程中,按照一定的频率检测数据分区的剩余存储空间,当检测到剩余存储空间小于第一预设阈值时,增大检测数据分区中剩余存储空间的频率,优化检测剩余存储空间大小的频率,及早发现分区剩余存储空间不足的情况,当检测到剩余存储空间小于第二预设阈值时,说明此时数据分区的剩余存储空间已经不多,如果再有一定量的数据写入,可能会导致数据分区被写满,进而影响到应用的正常运行,因此,在检测到剩余存储空间小于第二预设阈值时,即发出警告信息,同时显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,能够预防出现存储空间快速从不足到全满而导致应用无法正常运行的情况。
基于第一实施例提出本发明数据分区的存储空间管理装置的第二实施例。参照图4所示,在本实施例中,该数据分区的存储空间管理装置还包括:
系统属性模块40,用于当检测到所述剩余存储空间小于第二预设阈值时,设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值;
数据读写模块50,用于在每次调用写函数向所述数据分区写入数据之前,根据所述预设属性的值判断所述数据分区的剩余存储空间是否小于第二预设阈值;
数据读写模块50还用于:若剩余存储空间小于第二预设阈值,则向应用层发送读写异常的提示信息;以及,若剩余存储空间大于或者等于所述第二预设阈值,则调用写函数向所述数据分区写入数据。
本实施例提供一预设属性,可选地,该预设属性为sys.device.storage.low,其默认值为false,当检测到剩余存储空间小于第二预设阈值时,将sys.device.storage.low的值设置为true,即当前存储空间不足。
进一步地,由于用户对应用数据清理后,存储空间被释放,因此,当检测到所述剩余存储空间大于或者等于第二预设阈值时,系统属性模块40设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。也就是说,在检测到剩余存储空间大于或者等于第二预设阈值时,系统属性模块40将sys.device.storage.low的值设置为false,即当前剩余存储空间充足。
由于绝大部分的Android应用写文件都是通过FileOutputStream、OutputStreamWriter、FileWriter等java io类来实现的,而这些类最终会调用到IoBridge.java的write函数,数据读写模块50在每次调用函数Posix.write往分区写数据时之前,增加对上述预设属性的值判断,根据该预设属性的值来判断当前的数据分区的剩余存储空间是否小于第二预设阈值。若sys.device.storage.low的值为true,则数据读写模块50向应用层发送读写异常,若sys.device.storage.low的值为false,则数据读写模块50调用函数Posix.write继续执行写操作。系统属性模块40在设置属性值后,会分享至共享内存,因此,对于数据读写模块50来说,使用获取预设属性值的方式判断数据分区可用空间是否小于第二预设阈值比直接计算数据分区的可用空间来说,极大地提高了效率。
基于第一实施例或者第二实施例提出本发明数据分区的存储空间管理装置的第三实施例。参照图5所示,在本实施例中,该数据分区的存储空间管理装置还包括:
状态判断模块60,用于当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
系统属性模块40还用于:若系统当前处于完成启动的状态,则设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值。
本实施例中通过设置系统属性sys.boot_completed的值来表示系统是否已经启动完成,如果确认系统是在启动完成后的运行状态,则系统属性模块40设置预设属性sys.device.storage.low为true,反之则置为false。
由于手机在写数据的过程中可能由于应用的设置等原因出现系统重新启动的情况,而设置预设属性的值则需要在系统启动完成,并且正常运行时,才能够进行设置,因此,在本实施中,在设置系统属性之前,无论是将sys.device.storage.low的值设置为true,还是将sys.device.storage.low的值设置为false,在此之前状态判断模块60都会获取系统属性sys.boot_completed的值,以判断系统是否当前处于完成启动的后的运行状态。在确认系统是在启动完成后的运行状态时,系统属性模块40再对预设属性sys.device.storage.low进行设置。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (17)

  1. 一种数据分区的存储空间管理方法,其特征在于,所述数据分区的存储空间管理方法包括:
    按照第一预设频率检测数据分区的剩余存储空间;
    当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
    当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,其中,所述第二预设阈值小于所述第一预设阈值;
    当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间;
    当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
    若系统当前处于完成启动的状态,则执行设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值的步骤;
    所述按照第二预设频率检测数据分区中剩余存储空间的步骤之后,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
  2. 一种数据分区的存储空间管理方法,其特征在于,所述数据分区的存储空间管理方法包括:
    按照第一预设频率检测数据分区的剩余存储空间;
    当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
    当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间,其中,所述第二预设阈值小于所述第一预设阈值。
  3. 根据权利要求2所述的数据分区的存储空间管理方法,其特征在于,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间小于第二预设阈值时,设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值;
    在每次调用写函数向所述数据分区写入数据之前,根据所述预设属性的值判断所述数据分区的剩余存储空间是否小于第二预设阈值;
    若剩余存储空间小于第二预设阈值,则向应用层发送读写异常的提示信息;
    若剩余存储空间大于或者等于所述第二预设阈值,则调用写函数向所述数据分区写入数据。
  4. 根据权利要求2所述的数据分区的存储空间管理方法,其特征在于,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
  5. 根据权利要求3所述的数据分区的存储空间管理方法,其特征在于,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息以及应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
  6. 根据权利要求3所述的数据分区的存储空间管理方法,其特征在于,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
    若系统当前处于完成启动的状态,则执行设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值的步骤。
  7. 根据权利要求4所述的数据分区的存储空间管理方法,其特征在于,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
    若系统当前处于完成启动的状态,则执行设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值的步骤。
  8. 根据权利要求3所述的数据分区的存储空间管理方法,其特征在于,所述按照第二预设频率检测数据分区中剩余存储空间的步骤之后,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
  9. 根据权利要求4所述的数据分区的存储空间管理方法,其特征在于,所述按照第二预设频率检测数据分区中剩余存储空间的步骤之后,所述数据分区的存储空间管理方法还包括:
    当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
  10. 一种数据分区的存储空间管理装置,其特征在于,所述数据分区的存储空间管理装置包括:
    分区监测模块,用于按照第一预设频率检测数据分区的剩余存储空间;
    以及,当检测到所述剩余存储空间小于第一预设阈值时,按照第二预设频率检测数据分区中剩余存储空间,其中,所述第二预设频率大于所述第一预设频率;
    信息提示模块,用于当检测到所述剩余存储空间小于第二预设阈值时,显示存储空间已满的警告信息,其中,所述第二预设阈值小于所述第一预设阈值;
    界面显示模块,用于当检测到所述剩余存储空间小于第二预设阈值时,显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
  11. 根据权利要求10所述的数据分区的存储空间管理装置,其特征在于,所述数据分区的存储空间管理装置还包括:
    系统属性模块,用于当检测到所述剩余存储空间小于第二预设阈值时,设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值;
    数据读写模块,用于在每次调用写函数向所述数据分区写入数据之前,根据所述预设属性的值判断所述数据分区的剩余存储空间是否小于第二预设阈值;以及 ,若剩余存储空间小于第二预设阈值,则向应用层发送读写异常的提示信息;若剩余存储空间大于或者等于所述第二预设阈值,则调用写函数向所述数据分区写入数据。
  12. 根据权利要求10所述的数据分区的存储空间管理装置,其特征在于,所述信息提示模块还用于:当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息;
    所述界面显示模块还用于:当检测到所述剩余存储空间量小于第一预设阈值时,显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
  13. 根据权利要求11所述的数据分区的存储空间管理装置,其特征在于,所述信息提示模块还用于:当检测到所述剩余存储空间量小于第一预设阈值时,显示存储空间不足的警告信息;
    所述界面显示模块还用于:当检测到所述剩余存储空间量小于第一预设阈值时,显示应用数据管理界面,以供用户基于所述应用数据管理界面进行数据清除以释放存储空间。
  14. 根据权利要求11所述的数据分区的存储空间管理装置,其特征在于,所述数据分区的存储空间管理装置还包括:
    状态判断模块,用于当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
    所述系统属性模块还用于:若系统当前处于完成启动的状态,则设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值。
  15. 根据权利要求12所述的数据分区的存储空间管理装置,其特征在于,所述数据分区的存储空间管理装置还包括:
    状态判断模块,用于当检测到所述剩余存储空间小于第二预设阈值时,判断系统当前是否处于完成启动的状态;
    所述系统属性模块还用于:若系统当前处于完成启动的状态,则设置预设属性的值,以将所述数据分区的剩余存储空间标记为小于第二预设阈值。
  16. 根据权利要求11所述的数据分区的存储空间管理装置,其特征在于,所述系统属性模块还用于:当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
  17. 根据权利要求12所述的数据分区的存储空间管理装置,其特征在于,所述系统属性模块还用于:当检测到所述剩余存储空间大于或者等于第二预设阈值时,设置所述预设属性的值,以将所述数据分区的存储量标记为大于或者等于所述第二预设阈值。
PCT/CN2016/112266 2016-08-12 2016-12-27 数据分区的存储空间管理方法及装置 Ceased WO2018028121A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610665783.4A CN106354601A (zh) 2016-08-12 2016-08-12 数据分区的存储空间管理方法及装置
CN201610665783.4 2016-08-12

Publications (1)

Publication Number Publication Date
WO2018028121A1 true WO2018028121A1 (zh) 2018-02-15

Family

ID=57843908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/112266 Ceased WO2018028121A1 (zh) 2016-08-12 2016-12-27 数据分区的存储空间管理方法及装置

Country Status (2)

Country Link
CN (1) CN106354601A (zh)
WO (1) WO2018028121A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710489A (zh) * 2018-12-17 2019-05-03 北京无线电计量测试研究所 一种实时监测电脑存储空间状态的系统和方法
CN115988271A (zh) * 2022-12-12 2023-04-18 阿里巴巴(中国)有限公司 视频播放方法、数据处理方法及电子设备

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951195A (zh) * 2017-04-07 2017-07-14 上海联影医疗科技有限公司 医学成像系统的存储容量的处理方法以及医学成像系统
CN107182151A (zh) * 2017-07-25 2017-09-19 安徽荣旭信息科技有限公司 一种具有语音识别的发电厂灯具控制系统
CN107948671A (zh) * 2017-11-23 2018-04-20 莫宝兰 一种流媒体传输控制装置和方法
CN108121783A (zh) * 2017-12-19 2018-06-05 深圳创维数字技术有限公司 一种存储数据的自动清理方法、装置、计算机和存储介质
CN108282690A (zh) * 2018-01-26 2018-07-13 广东欧珀移动通信有限公司 一种网络视频下载方法、装置和计算机可读存储介质
CN108959597A (zh) * 2018-07-12 2018-12-07 深圳Tcl新技术有限公司 用户空间保护方法、装置、设备和显示终端存储介质
CN113296681B (zh) * 2020-02-24 2024-07-26 合肥杰发科技有限公司 存储空间的管理方法、终端及具有存储功能的装置
CN111970678B (zh) * 2020-08-06 2023-04-28 Oppo(重庆)智能科技有限公司 抓取空口数据包的方法、装置、电子设备及存储介质
CN112182652B (zh) * 2020-09-27 2021-10-08 广州朗国电子科技有限公司 保护数据分区不被写满方法、装置、存储介质及终端设备
CN114297635B (zh) * 2021-12-24 2025-02-07 奇安盘古(上海)信息技术有限公司 基于移动存储设备的取证方法、装置及电子设备
CN115562867B (zh) * 2022-10-18 2025-09-05 厦门四信通信科技有限公司 一种人脸识别设备及其内存清理方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447207A (zh) * 2008-12-30 2009-06-03 深圳华为通信技术有限公司 一种媒体录制方法及装置
US20130326146A1 (en) * 2012-05-30 2013-12-05 Toshiba Solutions Corporation Information processing apparatus, memory apparatus, and data management method
CN103577348A (zh) * 2013-10-09 2014-02-12 广东欧珀移动通信有限公司 自动统计应用缓存大小及提醒用户的方法和移动设备
CN104035769A (zh) * 2014-05-30 2014-09-10 北京金山安全软件有限公司 一种空间不足的处理方法及装置
CN104850487A (zh) * 2015-04-27 2015-08-19 小米科技有限责任公司 信息显示方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447207A (zh) * 2008-12-30 2009-06-03 深圳华为通信技术有限公司 一种媒体录制方法及装置
US20130326146A1 (en) * 2012-05-30 2013-12-05 Toshiba Solutions Corporation Information processing apparatus, memory apparatus, and data management method
CN103577348A (zh) * 2013-10-09 2014-02-12 广东欧珀移动通信有限公司 自动统计应用缓存大小及提醒用户的方法和移动设备
CN104035769A (zh) * 2014-05-30 2014-09-10 北京金山安全软件有限公司 一种空间不足的处理方法及装置
CN104850487A (zh) * 2015-04-27 2015-08-19 小米科技有限责任公司 信息显示方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710489A (zh) * 2018-12-17 2019-05-03 北京无线电计量测试研究所 一种实时监测电脑存储空间状态的系统和方法
CN115988271A (zh) * 2022-12-12 2023-04-18 阿里巴巴(中国)有限公司 视频播放方法、数据处理方法及电子设备

Also Published As

Publication number Publication date
CN106354601A (zh) 2017-01-25

Similar Documents

Publication Publication Date Title
WO2013131444A1 (zh) 分享内容的方法、终端、服务器及系统、计算机存储介质
WO2018053963A1 (zh) 智能电视的系统升级方法及装置
WO2015135443A1 (en) Method and apparatus for simulating sound in virtual scenario, and terminal
WO2018233370A1 (zh) 镜像同步方法、系统、设备及计算机可读存储介质
WO2017190450A1 (zh) 进程关闭方法及装置
WO2018223418A1 (zh) 一种显示面板检测方法、装置及系统
WO2017092268A1 (zh) 终端故障处理方法、装置及系统
WO2017219485A1 (zh) 智能电视及其控制方法
WO2017063368A1 (zh) 视频广告的插播方法及装置
WO2013143341A1 (zh) 一种更新移动终端的应用信息的方法及装置
WO2017063366A1 (zh) 应用启动方法和系统
WO2017036204A1 (zh) 应用程序切换时的焦点定位方法及装置
WO2018126888A1 (zh) 电视功能的快捷启动设置方法及装置
WO2019205272A1 (zh) 虚拟机服务提供方法、装置、设备及计算机可读存储介质
WO2017206601A1 (zh) 客户端数据处理方法及装置
WO2017215233A1 (zh) 一种终端电源键控制方法及系统
WO2017121066A1 (zh) 应用程序显示方法和系统
WO2019061530A1 (zh) 显示器自动调节亮度的方法、装置及存储介质
WO2019061042A1 (zh) 曝光补偿的方法、装置及计算机可读存储介质
WO2019019249A1 (zh) 执行网络请求的方法、装置、设备及计算机可读存储介质
WO2017059686A1 (zh) 桌面显示方法及装置
WO2019062109A1 (zh) 磁盘阵列的挂载方法、Android设备和存储介质
WO2019085301A1 (zh) 座机未接来电的反馈方法、装置、设备及可读存储介质
WO2017206877A1 (zh) 一种唤醒锁的释放方法、装置、存储介质及电子设备
WO2017024870A1 (zh) 唤醒待机电视的方法及装置

Legal Events

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

Ref document number: 16912574

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.07.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16912574

Country of ref document: EP

Kind code of ref document: A1