Summary of the invention
The object of the present invention is to provide a kind of file sharing method, system and equipment,, receive the restriction of the network bandwidth and document form easily to solve the shared complicacy of multimedia file in the prior art based on P2P, and the demanding problem of real-time.
For solving the problems of the technologies described above, the present invention provides following technical scheme:
A kind of file sharing method comprises:
For multimedia file to be shared is created seed file, and said seed file is uploaded onto the server;
Send shared message to the user side of sharing said multimedia file;
When said user side is selected to download said multimedia file, said multimedia file is transferred to said user side through point-to-point P2P network.
Said for before the multimedia file establishment seed file to be shared, also comprise: select multimedia file said to be shared and the user side of sharing said multimedia file.
Said selection multimedia file to be shared comprises:
From the USB interface equipment that inserts, select multimedia file said to be shared; Or
Through serial ports or network copy multimedia file said to be shared.
Said user side to shared multimedia file sends shared message and comprises:
When the user side access network of said shared multimedia file, directly transmit to said user side and to share message;
When the user side of said shared multimedia file not during access network, share message to said Server Transport, said server is transmitted said shared message to said user side when said user side access network.
Said user side is selected to download multimedia file and is comprised:
User side judges whether to download said multimedia file after receiving said shared message;
When downloading said multimedia file, download said seed file from said server;
Start the P2P network after accomplishing the download of said seed file.
Multimedia file is transferred to the procotol that user side adopts to be comprised: BitTorrent agreement, Emule agreement, http protocol or File Transfer Protocol.
A kind of shared file system comprises: server, and through said server access network sharing file initiator and shared file recipient,
Said shared file initiator is used to multimedia file to be shared and creates seed file, and said seed file is uploaded onto the server, and sends shared message to the shared file recipient who shares said multimedia file;
Said server is used to preserve the seed file that said shared file initiator uploads;
Said shared file recipient when being used for select downloading said multimedia file, receives the said multimedia file through the P2P Network Transmission.
Said shared file initiator is further used for, and selects multimedia file said to be shared and the shared file recipient who shares said multimedia file.
A kind of file-sharing equipment comprises:
Create the unit, be used to multimedia file to be shared and create seed file;
Uploading unit is used for said seed file is uploaded onto the server;
Transmitting element is used for sending shared message to the user side of sharing said multimedia file;
Transmission unit is used for when said user side is selected to download said multimedia file, through the P2P network said multimedia file being transferred to said user side.
Also comprise:
Selected cell is used to select multimedia file said to be shared and the user side of sharing said multimedia file.
A kind of file-sharing equipment comprises:
First receiving element, the shared message that the user side that being used to receive provides multimedia file sends;
Selected cell is used for selecting to download said multimedia file;
Second receiving element is used to receive the said multimedia file through the P2P Network Transmission.
Said selected cell comprises:
Judging unit is used for judging whether to download said multimedia file after user side receives said shared message;
Download unit is used for when downloading said multimedia file, downloading said seed file from said server;
Start unit starts the P2P network after being used to accomplish the download of said seed file.
Visible by above technical scheme provided by the invention; Create seed file for multimedia file to be shared among the present invention; And said seed file uploaded onto the server; Send shared message to the user side of sharing said multimedia file, when said user side is selected to download said multimedia file, said multimedia file is transferred to said user side through point-to-point P2P network.Because the sharing of multimedia file among the present invention based on the P2P network, therefore alleviated when the multi-user downloads simultaneously the pressure of server, improved QoS of customer, when server failure, can not cause network paralysis; And notice in the multimedia file shared procedure and download are accomplished by ustomer premises access equipment automatically, need not the user and carry out manual operation, therefore make file-sharing convenient and swift.
Embodiment
Core of the present invention has provided a kind of file sharing method based on P2P, system and equipment; Through creating seed file for multimedia file to be shared; And said seed file uploaded onto the server; Send shared message to the user side of sharing said multimedia file, when said user side is selected to download said multimedia file, said multimedia file is transferred to said user side through the P2P network.
In order to make those skilled in the art person understand the present invention program better, and make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, below in conjunction with accompanying drawing and embodiment the present invention done further detailed explanation.
The first embodiment flow process of file sharing method of the present invention is as shown in Figure 1:
Step 101:, and seed file is uploaded onto the server for multimedia file to be shared is created seed file.
Step 102: send shared message to the user side of sharing this multimedia file.
Wherein, when the user side access network of said shared multimedia file, directly transmit to said user side and to share message; When the user side of said shared multimedia file not during access network, share message to said Server Transport, said server is transmitted said shared message to said user side when said user side access network.
Step 103: when user side is selected to download this multimedia file, this multimedia file is transferred to user side through the P2P network.
Concrete; User side judges whether to download said multimedia file after receiving said shared message, when downloading said multimedia file, downloads said seed file from said server; When not downloading said multimedia file; Finish current operation, start the P2P network after accomplishing the download of said seed file, through this this multimedia file of P2P network download.
Wherein, multimedia file being transferred to procotol that user side adopts comprises and can be BitTorrent (bit stream) agreement, Emule (archives share web) agreement, http protocol or File Transfer Protocol.
The second embodiment flow process of file sharing method of the present invention is as shown in Figure 2, and this embodiment describes the shared file initiator in detail and the shared file recipient passes through the process that P2P realizes file-sharing:
Step 201: shared file initiator selects multimedia file to be shared and the shared file recipient who allows to share this multimedia file.
Wherein, can from USB (Universal Serial Bus, the USB) interface equipment that inserts, select multimedia file to be shared, such as portable hard drive commonly used, or card reader etc.; Also can be through serial ports or network copy multimedia file to be shared.
Step 202: shared file initiator is that multimedia file to be shared is created seed file.
Step 203: shared file initiator uploads onto the server this seed file.
Step 204: judge whether access network of shared file recipient, if then execution in step 205; Otherwise, execution in step 206.
Step 205: shared file initiator sends shared message to the shared file recipient, execution in step 207.
Step 206: shared file initiator shares message to Server Transport, and server is transmitted to it when shared file recipient access network should shared message.
Step 207: shared file recipient judges whether to download this multimedia file after receiving said shared message, if then execution in step 208; Otherwise, process ends.
Step 208: shared file recipient downloads the seed file of this multimedia file from server.
Step 209: shared file recipient starts the P2P network.
Step 210: shared file provider is transferred to the shared file recipient through the P2P network with this multimedia file.
Can pass through BitTorrent agreement, Emule agreement, http protocol or File Transfer Protocol transmitting multimedia file.
Step 211: shared file recipient points out the download of accomplishing this multimedia file, finishes current flow process.
In conjunction with said method embodiment; The present invention is based on the P2P network and realize that the hardware configuration sketch map of file-sharing is as shown in Figure 3; This hardware configuration can be integrated in the embedded device; Embedded device has the function that multimedia file is shared, and through linking to each other with display terminal the multimedia file of sharing is showed.Comprise in this hardware configuration: control module, the device interface module, communication module and the memory module that link to each other respectively with control module.
Wherein, device interface module provides the function that the multimedia file on the outside pluggable equipment is conducted interviews, and device interface module is supported USB interface equipment, and promptly outside pluggable equipment can be the equipment such as portable hard drive or card reader with USB interface.
Communication module can be sent multimedia file to server or user side, also can receive multimedia file through serial ports or network.
Memory module is to preserve the storage medium of multimedia file; Can be hard disk or flash memory etc.; Different with outside pluggable equipment is that memory module is to be built in the inner module of hardware device, can preserve the multimedia file that communication module receives through serial ports or network.
Control module is the core of hardware device, the shared file initiator, and this module controls device interface module reading to the pluggable equipment file; The operation of P2P network; Shared file and shared file recipient's selection, the establishment of seed file, and the transmission of shared file notification message; The shared file recipient, this module controls is through P2P network download seed file and transmitting multimedia file.
The present invention carries out an embodiment flow process of file-sharing between two embedded devices as shown in Figure 4; The embedded device (equipment 1) that this embodiment shows the shared file provider obtains shared file from USB device, and the notification message that directly will share this document sends to the process of shared file recipient's embedded device (equipment 2):
Step 401: inserted USB device on the equipment 1 inspection USB interface.
Step 402: equipment 1 is selected multimedia file that is used to share and the equipment 2 of sharing this multimedia file from the multimedia file of USB device storage.
When concrete the realization, can in equipment 1, write the client software of selecting shared file and shared device, user 1 can move this software on equipment 1, realize above-mentioned selection function.
Step 403: equipment 1 is created seed file for the shared file of selecting.
Step 404: equipment 1 is uploaded to the WEB server with this seed file.
Step 405: equipment 1 sends the notification message of downloading shared file to the equipment 2 of current online.
Step 406: provide prompting after the equipment 2 notified message, user 2 selects to download this shared file on equipment 2.
Step 407: equipment 2 is downloaded seed file from the WEB server.
Step 408: equipment 2 starts P2P software.
Step 409: equipment 2 receiving equipments 1 are through the shared file of P2P Network Transmission.
Step 410: the download of prompting user 2 shared files finished after equipment 2 received whole shared files.
The present invention carries out another embodiment flow process of file-sharing between two embedded devices as shown in Figure 5; The embedded device (equipment 1) that this embodiment shows the shared file provider duplicates shared file through serial ports, and is transmitted to the process of shared file recipient's embedded device (equipment 2) through the notification message that the WEB server will be shared this document:
Step 501: equipment 1 duplicates multimedia file to be shared through serial ports, and this multimedia file can be kept in the built-in memory space of equipment 1.
Step 502: equipment 1 selects to share the shared device of this multimedia file.
Consistent with aforementioned device 1, can in this equipment 1, write the client software of selecting shared file and shared device in advance, user 1 can move this software on equipment 1, realize above-mentioned selection function.
Step 503: equipment 1 is created seed file for the shared file of selecting.
Step 504: equipment 1 is uploaded to the WEB server with this seed file.
Step 505: equipment 2 is current not online, and equipment 1 sends the notification message that requesting service 2 is downloaded shared file to the WEB server.
Step 506:WEB server judges 2 is reached the standard grade.
Step 507:WEB server is transmitted to equipment 2 with notification message.
Step 508: provide prompting after the equipment 2 notified message, user 2 selects to download this shared file on equipment 2.
Step 509: equipment 2 is downloaded seed file from the WEB server.
Step 510: equipment 2 starts P2P software.
Step 511: equipment 2 receiving equipments 1 are through the shared file of P2P Network Transmission.
Step 512: the download of prompting user 2 shared files finished after equipment 2 received whole shared files.
Corresponding with the embodiment of file sharing method of the present invention, the present invention also provides the embodiment of shared file system.
The embodiment block diagram of shared file system of the present invention is as shown in Figure 6, and this system comprises: server 620, and through said server 620 access network sharing file initiators 610 and shared file recipient 630.
Wherein, shared file initiator 610 is used to multimedia file to be shared and creates seed file, and said seed file is uploaded onto the server 620, sends to the shared file recipient who shares said multimedia file 630 and shares message; Server 620 is used to preserve the seed file that said shared file initiator uploads; When shared file recipient 630 is used for select downloading said multimedia file, receive said multimedia file through the P2P Network Transmission.
Shared file initiator 610 also is used to select multimedia file said to be shared and the shared file recipient 630 who shares said multimedia file.
Corresponding with file sharing method of the present invention and system implementation example, the present invention also provides the embodiment of file-sharing equipment.
An embodiment block diagram of a kind of file-sharing equipment of the present invention is as shown in Figure 7, and this document shared device as the file-sharing provider, comprising usually: create unit 710, uploading unit 720, transmitting element 730 and transmission unit 740.
Wherein, create unit 710 and be used to multimedia file establishment seed file to be shared; Uploading unit 720 is used for said seed file is uploaded onto the server; Transmitting element 730 is used for sending shared message to the user side of sharing said multimedia file; Transmission unit 740 is used for when said user side is selected to download said multimedia file, through the P2P network said multimedia file being transferred to said user side.
Another embodiment block diagram of a kind of file-sharing equipment of the present invention is as shown in Figure 8, and this document shared device as the file-sharing provider, comprising usually: selected cell 810, establishment unit 820, uploading unit 830, transmitting element 840 and transmission unit 850.
Wherein, selected cell 810 is used to select multimedia file said to be shared and the user side of sharing said multimedia file; Create unit 820 and be used to multimedia file establishment seed file to be shared; Uploading unit 830 is used for said seed file is uploaded onto the server; Transmitting element 840 is used for sending shared message to the user side of sharing said multimedia file; Transmission unit 850 is used for when said user side is selected to download said multimedia file, through the P2P network said multimedia file being transferred to said user side.
An embodiment block diagram of the another kind of file-sharing equipment of the present invention is as shown in Figure 9, and this document shared device as the file-sharing recipient, comprising usually: first receiving element 910, selected cell 920 and second receiving element 930.
Wherein, first receiving element 910 is used to receive the shared message of the user side transmission that multimedia file is provided; Selected cell 920 is used for selecting to download said multimedia file; Second receiving element 930 is used to receive the said multimedia file through the P2P Network Transmission.
Another embodiment block diagram of the another kind of file-sharing equipment of the present invention is shown in figure 10, and this document shared device as the file-sharing recipient, comprising usually: first receiving element 1010, selected cell 1020 and second receiving element 1030.
Wherein, first receiving element 1010 is used to receive the shared message of the user side transmission that multimedia file is provided.Selected cell 1020 further comprises: judging unit 1021 is used for judging whether to download said multimedia file after user side receives said shared message; Download unit 1022 is used for when downloading said multimedia file, downloading said seed file from said server; Start unit 1023 starts the P2P network after being used to accomplish the download of said seed file.Second receiving element 930 is used to receive the said multimedia file through the P2P Network Transmission.
Visible by the above embodiment of the invention, because the sharing of multimedia file among the present invention, therefore alleviated when the multi-user downloads simultaneously the pressure of server based on the P2P network, improved QoS of customer, when server failure, can not cause network paralysis; And notice in the multimedia file shared procedure and download are accomplished by ustomer premises access equipment automatically, need not the user and carry out manual operation, therefore make file-sharing convenient and swift.
Though described the present invention through embodiment, those of ordinary skills know, the present invention has many distortion and variation and do not break away from spirit of the present invention, hope that appended claim comprises these distortion and variation and do not break away from spirit of the present invention.