File mobile storage management method and system
By classifying files according to type and attributes, and identifying and deleting low-importance files in preset time periods, the problems of full storage space and low file management efficiency in mobile storage systems are solved, and efficient, secure and intelligent file management is achieved.
Patent Information
- Application Number
- CN202411817069.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-25
AI Technical Summary
Existing mobile storage systems will automatically clean up files when the storage space is full, which may delete important files and lack system management, resulting in low file management efficiency and insufficient storage space utilization.
A file mobile storage management method is proposed. By storing files into corresponding storage nodes in the database according to type and attributes, and extracting files within a preset time period for importance identification, calculating and analyzing index, deleting low-importance files according to the importance index threshold, optimizing the use of storage space.
It realizes efficient management of mobile files, improves file retrieval speed and accuracy, frees up storage space, improves the utilization rate of storage resources, and enhances the security and intelligence of file management.
Smart Images

Figure CN119884051A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile storage technology, and in particular to a file mobile storage management method and system. Background Art
[0002] With the popularity of mobile devices and the explosive growth of data, file mobile storage management has become increasingly important. In modern society, people need to access, store and share a large number of files anytime and anywhere, which puts higher demands on the storage capacity of mobile devices. However, the storage space of mobile devices is limited, so an efficient file mobile storage management method is needed to optimize the use of storage space.
[0003] A Chinese patent with publication number CN108647291B discloses a mobile terminal file management method, device, electronic device and readable storage medium. The method includes: establishing a temporary folder under the trigger of a user operation, and the temporary folder is displayed simultaneously with the file list of the mobile terminal; establishing a temporary file list under the temporary folder according to a file selection operation on the file list; establishing a subordinate folder under the temporary folder, and the subordinate folder corresponds to a temporary file list; mapping the file management operation of the temporary file list to the corresponding folder; hiding the temporary folder and displaying the icon of the temporary folder when an operation that triggers the hiding of the temporary folder is monitored; and displaying the temporary folder after detecting a user click on the icon.
[0004] Current mobile storage systems often encounter the situation where the storage space is full, which affects the use of storage products. When the storage space is full, the system will automatically clean up the files, often deleting some important files. In addition, there is no systematic management of the saved files, which is inconvenient for subsequent management and reference, and reduces the effect of file mobile storage management. Summary of the invention
[0005] In view of this, the present invention proposes a mobile storage management method and system, which not only deletes unimportant files at regular intervals and reserves a certain storage space for convenient storage, but also systematically manages the saved files, thereby improving the efficient management of mobile terminal files.
[0006] The technical solution of the present invention is implemented as follows: In a first aspect, the present invention provides a file mobile storage management method, the method comprising the following steps:
[0007] S1, stores the files in the corresponding storage nodes in the database according to their types and attributes;
[0008] S2, extracting all files stored in a preset time period from each storage node, and storing them in each buffer node of the storage module according to the file type and attribute;
[0009] S3, obtaining all files in each buffer node, identifying the importance of each file content in turn, and calculating the analysis index of each file;
[0010] S4, obtains the corresponding importance index threshold according to the type and attribute, compares the analysis index of each file with the corresponding importance index threshold, deletes the corresponding files in each storage node that are lower than the importance index threshold, and stores the files in each buffer node in the corresponding storage node in the database according to the type and attribute.
[0011] On the basis of the above technical solution, preferably, the step S1 stores the files in corresponding storage nodes in the database according to their types and attributes, wherein the file types include text types, picture types and audio types, and the file attributes are the fields to which the files belong; each file is stored in a corresponding storage node in the database according to the file type and the corresponding subject field, and the file type, file attributes and storage time information are written into the corresponding file storage information.
[0012] Based on the above technical solution, preferably, the file storage information also includes storage coding information, file name information, number of clicks and storage node address information. The storage coding information is generated according to the file type, file attributes and storage time information according to preset coding rules, and the storage node address information is mapped to the file stored in the storage node.
[0013] On the basis of the above technical scheme, preferably, the encoding rule is that the file type is represented by two binary digits, the binary representation of the text type file is 11, the binary representation of the picture type file is 10, and the binary representation of the audio type file is 01; for the file attributes, the Chinese name of the field to which the file belongs is obtained, and then the Chinese name of the field to which it belongs is split into characters, the pinyin initials of each Chinese character are obtained, and converted into binary ASCII codes; for the file storage time information, the corresponding storage time information is converted into binary representation; the storage encoding information is sequentially spliced according to the file type, file attributes and storage time information.
[0014] Based on the above technical solution, preferably, the step S3 of obtaining all files in each buffer node, identifying the importance of each file content in turn, and calculating the analysis index of each file includes the following sub-steps:
[0015] S31, establishing a corresponding keyword library according to each file type and attribute, wherein the keyword library includes professional keywords, auxiliary keywords and general keywords, wherein the professional keywords, auxiliary keywords and general keywords respectively correspond to different scoring values;
[0016] S32, establishing a similarity matching algorithm, obtaining all files in each buffer node, determining the type of the currently obtained file in turn, and extracting keywords from the file using the keyword library and the similarity matching algorithm;
[0017] S33, assigning corresponding scoring values to the extracted keywords according to their types, and calculating the total scoring values of all the keywords in the document as the analysis index of the document.
[0018] Based on the above technical solution, preferably, in step S32, all files in each buffer node are obtained, the types of the currently obtained files are judged in turn, and keywords are extracted from the files using a keyword library and a similarity matching algorithm, wherein:
[0019] When the file type is a document type, data preprocessing is performed on the document content, and keywords are extracted from the document using a keyword library and similarity matching algorithm;
[0020] When the acquired file type is a picture type, an image recognition algorithm is used to identify the object features of the current picture, and the identification text information of each object in the image is obtained. The identification text information of each object in the image is spliced and converted into a document, and data preprocessing is performed on the document content. The keyword library and similarity matching algorithm are used to extract keywords from the document;
[0021] When the file type is audio, the audio is input into the conversion tool to be converted into text, an audio document file is obtained, data preprocessing is performed on the document content, and keywords are extracted from the document using a keyword library and similarity matching algorithm.
[0022] On the basis of the above technical solution, preferably, the step S32 performs data preprocessing on the document content, and extracts keywords from the document using a keyword library and a similarity matching algorithm, which includes the following sub-steps:
[0023] Performing data preprocessing on the document content to obtain keywords to be identified, wherein the data preprocessing includes extracting, cleaning, segmenting, removing stop words and restoring the word form of the document content;
[0024] Set the corresponding keyword matching threshold, traverse the keywords to be identified, use the similarity matching algorithm to calculate the current keyword to be identified and the keywords in the keyword library to obtain the matching similarity, if the matching similarity of the current keyword to be identified is greater than the corresponding preset keyword matching threshold, then extract the keyword to be identified;
[0025] The keyword matching algorithm is:
[0026]
[0027] In the formula, W is the matching similarity of keywords, A i is the i-th element of the text vector of the keyword to be identified, B i is the i-th element of the text component of the keyword library corresponding to the file type and attribute, n is the text vector of the keyword to be identified and the number of elements in the corresponding keyword library, w i is the weight coefficient corresponding to the ith element of the text vector of the ith keyword to be identified, the w i The weight coefficient is determined according to the frequency of the keywords to be identified.
[0028] On the basis of the above technical solution, preferably, the step S4 described in which the corresponding importance index threshold is obtained according to the type and attribute, the analysis index of each file is compared with the corresponding importance index threshold, the corresponding files in each storage node that are lower than the importance index threshold are deleted, and the files in each buffer node are stored in the corresponding storage node in the database according to the type and attribute, wherein the following sub-steps are included:
[0029] S41, obtaining a corresponding importance index threshold according to the type and attribute;
[0030] S42, comparing the analysis index of each file with the corresponding importance index threshold, and marking the files below the corresponding importance index threshold and the files above the corresponding importance index threshold in the buffer node respectively by Boolean, wherein the Boolean value of the file mark below the corresponding importance index threshold is 1, and the Boolean value of the file mark above the corresponding importance index threshold is 0;
[0031] S43, matching the storage information of the files in each buffer node with the storage information of each file in the storage node of the corresponding type and attribute, obtaining the Boolean value of the corresponding mark, and deleting the file whose corresponding Boolean value in the storage node is 1;
[0032] S44, obtaining the number of clicks on the file whose Boolean value is 0 in the storage node, and obtaining the average number of clicks on the field to which the corresponding file type belongs in turn, and the calculation expression is:
[0033]
[0034] In the formula, x is the average number of clicks in the field to which the corresponding file type belongs, a is the number of files in the field to which the corresponding file type belongs, m is the file type, j is the field to which it belongs, and D a is the number of clicks on the ath file in the field to which the corresponding file type belongs;
[0035] The number of clicks on each file is compared with the corresponding average number of clicks. If the number of clicks on a file is less than the corresponding average number of clicks, compression processing is performed. After all files are processed, the files in each buffer node are deleted.
[0036] Based on the above technical solution, preferably, the step S41 of obtaining the corresponding importance index threshold according to the type and attribute includes the following sub-steps:
[0037] S411, arranging the analysis index of each file in each buffer node in descending order, and adding them to the corresponding data set in order, and randomly selecting several data points in the data set as the initial set center;
[0038] S412, for each data point in the data set, calculating the distance from the data point to the center of each set;
[0039] S413, assigning each data point to the set where the set center closest to it is located;
[0040] S414, recalculating the center of each set according to the data in each set, where the center of each set is the average value of all data points in the set;
[0041] S415, repeat the iteration until the centers of each set no longer change and then stop the iteration;
[0042] S416, obtaining the number of data in each set, and selecting the set with the largest number of data and the boundary value far away from the maximum data point as the importance index threshold.
[0043] In a second aspect, the present invention further provides a mobile terminal file storage management system, the system comprising:
[0044] The storage module is used to store files in corresponding storage nodes in the database according to their types and attributes;
[0045] The cache module is used to extract all files stored in a preset time period from each storage node and store them in each buffer node of the storage module according to the file type and attribute;
[0046] The identification module is used to obtain all files in each buffer node, identify the importance of each file content in turn, and calculate the analysis index of each file;
[0047] The screening module is used to obtain the corresponding importance index threshold according to the type and attribute, compare the analysis index of each file with the corresponding importance index threshold, delete the corresponding files in each storage node that are lower than the importance index threshold, and store the files in each buffer node in the corresponding storage node in the database according to the type and attribute.
[0048] The file mobile storage management method and system of the present invention have the following beneficial effects compared with the prior art:
[0049] (1) Files are classified according to type and attribute and stored in the corresponding storage nodes in the database. This classified storage method optimizes the use of storage space and greatly improves the speed and accuracy of file retrieval. Within a preset time period, files are extracted from each storage node and stored in the buffer node of the storage module according to type and attribute. All files in the buffer node are obtained, and the importance of each file content is identified, and the analysis index of the file is calculated. The corresponding importance index threshold is obtained according to the file type and attribute. The analysis index of each file is compared with this threshold. Files below the threshold will be deleted, and files above the threshold will be re-stored in the corresponding storage node in the database. This method can analyze files at regular intervals and filter out unimportant files for deletion. It can not only improve the efficiency and accuracy of file management, but also release storage space and improve the utilization of storage resources;
[0050] (2) By storing the coded information, the file type, file attributes and storage time information are generated according to the preset coding rules to form a binary array representation. Since the stored coded information is converted into a binary array, the matching process can be performed at the binary level, which is faster than string matching. In addition, the use of binary coding can reduce the risk of information leakage, because even if it is intercepted, the attacker needs to know the coding rules to decipher useful information, thereby improving the speed of file query and the security of management;
[0051] (3) By determining the importance index threshold based on type and attribute, it can ensure that files of different types and attributes are properly processed. By determining the threshold through a set method, it can reflect the importance distribution of files under this type and attribute. At the same time, taking into account the distribution of data, it is beneficial for the system to manage files more intelligently and meet the needs of different users. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A schematic diagram of the structure of a device in a hardware operating environment involved in an embodiment of the present invention;
[0054] Figure 2It is a flowchart of the file mobile storage management method of the present invention;
[0055] Figure 3 It is a schematic diagram of the functional modules of the file mobile storage management system of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] like Figure 1 As shown, the device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0058] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation of the device. In actual applications, the device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0059] like Figure 1 As shown, the memory 1005 as a medium may include an operating system, a network communication module, a user interface module, and a file mobile storage management method program.
[0060] exist Figure 1In the device shown, the network interface 1004 is mainly used to establish a communication connection between the device and a server storing all data required in the file mobile storage management method system; the user interface 1003 is mainly used to interact with the user for data; the processor 1001 and the memory 1005 in the file mobile storage management method device of the present invention can be set in the file mobile storage management method device, and the file mobile storage management method device calls the file mobile storage management method program stored in the memory 1005 through the processor 1001, and executes the file mobile storage management method provided by the implementation of the present invention.
[0061] like Figure 2 As shown, the present invention provides a file mobile storage management method, the method comprising the following steps:
[0062] S1, stores the files in the corresponding storage nodes in the database according to their types and attributes;
[0063] Among them, file types include text type, image type and audio type, and the file attribute is the field to which the file belongs; each file is stored in the corresponding storage node in the database according to the file type and the corresponding subject field, and the file type, file attribute and storage time information are written into the corresponding file storage information.
[0064] It should be noted that files include three types: text, pictures and audio. The fields they belong to are marked as file attributes. According to the type and field, these files are classified and stored in the corresponding nodes of the database, and the type, attributes and storage time are recorded. In order to achieve efficient file management, they are classified and stored in the corresponding storage nodes of the database according to the type and field of the file. This classified storage method optimizes the use of storage space and greatly improves the speed and accuracy of file retrieval.
[0065] In addition, the file storage information in this embodiment also includes storage coding information, file name information, number of clicks and storage node address information. The storage coding information is generated according to the file type, file attributes and storage time information according to preset coding rules, and the storage node address information is mapped to the file stored in the storage node.
[0066] In this embodiment, the encoding rules are as follows: for file types, two bits of binary are used to represent them. The binary representation of text type files is 11, the binary representation of picture type files is 10, and the binary representation of audio type files is 01; for file attributes, the Chinese name of the field to which the file belongs is obtained, and then the Chinese name of the field to which it belongs is split into characters, the first pinyin letter of each Chinese character is obtained, and converted into binary ASCII code; for file storage time information, the corresponding storage time information is converted into binary representation; the storage encoding information is composed of the file type, file attributes and storage time information in sequence.
[0067] It should be noted that the storage coding information is represented by a binary array consisting of these three items and is stored in the file storage information. When searching, the host inputs the storage coding information, the system converts it into a corresponding binary number, matches each storage node in the database, and screens files that meet the matching conditions. Since the storage coding information is converted into a binary array, the matching process can be performed at the binary level, which is faster than string matching. In addition, the use of binary coding can reduce the risk of information leakage, because even if it is intercepted, the attacker needs to know the coding rules to decipher useful information, thereby improving the security of file management.
[0068] S2, extracting all files stored in a preset time period from each storage node, and storing them in each buffer node of the storage module according to the file type and attribute;
[0069] It should be noted that, first, determine the preset time period for extracting files. The preset time period is a continuous time period, which can be a week, a month or a specific date range. Specifically, it is set according to actual conditions, traverse all storage nodes, find and extract files stored in the preset time period, and the system can set the time period by itself. After the set time period, the system automatically finds and extracts all stored files in the time period, analyzes each extracted file, determines its type and attributes, and stores the files in the corresponding buffer nodes in the storage module according to the file type and attributes. Storing files in buffer nodes according to type and attribute classification can speed up subsequent access to files of specific types or attributes; because the system only needs to search in the relevant buffer nodes instead of traversing all storage nodes, thereby improving data access efficiency, classified storage is conducive to better management of data, and different backup, compression or encryption strategies can be formulated for different types of files to meet specific business needs, thereby improving and optimizing data management.
[0070] S3, obtaining all files in each buffer node, identifying the importance of each file content in turn, and calculating the analysis index of each file;
[0071] The following sub-steps are included:
[0072] S31, establishing a corresponding keyword library according to each file type and attribute, wherein the keyword library includes professional keywords, auxiliary keywords and general keywords, wherein the professional keywords, auxiliary keywords and general keywords respectively correspond to different scoring values;
[0073] S32, establishing a similarity matching algorithm, obtaining all files in each buffer node, determining the type of the currently obtained file in turn, and extracting keywords from the file using the keyword library and the similarity matching algorithm;
[0074] When the file type is a document type, data preprocessing is performed on the document content, and keywords are extracted from the document using a keyword library and a similarity matching algorithm;
[0075] When the acquired file type is a picture type, an image recognition algorithm is used to identify the object features of the current picture, and the identification text information of each object in the image is obtained. The identification text information of each object in the image is spliced and converted into a document, and data preprocessing is performed on the document content. The keyword library and similarity matching algorithm are used to extract keywords from the document;
[0076] When the file type is audio, the audio is input into the conversion tool to be converted into text, an audio document file is obtained, data preprocessing is performed on the document content, and keywords are extracted from the document using a keyword library and similarity matching algorithm.
[0077] It should be noted that, for picture-type files, an image recognition algorithm is used to identify the features of objects in the picture and convert them into text descriptions. The text information of each object identified in the picture is spliced to form a descriptive document. The spliced document is subjected to the same data preprocessing steps as the document type, and keywords are extracted from the preprocessed document using a keyword library and a similarity matching algorithm. The image recognition algorithm is trained through a convolutional neural network. Speech recognition technology is used to convert audio files into text-formatted documents, and the converted audio documents are subjected to the same data preprocessing steps as the document type, and keywords are extracted from the preprocessed document using a keyword library and a similarity matching algorithm.
[0078] In step S32 of this embodiment, data preprocessing is performed on the document content, and keywords are extracted from the document using a keyword library and a similarity matching algorithm, which includes the following sub-steps:
[0079] Performing data preprocessing on the document content to obtain keywords to be identified, wherein the data preprocessing includes extracting, cleaning, segmenting, removing stop words and restoring the word form of the document content;
[0080] Set the corresponding keyword matching threshold, traverse the keywords to be identified, use the similarity matching algorithm to calculate the current keyword to be identified and the keywords in the keyword library to obtain the matching similarity, if the matching similarity of the current keyword to be identified is greater than the corresponding preset keyword matching threshold, then extract the keyword to be identified;
[0081] The keyword matching algorithm is:
[0082]
[0083] In the formula, W is the matching similarity of keywords, A i is the i-th element of the text vector of the keyword to be identified, B i is the i-th element of the text component of the keyword library corresponding to the file type and attribute, n is the text vector of the keyword to be identified and the number of elements in the corresponding keyword library, w i is the weight coefficient corresponding to the ith element of the text vector of the ith keyword to be identified, the w i The weight coefficient is determined according to the frequency of the keywords to be identified.
[0084] It should be noted that by calculating the weighted similarity between the keywords to be identified and the keywords in the keyword library, the relevance of the keywords to the document content can be judged more accurately, the number of mis-extracted keywords can be reduced, and the accuracy of keyword extraction can be improved. The weight coefficient w i The importance of each keyword can be taken into account when calculating similarity. The weight coefficient determined based on word frequency or other indicators can make important and frequent keywords have a greater influence in similarity calculation, thereby improving the effectiveness of keyword extraction.
[0085] S33, assigning corresponding scoring values to the extracted keywords according to their types, and calculating the total scoring values of all the keywords in the document as the analysis index of the document.
[0086] It should be noted that professional keywords are lists of professional terms and proper nouns established for each file type and field, auxiliary keywords are other keywords related to the file content in addition to professional keywords, and general keywords are general words or phrases applicable to all file types. Professional keywords, auxiliary keywords and general keywords have different corresponding scoring values, and different scoring values are assigned to each keyword to reflect its importance in the file content. The scoring value can be set based on the rarity and professionalism of the keyword and its context in the file content.
[0087] Specifically, the scoring value corresponding to the professional keywords in this embodiment is 3 points; the scoring value corresponding to the auxiliary keywords is 2 points; and the scoring value corresponding to the general keywords is 1 point; wherein, the keyword library can be customized for different fields to support the importance identification of cross-domain files, and the keyword library can be updated and expanded as needed to adapt to new fields or changing needs. Through the keyword library, the system can more accurately identify and understand the file content, thereby improving the accuracy of importance identification.
[0088] The system can comprehensively and accurately identify the importance of files in each buffer node and calculate the corresponding analysis index, which not only improves the efficiency of data management, but also provides strong support for subsequent data analysis and decision-making.
[0089] S4, obtains the corresponding importance index threshold according to the type and attribute, compares the analysis index of each file with the corresponding importance index threshold, deletes the corresponding files in each storage node that are lower than the importance index threshold, and stores the files in each buffer node in the corresponding storage node in the database according to the type and attribute.
[0090] Wherein, step S4 includes the following sub-steps:
[0091] S41, obtaining a corresponding importance index threshold according to the type and attribute;
[0092] Step S41 includes the following sub-steps:
[0093] S411, arranging the analysis index of each file in each buffer node in descending order, and adding them to the corresponding data set in order, and randomly selecting several data points in the data set as the initial set center;
[0094] S412, for each data point in the data set, calculating the distance from the data point to the center of each set;
[0095] S413, assigning each data point to the set where the set center closest to it is located;
[0096] S414, recalculating the center of each set according to the data in each set, where the center of each set is the average value of all data points in the set;
[0097] S415, repeat the iteration until the centers of each set no longer change and then stop the iteration;
[0098] S416, obtaining the number of data in each set, and selecting the set with the largest number of data and the boundary value far away from the maximum data point as the importance index threshold.
[0099] S42, comparing the analysis index of each file with the corresponding importance index threshold, and marking the files below the corresponding importance index threshold and the files above the corresponding importance index threshold in the buffer node respectively by Boolean, wherein the Boolean value of the file mark below the corresponding importance index threshold is 1, and the Boolean value of the file mark above the corresponding importance index threshold is 0;
[0100] S43, matching the storage information of the files in each buffer node with the storage information of each file in the storage node of the corresponding type and attribute, obtaining the Boolean value of the corresponding mark, and deleting the file whose corresponding Boolean value in the storage node is 1;
[0101] S44, obtaining the number of clicks on the file whose Boolean value is 0 in the storage node, and obtaining the average number of clicks on the field to which the corresponding file type belongs in turn, and the calculation expression is:
[0102]
[0103] In the formula, x is the average number of clicks in the field to which the corresponding file type belongs, a is the number of files in the field to which the corresponding file type belongs, m is the file type, j is the field to which it belongs, and D a is the number of clicks on the ath file in the field to which the corresponding file type belongs;
[0104] The number of clicks on each file is compared with the corresponding average number of clicks. If the number of clicks on a file is less than the corresponding average number of clicks, compression processing is performed. After all files are processed, the files in each buffer node are deleted.
[0105] It should be noted that the importance index threshold determined based on type and attribute can ensure that files of different types and attributes are properly processed. The set with the largest amount of data is selected from the set results, and the boundary value farthest from the maximum data point is selected as the importance index threshold, which ensures that the threshold can reflect the importance distribution of files of this type and attribute. Taking into account the distribution of data at the same time, it is beneficial for the system to manage files more intelligently and meet the needs of different users. By deleting files below the importance index threshold, a large amount of unnecessary storage space can be released, making the storage space more efficiently utilized.
[0106] In a second aspect, the present invention further provides a mobile terminal file storage management system, the system comprising:
[0107] The storage module is used to store files in corresponding storage nodes in the database according to their types and attributes;
[0108] The cache module is used to extract all files stored in a preset time period from each storage node and store them in each buffer node of the storage module according to the file type and attribute;
[0109] The identification module is used to obtain all files in each buffer node, identify the importance of each file content in turn, and calculate the analysis index of each file;
[0110] The screening module is used to obtain the corresponding importance index threshold according to the type and attribute, compare the analysis index of each file with the corresponding importance index threshold, delete the corresponding files in each storage node that are lower than the importance index threshold, and store the files in each buffer node in the corresponding storage node in the database according to the type and attribute.
[0111] In addition, it should be noted that the device embodiments described above are merely illustrative and do not limit the scope of protection of the present invention. In practical applications, technicians in this field can select some or all of the modules according to actual needs to achieve the purpose of the present embodiment, and no restrictions are made here.
[0112] In addition, for technical details not fully described in this embodiment, reference can be made to the mobile terminal file storage management method provided in any embodiment of the present invention, and will not be repeated here.
[0113] In addition, the present invention provides a computer medium, which is a computer medium, and a mobile terminal file storage management method program is stored on the computer medium. When the mobile terminal file storage management method program is executed by a processor, the steps of the mobile terminal file storage management method as described above are implemented.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A file mobile storage management method, characterized in that: The method comprises the following steps: S1, stores the files in the corresponding storage nodes in the database according to their types and attributes; S2, extracting all files stored in a preset time period from each storage node, and storing them in each buffer node of the storage module according to the file type and attribute; S3, obtaining all files in each buffer node, identifying the importance of each file content in turn, and calculating the analysis index of each file; S4, obtains the corresponding importance index threshold according to the type and attribute, compares the analysis index of each file with the corresponding importance index threshold, deletes the corresponding files in each storage node that are lower than the importance index threshold, and stores the files in each buffer node in the corresponding storage node in the database according to the type and attribute.
2. The file mobile storage management method according to claim 1, characterized in that: Step S1 stores the files in corresponding storage nodes in the database according to their types and attributes, wherein the file types include text types, image types and audio types, and the file attributes are the fields to which the files belong; each file is stored in a corresponding storage node in the database according to the file type and the corresponding subject field, and the file type, file attributes and storage time information are written into the corresponding file storage information.
3. The file mobile storage management method according to claim 2, characterized in that: The file storage information also includes storage coding information, file name information, number of clicks and storage node address information. The storage coding information is generated according to the file type, file attributes and storage time information according to preset coding rules. The storage node address information is mapped to the file stored in the storage node.
4. The file mobile storage management method according to claim 3, characterized in that: The encoding rule is that the file type is represented by two binary digits, the binary representation of text type files is 11, the binary representation of picture type files is 10, and the binary representation of audio type files is 01; for file attributes, the Chinese name of the field to which the file belongs is obtained, and then the Chinese name of the field to which it belongs is split into characters, the pinyin initials of each Chinese character are obtained, and converted into binary ASCII codes; for file storage time information, the corresponding storage time information is converted into binary representation; the storage encoding information is sequentially spliced according to the file type, file attributes and storage time information.
5. The file mobile storage management method according to claim 4, characterized in that: The step S3 of obtaining all files in each buffer node, identifying the importance of each file content in turn, and calculating the analysis index of each file includes the following sub-steps: S31, establishing a corresponding keyword library according to each file type and attribute, wherein the keyword library includes professional keywords, auxiliary keywords and general keywords, wherein the professional keywords, auxiliary keywords and general keywords respectively correspond to different scoring values; S32, establishing a similarity matching algorithm, obtaining all files in each buffer node, determining the type of the currently obtained file in turn, and extracting keywords from the file using the keyword library and the similarity matching algorithm; S33, assigning corresponding scoring values to the extracted keywords according to their types, and calculating the total scoring values of all the keywords in the document as the analysis index of the document.
6. The file mobile storage management method according to claim 5, characterized in that: In step S32, all files in each buffer node are obtained, the types of the currently obtained files are determined in turn, and keywords are extracted from the files using the keyword library and similarity matching algorithm, wherein: When the file type is a document type, data preprocessing is performed on the document content, and keywords are extracted from the document using a keyword library and similarity matching algorithm; When the acquired file type is a picture type, an image recognition algorithm is used to identify the object features of the current picture, and the identification text information of each object in the image is obtained. The identification text information of each object in the image is spliced and converted into a document, and data preprocessing is performed on the document content. The keyword library and similarity matching algorithm are used to extract keywords from the document; When the file type is audio, the audio is input into the conversion tool to be converted into text, an audio document file is obtained, data preprocessing is performed on the document content, and keywords are extracted from the document using a keyword library and similarity matching algorithm.
7. The file mobile storage management method according to claim 6, characterized in that: Step S32 performs data preprocessing on the document content, and extracts keywords from the document using a keyword library and a similarity matching algorithm, which includes the following sub-steps: Preprocessing the document content to obtain keywords to be identified, wherein the preprocessing includes extracting, cleaning, segmenting, removing stop words and restoring the word form of the document content; Set the corresponding keyword matching threshold, traverse the keywords to be identified, use the similarity matching algorithm to calculate the current keyword to be identified and the keywords in the keyword library to obtain the matching similarity, if the matching similarity of the current keyword to be identified is greater than the corresponding preset keyword matching threshold, then extract the keyword to be identified; The keyword matching algorithm is: In the formula, W is the matching similarity of keywords, A i is the i-th element of the text vector of the keyword to be identified, B i is the i-th element of the text component of the keyword library corresponding to the file type and attribute, n is the text vector of the keyword to be identified and the number of elements in the corresponding keyword library, w i is the weight coefficient corresponding to the ith element of the text vector of the ith keyword to be identified, the w i The weight coefficient is determined according to the frequency of the keywords to be identified.
8. The file mobile storage management method according to claim 7, characterized in that: The step S4 obtains the corresponding importance index threshold according to the type and attribute, compares the analysis index of each file with the corresponding importance index threshold, deletes the corresponding files in each storage node that are lower than the importance index threshold, and stores the files in each buffer node in the corresponding storage node in the database according to the type and attribute, which includes the following sub-steps: S41, obtaining a corresponding importance index threshold according to the type and attribute; S42, comparing the analysis index of each file with the corresponding importance index threshold, and marking the files below the corresponding importance index threshold and the files above the corresponding importance index threshold in the buffer node respectively by Boolean, wherein the Boolean value of the file mark below the corresponding importance index threshold is 1, and the Boolean value of the file mark above the corresponding importance index threshold is 0; S43, matching the storage information of the files in each buffer node with the storage information of each file in the storage node of the corresponding type and attribute, obtaining the Boolean value of the corresponding mark, and deleting the file whose corresponding Boolean value in the storage node is 1; S44, obtaining the number of clicks on the file whose Boolean value is 0 in the storage node, and obtaining the average number of clicks on the field to which the corresponding file type belongs in turn, and the calculation expression is: In the formula, x is the average number of clicks in the field to which the corresponding file type belongs, a is the number of files in the field to which the corresponding file type belongs, m is the file type, j is the field to which it belongs, and D a is the number of clicks on the ath file in the field to which the corresponding file type belongs; The number of clicks on each file is compared with the corresponding average number of clicks. If the number of clicks on a file is less than the corresponding average number of clicks, compression processing is performed. After all files are processed, the files in each buffer node are deleted.
9. A file mobile storage management method as claimed in claim 8, characterized in that: The step S41 of obtaining the corresponding importance index threshold according to the type and attribute includes the following sub-steps: S411, arranging the analysis index of each file in each buffer node in descending order, and adding them to the corresponding data set in order, and randomly selecting several data points in the data set as the initial set center; S412, for each data point in the data set, calculating the distance from the data point to the center of each set; S413, assigning each data point to the set where the set center closest to it is located; S414, recalculating the center of each set according to the data in each set, where the center of each set is the average value of all data points in the set; S415, repeat the iteration until the centers of each set no longer change and then stop the iteration; S416, obtaining the number of data in each set, and selecting the set with the largest number of data and the boundary value far away from the maximum data point as the importance index threshold.
10. A file mobile storage management system, characterized in that: The system comprises: The storage module is used to store files in corresponding storage nodes in the database according to their types and attributes; The cache module is used to extract all files stored in a preset time period from each storage node and store them in each buffer node of the storage module according to the file type and attribute; The identification module is used to obtain all files in each buffer node, identify the importance of each file content in turn, and calculate the analysis index of each file; The screening module is used to obtain the corresponding importance index threshold according to the type and attribute, compare the analysis index of each file with the corresponding importance index threshold, delete the corresponding files in each storage node that are lower than the importance index threshold, and store the files in each buffer node in the corresponding storage node in the database according to the type and attribute.
Citation Information
Patent Citations
Mobile file management methods, devices, electronic devices and readable storage media
CN108647291B
Cited By
Classified storage method and device based on data content identification
CN120353412A