CN111367855A - Method and device for moving out downloaded file, computer equipment and storage medium - Google Patents

Method and device for moving out downloaded file, computer equipment and storage medium Download PDF

Info

Publication number
CN111367855A
CN111367855A CN202010091513.3A CN202010091513A CN111367855A CN 111367855 A CN111367855 A CN 111367855A CN 202010091513 A CN202010091513 A CN 202010091513A CN 111367855 A CN111367855 A CN 111367855A
Authority
CN
China
Prior art keywords
file
instruction
directory
target directory
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010091513.3A
Other languages
Chinese (zh)
Other versions
CN111367855B (en
Inventor
汤忠武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Jiejiegao Technology Development Co ltd
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202010091513.3A priority Critical patent/CN111367855B/en
Publication of CN111367855A publication Critical patent/CN111367855A/en
Application granted granted Critical
Publication of CN111367855B publication Critical patent/CN111367855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/119Details of migration of file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method and a device for moving out a downloaded file, computer equipment and a storage medium, wherein the method comprises the following steps: detecting a move-out instruction of a file in a download directory; when a moving-out instruction of the file in the download directory is detected, analyzing the moving-out instruction, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file; acquiring an operation instruction of application software; detecting whether the operation instruction is an access instruction for the moved-out file; and when the operation instruction is an access instruction for the moved-out file, accessing the target directory according to the target directory and the file identifier of the moved-out file. When the operating instruction of the application software is acquired, the file which is moved out of the downloading directory is opened according to the target directory and the file identifier, so that the file can still be found after being deleted from the downloading directory, the efficiency of retrieving the file by a user is effectively improved, and the loss of the file by the user is avoided.

Description

Method and device for moving out downloaded file, computer equipment and storage medium
Technical Field
The present invention relates to the field of file processing technologies, and in particular, to a method and an apparatus for removing a downloaded file, a computer device, and a storage medium.
Background
With the continuous development of the internet, files on a user's computer or an intelligent terminal are mostly downloaded to a local storage through the internet, and the files are mostly downloaded through downloading software or downloading applications. For example, the user may download the file through a browser, a thunderbolt, or other application. However, after the file is downloaded to the download directory corresponding to the application, the user may move out the file at some time, or copy the file to another folder, and delete the file in the download folder, and the user may forget the target folder from which the file is moved out, or forget that the file has been deleted, and cannot find the folder afterwards. After the browser, the thunder and the like are used for downloading, the original downloading directory of the file is only recorded in the residual downloading record in the downloading list stored by the browser, the thunder and the like, so that the user cannot find the file through the browser, the thunder and the like, and even if the file is still stored in the local folder, the user loses the folder, so that the user needs to search the whole disk for finding the folder, the file is inconvenient, and even if the user forgets the accurate name of the file, the user cannot find the file even if the file is searched on the whole disk.
Disclosure of Invention
Based on this, it is necessary to provide a method, an apparatus, a computer device and a storage medium for removing a downloaded file.
A method for removing a downloaded file comprises the following steps:
detecting a move-out instruction of a file in a download directory;
when a moving-out instruction of the file in the download directory is detected, analyzing the moving-out instruction, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
acquiring an operation instruction of application software;
detecting whether the operation instruction is an access instruction for the moved-out file;
and when the operation instruction is an access instruction for the removed file, accessing the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, the step of acquiring the operation instruction to the application software comprises:
and acquiring an operation instruction of an application interface of the application software.
In one embodiment, the step of detecting whether the operation instruction is an access instruction to a moved file includes:
detecting whether the operation instruction acts on a file icon of a moved-out file in the application interface;
when the operation instruction is an access instruction for the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file comprises:
and when the operation instruction acts on the file icon of the removed file in the application interface, accessing the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, the move-out instruction includes a copy instruction and a cut instruction.
In one embodiment, the step of detecting whether the operation instruction is an access instruction to a moved file further includes:
analyzing the operation instruction to obtain a file identifier of an operated file corresponding to the operation instruction;
detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not;
when the operation instruction is an access instruction for the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file comprises:
and when the file identifier of the moved-out file which is consistent with the file identifier of the operated file exists, acquiring a corresponding target directory according to the file identifier of the moved-out file, and accessing the target directory according to the target directory and the file identifier of the moved-out file.
In one embodiment, the step of detecting whether the operation instruction is an access instruction to a moved file includes:
analyzing the operation instruction to obtain an operated file corresponding to the operation instruction and a file identifier of the operated file;
detecting whether the operated file exists in the downloading directory;
and when the operated file does not exist in the download directory, detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not.
In one embodiment, when the operation instruction is an access instruction to the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file includes:
and when the operation instruction is an access instruction for the removed file, accessing the target directory and opening the removed file according to the target directory and the file identifier of the removed file.
A file download removal device, comprising:
the moving-out instruction detection module is used for detecting a moving-out instruction of the file in the download directory;
the target directory acquisition module is used for analyzing the moving-out instruction when the moving-out instruction of the file in the download directory is detected, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
the operation instruction acquisition module is used for acquiring an operation instruction of the application software;
the access instruction detection module is used for detecting whether the operation instruction is an access instruction for the moved file;
and the target directory access module is used for accessing the target directory according to the target directory and the file identifier of the removed file when the operation instruction is an access instruction for the removed file.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
detecting a move-out instruction of a file in a download directory;
when a moving-out instruction of the file in the download directory is detected, analyzing the moving-out instruction, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
acquiring an operation instruction of application software;
detecting whether the operation instruction is an access instruction for the moved-out file;
and when the operation instruction is an access instruction for the removed file, accessing the target directory according to the target directory and the file identifier of the removed file.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
detecting a move-out instruction of a file in a download directory;
when a moving-out instruction of the file in the download directory is detected, analyzing the moving-out instruction, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
acquiring an operation instruction of application software;
detecting whether the operation instruction is an access instruction for the moved-out file;
and when the operation instruction is an access instruction for the removed file, accessing the target directory according to the target directory and the file identifier of the removed file.
According to the method, the device, the computer equipment and the storage medium for removing the downloaded file, the target directory and the file identifier of the removed file in the downloaded directory are firstly obtained, and then when the operation instruction of the application software is obtained, the file of the removed downloaded directory is opened according to the target directory and the file identifier, so that the file can still be found after being deleted from the downloaded directory, the efficiency of finding the file by a user is effectively improved, and the loss of the file by the user is avoided.
Drawings
FIG. 1A is a flowchart illustrating a method for removing a downloaded file according to an embodiment;
FIG. 1B is a flowchart illustrating a method for removing a downloaded file according to another embodiment;
FIG. 1C is a flowchart illustrating a method for removing a downloaded file according to another embodiment;
FIG. 1D is a flowchart illustrating a method for removing a downloaded file according to yet another embodiment;
FIG. 2A is a block diagram of an embodiment of a file download removal device;
FIG. 2B is a block diagram of an access instruction detection module according to another embodiment;
FIG. 2C is a block diagram of an access instruction detection module according to yet another embodiment;
FIG. 3 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, 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 belongs. 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. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
As shown in fig. 1A, an embodiment of a method for removing a downloaded file includes:
step 110, detect a move-out command for a file in the download directory.
Specifically, the download directory is a folder of downloaded files of the application software, the download directory may also be referred to as a download path or a download folder, and the application software downloads files on the internet into the folder corresponding to the download directory. The moving-out instruction is used for moving out the files in the download directory from the download directory, and the moving-out mode can be cutting, or can be deleting the original files in the original download directory after copying the copy to another folder. In this embodiment, the moving out of the files in the download directories is monitored in real time, and when the plurality of application software correspond to different download directories, the files in the download directories of the plurality of application software are monitored, so as to detect a moving out instruction of the files in each download directory.
In this embodiment, the download directory may be obtained by accessing and reading a configuration file of the application software. In one embodiment, application software is accessed and a download directory of the application software is obtained. In one embodiment, the configuration file of the application software is read, and the download directory of the application software is obtained.
Step 120, when a move-out instruction for the file in the download directory is detected, analyzing the move-out instruction, and acquiring a target directory corresponding to the move-out instruction and a file identifier of the moved-out file.
Specifically, the moved file is a file moved from the download directory to the target directory. The target directory is the folder of the target to which the moved file is moved, and the move instruction is used for copying the moved file from the download directory to the target directory. The file identifier of the removed file is used for identifying the removed file, and each removed file has a unique file identifier, so that different removed files can be distinguished by different file identifiers. It should be noted that the file identifier may be a file name, or may be unique file identifier information obtained by processing according to a preset rule, and since the file name may be renamed according to an operation of a user, or a file with the same file name exists, there is an inaccurate file identifier, in this embodiment, the file identifier is unique file identifier information obtained by processing according to the preset rule, and in one embodiment, a download operation of the detection application software is detected; when the downloading operation of the application software is detected, acquiring the downloaded initial file name, the downloading time, the file type, the application software name and the copying times, processing a character string consisting of the downloaded initial file name, the downloading time, the file type, the application software name and the copying times according to a preset rule to obtain a file identifier of the downloaded file so as to form a file identifier of each file in a downloading directory, wherein the file identifier is generated after the file is downloaded, and a new file identifier is generated when the file is copied every time, for example, the copying times are increased by 1 when the file is copied every time, so that the same file has one file identifier for each copy after a plurality of copies are copied, and because the file identifier is generated according to the initial file name, the file identifier is not influenced by the subsequent modification of the file name, thus, the file identification does not change as the file name changes, thereby enabling differentiation between multiple copies. The file identifier is generated according to a preset rule, and the file identifier can be obtained by encrypting an initial file name, downloading time, a file type, an application software name and the copying times according to a common encryption algorithm, or can be formed by correspondingly weighting and combining character strings of the initial file name, the downloading time, the file type, the application software name and the copying times.
In this step, when a move-out instruction for a file in the download directory is detected, a target directory corresponding to the move-out instruction and a file identifier of the moved-out file are obtained according to the move-out instruction, so that a target folder to which the moved-out file is copied or transferred is known, the file identifier of the moved-out file is determined, and the file identifier is recorded.
Step 130, obtaining an operation instruction for the application software.
Specifically, the application software is application software with a downloading function, for example, the application software is a browser, for example, the application software is a thunderbolt, for example, the application software is downloading software. The download directory in this embodiment is a directory of a folder corresponding to downloading of a file of the application software, and the application software is application software for downloading a file in the internet to the download directory. In this embodiment, the operation instruction for the application software is an operation instruction for a file downloaded in the application software, and the operation instruction includes an operation instruction, an open instruction, a copy instruction, a cut instruction, a preview instruction, and the like. It should be noted that, since the removed file is still recorded in the download list of the application software, the operation instruction may be an operation on a file still stored in the download directory or an operation on a file removed from the download directory.
Step 140, detecting whether the operation instruction is an access instruction for the moved file.
Specifically, since the operation instruction may be an operation on a file still stored in the download directory or an operation on a file that has been moved out of the download directory, in this step, it is necessary to perform a determination and detection on the file acted by the operation instruction to determine whether the operation instruction acts on the moved file, that is, to determine whether the operation instruction is an operation on a file that has been moved out of the download directory. It should be understood that the access instruction is used to access the removed file, and the access mode includes run, open, copy, cut, and preview, and thus the access instruction includes run, open, copy, cut, and preview instructions.
Step 150, when the operation instruction is an access instruction to the removed file, accessing the target directory according to the target directory and the file identifier of the removed file.
Specifically, when it is detected that the operation instruction is an access instruction for a file from which the download directory has been removed, the corresponding target directory is obtained according to the file identifier of the removed file recorded in the foregoing step, so as to access the target directory, for example, a folder corresponding to the target directory is opened, so that a user can quickly find the removed file, and the file loss of the user is avoided.
In the embodiment, the target directory and the file identifier after the file in the download directory is moved out are firstly obtained, and then when the operation instruction of the application software is obtained, the file which is moved out of the download directory is opened according to the target directory and the file identifier, so that the file can still be found after being deleted from the download directory, the efficiency of retrieving the file by a user is effectively improved, and the loss of the user to the file is avoided.
To obtain operating instructions for the application software, in one embodiment, the operating instructions may be input to the application software via a command prompt.
In order to conveniently obtain the operation instruction of the application software, in one embodiment, the step of obtaining the operation instruction of the application software comprises: and acquiring an operation instruction of an application interface of the application software.
In this embodiment, the application interface is an operation interface of the application software, a plurality of function controls and buttons of the application software are displayed on the application interface, and the application interface further displays a download file list, where the download file list includes details of files downloaded to the download directory, and the download file list also includes files of the removed download directory, it is worth mentioning that, in order to distinguish files of the removed download directory from files of the not-removed download directory, the files of the removed download directory and files of the not-removed download directory in the download file list are displayed separately, for example, the display color of files of the not-removed download directory is darker than that of files of the removed download directory, for example, icons of files of the not-removed download directory are highlighted, icons of files of the removed download directory are weakened, therefore, the files with the download directories removed and the files without the download directories removed can be distinguished and displayed in the download file list, and further, a user can directly operate the file icons displayed in the download file list and further input an operation instruction. In one embodiment, an operation instruction for a downloaded file list in an application interface of application software is obtained, the operation instruction comprises a click instruction or a double-click instruction, and the selected file is determined according to the click instruction or the double-click instruction.
In order to accurately and conveniently acquire an operation instruction for a file and further quickly open a directory where a removed file is located, in an embodiment, the step of detecting whether the operation instruction is an access instruction for the removed file includes: detecting whether the operation instruction acts on a file icon of a moved-out file in the application interface; when the operation instruction is an access instruction for the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file comprises: and when the operation instruction acts on the file icon of the removed file in the application interface, accessing the target directory according to the target directory and the file identifier of the removed file.
In this embodiment, it is detected whether a click instruction or a double click instruction acts on a file icon of a moved-out file in a downloaded file list in the application interface, that is, whether the click instruction or the double click instruction is received by the file icon of the moved-out file in the downloaded file list in the application interface is detected, and when the click instruction or the double click instruction acts on the file icon of the moved-out file in the application interface, it indicates that the click instruction or the double click instruction is received by the file icon of the moved-out file in the downloaded file list, and indicates that the operation instruction is an access instruction to the moved-out file, so that the file to be opened is determined, and the target directory is opened according to the target directory of the moved-out file.
It should be noted that, although the removed file has been removed from the download directory, the file identifier of the removed file still corresponds to the file icon of the file in the download file list, so that according to the operation instruction received by the file icon in the download file list, the file identifier of the removed file can be determined, and further, the target directory can be determined, so as to access the target directory.
In one embodiment, when a downloading operation of application software is detected, a downloaded initial file name, downloading time, a file type, an application software name and copying times are obtained, a character string consisting of the downloaded initial file name, the downloading time, the file type, the application software name and the copying times is processed according to a preset rule to obtain a file identifier of a downloaded file, and a corresponding relation between the file identifier of the downloaded file and a file icon of the downloaded file in a downloaded file list is established.
In one embodiment, the move-out instruction includes a copy instruction and a cut instruction.
Specifically, the move-out instruction is used for moving out the downloaded file from the download directory so that the downloaded file becomes a moved-out file, and it should be understood that the move-out may be performed in a cutting manner, or may be performed in a manner of copying first and then deleting, so that it is also necessary to detect a copy instruction of a user, so as to avoid a situation that when the user copies a copy to another directory, the original file in the download directory is deleted, so that the original file is deleted and the copy cannot be found. Therefore, when a copy instruction or a cut instruction for a file in the download directory is detected, a target directory corresponding to the copy or cut is obtained, a file identifier of a copied or cut object file is obtained, the object file is removed from the file, and the target directory and the corresponding file identifier are stored. Therefore, even if the original file in the download directory is deleted, the copied copy file can still be found when an operation instruction for the application software is received subsequently.
In order to obtain the target directory, in an embodiment, the move-out instruction carries information of the target directory, and it is worth mentioning that when a file to be moved out is selected, the moved-out file is selected, so that a file identifier of the moved-out file can be determined and obtained. For the target directory, the target directory can be obtained only after the move-out instruction is executed, for example, when the move-out instruction is a cut instruction, the move-out instruction further includes a paste instruction, and after the paste instruction is received, the target directory is obtained according to the paste instruction. For example, when the move-out instruction is a copy instruction, the move-out instruction further includes a paste instruction, and after the paste instruction is received, the target directory is obtained according to the paste instruction. Specifically, when a paste instruction is received, the pasted folder can be specified, and the pasted target folder is the folder corresponding to the moved target directory, so that the target directory can be obtained when the paste instruction is received.
In one embodiment, the step of detecting whether the operation instruction is an access instruction to a moved file further includes:
step 141, analyzing the operation instruction to obtain a file identifier of the operated file corresponding to the operation instruction.
Step 142, detecting whether the file identifier of the moved-out file consistent with the file identifier of the operated file exists.
When the operation instruction is an access instruction for the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file comprises: and when the file identifier of the moved-out file which is consistent with the file identifier of the operated file exists, acquiring a corresponding target directory according to the file identifier of the moved-out file, and accessing the target directory according to the target directory and the file identifier of the moved-out file.
In this embodiment, in order to detect whether the operation instruction is an access instruction for a removed file, the operation instruction is first parsed, a file identifier of an operated file corresponding to the operation instruction is determined, specifically, an action object of the operation instruction is parsed, where the action object is an operated file, and the action object is displayed as a file icon in a download file list, while in some other embodiments, the action object may be a record or a configuration file stored in application software, and the operated file is determined by determining the action object, so as to determine the file identifier of the operated file, and obtain the file identifier of the operated file. And then comparing the file identification of the operated file with the file identifications of the stored removed files, and detecting whether the file identification of the removed file consistent with the file identification of the operated file exists. When the file identification of the moved-out file which is consistent with the file identification of the operated file exists, the file which is required to be accessed by the user is the file of the moved-out download directory, therefore, the corresponding target directory is determined according to the file identification of the moved-out file which is consistent with the file identification of the operated file, and the target directory is accessed.
In order to detect whether the operation instruction is an access instruction to a moved-out file, in one embodiment, the step of detecting whether the operation instruction is an access instruction to a moved-out file includes:
step 140a, analyzing the operation instruction to obtain an operated file corresponding to the operation instruction and a file identifier of the operated file.
Step 140b, detecting whether the operated file exists in the download directory.
Step 140c, when the operated file does not exist in the download directory, detecting whether a file identifier of a removed file consistent with the file identifier of the operated file exists.
In this embodiment, first, the operation instruction is parsed, a file identifier of an operated file corresponding to the operation instruction is determined, specifically, an action object of the operation instruction is parsed, the action object is the operated file, and the action object is displayed as a file icon in a download file list, while in some other embodiments, the action object may be a record or a configuration file stored in application software, and the operated file is determined by determining the action object, and then the file identifier of the operated file is determined, so as to obtain the file identifier of the operated file. And then detecting whether the operated file exists in the downloading directory or not, so as to detect whether the operated file is moved out or not, when the operated file exists in the downloading directory, indicating that the operated file is not moved out of the downloading directory, so that the operated file in the downloading directory is directly opened or operated, when the operated file does not exist in the downloading directory, indicating that the operated file is moved out of the downloading directory, and further detecting whether a file identifier of the moved-out file consistent with the file identifier of the operated file exists or not. And detecting the identification of the moved-out file consistent with the file identification of the operated file by comparing the file identification of the operated file with the identifications of the plurality of moved-out files, thereby finding the moved-out file.
In one embodiment, when the operation instruction is an access instruction to the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file includes: and when the operation instruction is an access instruction for the removed file, accessing the target directory and opening the removed file according to the target directory and the file identifier of the removed file.
In the embodiment, the moved-out file is opened according to the file identifier of the moved-out file while the target directory is accessed, and because a plurality of files may exist in the target directory, the moved-out file is opened directly according to the file identifier of the moved-out file, so that the opening efficiency of the moved-out file can be effectively improved, and the searching time of a user is saved.
In one embodiment, when the operation instruction is an access instruction to the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file includes: when the operation instruction is an access instruction for the removed file, accessing the target directory according to the target directory and the file identifier of the removed file, opening the folder where the target directory is located, and marking the removed file in the display interface of the folder.
In this embodiment, when the folder where the target directory is located is accessed according to the target directory and the folder is opened, the moved-out file is marked in the display interface displaying the folder, so that the moved-out file is highlighted, and the moved-out file can be quickly determined when a plurality of files exist in the folder where the target directory is located, thereby effectively improving the searching efficiency of a user.
In one embodiment, as shown in fig. 1D, before the step of detecting a move-out instruction for a file in a download directory, the method further includes:
step 101, detecting the downloading operation of the application software.
Specifically, the downloading operation may be a downloading instruction or a downloading process. In this embodiment, the downloading operation includes a downloading instruction and a downloading process, where the downloading operation indicates that the application software is downloading a file, and by detecting the downloading operation of the application software, it is detected whether the application software is downloading the file. In one embodiment, the downloading process of the application software is detected, and in one embodiment, the running of the application software is detected, and when the running of the application software is detected, whether the application software receives a downloading instruction is detected.
Step 102, when the downloading operation of the application software is detected, acquiring a downloading directory corresponding to the downloading operation, and acquiring an identifier of a downloaded file corresponding to the downloading operation.
In this step, the acquisition of the download directory and the file identifier may be triggered by a download process or a download instruction, and in one embodiment, when the download process of the application software is detected, the download directory corresponding to the download process is acquired, and the identifier of the downloaded file corresponding to the download operation is acquired. In one embodiment, when the detection application software receives a download instruction, a download directory corresponding to the download instruction is obtained, and an identifier of a downloaded file corresponding to the download operation is obtained.
In this step, when the application software has a downloading operation, indicating that the application software is downloading or starts to download, the downloading directory is obtained, and the file identifier of the downloaded file is generated to obtain the file identifier. Therefore, the file in the download directory can obtain the unique file identification during downloading, and along with the completion of downloading and the shifting-out of the file, the file identification always accompanies the downloaded file and the shifted-out file, so that the file can be quickly found after renaming and shifting-out.
In one embodiment, when a downloading operation of application software is detected, a downloading directory corresponding to the downloading operation is acquired, an identifier of a downloaded file corresponding to the downloading operation is acquired, a relationship between each file icon in a downloading file list and a file identifier of a removed file is established, and the relationship between each file icon in the downloading file list and the file identifier of the removed file is stored. Therefore, the file icon of each file in the downloaded file list corresponds to the file identifier, even if the file is moved out of the downloaded directory, the file icon of the moved file is still in the downloaded file list, and the file icon corresponds to the file identifier, so that a user can quickly find the moved file through the downloaded file list.
To implement the lookup of the removed file, in one embodiment, step 101 further comprises the following steps: detecting whether a file in a download directory of the application software is deleted after being copied, detecting whether the file in the download directory of the application software is cut, recording a shift-out operation once when detecting that the file in the download directory of the application software is deleted or cut after being copied, detecting the accumulated number of times of the shift-out operation, and executing the step 101 when the accumulated number of times of the shift-out operation is greater than a preset threshold value.
In this embodiment, by detecting the moving-out times of the files in the download directory, when the moving-out times are large, the situation that the user loses the files is likely to occur, so that the detection of the download operation of the application software is triggered, thereby avoiding the loss of the files and improving the efficiency of finding the files by the user.
It should be understood that, although the respective steps in the flowcharts of fig. 1A to 1D are sequentially shown as indicated by arrows, the steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1A-1D may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 2A, there is provided a file download removal apparatus, including:
a move-out instruction detection module 210, configured to detect a move-out instruction for a file in the download directory;
a target directory obtaining module 220, configured to, when a move-out instruction for a file in the download directory is detected, analyze the move-out instruction, and obtain a target directory corresponding to the move-out instruction and a file identifier of the moved-out file;
an operation instruction obtaining module 230, configured to obtain an operation instruction for the application software;
an access instruction detection module 240, configured to detect whether the operation instruction is an access instruction to a removed file;
and a target directory accessing module 250, configured to, when the operation instruction is an instruction to access the removed file, access the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, the operation instruction obtaining module is further configured to obtain an operation instruction of an application interface of the application software.
In one embodiment, the access instruction detection module 240 is further configured to detect whether the operation instruction acts on a file icon of a moved-out file in the application interface;
the target directory accessing module 250 is further configured to, when the operation instruction acts on a file icon of a removed file in the application interface, access the target directory according to the target directory and a file identifier of the removed file.
In one embodiment, the move-out instruction includes a copy instruction and a cut instruction.
In one embodiment, as shown in fig. 2B, the access instruction detection module 240 includes:
an operation instruction parsing unit 241, configured to parse the operation instruction to obtain a file identifier of an operated file corresponding to the operation instruction;
a file identifier detecting unit 242, configured to detect whether a file identifier of a removed file that is consistent with the file identifier of the operated file exists;
the target directory accessing module 250 is further configured to, when a file identifier of a removed file that is consistent with the file identifier of the operated file exists, obtain a corresponding target directory according to the file identifier of the removed file, and access the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, as shown in fig. 2C, the access instruction detection module 240 includes:
an operation instruction parsing unit 240a, configured to parse the operation instruction to obtain an operated file corresponding to the operation instruction and a file identifier of the operated file;
an operated file detecting unit 240b for detecting whether an operated file exists in the download directory;
a file identifier detecting unit 240c, configured to detect whether a file identifier of a removed file that is consistent with the file identifier of the operated file exists or not when the operated file does not exist in the download directory.
In an embodiment, the target directory accessing module 250 is further configured to, when the operation instruction is an access instruction to the removed file, access the target directory and open the removed file according to the target directory and the file identifier of the removed file.
For the specific limitation of the removing device of the downloaded file, reference may be made to the above limitation on the removing method of the downloaded file, and details are not described herein again. The modules in the above-mentioned file-downloading removal device can be wholly or partially implemented by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, a personal computer, a mobile terminal, or an intelligent terminal, and its internal structure diagram may be as shown in fig. 3. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The memory of the computer device is used for downloading files, removed files, file identifications and the like. The computer program is executed by a processor to implement a method of removing a downloaded file.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
detecting a move-out instruction of a file in a download directory;
when a moving-out instruction of the file in the download directory is detected, analyzing the moving-out instruction, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
acquiring an operation instruction of application software;
detecting whether the operation instruction is an access instruction for the moved-out file;
and when the operation instruction is an access instruction for the removed file, accessing the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and acquiring an operation instruction of an application interface of the application software.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
detecting whether the operation instruction acts on a file icon of a moved-out file in the application interface;
and when the operation instruction acts on the file icon of the removed file in the application interface, accessing the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
analyzing the operation instruction to obtain a file identifier of an operated file corresponding to the operation instruction;
detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not;
and when the file identifier of the moved-out file which is consistent with the file identifier of the operated file exists, acquiring a corresponding target directory according to the file identifier of the moved-out file, and accessing the target directory according to the target directory and the file identifier of the moved-out file.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
analyzing the operation instruction to obtain an operated file corresponding to the operation instruction and a file identifier of the operated file;
detecting whether the operated file exists in the downloading directory;
and when the operated file does not exist in the download directory, detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and when the operation instruction is an access instruction for the removed file, accessing the target directory and opening the removed file according to the target directory and the file identifier of the removed file.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
detecting a move-out instruction of a file in a download directory;
when a moving-out instruction of the file in the download directory is detected, analyzing the moving-out instruction, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
acquiring an operation instruction of application software;
detecting whether the operation instruction is an access instruction for the moved-out file;
and when the operation instruction is an access instruction for the removed file, accessing the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and acquiring an operation instruction of an application interface of the application software.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether the operation instruction acts on a file icon of a moved-out file in the application interface;
and when the operation instruction acts on the file icon of the removed file in the application interface, accessing the target directory according to the target directory and the file identifier of the removed file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
analyzing the operation instruction to obtain a file identifier of an operated file corresponding to the operation instruction;
detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not;
and when the file identifier of the moved-out file which is consistent with the file identifier of the operated file exists, acquiring a corresponding target directory according to the file identifier of the moved-out file, and accessing the target directory according to the target directory and the file identifier of the moved-out file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
analyzing the operation instruction to obtain an operated file corresponding to the operation instruction and a file identifier of the operated file;
detecting whether the operated file exists in the downloading directory;
and when the operated file does not exist in the download directory, detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when the operation instruction is an access instruction for the removed file, accessing the target directory and opening the removed file according to the target directory and the file identifier of the removed file.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be noted that, in the above embodiments, the included modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, the specific names of the functional modules are only for convenience of distinguishing from each other and are not used for limiting the protection scope of the present invention.
In addition, those skilled in the art can understand that the functions of all or part of the modules in the method for implementing the embodiments described above can be implemented by a program to instruct the relevant hardware, and the corresponding program can be stored in a readable storage medium.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for removing a downloaded file, comprising:
detecting a move-out instruction of a file in a download directory;
when a moving-out instruction of the file in the download directory is detected, analyzing the moving-out instruction, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
acquiring an operation instruction of application software;
detecting whether the operation instruction is an access instruction for the moved-out file;
and when the operation instruction is an access instruction for the removed file, accessing the target directory according to the target directory and the file identifier of the removed file.
2. The method for removing the downloaded file according to claim 1, wherein the step of obtaining the operation instruction to the application software comprises:
and acquiring an operation instruction of an application interface of the application software.
3. The method for removing the downloaded file according to claim 1, wherein the step of detecting whether the operation command is an access command for the removed file comprises:
detecting whether the operation instruction acts on a file icon of a moved-out file in the application interface;
when the operation instruction is an access instruction for the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file comprises:
and when the operation instruction acts on the file icon of the removed file in the application interface, accessing the target directory according to the target directory and the file identifier of the removed file.
4. The method of claim 1, wherein the removal command comprises a copy command and a cut command.
5. The method for removing the downloaded file according to claim 1, wherein the step of detecting whether the operation command is an access command for the removed file further comprises:
analyzing the operation instruction to obtain a file identifier of an operated file corresponding to the operation instruction;
detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not;
when the operation instruction is an access instruction for the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file comprises:
and when the file identifier of the moved-out file which is consistent with the file identifier of the operated file exists, acquiring a corresponding target directory according to the file identifier of the moved-out file, and accessing the target directory according to the target directory and the file identifier of the moved-out file.
6. The method for removing the downloaded file according to claim 1, wherein the step of detecting whether the operation command is an access command for the removed file comprises:
analyzing the operation instruction to obtain an operated file corresponding to the operation instruction and a file identifier of the operated file;
detecting whether the operated file exists in the downloading directory;
and when the operated file does not exist in the download directory, detecting whether a file identifier of a moved-out file consistent with the file identifier of the operated file exists or not.
7. The method according to claim 1, wherein when the operation command is an access command to the removed file, the step of accessing the target directory according to the target directory and the file identifier of the removed file comprises:
and when the operation instruction is an access instruction for the removed file, accessing the target directory and opening the removed file according to the target directory and the file identifier of the removed file.
8. A file download removal apparatus, comprising:
the moving-out instruction detection module is used for detecting a moving-out instruction of the file in the download directory;
the target directory acquisition module is used for analyzing the moving-out instruction when the moving-out instruction of the file in the download directory is detected, and acquiring a target directory corresponding to the moving-out instruction and a file identifier of the moved-out file;
the operation instruction acquisition module is used for acquiring an operation instruction of the application software;
the access instruction detection module is used for detecting whether the operation instruction is an access instruction for the moved file;
and the target directory access module is used for accessing the target directory according to the target directory and the file identifier of the removed file when the operation instruction is an access instruction for the removed file.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010091513.3A 2020-02-08 2020-02-08 Method and device for moving out downloaded file, computer equipment and storage medium Active CN111367855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010091513.3A CN111367855B (en) 2020-02-08 2020-02-08 Method and device for moving out downloaded file, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010091513.3A CN111367855B (en) 2020-02-08 2020-02-08 Method and device for moving out downloaded file, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111367855A true CN111367855A (en) 2020-07-03
CN111367855B CN111367855B (en) 2021-06-18

Family

ID=71207969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010091513.3A Active CN111367855B (en) 2020-02-08 2020-02-08 Method and device for moving out downloaded file, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111367855B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436450A (en) * 2010-09-29 2012-05-02 腾讯科技(深圳)有限公司 Method and device for positioning folder
CN103034642A (en) * 2011-09-30 2013-04-10 高德软件有限公司 Data file generating method, application program, data downloading system and data downloading method
CN103916402A (en) * 2014-04-18 2014-07-09 北京奇虎科技有限公司 Method and device for protecting browser download file
US20140289288A1 (en) * 2013-03-21 2014-09-25 Fuji Xerox Co., Ltd. Relay apparatus, system, and non-transitory computer readable medium
CN104424225A (en) * 2013-08-26 2015-03-18 联想(北京)有限公司 File processing method and device based on file transfer process
CN105808589A (en) * 2014-12-31 2016-07-27 中国电信股份有限公司 File processing method and apparatus
CN106776953A (en) * 2016-12-04 2017-05-31 国云科技股份有限公司 A kind of implementation method of online file cloud storage system
CN107679142A (en) * 2017-09-25 2018-02-09 广东欧珀移动通信有限公司 A kind of document copying method, server, the network equipment and storage medium
CN109634921A (en) * 2018-11-23 2019-04-16 湖南城市学院 A kind of method and storage system of file storage
US20190207929A1 (en) * 2017-12-28 2019-07-04 Dropbox, Inc. Storage interface for synchronizing content
CN110297808A (en) * 2019-05-20 2019-10-01 平安科技(深圳)有限公司 File modification method, apparatus, computer equipment and the storage medium of container application
CN110737635A (en) * 2018-07-02 2020-01-31 深圳联友科技有限公司 data blocking method
CN110765068A (en) * 2019-09-20 2020-02-07 数字视觉云(北京)科技发展有限公司 Maya file processing method, device, terminal and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436450A (en) * 2010-09-29 2012-05-02 腾讯科技(深圳)有限公司 Method and device for positioning folder
CN103034642A (en) * 2011-09-30 2013-04-10 高德软件有限公司 Data file generating method, application program, data downloading system and data downloading method
US20140289288A1 (en) * 2013-03-21 2014-09-25 Fuji Xerox Co., Ltd. Relay apparatus, system, and non-transitory computer readable medium
CN104424225A (en) * 2013-08-26 2015-03-18 联想(北京)有限公司 File processing method and device based on file transfer process
CN103916402A (en) * 2014-04-18 2014-07-09 北京奇虎科技有限公司 Method and device for protecting browser download file
CN105808589A (en) * 2014-12-31 2016-07-27 中国电信股份有限公司 File processing method and apparatus
CN106776953A (en) * 2016-12-04 2017-05-31 国云科技股份有限公司 A kind of implementation method of online file cloud storage system
CN107679142A (en) * 2017-09-25 2018-02-09 广东欧珀移动通信有限公司 A kind of document copying method, server, the network equipment and storage medium
US20190207929A1 (en) * 2017-12-28 2019-07-04 Dropbox, Inc. Storage interface for synchronizing content
CN110737635A (en) * 2018-07-02 2020-01-31 深圳联友科技有限公司 data blocking method
CN109634921A (en) * 2018-11-23 2019-04-16 湖南城市学院 A kind of method and storage system of file storage
CN110297808A (en) * 2019-05-20 2019-10-01 平安科技(深圳)有限公司 File modification method, apparatus, computer equipment and the storage medium of container application
CN110765068A (en) * 2019-09-20 2020-02-07 数字视觉云(北京)科技发展有限公司 Maya file processing method, device, terminal and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
乔英苹: "基于socket通信的文件服务系统设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
褚万振: "基于Android平台的文件同步系统设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Also Published As

Publication number Publication date
CN111367855B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
US7293268B2 (en) Installation method, activation method, execution apparatus and medium of application program
CN106815135B (en) Vulnerability detection method and device
CN108399124B (en) Application testing method and device, computer equipment and storage medium
KR100968126B1 (en) System for Detecting Webshell and Method Thereof
US20060101392A1 (en) Strongly-typed UI automation model generator
US20120150915A1 (en) Digital forensic apparatus for analyzing user activities and method thereof
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN111310195A (en) Security vulnerability management method, device, system, equipment and storage medium
CN112363937A (en) Method and device for testing differential coverage rate, computer equipment and storage medium
US6715140B1 (en) Program trace method and apparatus, and storage medium
CN110134595B (en) Analysis method, analysis device and computer equipment before SVN (scalable vector network) resource library test
D'Orazio et al. Forensic collection and analysis of thumbnails in android
CN111367855B (en) Method and device for moving out downloaded file, computer equipment and storage medium
CN107168875B (en) Activity component leakage detection method based on android application multi-entry characteristics
CN109388617A (en) A kind of determination method and device of document time stamp confidence level
JP2016018227A (en) Work log edition method, information processor, and program
Easttom et al. On the efficacy of using android debugging bridge for android device forensics
CN108132971B (en) Analysis method and device for database fragment files
CN109634799B (en) Analysis system, analysis data collection system, and database registration device and method thereof
CN112947991A (en) Method and device for acquiring version difference code file, computer equipment and medium
CN112100479A (en) Application access method and device, electronic equipment and storage medium
Patil et al. RegForensicTool: evidence collection and analysis of Windows registry
CN111563061A (en) Memory optimization method and device
CN111444144A (en) File feature extraction method and device
CN107203706B (en) APP internal permission detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210528

Address after: 401120 8-3, building 3, Langjun center, 28 Huanglong Road, longta street, Yubei District, Chongqing

Applicant after: CHONGQING JIEJIEGAO TECHNOLOGY DEVELOPMENT Co.,Ltd.

Address before: 213000 building 4, Jindu Mingyuan, Wujin District, Changzhou City, Jiangsu Province

Applicant before: Tang Zhongwu

GR01 Patent grant
GR01 Patent grant