CN101043525A - Method for realizing file sharing in P2P network environment - Google Patents
Method for realizing file sharing in P2P network environment Download PDFInfo
- Publication number
- CN101043525A CN101043525A CN 200710098773 CN200710098773A CN101043525A CN 101043525 A CN101043525 A CN 101043525A CN 200710098773 CN200710098773 CN 200710098773 CN 200710098773 A CN200710098773 A CN 200710098773A CN 101043525 A CN101043525 A CN 101043525A
- Authority
- CN
- China
- Prior art keywords
- file
- resource
- node
- competition
- message
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The disclosed active P2P file share method adds series active features to the passive file to make the file into active one with life feature and overcome defects in traditional system, describes user PC as the resource for file consumption and competition to provide basis and necessary for file active propagation, and prepares a set of competition and cooperation rules according with natural evolution principle to define action regulation for guiding and constraining active file. This invention improves description and construction on life cycle and action model for active file.
Description
Technical field
The present invention relates to a kind of method that in network environment, realizes resource-sharing, specifically, the present invention relates to a kind ofly, in the P2P network environment, realize the shared method of file (resource) based on thoughts such as cooperation, competitions.
Background technology
Along with the development of computer and network technologies, the storage of personal computer, computing capability and access bandwidth ability all are greatly improved, and have had the more information resource on the personal computer.How these personal computers are linked together, resource more convenient and that share on every computer effectively becomes a very challenging problem.In the end of the year 1998, after first P2P shared file system Napster truly occurred, the P2P technology became a method that receives much attention that addresses this problem.Before this, the resource-sharing pattern of main flow is a Client, and resource mainly is stored in the server, and for clients download, the client wants access server, downloaded resources from the server; Server is the center, provides service to a plurality of client computer.And in the P2P pattern, all be reciprocity between any two nodes, node be client computer also be server, resource both is provided, also consume resource.Therefore, the P2P technology more helps fully excavating and utilizing the resource that is distributed on every personal computer.
In the P2P shared file system, the node discrete distribution is different local physical network, and the P2P technology is a nerve of a covering by the network of application layer, and these nodes are coupled together.On nerve of a covering, communicate by letter between the node, realize the retrieval of information resources and obtain.According to the structure of nerve of a covering and the difference of information retrieval mode, some documents are classified the P2P shared file system, mainly contain following a few class P2P system:
Non-structured pure P2P system: P2P cascade net network is random structure or structureless netted normally, and information resources may leave on any node.The retrieval of information resources is adopted and is flooded or the walk random algorithm, and effectiveness of retrieval is lower.Exemplary systems has Gnutella, Freenet and Morpheus etc.
Center type non-structural P 2 P system: stacked network configuration of P2P and information resources deposit with non-structured pure P2P system class seemingly, have a central server simultaneously, be used for preserving the index information of all information resources, therefore have the single point failure risk.Typical example is Napster.
Structured P 2 P system: P2P cascade net ruton is normal to be adopted such as netted, ring-type, butterfly-shaped etc. topological structure, and the deposit position of file and stacked network configuration are closely related.Distributed hashtable (Distributed Hash Table, DHT) technology are adopted in the retrieval of information resources.Exemplary systems has Chord, Pastry, Tapestry and CAN etc.
Hybrid network structure P2P system: node is divided into interconnected two-layer up and down, and the upper strata is the high and metastable node of ability, is called super node (Super Peer), and lower floor is an ordinary node.Exemplary systems is KaZaA.
Semanteme P2P system: the node with similar content is connected to identical super node, connection between the node is subjected to the influence of content, therefore, have many types and will be connected to other similar node, thereby self-organizing ground forms a series of node clusters as the node of " Jazz " file.
Yet be that above-mentioned which kind of P2P system all needs the user to go to retrieve and obtain resource, and the user need know some knowledge about resources before the retrieval, for example retrieves with the cryptographic Hash of filename, keyed file.But the file on the network is a magnanimity, and the information that file comprised is very abundant, by the mode retrieving files of this strictness of filename, can't obtain the file of a lot of keys probably; By the such mode retrieving files of keyword, may obtain many garbage files.In addition, resource on the network also is changeable, today, we retrieved, may come out tomorrow with regard to having new important resource, also might have only a resource that is worth me to pay close attention to occur in 100 days, do we go retrieval still to retrieve once in 100 days everyday? therefore, how retrieving and go retrieval, carry out the resource location with great frequency, all is the problem that is difficult to find the solution.
Summary of the invention
In order to solve resource location and the difficult problem of retrieval in the P2P system, main purpose of the present invention provides a kind of novel file that can allow that is applied in the P2P network environment and comes on one's own initiative on the subscriber computer, realizes the method for resource/file-sharing.
For achieving the above object, the present invention by the following technical solutions: a kind of method that in the P2P network environment, realizes file-sharing, it may further comprise the steps:
The first step: in the P2P shared file system, structure is file initiatively, makes that the file on each node has initiative in the P2P shared file system;
Concrete method is as follows:
A, at first gives each file one group of metadata that is used to represent file attribute, comprising:
The vitality attribute: this attribute is a value type, is used for representing the initiatively life span of file;
The reproductive capacity attribute: this attribute also is a value type, and expression initiatively file can be carried out the breeding of how many times;
B, be that file assigns Agent;
Second step: personal computer is become receive the initiatively resource of file;
Concrete grammar: on the computer system that P2P software is installed, reserve a memory space, be used for receiving and storage active file;
The 3rd step: the investigation Agent of each node is monitored the consumption situation of local resource in real time, sends the message of resource anxiety or resource free time;
The 4th step: receive the idle message of idle source node when adjacent node after, give local arbitration agency and carry out idle message and handle, formulate the rules of competition, organize the active file of this intranodal to carry out competition based on this rule from resource; The relevant information of the active file that competition is won is configured to challenge message, sends to the source node of resource free time;
The 5th step: after the source node of resource free time receives challenge message from each adjacent node, formulate the rules of competition, the active file that tissue participates in resource contention from each adjacent node carries out the competition based on this rule; The local copy Agent of relevant information notice of the active file that competition is won; Send out the message of family request copy by the copy Agent of local copy Agent on active file that quilt is chosen seeds and father file thereof, descendants's file place node;
The 6th step: the active file that copy is chosen seeds;
The message of the copy Agent analysis request document copying on active file of being chosen seeds and father file thereof, the descendants's file place node; Connect with the source node of request copy,, finish the propagation of file thus to the source node copied files.
The method of the realization P2P file-sharing that the present invention proposes is by introducing a series of active characteristics for the P2P file, user's personal computer being defined as for the file consumed resources, simultaneously in conjunction with natural evolutionary rules such as competition, cooperation, the file-sharing model of a kind of aggressive mode of realization.The P2P file sharing method that the present invention proposes and traditional P2P shared file system have the difference of essence: the process of file propagation need not the too much participation of node, make the efficient of file-sharing be greatly improved, simultaneously, the customization of easier realization user personalized interest information.
Description of drawings
Fig. 1 is the graph of a relation between each key element in the P2P of the present invention system;
Fig. 2 is file collaborative network schematic diagram in the P2P of the present invention system;
Fig. 3-1, Fig. 3-2 realizes the idiographic flow schematic diagram of P2P file-sharing for the present invention;
Fig. 4 is internodal competition and cooperating process schematic diagram in the P2P of the present invention system.
Embodiment
The method of the realization P2P file-sharing that the present invention proposes is mainly used in the P2P shared file system.As shown in Figure 1, in the P2P shared file system, the personal computer that each user had all is a node (Peer) in the P2P system, all stores a plurality of files on each node.Exist the relation of competition, cooperation, constraint and restriction between the different files on the different nodes.Wi among the figure, Wj, Wk, Wl represent to exist between the file on the connected node relation of cooperation, be to have such file on these nodes, it between them the relation of duplicating and being replicated, in other words, has identical file exactly, can cooperate mutually between these files, the present invention transfers to node with the relation between this file and manages.
Fig. 2 is file collaborative network schematic diagram in the P2P of the present invention system, cooperation relation among main explanation the present invention between the file, dotted line is represented the initiatively cooperation relation between the file among the figure, simultaneously as can be seen, cooperation relation is present among the same population, the set of the definition of file population a series of descendants's files that to be file derive out by copy propagation.In addition, exist between the node at file place of cooperation relation also opening relationships shown in the Wi among the figure, Wj, Wk, Wl.
The file build of the present invention by will store on each node become file initiatively, personal computer is become receive file initiatively resource, formulate the rules of competition, formulate the cooperation rule, formulate step such as other constraint rule and control and realize sharing of file, change the pattern of file-sharing, more effectively realize sharing of file in the P2P shared file system.Describe the method that the present invention realizes the P2P file-sharing in detail below in conjunction with accompanying drawing 3-1, Fig. 3-2:
The first step: in the P2P shared file system, structure is file initiatively, makes that the file on each node has energy, vitality, initiative in the P2P system.
So-called is to show that these files are different with common file initiatively, and they have energy, life is arranged and target is arranged.Each file all as natural animal, moves freely, makes great efforts existence and produces offspring.Here so-called procreation is exactly a constantly copy oneself of file.
In the P2P shared file system, each file in fact all is data, is passive, can not have characteristic initiatively as participating in the competition and cooperate, resolve personalized customization information etc., therefore the initiative of file is not that nature possesses in the P2P system, can only give artificially.The present invention becomes the file build in the P2P system initiatively file by the following method, makes file have initiative, and concrete method is as follows:
1, at first, give each file one group of metadata that is used to represent file attribute, comprising:
The vitality attribute: this attribute is a value type, is used for representing the initiatively life span of file;
The reproductive capacity attribute: this attribute also is a value type, and expression initiatively file can be carried out the breeding of how many times;
These attribute definitions make the P2P file be described as being the individuality of the active with vital signs, are to realize the initiatively basis of characteristic of file.
2, secondly, assign Agent for file.Appointment is the meaning of " determining " at this, promptly at the different attribute of file, determines that different Agents comes it is managed.
Even the P2P file has possessed certain vital signs attribute, become initiatively file, but, still can't realize initiatively characteristic because it does not have the behavior of self.Therefore, as shown in Figure 4, the present invention has assigned a series of Agent for file on each node, as investigate Agent, arbitration Agent, copy Agent, life Agent etc., the metadata of their instruments of interpretation, biological phenomenas such as simulation competition, breeding, thus give data file virtual life.The for example breeding of file is by the intercommunication mutually between two node-agent programs, carries out that the copy of file finishes, and Agent runs on the system backstage, is sightless to the user, thereby has simulated the reproductive behavior of file.
The present invention has been various agent definitions processing logic separately is respectively:
The investigation agency: the local disk of monitoring changes, and when finding to change, notifies other agencies.Two kinds of concrete branches, the one, the disk anxiety will be notified local arbitration agency this moment; The 2nd, the disk free time, to notify other arbitrations agency this moment.
The life agency: management is the life cycle of file initiatively, the vitality of revised file, and the dead file of deletion.
Arbitration agency: when competition takes place the active file, pass judgment on.When receiving the message of local disk anxiety, the file that selection is lacked competitiveness, deletion this document; When receiving the message of other node disk free time, select local competitive file, send the arbitration agency of challenge message to the other side; When receiving the challenge message that other nodes send, select wherein competitive file, then act on behalf of copied files to local node by copy.
The copy agency: copy initiatively file arrives other node; Reception is from the data of other nodes.
Each Agent is generated by system's engine in system start-up, and system's engine generates an execution thread respectively for each Agent logic, carries out different programmed logics, the active file is managed, i.e. the Agent of our definition.
Agent is transparent by the P2P system creation to the upper-layer user.Therefore from user's angle, only seen the existence of file in the system, experienced the variation of file, file is that file vital signs, active is arranged seemingly.
Second step: personal computer is become receive the initiatively resource of file.
In the method for the realization P2P file-sharing that the present invention proposes, file has had initiatively characteristic, the competition and the cooperation relation that have similar nature evolution thought between file, therefore need be for its resource needed of active document definition (promptly being used for receiving and storage active file storing space), as the object of competition and cooperation.Obviously, in the P2P shared file system, such resource is exactly a user's personal computer.The present invention does following definition to resource: the department of computer science that P2P software will be installed is referred to as node (Peer); Each node all provides a memory space, is used for receiving and storage active file, is called node space (PeerSpace); Node space is exactly the resource that the active file is at war with and cooperates.Node space can be divided into according to operating position has used space and free space.Node space is provided with nervous threshold value of resource and the idle threshold value of resource.When surpassing resource anxiety threshold value with the space, represent the resource anxiety; When not arriving the idle threshold value of resource with the space, the expression resource has the free time.
The 3rd step: the investigation Agent of each node is monitored the consumption situation of local resource in real time, sends the message of resource anxiety or resource free time.
Concrete method is:
1, the investigation Agent of each node has constantly been used the relation of the nervous threshold values of space and resource, the idle threshold values of resource more;
2, when surpassing resource anxiety threshold value with the space, expression resource anxiety, the investigation Agent of monitoring resource consumption situation is just constructed the nervous message of resource, and the arbitration Agent of notice this locality sends the nervous message of resource; The arbitration Agent is formulated competitive strategy, and competitive strategy refers to arbitrate the agency in order to carry out the initiatively rule of file competition, determines that promptly what file should be eliminated, and what file should be preserved; The formulation of competitive strategy should be according to demand or the hobby of user in the current system, be to exist the file of which type more in the system, which type is less, and a fairly large number of type of defined file is the user's interest file type, otherwise be the uninterested type of user, should preferentially eliminate.Competitive strategy also needs in conjunction with current resource status simultaneously, make idling-resource quantity remain on certain level etc. as needs, the more important thing is, will be at war with in conjunction with the property of value of the file formulation of strategy, so competitive strategy is comprehensive current system and user's operating position and the rule that packs into the competition of style of writing part formulating out; Organize the active file that exists on the local resource to be at war with by the arbitration Agent, and will compete the active file of failing and delete, the successful file of competition is continued to be kept at this locality from this locality.Realize that thus will be worth higher file preserves,, reach the reasonable resources utilization being worth lower file deletion.
So-called competition is meant the contest that takes place for " resource " (disk storage space on the computer) between the different active files.It is in order better to survive and to produce offspring that file participates in the competition, and therefore competition usually occurs in initiatively that file is striven for resource or when producing offspring, the victor obtains resource (disk space on another machine), copy oneself, and generation is backed up; The competition the loser or lose the chance of duplicating, perhaps be eliminated.
Because initiatively the initiative of file is to realize that by the Agent on backstage therefore actual competitive behavior also is to be carried out by Agent.When the resource anxiety appears in intranodal, need to eliminate the file of a weak tendency, two or more files of intranodal just need competition so, and consequently Qiang Shi file survives, and the file of weak tendency is eliminated.
The present invention realizes the competition of this class by following method: use the standard of the property of value of file as competition, carry out ruling by the Agent of intranodal, choose the file that the value degree is minimum on the present node and eliminate.It seems that from the outside result of Tao Taiing is the result that all the active files on the node are vied each other and caused like this.
3, when not arriving the idle threshold value of resource with the space, the expression resource has the free time, the investigation Agent structure resource idle message of monitoring resource consumption situation is sent resource idle message (as shown in Figure 4) to the arbitration Agent of adjacent node, notice adjacent node this locality has can be for the idling-resource of file consumption initiatively, other node participation resource contention of can presenting a paper; Then, wait is from the challenge message of each adjacent node.Wherein, the information of the required file of this node such as file name, classification, size etc. in the resource idle message of being sent, have been comprised.Initiated of the competition of the active file of a new round thus to resource.
Need to prove, generally, the present invention defines the idle threshold value of resource more than or equal to the nervous threshold value of resource, purpose is not exist both to take it easy with the space, also not idle situation, and allow the space nervous and idle have certain overlapping, be used to realize buffering to communal space visit, promptly in overlapping interval, can carry out resource anxiety and the processing of resource free time simultaneously, the unexpected transformation of alleviating from the idle condition to the tense situation impacts system.For example, system is current when carrying out the duplicating of certain file, space resources enters tense situation by idle condition, carry out the competition that file is eliminated immediately, if choose should be deleted be the file that is duplicating, just can cause the interruption of file procreation, not meet thought of the present invention.
The 4th step: receive the idle message of the idle source node from resource when adjacent node after, give local arbitration agency and carry out idle message and handle, shown in Fig. 3-2, process is as follows:
1, analyzes the resource idle message, obtain the information of the required file of message source node, as file type, file name, size etc.;
2, according to the information of the required file of message source node, (formulation of competitive strategy also needs comprehensive many-sided information to formulate competitive strategy, for example, should comprise information such as the needed file type of source node, size, value scope, creation-time scope, make the standard that a file of selecting this intranodal file participates in the competition, come the active file of this intranodal is selected with this), organize the active file of this intranodal to carry out competition based on this rule;
The relevant information of the active file of 3, competition being won is configured to challenge message, sends to the source node of resource free time, participates in the competition of idling-resource; Request message to be copied such as local node; File to the competition failure is ignored.
The 5th step: after the source node of resource free time receives challenge message from each adjacent node, give local arbitration Agent and carry out Message Processing, with reference to figure 3-1, Fig. 4, process is as follows again:
1, analyzes each challenge message, obtain the information that participates in a plurality of active files of resource contention from each adjacent node;
2, according to the information of the required file of this node, formulate the rules of competition, the active file that tissue participates in resource contention from each adjacent node carries out the competition based on this rule;
When two or more files all met the condition of breeding, these competition initiatively occurred between the file, and the active file that consequently vitality and importance are powerful obtains idling-resource, has the right of breeding.The present invention realizes this class competition by following method: use the standard of the property of value of file as competition, carry out ruling by the arbitration Agent on the node of idling-resource place, choose in the current file that participates in the competition the highest file of value degree and breed.It seems that from the outside Fan Zhi result is the result that the active file of all these idling-resources that participate in the competition is vied each other and caused like this.
3, the local copy Agent of relevant information notice of local arbitration Agent active file that competition is won; The file of competition failure is ignored.
The 6th step: the active file that copy is chosen seeds.
The process of copied files is finished jointly by the copy Agent on the copy Agent on the idle source node of resource and the active file of being chosen seeds and father file thereof, the descendants's file place node, and process is as follows:
1, after source node copy Agent receives the document copying message of sending from this locality arbitration Agent, analyze the active file-related information that this message is obtained needs copy, comprise information such as file name, size, file place node and father file thereof and descendants's file place node;
2, the copy Agent of source node copy Agent on active file place node and father file thereof, descendants's file place node sends the document copying request message, connects with each node;
3, again with reference to figure 4-2, initiatively the copy Agent of file place node and father file thereof, descendants's file place node is handled the document copying request message, Study document copy request message, therefrom obtain the fileinfo that needs copy, connect with the source node of request copy, to the source node copied files, finish the propagation of file thus simultaneously.
When by the copy Agent of the active file place node of being chosen seeds to the idle source node copy of resource initiatively during file, initiatively the copy Agent of the father file of file, descendants's file place node is simultaneously to the source node copied files, and the copy of file is finished in cooperation between them.
In the process that realizes the P2P file-sharing, the present invention has introduced coordination mechanism in the P2P system.Each active file all needs to safeguard information, the especially address information of some other active files.This information is called cooperative information.The most basic situation is that each active file all needs to preserve some information about its ancestors' file, preserves the information of some child's files simultaneously.Any two initiatively " limit " expressions of this cooperative information between the file, can there be weights on the limit.All these files and limit thereof have just constituted a network, are called file collaborative network (as shown in Figure 2).Utilize collaborative network, initiatively file can be found the resource in the adjacent node, and finishes duplicating and migrating of file.The cooperation behavior usually occurs in following three situations:
1, within same population.When one initiatively the file quilt is to other nodes copies, for taking the good opportunity or in order to guarantee that self-replication can complete successfully, this active file place node can be united a plurality of active files that belong to same population and be duplicated same file to a node together.The present invention realizes the cooperation of this class by following method: the initiatively certain ancestors' file of file maintenance and the information of child's file, by the Agent of the intranodal at these file places concurrently to destination node xcopy data.It seems that from the outside result who duplicates like this is the result that the file of active in the same manner on a plurality of nodes is bred toward destination node mutually collaboratively.
2, cooperation also occurs between the active file within the same node.Whether when the active file is found in the adjacent node idle space to be arranged, at first checking has the file identical with self,, then participate in the competition if do not have, breed on this node; If had identical file on this node, notified the vital document on this node so.Here said " vital document " is often referred to the higher file of value on the node, the file that perhaps relatively meets the required file type of adjacent node, these files have very big may winning usually in the file competition of adjacent node tissue, the chance that acquisition is duplicated, preferentially select " vital document " to carry out when therefore, the intranodal file is cooperated.Notified " vital document " afterwards, sent challenge message by vital document to adjacent node, participated in the file competition on the adjacent node, past this node of competition duplicates the right of self, i.e. Fan Yan right.By this cooperation, each active file all has an opportunity to expand to new node.The present invention realizes this class cooperation by following method: the standard that the property of value of use file is chosen as collaboration object, Agent by file place intranodal is selected, choose the competition of the file participation idling-resource that the value degree is the highest on the present node, breed, the rest may be inferred.It seems that from the outside Fan Zhi result is the result that all the active files on certain node are bred toward destination node mutually collaboratively like this.
3, cooperation also occurs between the active file of two intranodals.When the active file is found to have idle space on this node, the active file on the notice adjacent node.The present invention realizes this class cooperation by following method: the standard that the property of value of use file is chosen as collaboration object, select by the Agent in the adjacent node, the Agent that the intranodal of idling-resource at first occurs sends to certain adjacent node with idle information, Agent on the adjacent node is chosen the competition of the file participation idling-resource that the value degree is the highest on this node, breeds.It seems that from the outside Fan Zhi result is active file and the mutual result who breeds toward this node collaboratively of the active file on the adjacent node on certain node like this.
In the process of finishing the P2P file-sharing, initiatively competition and cooperation mutually between the file, the victor of competition can breed oneself, the memory space that occupies more users, the loser of competition has higher probability to be eliminated, thereby the memory space that makes each user is usually by more valuable document is shared, and more the file of high value also has higher probability to come individual's memory space.In order the P2P shared file system to be become meet the system of nature evolution rule, for this reason, the present invention has formulated a series of constraints, and is mainly as follows:
1, limited file attribute span.For each file, its vitality is limited.When the vitality value was less than or equal to 0, Agent was not carried out; Vitality value Agent greater than 0 time is carried out, control documents moving and procreation between node.The vitality value was successively decreased along with the time, and the expression file is weak; File can make file be continued by the mode that produces offspring; For each file, its reproductive capacity is limited.That is to say that each file can only carry out the copy of limited number of times.After arriving maximum copy number of times, this document has just no longer participated in the competition.Make the node excessive multiplication file that to avoid having the prolificacy file like this, take the excess resource of node; For each file, its value is limited.File is in breeding, and the value of its child's file can change, especially decay.Have only the user of child's file to reappraise after this document, the value of this child's file just may promote or descend.So just make the evaluation of initial user can directly not feed through to whole network;
2, contingency.Value and the high file of matching degree may not be stood to gain to such an extent that compete, and it is just won with high relatively probability.On the contrary, be worth and the competition of also having an opportunity to win of the low file of matching degree, just the probability of its triumph is low relatively.So just make each file all have an opportunity to raise up seed, meet natural situation more;
3, type matching.Each node space should divide subclass, is used to distinguish the type or the purposes of resource, and each subclass receives only the file that is consistent.Optimal situation is that whole network is set up a unified taxonomic hierarchies, and each subclass is used to receive the file of respective type, and file can only be transferred to the node of type matching when copy and propagation.In fact because Internet resources and user's diversity, be difficult to formulate the taxonomic hierarchies of a standard, this taxonomic hierarchies is contained all resources, is approved by most of people and uses simple, convenient.Therefore, if there is resource classification, classification also is various or customizable so, is used to satisfy the preference or the custom of individual subscriber.
The method of realization P2P provided by the invention file-sharing is being compared aspect the design realization of file-sharing with other P2P product, and file sharing method provided by the invention has following characteristics:
1, introduced the initiatively notion of file.In traditional P2P shared file system, file distribution is carried out the request and the copy function of file by the node at its place on each node of system, thereby realizes sharing of file.The file sharing method that the present invention proposes has then been introduced the initiatively notion of file, give file some characteristics initiatively, as obtaining between the own right of the copy of the free space on the node, file by cooperation acquisition more free spatial information by competition between the free space on the node in the initiatively discovery system of file, the file etc.By giving file characteristic initiatively, this method becomes initiatively file with the passive file conversion of file from conventional P 2P system, the file-sharing mode no longer is that file is passively by node request and copy, but find to have the node of free space on one's own initiative, and by the competition between file with cooperate and will oneself copy on the space of node.In whole process, node no longer needs to participate in continually retrieval, request and the copy of file, thereby node can be freed from shared file system largely, simultaneously, can avoid a resource location that faces in the conventional P 2P shared file system and a difficult problem of retrieving, more effectively realize file-sharing.
2, combine with competition, thought such as cooperate.Competition occurs in when node resource is nervous idling-resource to occur with other node, is used to determine the right of initiatively file existence and copy.Cooperation occurs between two or more active files, is used for sharing node idling-resource information, carries out efficiently document copying etc.Competition has constituted the primitive rule of file-sharing in this method with cooperating, because constantly competition and cooperation, competitive file is survived in the P2P system, and the file of lacking competitiveness can be eliminated gradually, thereby the average quality of P2P system file can be promoted.
3, there is not the bottleneck formula constraint of resource location and retrieval.In traditional P2P shared file system, when certain node need obtain resource, must retrieve and locate this resource earlier, and because the distributivity of P2P system network architecture, the index information of resource can't carry out unified storage and effectively retrieval, therefore in traditional P2P shared file system, resource location and retrieval are bigger performance bottlenecks.The file sharing method that the present invention proposes is mainly realized sharing of file by the behavior of active file, and the constraint with coordination mechanism is competed in the behavior of active file.Based on competition and coordination mechanism, initiatively set up a file collaborative network between the file, initiatively file is realized propagating and duplicating by the file collaborative network, and final the realization shared.Under this pattern, node only need be according to the certain scope of demand customization of self, and the active file that meets this scope just can copy on the communal space of node automatically and apace, has avoided the difficult problem of resource location and retrieval effectively.
Easier realization user's personalized interest customization.In traditional P2P shared file system, the propagation of file is passive, therefore can't realize user's personalized customization.And in the file sharing method that the present invention proposes, the propagation of file is initiatively, and initiatively file has the ability user's personalized customization information is resolved and carried out corresponding behavior according to analysis result.Therefore, in case the standard that has customized the personalized issue of a cover and resolved, the file sharing method that the present invention proposes just can be set up property interest customizing mechanism one by one on its basis.On the other hand, the foundation of personalized customization mechanism has simultaneously also limited the random propagation of file, has reduced network traffics, has improved the effective rate of utilization in nodes sharing space, has improved practicality of the present invention effectively.
Claims (6)
1, a kind of method that in the P2P network environment, realizes file-sharing, it may further comprise the steps:
The first step: in the P2P shared file system, structure is file initiatively, makes that the file on each node has initiative in the P2P shared file system;
Concrete method is as follows:
A, at first gives each file one group of metadata that is used to represent file attribute, comprising:
The vitality attribute: this attribute is a value type, is used for representing the initiatively life span of file;
The reproductive capacity attribute: this attribute also is a value type, and expression initiatively file can be carried out the breeding of how many times;
B, be that file assigns Agent;
Second step: personal computer is become receive the initiatively resource of file;
Concrete grammar: on the computer system that P2P software is installed, reserve a memory space, be used for receiving and storage active file;
The 3rd step: the investigation Agent of each node is monitored the consumption situation of local resource in real time, sends the message of resource anxiety or resource free time;
The 4th step: receive the idle message of idle source node when adjacent node after, give local arbitration agency and carry out idle message and handle, formulate the rules of competition, organize the active file of this intranodal to carry out competition based on this rule from resource; The relevant information of the active file that competition is won is configured to challenge message, sends to the source node of resource free time;
The 5th step: after the source node of resource free time receives challenge message from each adjacent node, formulate the rules of competition, the active file that tissue participates in resource contention from each adjacent node carries out the competition based on this rule; The local copy Agent of relevant information notice of the active file that competition is won; Send out the message of family request copy by the copy Agent of local copy Agent on active file that quilt is chosen seeds and father file thereof, descendants's file place node;
The 6th step: the active file that copy is chosen seeds;
The message of the copy Agent analysis request document copying on active file of being chosen seeds and father file thereof, the descendants's file place node; Connect with the source node of request copy,, finish the propagation of file thus to the source node copied files.
2, the method for realization file-sharing according to claim 1 is characterized in that: the memory space in described second step is called node space again, and this node space is the resource that the active file is at war with and cooperates;
Each node space is provided with nervous threshold value of resource and the idle threshold value of resource; When surpassing resource anxiety threshold value with the space, represent the resource anxiety; When not arriving the idle threshold value of resource with the space, the expression resource has the free time.
3, the method for realization file-sharing according to claim 1 is characterized in that: described the 3rd step: the investigation Agent of each node is monitored the consumption situation of local resource in real time, and the concrete method of sending resource anxiety or the message of resource free time is:
The investigation Agent of A, each node has constantly been used the relation of the nervous threshold values of space and resource, the idle threshold values of resource more;
B, when surpassing the nervous threshold value of resource with the space, expression resource anxiety, the investigation Agent of monitoring resource consumption situation is just constructed the nervous message of resource, the local arbitration Agent of notice sends the nervous message of resource; The arbitration Agent is formulated competitive strategy; Organize the active file that exists on the local resource to be at war with by the arbitration Agent, and will compete the active file of failing and delete, the successful file of competition is continued to be kept at this locality from this locality;
Concrete competing method is: use the standard of the property of value of file as competition, carry out ruling by the Agent of intranodal, choose the file that the value degree is minimum on the present node and eliminate;
C, when not arriving the idle threshold value of resource with the space, the expression resource has the free time, the investigation Agent structure resource idle message of monitoring resource consumption situation is sent the resource idle message to the arbitration Agent of adjacent node, notice adjacent node this locality has can be for the idling-resource of file consumption initiatively, other node participation resource contention of can presenting a paper; Then, wait is from the challenge message of each adjacent node; The information of the required file of this node such as file name, classification, size etc. in the resource idle message of being sent, have been comprised.
4, the method for realization file-sharing according to claim 1 is characterized in that: described the 4th step: receive the idle message of the idle source node from resource when adjacent node after, give local arbitration agency and carry out idle message and handle, process is as follows:
A, analyze the resource idle message, obtain the information of the required file of message source node, as file type, file name, size etc.;
B, according to the information of the required file of message source node, formulate the rules of competition, organize the active file of this intranodal to carry out competition based on this rule;
Concrete competing method is: use the standard of the property of value of file as competition, carry out ruling by the Agent of intranodal, choose the file that the value degree is minimum on the present node and eliminate;
The relevant information of C, active file that competition is won is configured to challenge message, sends to the source node of resource free time, participates in the competition of idling-resource; Request message to be copied such as local node; File to the competition failure is ignored.
5, the method for realization file-sharing according to claim 1 is characterized in that: described the 5th step: after the source node of resource free time receives challenge message from each adjacent node, give local arbitration Agent and carry out Message Processing, process is as follows:
A, analyze each challenge message, obtain the information that participates in a plurality of active files of resource contention from each adjacent node;
B, according to the information of the required file of this node, formulate the rules of competition, the active file that tissue participates in resource contention from each adjacent node carries out the competition based on this rule;
That is: use the standard of the property of value of file, carry out ruling, choose in the current file that participates in the competition the highest file of value degree and breed by the arbitration Agent on the node of idling-resource place as competition;
C, local arbitration Agent are notified local copy Agent with the relevant information of the active file that competition is won; The file of competition failure is ignored.
6, the method for realization file-sharing according to claim 1 is characterized in that: described the 6th step: the process of the active file that copy is chosen seeds is as follows:
After A, source node copy Agent receive the document copying message of sending from this locality arbitration Agent, analyze the active file-related information that this message is obtained needs copy, comprise information such as file name, size, file place node and father file thereof and descendants's file place node;
The copy Agent of B, source node copy Agent on active file place node and father file thereof, descendants's file place node sends the document copying request message, connects with each node;
The copy Agent of C, active file place node and father file thereof, descendants's file place node is handled the document copying request message, Study document copy request message, therefrom obtain the fileinfo that needs copy, connect with the source node of request copy, to the source node copied files, finish the propagation of file thus simultaneously.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100987738A CN101043525B (en) | 2007-04-26 | 2007-04-26 | Method for realizing file sharing in P2P network environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100987738A CN101043525B (en) | 2007-04-26 | 2007-04-26 | Method for realizing file sharing in P2P network environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101043525A true CN101043525A (en) | 2007-09-26 |
CN101043525B CN101043525B (en) | 2010-08-11 |
Family
ID=38808710
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007100987738A Expired - Fee Related CN101043525B (en) | 2007-04-26 | 2007-04-26 | Method for realizing file sharing in P2P network environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101043525B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009092213A1 (en) * | 2008-01-23 | 2009-07-30 | Huawei Technologies Co., Ltd. | Method and device for predicting the residual online lifetime of peer in peer-to-peer network |
CN101848274A (en) * | 2010-03-12 | 2010-09-29 | 深圳市同洲电子股份有限公司 | Methods and devices for backup and recovery of records in mobile terminal |
CN101459550B (en) * | 2007-12-11 | 2011-06-01 | 华为技术有限公司 | Prediction method, prediction apparatus and server for Peer node lifecycle |
CN101494582B (en) * | 2008-01-21 | 2011-12-28 | 华为技术有限公司 | Method and device for forecasting continuance on-line time of peer-to-peer body of peer-to-peer network |
CN101667191B (en) * | 2009-09-04 | 2012-09-05 | 北京邮电大学 | Information sharing method based on P2P |
CN103414788A (en) * | 2013-08-28 | 2013-11-27 | 国家电网公司 | System and method for processing power distribution network data based on level peer-to-peer network |
CN112532301A (en) * | 2020-11-26 | 2021-03-19 | 中国人民解放军61081部队 | Beidou user terminal rapid network resource discovery and dynamic information interaction system |
CN117812069A (en) * | 2024-03-01 | 2024-04-02 | 天津英信科技有限公司 | Information sharing method and system based on multi-source data |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7096024B2 (en) * | 2003-01-31 | 2006-08-22 | Qualcomm, Incorporated | Method and apparatus to initiate point-to-point call during shared-channel delivery of broadcast content in a wireless telephone network |
KR100468325B1 (en) * | 2003-03-28 | 2005-01-27 | 주식회사 프리챌 | P2p service method |
JP4490743B2 (en) * | 2004-06-24 | 2010-06-30 | 株式会社日立製作所 | File sharing system, file sharing management server and client device |
US8316088B2 (en) * | 2004-07-06 | 2012-11-20 | Nokia Corporation | Peer-to-peer engine for object sharing in communication devices |
US8122240B2 (en) * | 2005-10-13 | 2012-02-21 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and apparatus for establishing a security association |
-
2007
- 2007-04-26 CN CN2007100987738A patent/CN101043525B/en not_active Expired - Fee Related
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101459550B (en) * | 2007-12-11 | 2011-06-01 | 华为技术有限公司 | Prediction method, prediction apparatus and server for Peer node lifecycle |
CN101494582B (en) * | 2008-01-21 | 2011-12-28 | 华为技术有限公司 | Method and device for forecasting continuance on-line time of peer-to-peer body of peer-to-peer network |
WO2009092213A1 (en) * | 2008-01-23 | 2009-07-30 | Huawei Technologies Co., Ltd. | Method and device for predicting the residual online lifetime of peer in peer-to-peer network |
CN101494566B (en) * | 2008-01-23 | 2011-09-14 | 华为技术有限公司 | Method and device for forecasting continuance on-line time of peer-to-peer body of peer-to-peer network |
US8280705B2 (en) | 2008-01-23 | 2012-10-02 | Huawei Technologies Co., Ltd. | Method and device for predicting residual online time of peer in peer-to-peer network |
CN101667191B (en) * | 2009-09-04 | 2012-09-05 | 北京邮电大学 | Information sharing method based on P2P |
CN101848274A (en) * | 2010-03-12 | 2010-09-29 | 深圳市同洲电子股份有限公司 | Methods and devices for backup and recovery of records in mobile terminal |
CN103414788A (en) * | 2013-08-28 | 2013-11-27 | 国家电网公司 | System and method for processing power distribution network data based on level peer-to-peer network |
CN103414788B (en) * | 2013-08-28 | 2016-03-09 | 国家电网公司 | A kind of power distribution network data handling system based on level peer-to-peer network and method |
CN112532301A (en) * | 2020-11-26 | 2021-03-19 | 中国人民解放军61081部队 | Beidou user terminal rapid network resource discovery and dynamic information interaction system |
CN117812069A (en) * | 2024-03-01 | 2024-04-02 | 天津英信科技有限公司 | Information sharing method and system based on multi-source data |
CN117812069B (en) * | 2024-03-01 | 2024-05-17 | 天津英信科技有限公司 | Information sharing method and system based on multi-source data |
Also Published As
Publication number | Publication date |
---|---|
CN101043525B (en) | 2010-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101043525A (en) | Method for realizing file sharing in P2P network environment | |
Kéfi et al. | How structured is the entangled bank? The surprisingly simple organization of multiplex ecological networks leads to increased persistence and resilience | |
Thompson et al. | Food webs: reconciling the structure and function of biodiversity | |
CN104969213B (en) | Data flow for low latency data access is split | |
Iamnitchi et al. | The small world of file sharing | |
Liu et al. | Survey on graph neural network acceleration: An algorithmic perspective | |
Puga-Gonzalez et al. | Social style and resilience of macaques’ networks, a theoretical investigation | |
Lai et al. | A scalable multi-attribute hybrid overlay for range queries on the cloud | |
Arbelaez et al. | Massively parallel local search for SAT | |
Chifu et al. | Selecting the optimal web service composition based on a multi-criteria bee-inspired method | |
Li et al. | An evolutionary framework for multi-agent organizations | |
Guo et al. | Coexisting invasive gobies reveal no evidence for temporal and trophic niche differentiation in the sublittoral habitat of Lake Erhai, China | |
Saha et al. | Role of predation efficiency in prey–predator dynamics incorporating switching effect | |
Ben-Zion et al. | Migration, coherence and persistence in a fragmented landscape | |
Eftychiou et al. | A dynamically semantic platform for efficient information retrieval in P2P networks | |
Nonaka et al. | A modified niche model for generating food webs with stage‐structured consumers: The stabilizing effects of life‐history stages on complex food webs | |
CN113138838A (en) | Virtual machine placement method based on artificial bee colony algorithm | |
Fang et al. | DI_GA: A heuristic mapping algorithm for heterogeneous network-on-chip | |
Camorlinga et al. | Multiagent systems for resource allocation in peer-to-peer systems | |
Collet et al. | Intense competition can drive selfish explorers to optimize coverage | |
Luo et al. | Superset: a non-uniform replica placement strategy towards high-performance and cost-effective distributed storage service | |
Wang et al. | Spark load balancing strategy optimization based on internet of things | |
Zhang et al. | SMOSA: Spider monkey optimization‐based scheduling algorithm for heterogeneous Hadoop | |
Folino et al. | Bio-inspired algorithms for distributed systems | |
Shen et al. | Adaptive resource schedule method in cloud computing system based on improved artificial fish swarm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100811 Termination date: 20130426 |