CN103678525B - A kind of method of multiple users share identical file - Google Patents

A kind of method of multiple users share identical file Download PDF

Info

Publication number
CN103678525B
CN103678525B CN201310629397.6A CN201310629397A CN103678525B CN 103678525 B CN103678525 B CN 103678525B CN 201310629397 A CN201310629397 A CN 201310629397A CN 103678525 B CN103678525 B CN 103678525B
Authority
CN
China
Prior art keywords
request
file
counter
shared
conflict
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.)
Active
Application number
CN201310629397.6A
Other languages
Chinese (zh)
Other versions
CN103678525A (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.)
Innovation Technology Co., Ltd.
Shenzhen Innovation Software Technology Co., Ltd.
Original Assignee
Innovation And Technology Storage Technology Co Ltd
CHUANGXINKE SOFTWARE TECHNOLOGY (SHENZHEN) 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 Innovation And Technology Storage Technology Co Ltd, CHUANGXINKE SOFTWARE TECHNOLOGY (SHENZHEN) Co Ltd filed Critical Innovation And Technology Storage Technology Co Ltd
Priority to CN201310629397.6A priority Critical patent/CN103678525B/en
Publication of CN103678525A publication Critical patent/CN103678525A/en
Application granted granted Critical
Publication of CN103678525B publication Critical patent/CN103678525B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • G06F16/1767Concurrency control, e.g. optimistic or pessimistic approaches

Abstract

This application discloses a kind of implementation method of multiple users share identical file, one group of file operation counter is configured for each shared file, when there is new file operation requests, the request mode and shared model provided according to the request, and the one group of user's counter currently safeguarded, it can quickly judge whether asked file operation can cause the collision problem of file-sharing.Based on this, the management service efficiency of multiple users share identical file can be effectively improved using the present invention.

Description

A kind of method of multiple users share identical file
Technical field
The present invention relates to computer memory technical field, more particularly to a kind of client of Based on Distributed file system The management method of multiple users share identical file.
Background technology
Distributed file system includes client and service end.Client and service end are indivisible entirety, to be made With distributed file system, it is necessary to be accessed by client, substantial amounts of data content is stored by service end.
Distributed type file system client side program, can be by local electricity as the access layer in the structural model of storage system The file of brain is saved in the server on internet, can also operate the system as operation local file system.Simultaneously User can rapidly access at any time by other computers for being provided with the distributed type file system client side and acquisition belongs to this The file of user.
The problem of file-sharing problem is individual long-standing, is naturally also to keep away in distributed type file system client side Exempt from, to handle this problem well, the security of data should be ensured, ensure the high efficiency of processing mode again, in order to avoid influence The overall performance of program.
Usual user must provide two patterns when asking a file, one is request mode, the i.e. user need What operation (reading and writing, deletion and combinations thereof) is carried out to file, the second is shared model, the i.e. user allow other users to enter What operation of row.For identical file, system can preserve its request mode and shared mould for the user of all this files of request Formula, and ensure that request (shared) pattern of any user does not conflict with shared (request) pattern of other users.Collision detection The problem of being one most important, be that assuring data security is essential, and most straightforward approach is by the request of new user (shared) pattern is compared one by one with shared (request) pattern of all users before, although this method is simple, easily realize, Efficiency is very low.For NFS, this poor efficiency can cause the Consumer's Experience of extreme difference.
The content of the invention
In view of this, it is a primary object of the present invention to provide a kind of method of multiple users share identical file, this method It is that can effectively improve the management service efficiency of file-sharing.
In order to achieve the above object, technical scheme proposed by the present invention is:
A kind of implementation method of multiple users share identical file, it is characterised in that including:
Step 101, when distributed file system receive to a shared file F carry out file operation request when, according to Shared file F file described in request mode information and shared model information in the request and currently safeguard one group Operational counter, conflict inspection is carried out to the request;The file operation includes any group of reading and writing and/or deletion action Close;
Step 102, when the inspection result is the presence of conflict, sent to the corresponding user of the request and ask failure Configured information;
Step 103, when the inspection result is in the absence of conflict, set up the operation of corresponding client file for the request Object ClientFile, and request mode information and shared model information in the request, update the shared file F File operation counter;When the operation of the request is completed, the client file operation object is destroyed, is asked according to described Request mode information and shared model information in asking, update the file operation counter of the shared file F.
In summary, the implementation method of multiple users share identical file proposed by the present invention, is that each shared file is matched somebody with somebody One group of file operation counter is put, when there is new file operation requests, the request mode that is provided according to the request and shared Pattern, and the one group of user's counter currently safeguarded, can quickly judge whether asked file operation can cause text The shared collision problem of part, therefore, it can effectively improve the management service efficiency of multiple users share identical file.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the embodiment of the present invention one.
Embodiment
It is right below in conjunction with the accompanying drawings and the specific embodiments to make the object, technical solutions and advantages of the present invention clearer The present invention is described in further detail.
The present invention core concept be:Shared file is needed for each, configures and safeguards one group of user's counter, For to currently this document is read and write, deleted and do not share reading and writing, the user that deletes counts, so, when having During new file operation requests, the request mode and shared model that can be provided according to the new file operation requests, and work as One group of user's counter of preceding maintenance, quickly judges whether asked file operation can cause the conflict of file-sharing to be asked Topic, so as to improve the management service efficiency of multiple users share identical file.
Fig. 1 is the schematic flow sheet of the embodiment of the present invention one, as shown in figure 1, the embodiment mainly includes:
Step 101, when distributed file system receive to a shared file F carry out file operation request when, according to Shared file F file described in request mode information and shared model information in the request and currently safeguard one group Operational counter, conflict inspection is carried out to the request.
The file operation includes any combination of reading and writing and/or deletion action.
In this step, system is when receiving file operation requests, it is necessary to conflict inspection first be carried out, here with existing system Except that, it is necessary to one group of file operation counter is safeguarded for each shared file, for counting for the shared text The request number of times for each file operation that part has currently received and do not completed and it is current received and do not completed each file is grasped The number of times do not shared is asked, so as to based on this progress conflict inspection.So only need to asking according to current request file operation Ask one group of counter of pattern information and shared model information and shared file that conflict can be achieved to check, without considering Other have received the request mode information and shared model information of request, and therefore, implementation complexity is very low, can effectively improve file Shared management service efficiency.
Specifically, one group of file operation counter can include following counter:
For counting the current request counter that read operation is carried out for the shared file F for having received and not completed S1;
For counting the current request counter that write operation is carried out for the shared file F for having received and not completed S2;
For counting the current request counting number that deletion action is carried out for the shared file F for having received and not completed Device S3;
For counting the current request counting number for not sharing read operation for the shared file F for having received and not completed Device S4;
For counting the current request counting number for not sharing write operation for the shared file F for having received and not completed Device S5;
Based on counting the current number of request for not sharing deletion action for the shared file F for having received and not completed Number device S6.
It is preferred that carrying out conflict for the request checks that the specific conflict judgment rule of when institute's foundation is as follows:
When request mode packet when containing read operation of the request, if the counter S4 is more than 0, judge exist Conflict;
When request mode packet when containing write operation of the request, if the counter S5 is more than 0, judge exist Conflict;
When request mode packet when containing deletion action of the request, if the counter S6 is more than 0, judgement is deposited In conflict;
When the shared model information of the request does not include read operation, if the counter S1 is more than 0, judgement is deposited In conflict;
When the shared model information of the request does not include write operation, if the counter S2 is more than 0, judgement is deposited In conflict;
When the shared model information of the request does not include deletion action, if the counter S3 is more than 0, judge In the presence of conflict.
Step 102, when the inspection result is the presence of conflict, sent to the corresponding user of the request and ask failure Configured information.
Here the request of the file operation will be refused when checking conflict, to avoid grasping with accepted file before Clashed as request, it is ensured that the reliability of file-sharing.Therefore will be sent in this step to the user for sending file request please Seek the information of failure.
Step 103, when the inspection result is in the absence of conflict, set up the operation of corresponding client file for the request Object ClientFile, and request mode information and shared model information in the request, update the shared file F File operation counter;When the file operation of the request is completed, described client file operation object is destroyed, according to Request mode information and shared model information in the request, update the file operation counter of the shared file F.
In this step, when checking current request and accepted ongoing file operation is not clashed, Then receive the request, be that it sets up client file operation object, so that user is using the client file operation object Carry out file operation, specifically, user using the client file operation object progress file operation method compared with system, It will not be repeated here.
Here with existing system except that, receive request when and request file operation complete when, be required to One group of file operation counter of shared file is updated accordingly, i.e., needed when receiving request by the request The value that request mode information and shared model information distinguish corresponding counter carries out Jia one accordingly, is completed in file operation When, the value of the corresponding counter respectively of the request mode information and shared model information in the request is subtracted accordingly One, to ensure validity that this group of file operation counter of shared file is counted to file operation, and then ensure file-sharing Reliability.
In summary, presently preferred embodiments of the present invention is these are only, is not intended to limit the scope of the present invention. Within the spirit and principles of the invention, any modification, equivalent substitution and improvements made etc., should be included in the present invention's Within protection domain.

Claims (3)

1. a kind of implementation method of multiple users share identical file, it is characterised in that including:
Step 101, when distributed file system receive to a shared file F carry out file operation request when, according to described Shared file F file operation described in request mode information and shared model information in request and currently safeguard one group Counter, conflict inspection is carried out to the request;The file operation includes any combination of reading and writing and/or deletion action;Institute State file operation counter be used for count be directed to the request of each file operation that the shared file F has currently received and do not completed Number of times and the current number of times that each file operation requests are not shared for having received and not completed;
Step 102, when the inspection result is the presence of conflict, the instruction for asking failure is sent to the corresponding user of the request Information;
Step 103, when the inspection result be in the absence of conflict when, set up corresponding client file operation object for the request ClientFile, and request mode information and shared model information in the request, update the text of the shared file F Part operational counter;When the file operation of the request is completed, the client file operation object is destroyed, is asked according to described Request mode information and shared model information in asking, update the file operation counter of the shared file F.
2. according to the method described in claim 1, it is characterised in that the file operation counter includes:It is current for counting What is received and do not completed carries out the request counter S1 of read operation for the shared file F;Currently connect for counting By and do not complete for the shared file F carry out write operation request counter S2;For count it is current received and The unfinished request counter S3 that deletion action is carried out for the shared file F;Receive and not for counting current What is completed does not share the request counter S4 of read operation for the shared file F;Currently receive and not complete for counting Into for the shared file F share write operation request counter S5;Currently receive and do not completed for counting For the shared file F share deletion action request counter S6.
3. method according to claim 2, it is characterised in that the conflict of foundation when the conflict is checked is carried out in step a Judgment rule includes:
When request mode packet when containing read operation of the request, if the counter S4 is more than 0, judge there is punching It is prominent;
When request mode packet when containing write operation of the request, if the counter S5 is more than 0, judge there is punching It is prominent;
When request mode packet when containing deletion action of the request, if the counter S6 is more than 0, judge there is punching It is prominent;
When the shared model information of the request does not include read operation, if the counter S1 is more than 0, judge there is punching It is prominent;
When the shared model information of the request does not include write operation, if the counter S2 is more than 0, judge there is punching It is prominent;
When the shared model information of the request does not include deletion action, if the counter S3 is more than 0, judge exist Conflict.
CN201310629397.6A 2013-11-29 2013-11-29 A kind of method of multiple users share identical file Active CN103678525B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310629397.6A CN103678525B (en) 2013-11-29 2013-11-29 A kind of method of multiple users share identical file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310629397.6A CN103678525B (en) 2013-11-29 2013-11-29 A kind of method of multiple users share identical file

Publications (2)

Publication Number Publication Date
CN103678525A CN103678525A (en) 2014-03-26
CN103678525B true CN103678525B (en) 2017-09-22

Family

ID=50316070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310629397.6A Active CN103678525B (en) 2013-11-29 2013-11-29 A kind of method of multiple users share identical file

Country Status (1)

Country Link
CN (1) CN103678525B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519132B (en) * 2014-12-19 2019-04-12 西安理邦科学仪器有限公司 The client computer application processing method and system of distributed monitoring network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541941A (en) * 2010-12-31 2012-07-04 上海可鲁系统软件有限公司 Version management control method for multiple parties to co-operate file
CN103309871A (en) * 2012-03-09 2013-09-18 联想(北京)有限公司 File reading-writing method and electronic equipment
CN103345482A (en) * 2013-06-20 2013-10-09 上海爱数软件有限公司 Network storage system and file access conflict processing method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080077628A1 (en) * 2006-09-22 2008-03-27 International Business Machines Corporation Conflict resolution for distributed processing systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541941A (en) * 2010-12-31 2012-07-04 上海可鲁系统软件有限公司 Version management control method for multiple parties to co-operate file
CN103309871A (en) * 2012-03-09 2013-09-18 联想(北京)有限公司 File reading-writing method and electronic equipment
CN103345482A (en) * 2013-06-20 2013-10-09 上海爱数软件有限公司 Network storage system and file access conflict processing method thereof

Also Published As

Publication number Publication date
CN103678525A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
CN103731413B (en) A kind of method for handling abnormal login
US11934350B2 (en) Methods and apparatus for automatic creation and access to favorite personal cloud data
CN104145468B (en) File access authority control method and device thereof
Adya et al. Fast key-value stores: An idea whose time has come and gone
CN101588344A (en) System and method for controlling same account login in network system
CN103984536B (en) I/O request number systems and its method in a kind of cloud computing platform
CN102567478A (en) Online fault verification in a file system
CN104468818B (en) A kind of internet of things service processing system and its method
CN103678525B (en) A kind of method of multiple users share identical file
CN107463588A (en) Data submit judging method
CN109255254A (en) A kind of data base authority management method, device, equipment and storage medium
CN107203890A (en) Credential data distribution method, apparatus and system
CN108769137A (en) Distributed structure/architecture data storing and reading method and device based on multigroup framework
CN106775459A (en) A kind of safe distribution file system framework based on FT 1500A processors
CN101916396A (en) Digital home government system and method
CN103347086B (en) Collaborative kernel construction method based on Distributed Coordination algorithm
CN106484596A (en) A kind of computer safety monitoring system
CN105656942A (en) Method for user identity authentication in authentication service cloud
Chen et al. A Model Design of Blockchain-Based Data Storage for E-Government Application
CN104680307A (en) Method and device for processing item transaction
CN104184629A (en) OTA hotel system-based performance monitoring method
Berger A priori v post hoc testing
CN205945812U (en) Virtual machine information security memory system based on cloud ware
Yu Immigrant Housing in the U nited S tates
CN107346339A (en) A kind of high-performance data processing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 518057 Room 501A, 9 Buildings, Shenzhen Software Park (Phase 2), No. 1 Science and Technology Middle Road, Nanshan High-tech Zone, Shenzhen, Guangdong Province

Co-patentee after: Innovation Technology Co., Ltd.

Patentee after: Shenzhen Innovation Software Technology Co., Ltd.

Address before: 518057 Section D West, 2nd Floor, 1st # Building, Industrial Building, Great Wall Computer Building, No. 3 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province

Co-patentee before: Innovation and Technology Storage Technology Co., Ltd.

Patentee before: Chuangxinke Software Technology (Shenzhen) Co., Ltd.