Embodiment
The embodiment of the invention provides a kind of P2P live video node data shared method, Apparatus and system, can improve the performance of P2P net cast, optimizes play quality, improves reliability and autgmentability.For making purpose of the present invention, technical scheme and advantage clearer, the embodiment that develops simultaneously with reference to the accompanying drawings, the present invention is described in more detail.
Situation as the above-mentioned background technical Analysis, video-audio data and other data available information in same local area network (LAN) between the node of use P2P Video service can't be shared, specifically, on the one hand, when having a plurality of nodes to watch same program in the same local area network (LAN), they will download a large amount of redundant datas that repeat from the local area network (LAN) external node, not only make the average delay of downloading data be subject to the very large impact of the factor such as packet loss and time-delay in the Internet Transmission, and internet backbone network has also been caused many unnecessary resource occupation; On the other hand, because node can't effectively be learnt the data available information of other nodes in the same local area network (LAN), the video data download request of its transmission depends on the data available information that external node provides greatly, so the download of its video-audio data is may be owing to the data available information updating of external node slow or can not in time arrive and be affected.
For this reason, the present invention proposes at needs and carry out disposing between the local area network (LAN) of P2P net cast performance optimization and the Internet (Internet) agency plant, as shown in Figure 1, the system that provides for the embodiment of the invention one disposes schematic diagram.This agency plant is between WLAN (wireless local area network) and Internet based on 802.11b, be used for the video-audio data through this agency plant is carried out buffer memory, and data request packet and/or data available packets of information done corresponding processing, can the user clustering of same program will be watched in the same local area network (LAN) like this, thereby make these users can work in coordination with the necessary video-audio data of this program of downloading and playing, thereby greatly reduce each node users is obtained data from local area network (LAN) external node user demand.
As shown in Figure 2, the method flow diagram for the embodiment of the invention two P2P live video node datas are shared comprises following process:
Step 201, from the network flow data bag, the P2P video streaming data packet is separated;
If comprise video data request bag in the described P2P video streaming data packet of step 202, then in buffer area, search and whether include the video-audio data of asking in the described video data request bag in the pre-stored data, when in described buffer area, finding the video-audio data of described video data request, extract and send to the user who sends video data request bag.
The embodiment of the invention has solved the problem that realizes the information sharings such as video-audio data between the node that uses the P2P Video service in same local area network (LAN).
Need to prove, can also comprise in the above-mentioned flow process: the data available packets of information in the described P2P video streaming data packet is integrated processing, comprise the data available packets of information in the described P2P video streaming data packet that is sent to the targeted customer in the described local area network (LAN) by external user is integrated processing, will send to the interior targeted customer of described local area network (LAN) through the data available packets of information of integrating after processing.
Like this, the interior node of same local area network (LAN) can be effectively solved and the problem of the data available information of other nodes can't be effectively learnt, thereby greatly increase the requested probability of video-audio data in the buffer area, shortened the average time that the local area network (LAN) internal node is downloaded video-audio data.
As shown in Figure 3, the method flow diagram for the embodiment of the invention three P2P live video node datas are shared comprises following process:
Step 301, based on deep-packet detection (DPI, Deep Packet Inspection) technology detects the application layer load of network flow data bag, by the characteristic information of P2P video streaming data packet, the P2P video streaming data packet is separated from the network flow data bag;
Step 302, for the video-audio data bag in the described P2P video streaming data packet, according to the program stream under the described video-audio data bag and playing sequence in program stream, be kept at corresponding position in the buffer area;
Need to prove, consider the characteristic that net cast is real-time, the preservation of video-audio data bag is only for up-to-date a period of time, and too outmoded information will be replaced, thereby finishes complete function with less cost.
Step 303, the data available packets of information in the described P2P video streaming data packet that is sent to the targeted customer in the described local area network (LAN) by external user is integrated processing, will send to targeted customer in the described local area network (LAN) through integrating the data available packets of information of processing again afterwards;
Particularly, at first, reception send to data available packets of information in the described P2P video streaming data packet of the targeted customer in the described local area network (LAN) by external user; Then, obtaining the identification information of the data block that identifies in the described data available packets of information, is the positional information of the video-audio data piece of same playing sequence according to the data block that identifies with this identification information of buffer memory, generates the data available information of buffer area; Again the data available information of the buffer area of the described data available packets of information that receives and generation is integrated modification; At last, amended data available packets of information is sent to targeted customer in the described local area network (LAN).
Like this, data available packets of information after the integration that destination node obtains had both comprised the data available information of original neighbor node, comprise again the data available information of corresponding data in the buffer area, thereby provide the more efficiently selection that video data is downloaded of carrying out for destination node.
Need to prove that herein described data available packets of information can show the positional information of video-audio data piece, the form of its performance has a lot, and for example in order to the index information of the positional information that shows the video-audio data piece, the present invention is not restricted its form of expression.
Step 304, the video data request bag in the described P2P video streaming data packet is carried out analyzing and processing, in buffer area, search and whether include the video-audio data of asking in the described video data request bag in the pre-stored data, when in described buffer area, finding the video-audio data of described video data request, extract and send to the user who sends video data request bag.
Particularly, at first, the video data request bag in the described P2P video streaming data packet is analyzed, obtained the playing sequence information of video-audio data piece; Then, in buffer area, search the video-audio data of pre-stored described video data request according to described playing sequence information, need to prove that pre-stored video-audio data is the application layer load of network flow data bag to be detected and the video-audio data bag separated at every turn in the described buffer area; If in described buffer area, find the video-audio data of described video data request, then this video-audio data is extracted and sends to the user who sends video data request bag.Simultaneously, can shield this video data request to requested user.If do not find the video-audio data of described video data request, then this video data request can be continued to send to requested user.
Like this, can reduce the risk of bringing owing to unstable networks, also reduce on the whole the download time of data.
In order more specifically to set forth the concrete processing procedure of data available packets of information and video data request bag, further set forth below by two embodiment.
As shown in Figure 4, be the process chart of the embodiment of the invention four data available packets of information, comprise following process:
Step 401, the data available packets of information that sends to the destination node in the local area network (LAN) from external node of receiving is resolved, read the identification information of the data block that identifies in this data available packets of information;
Step 402, to find the data block that identifies with this identification information according to the identification information in this data available packets of information in buffer area be the video-audio data piece of same playing sequence position;
Step 403, extract in the buffer area data available information that generates based on the positional information of the video-audio data piece of described same playing sequence position; Need to prove that the generating mode of described data available information has a variety of, for example, the position that stores video-audio data is labeled as 1, the position of not storing video-audio data is labeled as 0; The present invention is not construed as limiting for the concrete generating mode of data available information.
Step 404, the data available information that the data available packets of information that receives and buffer area are generated are integrated modification;
Particularly, can be as shown in Figure 5, to the data available information of the information in the data available packets of information that receives and buffer area generation, OR operation is carried out in step-by-step, obtains integrating amended data available information.
Step 405, amended data available packets of information is sent to targeted customer in the described local area network (LAN).
Need to prove, after by present embodiment the data available packets of information being integrated processing, send to again the targeted customer in the local area network (LAN), can effectively solve canned data in the buffer area like this, be the data available information of same local area network (LAN) interior nodes, to the sightless problem of internal node, thereby greatly increase the requested probability of video-audio data in the buffer area, also greatly shortened the average time that the local area network (LAN) internal node is downloaded video-audio data.
Described video data request bag can comprise: video data download request bag and video data upload request bag.The below specifies its processing procedure as an example of video data download request bag example, because the processing procedure of video data upload request bag is the inverse process of video data download request bag, so processing procedure that can reference video data download request bag, this paper does not do too much explanation.
As shown in Figure 6, the process chart for the embodiment of the invention five video data download request bags specifically comprises following process:
Step 601, the video data download request bag from local area network (LAN) inside that receives is analyzed, obtained the playing sequence information of video-audio data piece;
Step 602, utilize described playing sequence information in buffer area, to search video-audio data corresponding to described video data download request, then change step 603 over to if find the video-audio data of described video data download request, otherwise change step 605 over to;
Corresponding video-audio data in step 603, the extraction buffer area;
Step 604, the video-audio data that extracts sent to the user who sends the foradownloaded video request of data; Requested user is shielded this video data download request;
Step 605, this video data download request is continued to send to requested user.
Obviously, the P2P video frequency program of watching in same local area network (LAN) is more concentrated, and it is just larger to search the possibility of hitting in buffer memory, reducing because the risk that unstable networks is brought, and it is also just more obvious to reduce the effect of the aspects such as download time performance of data.
As shown in Figure 7, the shared structure drawing of device of P2P live video node data for the embodiment of the invention six provides comprises: packet identification module 710, request processing module 730, wherein:
Described packet identification module 710 is used for from the network flow data bag P2P video streaming data packet being separated;
Described request processing module 730, comprise video data request bag if be used for described packet identification module 710 isolated P2P video streaming data packet, then in buffer area, search and whether include the video-audio data of asking in the described video data request bag in the pre-stored data, when in described buffer area, finding the video-audio data of described video data request, extract and send to the user who sends video data request bag.
In addition, described device can further include: data maintenance module 720, wherein,
Described data maintenance module 720 comprises the video-audio data bag if be used for described packet identification module 710 isolated P2P video streaming data packet, then described video-audio data bag is kept in the buffer area; Wherein, described data maintenance module 720 can be kept at corresponding position in the buffer area with the video-audio data bag according to the program stream under the described video-audio data bag and the playing sequence in program stream.
In addition, need to prove, described packet identification module 710 is when Separation of the packets, can detect based on the application layer load of deep packet inspection technical to the network flow data bag, by the characteristic information of P2P video streaming data packet, the P2P video streaming data packet is separated from the network flow data bag.
In addition, the structure of the embodiment of the invention six can also be done further improvement, wherein: also comprise available information polymerization module 740, be used for the data available packets of information of described packet identification module 710 isolated P2P video streaming data packet is integrated processing, comprise the data available packets of information in the described P2P video streaming data packet that is sent to the targeted customer in the described local area network (LAN) by external user is integrated processing, will send to the interior targeted customer of described local area network (LAN) through the data available packets of information of integrating after processing.
As shown in Figure 8, the structure chart of the available information polymerization module that provides for the embodiment of the invention seven comprises: receiving element 800, acquiring unit 810, generation unit 820, revise unit 830, transmitting element 840, wherein:
Described receiving element 800 is used for receiving the data available packets of information that is sent to the described P2P video streaming data packet of the targeted customer in the described local area network (LAN) by external user;
Described acquiring unit 810 is used for obtaining the identification information of the data block that described data available packets of information identifies;
Described generation unit 820, the data block that identifies with this identification information that is used for according to buffer memory is the positional information of the video-audio data piece of same playing sequence, generates the data available information of buffer area;
Described modification unit 830 is used for the data available information of the buffer area of the described data available packets of information that receives and generation is integrated modification;
Described transmitting element 840 is for the targeted customer who amended data available packets of information is sent in the described local area network (LAN).
As shown in Figure 9, the concrete structure figure of the request processing module that provides for the embodiment of the invention eight comprises: obtain unit 910, search unit 920, and processing unit 930; Wherein:
Described acquisition unit 910 is used for the video data request bag of described P2P video streaming data packet is analyzed, and obtains the playing sequence information of video-audio data piece;
The described unit 920 of searching is used for searching the video-audio data of described video data request at buffer area according to described playing sequence information;
Described processing unit 930, if be used for the described video-audio data that unit 920 finds described video data request of searching, then this video-audio data is extracted and sends to the user of transmission video data request bag, also can shield this video data request to requested user; If describedly search the video-audio data that unit 920 does not find described video data request, then described processing unit 930 is used for this video data request is continued to send to requested user.
Need to prove that described video data request bag can comprise: video data download request bag and video data upload request bag.
As shown in figure 10, the agency plant Organization Chart that provides for the embodiment of the invention nine.Wherein, packet identification module 1010 is by using deep packet inspection technical, application layer load to Internet network flow and wireless lan network stream packets detects, series of features information by the P2P video streaming data packet, the P2P video streaming data packet is separated from network flow, and transferred to respectively other resume module in the system according to P2P video streaming data packet dissimilar.Particularly, data maintenance module 1020 video-audio data bag that packet identification module 1010 is separated according to the program stream under it and in stream playing sequence be kept at corresponding position in the video-audio data buffer area.In addition, data maintenance module 1020 also externally provides convenient, flexible data query and the interface of extraction, be included as request processing module 1040 inquiries and obtain the interface of ad-hoc location video-audio data, and be the interface that available information polymerization module 1030 is extracted the available information of certain data block in the buffer area.Available information polymerization module 1030 is processed by external node and is sent to data available information in the P2P net cast stream of local area network (LAN) internal node (be this node can for the metamessage of the data of downloading) bag, the data available information of this program in itself and the system cache district is integrated modification, will be transmitted to destination node in the local area network (LAN) through integrating data available packets of information after processing.Like this, in the data available packets of information after the integration that destination node obtains, both comprise the data available information of its original neighbor node, comprised again the data available information of corresponding data in the buffer area, thereby can more effectively widen the selection that data are downloaded.1040 pairs of request processing module are sent to as the external node video data by internal node and download or the upload request bag is processed, in the buffer area of corresponding program, detect the data of asking whether by local area network (LAN) in other nodes download or upload, if there is no, then this video data download or upload request bag are continued to be transmitted to destination node, if exist, then directly this part data recovery to requesting node, and being masked this video data, downloads or upload request destination node, thereby reduced the risk of bringing owing to network instability, reduced on the whole download or the uplink time of data.
Under a local area network (LAN) of using technical solution of the present invention, there are several to watch the P2P net cast node of certain identical sports event live broadcast, the nearest video-audio data that these nodes are downloaded from the P2P node of local area network (LAN) outside all is buffered in as shown in figure 10 the agency plant as in the buffer area of this program distribution, because the characteristic of P2P transmission, the order of the video-audio data that each node receives is not quite similar, therefore the video-audio data in the buffer area is equivalent in this local area network (LAN) the superset of data in each node self buffer area, buffer area in the agency plant just is equivalent to a potential super node that the video-audio data download of this program can be provided so, and because the existence of available information flowcollector aggregation scheme FlowCollector, data available information in the agency plant buffering area can send to the interior node of local area network (LAN) by real-time explicitly, and therefore this potential super node has been exposed to the node in the local area network (LAN).Like this, when certain node need to be asked downloading data in the local area network (LAN), if this part data really by other nodal caches under this local area network (LAN) in agency plant, then desired data be processed and directly be returned to this request just can directly by agency plant, and do not need to send to again the node of local area network (LAN) outside, thereby reduced the time of data acquisition.Therefore, watch that under this local area network (LAN) the node of this sports event live broadcast is more, then the video-audio data of agency plant buffer area is just more complete, and its function is also just more obvious.
In sum, the method that this paper provides a kind of P2P live video node data to share, Apparatus and system, video-audio data and the data available information of watching the user of same program in the WLAN (wireless local area network) can be integrated, and be allowed to condition between the user and shared, thereby make these nodes in playing process, there is more chance from the buffer memory of same local area network (LAN), to download or uploading data, and then reduce the average time that it obtains video-audio data, also reduce by originally from external network node, downloading or the problem such as packet loss time-delay that uploading data produces and the infringement that brings to play quality.Learn that by the contrast experiment in the situation of employing technical solution of the present invention useless, the general start-up time of video node is more than 40 seconds; And in the situation that has adopted technical solution of the present invention, the average startup of video node time-delay reduced in 20 seconds, and for the startup time-delay of the video node of new adding reduce can be more obvious.
One of ordinary skill in the art will appreciate that and realize that all or part of step that above-described embodiment method is carried is to come the relevant hardware of instruction to finish by program, described program can be stored in a kind of computer-readable recording medium, this program comprises step of embodiment of the method one or a combination set of when carrying out.
In addition, each functional unit in each embodiment of the present invention can be integrated in the processing module, also can be that the independent physics of unit exists, and also can be integrated in the module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, also can adopt the form of software function module to realize.If described integrated module realizes with the form of software function module and during as independently production marketing or use, also can be stored in the computer read/write memory medium.
The above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
More than method, Apparatus and system that P2P live video node data provided by the present invention is shared be described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand the solution of the present invention; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.