Disclosure of Invention
The invention provides a method, a device and user equipment for backing up a media file, which can effectively reduce the cost and simplify the complicated operation of backing up by a user.
In a first aspect of the present invention, a method for backing up a media file is provided, the method comprising:
scanning a media file stored on a first storage device to determine whether the media file has an important file mark;
if the media file has an important file mark, acquiring the directory information of the media file;
and backing up the media files to a second storage device according to the media file directory information.
In a first possible implementation manner of the first aspect, the media file includes at least one of an audio media file, a video media file, and a picture file.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, before the scanning the media files stored on the first storage device to determine whether the media files have important file marks, the method further includes:
receiving a storage or closing instruction of a user to the media file;
sending an important file marking prompt to the user to prompt whether the user marks an important file identifier for the stored or closed media file;
receiving an important file marking instruction sent by a user according to the important file marking prompt;
and marking important file identifications for the saved or closed media files.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, before the scanning the media files stored on the first storage device to determine whether the media files have important file marks, the method further includes:
receiving an editing instruction of a user to the media file;
displaying media file editing options according to the editing instruction, wherein the media file editing options comprise marked important file identification options;
receiving a selection instruction of a user for marking an important file identification option;
and marking important file identifications for the edited media files.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, before the scanning the media files stored on the first storage device to determine whether the media files have important file marks, the method further includes:
receiving a storage or closing instruction of a user to the media file;
sending an important file marking prompt to the user to prompt whether the user marks an important file identifier for the stored or closed media file;
receiving an important file marking instruction sent by a user according to the important file marking prompt;
marking important file identifications for the saved or closed media files;
and
receiving an editing instruction of a user to the media file;
displaying media file editing options according to the editing instruction, wherein the media file editing options comprise marked important file identification options;
receiving a selection instruction of a user for marking an important file identification option;
and marking important file identifications for the edited media files.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, or the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the scanning the media files stored on the first storage device to determine whether the media files are marked with important file identifiers includes:
receiving a scanning instruction of a user, wherein the scanning instruction instructs to scan the media files stored on the first storage device;
scanning the media files stored on the first storage device according to the scanning instruction of the user to determine whether the media files are marked with important file identifiers;
or
Determining that a user edited the media file stored by the first storage device;
scanning the media files edited by the user to determine whether the media files edited by the user are marked with important file identifications;
or
And scanning the media files stored on the first storage device according to a preset scanning period to determine whether the media files are marked with important file identifications.
With reference to the first aspect or any one of the foregoing possible implementations of the first aspect, in a sixth possible implementation of the first aspect:
a first backup storage area is arranged in the first storage device;
if the media file is marked with an important file identifier, after the directory information of the media file is acquired, before the media file is backed up to a second storage device according to the directory information of the media file, the method further comprises the following steps:
placing the obtained directory information of the media files into a first backup storage area of the first storage device;
in this case, the backing up the media file onto the second storage device according to the directory information of the media file includes:
reading the directory information placed in the first backup storage area;
and backing up the media files corresponding to the directory information to the second storage device according to the read directory information.
With reference to the first aspect or any one of the foregoing possible implementation manners of the first aspect, in a seventh possible implementation manner of the first aspect, the method further includes:
scanning the media files stored on the second storage device to determine whether the media files are marked with important file identifications;
if the media file is marked with an important file identifier, acquiring directory information of the media file;
and backing up the media files to a first storage device according to the directory information of the media files.
With reference to the seventh possible implementation manner of the first aspect, in an eighth possible implementation manner of the first aspect:
the first storage device is provided with a second backup storage area, and the backing up the media files to the first storage device according to the directory information of the media files comprises the following steps:
and backing up the media files to a second backup storage area on the first storage device according to the directory information of the media files.
With reference to the first aspect or any one of the foregoing possible implementation manners of the first aspect, in a ninth possible implementation manner of the first aspect, after the backing up the media file to the second storage device according to the directory information of the media file, the method further includes:
determining that the user replaces the first storage device with a third storage device;
and synchronizing the media files which are backed up to the second storage device and stored by the first storage device to the third storage device.
With reference to the first aspect or any one of the foregoing possible implementation manners of the first aspect, in a tenth possible implementation manner of the first aspect, the method further includes:
detecting the working state of the first storage device;
if the first storage device is in an abnormal working state:
sending a storage device switching prompt to a user to prompt the user to switch the storage device; receiving a storage device switching instruction of a user; switching the first storage device to the second storage device according to the storage device switching instruction;
or
Automatically switching the first storage device to the second storage device.
In a second aspect of the present invention, there is provided an apparatus for media file backup, the apparatus comprising:
the scanning unit is used for scanning the media files stored on the first storage device to determine whether the media files are marked with important file identifications;
the acquisition unit is used for acquiring the directory information of the media files if the media files scanned by the scanning unit are marked with important file identifications;
and the backup unit is used for backing up the media files to the second storage device according to the directory information of the media files acquired by the acquisition unit.
In a first possible implementation manner of the second aspect, the media files scanned by the scanning unit include at least one of audio media files, video media files, and picture files.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the apparatus further includes a marking unit, configured to:
receiving a storage or closing instruction of a user to the media file;
sending an important file marking prompt to the user to prompt whether the user marks an important file identifier for the stored or closed media file;
receiving an important file marking instruction sent by a user according to the important file marking prompt;
and marking important file identifications for the saved or closed media files.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the apparatus further includes a marking unit, configured to:
receiving an editing instruction of a user to the media file;
displaying media file editing options according to the editing instruction, wherein the media file editing options comprise options for marking important file identifications;
receiving a selection instruction of a user for the option of marking the important file identifier;
and marking important file identifications for the edited media files.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the apparatus further includes a marking unit, configured to:
receiving a storage or closing instruction of a user to the media file;
sending an important file marking prompt to the user to prompt whether the user marks an important file identifier for the stored or closed media file;
receiving an important file marking instruction sent by a user according to the important file marking prompt;
marking important file identifications for the saved or closed media files;
and
receiving an editing instruction of a user to the media file;
displaying media file editing options according to the editing instruction, wherein the media file editing options comprise options for marking important file identifications;
receiving a selection instruction of a user for the option of marking the important file identifier;
and marking important file identifications for the edited media files.
With reference to the second aspect, or the first possible implementation manner of the second aspect, or the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, or the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the scanning unit is specifically configured to:
receiving a scanning instruction of a user, wherein the scanning instruction instructs to scan the media files stored on the first storage device;
scanning the media files stored on the first storage device according to the scanning instruction of the user to determine whether the media files are marked with important file identifiers;
or
Determining that a user edited the media file stored by the first storage device;
scanning the media files edited by the user to determine whether the media files edited by the user are marked with important file identifications;
or
And scanning the media files stored on the first storage device according to a preset scanning period to determine whether the media files are marked with important file identifications.
With reference to the second aspect or any one of the foregoing possible implementation manners of the second aspect, in a sixth possible implementation manner of the second aspect, the first storage device is provided with a first backup storage area, and the apparatus further includes:
the first cache unit is used for placing the directory information of the media files acquired by the acquisition unit into a first backup storage area of the first storage device;
in this case, the backup unit is specifically configured to:
reading the directory information of the first cache unit placed in the first backup storage area;
and backing up the media files corresponding to the directory information to the second storage device according to the read directory information.
With reference to the second aspect or any one of the foregoing possible implementation manners of the second aspect, in a seventh possible implementation manner of the second aspect, the scanning unit is further configured to scan media files stored on a second storage device to determine whether the media files are marked with important file identifiers; the acquiring unit is also used for acquiring the directory information of the media file if the media file is marked with an important file identifier; the backup unit is further used for backing up the media files to the first storage device according to the directory information of the media files.
With reference to the seventh possible implementation manner of the second aspect, in an eighth possible implementation manner of the second aspect, the first storage device is provided with a second backup storage area, and the backup unit is specifically configured to backup the media files to the second backup storage area on the first storage device according to the directory information of the media files.
With reference to the second aspect or any one of the foregoing possible implementation manners of the second aspect, in a ninth possible implementation manner of the second aspect, the apparatus further includes:
a determination unit, configured to determine that the user replaces the first storage device with a third storage device;
the backup unit is further configured to synchronize the media files, which are backed up to the second storage device and stored in the first storage device, to the third storage device.
With reference to the second aspect or any one of the foregoing possible implementation manners of the second aspect, in a tenth possible implementation manner of the second aspect, the apparatus further includes:
the detection unit is used for detecting the working state of the first storage device;
a switching unit configured to:
if the detection unit detects that the first storage device is in an abnormal working state:
sending a storage device switching prompt to a user to prompt the user to switch the storage device;
receiving a storage device switching instruction of a user;
switching the first storage device to the second storage device according to the storage device switching instruction;
or
And if the first storage equipment is in an abnormal working state, automatically switching the first storage equipment into the second storage equipment.
In a third aspect of the present invention, a user equipment is provided, which includes:
the device comprises a first storage device, a second storage device and a media file backup device;
the media file backup device is respectively connected with the first storage device and the second storage device, and is configured to:
scanning media files stored on a first storage device to determine whether the media files are marked with important file identifications;
if the media file is marked with an important file identifier, acquiring directory information of the media file;
and backing up the media files to a second storage device according to the directory information of the media files.
With reference to the third aspect, in a first possible implementation manner, the first storage device includes any one of: hard disks, floppy disks, U disks, optical disks, removable hard disks, magnetic disks or memory cards;
the second storage device includes any one of: hard disk, floppy disk, U disk, optical disk, removable hard disk, magnetic disk, or memory card.
With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the user equipment includes a mobile phone, a computer, a tablet computer, and a personal digital assistant.
The method, the device and the user equipment for backing up the media files scan the media files stored on the first storage equipment, and when the media files are marked with important file identifications, the media files are backed up on the second storage equipment according to the directory information of the files, namely, the backup device can automatically back up the media files marked with the important media file identifications, only the important media files are marked by a user, and the backup is finished without manual copying and other operations of the user, so that the complicated operation of backing up by the user is effectively simplified, any chip is not required to be added, and the cost is effectively reduced.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 embodiment of the present invention provides a method for backing up a media file, which is performed by a user equipment, specifically, a media file backup device set in the user equipment, where the user equipment includes a first storage device and a second storage device, and the embodiment of the present invention does not limit what types of the first storage device and the second storage device are, for example, the first storage device and the second storage device may be any one of the following storage devices: as shown in fig. 1, the method for backing up a media file provided by the embodiment of the present invention includes the following steps:
s11, the media files stored on the first storage device are scanned to determine whether the media files are marked with important file identifications.
It should be noted that, in this step, the scanned media file is at least one media file stored on the first storage device.
For example, in this step, the media file may include at least one of an audio media file, a video media file, and a picture file. The audio media file refers to a file storing sound content, such as a file with a format of MP3, CD, WAVE (·. WAV), WMA, RealAudio, and the like; the video media file refers to a file storing various dynamic image contents, such as files in the formats of WMV, AVI, MP4, RM/RMVB, kmv, and the like; the picture file is a file storing contents of various tangible things, for example, a file in a format of JPEG, TIFF, BMP, GIF, PNG, or the like.
Obviously, the media file may be other types of media files, and the present invention is not limited to this.
It is understood that, in order to ensure the security of the media files stored in the first storage device, the user marks important media files for which the user wants to save for a long time, which are important for the user, in the backup method provided by the embodiment of the present invention, before this step, i.e., the step S11, the user marks important file identifications. For example, the user device may provide an important file option for the media file, and the user may mark an important file identifier for the media file by selecting the option; for another example, the user equipment may receive an instruction that a user wants to mark a certain media file as an important file, and after receiving the instruction, the user equipment adds an important file identifier to the attribute information of the media file, that is, marks the important file identifier for the media file. Therefore, in this step, the user equipment can find the important media files through scanning, and then backup the important media files, thereby effectively ensuring the security of the media files.
Specifically, there may be three specific implementation manners in this step, which are as follows:
first, in an embodiment of the present invention, when receiving a scanning instruction of a user, and the scanning instruction indicates to scan a media file stored on the first storage device, a user device may scan the media file stored on the first storage device according to the scanning instruction of the user, to determine whether the media file is marked with an important file identifier; that is, this step can be performed according to the wishes of the user, and the user can issue the scanning instruction at any time according to the actual needs of the user. For example, the user device may provide the user with a function option to scan the media file, and this step is initiated when the user selects the function option.
Secondly, the user equipment may scan the media files stored on the first storage device according to a preset scanning period to determine whether the media files are marked with important file identifiers. The length of the preset scanning period is not limited, and may be set arbitrarily, for example, 1 day, 1 week, 2 weeks, one month, and the like, and the scanning period may be preset by the user or may be a default setting of the user equipment.
Thirdly, the user equipment can monitor the operation of the user on the media file stored in the first storage device in real time, and once the operation of the user on the media file stored in the first storage device is monitored and determined, the media file operated by the user is scanned to determine whether the media file operated by the user is marked with an important file identifier. The "operation" monitored by the user equipment may include that the user pastes a new media file into the first storage device, and the user opens the media file originally stored in the first storage device and then closes the media file, or the user modifies the content of the media file originally stored in the first storage device, or the user modifies the attribute of the media file originally stored in the first storage device, and the like, which is not limited in the present invention. For example, once the user device detects that the user has pasted a new media file into the first storage device, the user device will start scanning the new media file to determine whether the media file is marked with an important file identifier.
It will be appreciated that in one embodiment of the invention, the user equipment may perform scanning in at least two of the three ways described above.
It should be noted that the present invention does not limit the implementation manner of the step, and may be at least one of the above three manners, and may also be other scanning manners.
In this step, if the user equipment scans that the media files are marked with important file identifications, step S12 is executed, and the user equipment may not perform any processing for the media files not marked with important file identifications.
S12, if the media file is marked with the important file identification, obtaining the directory information of the media file.
It should be noted that, in the embodiment of the present invention, the directory information refers to path information for storing media files on the storage device. For example, the directory information of a certain media file is "E: \ Beijing division \ research and development department 1\ communication group \ work \ courseware.
Specifically, the user equipment may read the attribute information of the media file marked with the important file identifier to obtain the directory information of the file, and certainly, the user equipment may also have other ways of obtaining the directory information.
And S13, backing up the media file to a second storage device according to the acquired media file directory information.
The second storage device may be provided with a special backup storage area, and in this step, the user device may backup the media file marked with the important file identifier to the backup storage area in the second storage device.
The method for backing up the media files comprises the steps of scanning the media files stored on the first storage device, backing up the media files to the second storage device according to the directory information of the files when the media files are marked with important file identifications, namely backing up the media files marked with the important media file identifications automatically, so that the important media files are marked only by a user, and manual copying and other operations of the user are not needed to complete the backing up, the complicated operation of backing up by the user is effectively simplified, the file loss caused by forgetting or missing of the user can be well avoided, the safety of the backing up is effectively ensured, the user experience is obviously improved, any chip is not needed, and the cost is effectively reduced.
It is understood that, in the embodiment of the present invention, before the step S11, the user needs to mark the important file identifier for the important file that the user thinks, that is, the user equipment needs to mark the important file identifier for the media file according to the user' S requirement under the instruction of the user, and the following description describes in detail how the user equipment marks the important media file identifier for the media file.
Specifically, in the method for backing up a media file provided in the embodiment of the present invention, the method for marking an important media file identifier for the media file by the user equipment includes the following two types, but is not limited to the following two types:
one is as follows:
when a user needs to close a media file, the user usually clicks a close button of the media file, that is, issues a close instruction, and at this time, the user equipment may send an important file marking prompt to the user when receiving the close instruction of the user to the media file, for example, pop up a dialog box, which displays: whether to mark the important file identification for the file and to give option buttons of "yes" and "no" to ask, i.e. prompt, the user whether to mark the important file identification for the media file that he closed. If the user finds the file important, an important file mark marking instruction is sent according to the important file mark prompting, for example, a yes button in a dialog box is clicked to instruct the user equipment to mark the important file mark for the media file, after the user equipment receives the instruction, the important file mark is marked for the media file closed by the user, of course, if the user finds the file not important and does not need to mark, a no mark instruction can be sent according to the important file mark prompting, for example, a no button in the dialog box is clicked to instruct the user equipment not to mark the important file mark for the media file.
It can be understood that this manner is not limited to the case where the user closes the media file, but may also be implemented at other times, for example, when the user saves the media file, for example, after the user modifies a media file, the user usually clicks a save button or a pull-down menu "save option", that is, issues a save instruction, and the user equipment may pop up an important file marking prompt when receiving the save instruction of the user for the media file, so that the user performs the marking operation or does not perform the marking operation under the instruction issued by the user according to the important file marking prompt, which is not described herein again.
It should be noted that, for example, the user device may send the important document marking prompt to the user in the form of a pop-up dialog box to ask the user whether to mark, and the user selects yes if he wants to mark, and otherwise selects no. Of course, the prompting method of the user equipment is not limited to this method, and other methods are also possible.
The second step is as follows:
each time a user encounters a media file that the user considers important, the user can mark the important file identification for the media file by editing the media file. Specifically, the user will issue an editing instruction for the media file to the user equipment, in an embodiment of the present invention, the editing instruction may refer to any operation that the user wants to edit the media file, for example, an operation that the user clicks a right button on an icon of the media file, an operation that the user clicks any button in a toolbar or menu bar of the media file, and so on, when the user equipment detects such an operation of the user, a media file editing option corresponding to the user operation is displayed for the user, for example, a pull-down menu is popped up, the pull-down menu includes at least one editing option, an option marking an important file identifier is included in the displayed at least one editing option, the user marks the media file by selecting the option marking an important file identifier, that is, the user equipment receives a selection instruction of the option marking an important file identifier from the user, thereby marking the important file identification for the media file edited by the user according to the instruction.
For example, the user's editing instruction may be that the user clicks a left button to select a certain media file, then clicks a right button, and at this time, the user device displays an editing option menu including an "important file identifier" option, and then the user selects the option to mark the media file.
For another example, the user's editing instruction may be that the user clicks an editing button in a menu bar of a certain media file, the user device displays a pull-down option menu, which includes an "important file identifier" option, and the user selects the option to mark the media file.
It will be appreciated that in one embodiment of the invention, the user device may tag the media files with important file identifications in both of the above-described ways.
It can be understood that, in the embodiment of the present invention, before backing up the media files in the first storage device to the second storage device, the media files marked with the important identifiers need to be scanned first, and whether marking the media files with the important file identifiers is completed manually by the user is required. Therefore, how to perform important file identification on media files is important for users. In the embodiment of the invention, for the user, the two modes are simple to operate, so that the user experience can be obviously improved.
Specifically, in an embodiment of the present invention, a dedicated storage area may be disposed in the first storage device, which is referred to as a first backup storage area in the embodiment of the present invention, for storing the directory information acquired by the user equipment in step S12, that is, after step S12 and before step S13, the method may further include the following steps:
placing the obtained directory information of the media files into a first backup storage area of the first storage device;
at this time, in step S13, specifically, the directory information placed in the first backup storage area is read, and the media file corresponding to the directory information is backed up on the second storage device according to the read directory information.
Further, in an embodiment of the present invention, the user equipment may backup not only the media files stored in the first storage device to the second storage device, but also the media files in the second storage device to the first storage device, that is, the method for backing up the media files provided in the embodiment of the present invention may further include the following steps:
scanning the media files stored on the second storage device to determine whether the media files are marked with important file identifications;
if the media file is marked with an important file identifier, acquiring directory information of the media file;
and backing up the media files to a first storage device according to the directory information of the media files.
It can be understood that, for how to backup the media files on the second storage device to the first storage device, how to mark the media files on the second storage device, and the like, the same manners as those adopted in the process of backing up the media files of the first storage device to the second storage device are adopted, that is, the specific implementation process of backing up the media files on the second storage device to the first storage device is the same as the specific implementation process of backing up the media files of the first storage device to the second storage device, refer to the foregoing embodiments specifically, and are not described herein again.
It should be noted that, when the user equipment backs up the media files stored in the first storage device to the second storage device and also backs up the media files in the second storage device to the first storage device, a special storage area may be disposed in the first storage device, which is referred to as a second backup storage area in the embodiment of the present invention, and is used to store the media files backed up by the second storage device on the first storage device, at this time, the step of backing up the media files to the first storage device according to the directory information of the media files specifically includes:
and backing up the media files to a second backup storage area on the first storage device according to the directory information of the media files.
It should be noted that, when the first storage device is provided with the aforementioned first backup storage area and second backup storage area at the same time, both may be the same storage area, that is, a special storage area is provided on the first storage device, and is used to store the directory information acquired in step S12, and also is used to store the media file backed up on the first storage device by the second storage device, of course, both may also be two storage areas that separately exist, which is not limited in this disclosure.
Further, in an embodiment of the present invention, after the step S13, if the first storage device is damaged or otherwise abnormal, the user needs to replace the first storage device, and the user may detach the first storage device from the user device and replace the first storage device with a third storage device, in which case, the file backup method provided in the embodiment of the present invention may further include the following steps:
determining that the user replaces the first storage device with a third storage device;
and synchronizing the media files which are backed up to the second storage device and stored by the first storage device to the third storage device.
Specifically, when the user checks that the first storage device cannot be used or the first storage device cannot meet the use requirement of the user, the user replaces the first storage device with the third storage device. When the user changes the third storage device and the user device recognizes the storage device, the storage device is found to be different from the first storage device, that is, it is determined that the user changes the first storage device to the third storage device, and the media files stored in the first storage device and originally backed up to the second storage device are synchronized to the third storage device.
Further, in order to further improve user experience, in an embodiment of the present invention, the file backup method provided in the embodiment of the present invention may further include the following steps:
detecting the working state of the first storage device;
if the first storage device is detected to be in an abnormal working state, the user device can send a storage device switching prompt to a user so as to prompt the user to switch the storage device; after receiving a storage device switching instruction of a user, the user device switches the first storage device into a second storage device according to the storage device switching instruction; the user equipment can also directly and automatically switch the first storage equipment to the second storage equipment.
Specifically, the user equipment detects the working state of the first storage device in real time or periodically according to a preset setting, and if the user equipment detects that the first storage device is in an abnormal working state, for example, a user cannot open a plurality of media files which can be opened originally on the first storage device, or cannot normally play after opening a plurality of media files on the first storage device, at this time, the user equipment switches the first storage device into the second storage device, so that the user opens the backup media files on the second storage device. The switching modes can be the following two types:
the method is that the user equipment sends a storage equipment switching prompt to a user to prompt the user to switch the storage equipment. And then the user equipment receives a storage equipment switching instruction of the user, and switches the first storage equipment into the second storage equipment according to the storage equipment switching instruction, so that the user can open the media files backed up on the second storage equipment of the first storage equipment.
The second way is that the user equipment automatically switches the first storage equipment to the second storage equipment, so that the user can open the media files backed up on the second storage equipment of the first storage equipment.
In summary, the method for backing up a media file according to the embodiment of the present invention scans a media file stored on a first storage device, and when the media file is marked with an important file identifier, backs up the media file on a second storage device according to directory information of the file, that is, a user device can automatically back up the media file marked with the important media file identifier, so that only the user is required to mark the important media file, and the user does not need to perform operations such as manual copying to complete the backup, thereby effectively simplifying the tedious operations of the user for backing up, better avoiding the file loss caused by the forgetting or omission of the user, effectively ensuring the security of the backup, and significantly improving user experience.
In order to better understand the technical solution of the method for backing up a media file provided by the embodiment of the present invention, the method for backing up a media file provided by the present invention is described in detail below by using a specific embodiment.
In a specific embodiment of the present invention, as shown in fig. 2 and fig. 3, a user device includes two storage devices, which are a hard disk 1 (a first storage device) and a hard disk 2 (a second storage device), the hard disk 1 includes three media files, which are a media file a, a media file B, and a media file C, respectively, and the hard disk 1 is provided with a directory backup storage area (a first backup storage area), the method for backing up a media file of this embodiment includes the following steps:
10. the user browses the media files on the hard disk 1, finds that the media file a is important for the user, and instructs the user equipment to mark an important file identifier for the media file a.
20. The user equipment receives the indication that the user marks the important file identification on the media file A, and marks the important file identification on the media file A.
For example, a user may click a right mouse button at an icon of the media file a to issue an editing instruction, the user equipment pops up a pull-down menu, the pull-down menu includes at least one editing option, the displayed at least one editing option includes an option for marking an important file identifier, the user marks the media file a by selecting the option for marking the important file identifier, and after receiving a selection of the user, the user equipment marks the important file identifier for the media file a.
21. The user equipment scans the media files stored on the hard disk 1 and determines that the media file A is marked with an important file identifier.
Specifically, in this step, the scanning of the hard disk 1 by the user equipment may be performed under the instruction of the user, may also be performed automatically at regular time, or may be triggered by a special event, where the special event may be, for example, a certain operation of the user on a media file stored on the hard disk 1, specifically, for example, the user modifies the media file stored on the hard disk 1, which is not limited in this embodiment.
22. The user equipment obtains the directory information A marked with the important file identification of the media file A and places the directory information A in the directory backup storage area of the hard disk 1.
23. The user equipment reads the directory information A placed in the directory backup storage area, and backups the media file A to the hard disk 2 according to the read directory information A.
After this step, the backup file a' of the media file a will be stored on the hard disk 2.
Optionally, the hard disk 2 may be specially provided with a backup storage area for storing the backup file of the media file on the hard disk 1, so that in step 23, the user equipment may store the backup file a' of the media file a in the backup storage area on the hard disk 2.
In another embodiment of the present invention, as shown in fig. 4 and fig. 5, the user equipment includes two storage devices, which are a hard disk 1 (a first storage device) and a hard disk 2 (a second storage device), respectively, and there are three media files on the hard disk 1, which are a media file a, a media file B, and a media file C, respectively, where the user has marked an important file identifier for the media file a in advance; there are three media files on the hard disk 2, which are media file D, media file E, and media file F, wherein the user has marked an important file identifier for the media file E in advance. In addition, the hard disk 1 is provided with a backup storage area 1, and the hard disk 2 is provided with a backup storage area 2, and the backup method of the media file of the embodiment includes the following steps:
100. the user equipment scans the media files stored on the hard disk 1 and determines that the media file A is marked with an important file identifier.
200. The user equipment obtains the directory information A marked with the important file identification of the media file A and places the directory information A in the backup storage area 1 of the hard disk 1.
300. The user equipment reads the directory information A placed in the directory backup storage area 1 and backs up the media file A to the backup storage area 2 on the hard disk 2 according to the read directory information A.
After this step, the backup file a' of the media file a will be stored in the backup storage area 2 of the hard disk 2.
400. The user equipment scans the media files stored on the hard disk 2 and determines that the media file E is marked with an important file identifier.
500. The user equipment obtains the directory information E of the media file E marked with the important file identifier, and places the directory information E in the backup storage area 2 of the hard disk 2.
600. The user equipment reads the directory information E placed in the backup storage area 2 and backs up the media file E to the backup storage area 1 on the hard disk 1 according to the read directory information E.
After this step, the backup file E' of the media file E will be stored in the backup storage area 1 of the hard disk 1.
It should be noted that, the steps 100-300 are performed sequentially for backing up the important media files on the hard disk 1 to the hard disk 2, and the steps 400-600 are performed sequentially for backing up the important media files on the hard disk 2 to the hard disk 1, but the order between the steps 100-300 and 400-600 is not limited, and may be performed sequentially or in parallel.
Accordingly, an embodiment of the present invention further provides a media file backup apparatus 20, as shown in fig. 6, including:
a scanning unit 201, configured to scan media files stored on a first storage device to determine whether the media files are marked with important file identifiers;
an obtaining unit 202, configured to obtain directory information of the media file if the media file scanned by the scanning unit 201 is marked with an important file identifier;
the backup unit 203 is configured to backup the media file to the second storage device according to the directory information of the media file acquired by the acquisition unit 202.
In the apparatus for backing up media files according to the embodiment of the present invention, the scanning unit 201 scans the media files stored in the first storage device, and when the scanned media files are marked with important file identifiers, the obtaining unit 202 obtains the directory information, and the backup unit 203 backs up the media files to the second storage device according to the directory information of the files, that is, the media file backup apparatus 20 can automatically back up the media files marked with the important media file identifiers, so that only the user is required to mark the important media files, and the user is not required to perform operations such as manual copying to complete the backup, thereby effectively simplifying the tedious operations of the user in backing up, and effectively reducing the cost without adding any chip.
Optionally, the media files scanned by the scanning unit 201 include at least one of audio media files, video media files and picture files.
Optionally, in an embodiment of the present invention, as shown in fig. 7, the media file backup apparatus 20 further includes a marking unit 204, specifically configured to:
receiving a storage or closing instruction of a user to the media file;
sending an important file marking prompt to the user to prompt whether the user marks an important file identifier for the stored or closed media file;
receiving an important file marking instruction sent by a user according to the important file marking prompt;
and marking important file identifications for the saved or closed media files.
Alternatively, in an embodiment of the present invention, the marking unit 204 is specifically configured to:
receiving an editing instruction of a user to the media file;
displaying media file editing options according to the editing instruction, wherein the media file editing options comprise options for marking important file identifications;
receiving a selection instruction of a user for the option of marking the important file identifier;
and marking important file identifications for the edited media files.
It is understood that in one embodiment of the present invention, the marking unit 204 may be capable of scanning in at least one of the two marking manners described above.
Optionally, in an embodiment of the present invention, the scanning unit 201 is specifically configured to:
receiving a scanning instruction of a user, wherein the scanning instruction instructs to scan the media files stored on the first storage device;
scanning the media files stored on the first storage device according to the scanning instruction of the user to determine whether the media files are marked with important file identifiers;
optionally, in an embodiment of the present invention, the scanning unit 201 is specifically configured to:
determining that a user operates on the media file stored in the first storage device;
scanning the media files operated by the user to determine whether the media files operated by the user are marked with important file identifications;
optionally, in an embodiment of the present invention, the scanning unit 201 is specifically configured to:
and scanning the media files stored on the first storage device according to a preset scanning period to determine whether the media files are marked with important file identifications.
It is understood that in one embodiment of the present invention, the scanning unit 201 can perform scanning in at least two ways of the above three ways.
Optionally, in an embodiment of the present invention:
a first backup storage area is arranged on the first storage device;
as shown in fig. 8, the apparatus 20 may further include:
a first caching unit 205, configured to place the directory information of the media file acquired by the acquiring unit 202 into a first backup storage area of the first storage device;
in this case, the backup unit 203 is specifically configured to:
reading the directory information of the first cache unit 205 placed in the first backup storage area;
and backing up the media file corresponding to the directory information to the second storage device according to the read directory information.
Further, in one embodiment of the present invention:
the scanning unit 201 is further configured to scan the media files stored on the second storage device to determine whether the media files are marked with important file identifiers;
the obtaining unit 202 is further configured to obtain directory information of the media file if the media file is marked with the important file identifier;
the backup unit 203 is further configured to backup the media files to the first storage device according to the directory information of the media files acquired by the acquisition unit 202.
Further, in an embodiment of the present invention, as shown in fig. 9, the media file backup apparatus 20 may further include:
a determining unit 206, configured to determine that the user replaces the first storage device with the third storage device if the user removes and replaces the first storage device with the third storage device;
at this time, the backup unit 203 is also used to synchronize the media files stored in the first storage device, which are backed up on the second storage device, to the third storage device.
Further, in an embodiment of the present invention, as shown in fig. 10, the media file backup apparatus 20 may further include:
a detection unit 207 for detecting an operating state of the first storage device;
a switching unit 208, configured to, if the detecting unit 207 detects that the first storage device is in the abnormal operating state:
sending a storage device switching prompt to a user to prompt the user to switch the storage device;
receiving a storage device switching instruction of a user;
switching the first storage device to the second storage device according to a storage device switching instruction;
or
And if the first storage equipment is in an abnormal working state, automatically switching the first storage equipment into the second storage equipment.
It should be noted that, for the specific functions of each structural unit of the media file backup apparatus 20 provided in the embodiment of the present invention, please refer to the foregoing method embodiment.
Fig. 11 shows another embodiment of a media file backup device according to the present invention, and as shown in fig. 11, the media file backup device 40 provided in this embodiment includes a processor 401, a memory 402, a communication interface 403, and a bus 404. The processor 401, memory 402 and communication interface 403 are coupled by a bus 404 and communicate with each other. The bus 404 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus 404 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus. Wherein:
the memory 402 is used to store executable program code, including computer operating instructions. Memory 402 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 401 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 402, for:
scanning the media files stored on the first storage device to determine whether the media files are marked with important file identifications;
if the media file is marked with the important file identification, acquiring directory information of the media file;
and backing up the media files to the second storage device according to the acquired directory information of the media files.
The processor 401 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention.
It should be noted that, besides the above functions, the processor 401 may also be configured to execute other processes in the above method embodiments, and details are not described herein again.
It should be further noted that the division of the functional units in the processor 401 may refer to the foregoing embodiments of the media file backup apparatus, and is not described herein again.
It is noted that in one embodiment of the present invention, the memory 402 may be the same component as either of the first storage device and the second storage device.
Correspondingly, an embodiment of the present invention further provides a user equipment 5, as shown in fig. 12, where the user equipment 5 includes:
at least two storage devices and a media file backup apparatus 52;
the at least two storage devices include a first storage device 50 and a second storage device 51;
the media file backup apparatus 20 is respectively connected to the first storage device 50 and the second storage device 51, and is configured to:
scanning the media files stored on the first storage device 50 to determine if the media files are marked with important file identifications;
if the media file is marked with the important file identification, acquiring directory information of the media file;
the media files are backed up onto the second storage device 51 according to the directory information of the media files.
In the user equipment 5 of the embodiment of the present invention, the media file backup apparatus 20 is capable of scanning the media files stored on the first storage device 50, when the media file is marked with the important file identifier, the media file is backed up to the second storage device 51 according to the directory information of the file, that is, the media file backup apparatus 20 can automatically backup the media file marked with the important media file identifier, in this way, the user only needs to mark the important media files and does not need to perform manual copying and other operations to complete the backup, therefore, the complicated operation of the user for backup is effectively simplified, the file loss caused by forgetting or missing of the user can be better avoided, the backup safety is effectively ensured, therefore, the user experience is obviously improved, any chip is not required to be added, and the cost is effectively reduced.
The media file backup device 52 may be the media file backup device provided in the foregoing embodiments, and is not described herein again.
Optionally, the first storage device 50 may include any one of: hard disks, floppy disks, U disks, optical disks, removable hard disks, magnetic disks or memory cards; the second storage device 51 includes any one of: hard disk, floppy disk, U disk, optical disk, removable hard disk, magnetic disk, or memory card.
Specifically, the user equipment 5 provided in the embodiment of the present invention may be a mobile phone, a computer, a tablet computer, and a personal digital assistant, or may be other types of user equipment including two storage devices, which is not limited in the present invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus necessary general hardware, and may also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions may be various, such as analog circuits, digital circuits, or dedicated circuits. However, the implementation of a software program is a more preferable embodiment for the present invention. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.