Disclosure of Invention
The embodiment of the application discloses a file protection method, a file protection device and electronic equipment, which can effectively protect files.
In a first aspect, an embodiment of the present application provides a file protection method, including:
creating an encrypted folder under a preset directory;
when the encrypted folder is detected to be created under the preset directory, starting a defense driving protection mechanism, wherein the defense driving protection mechanism is used for preventing non-preset application software from operating files in the encrypted folder through protection of a driving layer;
naming the name of the encrypted folder as a preset file name, wherein the preset file name is directly accessed and can not be identified by the non-preset application software;
and moving the target file to the encrypted folder.
In the method, when the encrypted folder is detected to be created in the preset directory, a defense drive protection mechanism is started, the defense drive protection mechanism is used for preventing the non-preset application software from operating the files in the encrypted folder through the protection of a drive layer, and then the target files to be protected are placed in the encrypted files.
In an alternative of the first aspect, before moving the target file into the encrypted folder, the method further includes: judging the file type of the target file; and if the file type of the target file belongs to a preset file type, executing the step of moving the target file to the encrypted folder.
In the method, before the target file is moved to the encrypted folder, the file type of the target file is judged, so that the file of the file type which needs to be protected by a user can be protected quickly, and the time can be saved effectively.
In yet another alternative of the first aspect, before moving the target file into the encrypted folder, the method further includes: judging the size of the target file; and if the size of the target file belongs to a preset range, executing the step of moving the target file into the encrypted folder.
In the method, before the target file is moved to the encrypted folder, the size of the target file is judged, so that the file with the size of the file required to be protected by the user can be protected quickly, and the time can be saved effectively.
In yet another alternative of the first aspect, after naming the name of the encrypted folder as the preset file name, the method further includes: and calling a system interface, and setting the attribute of the encrypted folder as a hidden attribute.
In the method, the attribute of the encrypted folder is set as the hidden attribute by calling a system interface, so that the encrypted folder is prevented from being exposed in a file system and being opened by non-preset application software, and the file can be effectively protected.
In yet another alternative of the first aspect, after the moving the target file into the encrypted folder, the method further includes: monitoring whether the non-preset application software executes the operation of the target file or not; and if the non-preset application software executes and operates the target file, ending the process of the non-preset application software.
In the method, the non-preset application software is monitored, and when the non-preset application software opens, reads and edits the target file, the process of the non-preset application software is directly ended. In this way, the target file can be effectively protected.
In a second aspect, an embodiment of the present application provides a file protection method, including:
moving the target file from the encrypted folder to a preset directory;
carrying out hard link on the target file to obtain a placing path of the target file;
and acquiring the target file for operation according to the placement path.
In the method, the target file can be opened by other non-preset application software only under the preset directory and after the target file is subjected to hard link, and meanwhile, the target file cannot be opened by the non-preset application software when the target file is in the encrypted folder.
In an alternative of the second aspect, before moving the target file from the encrypted folder to a preset directory, the method further includes:
acquiring a user name and a password of a user;
verifying the user name and the password of the user;
and if the verification is passed, executing the step of moving the target file from the encrypted folder to the preset directory.
In the method, before the target file is moved from the folder to the preset directory, the user needs to be verified, and only when the verification is passed, the user can operate the target file in an authorized state, so that the safety is improved.
In yet another alternative of the second aspect, after the obtaining the target file for operation according to the placement path, the method further includes:
monitoring whether the target file is operated and finished;
and if the target file is operated, moving the target file from the preset directory to the encrypted folder.
In the method, after the target file is used, the target file is moved from the preset directory to the encrypted folder, and when the target file is in the encrypted folder, the driver layer protects the file in the encrypted folder, so that the target file is prevented from being operated by non-preset application software.
In a third aspect, an embodiment of the present application provides a file protection device, including:
a creating unit configured to create an encrypted folder under a preset directory;
the starting unit is used for starting a defense driving protection mechanism when the encrypted folder is detected to be created under the preset directory, wherein the defense driving protection mechanism is used for preventing non-preset application software from operating files in the encrypted folder through protection of a driving layer;
the naming unit is used for naming the name of the encrypted folder as a preset file name, wherein the preset file name cannot be identified by the non-preset application software for direct access;
and the moving unit is used for moving the target file to the encrypted folder.
In the device, when the encrypted folder is detected to be created in the preset directory, a defense drive protection mechanism is started, the defense drive protection mechanism is used for preventing the non-preset application software from operating the files in the encrypted folder through the protection of a drive layer, and then the target files to be protected are placed in the encrypted files.
In an alternative of the third aspect, before the moving unit moves the target file into the encrypted folder, the apparatus further includes:
the first judging unit is used for judging the file type of the target file;
and the first execution unit is used for executing the step of moving the target file to the encrypted folder if the file type of the target file belongs to a preset file type.
In the device, before the target file is moved to the encrypted folder, the file type of the target file is judged, so that the file of the file type which needs to be protected by a user can be protected quickly, and the time can be saved effectively.
In yet another alternative of the third aspect, before the moving unit moves the target file into the encrypted folder, the apparatus further includes:
a second judging unit, configured to judge a size of the target file;
and the second execution unit is used for executing the step of moving the target file to the encrypted folder if the size of the target file belongs to a preset range.
In the device, before the target file is moved to the encrypted folder, the size of the target file is judged, so that the file with the size of the file which needs to be protected by a user can be protected quickly, and the time can be saved effectively.
In yet another alternative of the third aspect, the naming unit, after naming the name of the encrypted folder as the preset file name, further includes:
and the setting unit is used for calling a system interface and setting the attribute of the encrypted folder as the hidden attribute.
In the device, the attribute of the encrypted folder is set as the hidden attribute by calling the system interface, so that the encrypted folder is prevented from being exposed in a file system and being opened by non-preset application software, and the file can be effectively protected.
In yet another alternative of the third aspect, after the moving unit is configured to move the target file into the encrypted folder, the apparatus further includes:
the monitoring unit is used for monitoring whether the non-preset application software executes the operation of the target file or not;
and the ending unit is used for ending the process of the non-preset application software if the non-preset application software executes and operates the target file.
In the device, by monitoring the non-preset application software, when the non-preset application software opens, reads and edits the target file, the process of the non-preset application software is directly ended. In this way, the target file can be effectively protected.
In a fourth aspect, an embodiment of the present application provides a file protection device, including:
the first moving unit is used for moving the target file from the encrypted folder to a preset directory;
the first acquisition unit is used for carrying out hard link on the target file and acquiring a placing path of the target file;
and the second acquisition unit is used for acquiring the target file for operation according to the placement path.
In the device, the target file can be opened by other non-preset application software only under the preset directory and after the target file is subjected to hard link, and meanwhile, when the target file is in the encrypted folder, the target file cannot be opened by the non-preset application software.
In an alternative of the fourth aspect, before moving the target file from the encrypted folder to a preset directory, the apparatus further includes:
the third acquisition unit is used for acquiring a user name and a password of the user;
the authentication unit is used for authenticating the user name and the password of the user;
and the execution unit is used for executing the step of moving the target file from the encrypted folder to the preset directory if the verification is passed.
In the device, before the target file is moved from the folder to the preset directory, the user needs to be authenticated, and only when the authentication is passed, the user can operate the target file in an authorized state, so that the security is improved.
In yet another alternative of the fourth aspect, after the second obtaining unit is configured to obtain the target file for operation according to the placement path, the apparatus further includes:
the monitoring unit is used for monitoring whether the target file is operated completely;
and the second moving unit is used for moving the target file from the preset directory to the encrypted folder if the target file is operated.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, a communication interface, and a bus;
the processor, the memory and the communication interface are connected through the bus and complete mutual communication;
the memory stores a computer program;
the processor, by executing the computer program stored in the memory, is to:
creating an encrypted folder under a preset directory;
when the encrypted folder is detected to be created under the preset directory, starting a defense driving protection mechanism, wherein the defense driving protection mechanism is used for preventing non-preset application software from operating files in the encrypted folder through protection of a driving layer;
naming the name of the encrypted folder as a preset file name, wherein the preset file name is directly accessed and can not be identified by the non-preset application software;
and moving the target file to the encrypted folder.
Moving the target file from the encrypted folder to a preset directory;
carrying out hard link on the target file to obtain a placing path of the target file;
and acquiring the target file for operation according to the placement path.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the method described in any one of the first aspect and the second aspect, or in an alternative aspect of any one of the first aspect and the second aspect.
In a seventh aspect, this application embodiment provides a computer product, which when run on a computer, causes the computer to execute the method described in any one of the first aspect, the second aspect, or an alternative aspect of any one of the first aspect and the second aspect.
By implementing the embodiment of the application, when the encrypted folder is detected to be created in the preset directory, a defense drive protection mechanism is started, the defense drive protection mechanism is used for preventing the non-preset application software from operating the files in the encrypted folder through the protection of the drive layer, then the target files to be protected are placed in the encrypted files, the situation that the files are exposed in a file system, are easy to aim at and are cracked or recovered is effectively avoided through the mode, the fact that the non-preset application software cannot operate the target files is guaranteed, and the target files are effectively protected.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The system architecture of the embodiment of the application comprises electronic equipment, wherein the electronic equipment can be a server, the server can be a single server or a server cluster, and the electronic equipment can be a mobile phone, a computer and the like.
Referring to fig. 1, fig. 1 is a schematic flow chart of a file protection method according to an embodiment of the present application, where the method includes, but is not limited to, the following steps.
Step S101: the electronic device creates an encrypted folder under a preset directory.
For example, if the preset directory is a C-packing directory, i.e., a level 1 protection directory, the electronic device creates an encrypted folder under the C-packing directory, where the name of the encrypted folder is encrypted folder 1.
For example, if the preset directory is a D disk directory and an F disk directory, that is, a level 1 protection directory, the electronic device creates an encrypted folder under the D disk directory and the F disk directory, respectively, where the name of the encrypted folder under the D disk directory is encrypted folder 2, and the name of the encrypted folder under the F disk directory is encrypted folder 3.
Step S102: and when the electronic equipment detects that the encrypted folder is created under the preset directory, starting a defense driving protection mechanism.
Specifically, the defense driving protection mechanism is used for preventing non-preset application software from operating the files in the encrypted folder through driving layer protection.
For example, if the preset directory is a C disk or D disk directory, that is, a level 1 protection directory, and the preset application software is a jinshan poison server, when the electronic device detects that an encrypted folder is created under the C disk or D disk directory, a defense driving protection mechanism is started, and at this time, files or subfolders in the encrypted folder are protected by a driving layer and cannot be opened, read, and edited by software other than the jinshan poison server.
Step S103: and the electronic equipment names the name of the encrypted folder to a preset file name.
Specifically, the preset file name is directly accessible which cannot be identified by the non-preset application software.
For example, if the name of the encrypted folder is encrypted folder 1 and the preset file name is "poison folder protection" {5ef4af3a-f726-11d0-b8a2-00c04fc309a4}, the electronic device modifies the name of the encrypted folder, that is, encrypted folder 1, to be "poison folder protection" {5ef4af3a-f726-11d0-b8a2-00c04fc309a4}, and after the name of the encrypted folder is "poison folder protection" {5ef4af3a-f726-11d0-b8a2-00c04fc309a4}, the encrypted folder of the name is identified by the system as a recycle bin (full), and the non-preset application software cannot open the encrypted folder.
In this embodiment of the application, after the electronic device names the name of the encrypted folder to a preset file name, the method further includes:
and calling a system interface, and setting the attribute of the encrypted folder as a hidden attribute.
For example, if the system interface that controls the attribute of the encrypted folder is system interface 1, system interface 1 is called, and the attribute of the encrypted folder is set as the hidden attribute.
Step S104: and the electronic equipment moves the target file into the encrypted folder.
For example, as shown in FIG. 2A, suppose there is an encrypted folder named TOYOB File protection {5ef4af3a-f726-11d0-b8a2-00C04fc309a4} under the C packing directory, i.e., level 1 protection directory. If the target file with the name of word is existed and the preset application software is jinshanyaoba, the word file is moved to the encrypted folder as shown in fig. 2B. Then the target file named word. docx is in the encrypted folder, i.e., the level 2 protected directory, as shown in fig. 2C. When the electronic equipment detects that an encrypted folder is created under the C-disk directory, a defense drive protection mechanism is started, a predefined drive layer protection program is called, and drive layer protection is carried out on a target file or a target subfolder in the encrypted folder, namely a 2-level protection directory, wherein the target file or the target subfolder in the encrypted folder can only be opened, read and edited by preset application software, namely Jinshan Yaobao, and cannot be opened, read and edited by software except for the Jinshan Yao.
In this embodiment of the application, before the electronic device moves the target file into the encrypted folder, the method further includes:
judging the file type of the target file;
and if the file type of the target file belongs to a preset file type, executing the step of moving the target file to the encrypted folder.
For example, if the preset file type is a video file type, the electronic device determines that the file type of the target file is the video file type, and the file type of the target file is that the video file type belongs to the preset file type, that is, the video file type, the electronic device executes the step of moving the target file into the encrypted folder.
For example, if the preset file type is a video file format type, and the electronic device determines that the file type of the target file is a text file type, the file type of the target file does not belong to the preset file type, that is, the video file format type, and the electronic device does not execute the step of moving the target file into the encrypted folder.
In this embodiment of the application, before the electronic device moves the target file into the encrypted folder, the method further includes:
judging the size of the target file;
and if the size of the target file belongs to a preset range, executing the step of moving the target file into the encrypted folder.
For example, if the preset range is [60 million, 80 million ], the size of the target file is determined to be 66 million, and then the size of the target file is 66 million in the preset range [60 million, 80 million ], the step of moving the target file into the encrypted folder is performed.
For example, if the preset range is [60 million, 100 million ], the size of the target file is determined to be 200 million, and then the size of the target file is 200 million and is not in the preset range [10 million, 100 million ], the step of moving the target file into the encrypted folder is not executed.
In this embodiment of the present application, after moving the target file into the encrypted folder, the method further includes:
monitoring whether the non-preset application software executes the operation of the target file or not;
and if the non-preset application software executes and operates the target file, ending the process of the non-preset application software.
For example, if the non-preset application software is office software, the target file is a word file, and the office software executes an operation of reading the word file, the electronic device ends the process of the office software.
For example, if the non-preset application software is wechat software, the target file is a word file, and the wechat software executes an operation of opening the word file, the electronic device ends the process of the wechat software.
In the method described in fig. 1, when it is detected that the encrypted folder is created in the preset directory, a defensive drive protection mechanism is started, where the defensive drive protection mechanism is used to prevent the non-preset application software from operating the files in the encrypted folder through protection of a drive layer, and then the target file to be protected is placed in the encrypted file, so that the situation that the file is exposed in a file system, is easily targeted, cracked or restored is effectively avoided, and it is ensured that the non-preset application software cannot operate the target file, and the target file is effectively protected.
Referring to fig. 3, fig. 3 is a schematic flowchart of another file protection method provided in the embodiment of the present application, where the method includes, but is not limited to, the following steps.
Step S301: and the electronic equipment moves the target file from the encrypted folder to a preset directory.
For example, if the target file is a word file, the word file is stored in the encrypted file, and the preset directory is a C-packing directory, the word file is moved from the encrypted folder to the C-packing directory.
In this embodiment of the application, before moving the target file from the encrypted folder to a location below the preset directory, the method further includes:
acquiring a user name and a password of a user;
verifying the user name and the password of the user;
and if the verification is passed, executing the step of moving the target file from the encrypted folder to the preset directory.
For example, if the user name of the user is 123 and the password is 123456, the electronic device obtains the user name of the user is 123 and the password is 123456, verifies the user name is 123 and the password is 123456, and if the verification is passed, executes the step of moving the target file from the encrypted folder to the preset directory.
For example, if the user name of the user is 123 and the password is 12345678, the electronic device obtains the user name of the user as 123 and the password as 12345678, verifies the user name as 123 and the password as 12345678, and if the verification fails, the step of moving the target file from the encrypted folder to the preset directory is not executed.
Step S302: and the electronic equipment performs hard link on the target file to acquire a placing path of the target file.
Specifically, when the system is going to read a file, the information of the index node is read first, and then the file data is read according to the node number in the information of the index node. And the hard link is to directly create an index node again, and the index node points to the place where the file data is placed, namely, the content of the file is not changed when the file is hard-connected.
For example, if the target file is a word file, the electronic device performs hard linking on the word file, that is, the electronic device establishes an index node, and the index node points to a place where the word file is placed, such as a C: \ encrypted folder, so that the placement path of the word file is obtained as the C: \ encrypted folder.
Step S303: and the electronic equipment acquires the target file for operation according to the placement path.
For example, if the placement path is C: \ encrypted folder, and the target file is a word file, the electronic device obtains the word file according to the placement path, C: \ encrypted folder, and performs operations of opening, reading, and editing on the word file.
In this embodiment of the application, after obtaining the target file according to the placement path and performing an operation, the method further includes:
monitoring whether the target file is operated and finished;
and if the target file is operated, moving the target file from the preset directory to the encrypted folder.
For example, if the target file is a word file and the word file is being edited and the word file is under a C-disk directory, it is monitored whether the word file is completely edited, and if the word file is completely edited, the word file is moved from the C-disk directory to an encrypted folder.
In the method described in fig. 3, the target file can only be opened by other non-default application software after being in the default directory and being hard-linked, and meanwhile, the target file cannot be opened by the non-default application software when being in the encrypted folder.
While the method of the embodiments of the present application has been described in detail above, to facilitate better implementation of the above-described aspects of the embodiments of the present application, the apparatus of the embodiments of the present application is provided below accordingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of afile protection apparatus 400 according to an embodiment of the present application, where theapparatus 400 may include a creatingunit 401, an initiatingunit 402, a namingunit 403, and a movingunit 404. The details of each unit are as follows.
A creatingunit 401 configured to create an encrypted folder under a preset directory;
for example, if the preset directory is a C-packing directory, i.e., a level 1 protection directory, the electronic device creates an encrypted folder under the C-packing directory, where the name of the encrypted folder is encrypted folder 1.
For example, if the preset directory is a D disk directory and an F disk directory, that is, a level 1 protection directory, the electronic device creates an encrypted folder under the D disk directory and the F disk directory, respectively, where the name of the encrypted folder under the D disk directory is encrypted folder 2, and the name of the encrypted folder under the F disk directory is encrypted folder 3.
Astarting unit 402, configured to, when it is detected that the encrypted folder is created under the preset directory, start a defense driving protection mechanism, where the defense driving protection mechanism is configured to protect, by a driving layer, a file in the encrypted folder from being operated by non-preset application software;
for example, if the preset directory is a C-packing directory or a D-packing directory, that is, a level 1 protection directory, the next level subdirectory of the level 1 protection directory is a level 2 protection directory, and the preset application software is a jinshanyao key, when the electronic device detects that an encrypted folder is created under the C-packing directory or the D-packing directory, a defensive drive protection mechanism is started, and at this time, files or subfolders in the encrypted folder are protected by a drive layer and cannot be opened, read, and edited by software other than the jinshanyao key.
A namingunit 403, configured to name the name of the encrypted folder as a preset file name, where the preset file name is directly accessible without being identified by the non-preset application software;
for example, if the name of the encrypted folder is encrypted folder 1 and the preset file name is "poison folder protection" {5ef4af3a-f726-11d0-b8a2-00c04fc309a4}, the electronic device modifies the name of the encrypted folder, that is, encrypted folder 1, to be "poison folder protection" {5ef4af3a-f726-11d0-b8a2-00c04fc309a4}, and after the name of the encrypted folder is "poison folder protection" {5ef4af3a-f726-11d0-b8a2-00c04fc309a4}, the encrypted folder of the name is identified by the system as a recycle bin (full), and the non-preset application software cannot open the encrypted folder.
A movingunit 404, configured to move the target file into the encrypted folder.
For example, as shown in FIG. 2A, suppose there is an encrypted folder named TOYOB File protection {5ef4af3a-f726-11d0-b8a2-00C04fc309a4} under the C packing directory, i.e., level 1 protection directory. If the target file with the name of word is existed and the preset application software is jinshanyaoba, the word file is moved to the encrypted folder as shown in fig. 2B. Then the target file named word. docx is in the encrypted folder, i.e., the level 2 protected directory, as shown in fig. 2C. When the electronic equipment detects that an encrypted folder is created under the C-disk directory, a defense drive protection mechanism is started, a predefined drive layer protection program is called, and drive layer protection is carried out on a target file or a target subfolder in the encrypted folder, namely a 2-level protection directory, wherein the target file or the target subfolder in the encrypted folder can only be opened, read and edited by preset application software, namely Jinshan Yaobao, and cannot be opened, read and edited by software except for the Jinshan Yao.
In the device, when the encrypted folder is detected to be created in the preset directory, a defense drive protection mechanism is started, the defense drive protection mechanism is used for preventing the non-preset application software from operating the files in the encrypted folder through the protection of a drive layer, and then the target files to be protected are placed in the encrypted files.
In an optional scheme, before the movingunit 404 is configured to move the target file into the encrypted folder, the apparatus further includes:
the first judging unit is used for judging the file type of the target file;
and the first execution unit is used for executing the step of moving the target file to the encrypted folder if the file type of the target file belongs to a preset file type.
For example, if the preset file type is a video file type, the electronic device determines that the file type of the target file is the video file type, and the file type of the target file is that the video file type belongs to the preset file type, that is, the video file type, the electronic device executes the step of moving the target file into the encrypted folder.
For example, if the preset file type is a video file format type, and the electronic device determines that the file type of the target file is a text file type, the file type of the target file does not belong to the preset file type, that is, the video file format type, and the electronic device does not execute the step of moving the target file into the encrypted folder.
In the device, before the target file is moved to the encrypted folder, the file type of the target file is judged, so that the file of the file type which needs to be protected by a user can be protected quickly, and the time can be saved effectively.
In yet another alternative, before the movingunit 404 is configured to move the target file into the encrypted folder, the apparatus further includes:
a second judging unit, configured to judge a size of the target file;
and the second execution unit is used for executing the step of moving the target file to the encrypted folder if the size of the target file belongs to a preset range.
For example, if the preset range is [60 million, 80 million ], the size of the target file is determined to be 66 million, and then the size of the target file is 66 million in the preset range [60 million, 80 million ], the step of moving the target file into the encrypted folder is performed.
For example, if the preset range is [60 million, 100 million ], the size of the target file is determined to be 200 million, and then the size of the target file is 200 million and is not in the preset range [10 million, 100 million ], the step of moving the target file into the encrypted folder is not executed.
In the device, before the target file is moved to the encrypted folder, the size of the target file is judged, so that the file with the size of the file which needs to be protected by a user can be protected quickly, and the time can be saved effectively.
In yet another alternative, after thenaming unit 403 is configured to name the name of the encrypted folder to a preset file name, the apparatus further includes:
and the setting unit is used for calling a system interface and setting the attribute of the encrypted folder as the hidden attribute.
For example, if the system interface that controls the attribute of the encrypted folder is system interface 1, system interface 1 is called, and the attribute of the encrypted folder is set as the hidden attribute.
In the device, the attribute of the encrypted folder is set as the hidden attribute by calling the system interface, so that the encrypted folder is prevented from being exposed in a file system and being opened by non-preset application software, and the file can be effectively protected.
In yet another alternative, after the movingunit 404 is configured to move the target file into the encrypted folder, the apparatus further includes:
the monitoring unit is used for monitoring whether the non-preset application software executes the operation of the target file or not;
and the ending unit is used for ending the process of the non-preset application software if the non-preset application software executes and operates the target file.
For example, if the non-preset application software is office software, the target file is a word file, and the office software executes an operation of reading the word file, the electronic device ends the process of the office software.
For example, if the non-preset application software is wechat software, the target file is a word file, and the wechat software executes an operation of opening the word file, the electronic device ends the process of the wechat software.
In the device, by monitoring the non-preset application software, when the non-preset application software opens, reads and edits the target file, the process of the non-preset application software is directly ended. In this way, the target file can be effectively protected.
It should be noted that, in the embodiment of the present application, the specific implementation of each unit may also correspond to the corresponding description of the method embodiment shown in fig. 1.
Referring to fig. 5, fig. 5 is a schematic structural diagram of another file protection apparatus 500 provided in an embodiment of the present application, where the apparatus 500 may include: a first movingunit 501, a first acquiringunit 502, and a second acquiringunit 503. The details of each unit are as follows.
A first movingunit 501, configured to move a target file from an encrypted folder to a preset directory;
for example, if the target file is a word file, the word file is stored in the encrypted file, and the preset directory is a C-packing directory, the word file is moved from the encrypted folder to the C-packing directory.
A first obtainingunit 502, configured to perform hard linking on the target file, and obtain a placement path of the target file;
for example, if the target file is a word file, the electronic device performs hard linking on the word file, that is, the electronic device establishes an index node, and the index node points to a place where the word file is placed, such as a C: \ encrypted folder, so that the placement path of the word file is obtained as the C: \ encrypted folder.
A second obtainingunit 503, configured to obtain the target file according to the placement path for operation.
For example, if the placement path is C: \ encrypted folder, and the target file is a word file, the electronic device obtains the word file according to the placement path, C: \ encrypted folder, and performs operations of opening, reading, and editing on the word file.
In the device, the target file can be opened by other non-preset application software only under the preset directory and after the target file is subjected to hard link, and meanwhile, when the target file is in the encrypted folder, the target file cannot be opened by the non-preset application software.
In an alternative, before moving the target file from the encrypted folder to a preset directory, the first movingunit 501 further includes:
the third acquisition unit is used for acquiring a user name and a password of the user;
the authentication unit is used for authenticating the user name and the password of the user;
and the execution unit is used for executing the step of moving the target file from the encrypted folder to the preset directory if the verification is passed.
For example, if the user name of the user is 123 and the password is 123456, the electronic device obtains the user name of the user is 123 and the password is 123456, verifies the user name is 123 and the password is 123456, and if the verification is passed, executes the step of moving the target file from the encrypted folder to the preset directory.
For example, if the user name of the user is 123 and the password is 12345678, the electronic device obtains the user name of the user as 123 and the password as 12345678, verifies the user name as 123 and the password as 12345678, and if the verification fails, the step of moving the target file from the encrypted folder to the preset directory is not executed.
In the device, before the target file is moved from the folder to the preset directory, the user needs to be authenticated, and only when the authentication is passed, the user can operate the target file in an authorized state, so that the security is improved.
In yet another alternative, after acquiring the target file for operation according to the placement path, the apparatus further includes:
the monitoring unit is used for monitoring whether the target file is operated completely;
and the second moving unit is used for moving the target file from the preset directory to the encrypted folder if the target file is operated.
For example, if the target file is a word file, and the word file is being edited, and the word file is in a C-disk directory, it is monitored whether the word file is completely edited, and if the word file is completely edited, the word file is moved from the C-disk directory to an encrypted folder.
It should be noted that, in the embodiment of the present application, the specific implementation of each unit may also correspond to the corresponding description of the method embodiment shown in fig. 3.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the invention. As shown, the electronic device may include: at least oneprocessor 601, e.g., a CPU, at least onereceiver 603, at least onememory 604, at least onetransmitter 605, at least onecommunication bus 602. Wherein acommunication bus 602 is used to enable the connection communication between these components. In this embodiment of the present invention, thereceiver 603 and thetransmitter 605 of the electronic device may be a wired transmitting port, or may be a wireless device, for example, including an antenna apparatus, and configured to perform signaling or data communication with other node devices. Thememory 604 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). Thememory 604 may optionally be at least one storage device located remotely from theprocessor 601. Thememory 604 stores therein a computer program, and theprocessor 601 is configured to invoke the computer program stored in the memory to perform the following operations:
creating an encrypted folder under a preset directory;
when the encrypted folder is detected to be created under the preset directory, starting a defense driving protection mechanism, wherein the defense driving protection mechanism is used for preventing non-preset application software from operating files in the encrypted folder through protection of a driving layer;
naming the name of the encrypted folder as a preset file name, wherein the preset file name is directly accessed and can not be identified by the non-preset application software;
and moving the target file to the encrypted folder.
In an alternative, before moving the target file into the encrypted folder, the method further includes: judging the file type of the target file; and if the file type of the target file belongs to a preset file type, executing the step of moving the target file to the encrypted folder.
In yet another alternative, before moving the target file into the encrypted folder, the method further includes: judging the size of the target file; and if the size of the target file belongs to a preset range, executing the step of moving the target file into the encrypted folder.
In yet another alternative, after naming the name of the encrypted folder as the preset file name, the method further includes: and calling a system interface, and setting the attribute of the encrypted folder as a hidden attribute.
In yet another alternative, after the moving the target file into the encrypted folder, the method further includes: monitoring whether the non-preset application software executes the operation of the target file or not; and if the non-preset application software executes and operates the target file, ending the process of the non-preset application software.
It should be noted that the implementation and beneficial effects of the operations may also correspond to the corresponding descriptions with reference to the method embodiment shown in fig. 1.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the invention. As shown, the electronic device may include: at least oneprocessor 701, e.g., a CPU, at least onereceiver 703, at least onememory 704, at least onetransmitter 705, at least onecommunication bus 702. Wherein acommunication bus 702 is used to enable connective communication between these components. In this embodiment of the present invention, thereceiver 703 and thetransmitter 705 of the electronic device may be wired transmission ports, or may also be wireless devices, for example, including an antenna apparatus, for performing signaling or data communication with other node devices. Thememory 704 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). Thememory 704 may alternatively be at least one memory device located remotely from theprocessor 701. Thememory 704 stores therein a computer program, and theprocessor 701 is configured to invoke the computer program stored in the memory to perform the following operations:
moving the target file from the encrypted folder to a preset directory;
carrying out hard link on the target file to obtain a placing path of the target file;
and acquiring the target file for operation according to the placement path.
In an alternative, before moving the target file from the encrypted folder to a preset directory, the method further includes:
acquiring a user name and a password of a user;
verifying the user name and the password of the user;
and if the verification is passed, executing the step of moving the target file from the encrypted folder to the preset directory.
In another alternative, after the obtaining the target file for operation according to the placement path, the method further includes:
monitoring whether the target file is operated and finished;
and if the target file is operated, moving the target file from the preset directory to the encrypted folder.
It should be noted that the implementation and beneficial effects of the operations may also correspond to the corresponding descriptions of the method embodiment shown in fig. 3.
Embodiments of the present application also provide a computer-readable storage medium for storing a computer program, which, when executed by a processor, causes the processor to perform the operations performed in the method embodiments shown in fig. 1 or fig. 3.
Embodiments of the present application also provide a computer program product for performing the operations performed in the method embodiments shown in fig. 1 or fig. 3 when the computer program product runs on a processor.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The content downloading method, the related device and the system provided by the embodiment of the present application are described in detail above, a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may 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, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.