CN110781131A - Mobile storage method, device and storage medium with version control function - Google Patents

Mobile storage method, device and storage medium with version control function Download PDF

Info

Publication number
CN110781131A
CN110781131A CN201811024378.XA CN201811024378A CN110781131A CN 110781131 A CN110781131 A CN 110781131A CN 201811024378 A CN201811024378 A CN 201811024378A CN 110781131 A CN110781131 A CN 110781131A
Authority
CN
China
Prior art keywords
version
file
folder
current
last
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201811024378.XA
Other languages
Chinese (zh)
Inventor
王旭辉
黄显澍
王小丰
肖新光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Antiy Technology Group Co Ltd
Original Assignee
Harbin Antiy Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Antiy Technology Group Co Ltd filed Critical Harbin Antiy Technology Group Co Ltd
Priority to CN201811024378.XA priority Critical patent/CN110781131A/en
Publication of CN110781131A publication Critical patent/CN110781131A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a mobile storage method with a version control function, which comprises the following steps: initializing a file or a folder needing to be subjected to version control, and storing the current version of the file or the folder in a common storage area; when the storage operation exists, judging whether the file or the folder is modified, if not, replacing the current version with the last version and storing the current version in the common storage area, and keeping the version number unchanged; if the version number of the current version is not the same as the version number of the current version, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified. The invention also discloses a mobile storage device with the version control function and a mobile storage medium. The technical scheme of the invention realizes the version control function of the mobile storage medium by using hardware.

Description

Mobile storage method, device and storage medium with version control function
Technical Field
The present invention relates to the field of mobile storage technologies, and in particular, to a mobile storage method and apparatus with a version control function, and a storage medium.
Background
At present, most of mobile storage media often have data unrecoverable loss caused by damage, mistaken deletion and coverage after deletion of a storage chip in the using process, or only can partially recover even if the storage chip is recovered. The existing storage medium has no version control in the using process. The traditional version control needs a specific storage server, corresponding software is installed, the mode is complicated, the use is complex, and the occupied space is large.
Disclosure of Invention
Aiming at the technical problems, the invention realizes the version control function of the file or the folder in the mobile storage medium, and overcomes the problems of complicated realization, complex installation and the like of the traditional software.
The invention is realized by adopting the following method: a mobile storage method having a version control function, comprising:
initializing a file or a folder needing to be subjected to version control, and storing the current version of the file or the folder in a common storage area;
when the storage operation exists, judging whether the file or the folder is modified, if not, replacing the current version with the last version and storing the current version in the common storage area, and keeping the version number unchanged; if the version number of the current version is not the same as the version number of the current version, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified.
Further, the determining whether the file or the folder is modified specifically includes: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
Further, still include: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
The invention can be realized by adopting the following devices: a removable storage device with version control functionality, the device comprising a memory for storing a plurality of instructions and a processor for loading the instructions stored in the memory to perform:
initializing a file or a folder needing to be subjected to version control, and storing the current version of the file or the folder in a common storage area;
when the storage operation exists, judging whether the file or the folder is modified, if not, replacing the current version with the last version and storing the current version in the common storage area, and keeping the version number unchanged; if the version number of the current version is not the same as the version number of the current version, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified.
Further, the determining whether the file or the folder is modified specifically includes: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
Further, still include: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
Meanwhile, the invention can be realized by adopting the following devices: a mobile storage device having a version control function, comprising:
the initialization module is used for initializing a file or a folder which needs to be subjected to version control and storing the current version of the file or the folder in a common storage area;
the version control module is used for judging whether the file or the folder is modified or not when the storage operation exists, replacing the current version with the last version and storing the current version in the common storage area if the file or the folder is not modified, and keeping the version number unchanged; if the current version exists, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified;
a common storage area for storing common data and a last version file or folder;
and the version control area is used for storing all versions of files or folders for version control except the last version.
Further, the determining whether the file or the folder is modified specifically includes: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
Further, still include: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
The present invention also proposes a non-transitory computer-readable removable storage medium, on which a computer program is stored, which when executed by a processor implements a removable storage method with a version control function as described in any one of the above.
In summary, the present invention provides a mobile storage method, a device and a storage medium with a version control function, in which the technical solution of the present invention utilizes a USB interface of the mobile storage medium to complete communication with an upper computer, and includes two storage areas: the file management system comprises a common storage area and a version control area, wherein files or folders of the last version are stored in the common storage area, and files or folders of other versions except the last version are stored in the version control area. Further, other versions of files or folders may be called as desired by the user.
The method, the device and the storage medium of the invention realize the storage and management of files or folders of multi-version data by utilizing the hardware characteristic of the mobile storage medium, realize the function of version control and overcome the defects of complex use, complex installation and larger occupied storage space caused by the prior realization of the version control by utilizing software.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of an embodiment of a mobile storage method with a version control function according to the present invention;
FIG. 2 is a block diagram of an embodiment of a mobile storage device with a version control function according to the present invention;
fig. 3 is a structural diagram of an embodiment of a mobile storage device with a version control function according to the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention and make the above objects, features, and advantages of the present invention more obvious and understandable, the following will explain the technical solutions in the present invention in detail with reference to the accompanying drawings:
as shown in fig. 1, the present invention first provides an embodiment of a mobile storage method with a version control function, including:
s101: initializing a file or a folder needing to be subjected to version control, and storing the current version of the file or the folder in a common storage area; specifically, but not limited to, the user selects a file or a folder which needs to be version-controlled by using the version control software in the mobile storage medium, and can set notes for each version of each software, further distinguish information of each version, and click to save to complete initialization configuration.
S102: when the saving operation exists, judging whether the file or the folder is modified, if not, executing S103; if yes, executing S104; specifically, but not limited to, when a save instruction is received, the last version of the file or folder is compared with the current version of the file or folder stored in the ordinary storage area, and if the last version of the file or folder is the same as the current version of the file or folder, it is determined that no modification exists, and if the last version of the file or folder is different from the current version of the file or folder, it is determined that modification exists. The last version is the version operated by the user, and the current version is the version stored in the common storage area.
S103: replacing the current version with the last version and storing the current version in a common storage area, and keeping the version number unchanged; although the modification is determined not to exist, the operation behavior information can be recorded through the replacement storage, and the operation behavior information can be used for later tracing.
S104: and storing the current version in the version control area, replacing the current version with the last version and storing the current version in the common storage area, and modifying the version number. Preferably, the method further comprises the steps of setting remarks for each version, further distinguishing information of each version, and clicking to store.
Preferably, this embodiment further includes: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list. When a user needs to call each previous version, the user only needs to open the version control software, check the version list and call the files or folders of the corresponding version stored before according to the version number and the remark information.
As shown in fig. 2, the present invention secondly provides an embodiment of a mobile storage device with a version control function, which includes a memory 21 and a processor 22, where the memory 21 is used to store a plurality of instructions, and the processor 22 loads the instructions stored in the memory 21 to execute:
initializing a file or a folder needing to be subjected to version control, and storing the current version of the file or the folder in a common storage area;
when the storage operation exists, judging whether the file or the folder is modified, if not, replacing the current version with the last version and storing the current version in the common storage area, and keeping the version number unchanged; if the version number of the current version is not the same as the version number of the current version, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified.
Preferably, the determining whether the file or the folder is modified specifically includes: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
Preferably, the method further comprises the following steps: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
As shown in fig. 3, the present invention further provides an embodiment of a mobile storage device with a version control function, including:
an initialization module 301, configured to initialize a file or a folder that needs to be version-controlled, and store a current version of the file or the folder in a common storage area 303;
a version control module 302, configured to determine whether a file or a folder has been modified when a save operation exists, and if not, replace the current version with the last version and store the current version in the ordinary storage area 303, and keep the version number unchanged; if the current version exists, the current version is stored in the version control area 304, the last version is used for replacing the current version and storing the current version in the common storage area 303, and the version number is modified;
a normal storage area 303 for storing normal data and a last version file or folder;
a version control area 304 for storing all versions of files or folders for version control except the last version.
Preferably, the determining whether the file or the folder is modified specifically includes: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
Preferably, the method further comprises the following steps: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
The present invention also proposes a non-transitory computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements a mobile storage method with a version control function as described in any one of the above.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts in the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment. The mobile storage medium mentioned in the above embodiments includes but is not limited to: u disk, SSD, mobile hard disk and other mobile storage related media.
As described above, in the embodiments of the mobile storage method, the mobile storage device, and the mobile storage medium with the version control function, two storage areas are provided in the mobile storage medium, and the file or the folder of the last version is stored in the ordinary storage area, so that each of the other past versions of the file or the folder which needs to be version-controlled by user initialization is stored in the version control area, and when the user needs to call another version, only the version control software in the mobile storage medium needs to be opened, and the required version is called through the version list. The embodiment of the invention realizes version control through the mobile storage medium, has simple operation and convenient calling of each version, and fills the blank of hardware for version control.
The above examples are intended to illustrate but not to limit the technical solutions of the present invention. Any modification or partial replacement without departing from the spirit and scope of the present invention should be covered in the claims of the present invention.

Claims (10)

1. A mobile storage method having a version control function, comprising:
initializing a file or a folder needing to be subjected to version control, and storing the current version of the file or the folder in a common storage area;
when the storage operation exists, judging whether the file or the folder is modified, if not, replacing the current version with the last version and storing the current version in the common storage area, and keeping the version number unchanged; if the version number of the current version is not the same as the version number of the current version, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified.
2. The method of claim 1, wherein the determining whether the file or folder has been modified specifically comprises: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
3. The method of claim 1, further comprising: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
4. A removable storage device with version control functionality, the device comprising a memory for storing a plurality of instructions and a processor for loading the instructions stored in the memory to perform:
initializing a file or a folder needing to be subjected to version control, and storing the current version of the file or the folder in a common storage area;
when the storage operation exists, judging whether the file or the folder is modified, if not, replacing the current version with the last version and storing the current version in the common storage area, and keeping the version number unchanged; if the version number of the current version is not the same as the version number of the current version, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified.
5. The apparatus of claim 4, wherein the determining whether the file or folder has been modified comprises: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
6. The apparatus of claim 4, further comprising: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
7. A mobile storage device with version control function, comprising:
the initialization module is used for initializing a file or a folder which needs to be subjected to version control and storing the current version of the file or the folder in a common storage area;
the version control module is used for judging whether the file or the folder is modified or not when the storage operation exists, replacing the current version with the last version and storing the current version in the common storage area if the file or the folder is not modified, and keeping the version number unchanged; if the current version exists, the current version is stored in the version control area, the last version is used for replacing the current version and storing the current version in the common storage area, and the version number is modified;
a common storage area for storing common data and a last version file or folder;
and the version control area is used for storing all versions of files or folders for version control except the last version.
8. The apparatus of claim 7, wherein the determining whether the file or folder has been modified comprises: and comparing the file or the folder of the last version with the file or the folder of the current version, if the file or the folder of the last version is the same, judging that no modification exists, and if the file or the folder of the last version is different, judging that the modification exists.
9. The apparatus of claim 7, further comprising: and generating a version list including remarks, and calling a file or a folder of a corresponding version from the version control area by using the version list.
10. A non-transitory computer-readable removable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the removable storage method having a version control function according to any one of claims 1 to 3.
CN201811024378.XA 2018-09-04 2018-09-04 Mobile storage method, device and storage medium with version control function Withdrawn CN110781131A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811024378.XA CN110781131A (en) 2018-09-04 2018-09-04 Mobile storage method, device and storage medium with version control function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811024378.XA CN110781131A (en) 2018-09-04 2018-09-04 Mobile storage method, device and storage medium with version control function

Publications (1)

Publication Number Publication Date
CN110781131A true CN110781131A (en) 2020-02-11

Family

ID=69382927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811024378.XA Withdrawn CN110781131A (en) 2018-09-04 2018-09-04 Mobile storage method, device and storage medium with version control function

Country Status (1)

Country Link
CN (1) CN110781131A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09128380A (en) * 1995-10-30 1997-05-16 Matsushita Electric Ind Co Ltd Document storing and managing system
CN101547219A (en) * 2009-05-05 2009-09-30 汤淼 System and method for data storage
CN201336034Y (en) * 2008-12-19 2009-10-28 众智瑞德科技(北京)有限公司 Mobile hard disk
CN107665227A (en) * 2017-04-10 2018-02-06 平安科技(深圳)有限公司 A kind of data version control method and versions of data controller
CN107832470A (en) * 2017-11-29 2018-03-23 郑州云海信息技术有限公司 A kind of object storage method and device based on storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09128380A (en) * 1995-10-30 1997-05-16 Matsushita Electric Ind Co Ltd Document storing and managing system
CN201336034Y (en) * 2008-12-19 2009-10-28 众智瑞德科技(北京)有限公司 Mobile hard disk
CN101547219A (en) * 2009-05-05 2009-09-30 汤淼 System and method for data storage
CN107665227A (en) * 2017-04-10 2018-02-06 平安科技(深圳)有限公司 A kind of data version control method and versions of data controller
CN107832470A (en) * 2017-11-29 2018-03-23 郑州云海信息技术有限公司 A kind of object storage method and device based on storage system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
不详: "文件历史记录(Windows)-为你的数据买一份保险", 《HTTPS://WWW.APPGAO.COM/SAFETY/FILE-HISTORY.HTML》 *

Similar Documents

Publication Publication Date Title
CN106095620B (en) A kind of development approach of built-in Linux partition holding
US10372619B2 (en) Data backup method, data recovery method and storage controller
US8392649B2 (en) Memory storage device, controller, and method for responding to host write commands triggering data movement
US8639973B2 (en) System reset
CN104572489A (en) Wear leveling method and wear leveling device
CN111324303B (en) SSD garbage recycling method, SSD garbage recycling device, computer equipment and storage medium
KR20190050993A (en) Update escalation system and method
CN111562934A (en) Software system upgrading method based on hot patch, terminal and storage medium
CN109213450B (en) Associated metadata deleting method, device and equipment based on flash memory array
US7624129B2 (en) Dual logging of changes to a user preference in a computer device
US8560501B2 (en) Method for a cloning process to enable cloning a larger system drive to a smaller system
CN112182010A (en) Dirty page refreshing method and device, storage medium and electronic equipment
CN102331920B (en) Data processing method and device
US11144299B2 (en) Firmware updating method
CN114942863A (en) Cascade snapshot processing method, device and equipment and storage medium
CN107704338B (en) Data recovery method and device for data storage type flash memory
CN104765631B (en) A kind of application recovery method and device of mobile terminal
CN104281505A (en) Data backup method and device and electronic device
US11176089B2 (en) Systems and methods for implementing dynamic file systems
CN115543225B (en) Data processing method, system, device, computer storage medium and electronic equipment
CN108920107B (en) Method and device for screening cold data, computer equipment and storage medium
CN109324929B (en) Snapshot creating method, device and equipment and readable storage medium
CN110781131A (en) Mobile storage method, device and storage medium with version control function
CN106021124B (en) A kind of storage method and storage system of data
CN109284237B (en) Garbage recovery method and system in full flash memory array

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 150028 building 7, innovation and entrepreneurship square, science and technology innovation city, Harbin high tech Industrial Development Zone, Heilongjiang Province (No. 838, Shikun Road)

Applicant after: Antan Technology Group Co.,Ltd.

Address before: 150028 building 7, innovation and entrepreneurship square, science and technology innovation city, Harbin high tech Industrial Development Zone, Heilongjiang Province (No. 838, Shikun Road)

Applicant before: Harbin Antian Science and Technology Group Co.,Ltd.

WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200211