[go: up one dir, main page]

CN104915350A - Method and device for obtaining multimedia files based on P2P mode - Google Patents

Method and device for obtaining multimedia files based on P2P mode Download PDF

Info

Publication number
CN104915350A
CN104915350A CN201410090639.3A CN201410090639A CN104915350A CN 104915350 A CN104915350 A CN 104915350A CN 201410090639 A CN201410090639 A CN 201410090639A CN 104915350 A CN104915350 A CN 104915350A
Authority
CN
China
Prior art keywords
header data
multimedia file
relevant information
data
compression
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
CN201410090639.3A
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.)
BEIJING FENGXING ONLINE TECHNOLOGY Co Ltd
Original Assignee
BEIJING FENGXING ONLINE 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 BEIJING FENGXING ONLINE TECHNOLOGY Co Ltd filed Critical BEIJING FENGXING ONLINE TECHNOLOGY Co Ltd
Priority to CN201410090639.3A priority Critical patent/CN104915350A/en
Publication of CN104915350A publication Critical patent/CN104915350A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention aims at providing a method and device for obtaining multimedia files based on a P2P mode. Head data relevant information of the multimedia files is obtained; compression head data of the multimedia files are downloaded based on the P2P mode according to the head data relevant information; the compression head data of the multimedia files are decompressed, and original head data of the multimedia data are obtained; the original head data and the playable data downloaded based on the P2P mode are combined to be synthesized into the multimedia files. On one hand, due to the fact that the compression head data generated after the original head data are compressed are obtained, the first buffering duration consumed in the process that the multimedia files are played while being downloaded can be shortened; on the other hand, multiple peer devices exist in a peer network to provide the compression head data, and therefore the obtaining successful rate of the compression head data can be increased by downloading the compression head data based on the P2P mode.

Description

A kind of method and apparatus obtaining multimedia file based on P2P mode
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of technology obtaining multimedia file based on P2P mode.
Background technology
Current, there is multiple acquisition based on P2P mode and the scheme of play multimedia file.Many indexes generally can be adopted to weigh the quality of these schemes, such as, cushion duration first, buffering success ratio etc.
Cushion duration first to refer to, in its subscriber equipment, click the link of multimedia file from user, subscriber equipment obtains multimedia file until subscriber equipment can the time span of play multimedia file.
Some multimedia files, such as MP4, the multimedia file of the data layouts such as FLV, data content wherein comprises original header data and can played data, and original header packet is containing Play Control information, the data volume of original header data is general larger, such as, the MP4 file of a 1GB, the size of its original header data is 3MB, therefore, the data volume transmitting original header data have impact on the first buffering duration of subscriber equipment when play multimedia file.
Summary of the invention
The object of this invention is to provide a kind of method and apparatus obtaining multimedia file based on P2P mode.
According to an aspect of the present invention, provide a kind of method obtaining multimedia file in a user device based on P2P mode, the method comprises:
-obtain the header data relevant information of multimedia file, wherein, described multimedia file comprises the original header data that comprise Play Control information and can played data;
-according to described header data relevant information, the compression header data of described multimedia file is downloaded based on P2P mode;
-decompression is carried out to the compression header data of described multimedia file, to obtain the original header data of described multimedia file;
Wherein, the method also comprises:
-according to the identification information of described multimedia file, based on P2P mode download described multimedia file can played data;
-by described original header data and describedly played data can carry out merging treatment, synthesize described multimedia file.
According to another aspect of the present invention, additionally provide a kind of in peer device for the method for assisting user equipment based on P2P mode downloading multimedia file, wherein, described peer device comprises the original header data of described multimedia file, wherein, the method comprises:
-receive second of one or more data fragmentations of the compression header data for asking described multimedia file from subscriber equipment to obtain request based on P2P mode;
-obtain request according to described second, obtain described multimedia file;
-compression process is carried out, to generate the compression header data of described multimedia file to the original header data of described multimedia file;
-send one or more data fragmentations of described compression header data to described subscriber equipment based on P2P mode.
According to a further aspect of the invention, provide a kind of in a user device for obtaining the device of multimedia file based on P2P mode, wherein, this device comprises:
Relevant information acquisition device, for obtaining the header data relevant information of multimedia file, wherein, described multimedia file comprise as Play Control information original header data and can played data;
Compressing head portion download apparatus, for according to described header data relevant information, downloads the compression header data of described multimedia file based on P2P mode;
Original header acquisition device, for carrying out decompression to the compression header data of described multimedia file, to obtain the original header data of described multimedia file;
Wherein, this device also comprises:
Can played data download apparatus, for the identification information according to described multimedia file, based on P2P mode download described multimedia file can played data;
Multimedia file synthesizer, for by described original header data and describedly played data can carry out merging treatment, synthesizes described multimedia file.
According to a further aspect of the invention, additionally provide a kind of in peer device for the device of assisting user equipment based on P2P mode downloading multimedia file, wherein, described peer device comprises the original header data of described multimedia file, wherein, this device comprises:
Second request receiving device, for receiving one or more data fragmentations of the compression header data for asking described multimedia file from subscriber equipment based on P2P mode second obtains request;
Multimedia file acquisition device, for obtaining request according to described second, obtains described multimedia file;
Compression head generating apparatus, for carrying out compression process to the original header data of described multimedia file, to generate the compression header data of described multimedia file;
Compression head dispensing device, for sending one or more data fragmentations of described compression header data to described subscriber equipment based on P2P mode.
Compared with prior art, the present invention is by obtaining the header data relevant information of multimedia file; Then, according to header data relevant information, based on the compression header data of P2P mode downloading multimedia file; Subsequently, decompression is carried out to the compression header data of multimedia file, to obtain the original header data of multimedia file; Then, by original header data and download based on P2P mode played data can carry out merging treatment, synthesize multimedia file.On the one hand, carry out compressing the rear compression header data generated of process to original header data by obtaining, the data volume of subscriber equipment downloading multimedia file first can be reduced, and then the duration of buffering first reduced in the playing process of download limit, multimedia file limit, thus promote the viewing experience of user when watching multimedia file; On the other hand, compression header data can be provided owing to there is multiple peer device in a peer-to-peer network, therefore by downloading compression header data based on P2P mode, the acquisition success ratio of compression header data can be improved, thus improve the buffering success ratio of subscriber equipment when play multimedia file.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 illustrate according to one aspect of the invention in a user device for obtaining the method flow diagram of multimedia file based on P2P mode;
Fig. 2 illustrates that subscriber equipment in accordance with a preferred embodiment of the present invention and peer device obtain the method flow diagram of original header data alternately;
Fig. 3 illustrate according to a further aspect of the present invention in a user device for obtaining the device schematic diagram of multimedia file based on P2P mode;
Fig. 4 illustrates the device schematic diagram obtaining original header data according to the subscriber equipment of another preferred embodiment of the present invention and peer device alternately.
In accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
In the present invention, the acquisition of multimedia file is by subscriber equipment, the realizing alternately of peer device.Particularly, subscriber equipment obtains the header data relevant information of multimedia file, and wherein, multimedia file comprises the original header data that comprise Play Control information and can played data; Then, subscriber equipment, according to header data relevant information, carrys out the compression header data of downloading multimedia file by peer device based on P2P mode; Subsequently, the compression header data of subscriber equipment to multimedia file carries out decompression, to obtain the original header data of multimedia file; Then, subscriber equipment according to the identification information of multimedia file, based on P2P mode downloading multimedia file can played data; Subsequently, subscriber equipment is by original header data and played data can carry out merging treatment, synthesizes multimedia file.
Wherein, described P2P refers to peer-to-peer network (Peer to Peer is called for short P2P), also known as P-2-P technology, is non-stop layer server, relies on customer group (peers) to exchange the Generation Internet of information.Different from there being the central network system of central server, each user side of peer-to-peer network is a node, also has the function of server, and any one node cannot directly find other nodes, and its family group must be relied on to carry out information interchange.
Wherein, described subscriber equipment includes but not limited to that any one can to carry out the electronic product of man-machine interaction, such as computing machine, mobile phone, smart mobile phone, PDA, panel computer etc. with user by input equipments such as keyboard, touch pad and voice-operated devices.
Wherein, described peer device means, and can carry out other electronic product of communicating with subscriber equipment, e.g., and other computing machine, other mobile phone, other smart mobile phone, other PDA, other panel computer etc.; It both as server, also can use as subscriber equipment, and generally it all has certain resource, such as: enough internal memories and disk; Peer device can enjoy the resource of other equipment, also can provide resource service for other users.
Fig. 1 illustrates the method flow diagram according to one aspect of the invention, and a kind of process obtaining multimedia file is shown.As shown in Figure 1, in step sl, subscriber equipment obtains the header data relevant information of multimedia file, and wherein, multimedia file comprises the original header data that comprise Play Control information and can played data; In step s 2, subscriber equipment according to header data relevant information, based on the compression header data of P2P mode downloading multimedia file; In step s3, the compression header data of subscriber equipment to multimedia file carries out decompression, to obtain the original header data of multimedia file; In step s 4 which, subscriber equipment according to the identification information of multimedia file, based on P2P mode downloading multimedia file can played data; In step s 5, subscriber equipment is by original header data and played data can carry out merging treatment, synthesizes multimedia file.
Constant work between above steps, at this, it will be understood by those skilled in the art that " continuing " refers to that above steps respectively in real time, or according to the mode of operation requirement of setting or real-time adjustment, by subscriber equipment carry out the acquisition of header data relevant information, the compression download of header data, original header data acquisition, can the download of played data, the synthesis of multimedia file, to realize the acquisition of multimedia file.
Particularly, in step sl, subscriber equipment obtains the header data relevant information of multimedia file, and wherein, multimedia file comprises the original header data that comprise Play Control information and can played data.
Wherein, multimedia file includes but not limited to MP4 file, FLV file etc., and the file of these forms comprises original header data and can played data.
To take below multimedia file as MP4 file be example, carry out the elaboration of specific embodiment.
Wherein, original header packet is containing Play Control information.Described Play Control information includes but not limited to the information such as size, decoded time stamp, Presentation Time Stamp of coding/decoding information, each frame.Subscriber equipment need be play MP4 file according to original header data.
Wherein, described header data relevant information comprises:
The compression head size of data of-MP4 file; And
The original header size of data of-MP4 file.
Subscriber equipment based on the identification information of MP4 file, can obtain miscellaneous equipment by carrying out the header data relevant information of inquiring about obtained MP4 file in header data relevant information storehouse.
Wherein, the identification information of MP4 file is as the filename, file ID, file generated date etc. of MP4 file.
Preserve the identification information of MP4 file and the corresponding relation of header data relevant information in header data relevant information storehouse, the header data relevant information corresponding with it can be obtained by the mode of the identification information of inquiry MP4 file.
Wherein, the mode of subscriber equipment acquisition header data relevant information includes but not limited to following 2 kinds:
1) obtained by the network equipment.
Subscriber equipment can send head data association message according to the identification information of MP4 file to the network equipment (e.g., server) and obtain request; Then, after the network equipment receives this acquisition request, the identification information according to MP4 file is inquired about in pre-established header data relevant information storehouse, to obtain the header data relevant information of this MP4 file; Subsequently, the header data relevant information of this MP4 file is supplied to subscriber equipment by the network equipment.
2) obtained by peer device.
Subscriber equipment can carry out according to the identification information of MP4 file the network address inquiring about to obtain the one or more peer devices comprising this MP4 file in LIST SERVER.
Then, subscriber equipment sends the first acquisition request of the header data relevant information for asking this MP4 file to one or more peer device based on P2P mode, first obtains the identification information including but not limited to MP4 file in request, correspondingly, peer device receives the first acquisition request of the header data relevant information for asking MP4 file from subscriber equipment based on P2P mode.
Subsequently, peer device, according to this first acquisition request, carries out the header data relevant information inquiring about to determine MP4 file in header data relevant information storehouse.
Then, when peer device comprises the header data relevant information of MP4 file, peer device sends the header data relevant information of this MP4 file to this subscriber equipment based on P2P mode.
Subsequently, subscriber equipment receives the header data relevant information returned in response to this first acquisition request from least one in one or more peer device based on P2P mode.
After subscriber equipment obtains the header data relevant information of MP4 file, according to the identification information of this header data relevant information and MP4 file, can set up or upgrade header data relevant information storehouse.
Preferably, subscriber equipment does not return the residue peer device transmission head data association message of header data relevant information in one or more peer device.
Particularly, subscriber equipment statistics does not return the residue peer device of header data relevant information, after acquisition header data relevant information, subscriber equipment sends head data association message to these residue peer devices, after this also can provide header data relevant information to other subscriber equipmenies for these residue peer devices.
After these residue peer devices obtain the header data relevant information of MP4 file, also according to the identification information of this header data relevant information, MP4 file and corresponding relation thereof, can set up or upgrade header data relevant information storehouse.
In step s 2, subscriber equipment according to header data relevant information, based on the compression header data of P2P mode downloading multimedia file.
At this, subscriber equipment can according to the compression head size of data in obtained header data relevant information, the compression header data of MP4 file is downloaded based on multiple different P2P mode, such as, the mode of pure P2P network structure, also the central directory server namely do not concentrated, each equipment Network with Random Multiple Access System, and adjacent with oneself one group of neighbor node consists of the network of a Logic coverage end to end connection, it is all directly transmitted by adjacent node broadcast relay that content search between peer node and content are shared, peer device namely as client also as server end, namely the P2P mode of catalogue centralized structure, also have LIST SERVER, and it preserves the information such as the network address of peer device, and peer device issues the information such as its network address to LIST SERVER, peer device namely as client also as server end, mixed equilibrium strategy network structure mode, it combines P2P two kinds of modes of pure P2P and catalogue centralized structure.
Fig. 2 illustrates method flow diagram in accordance with a preferred embodiment of the present invention, and subscriber equipment shown in it and peer device obtain the process of original header data alternately.
Wherein, Fig. 2 only illustrates the reciprocal process of subscriber equipment and a peer device, it will be appreciated by persons skilled in the art that, in the P2P network of reality, subscriber equipment may carry out with multiple stage peer device alternately.
As shown in Figure 2, in step s 201, subscriber equipment, according to header data relevant information, determines the data fragmentation relevant information of the compression header data of multimedia file.
Wherein, described data fragmentation relevant information includes but not limited to the quantity of data fragmentation, the label information of each data fragmentation, the label information etc. of MP4 file belonging to burst ID, data fragmentation.
Subscriber equipment can according to the compression head size of data in obtained header data relevant information, based on predetermined segmentation rules, size as each burst can be 16Kbyte, determine the data fragmentation relevant information of the compression header data of MP4 file, such as, compression head packet draws together 150 data fragmentations, and the burst ID that each data fragmentation is corresponding is 0001,0002,0003 until 0150.
In step S202, subscriber equipment, according to data fragmentation relevant information, sends for asking second of the one or more data fragmentations compressing header data to obtain request to one or more peer device respectively based on P2P mode.
Wherein, subscriber equipment to a peer device request total data burst, when this peer device can not provide total data burst, then can remain the data fragmentation do not obtained to other peer device requests; Subscriber equipment also to different peer devices, can ask different data fragmentations, such as respectively, to peer device 1 request msg burst 0001 to 0020, to peer device 2 request msg burst 0021 to 0040, to peer device 3 request msg burst 0041 to 0060, by that analogy.
What subscriber equipment sent second obtains in request, includes but not limited to the identification information of MP4 file, and the information such as the burst ID of the data fragmentation of asking.
Correspondingly, peer device receives second of one or more data fragmentations of the compression header data for asking multimedia file from subscriber equipment and obtains request based on P2P mode.
In step S203, peer device obtains request according to second, obtains multimedia file.
Peer device can obtain the identification information of the MP4 file in request according to second, by inquiring about the storage space of this peer device, obtain this MP4 file.
In step S204, the original header data of peer device to multimedia file carry out compression process, to generate the compression header data of multimedia file.
Wherein, compress process and can be the compression processing mode such as ZIP compression process, RAR compression process.
The mode that the original header data of peer device to MP4 file carry out compressing process includes but not limited to following 2 kinds:
1) compression process is carried out according to header data relevant information.
When peer device comprises the header data relevant information of MP4 file, peer device can according to the size of original header data, obtain the data division of corresponding original header data in MP4 file, such as, the data division being positioned at the initial 3MByte of file in MP4 file belongs to original header data, then, peer device carries out compression process, to generate the compression header data of MP4 file to this data division.
2) first decoding process is carried out to MP4 file, then carry out compression process.
When peer device does not comprise the header data relevant information of MP4 file, peer device first can carry out decoding process to MP4 file, and to distinguish the data division of corresponding original header data in MP4 file, and correspondence can the data division of played data; Then, the data division of peer device to corresponding original header data carries out compression process, to generate the compression header data of MP4 file.
Wherein, after described peer device carries out decoding process to MP4 file, the header data relevant information of MP4 file can be obtained, then, can according to the identification information of this header data relevant information, MP4 file and corresponding relation thereof, set up or upgrade header data relevant information storehouse, after this also can provide header data relevant information to other subscriber equipmenies for this peer device.
In step S205, peer device sends one or more data fragmentations of compression header data to subscriber equipment based on P2P mode.
Peer device according to compression head size of data, based on predetermined segmentation rules, can determine the data fragmentation of MP4 file; Then, peer device obtains the burst ID of the data fragmentation of asking in request according to second, carrys out the one or more data fragmentations sending compression header data to subscriber equipment, as sent data fragmentation 0021 to 0040.
Correspondingly, subscriber equipment receives based on P2P mode and obtains one or more data fragmentations of asking the compression header data returned from least one in one or more peer device in response to second.
In step s3, the compression header data of subscriber equipment to multimedia file carries out decompression, to obtain the original header data of multimedia file.
Wherein, decompression can be the decompression mode such as ZIP decompression, RAR decompression.
When subscriber equipment carries out decompression, decompression need be performed according to compression head size of data, the compression head size of data shown in header data relevant information that subscriber equipment can obtain this MP4 file based on the identification information of MP4 file by inquiry header data relevant information storehouse, subscriber equipment, also by the mode of sweep compression header data, obtains compression head size of data.
Preferably, as shown in Figure 2, in step S301, subscriber equipment, according to data fragmentation relevant information, determines whether the download compressing header data completes.
The data fragmentation obtained added up by subscriber equipment, and before obtained data fragmentation meets during cutting during the total quantity of established data burst, subscriber equipment can determine that compression header data has been downloaded.
In step s 302, when the download of described compression header data completes, the compression header data of subscriber equipment to multimedia file carries out decompression, to obtain the original header data of multimedia file.
In sum, the original header data of peer device to MP4 file carry out compression process, to generate MP4 compressing file header data, the data volume that MP4 file downloaded first by subscriber equipment can be reduced, and then the duration of buffering first reduced in the playing process of download limit, MP4 file limit, promote the viewing experience of user when watching MP4 file.Such as, for the MP4 file of 1GByte size, original header size of data is 3MByte, and compression head size of data is 800Kbyte, decreases the transmitted data amount of 2.2MByte; If the speed of download of subscriber equipment is 200Kbyte/s, can reduce surge time is first about 10 seconds.
In step s 4 which, subscriber equipment according to the identification information of multimedia file, based on P2P mode downloading multimedia file can played data.
Subscriber equipment based on P2P mode download MP4 file can played data, the mode of download is identical or substantially identical with the mode of the compression header data of above-mentioned download MP4 file, so place repeats no more, and is contained in this by way of reference.
In step s 5, subscriber equipment is by original header data and played data can carry out merging treatment, synthesizes multimedia file.
Subsequently, played multimedia file, watches for user.
Fig. 3 illustrates device schematic diagram according to a further aspect of the present invention, and a kind of device obtaining multimedia file is shown.As shown in Figure 3, subscriber equipment comprise relevant information acquisition device 11, compressing head portion download apparatus 12, original header acquisition device 13, can played data download apparatus 14, multimedia file synthesizer 15.Relevant information acquisition device 11 obtains the header data relevant information of multimedia file, and wherein, multimedia file comprises the original header data that comprise Play Control information and can played data; Compressing head portion download apparatus 12 according to header data relevant information, based on the compression header data of P2P mode downloading multimedia file; The compression header data of original header acquisition device 13 pairs of multimedia files carries out decompression, to obtain the original header data of multimedia file; Can played data download apparatus 14 according to the identification information of multimedia file, based on P2P mode downloading multimedia file can played data; Multimedia file synthesizer 15 is by original header data and played data can carry out merging treatment, synthesizes multimedia file.
Constant work between above-mentioned each device, at this, it will be understood by those skilled in the art that " continuing " refers to above-mentioned each device respectively in real time, or according to the mode of operation requirement of setting or real-time adjustment, the acquisition of header data relevant information is carried out by relevant information acquisition device 11, compressing head portion download apparatus 12 carries out the download compressing header data, original header acquisition device 13 carries out the acquisition of original header data, can played data download apparatus 14 carry out can the download of played data, multimedia file synthesizer 15 carries out the synthesis of multimedia file, to realize the acquisition of multimedia file.
Particularly, relevant information acquisition device 11 obtains the header data relevant information of multimedia file, and wherein, multimedia file comprises the original header data that comprise Play Control information and can played data.
Wherein, multimedia file includes but not limited to MP4 file, FLV file etc., and the file of these forms comprises original header data and can played data.
To take below multimedia file as MP4 file be example, carry out the elaboration of specific embodiment.
Wherein, original header packet is containing Play Control information.Described Play Control information includes but not limited to the information such as size, decoded time stamp, Presentation Time Stamp of coding/decoding information, each frame.Subscriber equipment need be play MP4 file according to original header data.
Wherein, described header data relevant information comprises:
The compression head size of data of-MP4 file; And
The original header size of data of-MP4 file.
Relevant information acquisition device 11 based on the identification information of MP4 file, can obtain miscellaneous equipment by carrying out the header data relevant information of inquiring about obtained MP4 file in header data relevant information storehouse.
Wherein, the identification information of MP4 file is as the filename, file ID, file generated date etc. of MP4 file.
Preserve the identification information of MP4 file and the corresponding relation of header data relevant information in header data relevant information storehouse, the header data relevant information corresponding with it can be obtained by the mode of the identification information of inquiry MP4 file.
Wherein, the mode that relevant information acquisition device 11 obtains header data relevant information includes but not limited to following 2 kinds:
1) obtained by the network equipment.
Relevant information acquisition device 11 can send head data association message according to the identification information of MP4 file to the network equipment (e.g., server) and obtain request; Then, after the network equipment receives this acquisition request, the identification information according to MP4 file is inquired about in pre-established header data relevant information storehouse, to obtain the header data relevant information of this MP4 file; Subsequently, the header data relevant information of this MP4 file is supplied to relevant information acquisition device 11 by the network equipment.
2) obtained by peer device.
Relevant information acquisition device 11 can carry out according to the identification information of MP4 file the network address inquiring about to obtain the one or more peer devices comprising this MP4 file in LIST SERVER.
Peer device comprises the first request receiving device, relevant information determining device, relevant information dispensing device (these three devices are all not shown).
Then, relevant information acquisition device 11 sends the first acquisition request of the header data relevant information for asking this MP4 file to one or more peer device based on P2P mode, first obtains the identification information including but not limited to MP4 file in request, correspondingly, the first request receiving device receives the first acquisition request of the header data relevant information for asking MP4 file from relevant information acquisition device 11 based on P2P mode.
Subsequently, relevant information determining device, according to this first acquisition request, carries out the header data relevant information inquiring about to determine MP4 file in header data relevant information storehouse.
Then, when peer device comprises the header data relevant information of MP4 file, relevant information dispensing device sends the header data relevant information of this MP4 file to relevant information acquisition device 11 based on P2P mode.
Subsequently, relevant information acquisition device 11 receives the header data relevant information returned in response to this first acquisition request from least one in one or more peer device based on P2P mode.
After subscriber equipment obtains the header data relevant information of MP4 file, according to the identification information of this header data relevant information and MP4 file, can set up or upgrade header data relevant information storehouse.
Preferably, subscriber equipment also comprises relevant information sharing apparatus (not shown), and the residue peer device that relevant information sharing apparatus does not return header data relevant information in one or more peer device sends head data association message.
Particularly, relevant information sharing apparatus statistics does not return the residue peer device of header data relevant information, after acquisition header data relevant information, relevant information sharing apparatus sends head data association message to these residue peer devices, after this also can provide header data relevant information to other subscriber equipmenies for these residue peer devices.
After these residue peer devices obtain the header data relevant information of MP4 file, also according to the identification information of this header data relevant information, MP4 file and corresponding relation thereof, can set up or upgrade header data relevant information storehouse.
Compressing head portion download apparatus 12 according to header data relevant information, based on the compression header data of P2P mode downloading multimedia file.
At this, compressing head portion download apparatus 12 can according to the compression head size of data in obtained header data relevant information, the compression header data of MP4 file is downloaded based on multiple different P2P mode, such as, the mode of pure P2P network structure, also the central directory server namely do not concentrated, each equipment Network with Random Multiple Access System, and adjacent with oneself one group of neighbor node consists of the network of a Logic coverage end to end connection, it is all directly transmitted by adjacent node broadcast relay that content search between peer node and content are shared, peer device namely as client also as server end, namely the P2P mode of catalogue centralized structure, also have LIST SERVER, and it preserves the information such as the network address of peer device, and peer device issues the information such as its network address to LIST SERVER, peer device namely as client also as server end, the mode of mixed equilibrium strategy network structure, it combines P2P two kinds of modes of pure P2P and catalogue centralized structure.
Fig. 4 illustrates the device schematic diagram according to another preferred embodiment of the present invention, and the device of subscriber equipment shown in it and the device of peer device obtain original header data alternately.
Wherein, Fig. 4 only illustrates the mutual of the device of subscriber equipment and the device of a peer device, and it will be appreciated by persons skilled in the art that in the P2P network of reality, the device of subscriber equipment may carry out with the device of multiple stage peer device alternately.
As shown in Figure 4, peer device comprises the second request receiving device 21, multimedia file acquisition device 22, compression head generating apparatus 23, compression head dispensing device 24.
Compressing head portion download apparatus 12, according to header data relevant information, determines the data fragmentation relevant information of the compression header data of multimedia file.
Wherein, described data fragmentation relevant information includes but not limited to the quantity of data fragmentation, the label information of each data fragmentation, the label information etc. of MP4 file belonging to burst ID, data fragmentation.
Compressing head portion download apparatus 12 can according to the compression head size of data in obtained header data relevant information, based on predetermined segmentation rules, size as each burst can be 16Kbyte, determine the data fragmentation relevant information of the compression header data of MP4 file, such as, compression head packet draws together 150 data fragmentations, and the burst ID that each data fragmentation is corresponding is 0001,0002,0003 until 0150.
Compressing head portion download apparatus 12, according to data fragmentation relevant information, sends for asking second of the one or more data fragmentations compressing header data to obtain request to one or more peer device respectively based on P2P mode.
Wherein, compressing head portion download apparatus 12 to a peer device request total data burst, when this peer device can not provide total data burst, then can remain the data fragmentation do not obtained to other peer device requests; Compressing head portion download apparatus 12 also to different peer devices, can ask different data fragmentations, such as respectively, to peer device 1 request msg burst 0001 to 0020, to peer device 2 request msg burst 0021 to 0040, to peer device 3 request msg burst 0041 to 0060, by that analogy.
What compressing head portion download apparatus 12 sent second obtains in request, includes but not limited to the identification information of MP4 file, and the information such as the burst ID of the data fragmentation of asking.
Correspondingly, the second request receiving device 21 receives second of one or more data fragmentations of the compression header data for asking multimedia file from compressing head portion download apparatus 12 and obtains request based on P2P mode.
Multimedia file acquisition device 22 obtains request according to second, obtains multimedia file.
Multimedia file acquisition device 22 can obtain the identification information of the MP4 file in request according to second, by inquiring about the storage space of this peer device, obtain this MP4 file.
The original header data of compression head generating apparatus 23 pairs of multimedia files carry out compression process, to generate the compression header data of multimedia file.
Wherein, compress process and can be the compression processing mode such as ZIP compression process, RAR compression process.
The mode that the original header data of compression head generating apparatus 23 pairs of MP4 files carry out compressing process includes but not limited to following 2 kinds:
1) compression process is carried out according to header data relevant information.
When peer device comprises the header data relevant information of MP4 file, compression head generating apparatus 23 can according to the size of original header data, obtain the data division of corresponding original header data in MP4 file, such as, the data division being positioned at the initial 3MByte of file in MP4 file belongs to original header data, then, compression head generating apparatus 23 carries out compression process, to generate the compression header data of MP4 file to this data division.
2) first decoding process is carried out to MP4 file, then carry out compression process.
When peer device does not comprise the header data relevant information of MP4 file, compression head generating apparatus 23 first can carry out decoding process to MP4 file, to distinguish the data division of corresponding original header data in MP4 file, and correspondence can the data division of played data; Then, compression head generating apparatus 23 carries out compression process, to generate the compression header data of MP4 file to the data division of corresponding original header data.
Wherein, after described peer device carries out decoding process to MP4 file, the header data relevant information of MP4 file can be obtained, then, can according to the identification information of this header data relevant information, MP4 file and corresponding relation thereof, set up or upgrade header data relevant information storehouse, after this also can provide header data relevant information to other subscriber equipmenies for this peer device.
Compression head dispensing device 24 sends one or more data fragmentations of compression header data to compressing head portion download apparatus 12 based on P2P mode.
Compression head dispensing device 24 according to compression head size of data, based on predetermined segmentation rules, can determine the data fragmentation of MP4 file; Then, compression head dispensing device 24 obtains the burst ID of the data fragmentation of asking in request according to second, carry out the one or more data fragmentations sending compression header data to compressing head portion download apparatus 12, as sent data fragmentation 0021 to 0040.
Correspondingly, compressing head portion download apparatus 12 receives based on P2P mode and obtains one or more data fragmentations of asking the compression header data returned from least one in one or more peer device in response to second.
The compression header data of original header acquisition device 13 pairs of multimedia files carries out decompression, to obtain the original header data of multimedia file.
Wherein, decompression can be the decompression mode such as ZIP decompression, RAR decompression.
When original header acquisition device 13 carries out decompression, decompression need be performed according to compression head size of data, the compression head size of data shown in header data relevant information that original header acquisition device 13 can obtain this MP4 file based on the identification information of MP4 file by inquiry header data relevant information storehouse, original header acquisition device 13, also by the mode of sweep compression header data, obtains compression head size of data.
Preferably, as shown in Figure 4, original header acquisition device 13, according to data fragmentation relevant information, determines whether the download compressing header data completes.
Original header acquisition device 13 adds up the data fragmentation obtained, and before obtained data fragmentation meets during cutting during the total quantity of established data burst, original header acquisition device 13 can determine that compression header data has been downloaded.
When the download of described compression header data completes, the compression header data of original header acquisition device 13 pairs of multimedia files carries out decompression, to obtain the original header data of multimedia file.
In sum, the original header data of compression head generating apparatus 23 pairs of MP4 files carry out compression process, to generate MP4 compressing file header data, the data volume that MP4 file downloaded first by subscriber equipment can be reduced, and then the duration of buffering first reduced in the playing process of download limit, MP4 file limit, promote the viewing experience of user when watching MP4 file.Such as, for the MP4 file of 1GByte size, original header size of data is 3MByte, and compression head size of data is 800Kbyte, decreases the transmitted data amount of 2.2MByte; If the speed of download of subscriber equipment is 200Kbyte/s, can reduce surge time is first about 10 seconds.
Can played data download apparatus 14 according to the identification information of multimedia file, based on P2P mode downloading multimedia file can played data.
Can played data download apparatus 14 based on P2P mode download MP4 file can played data, the mode of download is identical or substantially identical with the mode of the compression header data of above-mentioned download MP4 file, so place repeats no more, and is contained in this by way of reference.
Multimedia file synthesizer 15 is by original header data and played data can carry out merging treatment, synthesizes multimedia file.
Subsequently, played multimedia file, watches for user.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in system claims or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.

Claims (16)

1., in a user device for obtaining a method for multimedia file based on P2P mode, wherein, the method comprises:
-obtain the header data relevant information of multimedia file, wherein, described multimedia file comprises the original header data that comprise Play Control information and can played data;
-according to described header data relevant information, the compression header data of described multimedia file is downloaded based on P2P mode;
-decompression is carried out to the compression header data of described multimedia file, to obtain the original header data of described multimedia file;
Wherein, the method also comprises:
-according to the identification information of described multimedia file, based on P2P mode download described multimedia file can played data;
-by described original header data and describedly played data can carry out merging treatment, synthesize described multimedia file.
2. method according to claim 1, wherein, the step of the header data relevant information of described acquisition multimedia file comprises:
-obtain request to one or more peer device transmission for asking first of the header data relevant information of this multimedia file based on P2P mode;
-receive based on the mode of P2P the described header data relevant information returned in response to this first acquisition request from least one in described one or more peer device.
3. method according to claim 2, wherein, the method also comprises:
-residue the peer device that do not return described header data relevant information in described one or more peer device sends described header data relevant information.
4. according to the method in any one of claims 1 to 3, wherein, the step of the compression header data of the described multimedia file of described download comprises:
-according to described header data relevant information, determine the data fragmentation relevant information of the compression header data of described multimedia file;
-according to described data fragmentation relevant information, send the second acquisition request of the one or more data fragmentations for asking described compression header data respectively to described one or more peer device based on P2P mode;
-the one or more data fragmentations obtaining the described compression header data that request returns from least one in described one or more peer device in response to described second are received based on P2P mode;
Wherein, the described compression header data to described multimedia file is carried out decompression and is comprised with the step of the original header data obtaining described multimedia file:
-according to described data fragmentation relevant information, determine whether the download of described compression header data completes;
-when the download of described compression header data completes, decompression is carried out to the compression header data of described multimedia file, to obtain the original header data of described multimedia file.
5. method according to any one of claim 1 to 4, wherein, described header data relevant information comprises:
The compression head size of data of-described multimedia file; And
The original header size of data of-described multimedia file.
6. in peer device for the method for assisting user equipment based on P2P mode downloading multimedia file, wherein, described peer device comprises the original header data of described multimedia file, and wherein, the method comprises:
-receive second of one or more data fragmentations of the compression header data for asking described multimedia file from subscriber equipment to obtain request based on P2P mode;
-obtain request according to described second, obtain described multimedia file;
-compression process is carried out, to generate the compression header data of described multimedia file to the original header data of described multimedia file;
-send one or more data fragmentations of described compression header data to described subscriber equipment based on P2P mode.
7. method according to claim 6, wherein, when described peer device comprises the header data relevant information of described multimedia file, wherein, the step that the described original header data to multimedia file carry out compressing process comprises:
-according to described header data relevant information, compression process is carried out, to generate the compression header data of described multimedia file to the original header data of described multimedia file.
8. method according to claim 7, wherein, the method also comprises:
-based on P2P mode receive from described subscriber equipment the header data relevant information for asking described multimedia file first obtain request;
-obtain request according to described first, in header data relevant information storehouse, carry out the header data relevant information inquiring about to determine described multimedia file;
-send the header data relevant information of described multimedia file to described subscriber equipment based on P2P mode.
9., in a user device for obtaining a device for multimedia file based on P2P mode, wherein, this device comprises:
Relevant information acquisition device, for obtaining the header data relevant information of multimedia file, wherein, described multimedia file comprises the original header data that comprise Play Control information and can played data;
Compressing head portion download apparatus, for according to described header data relevant information, downloads the compression header data of described multimedia file based on P2P mode;
Original header acquisition device, for carrying out decompression to the compression header data of described multimedia file, to obtain the original header data of described multimedia file;
Wherein, this device also comprises:
Can played data download apparatus, for the identification information according to described multimedia file, based on P2P mode download described multimedia file can played data;
Multimedia file synthesizer, for by described original header data and describedly played data can carry out merging treatment, synthesizes described multimedia file.
10. device according to claim 9, wherein, described relevant information acquisition device is used for:
-obtain request to one or more peer device transmission for asking first of the header data relevant information of this multimedia file based on P2P mode;
-receive based on the mode of P2P the described header data relevant information returned in response to this first acquisition request from least one in described one or more peer device.
11. devices according to claim 10, wherein, this device also comprises:
Relevant information sharing apparatus, sends described header data relevant information for the residue peer device not returning described header data relevant information in described one or more peer device.
12. devices according to any one of claim 9 to 11, wherein, described compressing head portion download apparatus is used for:
-according to described header data relevant information, determine the data fragmentation relevant information of the compression header data of described multimedia file;
-according to described data fragmentation relevant information, send the second acquisition request of the one or more data fragmentations for asking described compression header data respectively to described one or more peer device based on P2P mode;
-the one or more data fragmentations obtaining the described compression header data that request returns from least one in described one or more peer device in response to described second are received based on P2P mode;
Wherein, described original header acquisition device is used for:
According to described data fragmentation relevant information, determine whether the download of described compression header data completes;
-when the download of described compression header data completes, decompression is carried out to the compression header data of described multimedia file, to obtain the original header data of described multimedia file.
13. devices according to any one of claim 9 to 12, wherein, described header data relevant information comprises:
The compression head size of data of-described multimedia file; And
The original header size of data of-described multimedia file.
14. 1 kinds in peer device for the device of assisting user equipment based on P2P mode downloading multimedia file, wherein, described peer device comprises the original header data of described multimedia file, and wherein, this device comprises:
Second request receiving device, for receiving one or more data fragmentations of the compression header data for asking described multimedia file from subscriber equipment based on P2P mode second obtains request;
Multimedia file acquisition device, for obtaining request according to described second, obtains described multimedia file;
Compression head generating apparatus, for carrying out compression process to the original header data of described multimedia file, to generate the compression header data of described multimedia file;
Compression head dispensing device, for sending one or more data fragmentations of described compression header data to described subscriber equipment based on P2P mode.
15. devices according to claim 14, wherein, when described peer device comprises the header data relevant information of described multimedia file, wherein, compression head generating apparatus is used for:
-according to described header data relevant information, compression process is carried out, to generate the compression header data of described multimedia file to the original header data of described multimedia file.
16. devices according to claim 15, wherein, this device also comprises:
First request receiving device, for receiving the first acquisition request of the header data relevant information for asking described multimedia file from described subscriber equipment based on P2P mode;
Relevant information determining device, for obtaining request according to described first, carries out the header data relevant information inquiring about to determine described multimedia file in header data relevant information storehouse;
Relevant information dispensing device, for sending the header data relevant information of described multimedia file to described subscriber equipment based on P2P mode.
CN201410090639.3A 2014-03-12 2014-03-12 Method and device for obtaining multimedia files based on P2P mode Pending CN104915350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410090639.3A CN104915350A (en) 2014-03-12 2014-03-12 Method and device for obtaining multimedia files based on P2P mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410090639.3A CN104915350A (en) 2014-03-12 2014-03-12 Method and device for obtaining multimedia files based on P2P mode

Publications (1)

Publication Number Publication Date
CN104915350A true CN104915350A (en) 2015-09-16

Family

ID=54084421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410090639.3A Pending CN104915350A (en) 2014-03-12 2014-03-12 Method and device for obtaining multimedia files based on P2P mode

Country Status (1)

Country Link
CN (1) CN104915350A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111031117A (en) * 2019-12-02 2020-04-17 深圳市迅雷网络技术有限公司 Multimedia file downloading method and related device
CN111429871A (en) * 2020-03-20 2020-07-17 腾讯音乐娱乐科技(深圳)有限公司 Media file acquisition method and device, storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744500A (en) * 2004-09-03 2006-03-08 微软公司 Systems and methods for distributed streaming of scalable media
CN101448139A (en) * 2009-01-08 2009-06-03 中国科学院计算技术研究所 A P2P network based digital media program order method
CN102082807A (en) * 2009-12-01 2011-06-01 突触计算机系统(上海)有限公司 File transmitting method and device based on multiple protocols
CN102196008A (en) * 2010-03-08 2011-09-21 株式会社日立制作所 Peer-to-peer download method, video device and content delivery method
CN102883188A (en) * 2012-10-16 2013-01-16 北京千橡网景科技发展有限公司 Method and system of downloading and playing MP4 files in real time

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744500A (en) * 2004-09-03 2006-03-08 微软公司 Systems and methods for distributed streaming of scalable media
CN101448139A (en) * 2009-01-08 2009-06-03 中国科学院计算技术研究所 A P2P network based digital media program order method
CN102082807A (en) * 2009-12-01 2011-06-01 突触计算机系统(上海)有限公司 File transmitting method and device based on multiple protocols
CN102196008A (en) * 2010-03-08 2011-09-21 株式会社日立制作所 Peer-to-peer download method, video device and content delivery method
CN102883188A (en) * 2012-10-16 2013-01-16 北京千橡网景科技发展有限公司 Method and system of downloading and playing MP4 files in real time

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111031117A (en) * 2019-12-02 2020-04-17 深圳市迅雷网络技术有限公司 Multimedia file downloading method and related device
CN111429871A (en) * 2020-03-20 2020-07-17 腾讯音乐娱乐科技(深圳)有限公司 Media file acquisition method and device, storage medium

Similar Documents

Publication Publication Date Title
US10616301B2 (en) Request-based encoding for streaming content portions
US9332051B2 (en) Media manifest file generation for adaptive streaming cost management
CN103379362B (en) VOD method and system
US8887215B2 (en) Targeted high-value content in HTTP streaming video on demand
CN104581374B (en) A kind of method, node and server for obtaining section file and generating sub- m3u8 files
US9204180B2 (en) Method, server and terminal for audio and video on demand
CN102694831B (en) Mobile terminal streaming compensation data method and system, content distributing network
US20120246335A1 (en) Method, terminal, and server for implementing fast playout
US20140114768A1 (en) Output of content from the internet on a media rendering device
EP3734927A1 (en) Content service implementation method and device, and content delivery network node
CN102055718B (en) Method, device and system for layering request content in http streaming system
EP2151970A1 (en) Processing and supplying video data
JP2013515401A (en) Audio splitting at codec applicable frame size
WO2015192683A1 (en) Content distribution method, device and system based on adaptive streaming technology
CN106817587B (en) Video stream generating/sharing method and system, terminal device and server cluster
CN102883216A (en) Video live broadcasting method and apparatus
CN105228001A (en) The method and system that a kind of FLV format video is play online
CN105187950B (en) A kind of method, apparatus and system that video file plays
CN102883185A (en) Video-on-demand method and equipment thereof
CN106331763A (en) Method of playing slicing media files seamlessly and device of realizing the method
US9060044B2 (en) System and method to actively transfer video content across device during video playback (active playback)
CN106921634A (en) Media stream method of multicasting and device
CN105187295A (en) Method for realizing bubble display on client, client, server and system
CN104915350A (en) Method and device for obtaining multimedia files based on P2P mode
US10708330B2 (en) Multimedia resource management method, cloud server and electronic apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150916