CN105306564A - Database-based network disk file replication method and server - Google Patents

Database-based network disk file replication method and server Download PDF

Info

Publication number
CN105306564A
CN105306564A CN201510683746.1A CN201510683746A CN105306564A CN 105306564 A CN105306564 A CN 105306564A CN 201510683746 A CN201510683746 A CN 201510683746A CN 105306564 A CN105306564 A CN 105306564A
Authority
CN
China
Prior art keywords
file
server
destination
fileinfo
stored
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.)
Pending
Application number
CN201510683746.1A
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.)
Inspur Group Co Ltd
Original Assignee
Inspur 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 Inspur Group Co Ltd filed Critical Inspur Group Co Ltd
Priority to CN201510683746.1A priority Critical patent/CN105306564A/en
Publication of CN105306564A publication Critical patent/CN105306564A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a database-based network disk file replication method and a server. The method comprises the following steps: pre-storing at least one file in the server, and pre-storing a logical directory of files and storage information of each file in a file list of a database; obtaining a replication instruction of a first target file stored in the server, wherein the replication instruction carries target position information; determining target storage information corresponding to the first target file; replicating file information of the first target file to a corresponding position of the logical directory according to the target position information; and associating the replicated file information in the file list with the target storage information corresponding to the first target file. By adopting the database-based network disk file replication method in the technical scheme provided by the invention, a storage space of the server can be saved.

Description

A kind of net dish file copying method based on database and server
Technical field
The present invention relates to cloud technical field of memory, particularly a kind of net dish file copying method based on database and server.
Background technology
Along with the development of Internet technology, cloud service emerges fast, and a critical function of cloud service provides stores service to user, and user can check accounts family by the files passe of oneself to server by application net.
At present, to be checked accounts the file that family uploads onto the server by net for user, when a file destination copies to another file from a file by user, server can generate a file identical with the file destination be copied according to the copy function of user in the memory space of server, and two identical files take larger memory space in the server.
Summary of the invention
In view of this, the invention provides a kind of net dish file copying method based on database and server, the memory space of server can be saved.
First aspect, the invention provides a kind of net dish file copying method based on database, comprising:
S0: in advance at least one file is stored in the server, in advance the storage information of the logical directories between each file and each file is stored in the file table of database;
S1: obtain the duplicate instructions for the first object file stored in the server, described duplicate instructions carries destination locations information;
S2: determine that the target corresponding to described first object file stores information;
S3: according to described destination locations information, copies to the corresponding position of described logical directories by the fileinfo of described first object file; And, in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated.
Further,
Described storage information comprises corresponding file store path in the server; Describedly in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated, comprising: in described file table, set up the fileinfo after copying and the corresponding relation between the store path of described first object file in described server;
Or,
Described storage information comprises corresponding file store path in the server and the unique identifier of correspondence; Describedly in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated, comprising: in described file table, set up the corresponding relation between the unique identifier corresponding with described first object file of the fileinfo after copying.
Further, before described step S1, also comprise:
Build file copy table in a database, for recording each file unique identifier corresponding respectively and being correspondingly respectively replicated number of times;
Described step S3 comprises further: time add 1 by corresponding to being replicated of described first object file in described file copy table.
Further, after described step S3, also comprise:
Obtain the delete instruction for the second file destination stored in the server;
Inquire about described file copy table with obtain correspond to described second file destination be replicated number of times;
Judge to correspond to being replicated number of times and whether being less than 1 of described second file destination, if, the fileinfo of described second file destination is corresponded under then deleting the logical directories stored in described file table, and, delete the second file destination stored in the server;
Otherwise, delete the fileinfo corresponding to described second file destination under the logical directories stored in described file table, and, time subtract 1 by corresponding to being replicated of described second file destination in described file copy table.
Further, also comprise:
When obtaining the download request for the 3rd file destination, inquiring about described file table, determining the storage information of described 3rd file destination, download described 3rd file destination according to described storage information.
Second aspect, the invention provides a kind of server, comprising:
Memory cell, for storing at least one file;
Database;
Described database comprises: file table, for storing the storage information of logical directories between each file and each file;
Acquiring unit, for obtaining the duplicate instructions for the first object file stored in the server, described duplicate instructions carries destination locations information;
Determining unit, for determining that the target corresponding to described first object file stores information;
Processing unit, for according to described destination locations information, copies to the corresponding position of described logical directories by the fileinfo of described first object file; And, in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated.
Further,
Described processing unit, for setting up the fileinfo after copying and the corresponding relation between the store path of described first object file in described server in described file table;
Or,
Described processing unit, for setting up the corresponding relation between the unique identifier corresponding with described first object file of the fileinfo after copying in described file table.
Further, also comprise:
Construction unit, for building file copy table in a database, described file copy table is for recording each file unique identifier corresponding respectively and being correspondingly respectively replicated number of times;
Described processing unit, is further used for time adding 1 by corresponding to being replicated of described first object file in described file copy table.
Further,
Described acquiring unit, is further used for obtaining the delete instruction for the second file destination stored in the server;
Also comprise:
Query unit, for inquire about described file copy table with obtain correspond to described second file destination be replicated number of times;
Judging unit, being replicated number of times and whether being less than 1 of described second file destination is corresponded to for judging, if, then trigger processing unit corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table, and trigger processing unit deletes the second file destination stored in the server;
Otherwise trigger processing unit corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table, and the number of times that is replicated corresponding to described second file destination in described file copy table is subtracted 1 by trigger processing unit.
Further,
Described acquiring unit, is further used for obtaining the download request for the 3rd file destination;
Described determining unit, is further used for inquiring about described file table, determines the storage information of described 3rd file destination;
Described processing unit, is further used for downloading described 3rd file destination according to described storage information.
A kind of net dish file copying method based on database provided by the invention and server, by prestoring at least one file in the server, and the storage information of the logical directories stored in the file table of database between each file and each file, when server receives the duplicate instructions for the first object file stored in the server, corresponding amendment is stored in the logical directories in file table, simultaneously, determine the storage information of the corresponding first object file be replicated, in file table, the fileinfo after copying is associated with the storage information of the first object file be replicated, fileinfo corresponding stored identical in logical directories same first object file in the server can be made, multiple identical first object file need not be generated in the server, the memory space of server can be saved.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of a kind of net dish file copying method based on database that one embodiment of the invention provides;
Fig. 2 is the flow chart of the another kind that provides of one embodiment of the invention based on the net dish file copying method of database;
Fig. 3 is the logical construction schematic diagram of a kind of file table that one embodiment of the invention provides;
Fig. 4 is the logical construction schematic diagram of a kind of file copy table that one embodiment of the invention provides;
Fig. 5 is the structural representation of a kind of server that one embodiment of the invention provides;
Fig. 6 is the structure chart of the another kind of server that one embodiment of the invention provides.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly; below in conjunction with the accompanying drawing in the embodiment of the present invention; technical scheme in the embodiment of the present invention is clearly and completely described; obviously; described embodiment is the present invention's part embodiment, instead of whole embodiments, based on the embodiment in the present invention; the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.
As shown in Figure 1, embodiments provide a kind of net dish file copying method based on database, the method can comprise the following steps:
S0: in advance at least one file is stored in the server, in advance the storage information of the logical directories between each file and each file is stored in the file table of database;
S1: obtain the duplicate instructions for the first object file stored in the server, described duplicate instructions carries destination locations information;
S2: determine that the target corresponding to described first object file stores information;
S3: according to described destination locations information, copies to the corresponding position of described logical directories by the fileinfo of described first object file; And, in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated.
In the embodiment of the present invention, by prestoring at least one file in the server, and the storage information of the logical directories stored in the file table of database between each file and each file, when server receives the duplicate instructions for the first object file stored in the server, corresponding amendment is stored in the logical directories in file table, simultaneously, determine the storage information of the corresponding first object file be replicated, in file table, the fileinfo after copying is associated with the storage information of the first object file be replicated, fileinfo corresponding stored identical under can making logical directories same first object file in the server, multiple identical first object file need not be generated in the server, the memory space of server can be saved.
Further, in order to realize need not regenerating in the server one with the identical file of first object file be replicated, the fileinfo after copying is made to correspond to the first object file be replicated stored in the server, in a preferred embodiment of the invention, described storage information comprises corresponding file store path in the server; Describedly in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated, comprising: in described file table, set up the fileinfo after copying and the corresponding relation between the store path of described first object file in described server;
Or,
Described storage information comprises corresponding file store path in the server and the unique identifier of correspondence; Describedly in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated, comprising: in file table, set up the corresponding relation between the unique identifier corresponding with described first object file of the fileinfo after copying.
It should be noted that, the unique identifier that each file is corresponding can be distributed by server; Digest value corresponding to each file can also be calculated, using the digest value that the obtains unique identifier as the file of correspondence by shining algorithm.
Further, after copying accordingly for fileinfo, namely the corresponding same storage of multiple identical fileinfo first object file in the server can be produced under the logical directories stored in file table, in order to the arbitrary fileinfo under the logical directories that stores in for file table perform corresponding deletion action time, do not affect other identical fileinfos under current logic catalogue and store the corresponding relation between file in the server, the number of times be replicated by recording each file is determined when deleting corresponding fileinfo under logical directories the need of the second file destination deleting storage correspondence in the server simultaneously, particularly, in a preferred embodiment of the invention, before described step S1, also comprise:
Build file copy table in a database, for recording each file unique identifier corresponding respectively and being correspondingly respectively replicated number of times;
Described step S3 comprises further: time add 1 by corresponding to being replicated of described first object file in described file copy table.
Particularly, in a preferred embodiment of the invention, realize processing accordingly for the second file destination and logical directories according to different situations by following method:
Obtain the delete instruction for the second file destination stored in the server;
Inquire about described file copy table with obtain correspond to described second file destination be replicated number of times;
Judge to correspond to being replicated number of times and whether being less than 1 of described second file destination, if, the fileinfo of described second file destination is corresponded under then deleting the logical directories stored in described file table, and, delete the second file destination stored in the server;
Otherwise, delete the fileinfo corresponding to described second file destination under the logical directories stored in described file table, and, time subtract 1 by corresponding to being replicated of described second file destination in described file copy table.
In one embodiment of the invention, when correspond in file copy table need deleted the second file destination be replicated number of times be less than 1 time, there is not identical fileinfo under then showing the logical directories stored in file table and correspond to same second file destination to be deleted, at this moment can perform and corresponding delete processing is carried out to logical directories and the second file destination stored in the server; When the second file destination to be deleted corresponding in file copy table be replicated number of times be not less than 1 time, then show to exist in logical directories at least two identical corresponding same second file destinations to be deleted of fileinfo, at this moment, fileinfo corresponding under performing corresponding deletion logical directories, retain the second file destination stored in the server, simultaneously in corresponding amendment file copy table corresponding second file destination be replicated number of times, ensure that each fileinfo under logical directories all may correspond to a storage file in the server.
Further, after the fileinfo after copying is associated with the storage information corresponding to the first object file be replicated, the corresponding same storage of fileinfo identical under making logical directories first object file in the server; Particularly, in a preferred embodiment of the invention, when obtaining the download request for the 3rd file destination, inquiring about described file table, determining the storage information of described 3rd file destination, download described 3rd file destination according to described storage information.
In one embodiment of the invention, at least two same file information corresponding stored same first object file in the server can be there is in logical directories, therefore, user can respectively by least two same file destinations of same file acquisition of information under logical directories.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.
As shown in Figure 2, embodiments provide the another kind of net dish file copying method based on database, this granting can comprise the following steps:
Step 201, stores at least one file in the server.
This server comprises Cloud Server, may correspond to carry out the net dish of cloud storage, such as Baidu.com's dish, 360 net dishes etc. in user by corresponding net family of checking accounts in server for the device of storage file.
Step 202, is stored in the storage information of the logical directories between each file and each file in the file table of database.
In the embodiment of the present invention, the logical directories in file table have recorded the logic hierarchical relationship between the file of each file and correspondence, also have recorded the store path of each file in the net dish of correspondence in file table.
It should be noted that, as shown in Figure 3, in file table outside direct stored logic catalogue, can also record the corresponding relation between file and file under logical directories, wherein, a file may correspond to multiple file; In file table, for each file, the fields such as the title of file, title UUID, position, file id, type, attribute, size, uplink time, description, id and modification time can also be set; For each file, the fields such as the position of file, size, parent folder id, creation-time, description, title, id and attribute can also be set.
Wherein, the unique identifier that title UUID i.e. each file is corresponding respectively, unique identifier can be distributed the file stored in the server by server; The digest value calculating each file respectively can also be passed through, using the unique identifier of digest value corresponding respectively for each file as current file.
File name UUID and location field can in order to determine the physics deposit position in net dish of corresponding file; And the logical file folder id field belonging to file can be used to obtain the file under certain logical file folder, in order to show in the logical directories that net dish is corresponding; File name field is the file name that net dish front end is shown, this title can give this file designation by user; Parent folder id can be used for the logical file folder confirmed belonging to this logical file folder, the logical directories of corresponding net dish front end; Folder Name can name to this file by user; The logical path of what location field was deposited is current logic file, this logical path is path corresponding to logical directories that user creates in net dish front end.
Step 203, builds file copy table in a database, for recording the file name of each file, unique identifier and being correspondingly respectively replicated number of times.
As shown in Figure 4, the file name of each file, UUID and fanout can be comprised, the number of times that unique identifier, fanout and current file that file name, UUID and current file that wherein under file name and logical directories, fileinfo is corresponding are corresponding are replicated in file copy table.
Step 204, obtains the duplicate instructions for the first object file stored in the server.
Duplicate instructions triggers when can carry out corresponding copy operation for the fileinfo corresponding to first object file by user under the logical directories of net dish front end.
Step 205, determines that the target corresponding to described first object file stores information.
The storage information of first object file is determined by first object file store path in the server or unique identifier.
Step 206, copies to the relevant position of described logical directories by the fileinfo of described first object file.
Step 207, stores information by the fileinfo after copying with the target corresponding to described first object file and is associated in file table.
In the embodiment of the present invention, on the one hand, target stores information when comprising first object file store path in the server, can set up the fileinfo after copying and the corresponding relation between the first object file that the is replicated store path in described server; On the other hand, target stores information when comprising first object file unique identifier in the server and store storage path, can set up the corresponding relation between the unique identifier corresponding with the first object file be replicated of the fileinfo after copying; So, to make unique identifier or the store path that can be determined the first object file be replicated by the fileinfo after copying, and then the fileinfo before making the fileinfo after copying and being replicated points to same storage first object file in the server, and then when realizing copying for first object file, multiple identical first object file need not be stored in the server, save the memory space of server.
Step 208, adds 1 by the number of times that is replicated corresponding to described first object file in file copy table.
Step 209, obtains the delete instruction for the second file destination stored in the server.
Step 210, inquire about described file copy table with obtain correspond to described second file destination be replicated number of times.
Step 211, judges to correspond to being replicated number of times and whether being less than 1 of described second file destination, if so, then performs step 212; Otherwise, perform step 213.
Step 212, corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table, and, delete the second file destination stored in the server.
When correspond in file copy table the second file destination to be deleted be replicated number of times be less than 1 time, there are not at least two identical fileinfos under then showing the logical directories stored in file table and correspond to same second file destination to be deleted, at this moment, can perform logical directories and store the second file destination in the server and carry out corresponding delete processing.
Step 213, corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table; And, the number of times that is replicated corresponding to described second file destination in described file copy table is subtracted 1.
When the second file destination to be deleted corresponding in file copy table be replicated number of times be not less than 1 time, then show to exist in logical directories at least two the identical corresponding same storage of fileinfo the second file destinations to be deleted in the server, at this moment, fileinfo corresponding under performing corresponding deletion logical directories, retain the second file destination stored in the server, the corresponding number of times that is replicated by the second file destination corresponding in file copy table subtracts 1 simultaneously, ensure that each fileinfo under logical directories all may correspond to a storage file in the server.
Step 214, obtains the download request for the 3rd file destination, inquires about described file table, determines the storage information of described 3rd file destination, downloads described 3rd file destination according to described storage information.
In the embodiment of the present invention, at least two same file information corresponding stored same first object file in the server can be there is in logical directories, therefore, user can respectively by least two same file destinations of same file acquisition of information under logical directories.
In the embodiment of the present invention, by each step above-mentioned, achieve server according to corresponding inquiry request, duplicate instructions and delete instruction etc., the file completed storing in the server operates accordingly.
As shown in Figure 5, embodiments provide a kind of server, comprising:
Memory cell 501, for storing at least one file;
Database 502, described database 502 comprises: file table, for storing the storage information of logical directories between each file and each file;
Acquiring unit 503, for obtaining the duplicate instructions for the first object file stored in the server, described duplicate instructions carries destination locations information;
Determining unit 504, for determining that the target corresponding to described first object file stores information;
Processing unit 505, for according to described destination locations information, copies to the corresponding position of described logical directories by the fileinfo of described first object file; And, in file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated.
Further, as shown in Figure 6, because the fileinfo after copying can correspond to the first object file be replicated stored in the server, in one mode in the cards, described processing unit 505, for setting up the fileinfo after copying and the corresponding relation between the store path of described first object file in described server in described file table;
Or,
Described processing unit 505, for setting up the corresponding relation between the unique identifier corresponding with described first object file of the fileinfo after copying in file table.
Further, in order to the arbitrary fileinfo under the logical directories that stores in for file table perform corresponding deletion action time, do not affect other identical fileinfos under current logic catalogue and store the corresponding relation between file in the server, the number of times be replicated by recording each file is determined when deleting corresponding fileinfo under logical directories the need of the second file destination deleting storage correspondence in the server simultaneously, particularly, in one mode in the cards, also comprise:
Construction unit 601, for building file copy table in a database, described file copy table is for recording each file unique identifier corresponding respectively and being correspondingly respectively replicated number of times;
Described processing unit 505, is further used for time adding 1 by corresponding to being replicated of described first object file in described file copy table.
Further, described acquiring unit 503, is further used for obtaining the delete instruction for the second file destination stored in the server;
Also comprise:
Query unit 602, for inquire about described file copy table with obtain correspond to described second file destination be replicated number of times;
Judging unit 603, being replicated number of times and whether being less than 1 of described second file destination is corresponded to for judging, if, then trigger processing unit 505 corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table, and trigger processing unit 505 deletes the second file destination stored in the server;
Otherwise, trigger processing unit 505 corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table, and the number of times that is replicated corresponding to described second file destination in described file copy table is subtracted 1 by trigger processing unit 505.
Further, in order to realize according to destination client demand provide file destination to client, in one mode in the cards,
Described acquiring unit 503, is further used for obtaining the download request for the 3rd file destination;
Described determining unit 504, is further used for inquiring about described file table, determines the storage information of described 3rd file destination;
Described processing unit 505, is further used for downloading described 3rd file destination according to described storage information.
The content such as information interaction, implementation between each unit in said apparatus, due to the inventive method embodiment based on same design, particular content can see in the inventive method embodiment describe, repeat no more herein.
Each embodiment provided by the invention, at least has following beneficial effect:
1, by prestoring at least one file in the server, and the storage information of the logical directories stored in the file table of database between each file and each file, when server receives the duplicate instructions for the first object file stored in the server, corresponding amendment is stored in the logical directories in file table, simultaneously, determine the storage information of the corresponding first object file be replicated, in file table, the fileinfo after copying is associated with the storage information of the first object file be replicated, fileinfo corresponding stored identical in logical directories same first object file in the server can be made, multiple identical first object file need not be generated in the server, the memory space of server can be saved.
2, by arrange file copy table record store each file in the server corresponding be replicated number of times, by judging that the number of times that is replicated of file determines whether to operate accordingly the file stored in the server, ensure that each fileinfo under the logical directories stored in file table all sees the file corresponding to and store in the server.
It should be noted that, in this article, the relational terms of such as first and second and so on is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical factor.
Finally it should be noted that: the foregoing is only preferred embodiment of the present invention, only for illustration of technical scheme of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. based on a net dish file copying method for database, it is characterized in that, in advance at least one file is stored in the server, in advance the storage information of the logical directories between each file and each file is stored in the file table of database; Also comprise:
S1: obtain the duplicate instructions for the first object file stored in the server, described duplicate instructions carries destination locations information;
S2: determine that the target corresponding to described first object file stores information;
S3: according to described destination locations information, copies to the corresponding position of described logical directories by the fileinfo of described first object file; And, in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated.
2. the net dish file copying method based on database according to claim 1, is characterized in that,
Described storage information comprises corresponding file store path in the server; Describedly in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated, comprising: in described file table, set up the fileinfo after copying and the corresponding relation between the store path of described first object file in described server;
Or,
Described storage information comprises corresponding file store path in the server and the unique identifier of correspondence; Describedly in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated, comprising: in described file table, set up the corresponding relation between the unique identifier corresponding with described first object file of the fileinfo after copying.
3. the net dish file copying method based on database according to claim 1, is characterized in that, before described step S1, also comprise:
Build file copy table in a database, for recording each file unique identifier corresponding respectively and being correspondingly respectively replicated number of times;
Described step S3 comprises further: time add 1 by corresponding to being replicated of described first object file in described file copy table.
4. the net dish file copying method based on database according to claim 3, is characterized in that, after described step S3, also comprise:
Obtain the delete instruction for the second file destination stored in the server;
Inquire about described file copy table with obtain correspond to described second file destination be replicated number of times;
Judge to correspond to being replicated number of times and whether being less than 1 of described second file destination, if, the fileinfo of described second file destination is corresponded under then deleting the logical directories stored in described file table, and, delete the second file destination stored in the server;
Otherwise, delete the fileinfo corresponding to described second file destination under the logical directories stored in described file table, and, time subtract 1 by corresponding to being replicated of described second file destination in described file copy table.
5., according to the described net dish file copying method based on database arbitrary in Claims 1-4, it is characterized in that, also comprise:
When obtaining the download request for the 3rd file destination, inquiring about described file table, determining the storage information of described 3rd file destination, download described 3rd file destination according to described storage information.
6. a server, is characterized in that, comprising:
Memory cell, for storing at least one file;
Database;
Described database comprises: file table, for storing the storage information of logical directories between each file and each file;
Acquiring unit, for obtaining the duplicate instructions for the first object file stored in the server, described duplicate instructions carries destination locations information;
Determining unit, for determining that the target corresponding to described first object file stores information;
Processing unit, for according to described destination locations information, copies to the corresponding position of described logical directories by the fileinfo of described first object file; And, in described file table, the fileinfo after copying is stored information with the target corresponding to described first object file and be associated.
7. server according to claim 6, is characterized in that,
Described processing unit, for setting up the fileinfo after copying and the corresponding relation between the store path of described first object file in described server in described file table;
Or,
Described processing unit, for setting up the corresponding relation between the unique identifier corresponding with described first object file of the fileinfo after copying in described file table.
8. server according to claim 6, is characterized in that, also comprises:
Construction unit, for building file copy table in a database, described file copy table is for recording each file unique identifier corresponding respectively and being correspondingly respectively replicated number of times;
Described processing unit, is further used for time adding 1 by corresponding to being replicated of described first object file in described file copy table.
9. server according to claim 8, is characterized in that,
Described acquiring unit, is further used for obtaining the delete instruction for the second file destination stored in the server;
Also comprise:
Query unit, for inquire about described file copy table with obtain correspond to described second file destination be replicated number of times;
Judging unit, being replicated number of times and whether being less than 1 of described second file destination is corresponded to for judging, if, then trigger processing unit corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table, and trigger processing unit deletes the second file destination stored in the server;
Otherwise trigger processing unit corresponds to the fileinfo of described second file destination under deleting the logical directories stored in described file table, and the number of times that is replicated corresponding to described second file destination in described file copy table is subtracted 1 by trigger processing unit.
10. server according to claim 6, is characterized in that,
Described acquiring unit, is further used for obtaining the download request for the 3rd file destination;
Described determining unit, is further used for inquiring about described file table, determines the storage information of described 3rd file destination;
Described processing unit, is further used for downloading described 3rd file destination according to described storage information.
CN201510683746.1A 2015-10-20 2015-10-20 Database-based network disk file replication method and server Pending CN105306564A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510683746.1A CN105306564A (en) 2015-10-20 2015-10-20 Database-based network disk file replication method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510683746.1A CN105306564A (en) 2015-10-20 2015-10-20 Database-based network disk file replication method and server

Publications (1)

Publication Number Publication Date
CN105306564A true CN105306564A (en) 2016-02-03

Family

ID=55203307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510683746.1A Pending CN105306564A (en) 2015-10-20 2015-10-20 Database-based network disk file replication method and server

Country Status (1)

Country Link
CN (1) CN105306564A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776882A (en) * 2016-11-25 2017-05-31 维沃移动通信有限公司 A kind of file management method and mobile terminal
CN107679142A (en) * 2017-09-25 2018-02-09 广东欧珀移动通信有限公司 A kind of document copying method, server, the network equipment and storage medium
CN107861781A (en) * 2017-09-29 2018-03-30 努比亚技术有限公司 A kind of file operation method and device
CN111090396A (en) * 2019-12-10 2020-05-01 联想(北京)有限公司 File processing method and device and electronic equipment
CN112199341A (en) * 2020-12-07 2021-01-08 深圳市房多多网络科技有限公司 File storage system, method and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996228A (en) * 2009-08-18 2011-03-30 北京艾德斯科技有限公司 Method for sharing file data block and method for de-sharing file data block
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996228A (en) * 2009-08-18 2011-03-30 北京艾德斯科技有限公司 Method for sharing file data block and method for de-sharing file data block
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776882A (en) * 2016-11-25 2017-05-31 维沃移动通信有限公司 A kind of file management method and mobile terminal
CN107679142A (en) * 2017-09-25 2018-02-09 广东欧珀移动通信有限公司 A kind of document copying method, server, the network equipment and storage medium
CN107861781A (en) * 2017-09-29 2018-03-30 努比亚技术有限公司 A kind of file operation method and device
CN111090396A (en) * 2019-12-10 2020-05-01 联想(北京)有限公司 File processing method and device and electronic equipment
CN112199341A (en) * 2020-12-07 2021-01-08 深圳市房多多网络科技有限公司 File storage system, method and equipment

Similar Documents

Publication Publication Date Title
KR102417689B1 (en) Content Management Client Synchronization Service
US20200341867A1 (en) Method and apparatus for restoring data from snapshots
US10025808B2 (en) Compacting change logs using file content location identifiers
CN105306564A (en) Database-based network disk file replication method and server
US8321487B1 (en) Recovery of directory information
US7117294B1 (en) Method and system for archiving and compacting data in a data storage array
US9965505B2 (en) Identifying files in change logs using file content location identifiers
JP2017529625A (en) Synchronize shared folders and files
US20160321295A1 (en) Scalable Distributed Metadata File-System using Key-Value Stores
US20120284317A1 (en) Scalable Distributed Metadata File System using Key-Value Stores
US20090012932A1 (en) Method and System For Data Storage And Management
CN111045857B (en) Method for data backup and recovery, electronic device and computer readable storage medium
JP2014120160A (en) Data block backup system and method thereof
TW201029393A (en) Atomic multiple modification of data in a distributed storage system
US10949387B1 (en) Scalable filesystem enumeration and metadata operations
CN105468720A (en) Method for integrating distributed data processing systems, corresponding systems and data processing method
US10452304B2 (en) Efficient repository migration and storage
CN106776720A (en) A kind of document handling method and device
CN111522791B (en) Distributed file repeated data deleting system and method
WO2019162830A1 (en) Chronologically ordered out-of-place update key-value storage system
US9875249B1 (en) Reducing database fragmentation
CN105843809B (en) Data processing method and device
KR102253841B1 (en) Apparatus for Processing Transaction with Modification of Data in Large-Scale Distributed File System and Computer-Readable Recording Medium with Program
US20190236296A1 (en) Sparse creation of per-client pseudofs in network filesystem with lookup hinting
CN113760830B (en) Distributed file storage editable system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160203