A dynamic cleaning method of block storage data and a terminal

By setting tags and user operation profiles for block storage data and combining map technology for dynamic cleanup, the problems of redundant and expired data in block storage are solved, achieving efficient data cleanup and storage space optimization.

CN118939188BActive Publication Date: 2025-12-05福建天晴在线互动科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410963435.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2025-12-05
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

In existing technologies, block storage data suffers from data redundancy and the accumulation of expired data, lacking an effective dynamic cleanup solution, which leads to increased storage pressure.

Method used

By setting importance markers and user operation profiles for data blocks, and combining block maps and node maps for dynamic cleanup, important long-term, important temporary, and temporary data are distinguished, and data cleanup is performed based on markers and user behavior.

Benefits of technology

It enables dynamic, efficient, and flexible cleanup of block storage data, reducing the accumulation of useless data, optimizing storage space, and improving data utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939188B_ABST
    Figure CN118939188B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic cleaning method and terminal for block storage data, wherein when the data block of a user is dynamically cleaned, if the data block stores a mark of file data, the data is cleaned according to the mark, otherwise the file data is cleaned according to the operation portrait of the user. In this way, the block data for sharing can be dynamically, efficiently and flexibly cleaned by establishing the mark for the data and cooperating with the operation portrait of the user, so that the accumulation of useless data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of block data cleaning, and particularly relates to a dynamic cleaning method of block storage data and a terminal. BACKGROUND

[0002] At present, under the application of Web3.0, data transmission becomes easier and data storage becomes safer, but many shared data stored under Web3.0 have data redundancy phenomenon, because: one is that in order to facilitate users to download data, data is cached in each block to facilitate users to download; another is that users upload the same file for storage, which will bring pressure to block space. At present, there is also the situation of depositing expired data.

[0003] The existing cleaning method needs manual screening of data, cleaning of data, or cleaning of data in combination with the current environment and user's willingness, but there is no reasonable and effective solution for dynamic cleaning of block shared data. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a dynamic cleaning method of block storage data and a terminal, which can optimize the storage space of block storage data when sharing data in blocks, and effectively reduce the storage pressure of blocks.

[0005] In order to solve the above technical problems, the technical scheme adopted by the present application is:

[0006] A dynamic cleaning method of block storage data, comprising the steps of:

[0007] receiving a file uploaded by a user, and storing the file data uploaded by the user using a data block;

[0008] traversing the data block of the user through a cache block, judging whether the data block stores a mark for indicating data importance, if yes, cleaning data according to the mark in the data block, otherwise, cleaning file data in the data block according to the operation portrait of the user.

[0009] In order to solve the above technical problems, another technical scheme adopted by the present application is:

[0010] A dynamic cleaning terminal of block storage data, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to realize each step of the above-mentioned dynamic cleaning method of block storage data.

[0011] The application has the beneficial effect that when the data block of the user is dynamically cleaned, if the data block stores the mark of the file data, the data is cleaned according to the mark, otherwise the file data is cleaned according to the operation portrait of the user. In this way, by establishing the mark for the data and cooperating with the operation portrait of the user, the block data for sharing can be dynamically, efficiently and flexibly cleaned, and the accumulation of useless data is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 A flow chart of a dynamic cleaning method of block storage data according to an embodiment of the application;

[0013] Figure 2 A schematic diagram of a dynamic cleaning terminal of block storage data according to an embodiment of the application;

[0014] Figure 3 A schematic diagram of a data mark block according to an embodiment of the application;

[0015] Figure 4 A schematic diagram of a user portrait block according to an embodiment of the application;

[0016] REFERENCE NUMERALS

[0017] 1. A dynamic cleaning terminal of block storage data; 2. A memory; 3. A processor. DETAILED DESCRIPTION

[0018] To explain the technical content, the achieved purposes and effects of the application in detail, the following will be explained in combination with the embodiments and the drawings.

[0019] Please refer to Figure 1 The embodiment of the application provides a dynamic cleaning method of block storage data, which comprises the following steps:

[0020] Receiving the file uploaded by the user and using the data block to store the file data uploaded by the user;

[0021] The data block of the user is traversed through the cleaning buffer block, it is judged whether the data block stores the mark for indicating the importance of data, if yes, the data is cleaned according to the mark in the data block, otherwise the file data in the data block is cleaned according to the operation portrait of the user.

[0022] From the above description, the beneficial effects of the present application are that when the user's data blocks are dynamically cleaned, if the data blocks store file data marks, the data is cleaned according to the marks, otherwise the file data is cleaned according to the user's operation profile. In this way, by establishing marks for data in combination with user operation profiles, the block data for sharing can be dynamically, efficiently and flexibly cleaned, and the accumulation of useless data is reduced.

[0023] Further, the data blocks of the user are traversed by the cache cleaning block, including:

[0024] A block map is established for all data blocks of the user, and a corresponding node map is established for each data block. When the cache cleaning block traverses the data blocks of the user using the block map, the node data of the corresponding data block is traversed through the node map.

[0025] From the above description, the block map of all data blocks is first established, and a corresponding node map is established for each data block. Therefore, in the process of block map traversal, non-occupied block data can be processed and marked for cleaning according to the data attributes of the node map, and occupied blocks can be skipped. After the blocks are unoccupied (as long as the map is not completed, continue to judge), cleaning is performed again.

[0026] Further, the data is cleaned according to the marks in the data blocks, including:

[0027] If the mark of the file data in the data block is an important long-term mark, the file data is not processed;

[0028] If the mark of the file data in the data block is an important temporary mark, when the file data reaches the temporary expiration time, the mark of the file data is changed to a temporary data mark;

[0029] If the mark of the file data in the data block is a temporary data mark, when the file data is in a use state, a use tag is added to the file data, and when the file data is in an idle state, the file data is cleaned.

[0030] From the above description, by dividing the data into important long-term, important temporary and temporary data, reasonable data cleaning can be performed, and the situation of deleting temporary data being used is also avoided.

[0031] Further, the file data in the data blocks is cleaned according to the user's operation profile, including:

[0032] Acquire file data in a data block, and acquire a usage frequency of the file data, and if the usage frequency reaches a frequency threshold, do not process the file data.

[0033] From the above description, for a data block without a mark, it is determined whether the file data needs to be cleaned by using the usage frequency, so that the data is effectively and reasonably cleaned.

[0034] Further, the usage frequency of the file data is acquired, and if the usage frequency does not reach a frequency threshold, it is determined whether there is second file data identical to the file data in each data block and the usage frequency of the second file data reaches a frequency threshold, and if so, the file data is deleted and the reference path of the second file data is stored in the current data block.

[0035] From the above description, when the usage frequency of the file data is low and there is identical file data with a high usage frequency in other data blocks, the file data with a low usage frequency can be deleted and a reference path is set, so that the data can be called from other data blocks when the user wants to use the file data, further improving the utilization rate of block storage data.

[0036] Please refer to Figure 2 Another embodiment of the present application provides a dynamic cleaning terminal for block storage data, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to realize each step of the above-mentioned dynamic cleaning method for block storage data.

[0037] The above-mentioned dynamic cleaning method for block storage data and terminal are particularly suitable for sharing data blocks, optimizing the storage space of block storage data, and effectively reducing the block storage pressure, which will be described in detail below through specific embodiments.

[0038] Embodiment one

[0039] Please refer to Figure 1 A dynamic cleaning method for block storage data, comprising the steps of:

[0040] S1, receiving a user uploaded file, and using a data block to store the file data uploaded by the user.

[0041] In this embodiment, please refer to Figure 3When the user uploads file data, the user can mark the file data according to the data marking area, and the marking types include important long-term, important temporary and temporary data. The important long-term marking indicates that other processing modules are prohibited from processing the file data; the important temporary marking indicates that data caching is prohibited, and other processing blocks are allowed to process at the expiration time; the temporary data marking indicates that the cache cleaning block is allowed to clean up, and the user portrait block is also allowed to process, and such data is for efficient transmission and does not need to consider the safety factor.

[0042] S2, the data block of the user is traversed by the cache cleaning block, and it is judged whether the data block stores a marking for indicating data importance. If yes, data cleaning is performed according to the marking in the data block, otherwise, file data in the data block is cleaned according to the operation portrait of the user.

[0043] S21, a block map is established for all data blocks of the user, and a corresponding node map is established for each data block. When the cache cleaning block traverses the data block of the user using the block map, the node data of the corresponding data block is traversed through the node map.

[0044] In this embodiment, a block map is first established for all data blocks, and the block map stores information of all data blocks, including blocks that are being used, i.e., occupied blocks. Therefore, the occupied blocks need to be skipped when being used, so as to prevent the CPU time slice processing time from being increased due to the traversal and processing at the same time. A node map is established for each data block, and the node map specifically traverses all nodes in the data block and stores the nodes as the node map of the data block.

[0045] The block map is loaded in batches, i.e., a block map of all blocks is first established, the data block is traversed according to the block map, and then the data of each block is traversed according to the node map during the traversal. In the process of block map traversal, the unoccupied block data can be processed, marked and cleaned according to the data attribute of the node map, the occupied blocks are skipped, and after the blocks are unoccupied (as long as the map is not completed, continue to judge), the entire traversal and cleaning can be completed.

[0046] S22, if the data block stores a marking for indicating data importance, data cleaning is performed according to the marking in the data block.

[0047] Specifically, if the marking of the file data in the data block is an important long-term marking, the file data is not processed.

[0048] If the mark of the file data in the data block is the important temporary mark, the mark of the file data is changed to the temporary data mark when the file data reaches the temporary expiration time.

[0049] If the mark of the file data in the data block is the temporary data mark, a use tag is added to the file data when the file data is in the use state, and the file data is cleaned up when the file data is in the idle state.

[0050] S23, if the data block does not store a mark indicating the importance of data, the file data in the data block is cleaned up according to the user's operation profile.

[0051] Specifically, the file data in the data block is obtained, and the number of uses of the file data is obtained. If the number of uses reaches the number threshold, the file data is not processed. If the number of uses does not reach the number threshold, it is determined whether there is second file data identical to the file data in each data block and the number of uses of the second file data reaches the number threshold. If so, the file data is deleted, and the reference path of the second file data is stored in the current data block.

[0052] In this embodiment, please refer to Figure 4 The user profile block obtains the data block corresponding to the user, and traverses the data type of the file data in the data block. The data type of the file data includes: video file, audio file, text file and other files. In some embodiments, the file data can be marked according to the type of the file data, for example: all video file types are considered important long-term.

[0053] At the same time, the number of uses of the file data also needs to be counted in the user profile block. When the number of uses is less than the number threshold set by the system, it is determined whether there is second file data identical to the file data and active in the block. If so, the data is deleted and marked as reference, and the reference path of the second file data is recorded. In this way, if the user remembers to use this file data one day, the file will be downloaded from other blocks.

[0054] In this embodiment, after the block interaction is completed, the block data needs to be arranged, which is equivalent to further arranging the data mark to ensure the safety and stability of the block data.

[0055] Embodiment two

[0056] Please refer to Figure 2A terminal 1 for dynamic cleaning of block storage data, comprising a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, wherein the processor 3 implements each step of the method for dynamic cleaning of block storage data according to the first embodiment when executing the computer program.

[0057] In summary, the present application provides a method and terminal for dynamic cleaning of block storage data, wherein the user can set a corresponding mark for the file data when uploading the file data, and then when the data block of the user is dynamically cleaned, if the data block stores the mark of the file data, the data is cleaned according to the mark; otherwise, the file data is cleaned according to the user's operation profile; when the data is cleaned according to the user's operation profile, some important long-term types can be excluded according to the type of the file data, and then the data is cleaned according to the reference times of the data, and if the same data as the data to be cleaned exists and the same data does not need to be cleaned, a data reference path can be added to the same data after the data to be cleaned is deleted. In this way, by establishing a mark for the data and cooperating with the user's operation profile, the block data for sharing can be dynamically, efficiently and flexibly cleaned, and the accumulation of useless data is reduced.

[0058] The above description is only an embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent transformation or direct or indirect application in the related technical field according to the content of the specification and drawings of the present application is also included in the patent protection scope of the present application.

Claims

1. A method for dynamic cleanup of block stored data, the method comprising: The method comprises the steps of: receiving a file uploaded by a user and storing file data uploaded by the user using data blocks; traversing the data blocks of the user by a cache cleaning block, judging whether a mark for indicating data importance is stored in the data blocks, if yes, performing data cleaning according to the mark in the data blocks, otherwise, performing data cleaning on file data in the data blocks according to an operation profile of the user; the data cleaning on the file data in the data blocks according to the operation profile of the user comprises: obtaining file data in a data block and obtaining a use frequency of the file data, if the use frequency reaches a frequency threshold, the file data is not processed; obtaining the use frequency of the file data, if the use frequency does not reach the frequency threshold, judging whether there is second file data identical to the file data in each data block and the use frequency of the second file data reaches the frequency threshold, if yes, deleting the file data and storing a reference path of the second file data in the current data block.

2. The method of claim 1, wherein, the traversing the data blocks of the user by the cache cleaning block comprises: establishing a block map for all data blocks of the user and establishing a corresponding node map for each data block, when the cache cleaning block traverses the data blocks of the user using the block map, traversing node data for the corresponding data block through the node map.

3. The method of claim 1, wherein, the data cleaning according to the mark in the data blocks comprises: if the mark of file data in the data blocks is an important long-term mark, the file data is not processed; if the mark of file data in the data blocks is an important temporary mark, when the file data reaches a temporary expiration time, the mark of the file data is changed to a temporary data mark; if the mark of file data in the data blocks is a temporary data mark, when the file data is in a use state, a use label is added to the file data, when the file data is in an idle state, the file data is cleaned.

4. A dynamic cleaning terminal for block storage data, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, the processor implements the following steps when executing the computer program: receiving a file uploaded by a user and storing file data uploaded by the user using data blocks; traversing the data blocks of the user by a cache cleaning block, judging whether a mark for indicating data importance is stored in the data blocks, if yes, performing data cleaning according to the mark in the data blocks, otherwise, performing data cleaning on file data in the data blocks according to an operation profile of the user; the data cleaning on the file data in the data blocks according to the operation profile of the user comprises: obtaining file data in a data block and obtaining a use frequency of the file data, if the use frequency reaches a frequency threshold, the file data is not processed; obtaining the use frequency of the file data, if the use frequency does not reach the frequency threshold, judging whether there is second file data identical to the file data in each data block and the use frequency of the second file data reaches the frequency threshold, if yes, deleting the file data and storing a reference path of the second file data in the current data block. Obtaining the usage times of the file data, if the usage times do not reach a threshold, judging whether there is second file data same as the file data in each data block and the usage times of the second file data reach the threshold, if yes, deleting the file data and storing the reference path of the second file data in the current data block.

5. The dynamic cleaning terminal for block storage data according to claim 4, wherein, The data block of the user is traversed by the cache cleaning block, including: A block map is established for all data blocks of the user, and a corresponding node map is established for each data block, when the data block of the user is traversed by the cache cleaning block using the block map, the node data of the corresponding data block is traversed through the node map.

6. The dynamic cleaning terminal for block storage data according to claim 4, wherein, Data cleaning is performed according to the mark in the data block, including: If the mark of the file data in the data block is an important long-term mark, the file data is not processed; If the mark of the file data in the data block is an important temporary mark, when the file data reaches a temporary expiration time, the mark of the file data is changed to a temporary data mark; If the mark of the file data in the data block is a temporary data mark, when the file data is in a usage state, a usage label is added to the file data, and when the file data is in an idle state, the file data is cleaned.

Citation Information

Patent Citations

  • IOS engineering useless file cleaning method and computer readable storage medium

    CN108897569A

  • Personal computer storage management system based on machine learning

    CN116301646A