Movatterモバイル変換


[0]ホーム

URL:


CN106294627A - Data managing method and data server - Google Patents

Data managing method and data server
Download PDF

Info

Publication number
CN106294627A
CN106294627ACN201610624761.3ACN201610624761ACN106294627ACN 106294627 ACN106294627 ACN 106294627ACN 201610624761 ACN201610624761 ACN 201610624761ACN 106294627 ACN106294627 ACN 106294627A
Authority
CN
China
Prior art keywords
data file
file
data
stored
memory node
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
CN201610624761.3A
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.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information Technology 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 Beijing 58 Information Technology Co LtdfiledCriticalBeijing 58 Information Technology Co Ltd
Priority to CN201610624761.3ApriorityCriticalpatent/CN106294627A/en
Publication of CN106294627ApublicationCriticalpatent/CN106294627A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The embodiment of the present invention provides a kind of data managing method and data server, and the method includes: receiving client and send data storage request, data file to be stored is stored by data storage request for instruction;Judge whether memory node exists the storage data file identical with data file to be stored;The most then obtain the current absolute path having stored data file in memory node, current absolute path is defined as the absolute path of file to be stored;If it is not, then obtain multiple subdata files of data file to be stored, determine the memory node that each subdata file is corresponding, and each subdata file is stored to corresponding memory node.In the efficiency improving data storage.

Description

Data managing method and data server
Technical field
The present embodiments relate to communication technical field, particularly relate to a kind of data managing method and data server.
Background technology
At present, for the ease of storing the data on terminal unit, the data in terminal unit can be deposited by userStorage is to data server.
In the prior art, when terminal unit carries out data storage, data to be stored are generally sent extremely by terminal unitData server, data server selects a memory node in multiple memory nodes (such as, computer), and by number to be storedAccording to sending to this memory node, so that data to be stored are stored by this memory node.But, if at data server to depositingStorage node sends during data to be stored, if data to be stored fail correct transmission to memory node, then needs to treatTotal data in storage data retransmits, and causes data storage efficiency low.
Summary of the invention
The embodiment of the present invention provides a kind of data managing method and data server, for improving the efficiency of data storage.
First aspect, the embodiment of the present invention provides a kind of data managing method, including:
Receiving client and send data storage request, data file to be stored is entered by described data storage request for instructionRow storage;
Judge whether memory node exists the storage data file identical with described data file to be stored;
Store the data file current absolute path in described memory node described in the most then obtaining, worked as describedFront absolute path is defined as the absolute path of described file to be stored;
If it is not, then obtain multiple subdata files of described data file to be stored, determine each described subdata file pairThe memory node answered, and each described subdata file is stored to corresponding memory node.
In a kind of possible embodiment, described judge whether memory node exists and described data file to be storedIdentical storage data file, including:
Obtain each of storage in the MD5 value of described data file to be stored and described memory node and store data literary compositionThe MD5 value of part;
In MD5 value according to described data file to be stored and described memory node, each of storage has stored data literary compositionThe MD5 value of part, it is judged that whether there is the storage data file identical with described data file to be stored in memory node.
In alternatively possible embodiment, multiple subdata files of the described data file to be stored of described acquisition,Including:
Obtain attribute information and the size of described data file to be stored of described memory node;
Attribute information according to described memory node and the size of described data file to be stored, to described data to be storedFile carries out dividing processing, obtains the plurality of subdata file.
In alternatively possible embodiment, the attribute information of described memory node includes data in described memory nodeThe size of block;Accordingly, according to attribute information and the size of described data file to be stored of described memory node, treat describedStorage data file carries out dividing processing, obtains the plurality of subdata file, including:
According to the size of described data block, described data file to be stored is carried out dividing processing, obtain N number of subdata literary composition, wherein, in described N number of subdata file, at least there is the size size equal to described data block of N-1 data file in part.
In alternatively possible embodiment, the attribute information of described memory node includes data in described memory nodeThe size of block and the number of memory node;Accordingly, according to attribute information and the described data to be stored literary composition of described memory nodeThe size of part, carries out dividing processing to described data file to be stored, obtains the plurality of subdata file, including:
Size according to described data block and the size of described data file to be stored, determine described data file to be storedThe the first data block number included;
Number according to described memory node and described first data block number, determine that each described memory node is correspondingTwo data block numbers;
The second data block number corresponding according to each described memory node and the size of described data block, deposit described waitingStorage data file carries out dividing processing, obtains M sub-data file, and wherein, described M is equal to the number of described memory node.
In alternatively possible embodiment, described each described subdata file is stored to corresponding memory nodeAfterwards, also include:
Obtain each described subdata file absolute path in corresponding memory node;
According to each described subdata file absolute path in corresponding memory node, generate described data to be stored literary compositionThe absolute path of part.
In alternatively possible embodiment, described each described subdata file is stored to corresponding memory nodeAfterwards, also include:
The subdata file that store in each described memory node, described data file is corresponding is merged process,To verification data file;
Judge that the MD5 value of described data file to be stored is the most identical with the MD5 value of described inspection data file;
The most then the client to described user place sends and uploads successfully corresponding message;
The most described data file is heavily deposited process.
In alternatively possible embodiment, described method also includes:
Receiving the data download request that client sends, described data download request is for indicating data file to be downloadedIt is downloaded;
According to the absolute path of described data file to be downloaded, described memory node obtains described data to be downloaded literary compositionMultiple subdata files of part;
Multiple subdata files of described data file to be downloaded are merged process, obtains described data to be downloaded literary compositionPart;
Described data file to be downloaded is sent to described client.
In alternatively possible embodiment, described method also includes:
Receiving the Data Migration request that client sends, the request of described Data Migration includes the mark of data file to be migratedKnow and target relative path;
Ask according to described Data Migration, the relative path of described data file to be migrated is updated to described target relativePath.
Second aspect, the embodiment of the present invention provides a kind of data server, including receiver module, judge module, first trueCover half block, the first acquisition module, second determine module and memory module, wherein,
Described receiver module is used for, and receives client and sends data storage request, and described data storage request is used for indicatingData file to be stored is stored;
Whether described judge module is used for, it is judged that exist in memory node and described identical the depositing of data file to be storedStorage data file;
Described first determine module for, in described judge module judges described memory node exist to be stored with describedDuring the identical storage data file of data file, stored described in acquisition data file in described memory node current absolutelyTo path, and described current absolute path is defined as the absolute path of described file to be stored;
Described first acquisition module is used for, and does not exist and deposit with described waiting in described judge module judges described memory nodeDuring the storage identical storage data file of data file, obtain multiple subdata files of described data file to be stored;Accordingly, described second determine module for determining the memory node that each described subdata file is corresponding, described memory module for willEach described subdata file stores to corresponding memory node.
In a kind of possible embodiment, described judge module specifically for:
Obtain each of storage in the MD5 value of described data file to be stored and described memory node and store data literary compositionThe MD5 value of part;
In MD5 value according to described data file to be stored and described memory node, each of storage has stored data literary compositionThe MD5 value of part, it is judged that whether there is the storage data file identical with described data file to be stored in memory node.
In alternatively possible embodiment, described first acquisition module includes acquiring unit and cutting unit, wherein,
Described acquiring unit is used for, and obtains the attribute information of described memory node and the big of described data file to be storedLittle;
Described cutting unit is used for, big according to the attribute information of described memory node and described data file to be storedLittle, described data file to be stored is carried out dividing processing, obtains the plurality of subdata file.
In alternatively possible embodiment, the attribute information of described memory node includes data in described memory nodeThe size of block;Accordingly, described cutting unit specifically for:
According to the size of described data block, described data file to be stored is carried out dividing processing, obtain N number of subdata literary composition, wherein, in described N number of subdata file, at least there is the size size equal to described data block of N-1 data file in part.
In alternatively possible embodiment, the attribute information of described memory node includes data in described memory nodeThe size of block and the number of memory node;Accordingly, described cutting unit specifically for:
Size according to described data block and the size of described data file to be stored, determine described data file to be storedThe the first data block number included;
Number according to described memory node and described first data block number, determine that each described memory node is correspondingTwo data block numbers;
The second data block number corresponding according to each described memory node and the size of described data block, deposit described waitingStorage data file carries out dividing processing, obtains M sub-data file, and wherein, described M is equal to the number of described memory node.
In alternatively possible embodiment, described data server also includes the second acquisition module and generation module,Wherein,
Described second acquisition module is used for, and stores each described subdata file to corresponding storage in described memory moduleAfter in node, obtain each described subdata file absolute path in corresponding memory node;
Described generation module is used for, according to each described subdata file absolute path in corresponding memory node, rawBecome the absolute path of described data file to be stored.
In alternatively possible embodiment, described data server also includes merging module and sending module, wherein,
Described merging module is used for, and stores each described subdata file to corresponding memory node in described memory moduleAfter in, the subdata file that store, described data file is corresponding is merged process, obtain in each described memory nodeVerification data file;
Described judge module is additionally operable to, it is judged that the MD5 value of described data file to be stored and described inspection data fileMD5 value is the most identical;
Described sending module is used for, and judges the MD5 value of described data file to be stored and described inspection at described judge moduleTest the MD5 value of data file identical time, the client to described user place sends and uploads successfully corresponding message;
Described memory module is additionally operable to, and judges the MD5 value of described data file to be stored and described at described judge moduleWhen the MD5 value of inspection data file differs, described data file is heavily deposited process.
In alternatively possible embodiment, described data server also includes the 3rd acquisition module, wherein,
Described receiver module is additionally operable to, and receives the data download request that client sends, and described data download request is used forData file to be downloaded is downloaded by instruction;
Described 3rd acquisition module is used for, according to the absolute path of described data file to be downloaded, at described memory nodeMultiple subdata files of the described data file to be downloaded of middle acquisition;
Described merging module is additionally operable to, and multiple subdata files of described data file to be downloaded are merged process,Obtain described data file to be downloaded;
Described sending module is additionally operable to, and sends described data file to be downloaded to described client.
In alternatively possible embodiment, described data server also includes transferring module, wherein,
Described receiver module is additionally operable to, and receives the Data Migration request that client sends, wraps in the request of described Data MigrationInclude mark and the target relative path of data file to be migrated;
Described transferring module is used for, and asks according to described Data Migration, by the relative path of described data file to be migratedIt is updated to described target relative path.
The data managing method of embodiment of the present invention offer and data server, receive client at data server and send outAfter sending data storage request, if memory node exists the storage data file identical with data file to be stored, then obtainTake the current absolute path storing data file in memory node, current absolute path is defined as the exhausted of file to be storedTo path, and then avoid storing the data file of repetition in memory node.If memory node not existing and data to be storedThe storage data file that file is identical, then data server obtains multiple subdata files of data file to be stored, determinesThe memory node that each subdata file is corresponding, and each subdata file is stored to corresponding memory node, so, not only canThe enough speed improved to memory node transmission data to be stored, if in data transmission procedure, each subdata file fails correctlyTransmission to corresponding memory node, then have only to this subdata file is retransmitted, it is not necessary to other subdata literary compositionPart retransmits, and then improves the efficiency of data storage.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existingIn having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is thisSome bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible toOther accompanying drawing is obtained according to these accompanying drawings.
The application scenarios schematic diagram of the data managing method that Fig. 1 provides for the present invention;
The schematic flow sheet of the data managing method that Fig. 2 provides for the present invention;
The schematic flow sheet of the acquisition subdata document method that Fig. 3 provides for the present invention;
The schematic flow sheet of the data file downloading method that Fig. 4 provides for the present invention;
The schematic flow sheet of the data migration method that Fig. 5 provides for the present invention;
The structural representation one of the data server that Fig. 6 provides for the present invention;
The structural representation two of the data server that Fig. 7 provides for the present invention.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the embodiment of the present inventionIn accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment isThe a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the artThe every other embodiment obtained under not making creative work premise, broadly falls into the scope of protection of the invention.
The application scenarios schematic diagram of the data managing method that Fig. 1 provides for the present invention, refers to Fig. 1, including multiple clientsEnd (being designated as 101-1 to 101-N respectively), data server 102 and multiple memory node (being designated as 103-1 to 103-M respectively).Client can be the terminal unit such as mobile phone, computer.Data file can be uploaded to data, services by client 101 by userDevice 102, the data file of client upload is stored in memory node by data server 102.When user needs to obtain dataDuring file, the data file that user can have been stored to data server 102 acquisition request by client, data server102 obtain corresponding data file in memory node, and send to client.Below, by specific embodiment to this ShenTechnical scheme shown in please is described in detail.
It should be noted that these specific embodiments can be combined with each other, for same or analogous concept belowOr process may repeat no more in certain embodiments.
The schematic flow sheet of the data managing method that Fig. 2 provides for the present invention, refers to Fig. 2, and the method may include that
S201, reception client send data storage request, and data storage request is for indicating data file to be storedStore;
S202, judge whether memory node exists the storage data file identical with data file to be stored;
The most then perform S203;
If it is not, then perform S204;
S203, acquisition have stored the data file current absolute path in memory node, current absolute path are determinedAbsolute path for file to be stored;
S204, obtain multiple subdata files of data file to be stored, determine the storage joint that each subdata file is correspondingPoint, and each subdata file is stored to corresponding memory node.
When user needs request data server to store data file, user can be logged in by individual's accountData server, and select under individual's account the store path of data file, this store path can be under individual accountIt is stored in file, it is also possible under individual's account, create new file for user.Optionally, the data file under individual's accountPrivately owned file and Shared Folders can be included, privately owned file stores the private data file of user, Shared FoldersMiddle storage common data file.User uploads to data server needs the data file of storage, receives at data serverAfter data file to be stored, the mark (or icon) of data file is stored in the store path that user selects by server,And data file is stored in memory node.For the ease of being described below, by data file mark (or icon) existPath in the file that user selects is referred to as relative path, and data file path in memory node is referred to as absolute roadFootpath.
In actual application, when user needs to store data file, user passes through client to dataServer sends data storage request, and data file to be stored is deposited by this data storage request for request data serverStorage.Optionally, data file to be stored can be carried in data storage request.
After data server receives the data storage request that client sends, data server judges memory nodeIn whether there is the storage data file identical with data file to be stored.Optionally, data server can be by as followsFeasible implementation judges whether to exist in memory node the storage data file identical with data file to be stored, specifically: in the MD5 value of data server acquisition data file to be stored and memory node, each of storage has stored data file5th edition Message Digest 5 (Message Digest Algorithm is called for short MD5) value, according to data file to be storedEach MD5 value having stored data file of storage in MD5 value and memory node, it is judged that whether exist in memory node and treatThe storage data file that storage data file is identical.Wherein, when content difference in data file, the MD5 of data fileValue is also different, therefore, can judge whether include in memory node and treat accurately according to the MD5 value of data file to be storedThe storage data file that storage data file is identical.
If memory node includes the storage data file identical with data file to be stored, then data server obtainsStore the data file current absolute path in memory node, current absolute path has been defined as the absolute of file to be storedPath.This way it is possible to avoid store the data file of repetition in memory node.
If memory node does not include the storage data file identical with data file to be stored, then data server pairData file to be stored is split, and obtains multiple subdata files of data file to be stored, determines each subdata literary composition respectivelyThe memory node that part is corresponding, and each subdata file is stored to corresponding memory node.Further, data server is alsoObtain each subdata file absolute path in corresponding memory node, according to each subdata file at corresponding memory nodeIn absolute path, generate the absolute path of data file to be stored.
Exemplary, when user needs data server to store data file 1, user passes through client to numberData file 1 is sent according to server.
After data server receives data file 1, data server obtains the MD5 value and respectively of data file 1The MD5 value of the data file stored in memory node, and store according in the MD5 value of data file 1 and each memory nodeThe MD5 value of data file, it is judged that whether memory node includes the storage data literary composition identical with data file 1 to be storedPart.
If memory node includes the storage data file (data file 2) identical with data file 1, then data, servicesDevice obtains the absolute path of data file 2, and the absolute path of data file 2 is defined as the absolute path of data file 1.ThisSample, when user obtains data file 1 to data server requests, data server can be according to the absolute road of data file 1Footpath (absolute path of data file 2) acquires data file 2, owing to this data file 2 is identical with data file 1, then countsCan be to the user feedback data file 2 identical with data file 1 according to server.
If not including the storage data file identical with data file 1 in memory node, then data server is by dataFile 1 is divided into multiple subdata file, it is assumed that data file 1 is divided into subdata file 1, subdata literary composition by data serverPart 2 and subdata file 3, then subdata file 1 can be stored in memory node 1, by subdata file 2 by data serverIt is stored in memory node 2, subdata file is stored in memory node 3.Further, data server is according to each subnumberAccording to file absolute path in corresponding memory node, generate the absolute path of data file to be stored.
The data managing method that the embodiment of the present invention provides, receiving client transmission data storage at data server pleaseAfter asking, if memory node exists the storage data file identical with data file to be stored, then obtain and stored dataThe file current absolute path in memory node, is defined as the absolute path of file to be stored by current absolute path, and thenAvoid storing the data file of repetition in memory node.If memory node does not exist identical with data file to be storedStorage data file, then data server obtains multiple subdata files of data file to be stored, determines each subdata fileCorresponding memory node, and each subdata file is stored to corresponding memory node, so, it is not only able to improve to storageNode sends the speed of data to be stored, if in data transmission procedure, each subdata file fails correct transmission to accordinglyMemory node, then have only to this subdata file is retransmitted, it is not necessary to other subdata file is retransmitted, entersAnd improve the efficiency of data storage.
On the basis of embodiment illustrated in fig. 2, optionally, data server can be obtained by the most feasible implementationTake multiple subdata files (S204 in embodiment illustrated in fig. 2) of data file to be stored, concrete, shown in Figure 3Embodiment.
The schematic flow sheet of the acquisition subdata document method that Fig. 3 provides for the present invention, refers to Fig. 3, and the method is permissibleIncluding:
S301, the attribute information obtaining memory node and the size of data file to be stored;
S302, according to the attribute information of memory node and the size of data file to be stored, data file to be stored is enteredRow dividing processing, obtains multiple subdata file.
In actual application, when data server needs to obtain multiple subdata files of data file to be storedTime, data server obtains attribute information and the size of data file to be stored of each memory node, optionally, memory nodeAttribute information can include the residual capacity etc. of the size of data block, memory node in memory node.
Data server is according to the attribute information of memory node and the size of data file to be stored, to data to be stored literary compositionPart carries out dividing processing, obtains multiple subdata file.Optionally, the attribute of the memory node acquired when data serverDuring information difference, the process that data, services carries out dividing processing to data to be stored also differs, concrete, including the following two kindsFeasible implementation:
A kind of feasible implementation: the attribute information of memory node includes the size of data block in memory node.
In this kind of feasible implementation, data file to be stored, according to the size of data block, is entered by data serverRow dividing processing, obtains N number of subdata file, wherein, at least there is the size of N-1 data file in N number of subdata fileSize equal to data block.
Accordingly, after data server acquires N number of subdata file, data server can be according to storage jointThe number of point, by each subdata file uniform distribution to each memory node.
Optionally, data server passes through equation below one, data file to be stored is carried out dividing processing, obtains N number ofSubdata file:
Wherein, D is the size of data file to be stored, and d is the size of data block,For rightRound up.
Exemplary, it is assumed that the number of memory node is 4, and in memory node, the size of data block is 68MB, it is further assumed thatThe size of data file to be stored is 960MB, then data server is according to above-mentioned formula one, determines the subdata file that obtainsNumber is as follows:
After data file to be stored is split by data server, obtain 15 sub-data files, wherein, 14 sonsThe size of data file is 68MB, and the size of 1 sub-data file is 960-68*14=8MB.
Accordingly, the distribution that each subdata file is divided equally, according to the number of memory node, is deposited by data server to eachStorage node, such as, the corresponding relation of each subdata file and each memory node can be as shown in table 1:
Table 1
The mark of memory nodeThe mark of subdata file
Memory node 1Subdata file 1-subdata file 4
Memory node 2Subdata file 5-subdata file 8
Memory node 3Subdata file 9-subdata file 12
Memory node 4Subdata file 13-subdata file 15
In above process, data server is according to the size of the data block in memory node, to data file to be storedSplitting, the size of the subdata file obtained is identical with the size of data block so that enter data block in memory nodeDuring row storage, improve the resource utilization to memory node.
Another kind of feasible implementation: the attribute information of memory node includes in memory node the size of data block and depositsThe number of storage node;
In this kind of feasible implementation, data server is big according to the size of data block and data file to be storedLittle, determine the first data block number that data file to be stored includes, according to number and first data block of memory nodeNumber, determines the second data block number that each memory node is corresponding, the second data block number corresponding according to each memory node and numberAccording to the size of block, data file to be stored being carried out dividing processing, obtain M sub-data file, wherein, M is equal to memory nodeNumber.
Exemplary, it is assumed that the number of memory node is 4, and these 4 memory nodes are designated as memory node 1-storage respectivelyNode 4, in memory node, the size of data block is 68MB, it is further assumed that the size of data file to be stored is 960MB.
Data server is first according to size (68MB) and the size (960MB) of data file to be stored of data block, reallyThe first data block number that fixed data file to be stored includes.Optionally, number to be stored can be determined by above-mentioned formula one15 data blocks are included according to file.
Data server, in the number (4) according to memory node and the first data block number (15), determines each storage jointThe second data block number that point is corresponding, concrete, the second data block number that 3 memory nodes are corresponding is 4,1 storage jointThe number of the second data block that point is corresponding is 3.
Data server is according to the second data block number corresponding to each memory node and the size of data block, to number to be storedCarrying out dividing processing according to file, concrete, data file segmentation to be stored is 4 data files by data server, wherein 3The size of data file is 4*68=272MB, and the size of 1 data file is 3*68=207MB.
In above process, the data server size according to the data block in memory node and the number of memory node,Data file to be stored is split, the integral multiple that size is data block size of the subdata file obtained, the most permissibleImprove the resource utilization to memory node, decrease the segmentation times to data file to be stored, and then improve to be storedThe segmentation efficiency of data file.
On the basis of any one embodiment above-mentioned, each subdata file stored to corresponding at data server and depositingAfter in storage node, the subdata file that store in each memory node, data file is corresponding can also be entered by data serverRow merging treatment, obtains verifying data file, it is judged that the MD5 value of data file to be stored and the MD5 value of inspection data file areNo identical, the most then the client to user place sends and uploads successfully corresponding message, the most then data file carries out weightDeposit process.
On the basis of any one embodiment above-mentioned, the data file stored can also be downloaded by user, underFace, is described in detail to the downloading process of data file by the embodiment shown in Fig. 4.
The schematic flow sheet of the data file downloading method that Fig. 4 provides for the present invention, refers to Fig. 4, and the method can be wrappedInclude:
The data download request that S401, reception client send, data download request is civilian to data to be downloaded for instructionPart is downloaded;
S402, absolute path according to data file to be downloaded, obtain data file to be downloaded many in memory nodeIndividual sub-data file;
S403, multiple subdata files to data file to be downloaded merge process, obtain data file to be downloaded;
S404, to client send data file to be downloaded.
In the embodiment shown in fig. 4, when user needs to be downloaded the data file stored, user can beClient, by individual's account logon data server, selects the data file stored under individual's account to be downloaded operation.
After data server receives the data download request that client sends, data server obtains number to be downloadedAccording to the absolute path of file, the absolute path of this data file to be downloaded is used for indicating data file to be downloaded in memory nodeStore path.Data server, according to the absolute path of data file to be downloaded, obtains data to be downloaded in memory nodeMultiple subdata files of file.
After data server acquires multiple subdata file, data server is many to data file to be downloadedIndividual sub-data file merges process, obtains data file to be downloaded.Optionally, data server can be according to to be downloadedSegmentation order when data file is split, merges process to each subdata file.
After data server acquires data file to be downloaded, data server sends number to be downloaded to clientAccording to file.
In above process, during data server obtains data file to be downloaded from memory node, dataServer can send data acquisition request to multiple memory nodes simultaneously, to realize obtaining from multiple memory nodes treating simultaneouslyDownload multiple subdata files that data file is corresponding, and then improve the speed obtaining data file to be downloaded.Further, ifOne sub-data file is sent unsuccessfully by memory node, then memory node has only to carry out this data file retransmitting i.e.Can, it is not necessary to other subdata file is retransmitted, and then improve the efficiency of data storage.
On the basis of any one embodiment above-mentioned, the data file stored can also be migrated by user, underFace, is described in detail to the transition process of data file by the embodiment shown in Fig. 5.
The schematic flow sheet of the data migration method that Fig. 5 provides for the present invention, refers to Fig. 5, and the method may include that
The Data Migration request that S501, reception client send, Data Migration request includes data file to be migratedMark and target relative path;
S502, according to Data Migration ask, the relative path of data file to be migrated is updated to target relative path.
In the embodiment shown in fig. 5, the data file stored can be migrated by user, i.e. by individual subscriberAnother file in data file migration in account next one file.When user needs to enter the data file storedWhen row migrates, user can pass through individual's account logon data server in client, and by the data in a data fileFile migration is to another data file.
After data server receives Data Migration request, data server obtains the number to be migrated in migration requestAccording to mark and the target relative path of file, this target relative path is the path of destination folder corresponding to data to be migrated.Data server is asked according to Data Migration, and the relative path of data file to be migrated is updated to target relative path.
In above process, after data file is migrated by user, it is not necessary to change the actual storage of data filePosition, it is only necessary to the relative path of data file is updated, and then improve the effect that data file is migratedRate.
On the basis of any one embodiment above-mentioned, the data file stored can also be shared by user, toolBody, user can select data file to be shared, and selects user corresponding to this data file to be shared.Data server is thenAccording to shared data file and corresponding user, generate data file and the corresponding relation of user, so that corresponding user possessesCheck, download the authority of this data file.
The structural representation one of the data server that Fig. 6 provides for the present invention, refers to Fig. 6, and this data server is permissibleIncluding: receiver module 601, judge module 602, first determine module the 603, first acquisition module 604, second determine module 605And memory module 606, wherein,
Receiver module 601 is used for, and receives client and sends data storage request, and data storage request is treated for instruction and depositedStorage data file stores;
Judge module 602 is used for, it is judged that whether there is the storage number identical with data file to be stored in memory nodeAccording to file;
First determine module 603 for, judge module 602 judge in memory node exist and data file phase to be storedWith storage data file time, obtain and stored the data file current absolute path in memory node, and will be the most exhaustedPath is defined as the absolute path of file to be stored;
First acquisition module 604 is used for, and judges not exist in memory node and data file to be stored at judge module 602During identical storage data file, obtain multiple subdata files of data file to be stored;Accordingly, second determines module605 for determining the memory node that each subdata file is corresponding, and memory module 606 is for storing each subdata file to correspondenceMemory node in.
The data server that the embodiment of the present invention provides can perform the technical scheme shown in said method embodiment, in factExisting principle and beneficial effect are similar to, and the most no longer repeat.
In a kind of possible embodiment, it is judged that module 602 specifically for:
Obtain each MD5 having stored data file of storage in the MD5 value of data file to be stored and memory nodeValue;
Each MD5 having stored data file of storage in MD5 value according to data file to be stored and memory nodeValue, it is judged that whether there is the storage data file identical with data file to be stored in memory node.
The structural representation two of the data server that Fig. 7 provides for the present invention, on the basis of embodiment illustrated in fig. 6, pleaseSeeing Fig. 7, the first acquisition module 604 includes acquiring unit 6041 and cutting unit 6042, wherein,
Acquiring unit 6041 is used for, and obtains attribute information and the size of data file to be stored of memory node;
Cutting unit 6042 is used for, and according to attribute information and the size of data file to be stored of memory node, treats and depositsStorage data file carries out dividing processing, obtains multiple subdata file.
In a kind of possible embodiment, when the attribute information of memory node includes the size of data block in memory nodeTime, accordingly, cutting unit 6042 specifically for:
According to the size of data block, data file to be stored is carried out dividing processing, obtain N number of subdata file, wherein,N number of subdata file at least exists the size size equal to data block of N-1 data file.
In alternatively possible embodiment, when the attribute information of memory node includes the big of data block in memory nodeDuring the number of little and memory node, accordingly, cutting unit 6042 specifically for:
Size according to data block and the size of data file to be stored, determine that data file to be stored includes firstData block number;
Number according to memory node and the first data block number, determine the second data block that each memory node is correspondingNumber;
The second data block number corresponding according to each memory node and the size of data block, enter data file to be storedRow dividing processing, obtains M sub-data file, and wherein, M is equal to the number of memory node.
Further, this data server also includes the second acquisition module 607 and generation module 608, wherein,
Second acquisition module 607 is used for, and in memory module, each subdata file is stored to corresponding memory node itAfter, obtain each subdata file absolute path in corresponding memory node;
Generation module 608 is used for, and according to each subdata file absolute path in corresponding memory node, generates and waits to depositThe absolute path of storage data file.
Further, this data server also includes merging module 609 and sending module 610, wherein,
Merge module 609 to be used for, after each subdata file is stored to corresponding memory node by memory module, rightSubdata file that store in each memory node, that data file is corresponding merges process, obtains verifying data file;
Judge module 602 is additionally operable to, it is judged that whether the MD5 value of the MD5 value of data file to be stored and inspection data fileIdentical;
Sending module 610 is used for, and judges MD5 value and the inspection data file of data file to be stored at judge module 602MD5 value identical time, client to user place sends and uploads successfully corresponding message;
Memory module 606 is additionally operable to, and judges MD5 value and the inspection data literary composition of data file to be stored at judge module 602When the MD5 value of part differs, data file is heavily deposited process.
Further, this data server also includes the 3rd acquisition module 611, wherein,
Receiver module 601 is additionally operable to, and receives the data download request that client sends, and it is right that data download request is used for indicatingData file to be downloaded is downloaded;
3rd acquisition module 611 is used for, and according to the absolute path of data file to be downloaded, obtains under treating in memory nodeCarry multiple subdata files of data file;
Merge module 609 to be additionally operable to, multiple subdata files of data file to be downloaded are merged process, is treatedDownload data file;
Sending module 610 is additionally operable to, and sends data file to be downloaded to client.
Further, this data server also includes transferring module 612, wherein,
Receiver module 601 is additionally operable to, and receives the Data Migration request that client sends, and Data Migration request includes waiting to moveMove mark and the target relative path of data file;
Transferring module 612 is used for, and asks according to Data Migration, the relative path of data file to be migrated is updated to targetRelative path.
The data server that the embodiment of the present invention provides can perform the technical scheme shown in said method embodiment, in factExisting principle and beneficial effect are similar to, and the most no longer repeat.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each method embodiment can be led toThe hardware crossing programmed instruction relevant completes.Aforesaid program can be stored in a computer read/write memory medium.This journeySequence upon execution, performs to include the step of above-mentioned each method embodiment;And aforesaid storage medium includes: ROM, RAM, magnetic disc orThe various media that can store program code such as person's CD.
Last it is noted that various embodiments above is only in order to illustrate technical scheme, it is not intended to limit;To the greatest extentThe present invention has been described in detail by pipe with reference to foregoing embodiments, it will be understood by those within the art that: it depends onSo the technical scheme described in foregoing embodiments can be modified, or the most some or all of technical characteristic is enteredRow equivalent;And these amendments or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention technologyThe scope of scheme.

Claims (18)

CN201610624761.3A2016-07-282016-07-28Data managing method and data serverPendingCN106294627A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610624761.3ACN106294627A (en)2016-07-282016-07-28Data managing method and data server

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610624761.3ACN106294627A (en)2016-07-282016-07-28Data managing method and data server

Publications (1)

Publication NumberPublication Date
CN106294627Atrue CN106294627A (en)2017-01-04

Family

ID=57664353

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610624761.3APendingCN106294627A (en)2016-07-282016-07-28Data managing method and data server

Country Status (1)

CountryLink
CN (1)CN106294627A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2020093501A1 (en)*2018-11-082020-05-14网宿科技股份有限公司File storage method and deletion method, server, and storage medium
CN111866169A (en)*2018-01-232020-10-30创新先进技术有限公司Service updating method, device and system
CN112231619A (en)*2020-10-152021-01-15北京三快在线科技有限公司Conversion method, conversion device, electronic equipment and storage medium
CN112835529A (en)*2021-02-232021-05-25深圳市得一微电子有限责任公司Data storage method and device, electronic equipment and storage medium
CN113254402A (en)*2021-05-182021-08-13福州理工学院Shared file management method and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20110295803A1 (en)*2010-05-272011-12-01Fujitsu LimitedDatabase system, method, and recording medium of program
CN103138871A (en)*2011-11-232013-06-05毕书清Server data processing system and method of application program of mobile communication system
CN103577503A (en)*2012-08-102014-02-12鸿富锦精密工业(深圳)有限公司Cloud file storage system and method
CN103634407A (en)*2013-12-112014-03-12北京荣之联科技股份有限公司Method and device for breakpoint resuming of cloud storage files
CN104378422A (en)*2014-11-132015-02-25中国联合网络通信有限公司保定市分公司Mobile terminal and file transmission method and system thereof
CN104679905A (en)*2015-03-202015-06-03四川特伦特科技股份有限公司High-speed storage system based on cloud storage
CN104967619A (en)*2015-06-172015-10-07深圳市腾讯计算机系统有限公司 File pushing method, device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20110295803A1 (en)*2010-05-272011-12-01Fujitsu LimitedDatabase system, method, and recording medium of program
CN103138871A (en)*2011-11-232013-06-05毕书清Server data processing system and method of application program of mobile communication system
CN103577503A (en)*2012-08-102014-02-12鸿富锦精密工业(深圳)有限公司Cloud file storage system and method
CN103634407A (en)*2013-12-112014-03-12北京荣之联科技股份有限公司Method and device for breakpoint resuming of cloud storage files
CN104378422A (en)*2014-11-132015-02-25中国联合网络通信有限公司保定市分公司Mobile terminal and file transmission method and system thereof
CN104679905A (en)*2015-03-202015-06-03四川特伦特科技股份有限公司High-speed storage system based on cloud storage
CN104967619A (en)*2015-06-172015-10-07深圳市腾讯计算机系统有限公司 File pushing method, device and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111866169A (en)*2018-01-232020-10-30创新先进技术有限公司Service updating method, device and system
CN111866169B (en)*2018-01-232023-08-18创新先进技术有限公司Service updating method, device and system
WO2020093501A1 (en)*2018-11-082020-05-14网宿科技股份有限公司File storage method and deletion method, server, and storage medium
CN112231619A (en)*2020-10-152021-01-15北京三快在线科技有限公司Conversion method, conversion device, electronic equipment and storage medium
CN112835529A (en)*2021-02-232021-05-25深圳市得一微电子有限责任公司Data storage method and device, electronic equipment and storage medium
CN113254402A (en)*2021-05-182021-08-13福州理工学院Shared file management method and storage medium
CN113254402B (en)*2021-05-182022-08-30福州理工学院Shared file management method and storage medium

Similar Documents

PublicationPublication DateTitle
CN107819828B (en)Data transmission method and device, computer equipment and storage medium
CN104580104B (en)The method, apparatus and system of authentication
CN106294627A (en)Data managing method and data server
CN110995513B (en)Data sending and receiving method in Internet of things system, internet of things equipment and platform
CN108933805A (en)A kind of document transmission method and system
CN103634361B (en)The method and apparatus for downloading file
WO2018234987A1 (en) RAPID PROPAGATION OF RECENT TRANSACTIONS ON A BLOCK CHAIN NETWORK
CN107404541B (en)Method and system for selecting neighbor node in peer-to-peer network transmission
US20180013610A1 (en)File delivery method, apparatus and system
CN109286663A (en) Distributed system service distribution method, device and equipment
CN108881354A (en)A kind of pushed information storage method, device, server and computer storage medium
CN110597922B (en)Data processing method, device, terminal and storage medium
CN106487768A (en)A kind of file sharing method and device
CN110519240A (en)A kind of single-point logging method, apparatus and system
CN105408871A (en)Method and apparatus for providing redundant data access
CN109413202B (en)System and method for sorting block chain transaction information
CN103595736B (en)Access request treating method and apparatus in video monitoring system
US20160294940A1 (en)Data download method and device
CN106027356B (en)A kind of conversion method and device of Tunnel Identifier
CN114172730A (en) A cross-chain method and an intermediate system for the combination of file blockchains on the chain and off the chain
CN108206839A (en)One kind is based on majority's date storage method, apparatus and system
CN106209875A (en)Method for processing business based on multi-services device and service server
CN109525633B (en)Block chain network, message sending method and message receiving method based on block chain network
CN107707590A (en)System, the method and device of data transfer
CN105472029A (en)Single sign-on method and system based on cache

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20170104


[8]ページ先頭

©2009-2025 Movatter.jp