A method and system for clearing redundant files
By generating an array of mapped objects and clearing redundant files, the problem of redundant data during file upload was solved, improving server storage efficiency and user experience.
Patent Information
- Application Number
- CN202311327689.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-10-13
AI Technical Summary
Existing technologies tend to generate redundant data during file uploads, consuming server storage resources and reducing storage efficiency and user experience.
By generating first and second configuration files, and using the first and second preset programs to generate an array of mapping objects, redundant data in the target database is automatically found and cleared, including real-time data collection, URL data splitting, generation of mapping elements and file information, and finally, the redundant files are transferred to the preset recycle bin.
This effectively avoids generating a large amount of redundant data on the server, improving server storage efficiency and user experience.
Smart Images

Figure CN117290348B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and system for clearing redundant files. Background Technology
[0002] With the advancement of technology and the rapid development of productivity, the Internet has become ubiquitous in people's daily lives, enabling them to learn, shop, and enjoy entertainment online, greatly facilitating their lives.
[0003] People upload and share files on the Internet. In most existing technologies, users click the upload button and select the corresponding file. After the file is uploaded, the server will return a URL (Uniform Resource Locator) address. Then, the user submits the URL address to the designated business interface, and the business database stores the URL address to complete the file upload.
[0004] However, this upload method is prone to the phenomenon that users forget to click the final submit form button after clicking the upload button. Over a long period of time, this will cause the server to store a lot of untagged business files in the business database, which will generate a lot of redundant files. These redundant files will occupy a lot of storage resources on the server, thereby reducing the server's storage efficiency and the user experience. Summary of the Invention
[0005] Therefore, the purpose of this invention is to provide a method and system for clearing redundant files, so as to solve the problem that a lot of redundant data is generated during the file upload process in the prior art.
[0006] The first aspect of the present invention proposes:
[0007] A method for clearing redundant files, wherein the method includes:
[0008] Obtain the database type to be accessed, and generate the corresponding first configuration file in the first preset program according to the database type;
[0009] Obtain the IP address of the second preset program, and generate the corresponding second configuration file in the second preset program based on the IP address;
[0010] Data in the target database is collected in real time through the first configuration file to generate an array of mapping objects corresponding to the first preset program and a mapping object corresponding to the second preset program. The array of mapping objects is then sent from the first preset program to the second preset program according to the mapping objects.
[0011] The second preset program parses the file information contained in the mapping object array and removes redundant data in the target database based on the file information.
[0012] The beneficial effects of this invention are as follows: By generating corresponding first configuration files and second configuration files through the first preset program and the second preset program, a mapping object array and mapping objects for finding redundant data can be generated according to the target database to be processed. Furthermore, by sending the current mapping object array to the second preset program, the second preset program can automatically find the required file information in the target database and further automatically clear the redundant data in the current target file storage folder according to the file information. This can avoid the generation of a large amount of redundant data in the server, improve the server's storage efficiency, and enhance the user experience.
[0013] Furthermore, the step of collecting data from the target database in real time through the first configuration file includes:
[0014] When the first configuration file is obtained, the first raw data contained in the target database is extracted through the first configuration file, and the first raw data is converted into corresponding URL data;
[0015] The URL data is split to extract corresponding URL value arrays and URL prefixes, and a correspondence is constructed between each URL value array, each URL prefix and a preset mapping function to generate corresponding mapping elements.
[0016] The mapping object array is generated based on the mapping elements.
[0017] Furthermore, the step of generating the array of mapping objects based on the mapping elements includes:
[0018] When several mapping elements are obtained, the several mapping elements are integrated to generate the corresponding mapping object array;
[0019] The first target time corresponding to the generation of the mapping object array is collected in real time, and a corresponding first timestamp is generated based on the first target time. The first target time is unique.
[0020] Furthermore, the step of collecting data from the target database in real time through the first configuration file includes:
[0021] When the second configuration file is obtained, the second original data contained in the target database is extracted through the second configuration file, and the second original data is parsed and processed to filter out the storage address prefix and file name set of the user-uploaded files accordingly.
[0022] The storage address prefix and the set of filenames are combined to generate the corresponding mapping object.
[0023] Furthermore, the step of parsing the file information contained in the mapping object array through the second preset program includes:
[0024] The second preset program extracts the array of mapping objects and several file storage paths contained in the mapping objects, and merges the same file storage paths to generate a corresponding path set array.
[0025] A corresponding array of filename sets is generated based on the set of filenames, and the array of path sets and the array of filename sets together constitute the file information.
[0026] Furthermore, the method also includes:
[0027] The elements contained in the filename set array and the path set array are compared in real time, and the target element array that exists in the filename set array but does not exist in the path set array is extracted.
[0028] Perform a full scan on the array of filenames and extract the target files whose filenames belong to the target element array;
[0029] The target files are moved to a preset recycle bin folder, and there are multiple target files.
[0030] Furthermore, the method also includes:
[0031] Set a time point, and delete the target file in the preset recycle bin folder each time the time point is reached.
[0032] The second aspect of the present invention proposes:
[0033] A redundant file removal system, wherein the system comprises:
[0034] The acquisition module is used to acquire the database type to be accessed and generate a corresponding first configuration file in a first preset program according to the database type.
[0035] The processing module is used to obtain the IP address of the second preset program and generate a corresponding second configuration file in the second preset program according to the IP address;
[0036] The mapping module is used to collect data from the target database in real time through the first configuration file, generate an array of mapping objects corresponding to the first preset program and a mapping object corresponding to the second preset program, and send the array of mapping objects from the first preset program to the second preset program according to the mapping objects;
[0037] The clearing module is used to parse the file information contained in the mapped object array through the second preset program, and clear redundant data in the target file storage folder according to the file information.
[0038] Furthermore, the mapping module is specifically used for:
[0039] When the first configuration file is obtained, the first raw data contained in the target database is extracted through the first configuration file, and the first raw data is converted into corresponding URL data;
[0040] The URL data is split to extract corresponding URL value arrays and URL prefixes, and a correspondence is constructed between each URL value array, each URL prefix and a preset mapping function to generate corresponding mapping elements.
[0041] The mapping object array is generated based on the mapping elements.
[0042] Furthermore, the mapping module is also specifically used for:
[0043] When several mapping elements are obtained, the several mapping elements are integrated to generate the corresponding mapping object array;
[0044] The first target time corresponding to the generation of the mapping object array is collected in real time, and a corresponding first timestamp is generated based on the first target time. The first target time is unique.
[0045] Furthermore, the mapping module is also specifically used for:
[0046] When the second configuration file is obtained, the second original data contained in the target database is extracted through the second configuration file, and the second original data is parsed and processed to filter out the storage address prefix and file name set of the user-uploaded files accordingly.
[0047] The storage address prefix and the set of filenames are combined to generate the corresponding mapping object.
[0048] Furthermore, the clearing module is specifically used for:
[0049] The second preset program extracts the array of mapping objects and several file storage paths contained in the mapping objects, and merges the same file storage paths to generate a corresponding path set array.
[0050] A corresponding array of filename sets is generated based on the set of filenames, and the array of path sets and the array of filename sets together constitute the file information.
[0051] Furthermore, the redundant file removal system also includes a comparison module, which is specifically used for:
[0052] The elements contained in the filename set array and the path set array are compared in real time, and the target element array that exists in the filename set array but does not exist in the path set array is extracted.
[0053] Perform a full scan on the array of filenames and extract the target files whose filenames belong to the target element array;
[0054] The target files are moved to a preset recycle bin folder, and there are multiple target files.
[0055] Furthermore, the redundant file removal system also includes a timing module, which is specifically used for:
[0056] Set a time point, and delete the target file in the preset recycle bin folder each time the time point is reached.
[0057] The third aspect of the present invention proposes:
[0058] A computer includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the redundant file cleanup method as described above.
[0059] The fourth aspect of the present invention proposes:
[0060] A readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the redundant file cleanup method as described above.
[0061] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0062] Figure 1 A flowchart of the redundant file removal method provided in the first embodiment of the present invention;
[0063] Figure 2 This is a structural block diagram of the redundant file clearing system provided in the sixth embodiment of the present invention.
[0064] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0065] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0066] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0068] Please see Figure 1 The image shows a redundant file clearing method provided in the first embodiment of the present invention. The redundant file clearing method provided in this embodiment can avoid the generation of a large amount of redundant data in the server, improve the storage efficiency of the server, and improve the user experience.
[0069] Specifically, the redundant file removal method provided in this embodiment includes the following steps:
[0070] Step S10: Obtain the database type to be accessed, and generate the corresponding first configuration file in the first preset program according to the database type;
[0071] Step S20: Obtain the IP address of the second preset program, and generate a corresponding second configuration file in the second preset program according to the IP address;
[0072] Step S30: Collect data from the target database in real time through the first configuration file to generate an array of mapping objects corresponding to the first preset program and a mapping object corresponding to the second preset program, and send the array of mapping objects from the first preset program to the second preset program according to the mapping objects;
[0073] Step S40: The file information contained in the mapping object array is parsed through the second preset program, and redundant data in the target file storage folder is cleared according to the file information.
[0074] Specifically, in this embodiment, it should first be noted that the redundant file removal method is mainly used to remove redundant files from various databases stored on the server to improve server storage efficiency. Specifically, these databases can be business databases and R&D databases, etc. Furthermore, this redundant file removal method is implemented based on a pre-written first preset program, a second preset program, and a server set up in the background. Both the first and second preset programs are specific service software, but their functions are different. Further, both the first and second preset programs can generate the required configuration files, and different configuration files can perform different data processing. Therefore, in order to effectively remove redundant files, it is necessary to first determine the type of database to be accessed, such as a business database. Further, the first preset program generates a first configuration file based on the data in the current business database. Correspondingly, the IP address corresponding to the second preset program is obtained synchronously, and the required second configuration file is generated internally within the second preset program based on this IP address.
[0075] Furthermore, after obtaining the required first configuration file through the above steps, the data stored in the target database is immediately collected in real time through the second configuration file. Based on this, an array of mapping objects corresponding to the first preset program and a mapping object corresponding to the second preset program can be generated in real time through the first configuration file. Further still, the current array of mapping objects is transmitted from the first preset program to the second preset program. Based on this, the second preset program finally parses the file information contained in the received array of mapping objects in real time, and finally clears redundant data in the current target database based on the file address contained in the file information.
[0076] Second Embodiment
[0077] Specifically, in this embodiment, it should be noted that the step of collecting data from the target database in real time through the first configuration file includes:
[0078] When the first configuration file is obtained, the first raw data contained in the target database is extracted through the first configuration file, and the first raw data is converted into corresponding URL data;
[0079] The URL data is split to extract corresponding URL value arrays and URL prefixes, and a correspondence is constructed between each URL value array, each URL prefix and a preset mapping function to generate corresponding mapping elements.
[0080] The mapping object array is generated based on the mapping elements.
[0081] Specifically, in this embodiment, it should be noted that after obtaining the required configuration file through the above steps, in order to effectively generate an array of mapping objects for finding redundant data, it is necessary to collect the first raw data contained in the target database in real time through the current first configuration file, and immediately convert the first raw data into URL data that can be recognized by the subsequent second preset program.
[0082] Furthermore, since the existing URL data packet contains multiple elements, it is necessary to further split the current URL data to extract the required URL value array and URL prefix. At the same time, a one-to-one correspondence between each URL value array, each URL prefix and the existing mapping function is constructed to generate a corresponding mapping element. Finally, the above-mentioned mapping object array is generated based on the mapping element.
[0083] Specifically, in this embodiment, it should also be noted that the step of generating the mapping object array based on the mapping elements includes:
[0084] When several mapping elements are obtained, the several mapping elements are integrated to generate the corresponding mapping object array;
[0085] The first target time corresponding to the generation of the mapping object array is collected in real time, and a corresponding first timestamp is generated based on the first target time. The first target time is unique.
[0086] Specifically, in this embodiment, it should be noted that since each generated mapping object array is unique, after generating several mapping elements through the above steps, it is necessary to further integrate these mapping elements into a dataset to easily and quickly generate the aforementioned mapping object array. During this process, it is also necessary to collect the first target time generated by each mapping object array in real time at the instant of its generation, and immediately generate a corresponding first timestamp based on this first target time. This allows for the addition of a corresponding identifier to each mapping object array for subsequent processing.
[0087] Third Embodiment
[0088] Additionally, in this embodiment, it should be noted that the step of collecting data from the target database in real time through the first configuration file includes:
[0089] When the second configuration file is obtained, the second original data contained in the target database is extracted through the second configuration file, and the second original data is parsed and processed to filter out the storage address prefix and file name set of the user-uploaded files accordingly;
[0090] The storage address prefix and the set of filenames are combined to generate the corresponding mapping object.
[0091] In addition, in this embodiment, it should be noted that after obtaining the second configuration file through the above steps, the second original data contained in the target database is further extracted in real time through the second configuration file. At the same time, the current second original data is parsed and processed by the existing algorithm to filter out the storage address prefix and file name set contained in the user's uploaded file.
[0092] Furthermore, the current storage address prefix and filename set are also combined to generate the aforementioned mapping object.
[0093] In addition, in this embodiment, it should be noted that the step of parsing the file information contained in the mapping object array through the second preset program includes:
[0094] The second preset program extracts the array of mapping objects and several file storage paths contained in the mapping objects, and merges the same file storage paths to generate a corresponding path set array.
[0095] A corresponding array of filename sets is generated based on the set of filenames, and the array of path sets and the array of filename sets together constitute the file information.
[0096] Furthermore, in this embodiment, it should be noted that after the aforementioned mapping object array is transmitted to the second preset program, the second preset program simultaneously extracts the current mapping object array and several file storage paths contained within the mapping objects. Further, to save computational resources, the second preset program merges identical file storage paths and generates a corresponding path set array. Even further, a corresponding filename set array is generated based on the filename set obtained in the above steps. Finally, the path set array and the filename set array can be combined to form the aforementioned file information for subsequent processing.
[0097] Fourth embodiment
[0098] In this embodiment, it should be noted that the method further includes:
[0099] The elements contained in the filename set array and the path set array are compared in real time, and the target element array that exists in the filename set array but does not exist in the path set array is extracted.
[0100] Perform a full scan on the array of filenames and extract the target files whose filenames belong to the target element array;
[0101] The target files are moved to a preset recycle bin folder, and there are multiple target files.
[0102] In this embodiment, it should be noted that after obtaining the required filename set array and path set array through the above steps, the elements contained in each array can be identified. Each element has two attributes: a folder path and a filename. Based on this, target element arrays that exist in the filename set array but not in the path set array are further extracted. A full scan is then performed on all filenames in the filename set array, and the target files whose filenames belong to the current target element array are extracted. These target files are the files that need to be deleted. Furthermore, all target files are simultaneously moved to a preset recycle bin folder for subsequent deletion.
[0103] Fifth embodiment
[0104] In this embodiment, it should be noted that the method further includes:
[0105] Set a time point, and delete the target file in the preset recycle bin folder each time the time point is reached.
[0106] In this embodiment, it should be noted that, in order to utilize significant computing resources during the process of clearing redundant files, a time node can be set to schedule the clearing of redundant files. Specifically, for example, the time node can be set to 2:00 AM, meaning the server will automatically clear redundant files every day at 2:00 AM to automatically release internal storage space, thereby improving the user experience.
[0107] Additionally, it should be noted that the above embodiments describe the application of the redundant file removal method in a monolithic service architecture. In this process, the first and second preset programs are deployed simultaneously on the same server. Correspondingly, when the redundant file removal method is applied in a distributed service architecture, the first and second preset programs need to be deployed on two separate servers. The difference from the monolithic service architecture is that at each time point, both the first and second preset programs immediately generate timestamped file storage snapshot information. The first preset program sends the real-time generated mapping object array to the Message Queue Server (MQS). Furthermore, the MQS immediately determines if any business servers are offline. If so, it only stores the data in the mapping object array in the MQS, and performs the corresponding processing after all offline business servers are restored. Furthermore, the second preset program deployed on the file server, upon receiving the mapping object array, compares the target file using the same comparison method and moves the target file to the recycle bin folder for subsequent scheduled removal.
[0108] Please see Figure 2 The sixth embodiment of the present invention provides:
[0109] A redundant file removal system, wherein the system comprises:
[0110] The acquisition module is used to acquire the database type to be accessed and generate a corresponding first configuration file in a first preset program according to the database type.
[0111] The processing module is used to obtain the IP address of the second preset program and generate a corresponding second configuration file in the second preset program according to the IP address;
[0112] The mapping module is used to collect data from the target database in real time through the first configuration file, generate an array of mapping objects corresponding to the first preset program and a mapping object corresponding to the second preset program, and send the array of mapping objects from the first preset program to the second preset program according to the mapping objects;
[0113] The clearing module is used to parse the file information contained in the mapping object array through the second preset program, and clear redundant data in the target file storage folder according to the file information.
[0114] In the aforementioned redundant file removal system, the mapping module is specifically used for:
[0115] When the first configuration file is obtained, the first raw data contained in the target database is extracted through the first configuration file, and the first raw data is converted into corresponding URL data;
[0116] The URL data is split to extract corresponding URL value arrays and URL prefixes, and a correspondence is constructed between each URL value array, each URL prefix and a preset mapping function to generate corresponding mapping elements.
[0117] The mapping object array is generated based on the mapping elements.
[0118] In the aforementioned redundant file removal system, the mapping module is further specifically used for:
[0119] When several mapping elements are obtained, the several mapping elements are integrated to generate the corresponding mapping object array;
[0120] The first target time corresponding to the generation of the mapping object array is collected in real time, and a corresponding first timestamp is generated based on the first target time. The first target time is unique.
[0121] In the aforementioned redundant file removal system, the mapping module is further specifically used for:
[0122] When the second configuration file is obtained, the second original data contained in the target database is extracted through the second configuration file, and the second original data is parsed and processed to filter out the storage address prefix and file name set of the user-uploaded files accordingly.
[0123] The storage address prefix and the set of filenames are combined to generate the corresponding mapping object.
[0124] In the aforementioned redundant file removal system, the removal module is specifically used for:
[0125] The second preset program extracts the array of mapping objects and several file storage paths contained in the mapping objects, and merges the same file storage paths to generate a corresponding path set array.
[0126] A corresponding array of filename sets is generated based on the set of filenames, and the array of path sets and the array of filename sets together constitute the file information.
[0127] In the aforementioned redundant file removal system, the redundant file removal system further includes a comparison module, which is specifically used for:
[0128] The elements contained in the filename set array and the path set array are compared in real time, and the target element array that exists in the filename set array but does not exist in the path set array is extracted.
[0129] Perform a full scan on the array of filenames and extract the target files whose filenames belong to the target element array;
[0130] The target files are moved to a preset recycle bin folder, and there are multiple target files.
[0131] The redundant file removal system described above further includes a timing module, which is specifically used for:
[0132] Set a time point, and delete the target file in the preset recycle bin folder each time the time point is reached.
[0133] The seventh embodiment of the present invention provides a computer, including 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 implement the redundant file clearing method provided in the above embodiments.
[0134] The eighth embodiment of the present invention provides a readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the redundant file clearing method provided in the above embodiments.
[0135] In summary, the redundant file removal method provided by the above embodiments of the present invention can avoid the generation of a large amount of redundant data in the server, improve the server's storage efficiency, and correspondingly improve the user experience.
[0136] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0137] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0138] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0139] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0140] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0141] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A redundant file erasure method, characterized by, The method comprises: acquiring a database type to be accessed, and generating a corresponding first configuration file in a first preset program according to the database type; acquiring an IP address of a second preset program, and generating a corresponding second configuration file in the second preset program according to the IP address; real-time collection of data in a target database through the first configuration file to generate a mapping object array corresponding to the first preset program, a mapping object corresponding to the second preset program, and transmission of the mapping object array from the first preset program to the second preset program according to the mapping object; resolution of file information contained in the mapping object array by the second preset program, and elimination of redundant data in a target file storage folder according to the file information.
2. The redundant file clean-up method of claim 1, wherein: The step of real-time collection of data in the target database through the first configuration file comprises: extraction of first original data contained in the target database through the first configuration file when the first configuration file is acquired, and conversion of the first original data into corresponding URL data; splitting processing of the URL data to split out a corresponding URL value array and a URL prefix, and construction of a corresponding relationship between each URL value array, each URL prefix and a preset mapping function to generate a corresponding mapping element; generation of the mapping object array according to the mapping element.
3. The redundant file clean-up method of claim 2, wherein: The step of generation of the mapping object array according to the mapping element comprises: corresponding generation of the mapping object array through integration processing of a plurality of mapping elements when the plurality of mapping elements are acquired; real-time acquisition of a first target moment corresponding to generation of the mapping object array, and generation of a corresponding first time stamp according to the first target moment, the first target moment being unique.
4. The redundant file clean-up method of claim 1, wherein: The step of real-time collection of data in the target database through the first configuration file comprises: extraction of second original data contained in the target database through the second configuration file when the second configuration file is acquired, and resolution processing of the second original data to correspondingly screen out a storage address prefix of a user uploaded file and a file name set; combination processing of the storage address prefix and the file name set to correspondingly generate the mapping object.
5. The redundant file clean-up method of claim 4, wherein: The step of resolution of file information contained in the mapping object array by the second preset program comprises: extraction of a plurality of file storage paths contained in the mapping object array and the mapping object by the second preset program, and merging of the same file storage paths by the second preset program to generate a corresponding path set array; generation of a corresponding file name set array according to the file name set, the path set array and the file name set array constituting the file information.
6. The redundant file clean-up method of claim 5, wherein: The method further comprises: real-time comparison of elements respectively contained in the file name set array and the path set array, and extraction of a target element array existing in the file name set array but not existing in the path set array; The file name set array is scanned in whole, and target files to which the file names belong to the target element array are extracted; The target files are transferred to a preset recycle bin folder, and the target files are multiple.
7. The redundant file clean-up method of claim 6, wherein: The method further comprises: A time node is set, and the target files in the preset recycle bin folder are cleared every time the time node is reached.
8. A redundant file clean-up system, characterized by, The system comprises: An acquisition module is configured to acquire a database type to be accessed, and generate a corresponding first configuration file in a first preset program according to the database type; A processing module is configured to acquire an IP address of a second preset program, and generate a corresponding second configuration file in the second preset program according to the IP address; A mapping module is configured to collect data in a target database in real time through the first configuration file, to generate a mapping object array corresponding to the first preset program, a mapping object corresponding to the second preset program, and send the mapping object array from the first preset program to the second preset program according to the mapping object; A clearing module is configured to parse file information contained in the mapping object array through the second preset program, and clear redundant data in the target database according to the file information.
9. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the redundant file clearing method of any one of claims 1 to 7.
10. A readable storage medium, having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the redundant file clearing method of any one of claims 1 to 7.
Citation Information
Patent Citations
Cloud storage distributed file system
CN112236758A
File system for genomic data
US20170060896A1