WO2023019691A1 - 存储设备及其数据回收方法、控制设备及可读存储介质 - Google Patents

存储设备及其数据回收方法、控制设备及可读存储介质 Download PDF

Info

Publication number
WO2023019691A1
WO2023019691A1 PCT/CN2021/121090 CN2021121090W WO2023019691A1 WO 2023019691 A1 WO2023019691 A1 WO 2023019691A1 CN 2021121090 W CN2021121090 W CN 2021121090W WO 2023019691 A1 WO2023019691 A1 WO 2023019691A1
Authority
WO
WIPO (PCT)
Prior art keywords
control device
data
data recovery
instruction
storage device
Prior art date
Application number
PCT/CN2021/121090
Other languages
English (en)
French (fr)
Inventor
李中政
郭丹
Original Assignee
深圳市江波龙电子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市江波龙电子股份有限公司 filed Critical 深圳市江波龙电子股份有限公司
Publication of WO2023019691A1 publication Critical patent/WO2023019691A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present application relates to the technical field of electronic equipment, in particular to storage equipment and its data recovery method, control equipment and readable storage medium.
  • Electronic devices are often used in conjunction with storage devices. While in use, junk data is generated in the storage device. Some are fragmented data, such as randomly written data; some are invalid data, such as deleted files. Limited by capacity and algorithms, when there is a certain amount of junk data in the storage device, the storage device has to "recycle” the junk data to sort out enough space for the subsequent use of electronic devices. When the storage device recovers data, it is often unable to respond to the storage requirements of the electronic device in time, which will cause the electronic device to "stuck", resulting in a decline in the overall performance of the electronic device.
  • the technical problem mainly solved by this application is to provide a storage device and its data recovery method, a control device and a readable storage medium, which can increase the association between the control device and the storage device, improve the effect of data recovery of the storage device, and further improve the efficiency of the control device. performance.
  • a technical solution adopted by this application is to provide a method for recovering data from a storage device, the storage device is connected to a control device, the method is applied to the control device, and the method includes: acquiring status information of the control device; Wherein, the status information includes at least one of the current time, charging status, battery status, screen status and standby status of the control device; a data recycling instruction is generated based on the status information; and the data recycling instruction is sent to the storage device, so that the storage device Data recycling is done internally.
  • obtaining the state information of the control device includes: obtaining the current time of the control device; generating a data recovery instruction based on the state information, including: generating a data recovery instruction if the current time is within a preset time range.
  • obtaining the state information of the control device includes: obtaining the charging state of the control device; generating a data recycling instruction based on the state information, including: generating a data recycling instruction if the charging state is charging.
  • generating a data recovery instruction includes: if the charging state is charging, obtaining the power state of the control device; when the power state satisfies a preset condition, generating a data recovery command.
  • obtaining the state information of the control device includes: obtaining the screen state of the control device; generating a data recovery instruction based on the state information, including: generating a data recovery instruction if the screen state is off.
  • the method further includes: using the trained recovery model to predict the storage space for data recovery; and generating a data recovery instruction based on the storage space.
  • the method further includes: responding to the user operation instruction, generating a data recycling termination instruction; sending the data recycling termination instruction to the storage device, so that the storage device terminates the data recycling internally, and responding to the user operation instruction.
  • another technical solution adopted by this application is to provide a method for recovering data from a storage device, the storage device is connected to a control device, the method is applied to a storage device, and the method includes: receiving data sent by the control device Recycling instruction; wherein, the data recycling instruction is generated by the control device based on status information, and the status information includes at least one of the current time, charging status, power status and screen status of the controlling device; data recycling is performed internally based on the data recycling instruction .
  • control device which is used to connect to a storage device, and the control device includes a processor and a memory coupled to the processor; wherein, the memory is used to store A computer program, the processor is used to execute the computer program, so as to realize the method applied to the control device provided by the above technical solution.
  • another technical solution adopted by this application is to provide a storage device, which is used to connect to a control device, and the storage device includes a processor and a storage array coupled with the processor; wherein, the storage array uses In order to store the computer program, the processor is used to execute the computer program, so as to implement the method applied to the storage device provided by the above technical solution.
  • another technical solution adopted by the present application is to provide a computer-readable storage medium, which is used to store a computer program.
  • the computer program is executed by a processor, it is used to realize the above-mentioned The method provided by any one of the technical solutions.
  • the present application provides a storage device, a data recovery method, a control device and a readable storage medium.
  • the storage device is connected to the control device, and the method is applied to the control device.
  • the method obtains at least one of the current time, charging state, power state, screen state, and standby state of the control device, and then generates a data recycling instruction, and the
  • the data recovery command is sent to the storage device so that the storage device can perform data recovery internally, so that the control device can flexibly control the timing of the storage device's data recovery, increase the association between the control device and the storage device, and improve the data storage capacity of the storage device.
  • the effect of recovery thereby improving the performance of the control equipment.
  • FIG. 1 is a schematic flowchart of an embodiment of a method for recovering data from a storage device provided by the present application
  • FIG. 2 is a schematic flow diagram of another embodiment of a data recovery method for a storage device provided by the present application
  • FIG. 3 is a schematic flow diagram of another embodiment of the method for recovering data from a storage device provided by the present application
  • FIG. 4 is a schematic flow diagram of another embodiment of the method for recovering data from a storage device provided by the present application.
  • FIG. 5 is a schematic flowchart of another embodiment of a data recovery method for a storage device provided by the present application.
  • Fig. 6 is a schematic flow chart of another embodiment of the method for recovering data from a storage device provided by the present application.
  • FIG. 7 is a schematic flowchart of another embodiment of the method for recovering data from a storage device provided by the present application.
  • Fig. 8 is a schematic flowchart of another embodiment of the method for recovering data from a storage device provided by the present application.
  • Fig. 9 is a schematic structural diagram of an embodiment of a control device provided by the present application.
  • FIG. 10 is a schematic structural diagram of an embodiment of a storage device provided by the present application.
  • Fig. 11 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application.
  • Products such as smartphones, tablets, smart TVs, and smart cars are electronic devices that are heavily used almost every day. While in use, garbage data is generated. Some are fragmented data, such as randomly written data; some are invalid data, such as deleted files. Limited by capacity and algorithms, when there is a certain amount of junk data in the storage device, the storage device has to "recycle” the junk data to sort out enough space for the subsequent use of electronic devices. When storage devices recover data, they are often unable to respond to the storage needs of electronic devices in a timely manner, which will cause the device to "stuck" and lead to a decline in the overall performance of electronic devices.
  • the storage device can only recycle according to its own algorithm logic, and cannot notify the processor of the Android smartphone in advance, nor can it know how useful the continuous storage space reclaimed by the storage device is for the next operation. Based on this, the present application proposes the following technical solutions to solve at least one of the above problems.
  • FIG. 1 is a schematic flowchart of an embodiment of a method for recovering data from a storage device provided by the present application.
  • the storage device is connected to the control device, the method is applied to the control device, and the method includes:
  • Step 11 Obtain status information of the control device.
  • the state information includes at least one state of the current time, charging state, power state, screen state and standby state of the control device.
  • the state information of the control device may also include the running state, power-on state or power-off state of the control device.
  • the running state may include a power saving state, a normal state, a standby state or a dormant state, and the like.
  • the storage device and the control device may be integrated, or externally connected through corresponding connection ports. If the storage device is a mobile hard disk.
  • Step 12 Generate a data recovery instruction based on the state information.
  • the control device acquires the current time, and if the current time is within a preset time range, generates a data recycling instruction. For example, the current time is 2:00 am, and the preset time range is 1:00 am to 3:00 am, then the current time is within the preset time range, and a data recovery instruction is generated.
  • control device obtains the power-on state. At this time, since the control device has just been powered on, the user will not use it immediately, so after the power-on is completed, a data recovery instruction is generated.
  • the control device acquires the power-off state. At this time, because the control device is about to be shut down, it means that the user will not use the control device.
  • a data recovery instruction is synchronously generated. And the shutdown time can be extended so that the storage device has enough time to recover data internally.
  • the control device acquires a standby state, which refers to a state in which electronic devices such as mobile phones or computers are powered on but do not perform any substantive work. At this time, it means that the user is not using the control device, then a data recovery instruction may be generated, and step 13 is executed.
  • Step 13 Send the data reclamation instruction to the storage device, so that the storage device performs data reclamation internally.
  • the storage device after receiving the data reclamation instruction, the storage device will determine the invalid storage blocks in the storage array, and directly perform an erase operation on the invalid storage blocks, so that these erased invalid storage blocks can be rewritten input data.
  • the storage device determines the storage blocks that can be reclaimed in the storage array. For example, in a storage device based on a flash memory architecture, data is usually stored in units of pages, and a storage block contains several pages. Therefore, when the number of invalid pages in a storage block increases, the storage block still occupies storage space , and too much invalid data is stored, this storage block should be recycled. At this time, it is necessary to determine the valid pages in the storage block, and migrate the data in the valid pages. Then, the valid pages become invalid pages. At this time, the storage block can be erased. After erasing, it is equivalent to these storage blocks. Blocks are recycled.
  • a data recycling instruction is generated, and the data recycling instruction is sent to the storage device, so that the storage
  • the internal data recovery method of the device enables the control device to flexibly control the timing of data recovery of the storage device, increases the association between the control device and the storage device, improves the effect of data recovery of the storage device, and then improves the performance of the control device.
  • FIG. 2 is a schematic flowchart of another embodiment of a method for recovering data from a storage device provided in the present application.
  • the method includes:
  • Step 21 Obtain the current time of the control device.
  • the control device usually has a built-in time module, and the time module can synchronize the time through the network.
  • Step 22 If the current time is within the preset time range, generate a data recovery instruction.
  • a data recovery instruction is generated.
  • the control device In an application scenario, if the current time is within the preset time range, but the control device is still running normally, it is not suitable to perform data recovery at this time, and data recovery will affect the operation of the control device. Therefore, when the current time is within the preset time range, it is also necessary to acquire the running state of the control device, and generate a data recovery instruction when the running state meets the preset condition. If the running state is the dormant state, a data recovery instruction is generated. When the operating state is the standby state, a data recovery command is generated.
  • Step 23 Send the data reclamation instruction to the storage device, so that the storage device performs data reclamation internally.
  • a data recovery command is generated and the data recovery command is sent to the storage device, so that the storage device performs data recovery internally, Enable the control device to control the storage device for data recovery at a reasonable time, increase the association between the control device and the storage device, reduce the situation where the storage device performs data recovery and the user operates the control device synchronously, and improve the effect of data recovery of the storage device. This improves the performance of the control device.
  • FIG. 3 is a schematic flowchart of another embodiment of a data recovery method for a storage device provided in the present application. The method includes:
  • Step 31 Obtain the charging state of the control device.
  • control device and the storage device are set integrally, and a rechargeable battery is set in the control device.
  • the control device can detect if it is plugged into a charger to charge the battery.
  • Step 32 If the charging state is charging, generate a data recovery instruction.
  • the user In the charging state, the user usually does not use the control device, so a data recovery instruction is generated.
  • step 32 can be as follows:
  • Step 321 If the charging state is charging, acquire the power state of the control device.
  • the power state can be set in grades, less than 20% is determined as a low power state, and 20% to 80% is determined as a normal power state. Higher than 80 percent is determined to be a high battery state.
  • Step 322 Generate a data recovery instruction when the power state satisfies a preset condition.
  • the preset condition is set to a normal power state or a high power state, and if the power state of the control device is in a normal power state or a high power state at this time, a data recovery instruction is generated. If the power state of the control device is low power state at this time, the charging state of the control device can be reacquired after a preset time, if the charging state at this time is charging, and the power state of the control device is a normal power state or In a high battery state, a data reclamation command is generated.
  • Step 33 Send the data reclamation instruction to the storage device, so that the storage device performs data reclamation internally.
  • the control device by acquiring the charging state of the control device, if the charging state is charging, a data recovery command is generated, and the data recovery command is sent to the storage device, so that the storage device performs data recovery internally, so that the control device It can control the storage device for data recovery in a reasonable state, increase the association between the control device and the storage device, reduce the situation that the storage device performs data recovery and the user synchronously operates the control device, and improves the effect of data recovery of the storage device, thereby improving Control device performance.
  • FIG. 5 is a schematic flowchart of another embodiment of a data recovery method for a storage device provided in the present application. The method includes:
  • Step 51 Get the screen status of the control device.
  • control device has a display screen, and the user can touch the display screen to operate the application programs displayed on the display screen.
  • the screen status can indicate whether the control device is currently being operated by the user. For example, if the screen status is bright, the control device is operated by the user with a high probability. For example, if the screen state is off, and there is no display on the display in the off state, it means that the user does not need to use the control device at this time, and the control device cannot respond to the operation even if the screen is off, then step 52 can be performed.
  • Step 52 If the screen status is off, generate a data recovery instruction.
  • step 52 may further need to obtain the operating status of the control device, and generate a data recovery instruction when the operating status meets the preset conditions. For example, when the screen state is off and the running state is obtained as the standby state, a data recovery instruction is generated.
  • control device usually sets a screen saver for the display screen, and when the acquired screen state of the control device is a screen saver, indicating that the user is not using the control device, a data recovery instruction is generated.
  • Step 53 Send the data reclamation instruction to the storage device, so that the storage device performs data reclamation internally.
  • the solution of any of the above embodiments can be combined with other embodiments, for example, when the current time is within the preset time range, obtain the screen status of the control device, and if the screen status is off, generate data recovery instruction. At this time, it can be confirmed that the control device has not been operated by the user, and data recovery of the storage device can be performed. For another example, when the current time is within the preset time range, the power status of the control device is acquired, and when the power status satisfies the preset condition, a data recovery instruction is generated. At this point, it can be confirmed that the control device has sufficient power to support the storage device for data recovery.
  • FIG. 6 is a schematic flowchart of another embodiment of a method for recovering data from a storage device provided in the present application.
  • the method includes:
  • Step 61 Use the trained recovery model to predict the storage space for data recovery.
  • the recovery model can be trained by the control device according to the user's daily operating habits, so that the recovery model can estimate the user's daily average data write volume and maximum data write volume to the storage device, thereby estimating the time required for data recovery. storage.
  • the parameters of the recycling model can be dynamically updated according to the user's daily operating habits, so that the storage space predicted by the recycling model each time is more in line with the user's recent operating habits.
  • the recycling model is trained on the operating habits of 3 consecutive days, and it is explained from Monday to Sunday: on Thursday, the recycling model is trained using the user's operating habits from Monday to Wednesday, and then predicts the storage space that needs to be recycled on Thursday.
  • the reclamation model is trained using user operating habits from Tuesday to Thursday, and then predicts the storage space that needs to be reclaimed on Friday. In this way, the storage space predicted each time by the recovery model can be more in line with the user's recent operating habits.
  • Step 62 Generate a data reclamation instruction based on the storage space.
  • the control device may incorporate the size of the storage space into the data reclamation instruction.
  • Step 63 Send the data reclamation instruction to the storage device, so that the storage device performs data reclamation internally.
  • the storage device When the storage device receives the data recycling instruction, it parses it, so as to obtain the size of the storage space.
  • the storage device internally reclaims data according to the size of the storage space, so as to reclaim the storage space corresponding to the size of the storage space.
  • reclaimed storage space may be contiguous.
  • the storage device receives the data reclamation instruction, it determines from the storage blocks that it needs to reclaim the storage blocks continuously, and then performs data migration on the valid data in these storage blocks, and erases these storage blocks after the migration, and these storage blocks are continuously recovered after erasing.
  • the storage block can be used as the storage space when the control device writes data.
  • the control device predicts the storage space that the storage device needs to recover, and then enables the storage device to perform data recovery at one time, reduces the number of data recovery, improves the effect of data recovery of the storage device, and then improves the performance of the control device and the service life of the storage device.
  • FIG. 7 is a schematic flow chart of another embodiment of the method for recovering data from a storage device provided by the present application. The method includes:
  • Step 71 Generate a data recovery termination instruction in response to the user operation instruction.
  • Step 72 Send the data reclamation termination instruction to the storage device, so that the storage device terminates the data reclamation internally and responds to the user operation instruction.
  • the problem of the storage device can be solved.
  • the problem of performing data recovery and synchronously operating the control device by the user enables the storage device to respond to user operation instructions first, reduces the bandwidth occupation of the storage device due to data recovery, and improves user experience.
  • FIG. 8 is a schematic flowchart of another embodiment of a data recovery method for a storage device provided in the present application.
  • the storage device is connected to the control device, the method is applied to the storage device, and the method includes:
  • Step 81 Receive a data recycling instruction sent by the control device.
  • the data recovery instruction is generated by the control device based on state information, and the state information includes at least one state of the control device's current time, charging state, power state, and screen state.
  • control device For the manner in which the control device generates the data recovery instruction, reference may be made to any of the above-mentioned embodiments, and details are not repeated here.
  • Step 82 Internally perform data reclamation based on the data reclamation instruction.
  • the storage device during data reclamation by the storage device, if a data reclamation termination instruction is received, the storage device internally terminates data reclamation and responds to a user operation instruction. After responding to the user operation instruction, data recovery is performed again.
  • the storage device by receiving the data recycling instruction sent by the control device; wherein, the data recycling instruction is generated by the control device based on state information, and the state information includes at least one of the current time, charging state, power state and screen state of the control device A state; based on the data recovery command to perform data recovery internally, the storage device can be flexibly controlled by the control device to perform data recovery timing, increase the association between the control device and the storage device, and improve the effect of data recovery of the storage device , thereby improving the performance of the control device.
  • FIG. 9 is a schematic structural diagram of an embodiment of a control device provided in the present application.
  • the control device 90 is used to connect a storage device, and the control device 90 includes a processor 91 and a memory 92 coupled to the processor 91; wherein the memory 92 is used to store a computer program, and the processor 91 is used to execute the computer program to achieve the following method:
  • state information of the control device wherein the state information includes at least one state of the current time, charging state, power state and screen state of the control device; generating a data recycling instruction based on the state information; sending the data recycling instruction to the storage device, In order for the storage device to perform data reclamation internally.
  • processor 91 is also configured to execute a computer program, so as to implement the method provided by any of the foregoing embodiments.
  • control device 90 may be an electronic device capable of interacting with storage devices.
  • storage devices for example, smart phones, smart cameras, communication modules, security monitoring equipment, tablet computers, notebook computers, smart players, copyright distribution equipment, etc.
  • FIG. 10 is a schematic structural diagram of an embodiment of a storage device provided in the present application.
  • the storage device 100 is used to connect to the control device, and the storage device 100 includes a processor 101 and a storage array 102 coupled to the processor 101; wherein the storage array 102 is used to store computer programs, and the processor 101 is used to execute the computer programs to Implement the following methods:
  • processor 101 is further configured to execute a computer program, so as to implement the method provided by any of the foregoing embodiments.
  • FIG. 11 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application.
  • the computer-readable storage medium 110 is used to store a computer program 111, and when the computer program 111 is executed by a processor, it is used to implement the following methods:
  • state information of the control device wherein the state information includes at least one state of the current time, charging state, power state and screen state of the control device; generating a data recycling instruction based on the state information; sending the data recycling instruction to the storage device, so that the storage device performs data reclamation internally;
  • the present application provides a storage device, a data recovery method, a control device, and a readable storage medium.
  • the control device can flexibly control the timing of data recovery by the storage device, increase the association between the control device and the storage device, improve the effect of data recovery of the storage device, and then improve the performance of the control device .
  • any one of the above embodiments can effectively reduce the proportion of garbage data in the storage device, which is beneficial for the storage device in the control device to sort out a continuous storage space, so as to improve the overall performance.
  • the disclosed methods and devices may be implemented in other ways.
  • the device implementation described above is only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated units in the above other embodiments are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods described in various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Power Sources (AREA)

Abstract

本申请公开了存储设备及其数据回收方法、控制设备及可读存储介质。该存储设备与控制设备连接,该方法应用于控制设备,该方法包括:获取控制设备的状态信息;其中,状态信息包括控制设备的当前时间、充电状态、电量状态、屏幕状态和待机状态中的至少一种状态;基于状态信息生成数据回收指令;将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。通过上述方式,能够增加控制设备和存储设备之间的关联,提升存储设备的数据回收的效果,进而提高控制设备的性能。

Description

存储设备及其数据回收方法、控制设备及可读存储介质
本申请要求申请号为202110961541.0的中国专利申请的优先权,其内容通过引用结合在本申请中。
【技术领域】
本申请涉及电子设备技术领域,特别是涉及存储设备及其数据回收方法、控制设备及可读存储介质。
【背景技术】
电子设备通常与存储设备结合使用。在使用的同时,存储设备中会产生垃圾数据。部分是零碎的数据,例如随机写入的数据;部分是已经无效的数据,例如被删除的文件。受容量和算法限制,当存储设备中的垃圾数据多到一定程度时,存储设备就不得不“回收”垃圾数据,整理出足够多的空间供电子设备后续使用。存储设备在做数据回收时,往往无法及时响应电子设备的存储需求,会造成电子设备“卡顿”,从而导致电子设备的整体性能下降。
【发明内容】
本申请主要解决的技术问题是提供存储设备及其数据回收方法、控制设备及可读存储介质,能够增加控制设备和存储设备之间的关联,提升存储设备的数据回收的效果,进而提高控制设备的性能。
为了解决上述问题,本申请采用的一种技术方案是提供一种存储设备的数据回收方法,该存储设备与控制设备连接,该方法应用于控制设备,该方法包括:获取控制设备的状态信息;其中,状态信息包括控制设备的当前时间、充电状态、电量状态、屏幕状态和待机状态中的至少一种状态;基于状态信息生成数据回收指令;将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。
其中,获取控制设备的状态信息,包括:获取控制设备的当前时间;基于状态信息生成数据回收指令,包括:若当前时间在预设时间范围内, 生成数据回收指令。
其中,获取控制设备的状态信息,包括:获取控制设备的充电状态;基于状态信息生成数据回收指令,包括:若充电状态为充电中,生成数据回收指令。
其中,若充电状态为充电中,生成数据回收指令,包括:若充电状态为充电中,获取控制设备的电量状态;在电量状态满足预设条件时,生成数据回收指令。
其中,获取控制设备的状态信息,包括:获取控制设备的屏幕状态;基于状态信息生成数据回收指令,包括:若屏幕状态为熄屏,生成数据回收指令。
其中,该方法还包括:利用已训练的回收模型预测数据回收的存储空间;基于存储空间生成数据回收指令。
其中,该方法还包括:响应用户操作指令,生成数据回收终止指令;将数据回收终止指令发送至存储设备,以使存储设备在内部终止数据回收,并响应用户操作指令。
为了解决上述问题,本申请采用的另一种技术方案是提供一种存储设备的数据回收方法,该存储设备与控制设备连接,该方法应用于存储设备,该方法包括:接收控制设备发送的数据回收指令;其中,数据回收指令是控制设备基于状态信息生成的,状态信息包括控制设备的当前时间、充电状态、电量状态和屏幕状态中的至少一种状态;基于数据回收指令在内部进行数据回收。
为了解决上述问题,本申请采用的另一种技术方案是提供一种控制设备,该控制设备用于连接存储设备,控制设备包括处理器以及与处理器耦接的存储器;其中,存储器用于存储计算机程序,处理器用于执行计算机程序,以实现如上述技术方案提供的应用于控制设备的方法。
为了解决上述问题,本申请采用的另一种技术方案是提供一种存储设备,该存储设备用于连接控制设备,存储设备包括处理器以及与处理器耦接的存储阵列;其中,存储阵列用于存储计算机程序,处理器用于执行计算机程序,以实现如上述技术方案提供的应用于存储设备的方 法。
为了解决上述问题,本申请采用的另一种技术方案是提供一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,计算机程序在被处理器执行时,用于实现如上述任一种技术方案提供的方法。
本申请的有益效果是:区别于现有技术的情况,本申请提供的存储设备及其数据回收方法、控制设备及可读存储介质。该存储设备与控制设备连接,该方法应用于控制设备,该方法通过获取控制设备的当前时间、充电状态、电量状态、屏幕状态和待机状态中的至少一种状态,进而生成数据回收指令,将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收的方式,使控制设备能够灵活控制存储设备进行数据回收的时机,增加控制设备和存储设备之间的关联,提升存储设备的数据回收的效果,进而提高控制设备的性能。
【附图说明】
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。其中:
图1是本申请提供的存储设备的数据回收方法一实施例的流程示意图;
图2是本申请提供的存储设备的数据回收方法另一实施例的流程示意图;
图3是本申请提供的存储设备的数据回收方法另一实施例的流程示意图;
图4是本申请提供的存储设备的数据回收方法另一实施例的流程示意图;
图5是本申请提供的存储设备的数据回收方法另一实施例的流程示意图;
图6是本申请提供的存储设备的数据回收方法另一实施例的流程示 意图;
图7是本申请提供的存储设备的数据回收方法另一实施例的流程示意图;
图8是本申请提供的存储设备的数据回收方法另一实施例的流程示意图;
图9是本申请提供的控制设备一实施例的结构示意图;
图10是本申请提供的存储设备一实施例的结构示意图;
图11是本申请提供的计算机可读存储介质一实施例的结构示意图。
【具体实施方式】
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
智能手机、平板电脑、智能电视、智能汽车等产品是几乎每天都会被大量使用的电子设备。在使用的同时,会产生垃圾数据。部分是零碎的数据,例如随机写入的数据;部分是已经无效的数据,例如被删除的文件。受容量和算法限制,当存储设备中的垃圾数据多到一定程度时,存储设备就不得不“回收”垃圾数据,整理出足够多的空间供电子设备后续使用。存储设备在做数据回收时,往往无法及时响应电子设备的存储需求,会造成设备“卡顿”,从而导致电子设备的整体性能下降。如,对于使用Android(安卓)操作系统的智能设备,如智能手机等,采用日 志式文件系统,会经常记录操作日志,会更容易产生垃圾数据。随着使用时间的增加,操作系统垃圾数据也不断增加,存储设备回收垃圾数据也越来越频繁,系统性能会出现明显的下降。
申请人长期研究发现,此类电子设备的存储设备往往是“被动式”的。以常见的安卓智能手机为例,存储设备,如,eMMC(Embedded Multi Media Card,嵌入式多媒体卡)、eMCP(embedded Multi Chip Package,嵌入式多晶片封装)存储、UFS(Universal Flash Storage,通用闪存存储)和uMCP(UFS-based Multichip Package,UFS多芯片封装)存储等,无法获知安卓智能手机下一步要做什么存储操作,如何时写入多少数据,也不知道写入的数据的作用,如系统数据、用户数据、临时数据等,只能按照安卓智能手机的指令进行工作。当需要回收垃圾数据时,存储设备只能按照自身的算法逻辑进行回收,而无法提前通知安卓智能手机的处理器,也无法获知存储设备回收出的连续存储空间对下一步的操作有多大用处。基于此,本申请提出以下技术方案,以解决上述至少一个问题。
参阅图1,图1是本申请提供的存储设备的数据回收方法一实施例的流程示意图。该存储设备与控制设备连接,该方法应用于控制设备,该方法包括:
步骤11:获取控制设备的状态信息。
其中,状态信息包括控制设备的当前时间、充电状态、电量状态、屏幕状态和待机状态中的至少一种状态。
在其他实施例中,控制设备的状态信息还可以包括控制设备的运行状态、开机状态或关机状态。其中,运行状态可以包括省电状态、正常状态、待机状态或休眠状态等。
该存储设备与控制设备可以是一体设置,也可以是通过对应的连接端口外部连接。如存储设备为移动硬盘。
步骤12:基于状态信息生成数据回收指令。
在一些实施例中,控制设备获取到当前时间,若当前时间在预设时间范围内,则生成数据回收指令。如,当前时间为凌晨2点,预设时间 范围为凌晨1-凌晨3点,则当前时间在预设时间范围内,生成数据回收指令。
在一些实施例中,控制设备获取到开机状态,此时,因控制设备刚开机,则用户不会立即使用,则在开机完成后,生成数据回收指令。
在一些实施例中,控制设备获取到关机状态,此时,因控制设备准备关机,则表示用户不会使用控制设备,则在关机时,同步生成数据回收指令。且可以对关机的时间进行延长,以使存储设备有充足的时间在内部进行数据回收。
在一些实施例中,控制设备获取到待机状态,待机状态是指手机或电脑等电子设备已开机,但是不进行任何实质性工作的状态。此时,表示用户未使用控制设备,则可以生成数据回收指令,并执行步骤13。
步骤13:将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。
在一些实施例中,存储设备在接收到数据回收指令后,会确定存储阵列中的无效存储块,直接将无效存储块进行擦除操作,以使这些擦除后的无效存储块可以被再次写入数据。
在一些实施例中,存储设备在接收到数据回收指令后,会确定存储阵列中能够回收的存储块。如,在基于闪存架构的存储设备中,数据通常是以页为单位进行存储,一个存储块包含若干页,因此,当一个存储块中无效页的数量增加后,该存储块仍然占用了存储空间,并且存储的过多的无效数据,则这种存储块应该被回收。此时,需要确定存储块中有效页,将有效页中的数据进行数据迁移,然后,有效页变为无效页,此时就可以对存储块进行擦除操作,擦除后就相当于这些存储块被回收。
在本实施例中,通过获取控制设备的当前时间、充电状态、电量状态、屏幕状态和待机状态中的至少一种状态,进而生成数据回收指令,将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收的方式,使控制设备能够灵活控制存储设备进行数据回收的时机,增加控制设备和存储设备之间的关联,提升存储设备的数据回收的效果,进而 提高控制设备的性能。
参阅图2,图2是本申请提供的存储设备的数据回收方法另一实施例的流程示意图。该方法包括:
步骤21:获取控制设备的当前时间。
控制设备通常会内置时间模块,时间模块可以通过网络同步时间。
步骤22:若当前时间在预设时间范围内,生成数据回收指令。
在一些实施例中,若当前时间在预设时间范围内,还需要获取控制设备的运行状态,在运行状态满足预设条件时,生成数据回收指令。
在一应用场景中,若当前时间在预设时间范围内,但是控制设备依然在正常运行中,这时不适合进行数据回收,数据回收会影响控制设备的运行。因此,在当前时间在预设时间范围内,还需要获取控制设备的运行状态,在运行状态满足预设条件时,生成数据回收指令。如运行状态为休眠状态时,生成数据回收指令。运行状态为待机状态时,生成数据回收指令。
步骤23:将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。
在本实施例中,通过获取控制设备的当前时间,若当前时间在预设时间范围内,生成数据回收指令,将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收的方式,使控制设备能够在合理的时间控制存储设备进行数据回收,增加控制设备和存储设备之间的关联,减少存储设备进行数据回收且用户同步操作控制设备的情况,提升存储设备的数据回收的效果,进而提高控制设备的性能。
参阅图3,图3是本申请提供的存储设备的数据回收方法另一实施例的流程示意图。该方法包括:
步骤31:获取控制设备的充电状态。
在一些实施例中,控制设备和存储设备一体设置,且控制设备中设置了充电电池。控制设备可以检测到其是否插入充电器,以对电池进行充电。
步骤32:若充电状态为充电中,生成数据回收指令。
充电状态下,用户通常不会使用控制设备,则生成数据回收指令。
在一些实施例中,存在控制设备在极度缺少电量的情况下,才进行充电,因此,若在此时进行数据回收,电量可能不够,基于此,参阅图4,步骤32可以是如下流程:
步骤321:若充电状态为充电中,获取控制设备的电量状态。
在一些实施例中,可以将电量状态进行等级设置,低于百分之二十确定为低电量状态,百分之二十至百分之八十确定为正常电量状态。高于百分之八十确定为高电量状态。
步骤322:在电量状态满足预设条件时,生成数据回收指令。
在一些实施例中,将预设条件设置为正常电量状态或高电量状态,若此时控制设备的电量状态为正常电量状态或高电量状态时,生成数据回收指令。若此时控制设备的电量状态为低电量状态时,则可在预设时间后重新获取控制设备的充电状态,若此时的充电状态为充电中,且控制设备的电量状态为正常电量状态或高电量状态时,则生成数据回收指令。
通过对电量状态进行检测,以确保存储设备在进行数据回收时有足够的电量作为支撑,提高数据回收的可靠性。
步骤33:将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。
在本实施例中,通过获取控制设备的充电状态,若充电状态为充电中,生成数据回收指令,将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收的方式,使控制设备能够在合理的状态下控制存储设备进行数据回收,增加控制设备和存储设备之间的关联,减少存储设备进行数据回收且用户同步操作控制设备的情况,提升存储设备的数据回收的效果,进而提高控制设备的性能。
参阅图5,图5是本申请提供的存储设备的数据回收方法另一实施例的流程示意图。该方法包括:
步骤51:获取控制设备的屏幕状态。
在本实施例中,控制设备具有一显示屏,用户可触控显示屏,对显 示屏上显示的应用程序等进行操作。
因此,屏幕状态可以表示出控制设备当前是否被用户操作。如,屏幕状态为亮屏,则大概率情况下控制设备被用户操作。如,屏幕状态为熄屏,熄屏状态下显示屏上没有显示,表示用户此时无需使用控制设备,即使对熄屏的显示屏操作,控制设备也无法响应该操作,则可以执行步骤52。
步骤52:若屏幕状态为熄屏,生成数据回收指令。
在一些实施例中,控制设备在熄屏时,仍然运行着其余功能,如下载视频,则步骤52可进一步需要获取控制设备的运行状态,在运行状态满足预设条件时,生成数据回收指令。如,在屏幕状态为熄屏时,获取到运行状态为待机状态,则生成数据回收指令。
在一些实施例中,控制设备通常给显示屏设置有屏幕保护,则在获取控制设备的屏幕状态为屏幕保护时,表明用户没有使用控制设备,则生成数据回收指令。
步骤53:将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。
在一些实施例中,上述任一实施例的方案可以和其他实施例进行结合,如,当前时间在预设时间范围内时,获取控制设备的屏幕状态,若屏幕状态为熄屏,生成数据回收指令。此时可以确认控制设备未被用户操作,可以进行存储设备数据回收。又如,当前时间在预设时间范围内时,获取控制设备的电量状态,在电量状态满足预设条件时,生成数据回收指令。此时可以确认控制设备电量充足,能够支撑存储设备进行数据回收。
在本实施例中,通过获取控制设备的屏幕状态,若屏幕状态为熄屏,生成数据回收指令,将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收的方式,使控制设备能够在合理的状态下控制存储设备进行数据回收,增加控制设备和存储设备之间的关联,减少存储设备进行数据回收且用户同步操作控制设备的情况,提升存储设备的数据回收的效果,进而提高控制设备的性能。
参阅图6,图6是本申请提供的存储设备的数据回收方法另一实施例的流程示意图。该方法包括:
步骤61:利用已训练的回收模型预测数据回收的存储空间。
该回收模型可以由控制设备根据用户每天的操作习惯进行训练,从而使该回收模型可以预估该用户每天对存储设备的平均数据写入量、最大数据写入量,从而预估要数据回收的存储空间。
在一些实施例中,可以根据用户每天的操作习惯进行动态更新回收模型的参数,以使回收模型每次预测的存储空间更加符合该用户近期的操作习惯。如,以连续3天的操作习惯对回收模型进行训练,以星期一直星期日进行说明:在星期四时,回收模型利用星期一直星期三的用户操作习惯进行训练,然后预测星期四需要回收的存储空间。在星期五时,回收模型利用星期二直星期四的用户操作习惯进行训练,然后预测星期五需要回收的存储空间。这样,可以使回收模型每次预测的存储空间更加符合该用户近期的操作习惯。
步骤62:基于存储空间生成数据回收指令。
控制设备可以将存储空间的大小融入数据回收指令中。
步骤63:将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。
存储设备在接收到数据回收指令时,对其进行解析,从而获得存储空间的大小。存储设备则按照存储空间的大小在内部进行数据回收,以回收对应该存储空间的大小的存储空间。
在一些实施例中,回收的存储空间可以是连续的。存储设备在接收得到数据回收指令时,从存储块中确定需要连续的回收存储块,然后将这些存储块中的有效数据进行数据迁移,迁移后将这些存储块进行擦除,这些擦除后连续的存储块就可以作为控制设备写入数据时的存储空间。
在本实施例中,通过利用已训练的回收模型预测数据回收的存储空间,基于存储空间生成数据回收指令,将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收的方式,使控制设备预测存储设备需 要回收的存储空间,进而使存储设备一次性进行数据回收,减少数据回收的次数,提升存储设备的数据回收的效果,进而提高控制设备的性能且提高存储设备的使用寿命。
在一应用场景中,存储设备在进行数据回收时,存在用户使用控制设备的情况,存储设备既要响应用户操作,又要进行数据回收,使得存储设备的性能降低,基于此,参阅图7,图7是本申请提供的存储设备的数据回收方法另一实施例的流程示意图。该方法包括:
步骤71:响应用户操作指令,生成数据回收终止指令。
在存储设备进行数据回收期间,控制设置检测到用户操作时,则会生成数据回收终止指令。
步骤72:将数据回收终止指令发送至存储设备,以使存储设备在内部终止数据回收,并响应用户操作指令。
将数据回收终止指令发送至存储设备,以使存储设备在内部终止数据回收,然后优先响应用户操作指令,以基于用户操作指令进行相应的数据读取或写入或删除。
在响应完用户操作指令后,再次进行数据回收。
在本实施例中,通过响应用户操作指令,生成数据回收终止指令,将数据回收终止指令发送至存储设备,以使存储设备在内部终止数据回收,并响应用户操作指令的方式,能够解决存储设备进行数据回收且用户同步操作控制设备的问题,使存储设备优先响应用户操作指令,减少存储设备因数据回收对带宽的占用,提高用户体验。
参阅图8,图8是本申请提供的存储设备的数据回收方法另一实施例的流程示意图。该存储设备与控制设备连接,方法应用于存储设备,该方法包括:
步骤81:接收控制设备发送的数据回收指令。
其中,数据回收指令是控制设备基于状态信息生成的,状态信息包括控制设备的当前时间、充电状态、电量状态和屏幕状态中的至少一种状态。
控制设备生成数据回收指令的方式可以参阅上述任一实施例,这里 不再赘述。
步骤82:基于数据回收指令在内部进行数据回收。
存储设备进行数据回收的方式可以参阅上述任一实施例,这里不再赘述。
在一些实施例中,在存储设备进行数据回收期间,若接收到数据回收终止指令,则存储设备在内部终止数据回收,并响应用户操作指令。在响应完用户操作指令后,再次进行数据回收。
在本实施例中,通过接收控制设备发送的数据回收指令;其中,数据回收指令是控制设备基于状态信息生成的,状态信息包括控制设备的当前时间、充电状态、电量状态和屏幕状态中的至少一种状态;基于数据回收指令在内部进行数据回收的方式,使存储设备能够被控制设备灵活控制进行数据回收的时机,增加控制设备和存储设备之间的关联,提升存储设备的数据回收的效果,进而提高控制设备的性能。
参阅图9,图9是本申请提供的控制设备一实施例的结构示意图。该控制设备90用于连接存储设备,控制设备90包括处理器91以及与处理器91耦接的存储器92;其中,存储器92用于存储计算机程序,处理器91用于执行计算机程序,以实现以下方法:
获取控制设备的状态信息;其中,状态信息包括控制设备的当前时间、充电状态、电量状态和屏幕状态中的至少一种状态;基于状态信息生成数据回收指令;将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收。
可以理解,处理器91还用于执行计算机程序,以实现上述任一实施例提供的方法。
在一些实施例中,控制设备90可以是具有与存储设备进行交互功能的电子设备。如,智能手机、智能相机、通讯模块、安防监控设备、平板电脑、笔记本电脑、智能播放器、著作版权发行设备等。
参阅图10,图10是本申请提供的存储设备一实施例的结构示意图。该存储设备100用于连接控制设备,存储设备100包括处理器101以及与处理器101耦接的存储阵列102;其中,存储阵列102用于存储计算机程 序,处理器101用于执行计算机程序,以实现以下方法:
接收控制设备发送的数据回收指令;其中,数据回收指令是控制设备基于状态信息生成的;基于数据回收指令在内部进行数据回收。
可以理解,处理器101还用于执行计算机程序,以实现上述任一实施例提供的方法。
参阅图11,图11是本申请提供的计算机可读存储介质一实施例的结构示意图。该计算机可读存储介质110用于存储计算机程序111,计算机程序111在被处理器执行时,用于实现以下方法:
获取控制设备的状态信息;其中,状态信息包括控制设备的当前时间、充电状态、电量状态和屏幕状态中的至少一种状态;基于状态信息生成数据回收指令;将数据回收指令发送至存储设备,以使存储设备在内部进行数据回收;
或,接收控制设备发送的数据回收指令;其中,数据回收指令是控制设备基于状态信息生成的;基于数据回收指令在内部进行数据回收。
可以理解,计算机程序111在被处理器执行时,该用于实现上述任一实施例提供的方法。
综上,本申请提供的存储设备及其数据回收方法、控制设备及可读存储介质。通过上述任一实施例的技术方案,使控制设备能够灵活控制存储设备进行数据回收的时机,增加控制设备和存储设备之间的关联,提升存储设备的数据回收的效果,进而提高控制设备的性能。
且使用上述任一实施例的技术方案,能够有效降低存储设备中的垃圾数据比例,有利于控制设备中的存储设备整理出一块连续的存储空间,以提升整体性能。
在本申请所提供的几个实施方式中,应该理解到,所揭露的方法以及设备,可以通过其它的方式实现。例如,以上所描述的设备实施方式仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开 的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。
另外,在本申请各个实施方式中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述其他实施方式中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (15)

  1. 一种存储设备的数据回收方法,其特征在于,所述存储设备与控制设备连接,所述方法应用于所述控制设备,所述方法包括:
    获取所述控制设备的状态信息;其中,所述状态信息包括所述控制设备的当前时间、充电状态、电量状态、屏幕状态和待机状态中的至少一种状态;
    基于所述状态信息生成数据回收指令;
    将所述数据回收指令发送至所述存储设备,以使所述存储设备在内部进行数据回收。
  2. 根据权利要求1所述的方法,其特征在于,
    所述获取所述控制设备的状态信息,包括:
    获取所述控制设备的当前时间;
    所述基于所述状态信息生成数据回收指令,包括:
    若所述当前时间在预设时间范围内,生成所述数据回收指令。
  3. 根据权利要求1所述的方法,其特征在于,
    所述获取所述控制设备的状态信息,包括:
    获取所述控制设备的充电状态;
    所述基于所述状态信息生成数据回收指令,包括:
    若所述充电状态为充电中,生成所述数据回收指令。
  4. 根据权利要求3所述的方法,其特征在于,
    所述若所述充电状态为充电中,生成所述数据回收指令,包括:
    若所述充电状态为充电中,获取所述控制设备的所述电量状态;
    在所述电量状态满足预设条件时,生成所述数据回收指令。
  5. 根据权利要求1所述的方法,其特征在于,
    所述获取所述控制设备的状态信息,包括:
    获取所述控制设备的屏幕状态;
    所述基于所述状态信息生成数据回收指令,包括:
    若所述屏幕状态为熄屏,生成所述数据回收指令。
  6. 根据权利要求5所述的方法,其特征在于,
    所述若所述屏幕状态为熄屏,生成所述数据回收指令,包括:
    若所述屏幕状态为熄屏,则获取所述控制设备的运行状态;
    在所述运行状态满足预设条件时,生成所述数据回收指令。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    利用已训练的回收模型预测数据回收的存储空间;
    基于所述存储空间生成数据回收指令。
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    响应用户操作指令,生成数据回收终止指令;
    将所述数据回收终止指令发送至所述存储设备,以使所述存储设备在内部终止数据回收,并响应所述用户操作指令。
  9. 一种存储设备的数据回收方法,其特征在于,所述存储设备与控制设备连接,所述方法应用于所述存储设备,所述方法包括:
    接收所述控制设备发送的数据回收指令;其中,所述数据回收指令是所述控制设备基于状态信息生成的,所述状态信息包括所述控制设备的当前时间、充电状态、电量状态和屏幕状态中的至少一种状态;
    基于所述数据回收指令在内部进行数据回收。
  10. 根据权利要求9所述的方法,其特征在于,
    所述基于所述数据回收指令在内部进行数据回收,包括:
    基于所述数据回收指令确定需要回收的存储块;
    将所述存储块中的有效数据进行数据迁移;
    将数据迁移后的所述存储块进行擦除。
  11. 根据权利要求9所述的方法,其特征在于,
    所述基于所述数据回收指令在内部进行数据回收,包括:
    接收到数据回收终止指令;其中,所述数据回收终止指令基于用户操作指令产生;
    在内部终止数据回收,并响应所述用户操作指令。
  12. 根据权利要求11所述的方法,其特征在于,
    所述方法还包括:
    在响应完所述用户操作指令后,再次进行数据回收。
  13. 一种控制设备,其特征在于,所述控制设备用于连接存储设备,所述控制设备包括处理器以及与所述处理器耦接的存储器;
    其中,所述存储器用于存储计算机程序,所述处理器用于执行所述计算机程序,以实现如权利要求1-8任一项所述的方法。
  14. 一种存储设备,其特征在于,所述存储设备用于连接控制设备,所述存储设备包括处理器以及与所述处理器耦接的存储阵列;
    其中,所述存储阵列用于存储计算机程序,所述处理器用于执行所述计算机程序,以实现如权利要求9-12任一项所述的方法。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述计算机程序在被处理器执行时,用于实现如权利要求1-12任一项所述的方法。
PCT/CN2021/121090 2021-08-20 2021-09-27 存储设备及其数据回收方法、控制设备及可读存储介质 WO2023019691A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110961541.0A CN115905032A (zh) 2021-08-20 2021-08-20 存储设备及其数据回收方法、控制设备及可读存储介质
CN202110961541.0 2021-08-20

Publications (1)

Publication Number Publication Date
WO2023019691A1 true WO2023019691A1 (zh) 2023-02-23

Family

ID=85239797

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121090 WO2023019691A1 (zh) 2021-08-20 2021-09-27 存储设备及其数据回收方法、控制设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN115905032A (zh)
WO (1) WO2023019691A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228449A (zh) * 2017-08-15 2018-06-29 珠海市魅族科技有限公司 终端设备控制方法及装置、终端设备及计算机可读存储介质
CN108228342A (zh) * 2017-08-10 2018-06-29 珠海市魅族科技有限公司 终端设备控制方法及装置、终端设备及计算机可读存储介质
CN108228341A (zh) * 2017-08-07 2018-06-29 珠海市魅族科技有限公司 内存回收方法及装置、终端设备及计算机可读存储介质
CN108776614A (zh) * 2018-05-03 2018-11-09 华为技术有限公司 存储块的回收方法和装置
CN111258921A (zh) * 2020-01-14 2020-06-09 Oppo广东移动通信有限公司 垃圾内存回收方法及装置、电子设备、存储介质
EP3846170A1 (en) * 2020-01-02 2021-07-07 Samsung Electronics Co., Ltd. Storage device and operating method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228341A (zh) * 2017-08-07 2018-06-29 珠海市魅族科技有限公司 内存回收方法及装置、终端设备及计算机可读存储介质
CN108228342A (zh) * 2017-08-10 2018-06-29 珠海市魅族科技有限公司 终端设备控制方法及装置、终端设备及计算机可读存储介质
CN108228449A (zh) * 2017-08-15 2018-06-29 珠海市魅族科技有限公司 终端设备控制方法及装置、终端设备及计算机可读存储介质
CN108776614A (zh) * 2018-05-03 2018-11-09 华为技术有限公司 存储块的回收方法和装置
EP3846170A1 (en) * 2020-01-02 2021-07-07 Samsung Electronics Co., Ltd. Storage device and operating method thereof
CN111258921A (zh) * 2020-01-14 2020-06-09 Oppo广东移动通信有限公司 垃圾内存回收方法及装置、电子设备、存储介质

Also Published As

Publication number Publication date
CN115905032A (zh) 2023-04-04

Similar Documents

Publication Publication Date Title
KR100725410B1 (ko) 전원 상태에 따라 비휘발성 메모리의 블록 회수를 수행하는장치 및 그 방법
US8838918B2 (en) Information processing apparatus and data backup method
US9165667B2 (en) Electronic device with solid state drive and associated control method
US10649896B2 (en) Storage device and data processing system including the same
WO2021072716A1 (zh) 内存管理方法、装置、电子设备和计算机可读介质
US8661183B2 (en) Computer system, data storage method, and program for reduction of stored data after hibernation
CN110968524B (zh) 数据存储控制方法、装置、存储介质及电子装置
KR20130031046A (ko) 플래시 메모리 장치 및 플래시 메모리 장치의 데이터 관리 방법
WO2015051711A1 (zh) 一种基于多通道slc nand与dram缓存的新usb协议计算机加速设备
CN111158910A (zh) 内存管理方法、装置、存储介质及电子设备
WO2015149577A1 (zh) 存储系统、存储设备及数据存储方法
WO2012016393A1 (zh) 一种android移动终端冷启动的方法和装置
TW201712528A (zh) 用於管理操作狀態資料之方法、記憶體模組及主機裝置
CN105511985A (zh) 一种数据备份的方法及终端
CN104571955A (zh) 提高存储容量的方法和装置
CN108040292A (zh) 电视待机开机方法、电视及计算机可读存储介质
JP3117668B2 (ja) 携帯型端末機器のメモリ管理方法
CN106775609A (zh) 用于减少休眠及恢复时间的系统及方法
EP4328705A1 (en) Storage space arrangement method and electronic device
KR20180050195A (ko) 저장 장치 및 이를 포함하는 데이터 처리 시스템
CN108762669B (zh) 提升掉电时数据写入速度的方法、装置及计算机设备
CN108874574B (zh) 一种垃圾回收处理方法及相关装置
CN113590501A (zh) 一种数据存储方法及相关设备
CN112711387A (zh) 缓冲区容量的调整方法、装置、电子设备及可读存储介质
WO2023019691A1 (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: 21953927

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE