CN104836862B - A kind of Intelligent terminal data storage method - Google Patents

A kind of Intelligent terminal data storage method Download PDF

Info

Publication number
CN104836862B
CN104836862B CN201510304956.5A CN201510304956A CN104836862B CN 104836862 B CN104836862 B CN 104836862B CN 201510304956 A CN201510304956 A CN 201510304956A CN 104836862 B CN104836862 B CN 104836862B
Authority
CN
China
Prior art keywords
user
data
file
service device
cloud storage
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.)
Expired - Fee Related
Application number
CN201510304956.5A
Other languages
Chinese (zh)
Other versions
CN104836862A (en
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.)
Xiaohuang Machine (Hangzhou) Technology Co., Ltd.
Original Assignee
Hangzhou Strange Coffee Network 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 Hangzhou Strange Coffee Network Technology Co Ltd filed Critical Hangzhou Strange Coffee Network Technology Co Ltd
Priority to CN201510304956.5A priority Critical patent/CN104836862B/en
Publication of CN104836862A publication Critical patent/CN104836862A/en
Application granted granted Critical
Publication of CN104836862B publication Critical patent/CN104836862B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The present invention provides a kind of Intelligent terminal data storage method, this method includes:User's intelligent terminal is connected with cloud storage service device by network, the synchronizing information of data is separately positioned in characteristic value information file, characteristic value information using hashed value as data, the characteristic value information stored respectively according to intelligent terminal and cloud storage service device determines whether intelligent terminal upload data from cloud storage service device downloading data and intelligent terminal to cloud storage service device.The present invention proposes a kind of intelligent terminal storage method, can mitigate the pressure of server, reduces the degree of coupling of smart mobile phone and cloud storage cluster, enhances the flexibility of data synchronization applications.

Description

A kind of Intelligent terminal data storage method
Technical field
The present invention relates to cell phone internet information storage, more particularly to a kind of Intelligent terminal data storage method.
Background technology
The popularization and application of cell phone internet and cloud computing, provides a great convenience for people.Data on smart mobile phone And the storage in cloud storage service device, it is related to data synchronization problems.Some data need stringent synchronization, could be brought for user The facility used, such as address list information;And some data need generally to synchronize, such as photo, video etc. in smart mobile phone, it needs To retain historical data in cloud storage service device, to realize increment synchronization.Existing method of data synchronization is not suitable for big data quantity Application, reduce the data volume of network transmission by detecting and transmitting variance data, need mobile phone terminal and server end common Participation could be realized.
Invention content
To solve the problems of above-mentioned prior art, the present invention proposes a kind of Intelligent terminal data storage method, Including:
User's intelligent terminal is connected with cloud storage service device by network, and the synchronizing information of data is separately positioned at feature In value information file, the characteristic value information using hashed value as data is deposited respectively according to intelligent terminal and cloud storage service device The characteristic value information of storage determines whether intelligent terminal deposited from cloud storage service device downloading data and intelligent terminal to cloud It stores up server and uploads data.
Preferably, the characteristic value information includes filename characteristic value information and file content characteristic value information two parts, Routing information and content information for unique mark file;
For the All Files under a catalogue, then only calculation document name characteristic value information, for tree-like storage structure Catalogue and file then calculate complete trails filename characteristic value information;
According to document size, using one of following two calculative strategies:The characteristic value information of total data is calculated, or is chosen File fragment calculates.
Preferably, the characteristic value information file by 3 class data chunks at:File header information block, filename characteristic value letter Cease block and file content characteristic value information block;
File header information block is defined as follows field name, respectively:
ARYSIZE:Indicate the size of filename hash code mapping array
FNHTYPE:It indicates to calculate the ashing technique type that filename hashed value uses
HDCOUNT:File content uses the number of ashing technique
HDTYPE:Ashing technique type
Filename characteristic value information block is defined as follows field name, respectively:
FNNOFFSET:0 indicates without next characteristic value information;The non-zero offset for indicating next filename hash information
FLAG:0 indicates local without this file;1 indicates that local file and cloud storage service device are completely the same;2 indicate local File content and cloud storage service device file content are inconsistent;3, which indicate local, this file, and cloud storage service device does not have;
HDOFFSET:Indicate file content hash information offset;
OFFSETFLAG:Indicate whether HDOFFSET is effective;
Wherein filename characteristic value information block tissue by the way of hashing array linked list:Filename characteristic value information block structure At hash array linked list, array size is determined by ARYSIZE fields;Filename hash array linked list passes through FNNOFFSET files Offset field is realized;Corresponding file content letter is searched in file name information block by HDOFFSET offset fields Block is ceased, realizes the physical mappings that hash information logical organization is stored to file;
In the newly-added information block ablation process of characteristic value information file, first write information block content, then to flag information block Critical field be updated, take write error the strategy for giving up respective stored space, for block of information modification operate, only Before a modification, first that corresponding mark position is invalid.
Preferably, the write operation in newly-added information block further comprises:
(1) in the case where distributing file name information block and distribution document content information block to characteristic value information tail of file Write information, during the data supplementing of tail of file, first write information block WDATA, then update the offset field of front OFFSET:
1. recording OFFSET in program;
2. WDATA operations are executed in end-of-file, if there is accident, then when next write information again since 1.;
3. smaller operation is executed, if there is accident, then when next write information again since 1.;
Finally execute write-back update;
(2) HDOFFSET fields are write, first ensures that OFFSETFLAG fields are 0, indicates that HDOFFSET fields are invalid, so Distribution and the write operation for executing new information block afterwards, after new information block is write as work(, then update HDOFFSET fields, finally will OFFSETFLAG fields set 1, indicate that HDOFFSET fields are effective.
The present invention compared with prior art, has the following advantages:
The present invention proposes a kind of intelligent terminal storage method, can mitigate the pressure of server, reduce smart mobile phone with The degree of coupling of cloud storage cluster enhances the flexibility of data synchronization applications.
Description of the drawings
Fig. 1 is the flow chart of Intelligent terminal data storage method according to the ... of the embodiment of the present invention.
Specific implementation mode
Retouching in detail to one or more embodiment of the invention is hereafter provided together with the attached drawing of the diagram principle of the invention It states.The present invention is described in conjunction with such embodiment, but the present invention is not limited to any embodiments.The scope of the present invention is only by right Claim limits, and the present invention covers many replacements, modification and equivalent.Illustrate in the following description many details with Just it provides a thorough understanding of the present invention.These details are provided for exemplary purposes, and without in these details Some or all details can also realize the present invention according to claims.
An aspect of of the present present invention provides a kind of Intelligent terminal data storage method.Fig. 1 is according to the ... of the embodiment of the present invention Intelligent terminal data storage method flow chart.The present invention merges a variety of data synchronization mechanisms according to the characteristic value information of data Together, and synchronization policy can flexibly be selected.The selection of synchronization mechanism can be specified by user, can also be by application program It selects, the synchronizing information of data is separately positioned in characteristic value information file, keeps the applicable surface of method wider.
Before data synchronize, the redundancy condition and deletion condition of detection data are needed, and then carry out according to these situations Data simultaneously operating.User's smart mobile phone is connected with cloud storage service device by network.The method of the present invention uses hashed value conduct The characteristic value information of data generates different characteristic value informations according to synchronous data cases using a quick ashing technique, with It prevents from colliding;It is independent with method itself using the quantity and type of ashing technique, enhance adaptation of methods.
Characteristic value information is made of " filename characteristic value information " and " file content characteristic value information ", and the two combines, can With the routing information and content information of one file of unique mark.
(1) calculating of filename characteristic value information.Method considers common two kinds of situations:1. the text of flattening storage Part then only needs calculation document name characteristic value information such as the All Files (not including subdirectory) under a catalogue.2. tree-shaped deposit The catalogue and file of storage structure then need to calculate complete trails filename characteristic value information such as the file in multi-level bibliographic structure.
(2) characteristic value information of file content calculates.The data type of user's smart mobile phone is various, there is the rulers such as text file Very little smaller file, the file data for also having photo, video clip etc. bigger.For the different data of document size this two class Following two calculative strategies may be used in situation:1. using associated person information as the small data quantity information of representative, total data is calculated Characteristic value information.2. being the big data quantity information of representative with photo, video etc., whole calculations may be used.But in order to The calculating for choosing several file fragments may be used under the premise of preventing Hash collision in the use for saving smart mobile phone electric power Mode.Since the file synchronization of the method for the present invention depends on file name information, same file is in the modified spy of content Value indicative information collision probability is very low.
According to the application characteristic based on cloud storage service device, characteristic value information is individually packaged and is stored as file, is stored in Cloud storage service device.The advantages of this method is:When terminal carries out Data duplication inspection, only download features value information file is saved Network bandwidth improves data and checks efficiency without repeating the characteristic value information for calculating cloud storage service device and preserving data.
The characteristic value information logical organization of the method for the present invention design is as follows:Characteristic value information file is by 3 class data blocks Composition:File header information block, filename characteristic value information block and file content characteristic value information block.
File header information block is defined as follows field name, respectively:
ARYSIZE:Indicate the size of filename hash code mapping array
FNHTYPE:It indicates to calculate the ashing technique type that filename hashed value uses
HDCOUNT:File content uses the number of ashing technique
HDTYPE:Ashing technique type
Filename characteristic value information block is defined as follows field name, respectively:
FNNOFFSET:0 indicates without next characteristic value information;The non-zero offset for indicating next filename hash information
FLAG:0 indicates local without this file;1 indicates that local file and cloud storage service device are completely the same;2 indicate local File content and cloud storage service device file content are inconsistent;3, which indicate local, this file, and cloud storage service device does not have;
HDOFFSET indicates file content hash information offset;
OFFSETFLAG:Indicate whether HDOFFSET is effective.
Filename characteristic value information block tissue by the way of hashing array linked list:Filename characteristic value information block, which is constituted, to be dissipated Row array linked list, array size are determined by ARYSIZE fields;Filename hash array linked list passes through FNNOFFSET document misregistrations Field is measured to realize;Corresponding document content information is searched in file name information block by HDOFFSET offset fields Block.In this manner, the physical mappings that hash information logical organization is stored to file are realized.
In the reading writing working mechanism of features described above value information file, to be written as example, to information in characteristic value information file The write operation of block, if realize that the atomic operation expense based on affairs is bigger, and characteristic value information file will not occur simultaneously Send out read-write operation.Accordingly, the method for the present invention writing using write-back method to newly-added information block, i.e., first write information block content, then it is right The critical field of flag information block is updated, and under the premise of ensuring method correctness, is taken write error to give up and accordingly be deposited Store up the strategy in space.Write-back method is equally applicable to the modification operation of block of information, it is only necessary to before a modification, first by corresponding flag bit It is invalid to set.Writing for newly-added information block is write including distribution and is write to the update of HDOFFSET fields.It is as follows to write flow:
(1) distribution of new information block is write.It only in both cases just can be to characteristic value information tail of file write information:Point With file name information block and distribution document content information block.During the data supplementing for handling tail of file using write-back method, The information inconsistence problems caused by accident, specific strategy is first write information block, then updates the offset field of front.
It is assumed that offset is OFFSET, write information block is WDATA, and it is WOFFSET to write offset, and write-back method writes process such as Under:
1. recording OFFSET in program.
2. execute WDATA operations in end-of-file, if the step occur it is unexpected, again from 1. opening when next write information Begin.
3. execute WOFFSET operations, if the step occur it is unexpected, when next write information again since 1..
Write-back method WOFFSET is finally executed, and ensure that the correctness of block of information.
(2) HDOFFSET fields are write, also uses write-back method:First ensure that OFFSETFLAG fields are 0, indicates HDOFFSET fields are invalid, then execute distribution and the write operation of new information block, after new information block is write as work(, then update OFFSETFLAG fields are finally set 1 by HDOFFSET fields, indicate that HDOFFSET fields are effective.So far, it ensure that characteristic value is believed Cease the correctness of Documents Logical.
User is in actually using Smartphone device, it is possible that following situations:(1) lost devices, more exchange device. (2) equipment is reset completely, such as factory reset, formatting storage.(3) file is accidentally deleted.The method of the present invention is in reality Under the premise of existing file data stringent synchronization, considers actual conditions, file synchronization flow is optimized, to these fortuitous events Carry out fault-tolerant processing.
File synchronization mechanism is to rely on characteristic value information file, passes through the FNHASHCODE fields of file name information block CODE fields are hashed with the HD of document content information block to be compared, to determine that file whether there is, whether file content has Variation, and be auxiliary with OFLAG fields, in addition the necessary decision of user participates in, realize file data synchronizing function.File is same The design of step mechanism includes the following aspects.
Under normal circumstances:
(1) no matter whether terminal device needs to reinitialize, will be first from cloud storage service device download features value information File is synchronous foundation with characteristic value information file.
(2) if cloud storage service device does not have characteristic value information file, the storage of cloud storage service device is emptied, local first Beginningization characteristic value information file, and local file and characteristic value information file are transmitted to cloud storage service device.Realize cloud storage The consistency of server and local file data.
(3) when cloud storage service device has characteristic value information file, by the way that local file and characteristic value information file are carried out OFLAG fields are that 2 (changes of expression file content) and the file of 3 (indicating locally generated new files) are stored to cloud by comparison Storage server;The file that OFLAG fields are 0 (indicating local to have deleted this document) is deleted from cloud storage service device; OFLAG fields are the corresponding file of 1 expression without update.This step also achieves cloud storage service device and local file data Consistency.
In transmitting file processes in batches, it may occur that failure, to make characteristic value information file fail to be transmitted to cloud The characteristic value information file of storage server, the file for making cloud storage service device store and the storage of cloud storage service device is inconsistent. The solution synchronized to file data has 2 kinds.
Scheme 1:In the case where local file does not change, a synchronizing process is restarted, and selects not deposit from cloud It stores up server and restores file, you can reach the synchronization target of file strict conformance.Assuming that user's text of cloud storage service device storage Part collection is combined into U, and the user file information aggregate recorded in the characteristic value information file of cloud storage service device storage is UH, U-UH= Un, set UnIt is the information for the n file that cloud storage service device hash information file is lost, the reason of loss is this n file After being transmitted to cloud storage service device, corresponding characteristic value information file fails to be transmitted to cloud storage service device.In local number In the case of not changing, locally possess the complete information of this n file, as long as a successful synchronization, cloud storage clothes Business device and local, cloud storage service device characteristic value information file and user file, so that it may to reach strict conformance.
2 local file of scheme has increasing, delete in the case of, restart a synchronizing process, select not from cloud storage service Device restores file, is deleted from cloud storage service device with the inconsistent file of local file, by filename verification mode from cloud storage Server deletes 3 options with the inconsistent file of local file, you can reaches the synchronization target of file strict conformance.Assuming that cloud The user file collection of storage server storage is combined into U, the user recorded in the characteristic value information file of cloud storage service device storage Fileinfo collection is combined into UH, U-UH=Un, UnIt is the information for the n file that cloud storage service device characteristic value information file is lost, Local file collection is combined into UL, then UL∩Un≤Un, no matter UnSet sizes a, as long as successful synchronization, so that it may so that U=UL, Cloud storage service device and local, cloud storage service device characteristic value information file and user file is set to reach strict conformance.
By introduce prevent because these surprisingly caused by user data loss mechanism, allow user to participate in necessary decision, protect The practicability of the method for the present invention is demonstrate,proved.Before file synchronization, first from cloud storage service device download features value information file, then allow User decides whether to restore file from cloud storage service device.After the completion of these steps, smart mobile phone and cloud storage clothes are just carried out The file synchronization of business device.This method can effectively solve the problems, such as that the file occurred in actual use is lost, can be again in specific implementation Refine the overlay strategy of file of the same name.
The letters such as auxiliary expansion, such as add file modification time stamp, source file terminal identity can be carried out to core methed Breath, with the degree of intelligence and efficiency of improvement method, and by classifying to data syn-chronization situation, the reduction unnecessary participation of user, The user experience of improvement method.
According to further embodiment of the present invention, in the data synchronization process of cloud storage service, for security requirement, Third-party storage control centre is introduced, is responsible for giving user one legitimate anonymous identity by verifying the cellphone information of user. User is before registering using cloud storage service device, it is necessary first to obtain identity license in storage control centre, use identity later Cloud storage service device registration security account is gone in license.In addition to user oneself registers when registration security account, can also select to access Control the mode of server registration.
User of the present invention cannot directly permit to log in cloud storage service device with identity, but utilize an identity license pair The mode of multiple secure accounts is answered to use cloud storage service device, user's registration secure account both to protect privacy of user or can allow Attacker loses the target of attack.User can create multiple tokens after obtaining identity license from storage control centre and carry out table on demand Show different accounts.The token parameter of each user is different from, even the parameter of the different accounts of same user is also to differ Sample, ensure that cloud storage service device end can not connect the different accounts of the same user in this way, is merely able to limitation one A user creates the maximum quantity of account.Here is that (H () is hash function, and a is that cloud is deposited for the generation method of secure account token T Server address is stored up, j is the same user's registration account number, and sk is private key for user, and n is total number of users, and e is random number):
ρ=H (a ‖ j)(n-1)/α
T=ρsk·e mod n
This method for generating secure account and common identity anonymous verification method are completely similar above, and the present invention will As disclosed parameter, user only needs to input private key sk when logging in cloud storage service device above-mentioned ρ, private without forwarding Key.
The embodiment of the present invention method is divided into registration, login and data storage and shares.Registration mainly storage control The identity allowed registration at center and the secure account registration at cloud storage service device end.User obtains body from the registration of storage control centre Part license, next with identity allowed registration cloud storage service device secure account, user can use cloud storage service later The storage of device and sharing functionality.
User and storage control centre complete identity Licensing Authority agreement in this process, and storage control centre, which returns, to be used Family credential parameter value (cloud storage service device end is not involved in wherein).First, storage control centre is it needs to be determined that user is legal use Family rather than one section of malicious attack program, this present invention user by the private essential information of other of cellphone information and user together on It is transmitted to storage control centre.Here cellphone information passes through return as the foundation for confirming user's necessary being, storage control centre Short message come judge this application whether come from validated user.It, can using storage control centre as half in identity allowed registration frame Letter state, user need to be stored in storage control centre after mobile phone terminal is by other personal informations encryption of oneself.Here is The specific steps of identity allowed registration:
1) registration request, cellphone information and other encrypted essential informations are sent to storage control centre by user.
2) storage control centre compares this cellphone information, if times of registration is more than number upper limit r, returns to user's failure.
3) storage control centre returns to user and verifies information, and whether verify this cellphone information effective, if authentication failed, Return to user's failure.
4) storage control centre confirmed the legal identity of user.User executes digital signature association with storage control centre View:
Define public key group (Ai, b, c, n), calculate Q values:
Wherein sk is private key for user, and λ is private key for user number, and Ai, b, c is the sequence interception value of private key for user, and n is that user is total Number.
Later when user's registration cloud storage service device secure account, mobile phone terminal proves that user possesses legal body using Q values Part license.
5) mobile phone terminal preserves the value of random parameter e and result of calculation Q.
User can rely on the license of this identity to be taken in cloud storage after obtaining legal identity license from storage control centre Register multiple secure accounts in business device end.According to user and cloud storage service device to the height of safe coefficient demand, two can be selected The different registration cloud storage service device mode of kind:
1) user is sent to cloud storage service device device information needed and identity license to complete to register.Under this mode, After user obtains identity license, storage control centre is at off-state, is not involved in next any flow completely. The mode of user's registration is suitble to the higher user of security level and cloud storage service device, is assisted with the tripartite of usual protection privacy of user View is compared, and control centre is stored in this flow cannot obtain any privacy of user and cloud storage service device.
2) cloud registration goes to realize by storing control centre.User issues storage control centre cloud storage service device address and cloud Demand of the storage server to personally identifiable information goes the registration of completion cloud storage service device by storing control centre.Here by Control centre will be stored as half trusted status, in order to make the personal information that user stores to storing control centre not in the present invention As it can be seen that the present invention is using other personal informations of homomorphic cryptography method encryption user, storage control centre can be from encrypted information In retrieve the required personal information of cloud storage service device, be unable to know the particular content of information.
The step of flow of two kinds of logon modes is similar, and here is by user's registration:
1) user sends registering account request to cloud storage service device.
2) cloud storage service device returns to times of registration upper limit k and address parameter a.
3) mobile phone terminal executes verification, and verification result and times of registration j are sent to cloud storage service device.
4) cloud storage service device verifies the verification result and the value (1≤j≤k) of j terminates association if verification is invalid View returns to user's failure.
5) mobile phone terminal creates token account T, creates successfully rear to cloud storage service device end transmission T and alias.
6) it whether there is same T in cloud storage service device Test database, if returning to failure in the presence of if;Otherwise by T and Random number e is added database and binds this alias, returns to user's registration account success.
User is after obtaining cloud storage service device register account number, so that it may to store oneself at cloud storage service device end Data.Storage control centre is also no longer participate in wherein.The present invention is also done by user demand on the basis of considering security privacy The processing of some safety classifications can save the expense of mobile phone terminal and not influence the basic security of user.
Mobile phone terminal first verifies that secure account, and cloud storage service device is logged in after being proved to be successful.The data that user uploads can To carry out multidomain treat-ment according to content type etc., data are divided into (D1, D2..., DN) N number of subregion, then do not sympathized with according to user Condition (whether content needs to maintain secrecy to cloud storage service device end) selection cipher mode:
1) cloud storage service device end will be uploaded to after data encryption.This method decoding key only in mobile phone terminal, is fitted Close the higher storage file of safety requirements and the not high cloud storage service device end of confidence level.
2) user directly uploads data, and data encryption is carried out by cloud storage service device end.In this manner, user this Data information is visible cloud storage service device end.The method uses when user being suitble to store insignificant information, mainly for Reduce the computing cost at cell phone end.
Due to the demand with household co-operation finished item or processing data, user is stored in the number at cloud storage service device end Exist according to needing the file shared away, and usually uploaded to have multiple sharers.User can be right when storing oneself data Data carry out multidomain treat-ment.User needs according to oneself and data are divided into N number of subregion by shared consideration, and sharer accesses user's When shared data, particular zones can only be accessed and be unable to download access other parts data.
Here is the detailed process that sharer obtains Share Permissions:
1) sharer sends the address of sharing request and oneself to data host;
2) after data host agrees to, the number of partitions β of sharer's demand data is sent to cloud storage service device end;
3) it is below shared key km βGeneration, wherein (u, v) is random parameter pair, t is current time;
km β=uH (β ‖ m ‖ t)2+v
4) cloud storage service device end is by the shared number m and shared key k of this number of partitionsm βData host is returned to (if the areas β It is that decoding key is then taken by the encrypted shared data of cloud storage service device);
5) data host is transmitted to sharer's shared key km βAnd the decoding key of this shared partition;
6) sharer is according to shared key km βWith the public key T of secure account, complete shared key verification is formed:G=H (km β‖T)(n-1)/α
Later, cloud storage service device end storage of public keys G and parameter be to (n, α), and returns to the areas sharer β and can share confirmation;
After flow above, when sharer needs to access the data in the areas β, it is only necessary to log in cloud storage service device, input km β, the token account public key T of cloud storage service device end extraction sharer, if shared key verification formula is set up, sharer can With accessing shared data area β.
Further, in data synchronization process, the present invention preferably improves existing incremental transmission method, to be deposited in cloud The optimization carried out in storage system.For uploading new edition file process.Originally, have one on cloud storage service device and mobile phone terminal The identical copies of part file OLD.Subsequent user has modified mobile phone terminal OLD copies, forms NEW.Then, needing will be on mobile phone terminal NEW is uploaded on cloud storage service device and is formed new version.It is sender that then the present invention, which defines mobile phone terminal, and Cloud Server is to receive Side.Incremental transmission can be divided into four steps:
1. mobile phone terminal initiates NEW upload requests to Cloud Server.
2. OLD is divided into block by Cloud Server by fixed size, the rolling check code and AES check codes of each block are calculated, and Each piece of rolling check code set CHECHSET is transferred to mobile phone terminal.
3. after Cloud Server receives CHECHSET, rolling verification is carried out to an equal amount of rolling window of NEW file openings. The rolling of sliding window is verified using byte as single rolling distance rolls forward, often roll 1 byte carry out it is primary roll verification with AES is verified.After method of calibration verification traverses entire file, the position of all identical blocks of NEW and OLD can be oriented It sets, remaining is exactly to need incremental transmission to the data block information of the NEW of Cloud Server.So last mobile phone terminal needs to transmit Data be:In NEW with the different data blocks of OLD and the piecemeal metadata information of new version NEW.
After 4. Cloud Server receives the content of mobile phone terminal incremental transmission, by the piecemeal metadata of file data blocks and NEW into Row association, forms new edition file.Need associated blocks of files to consist of two parts, blocks of files exclusive NEW and NEW with Blocks of files public OLD.Therefore it needs to do the operation of two steps:1. the piecemeal member of NEW delta files block and NEW that mobile phone terminal is transmitted Data are associated;2. public documents block will be oriented, and by itself and NEW file member numbers in the existing OLD files of server end According to being associated.So far, complete NEW files are formed in Cloud Server.Increment, which uploads file processes, to be terminated.
Wherein, 3. in the rolling method of calibration mentioned be that main time overhead, method are specific as follows in transmission process:Rolling Dynamic check code rolls check code using multinomial, and by the way that first character section is removed check code, the last byte is added Check code mode, update calculate examine code value.The present invention judges whether two data segments are identical, and verification is rolled by calculating Code may be identical both to guess, both is determined with AES check codes certainly identical.
See that specific sliding window rolls method of calibration again, in two steps:
1. first calculating the rolling hashed value of data in sliding window, and searches its value in CHECHSET and whether there is.
2. if it is not found, then 1 byte of sliding window rolls forward.If it is found, then further calculating sliding window The ASE values of data in mouthful.If ASE values exist in CHECHSET, then it is assumed that data are duplicate data in sliding window at present, There is no then 1 bytes of sliding window rolls forward.
It is different from end-to-end application scenarios, the characteristic with high concurrent under cloud storage environment, under cloud storage environment Incremental transmission, server end as star transmit topological structure in central point, need cope with high concurrent scene, system Concurrency is limited by memory size, network bandwidth, magnetic disc i/o read or write speed.Therefore, performance of the present invention to rolling check code It is optimized.
The present invention mentions the rolling check code of Rsync, and with the thought of increment, each only needs calculate between window twice Different byte values.Therefore magnetic disc i/o only needs to pay close attention to the data of one first the two bytes of tail of sliding window.Therefore, Calculate when rolling check code every time from disk read sliding window after next byte into memory, with sliding window first Byte data is replaced, and realizes the rolling information of check code of incremental update sliding window.Performance boost is done for magnetic disc i/o operation. It is read in advance by the way of several bytes come optimization method using the thought of buffering area.Specific buffer data update method is such as Under:
Two buffering areas, head and tail are opened up, size is all bSize, and wherein bsize is much smaller than rolling window size. Sliding window removes Head [i] and is a window sliding comprising tail [i].It, will after sliding window reading (Size-1) is secondary The Size buffer data moves to the 1st position of buffering area, then reads in (Size-1) a byte, completes buffering area forward Slide.
The optimization method can effectively optimize disk access.It is sliding window content all storage memory and full content The compromise for depositing the mode that disk is read every time has taken into account the limitation of memory size and disk read-write speed, method is made to be more suitable for Concurrent actual motion environment.
Obviously, it should be appreciated by those skilled in the art, each module of the above invention or each steps can be with general Computing system realize that they can be concentrated in single computing system, or be distributed in multiple computing systems and formed Network on, optionally, they can be realized with the program code that computing system can perform, it is thus possible to they are stored It is executed within the storage system by computing system.In this way, the present invention is not limited to any specific hardware and softwares to combine.
It should be understood that the above-mentioned specific implementation mode of the present invention is used only for exemplary illustration or explains the present invention's Principle, but not to limit the present invention.Therefore, that is done without departing from the spirit and scope of the present invention is any Modification, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.In addition, appended claims purport of the present invention Covering the whole variations fallen into attached claim scope and boundary or this range and the equivalent form on boundary and is repairing Change example.

Claims (2)

1. a kind of Intelligent terminal data storage method, synchronous with the data of Cloud Server for realizing intelligent terminal, feature exists In, including:
User's intelligent terminal is connected with cloud storage service device by network, and the synchronizing information of data is separately positioned at characteristic value letter It ceases in file, the characteristic value information using hashed value as data, is stored respectively according to intelligent terminal and cloud storage service device Characteristic value information determines whether intelligent terminal take from cloud storage service device downloading data and intelligent terminal to cloud storage Business device uploads data;
The characteristic value information includes filename characteristic value information and file content characteristic value information two parts, is used for unique mark The routing information and content information of file;
For the All Files under a catalogue, then only calculation document name characteristic value information, for the catalogue of tree-like storage structure And file, then calculate complete trails filename characteristic value information;
According to document size, using one of following two calculative strategies:Calculate the characteristic value information or selecting file of total data Fragment computations;
The characteristic value information file by 3 class data chunks at:In File header information block, filename characteristic value information block and file Hold characteristic value information block;
File header information block is defined as follows field name, respectively:
ARYSIZE:Indicate the size of filename hash code mapping array
FNHTYPE:It indicates to calculate the ashing technique type that filename hashed value uses
HDCOUNT:File content uses the number of ashing technique
HDTYPE:Ashing technique type
Filename characteristic value information block is defined as follows field name, respectively:
FNNOFFSET:0 indicates without next characteristic value information;The non-zero offset for indicating next filename hash information
FLAG:0 indicates local without this file;1 indicates that local file and cloud storage service device are completely the same;2 indicate local file Content and cloud storage service device file content are inconsistent;3, which indicate local, this file, and cloud storage service device does not have;
HDOFFSET:Indicate file content hash information offset;
OFFSETFLAG:Indicate whether HDOFFSET is effective;
Wherein filename characteristic value information block tissue by the way of hashing array linked list:Filename characteristic value information block, which is constituted, to be dissipated Row array linked list, array size are determined by ARYSIZE fields;Filename hash array linked list passes through FNNOFFSET document misregistrations Field is measured to realize;Corresponding document content information is searched in file name information block by HDOFFSET offset fields Block realizes the physical mappings that hash information logical organization is stored to file;
In the newly-added information block ablation process of characteristic value information file, first write information block content, then the pass to flag information block Key field is updated, and takes write error the strategy for giving up respective stored space, and the modification of block of information is operated, is only being repaiied It is first that corresponding mark position is invalid before changing;
Registration to Cloud Server includes the secure account of the identity allowed registration and cloud storage service device end that store control centre Registration;User obtains identity license from the registration of storage control centre, next with identity allowed registration cloud storage service device safety Account, the storage and sharing functionality that user can be using cloud storage service device later;
User and storage control centre complete identity Licensing Authority agreement in this process, and storage control centre returns to user certificate Book parameter value, cloud storage service device end are not involved in wherein;First, store control centre it needs to be determined that user be validated user without It is one section of malicious attack program, the private essential information of other of cellphone information and user is uploaded in storage control by user together The heart;Cellphone information judges this application as the foundation for confirming user's necessary being, storage control centre by returning to short message Whether validated user is come from;
In identity allowed registration frame, will storage control centre as half trusted status, user need mobile phone terminal by oneself Storage control centre is stored in after the encryption of other personal informations;Here is the specific steps of identity allowed registration:
1) registration request, cellphone information and other encrypted essential informations are sent to storage control centre by user;
2) storage control centre compares this cellphone information, if times of registration is more than number upper limit r, returns to user's failure;
3) storage control centre returns to user and verifies information, and whether effective, if authentication failed, return if verifying this cellphone information User fails;
4) storage control centre confirmed the legal identity of user;User executes digital signature protocol with storage control centre:
Define public key group (Ai, b, c, n), calculate Q values:
Wherein sk is private key for user, and λ is private key for user number, and Ai, b, c is the sequence interception value of private key for user, and n is that user is total Number;
Later when user's registration cloud storage service device secure account, mobile phone terminal proves that user possesses legal identity and permitted using Q values It can;
5) mobile phone terminal preserves the value of random parameter e and result of calculation Q;
This method further includes:
User is after obtaining cloud storage service device register account number, so that it may to store the number of oneself at cloud storage service device end According to;
Mobile phone terminal first verifies that secure account, and cloud storage service device is logged in after being proved to be successful;The data that user uploads can root Multidomain treat-ment is carried out according to content type etc., data are divided into (D1, D2..., DN) N number of subregion, then selected according to user's different situations Select cipher mode:
1) cloud storage service device end will be uploaded to after data encryption;
2) user directly uploads data, and data encryption is carried out by cloud storage service device end, and this data information of user is to cloud storage Server end is visible;
User needs according to oneself and data are divided into N number of subregion by shared consideration, when sharer accesses the shared data of user, only Particular zones can be accessed and be unable to download access other parts data;
Here is the detailed process that sharer obtains Share Permissions:
1) sharer sends the address of sharing request and oneself to data host;
2) after data host agrees to, the number of partitions β of sharer's demand data is sent to cloud storage service device end;
3) it is below shared key km βGeneration, wherein (u, v) is random parameter pair, t is current time;
km β=uH (β ‖ m ‖ t)2+v
Wherein H () is hash function;
4) cloud storage service device end is by the shared number m and shared key k of this number of partitionsm βReturn to data host, if the areas β be by The encrypted shared data of cloud storage service device, then take decoding key;
5) data host is transmitted to sharer's shared key km βAnd the decoding key of this shared partition;
6) sharer is according to shared key km βWith the public key T of secure account, complete shared key verification is formed:G=H (km β‖T )(n-1)/α
Later, cloud storage service device end storage of public keys G and parameter be to (n, α), and returns to the areas sharer β and can share confirmation;
After flow above, when sharer needs to access the data in the areas β, it is only necessary to log in cloud storage service device, input km β, cloud The token account public key T of sharer is extracted at storage server end, if shared key verification formula is set up, sharer can access Sharing data area β.
2. according to the method described in claim 1, it is characterized in that, the write operation in newly-added information block is further wrapped It includes:
(1) it writes letter to characteristic value information tail of file in the case where distributing file name information block and distribution document content information block Breath, during the data supplementing of tail of file, first write information block WDATA, then update the offset field OFFSET of front:
Finally execute write-back update;
(2) HDOFFSET fields are write, first ensures that OFFSETFLAG fields are 0, indicates that HDOFFSET fields are invalid, then hold The distribution of row new information block and write operation after new information block is write as work(, then update HDOFFSET fields, finally by OFFSETFLAG Field sets 1, indicates that HDOFFSET fields are effective.
CN201510304956.5A 2015-06-04 2015-06-04 A kind of Intelligent terminal data storage method Expired - Fee Related CN104836862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510304956.5A CN104836862B (en) 2015-06-04 2015-06-04 A kind of Intelligent terminal data storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510304956.5A CN104836862B (en) 2015-06-04 2015-06-04 A kind of Intelligent terminal data storage method

Publications (2)

Publication Number Publication Date
CN104836862A CN104836862A (en) 2015-08-12
CN104836862B true CN104836862B (en) 2018-07-27

Family

ID=53814491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510304956.5A Expired - Fee Related CN104836862B (en) 2015-06-04 2015-06-04 A kind of Intelligent terminal data storage method

Country Status (1)

Country Link
CN (1) CN104836862B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209998A (en) * 2016-06-30 2016-12-07 宇龙计算机通信科技(深圳)有限公司 A kind of method based on Cloud Server management application and terminal
CN106302641B (en) 2016-07-27 2019-10-01 北京小米移动软件有限公司 A kind of methods, devices and systems of upper transmitting file
CN106455049B (en) 2016-09-18 2020-03-03 北京小米移动软件有限公司 Positioning method and device based on wireless local area network
CN106856480A (en) * 2017-02-27 2017-06-16 努比亚技术有限公司 Date storage method and device
CN108667881B (en) * 2017-03-31 2020-08-18 中国科学院声学研究所 Service data synchronization method for intelligent terminal and cloud server
CN109598119B (en) * 2018-11-28 2021-03-16 北京可信华泰信息技术有限公司 Credible encryption and decryption method
CN109583197B (en) * 2018-11-28 2021-05-14 北京可信华泰信息技术有限公司 Trusted overlay file encryption and decryption method
CN109598154B (en) * 2018-11-28 2021-03-16 北京可信华泰信息技术有限公司 Credible full-disk encryption and decryption method
CN109960683B (en) * 2019-03-27 2020-03-03 泰信利美信息科技(常州)有限公司 Information data storage integration system based on big database
CN110138555B (en) * 2019-05-21 2020-11-20 长沙能川信息科技有限公司 Encryption and decryption method for FBX format three-dimensional model
CN112019610B (en) * 2020-08-21 2023-05-02 广东德圳智能技术有限公司 Cloud edge cooperation method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984250A (en) * 2012-11-26 2013-03-20 江苏乐买到网络科技有限公司 Data synchronization method based on cloud service
CN103595730A (en) * 2013-11-28 2014-02-19 中国科学院信息工程研究所 Ciphertext cloud storage method and system
CN103634406A (en) * 2013-12-11 2014-03-12 北京荣之联科技股份有限公司 File synchronization method and terminal thereof
CN104468842A (en) * 2014-12-31 2015-03-25 国网甘肃省电力公司信息通信公司 Power grid equipment state information cloud storage system and data uploading and downloading methods thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984250A (en) * 2012-11-26 2013-03-20 江苏乐买到网络科技有限公司 Data synchronization method based on cloud service
CN103595730A (en) * 2013-11-28 2014-02-19 中国科学院信息工程研究所 Ciphertext cloud storage method and system
CN103634406A (en) * 2013-12-11 2014-03-12 北京荣之联科技股份有限公司 File synchronization method and terminal thereof
CN104468842A (en) * 2014-12-31 2015-03-25 国网甘肃省电力公司信息通信公司 Power grid equipment state information cloud storage system and data uploading and downloading methods thereof

Also Published As

Publication number Publication date
CN104836862A (en) 2015-08-12

Similar Documents

Publication Publication Date Title
CN104836862B (en) A kind of Intelligent terminal data storage method
CN105007302B (en) A kind of mobile terminal data storage method
CN111108478B (en) Method, system and apparatus for communicating and sharing blockchain data
CN109313763B (en) Hierarchical network system and node for hierarchical network system
US7428751B2 (en) Secure recovery in a serverless distributed file system
US20180294957A1 (en) System for Recording Ownership of Digital Works and Providing Backup Copies
CN109327481B (en) Block chain-based unified online authentication method and system for whole network
CN111523133B (en) Block chain and cloud data collaborative sharing method
WO2018187410A1 (en) Systems and methods for data backup and authentication using blockchain
Ali et al. Blockstack: A new decentralized internet
KR102152360B1 (en) System and method for providing data reliability based on blockchain for iot services
KR20190075772A (en) AuthenticationSystem Using Block Chain Through Combination of Data after Separating Personal Information
CN106131048A (en) A kind of non-trusted remote transaction file security for block chain stores system
CN102546664A (en) User and authority management method and system for distributed file system
JP6543743B1 (en) Management program
CN109241754B (en) Cloud file repeated data deleting method based on block chain
CN202663444U (en) Cloud safety data migration model
EP3777022B1 (en) Distributed access control
CN109845183A (en) For from client device to the method for cloud storage system storing data block
US20190288833A1 (en) System and Method for Securing Private Keys Behind a Biometric Authentication Gateway
Periasamy et al. Efficient hash function–based duplication detection algorithm for data Deduplication deduction and reduction
Agarwala et al. DICE: A dual integrity convergent encryption protocol for client side secure data deduplication
KR101628195B1 (en) Double backup system using cloud service and method for data management
CN104836816B (en) A kind of mobile device data storage method
KR102349014B1 (en) Method and system for building fast synchronizable decentralized distributed database

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180523

Address after: 400000 2-2-1-61 319 Haier Road, Jiangbei District, Chongqing.

Applicant after: Chongqing steady Technology Co., Ltd.

Address before: 610041 Sichuan Chengdu high tech Zone Fucheng Avenue West Section 399 9 9 2 units 15 level 5

Applicant before: CHENGDU GUODOU DIGITAL ENTERTAINMENT CO., LTD.

TA01 Transfer of patent application right

Effective date of registration: 20180612

Address after: 310052 1201, room 12, 12 Jiangshu Road, Changhe street, Binjiang District, Hangzhou, Zhejiang.

Applicant after: Hangzhou strange coffee Network Technology Co., Ltd.

Address before: 400000 2-2-1-61 319 Haier Road, Jiangbei District, Chongqing.

Applicant before: Chongqing steady Technology Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190902

Address after: 310005 Room 1311, Building No. 1418-66, Moganshan Road, Hangzhou City, Zhejiang Province (Shangcheng Science and Technology Industrial Base)

Patentee after: Xiaohuang Machine (Hangzhou) Technology Co., Ltd.

Address before: 310052 Room 1201, 12/F, 736 Jiangshu Road, Changhe Street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou strange coffee Network Technology Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180727

Termination date: 20200604