CN103491153A - Method, equipment and peer-to-peer network system for data sharing - Google Patents

Method, equipment and peer-to-peer network system for data sharing Download PDF

Info

Publication number
CN103491153A
CN103491153A CN201310425111.2A CN201310425111A CN103491153A CN 103491153 A CN103491153 A CN 103491153A CN 201310425111 A CN201310425111 A CN 201310425111A CN 103491153 A CN103491153 A CN 103491153A
Authority
CN
China
Prior art keywords
equipment
peer
file
blocks
shared file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310425111.2A
Other languages
Chinese (zh)
Inventor
汪心旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TVMining Beijing Media Technology Co Ltd
Original Assignee
TVMining Beijing Media 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 TVMining Beijing Media Technology Co Ltd filed Critical TVMining Beijing Media Technology Co Ltd
Priority to CN201310425111.2A priority Critical patent/CN103491153A/en
Publication of CN103491153A publication Critical patent/CN103491153A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method, equipment and peer-to-peer network system for data sharing. The method, equipment and peer-to-peer network system for the data sharing are used for improving the speed of the data sharing. The method for the data sharing comprises the steps that a shared file is packaged into broadcasting announcement messages through the first equipment in a peer-to-peer network, and the announcement messages of sending the newly-added shared file are broadcasted in the peer-to-peer network; the first equipment receives the sharing requests sent by at least one of the second equipment in the peer-to-peer network, the broadcasting announcement messages are sent to the corresponding second equipment respectively, and all the second equipment is made to analyze the broadcasting announcement messages to obtain the shared file. According to the scheme, the speed of the data sharing is improved.

Description

A kind of method of data sharing, equipment and peer-to-peer network system
Technical field
The present invention relates to Internet technical field, particularly a kind of method of data sharing, equipment and peer-to-peer network system.
Background technology
Development along with the information age, information interchange between different departments, different regions progressively increases, like this, a large amount of spatial datas appear on network, and data sharing is exactly to allow can read the data on miscellaneous equipment and carry out various operations, computing or analysis at different local equipment.Realize data sharing, can use more fully the data with existing resource, reduce the duplication of labour and the corresponding expenses such as Data acquisition,, data acquisition.
At present, can adopt file transfer protocol (FTP) (File Transfer Protocol, FTP) to make equipment room can share data.FTP is the agreement of two subscriber equipment transmission files on network, belongs to the application layer of network protocol suite.Particularly, FTP is used transmission control protocol (Transmission Control Protocol, TCP) generating a virtual link transmits for control information, and then generate an independent TCP connection for transfer of data, like this, ftp client can give an order download file to server, upload file, create or change the catalogue on server, thereby having realized data sharing.
While due to employing FTP, realizing data sharing, generally understand the shared Thread Count of restricting data, or, need username and password to be verified, like this, while adopting FTP to carry out data sharing, speed is not very high, and proof procedure is also relatively complicated.
Summary of the invention
The invention provides a kind of method, equipment and peer-to-peer network system of data sharing, in order to improve the speed of data sharing.
The invention provides a kind of method of data sharing, comprising:
The first equipment in peer-to-peer network is packaged into broadcast announcement message by shared file, and in described peer-to-peer network the notification message of the newly-increased shared file of broadcast transmission;
Described the first equipment receives the sharing request that in described peer-to-peer network, at least one second equipment sends, and described broadcast announcement message is sent to respectively to the second corresponding equipment, make each second equipment resolve and obtain described shared file described broadcast announcement message.
Visible, in peer-to-peer network, can directly realize data sharing between arbitrary equipment, on equipment does not need shared file is uploaded onto the server, then another equipment is downloaded shared file again from server, like this, does not need to carry out the transfer of data, the thread of uploading or downloading on also not needing to limit, improved data sharing and obtained speed.
In the embodiment of the present invention, described the first equipment in peer-to-peer network also comprises before shared file is packaged into to broadcast announcement message:
After described the first equipment is set up WLAN (wireless local area network) by wireless terminal, open one for sending the first port of data, and one for receiving the second port of data, and receive the message of registering that enters described WLAN (wireless local area network) of other equipment broadcast transmission in described WLAN (wireless local area network) by described the second port; Or,
After described the first equipment searches the WLAN (wireless local area network) that other equipment set up and connects, open one for sending the first port of data, and one for receiving the second port of data, and enter the message of registering of described WLAN (wireless local area network) by described the first port broadcast transmission in described WLAN (wireless local area network).
In peer-to-peer network, each equipment has been opened one for FPDP occurs, and one can directly be carried out the transfer of data of full duplex for receiving the port of data by these ports, has further improved the speed of data sharing.
Particularly, described the first equipment in peer-to-peer network is packaged into broadcast announcement message by shared file and comprises:
Described shared file is divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order;
Described blocks of files after cutting apart is encapsulated according to the file block message format, and wherein, described file block message format comprises: FID, file type, file size, and file effect code;
Generate broadcast announcement message according to the blocks of files after encapsulation.
Visible, the described data sharing of the embodiment of the present invention is shared applicable to Large Volume Data, jumbo shared file can be divided into to the blocks of files of suitable size, unique piece Identity Code FID by the setting order is distinguished, and the time carry these FID in encapsulation, in order to can carry out according to these FID the merging of file during follow-up parsing.
Described the second equipment is resolved the described shared file of acquisition to described broadcast announcement message and is comprised:
According to the target device user identity proof UID carried in described broadcast announcement message, the described broadcast announcement message received is resolved, obtained respectively file block information, and each blocks of files specifying information content;
Sorted according to the FID in described file block information, each blocks of files specifying information content is synthesized, generate shared file and preserved.
The first equipment packages after the shared file, after the second equipment is determined and to be own receptible sharing data according to target device UID, it can be resolved, obtain file block information, and each blocks of files specifying information content, then according to file block information, divide block file to be merged, like this, reduce the probability that entanglement appears in shared file, improved the efficiency of data sharing.
The embodiment of the present invention provides the equipment of data sharing, comprising:
The shared file generation unit, for shared file being packaged into to broadcast announcement message, and described equipment in peer-to-peer network in the notification message of the newly-increased shared file of broadcast transmission;
Shared cell, for receiving the sharing request of described peer-to-peer network, and described broadcast announcement message is sent to equipment corresponding to described sharing request, make equipment corresponding to described sharing request resolve and obtain described shared file described broadcast announcement message.
Visible, this equipment can directly will be packaged into east wind broadcast announcement message by shared file and send to equipment corresponding to sharing request according to sharing request, make this equipment be resolved rear acquisition shared file to broadcast announcement message.Like this, realized the data sharing between arbitrary equipment in the peer-to-peer network, this data sharing that does not need other equipment or server to carry out transfer makes the speed of data sharing greatly improve.
In the embodiment of the present invention, the local area network (LAN) unit, for after setting up WLAN (wireless local area network) by wireless terminal, open one for sending the first port of data, and one for receiving the second port of data, and receive the message of registering that enters described WLAN (wireless local area network) of broadcast transmission in described WLAN (wireless local area network) by described the second port; Or,
For after searching the WLAN (wireless local area network) of having set up and connecting, open one for sending the first port of data, and one for receiving the second port of data, and enter the message of registering of described WLAN (wireless local area network) by described the first port broadcast transmission in described WLAN (wireless local area network).
This equipment can be the creator of peer-to-peer network, can be also the participant of peer-to-peer network, and in peer-to-peer network, each equipment status is equity, can carry out the data sharing between equipment.
Described shared file generation unit, specifically for described shared file is divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order, blocks of files after cutting apart is encapsulated according to the file block message format, and generate broadcast announcement message according to the blocks of files after encapsulation, wherein, described file block message format comprises: FID, file type, file size, and file effect code.
Resolution unit, for the target device user identity proof UID carried according to described broadcast announcement message, the broadcast announcement message received is resolved and obtained respectively file block information, and each blocks of files specifying information content, according to the FID in described file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
The embodiment of the present invention provides a kind of peer-to-peer network system of data sharing, comprising:
The first equipment, for shared file is packaged into to broadcast announcement message, and in described peer-to-peer network system the notification message of the newly-increased shared file of broadcast transmission, receive the sharing request that in described peer-to-peer network system, at least one second equipment sends, and described broadcast announcement message is sent to respectively to the second corresponding equipment;
The second equipment, for to described the first equipment, sending sharing request, and receive described broadcast announcement message, and described broadcast announcement message is resolved and obtained described shared file.
Visible, in the peer-to-peer network system of this data sharing, between equipment, can directly carry out data sharing, do not need to carry out data sharing by a certain particular device or server, improved the speed of data sharing.
Particularly, described the first equipment, specifically for described shared file is divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order, blocks of files after cutting apart is encapsulated according to the file block message format, and generated broadcast announcement message according to the blocks of files after encapsulation, wherein, described file block message format comprises: FID, file type, file size, and file effect code;
Described the second equipment, specifically according to the target device user identity proof UID carried in described broadcast announcement message, for the broadcast announcement message to receiving, resolved and obtained respectively file block information, and each blocks of files specifying information content, according to the FID in described file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
Like this, by by the shared file piecemeal, and the FID corresponding with each block file, reduced the probability that large capacity shared file occurs when sharing, improved the efficiency of data sharing.
Other features and advantages of the present invention will be set forth in the following description, and, partly from specification, become apparent, or understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the specification write, claims and accompanying drawing.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
The accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms the part of specification, for explaining the present invention, is not construed as limiting the invention together with embodiments of the present invention.In the accompanying drawings:
The flow chart that Fig. 1 is data sharing in the embodiment of the present invention one;
Fig. 2 is the flow chart that in the embodiment of the present invention two, the first equipment is set up peer-to-peer network;
Fig. 3 is the flow chart that in the embodiment of the present invention two, the first equipment adds peer-to-peer network;
Fig. 4 is set up the flow chart of peer-to-peer network in the embodiment of the present invention three;
The flow chart that Fig. 5 is data sharing in the embodiment of the present invention three;
The structure chart that Fig. 6 is data sharing equipment in the embodiment of the present invention four;
The Organization Chart that Fig. 7 is data sharing peer-to-peer network in the embodiment of the present invention five.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein, only for description and interpretation the present invention, is not intended to limit the present invention.
In the embodiment of the present invention, equipment is in peer-to-peer network (peer-to-peer network, P2P) in, each equipment has been opened one for FPDP occurs, and one for receiving the port of data, and the status of each equipment is reciprocity, like this, after arbitrary equipment in this network is packaged into broadcast announcement message by shared file, just can in peer-to-peer network, broadcast newly-increased shared file, and other equipment that the demand shared file is arranged in peer-to-peer network just can send sharing request, thereby receive broadcast announcement message, and resolve this broadcast announcement message and obtain shared file, finally realized sharing of data.
Embodiment mono-
Referring to Fig. 1, the process of data sharing comprises:
Step 101: the first equipment in peer-to-peer network is packaged into broadcast announcement message by shared file.
Peer-to-peer network comprises two, three or more equipment, and each equipment is reciprocity,, using equipment that shared file is arranged in this data sharing process as the first equipment, the equipment of demand shared file is arranged as the second equipment in peer-to-peer network here.
When shared file is little, can directly shared file be encapsulated, be packaged into broadcast announcement message, here, broadcast announcement message can comprise: the user identity of source device proves (User Identification, UID), target device UID, and the specifying information content, wherein, target device UID can be in peer-to-peer network one, the UID of two or more equipment, when target device UID vacancy, expression waits the UID of arbitrary equipment in network all can.
The embodiment of the present invention can be used for sharing of Large Volume Data, can realize sharing of large file, therefore, the detailed process that jumbo shared file is packaged into to broadcast announcement message comprises: shared file is divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code (Frame Identification, FID) is set in order; Blocks of files after cutting apart is encapsulated according to the file block message format, and generated broadcast announcement message according to the blocks of files after encapsulation.Wherein, the file block message format comprises: FID, file type, file size, and file effect code.
Here, broadcast announcement message can comprise: source device UID, target device UID, file block information and each blocks of files specifying information content.Wherein, file block information is corresponding with the file block message format, and target device UID is not repeated with above-mentioned consistent.
Step 102: the notification message of the first equipment newly-increased shared file of broadcast transmission in peer-to-peer network.
After the first equipment is packaged into broadcast announcement message by shared file, can in wait network, broadcasts newly-increased shared file has been arranged, here, the first equipment be by the notification message of the newly-increased shared file of corresponding transmit port broadcast transmission.
Step 103: the first equipment receives the sharing request that in peer-to-peer network, at least one second equipment sends.
Other equipment in peer-to-peer network learn on the first equipment that by the notification message of newly-increased shared file shared file has been arranged, and like this, have the second equipment of this shared file of demand to send sharing request to the first equipment.In peer-to-peer network, likely having an equipment to need this shared file, may be also that two or more equipment needs this shared file, and like this, the first equipment can receive one, the sharing request that two or more the second equipment sends.
Step 104: the first equipment sends to respectively the second corresponding equipment by broadcast announcement message, makes each second equipment resolve and obtain shared file broadcast announcement message.
After the first equipment often receives a sharing request, just broadcast announcement message is sent to the second equipment corresponding to this sharing request, like this, the broadcast announcement message that the second equipment interconnection is received is resolved rear acquisition shared file, thereby has realized sharing of data.
The broadcast announcement message that the second equipment interconnection is received is resolved, the detailed process that obtains shared file can comprise: according to the target device UID carried in broadcast announcement message, the broadcast announcement message received is resolved, obtain respectively file block information, and each blocks of files specifying information content; Then, according to the FID in file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
One of the target device UID carried in broadcast announcement message, two or more, when comprising the UID of this second equipment, can resolve this broadcast announcement message and obtain respectively file block information, and each blocks of files specifying information content.Certainly, when the target device UID carried in this broadcast announcement message is empty, also can resolve this broadcast announcement message.
Due to, by FID, each blocks of files is distinguished, and each FID has setting order, therefore, reduce the probability that entanglement appears in shared file, improved the efficiency of data sharing.
Above-mentioned is only a kind of resolving, also can before carrying out the FID sequence, according to the file effect code in file block information, to blocks of files, carry out effect, further reduces the probability that entanglement appears in shared file.
Pass through said process, can in peer-to-peer network, realize sharing of data, both local file can be shared with to other equipment in network on each equipment, but the file on other equipment in shared network, like this, do not need shared file (for example: server) come up is all uploaded to a particular device yet, need to not download required shared file from a particular device yet, thereby, do not need the thread to uploading or downloading to be limited yet, improved the speed of data sharing.
And, in the process of data sharing, do not need to carry out the checking of username and password, the succinct process of data sharing.
Embodiment bis-
The data sharing process of the embodiment of the present invention realizes in peer-to-peer network, therefore, before carrying out data sharing, also needs to set up a peer-to-peer network.This peer-to-peer network can be set up by the first equipment that shared file is arranged, and also can be set up by the second equipment of demand shared file, or other equipment is set up.
Referring to Fig. 2, the process that the first equipment is set up peer-to-peer network comprises:
Step 201: the first equipment is set up WLAN (wireless local area network) by wireless terminal.
Wireless terminal can be external wireless routing, or, built-in local area network (LAN) client.Like this, the first equipment can be set up the local area network (LAN) of a WIFI.
Step 202: the first one of opening of device is for sending the first port of data, and one for receiving the second port of data.
Particularly, can open a socket Socket port S1 for sending data, open another socket Socket port S2 for receiving data.
Step 203: the first equipment receives the message of registering that enters WLAN (wireless local area network) of other equipment broadcast transmission in WLAN (wireless local area network) by the second port.
Other any one equipment want to add this WLAN (wireless local area network), after searching out the WIFI of this WLAN (wireless local area network), also need to open a socket Socket port S1 for sending data, open another socket Socket port S2 for receiving data, and, also need by the message of registering that enters WLAN (wireless local area network) of port S1 broadcast transmission in WLAN (wireless local area network), like this, the first equipment can receive the message of registering by port S2.
Other any one equipment have comprised the second equipment, or other want to add the equipment of this WLAN (wireless local area network), like this, by the message of registering, make the first equipment learn that WLAN (wireless local area network) has increased equipment newly.Equipment in this WLAN (wireless local area network) has one for FPDP occurs, and one for receiving the port of data, and like this, the equipment in this WLAN (wireless local area network) is all reciprocity, has formed peer-to-peer network.
Referring to Fig. 3, the first equipment adds the process of peer-to-peer network to comprise:
Step 301: the first equipment searches the WLAN (wireless local area network) of other equipment foundation and connects.
Other equipment comprise: the second equipment, or other equipment in this WLAN (wireless local area network).
Step 302: the first one of opening of device is for sending the first port of data, and one for receiving the second port of data.
Equally, can open a socket Socket port S1 for sending data, open another socket Socket port S2 for receiving data.
Step 303: the first equipment enters the message of registering of WLAN (wireless local area network) by the first port broadcast transmission in WLAN (wireless local area network).
The first equipment broadcasts by port S1 the message of registering, and makes other equipment in the WLAN (wireless local area network) in WLAN (wireless local area network) obtain adding of cicada the first equipment.
Equipment in this WLAN (wireless local area network) has one for FPDP occurs, and one for receiving the port of data, and like this, the equipment in this WLAN (wireless local area network) is all reciprocity, has formed peer-to-peer network.
In peer-to-peer network, each equipment can directly be shared the file of this locality storage, also can directly from other equipment, obtain shared file, does not need to carry out data relay, has improved the data of data sharing.
Embodiment tri-
In this enforcement, the equipment in peer-to-peer network can be mobile terminal, personal computer, one or more in the functional equipment such as panel computer.Take device A, equipment B, equipment C and equipment D as a peer-to-peer network of example structure.
Referring to Fig. 4, the process of setting up peer-to-peer network comprises:
Step 401: device A is set up a WIFI local area network (LAN) by built-in local area network (LAN) client, and opens a socket Socket port S1 for sending data, opens another socket Socket port S2 for receiving data.
Step 402: equipment B searches out the WIFI local area network (LAN) of device A foundation and connects, and opens a Socket port S1 for sending data, opens another Socket port S2 for receiving data.
Step 403: equipment B sends the message of registering that enters the WIFI local area network (LAN) in WIFI LAN broadcast by port S1.
Like this, device A receives by port S2 the message of registering that equipment B sends, and learns that equipment B has added in the WIFI local area network (LAN).
Step 404: equipment C searches out the WIFI local area network (LAN) of device A foundation and connects, and opens a Socket port S1 for sending data, opens another Socket port S2 for receiving data.
Step 405: equipment C sends the message of registering that enters the WIFI local area network (LAN) in WIFI LAN broadcast by port S1.
Like this, device A and equipment B receive respectively the message of registering of equipment C transmission by port S2 separately, and the equipment C of learning has added in the WIFI local area network (LAN).
Step 406: equipment D searches out the WIFI local area network (LAN) of device A foundation and connects, and opens a Socket port S1 for sending data, opens another Socket port S2 for receiving data.
Step 407: equipment D sends the message of registering that enters the WIFI local area network (LAN) in WIFI LAN broadcast by port S1.
Like this, device A, equipment B and equipment C receive respectively the message of registering of equipment D transmission by port S2 separately, and the equipment D of learning has added in the WIFI local area network (LAN).
By said process, set up a peer-to-peer network formed by device A, equipment B, equipment C and equipment D.In this peer-to-peer network, shared file in device A can be directly obtained by any one in equipment B, equipment C and equipment D, two or a plurality of equipment, equally, the shared file in equipment B can be directly obtained by any one in device A, equipment C and equipment D, two or a plurality of equipment.Certainly, equipment C and equipment D also can be like this.Below using device A as the first equipment, and equipment B is that example is described as the second equipment, and its data sharing process, referring to Fig. 5, comprising:
Step 501: device A is packaged into broadcast announcement message M1 by shared file.
For jumbo shared file, shared file can be divided into at least one blocks of files, wherein the blocks of files size is preferably 512KB.And for each blocks of files, a unique piece Identity Code FID is set in order, can increase progressively successively in order.Then, the blocks of files after cutting apart is encapsulated according to the file block message format, last, generate broadcast announcement message M1 according to the blocks of files after encapsulation.
Step 502: the notification message of the newly-increased shared file of broadcast transmission in the device A peer-to-peer network.
Device A, by the notification message of the newly-increased shared file of port S1 broadcast transmission, makes other equipment in peer-to-peer network can know on device A that newly-increased shared file has been arranged.
Step 503: equipment B sends sharing request to device A after receiving notification message.
Equipment B learns that device A has had newly-increased shared file after receiving notification message by port S2, and equipment B is this shared file of demand also, therefore, to device A, sends sharing request.
Step 504: after device A receives sharing request, to equipment B, send broadcast announcement message M1.
Carried source device UID, target device UID in the broadcast announcement message M1 that device A generates, file block information and each blocks of files specifying information content, send this broadcast announcement message to equipment B.
Step 505: equipment B is resolved the broadcast announcement the received M1 breath that disappears, and obtains shared file.
Particularly, equipment B is resolved the broadcast announcement message received according to the target device UID carried in broadcast announcement message, obtains respectively file block information, and each blocks of files specifying information content; Then, according to the FID in file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
Like this, equipment B obtains shared file, and device A and equipment B have realized sharing of data.If the equipment C in this peer-to-peer network, or equipment D need obtain shared file, also needs to send sharing request to device A, and the broadcast announcement message that sends of receiving equipment A, resolved rear acquisition shared file to broadcast announcement message, detailed process just has been not repeated.
By said process, can realize the data sharing between arbitrary equipment in peer-to-peer network, for example: the file in device A is shared with equipment B and equipment C respectively, or the data in equipment B are shared with equipment C and equipment D respectively.
Due to each opening of device in peer-to-peer network one for FPDP occurs, and one for receiving the port of data, like this, do not need shared file is all uploaded on a particular device, need to not download required shared file from a particular device yet, thereby, do not need the thread to uploading or downloading to be limited yet, improved the speed of data sharing.
Embodiment tetra-
In embodiment of the present invention peer-to-peer network, the equipment of data sharing as shown in Figure 6, comprising: shared file generation unit 610 and shared cell 620.Wherein,
Shared file generation unit 610, for shared file being packaged into to broadcast announcement message, and equipment in peer-to-peer network in the notification message of the newly-increased shared file of broadcast transmission.
Shared cell 620, with shared file generating unit 610, be connected, for receiving the sharing request of peer-to-peer network, and broadcast announcement message is sent to equipment corresponding to sharing request, make equipment corresponding to sharing request resolve and obtain shared file broadcast announcement message.
Equipment in the present embodiment both can be set up WLAN (wireless local area network), the WLAN (wireless local area network) that also can add other equipment to set up, and therefore, this equipment also comprises: the local area network (LAN) unit.
This local area network (LAN) unit, for after setting up WLAN (wireless local area network) by wireless terminal, open one for sending the first port of data, and one for receiving the second port of data, and receive the message of registering that enters WLAN (wireless local area network) of broadcast transmission in WLAN (wireless local area network) by the second port; Or,
For after searching the WLAN (wireless local area network) of having set up and connecting, open one for sending the first port of data, and one for receiving the second port of data, and enter the message of registering of WLAN (wireless local area network) by the first port broadcast transmission in WLAN (wireless local area network).
Like this, equipment can be set up a WIFI WLAN (wireless local area network) by the local area network (LAN) unit, and opens one for FPDP occurs, and one for receiving the port of data, by the peer-to-peer network of message and the formation of other equipment of registering received.Perhaps, this equipment connects by the local area network (LAN) unit WIFI WLAN (wireless local area network) that other equipment are set up, also open one for FPDP occurs, and one for receiving the port of data, join in the peer-to-peer network that other equipment form by the transmission message of registering.
Preferably, shared file generation unit 610, specifically for shared file being divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order, blocks of files after cutting apart is encapsulated according to the file block message format, and generated broadcast announcement message according to the blocks of files after encapsulation, wherein, the file block message format comprises: FID, file type, file size, and file effect code.
Due to this equipment in peer-to-peer network, likely the first equipment that shared file is arranged, likely also the second equipment of demand shared file, therefore, this equipment also comprises: resolution unit, for the target device user identity proof UID carried according to described broadcast announcement message, the broadcast announcement message received is resolved and obtained respectively file block information, and each blocks of files specifying information content, according to the FID in file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
When equipment, during as the second equipment of demand shared file, be by resolution unit, the broadcast announcement message received to be resolved and obtained shared file.
Opening of device in the embodiment of the present invention one for FPDP occurs, and one for receiving the port of data, formed a peer-to-peer network with other equipment, therefore, shared file in this equipment can directly send to other equipment in peer-to-peer network, also can obtain the shared file in other equipment, like this, do not need shared file is all uploaded on a particular device, need to not download required shared file from a particular device yet, thereby, do not need the thread to uploading or downloading to be limited yet, improved the speed of data sharing.
Embodiment five
The embodiment of the present invention has formed a peer-to-peer network system that data are shared by two or more equipment, referring to Fig. 7, comprising: first equipment 100 and at least one second equipment 200, wherein,
The first equipment 100, for shared file is packaged into to broadcast announcement message, and in the peer-to-peer network system notification message of the newly-increased shared file of broadcast transmission, receive the sharing request that in the peer-to-peer network system, at least one second equipment 200 sends, and broadcast announcement message is sent to respectively to the second corresponding equipment 200.
The second equipment 200, for to the first equipment 100, sending sharing request, and receive broadcast announcement message, and broadcast announcement message is resolved and obtained shared file.
In this peer-to-peer network, the equipment that shared file is arranged is the first equipment, and the equipment of demand shared file is the second equipment, and the second equipment can be one, or two, or a plurality of.In this network, the first equipment 100, specifically for shared file being divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order, blocks of files after cutting apart is encapsulated according to the file block message format, and generated broadcast announcement message according to the blocks of files after encapsulation, wherein, the file block message format comprises: FID, file type, file size, and file effect code.
The second equipment 200, resolved and obtained respectively file block information specifically for the broadcast announcement message to receiving, and each blocks of files specifying information content, according to the FID in file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
Particularly, in the peer-to-peer network of this data sharing, each equipment changes in different data sharing process, in the data sharing process had, in this peer-to-peer network, equipment is the first equipment, and this equipment may become the second equipment in another data sharing process, therefore, described in the concrete function of the first equipment and the second equipment and above-described embodiment four, just be not repeated.
In the present embodiment, in the peer-to-peer network of data sharing, each equipment has been opened one for FPDP occurs, and one for receiving the port of data, like this, each equipment can directly be shared the shared file on other equipment in this peer-to-peer network, improves the speed of data sharing.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect fully.And the present invention can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) of computer usable program code one or more.
The present invention describes with reference to flow chart and/or the block diagram of method, equipment (system) and computer program according to the embodiment of the present invention.Should understand can be in computer program instructions realization flow figure and/or block diagram each flow process and/or the flow process in square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computer or other programmable data processing device produce for realizing the device in the function of flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction be stored in this computer-readable memory produce the manufacture that comprises command device, this command device is realized the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded on computer or other programmable data processing device, make and carry out the sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out on computer or other programmable devices is provided for realizing the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.

Claims (10)

1. the method for a data sharing, is characterized in that, comprising:
The first equipment in peer-to-peer network is packaged into broadcast announcement message by shared file, and in described peer-to-peer network the notification message of the newly-increased shared file of broadcast transmission;
Described the first equipment receives the sharing request that in described peer-to-peer network, at least one second equipment sends, and described broadcast announcement message is sent to respectively to the second corresponding equipment, make each second equipment resolve and obtain described shared file described broadcast announcement message.
2. the method for claim 1, is characterized in that, described the first equipment in peer-to-peer network also comprises before shared file is packaged into to broadcast announcement message:
After described the first equipment is set up WLAN (wireless local area network) by wireless terminal, open one for sending the first port of data, and one for receiving the second port of data, and receive the message of registering that enters described WLAN (wireless local area network) of other equipment broadcast transmission in described WLAN (wireless local area network) by described the second port; Or,
After described the first equipment searches the WLAN (wireless local area network) that other equipment set up and connects, open one for sending the first port of data, and one for receiving the second port of data, and enter the message of registering of described WLAN (wireless local area network) by described the first port broadcast transmission in described WLAN (wireless local area network).
3. the method for claim 1, is characterized in that, described the first equipment in peer-to-peer network is packaged into broadcast announcement message by shared file and comprises:
Described shared file is divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order;
Described blocks of files after cutting apart is encapsulated according to the file block message format, and wherein, described file block message format comprises: FID, file type, file size, and file effect code;
Generate broadcast announcement message according to the blocks of files after encapsulation.
4. method as described as claim 1 or 3, is characterized in that, described the second equipment is resolved the described shared file of acquisition to described broadcast announcement message and comprised:
According to the target device user identity proof UID carried in described broadcast announcement message, the described broadcast announcement message received is resolved, obtained respectively file block information, and each blocks of files specifying information content;
Sorted according to the FID in described file block information, each blocks of files specifying information content is synthesized, generate shared file and preserved.
5. the equipment of a data sharing, is characterized in that, comprising:
The shared file generation unit, for shared file being packaged into to broadcast announcement message, and described equipment in peer-to-peer network in the notification message of the newly-increased shared file of broadcast transmission;
Shared cell, for receiving the sharing request of described peer-to-peer network, and described broadcast announcement message is sent to equipment corresponding to described sharing request, make equipment corresponding to described sharing request resolve and obtain described shared file described broadcast announcement message.
6. equipment as claimed in claim 5, is characterized in that, also comprises:
The local area network (LAN) unit, for after setting up WLAN (wireless local area network) by wireless terminal, open one for sending the first port of data, and one for receiving the second port of data, and receive the message of registering that enters described WLAN (wireless local area network) of broadcast transmission in described WLAN (wireless local area network) by described the second port; Or,
For after searching the WLAN (wireless local area network) of having set up and connecting, open one for sending the first port of data, and one for receiving the second port of data, and enter the message of registering of described WLAN (wireless local area network) by described the first port broadcast transmission in described WLAN (wireless local area network).
7. equipment as claimed in claim 5, is characterized in that,
Described shared file generation unit, specifically for described shared file is divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order, blocks of files after cutting apart is encapsulated according to the file block message format, and generate broadcast announcement message according to the blocks of files after encapsulation, wherein, described file block message format comprises: FID, file type, file size, and file effect code.
8. as claim 5,6 or 7 described equipment, it is characterized in that, also comprise:
Resolution unit, for the target device user identity proof UID carried according to described broadcast announcement message, the broadcast announcement message received is resolved and obtained respectively file block information, and each blocks of files specifying information content, according to the FID in described file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
9. the peer-to-peer network system of a data sharing, is characterized in that, comprising:
The first equipment, for shared file is packaged into to broadcast announcement message, and in described peer-to-peer network system the notification message of the newly-increased shared file of broadcast transmission, receive the sharing request that in described peer-to-peer network system, at least one second equipment sends, and described broadcast announcement message is sent to respectively to the second corresponding equipment;
The second equipment, for to described the first equipment, sending sharing request, and receive described broadcast announcement message, and described broadcast announcement message is resolved and obtained described shared file.
10. peer-to-peer network system as claimed in claim 9, is characterized in that,
Described the first equipment, specifically for described shared file is divided into at least one blocks of files, and for each blocks of files, a unique piece Identity Code FID is set in order, blocks of files after cutting apart is encapsulated according to the file block message format, and generate broadcast announcement message according to the blocks of files after encapsulation, wherein, described file block message format comprises: FID, file type, file size, and file effect code;
Described the second equipment, specifically according to the target device user identity proof UID carried in described broadcast announcement message, for the broadcast announcement message to receiving, resolved and obtained respectively file block information, and each blocks of files specifying information content, according to the FID in described file block information, sorted, each blocks of files specifying information content is synthesized, generate shared file and preserved.
CN201310425111.2A 2013-09-17 2013-09-17 Method, equipment and peer-to-peer network system for data sharing Pending CN103491153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310425111.2A CN103491153A (en) 2013-09-17 2013-09-17 Method, equipment and peer-to-peer network system for data sharing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310425111.2A CN103491153A (en) 2013-09-17 2013-09-17 Method, equipment and peer-to-peer network system for data sharing

Publications (1)

Publication Number Publication Date
CN103491153A true CN103491153A (en) 2014-01-01

Family

ID=49831106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310425111.2A Pending CN103491153A (en) 2013-09-17 2013-09-17 Method, equipment and peer-to-peer network system for data sharing

Country Status (1)

Country Link
CN (1) CN103491153A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103813475A (en) * 2014-02-20 2014-05-21 联想(北京)有限公司 Data transmission method, data acquisition method and electronic device
CN104468604A (en) * 2014-12-19 2015-03-25 北京奇虎科技有限公司 Data access method and device based on peer-to-peer network communication mode in local area network
CN105357590A (en) * 2014-08-22 2016-02-24 中兴通讯股份有限公司 Method and device for achieving terminal multimedia broadcast
CN107466089A (en) * 2017-08-23 2017-12-12 广东欧珀移动通信有限公司 A kind of data sharing method, device and terminal device
CN107529133A (en) * 2017-09-06 2017-12-29 广东欧珀移动通信有限公司 Data transmission method, device, storage medium and computer equipment
CN113992756A (en) * 2021-10-27 2022-01-28 北京八分量信息科技有限公司 Method and device for acquiring shared data in heterogeneous network and related products

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030050966A1 (en) * 2001-09-13 2003-03-13 International Business Machines Corporation Method and system for redirecting data requests in peer-to-peer data networks
CN101043345A (en) * 2006-03-20 2007-09-26 腾讯科技(深圳)有限公司 Point-to-point technique based picture sharing system and method
CN101465791A (en) * 2007-12-18 2009-06-24 国家广播电影电视总局广播科学研究院 Document transmission method based on unidirection link
CN101510878A (en) * 2009-03-27 2009-08-19 北京星网锐捷网络技术有限公司 Method, device and equipment for monitoring peer-to-peer network
CN103269373A (en) * 2013-05-28 2013-08-28 中山大学 P2P file sharing method based on JXTA platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030050966A1 (en) * 2001-09-13 2003-03-13 International Business Machines Corporation Method and system for redirecting data requests in peer-to-peer data networks
CN101043345A (en) * 2006-03-20 2007-09-26 腾讯科技(深圳)有限公司 Point-to-point technique based picture sharing system and method
CN101465791A (en) * 2007-12-18 2009-06-24 国家广播电影电视总局广播科学研究院 Document transmission method based on unidirection link
CN101510878A (en) * 2009-03-27 2009-08-19 北京星网锐捷网络技术有限公司 Method, device and equipment for monitoring peer-to-peer network
CN103269373A (en) * 2013-05-28 2013-08-28 中山大学 P2P file sharing method based on JXTA platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
贾倩 等: "P2P文件共享的思想", 《电脑知识与技术》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103813475A (en) * 2014-02-20 2014-05-21 联想(北京)有限公司 Data transmission method, data acquisition method and electronic device
CN103813475B (en) * 2014-02-20 2019-09-24 联想(北京)有限公司 A kind of data transmission method, data capture method and electronic equipment
CN105357590A (en) * 2014-08-22 2016-02-24 中兴通讯股份有限公司 Method and device for achieving terminal multimedia broadcast
CN104468604A (en) * 2014-12-19 2015-03-25 北京奇虎科技有限公司 Data access method and device based on peer-to-peer network communication mode in local area network
CN107466089A (en) * 2017-08-23 2017-12-12 广东欧珀移动通信有限公司 A kind of data sharing method, device and terminal device
CN107529133A (en) * 2017-09-06 2017-12-29 广东欧珀移动通信有限公司 Data transmission method, device, storage medium and computer equipment
CN107529133B (en) * 2017-09-06 2021-08-03 Oppo广东移动通信有限公司 Data transmission method, device, storage medium and computer equipment
CN113992756A (en) * 2021-10-27 2022-01-28 北京八分量信息科技有限公司 Method and device for acquiring shared data in heterogeneous network and related products
CN113992756B (en) * 2021-10-27 2024-04-26 北京八分量信息科技有限公司 Shared data acquisition method and device in heterogeneous network and related products

Similar Documents

Publication Publication Date Title
US11611863B2 (en) Method and apparatus for low energy discovery
KR101984413B1 (en) Systems and methods for enabling access to third party services via service layer
KR102027892B1 (en) Techniques for server-controlled tiling of location-based information
CN103491153A (en) Method, equipment and peer-to-peer network system for data sharing
KR102091069B1 (en) Enhanced RESTful behaviors
EP3861706B1 (en) Framework for dynamic brokerage and management of topics and data at the service layer
CN110324303A (en) The data slot of internet of things equipment recombinates
CN106170969A (en) Context management
CN103873692A (en) Method, device and system for resource sharing
US9936353B2 (en) Method, server device and mobile terminal for processing information
US11671514B2 (en) Service layer message templates in a communications network
WO2022125456A1 (en) Mec federation broker and manager enabling secure cross-platform communication
CN106714329A (en) Method and device for establishing data link
CN108513738A (en) Data transmission method, equipment, machine readable storage medium and system
US20150195140A1 (en) Apparatus and method for sharing data by using topology
EP4156732A1 (en) Misbehavior processing in connected vehicle networks
CN103473379A (en) Method, device and system used for electronic map
US9967332B1 (en) Peer-to-peer file sharing and collaboration
WO2020009797A1 (en) Efficient resource representation exchange between service layers
CN107710793A (en) A kind of localization method and corresponding intrument
KR102046730B1 (en) Elements of service
WO2023003686A1 (en) Multi- access edge computing (mec) application registry in mec federation
Agostinho et al. Smart comm: A smart home middleware supporting information exchange
US20210368344A1 (en) Data model visibility in iot network implementations
CN102917029B (en) The implementation method that cloud stores and cloud storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140101