TWI407727B - A Method and System of Data Transmission Based on Peer - to - Peer P2P - Google Patents
A Method and System of Data Transmission Based on Peer - to - Peer P2P Download PDFInfo
- Publication number
- TWI407727B TWI407727B TW96127032A TW96127032A TWI407727B TW I407727 B TWI407727 B TW I407727B TW 96127032 A TW96127032 A TW 96127032A TW 96127032 A TW96127032 A TW 96127032A TW I407727 B TWI407727 B TW I407727B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- transmission data
- transmission
- sender
- type
- Prior art date
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
Description
本發明是關於點對點(P2P)技術領域,更具體地說,本發明是關於一種基於P2P的資料傳輸方法及系統。The present invention relates to the field of point-to-point (P2P) technology, and more particularly to a P2P-based data transmission method and system.
P2P起源於最初的網際網路通信方式,如在建築物內個人電腦(PC)通過區域網路互聯,不同建築物間通過數據機(Modem)遠端撥號互聯。建立在傳輸控制協定(TCP)/網際協定(IP)協定之上的通信模式構成了今日網際網路的基礎,所以從基礎技術角度看,P2P不是新技術,而是新的應用技術模式。雖然對P2P的研究從未停止,今天P2P再一次被關注主要是由於Napster等共用類軟體以及即時通訊類軟體的出現。P2P originated from the initial Internet communication method, such as connecting personal computers (PCs) in a building through a regional network, and dialing interconnections between different buildings through modems. The communication mode built on the Transmission Control Protocol (TCP)/Internet Protocol (IP) protocol forms the basis of today's Internet. Therefore, from the perspective of basic technology, P2P is not a new technology, but a new application technology model. Although the research on P2P has never stopped, today P2P is once again concerned mainly because of the emergence of shared software such as Napster and instant messaging software.
現在網際網路主要以伺服器(Server)/瀏覽器(Browser)或伺服器(Server)/用戶端(Client)結構的應用模式為主,這樣的應用必須在網路內設置至少一個伺服器,資訊通過伺服器才可以傳遞。在這種模式下,資訊或是先集中上傳到伺服器保存,然後再分別下載(如網站),或是資訊按伺服器上專有規則處理後才可在網路上傳遞流動(如郵件)。Now the Internet is mainly based on the server (Browser) or Server (Server) / Client (Client) structure of the application mode, such applications must set up at least one server in the network, Information can only be passed through the server. In this mode, information can be uploaded to the server for storage, then downloaded separately (such as a website), or the information can be processed on the server to pass the flow (such as mail) on the network.
目前基於P2P技術的應用有很多種,即時通信技術便是其中一種典型代表性技術。在即時通信應用中,兩個或多個用戶相互使用文字、語音或檔案進行交流,這種交流方式很快速和直接,並且易於同非PC網路設備(如PDA、手機等)通信,而且它不依賴設備即可辨別用戶。由於利用P2P技術可以弱化甚至擺脫對中央伺服器的依賴,這樣的通信更接近非網際網路通信模式。在目前的即時通信應用中,視訊通訊是一項非常廣泛的應用,隨著視訊通訊的普及,用戶對視訊通訊的各種需求越來越多,其中,多人視訊就是一個非常迫切的需求。但是,人們已經不滿足單純進行多人視訊,人們更希望在視訊的同時能加入更多的元素,比如以文本聊天方式輔助視訊聊天,聊天時給對方發送自定義圖像,以及檔案共用等等。At present, there are many applications based on P2P technology, and instant communication technology is one of the typical representative technologies. In instant messaging applications, two or more users communicate with each other using text, voice, or files. This communication is fast and straightforward, and is easy to communicate with non-PC network devices (such as PDAs, cell phones, etc.). Users can be identified without relying on the device. Since P2P technology can be used to weaken or even get rid of the dependence on the central server, such communication is closer to the non-internet communication mode. In the current instant messaging applications, video communication is a very wide-ranging application. With the popularity of video communication, users have more and more demands for video communication. Among them, multi-person video is a very urgent need. However, people are no longer satisfied with multi-person video. People want to add more elements to the video, such as text chat to assist video chat, chat to send custom images, and file sharing.
在即時通信應用中,多人資料共用的實現可以解釋為實現多人文本聊天功能和多人檔案共用等附加資料傳輸功能。現有的多人文本聊天和多人檔案共用都是基於伺服器/用戶端模式的,就是發送者的文本資訊或者檔案會首先被傳輸到伺服器,再由伺服器把文本資訊或檔案分發給其他人。在這種技術中,需要使用額外的伺服器來轉發相應的資料,從而不但增加了成本的投入,還破壞了原有的P2P音視訊系統結構。In instant messaging applications, the implementation of multi-person data sharing can be interpreted as an additional data transfer function such as multi-person text chat and multi-person file sharing. The existing multi-person text chat and multi-person file sharing are based on the server/client mode, that is, the sender's text information or file will be transmitted to the server first, and then the server will distribute the text information or file to other servers. people. In this technology, an additional server is needed to forward the corresponding data, which not only increases the cost investment, but also destroys the original P2P audio and video system structure.
除了即時通信技術之外,基於P2P的技術還有Farsite(Microsoft)、Ocean Store等資料存儲軟體;Napster等實現資料共用類軟體;Infrasearch、Pointera等資料搜索及查詢類軟體;Netbatch(Intel)等協同計算軟體;Groove等資料或行動協同軟體以及大量基於P2P的遊戲軟體,事實上許多網路遊戲也是P2P方式的,尤其是那些雙人及多人對弈遊戲。在上述這些基於P2P的應用中通常也會涉及到不同類型的資料傳輸的問題,如果使用額外的伺服器來轉發相應的資料顯然也會增加成本的投入,而如何節約成本是任何一種P2P傳輸方式都應重點關注的。In addition to instant messaging technology, P2P-based technologies include Farsite (Microsoft), Ocean Store and other data storage software; Napster and other data sharing software; Infrasearch, Pointera and other data search and query software; Netbatch (Intel) and other collaboration Computational software; Groove and other data or mobile collaboration software and a large number of P2P-based game software, in fact, many online games are also P2P, especially those games for two and more people. In these P2P-based applications, different types of data transmission problems are usually involved. If an additional server is used to forward the corresponding data, it will obviously increase the cost, and how to save costs is any P2P transmission method. All should be focused on.
有鑒於此,本發明的主要目的是提出一種基於P2P的資料傳輸方法,以降低成本。In view of this, the main object of the present invention is to propose a P2P-based data transmission method to reduce costs.
本發明的另一目的是提出一種基於P2P的資料傳輸系統,以降低成本。Another object of the present invention is to propose a P2P-based data transmission system to reduce costs.
為達到上述目的,本發明的技術方案是這樣實現的:一種基於P2P的資料傳輸方法,該方法預先在發送方和接收方之間建立P2P連接,該方法還包括:A、發送方根據傳輸資料的類型對所述傳輸資料進行標識,並基於所述P2P連接向接收方發送所述經過標識的傳輸資料,其中所述傳輸資料的類型至少為一種;B、接收方解析所接收到的傳輸資料以獲取該傳輸資料的標識,並依據該標識所對應的類型對所述傳輸資料進行處理。To achieve the above objective, the technical solution of the present invention is implemented as follows: a P2P-based data transmission method, which pre-establishes a P2P connection between a sender and a receiver, and the method further includes: A, the sender according to the transmission data The type identifies the transmission data, and sends the identified transmission data to the receiver based on the P2P connection, wherein the type of the transmission data is at least one type; B, the receiver parses the received transmission data Obtaining an identifier of the transmission data, and processing the transmission data according to a type corresponding to the identifier.
一種基於P2P的資料傳輸系統,該系統包括:發送方,用於根據傳輸資料的類型對所述傳輸資料進行標識,並基於P2P連接向接收方發送所述經過標識的傳輸資料,其中所述傳輸資料的類型至少為一種;接收方,用於解析所接收到的傳輸資料以得到該傳輸資料的標識,並依據該標識所對應的類型對所述傳輸資料進行處理;所述發送方和接收方之間的連接為P2P連接。A P2P-based data transmission system, the system comprising: a sender, configured to identify the transmission data according to a type of transmission data, and send the identified transmission data to a receiver based on a P2P connection, wherein the transmission The type of the data is at least one type; the receiving side is configured to parse the received transmission data to obtain an identifier of the transmission data, and process the transmission data according to a type corresponding to the identifier; the sender and the receiver The connection between them is a P2P connection.
從上述技術方案中可以看出,在本發明的基於P2P的資料傳輸方法中,發送方根據傳輸資料的類型對傳輸資料進行標識,並基於P2P連接向接收方發送所述經過標識的傳輸資料,接收方解析傳輸資料以獲取傳輸資料的標識,並依據標識所對應的類型對傳輸資料進行處理。由此可見,應用本發明以後,能夠節約成本地發送不同類型的傳輸資料。另外,本發明還可以在P2P多人音視訊通訊的基礎上,對已有的音視訊通道重複利用,實現了無需伺服器分發的多人文本聊天、多人檔案共用等多人資料共用,並且可以保證音視訊通訊的流暢性。As can be seen from the above technical solution, in the P2P-based data transmission method of the present invention, the sender identifies the transmission data according to the type of the transmission data, and transmits the identified transmission data to the receiver based on the P2P connection. The receiver parses the transmission data to obtain the identification of the transmission data, and processes the transmission data according to the type corresponding to the identifier. It can be seen that after applying the invention, different types of transmission data can be transmitted at a cost-effective manner. In addition, the present invention can also reuse existing audio and video channels on the basis of P2P multi-person audio and video communication, and realize multi-person data sharing such as multi-person text chat and multi-person file sharing without server distribution, and It can guarantee the smoothness of audio and video communication.
為使本發明的目的、技術方案和優點表達得更加清楚明白,下面結合附圖及具體實施例對本發明再作進一步詳細的說明。The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
本發明的主要構想是:在P2P通信模式中,在發送方對不同類型的資料進行標識,接收方根據標識對不同的資料進行相應的處理,以實現利用同一資料通道來傳送不同種類的資料,且無需採用額外的伺服器,從而極大地節約成本。The main idea of the present invention is: in the P2P communication mode, the sender identifies different types of data, and the receiver performs corresponding processing on different data according to the identification, so as to realize different types of data by using the same data channel. There is no need to use additional servers, which results in significant cost savings.
圖1為本發明的基於P2P傳輸資料的示範性方法流程圖。該方法預先在發送方和接收方之間建立P2P連接,如圖1所示,該方法還包括:步驟101:發送方根據傳輸資料的類型對所述傳輸資料進行標識,並基於所述P2P連接向接收方發送所述經過標識的傳輸資料,其中傳輸資料的類型至少為一種。1 is a flow chart of an exemplary method for transmitting data based on P2P according to the present invention. The method pre-establishes a P2P connection between the sender and the receiver. As shown in FIG. 1, the method further includes: Step 101: The sender identifies the transmission data according to the type of the transmission data, and based on the P2P connection. Sending the identified transmission data to the recipient, wherein the type of the transmission data is at least one.
對於僅用於傳送資料的資料通道而言,其實並不關心傳輸的是什麼內容。因此,可以對不同類型的資料分別進行標識,然後再將標識後的資料統一通過P2P連接的資料通道進行傳送。For a data channel that is only used to transfer data, it does not really care what is being transmitted. Therefore, different types of data can be separately identified, and then the identified data is uniformly transmitted through the P2P connected data channel.
步驟102:接收方解析傳輸資料以獲取傳輸資料的標識,並依據標識所對應的類型對傳輸資料進行處理。Step 102: The receiver parses the transmission data to obtain an identifier of the transmission data, and processes the transmission data according to the type corresponding to the identifier.
接收方獲取傳輸資料後,首先對傳輸資料進行解析以獲取標識,然後依據標識所對應的類型對傳輸資料進行處理。After receiving the transmission data, the receiver first parses the transmission data to obtain the identifier, and then processes the transmission data according to the type corresponding to the identifier.
在這裏,由於接收方接收的傳輸資料有多種,因此需要區別進行處理。可以首先對傳輸資料進行解析以獲取標識,然後依據標識所對應的類型對傳輸資料進行處理。Here, since there are many kinds of transmission data received by the receiver, it is necessary to distinguish the processing. The transmission data may be parsed first to obtain an identifier, and then the transmission data is processed according to the type corresponding to the identifier.
比如,下面以即時通訊應用中的音視訊聊天為例對本發明進行說明。For example, the present invention will be described below by taking an audio video chat in an instant messaging application as an example.
首先,當多人在進行P2P通訊時,將會在每兩個人之間建立起一條資料通道,以用於傳輸資料的傳輸。比如,當N個人進行多人視訊時,那麼每個人都會和其他N-1個人建立起資料通道,然後通過這些通道把自己的音視訊資料傳輸給其他N-1個人,同時接收來自其他N-1個人的音視訊資料,從而進行音視訊通訊。First, when multiple people are engaged in P2P communication, a data channel will be established between each two people for transmission of data. For example, when N people perform multi-person video, then everyone will establish a data channel with other N-1 people, and then transmit their audio and video data to other N-1 people through these channels, while receiving other N- 1 person's audio and video data, thus audio and video communication.
然而,對於音視訊資料通道而言,雖然是專門用來傳輸音視訊資料的,但其實音視訊資料通道並不關心傳輸的是什麼資料,利用這一點,可以充分地利用這些音視訊通道,讓其傳輸一些附加的資料,從而實現額外的通訊功能。根據本發明,可以對資料進行標識,從而便於解析並處理不同類型的資料。由於底層通道對於任何資料的傳輸都一視同仁,所以在傳輸之前需要對資料進行標識,然後接收方根據不同的標識解析出不同類型的資料,從而進行不同的處理。同時,由於利用的是音視訊通道,所以要考慮對音視訊通訊的影響,而不應該像一般的通道一樣直接進行資料的發送和接收。為了保證音視訊通訊的流暢,需要有源源不斷的資料流程在音視訊通道上進行傳輸。那麼在使用此通道傳輸附加資料時就要把對音視訊資料傳輸的影響降到最低,使之不會對音視訊通訊的流暢度產生過大影響。However, for the audio and video data channel, although it is specifically used to transmit audio and video data, in fact, the audio and video data channel does not care what data is transmitted. With this, the audio and video channels can be fully utilized. It transmits some additional information to enable additional communication functions. According to the present invention, data can be identified to facilitate parsing and processing different types of data. Since the underlying channel is the same for any data transmission, the data needs to be identified before transmission, and then the receiver parses different types of data according to different identifiers, thereby performing different processing. At the same time, since the audio and video channels are utilized, the influence on the audio and video communication should be considered, and the data transmission and reception should not be directly performed like a normal channel. In order to ensure the smoothness of audio and video communication, an active data flow is required to be transmitted on the audio and video channels. Then, when using this channel to transmit additional data, the impact on the transmission of audio and video data should be minimized so that it does not have a great influence on the smoothness of audio and video communication.
下面分別對應用本發明的發送方和接收方的傳輸方式進行說明。The transmission methods of the sender and the receiver to which the present invention is applied will be described below.
圖2為根據本發明發送方發送資料的示範性流程示意圖。如圖2所示,該方法包括:步驟201:對不同類型的資料分別加入相應的標識,然後將資料統一加入資料發送佇列;發送方在傳輸之前需要對資料進行標識,從而接收方能根據不同的標識解析出不同類型的資料,以進行不同的處理。在這裏,發送方對資料的標識跟功能需求有關,因為接收方對不同的功能資料將做不同的處理。比如,視訊資料需要解碼並顯示、文本聊天資料需要在聊天框顯示、圖片資料需要以相應的圖片格式解析並顯示等。因此在發送方,將對應於第一功能的資料加入第一功能資料標識,將對應於第二功能的資料加入第二功能資料標識,將對應於第三功能的資料加入第三功能資料標識等。發送方對不同功能(也就是不同種類)的資料加入了不同的標識後,將這些資料統一加入資料發送佇列。在這裏,傳輸資料可以為音頻資料、視訊資料、電子檔、即時通訊資訊中的任一種或其中多於一種的任意組合。2 is a schematic flow chart of a sender transmitting data according to the present invention. As shown in FIG. 2, the method includes: Step 201: adding corresponding identifiers to different types of data, and then uniformly adding data to the data sending queue; the sender needs to identify the data before transmitting, so that the receiving party can Different identifiers parse different types of data for different processing. Here, the sender's identification of the data is related to the functional requirements, because the receiver will handle different functional data differently. For example, video data needs to be decoded and displayed, text chat data needs to be displayed in a chat box, and image data needs to be parsed and displayed in a corresponding picture format. Therefore, the sender adds the data corresponding to the first function to the first function data identifier, adds the data corresponding to the second function to the second function data identifier, and adds the data corresponding to the third function to the third function data identifier. . After the sender adds different identifiers to the data of different functions (that is, different types), the data is uniformly added to the data transmission queue. Here, the transmission data may be any one of audio material, video data, electronic file, instant messaging information, or any combination of more than one of them.
步驟201:從發送佇列中獲取資料,並且向不同的用戶發送。Step 201: Obtain data from the sending queue and send it to different users.
由於P2P的傳送方式優選對應於多個用戶,也就是說優選對應於多個發送方和接收方,在這裏優選向不同的接收方發送資料。同理,其他的發送方具有相同或者相似的發送流程。Since the transmission mode of the P2P preferably corresponds to a plurality of users, that is to say preferably corresponding to a plurality of senders and receivers, it is preferred here to transmit data to different recipients. Similarly, other senders have the same or similar sending process.
當發送方的數目至少為兩個,每個發送方根據傳輸資料的類型對其所發送的傳輸資料分別進行標識,其中各發送方對相同類型的傳輸資料採用相同的標識,並且每個發送方基於P2P連接向接收方發送所述經過標識的傳輸資料。When the number of senders is at least two, each sender separately identifies the transmission data sent by the sender according to the type of the transmission data, wherein each sender uses the same identifier for the same type of transmission data, and each sender The identified transmission data is transmitted to the recipient based on the P2P connection.
這樣就實現了多種功能的資料向多個用戶分發的方式。而對於接收方,也同樣要建立起多路數據的接收和多種功能資料的解析處理等機制。對應於圖2所示的流程,圖3為根據本發明接收方接收資料的示範性流程示意圖。如圖3所示,包括:步驟301:接收來自不同用戶的資料,並將所有資料加入資料處理佇列;由於P2P的傳送方式優選對應於多個用戶,也就是說優選對應於多個發送方和接收方,在這裏優選從不同的發送方接收資料,並將所有資料加入資料處理佇列。This enables a way to distribute multiple functions of data to multiple users. For the receiver, it is also necessary to establish mechanisms for receiving multiple channels of data and parsing and processing multiple functional data. Corresponding to the flow shown in FIG. 2, FIG. 3 is a schematic flow chart of receiving data by a receiver according to the present invention. As shown in FIG. 3, the method includes: Step 301: Receive data from different users, and add all data to the data processing queue; since the P2P transmission mode preferably corresponds to multiple users, that is, preferably corresponds to multiple senders And the recipient, where it is preferred to receive data from different senders and to add all data to the data processing queue.
步驟302:從資料處理佇列中獲取並解析資料,對應於不同標識的資料進行相應的處理。Step 302: Acquire and parse the data from the data processing queue, and perform corresponding processing corresponding to the data of different identifiers.
在這裏,首先從資料處理佇列中獲取資料,然後對資料進行解析以得到相應的標識,並且對標識所對應的資料進行分別的處理。比如對視訊資料進行解碼並顯示、對文本聊天資料需要在聊天框進行顯示、對圖片資料以相應的圖片格式解析並顯示等。也就是說,對不同的功能的資料做不同的處理。Here, the data is first obtained from the data processing queue, and then the data is parsed to obtain the corresponding identification, and the data corresponding to the identification is separately processed. For example, the video data is decoded and displayed, the text chat data needs to be displayed in the chat box, the picture data is parsed and displayed in the corresponding picture format, and the like. In other words, different materials are processed differently.
其中,當接收方的數目至少為兩個時,每個接收方解析其所接收到的傳輸資料以獲取傳輸資料的標識,並對標識相同的傳輸資料依據與標識相對應的類型統一進行處理。Wherein, when the number of the receivers is at least two, each receiver parses the received transmission data to obtain the identifier of the transmission data, and uniformly processes the transmission data with the same identifier according to the type corresponding to the identifier.
顯然,根據上述方法,通過對P2P多人音視訊通道的重複利用,可以完成多用戶多功能的系統,比如在多人音視訊聊天的同時進行多人文本聊天。圖4為根據本發明示範性實施例的多人音視訊和文本聊天的示意圖。由圖4可見,多個用戶在進行多人音視訊聊天的同時,還能夠進行文本聊天,從而極大地促進了聊天的親密感受,並且不需要對現有伺服器架構進行改進,而且還極大地節約了成本。Obviously, according to the above method, by reusing the P2P multi-person audio video channel, a multi-user multi-function system can be completed, such as multi-person text chat while multi-person audio video chat. 4 is a schematic diagram of multi-person audio and video chat according to an exemplary embodiment of the present invention. As can be seen from FIG. 4, multiple users can perform text chat while performing multi-person audio and video chat, thereby greatly promoting the intimate feeling of the chat, and does not need to improve the existing server architecture, and also greatly saves The cost.
另外,當應用本發明到即時通訊應用中的多人聊天時,由於利用的是音視訊通道來傳送附加資料,所以需要考慮附加資料對音視訊通訊的影響,優選不直接進行資料的發送和接收。為了保證音視訊通訊的流暢,需要有源源不斷的資料流程在音視訊通道上進行傳輸,因此在使用此通道傳輸附加資料時就要把對音視訊資料傳輸的影響降到最低,使之不會對音視訊通訊的流暢度產生任何不好影響。本發明優選對附加資料的傳輸頻率進行控制,避免對音視訊流暢度造成影響。In addition, when the present invention is applied to multi-person chat in an instant messaging application, since the audiovisual channel is used to transmit additional data, it is necessary to consider the influence of the additional data on the audiovisual communication, and it is preferable not to directly transmit and receive the data. . In order to ensure the smoothness of audio and video communication, an active data flow is required to be transmitted on the audio and video channels. Therefore, when using this channel to transmit additional data, the impact on audio and video data transmission should be minimized, so that it will not It has any bad influence on the smoothness of audio and video communication. The present invention preferably controls the transmission frequency of the additional data to avoid affecting the audio and video fluency.
當附加傳輸資料過大的時候,不但要通過加入標識對資料進行分片傳輸,還要控制其傳輸的頻率,否則就有可能由於附加資料的大量傳輸而導致音視訊資料的阻塞,從而影響音視訊通訊的流暢性。When the additional transmission data is too large, not only the data transmission is performed by adding the identification, but also the frequency of transmission is controlled. Otherwise, the audio and video data may be blocked due to the large amount of additional data transmission, thereby affecting the audio and video information. The fluency of communication.
因此,本發明優選在發送傳輸資料之前,發送方預先將各種類型的傳輸資料等間隔混合。由於資料發送佇列的存在,所以只要附加資料加入資料發送佇列的間隔是一定的,則發送的時候按佇列順序取資料發送的間隔也是一定的,這樣就可以忽略由於網路原因造成的網路傳輸波動。所以,對於音視訊資料而言,加入資料發送佇列的時候是連續加入的,而附加資料在加入資料發送佇列的時候是等間隔插入的,這樣傳輸資料就是等間隔混合的。因此只要定期的從發送佇列順序獲取資料進行發送,就可以保證資料發送的時間間隔是一定的。Therefore, in the present invention, it is preferable that the sender preliminarily mixes various types of transmission materials at intervals before transmitting the transmission material. Due to the existence of the data transmission queue, as long as the interval between the additional data and the data transmission queue is fixed, the interval for sending data in the order of the transmission is also fixed, so that the network may be ignored. Network transmission fluctuations. Therefore, for audio and video data, when the data transmission queue is added, it is continuously added, and the additional data is inserted at equal intervals when adding the data transmission queue, so that the transmission data is mixed at equal intervals. Therefore, as long as the data is periodically sent from the transmission queue order, the time interval for data transmission is guaranteed to be constant.
在這裏,在所述經過等間隔混合的傳輸資料中,可以每N個音/視訊資料間隔M個附加資料,其中N為大於或等於1的正整數,M也為大於或等於1的正整數。本發明對N和M的取值並無限定,N的值既可以大於M,也可以小於M,還可以等於M。比如,當N等於3的時候,可以每3個音/視訊資料間隔1個附加資料,也可以每3個音/視訊資料間隔2個附加資料,還可以每3個音/視訊資料間隔3個附加資料,一般選擇每三個音視訊資料插入一個附加資料。Here, in the equally spaced mixed transmission data, M additional data may be spaced every N audio/video data, where N is a positive integer greater than or equal to 1, and M is also a positive integer greater than or equal to 1. . The value of N and M is not limited in the present invention, and the value of N may be greater than M, or may be smaller than M, and may be equal to M. For example, when N is equal to 3, there may be 1 additional data per 3 audio/video data, or 2 additional data per 3 audio/video data intervals, or 3 intervals per 3 audio/video data. Additional information, generally choose to insert an additional data for every three audio and video data.
顯然,以上雖然以N等於3為例進行說明,但是本發明對N的取值並無任何限定。Obviously, although N is equal to 3 as an example, the present invention does not limit the value of N.
圖5為根據本發明一實施例的發送佇列示意圖。圖5中圓狀資料為音視訊資料,塊狀資料為附加資料,由圖5可見,每隔3個音視訊資料等間隔插入1個附加資料,其中附加資料可以為電子檔、即時通訊資訊(文本聊天資訊)等。FIG. 5 is a schematic diagram of a transmission queue according to an embodiment of the invention. In Fig. 5, the circular data is audio and video data, and the block data is additional data. As can be seen from Fig. 5, one additional data is inserted at intervals of every three audio and video data, and the additional data can be electronic files and instant messaging information ( Text chat information) and so on.
圖6為本發明的基於P2P傳輸資料系統的示範性結構示意圖。如圖6所示,該系統包括若干終端,其中每一終端既可為發送方,又可為接收方。該系統包括:發送方,用於根據傳輸資料的類型對所述傳輸資料進行標識,並基於P2P連接向接收方發送所述經過標識的傳輸資料,其中傳輸資料的類型至少為一種;接收方,用於解析傳輸資料以得到傳輸資料的標識,並依據標識所對應的類型對傳輸資料進行處理;所述發送方和接收方之間的連接為P2P連接。FIG. 6 is a schematic diagram of an exemplary structure of a P2P transmission data system according to the present invention. As shown in FIG. 6, the system includes a plurality of terminals, wherein each terminal can be either a sender or a receiver. The system includes: a sender, configured to identify the transmission data according to a type of the transmission data, and send the identified transmission data to the receiver based on the P2P connection, wherein the type of the transmission data is at least one type; the receiving party, The identifier for parsing the transmission data to obtain the transmission data, and processing the transmission data according to the type corresponding to the identifier; the connection between the sender and the receiver is a P2P connection.
較佳地,所述發送方的數目至少為兩個,所述接收方的數目至少為兩個。Preferably, the number of the senders is at least two, and the number of the receivers is at least two.
每個發送方,用於根據傳輸資料的類型對其所發送的傳輸資料分別進行標識,其中各發送方對相同類型的傳輸資料採用相同的標識,每個發送方進一步用於基於所述P2P連接向接收方發送所述經過標識的傳輸資料。Each sender is configured to separately identify the transmission data sent by the sender according to the type of the transmission data, wherein each sender uses the same identifier for the same type of transmission data, and each sender is further used to connect based on the P2P The identified transmission data is sent to the recipient.
每個接收方,用於解析其所接收到的傳輸資料以獲取傳輸資料的標識,並對標識相同的傳輸資料依據與標識相對應的類型統一進行處理。Each receiving party is configured to parse the transmission data received by the receiver to obtain an identifier of the transmission data, and uniformly process the transmission data with the same identification according to the type corresponding to the identifier.
更佳地,所述傳輸資料的類型至少為兩種,所述發送方進一步用於,在發送傳輸資料之前將各種類型的傳輸資料等間隔混合。其中經過等間隔混合的傳輸資料包括音/視訊資料和附加資料,一般情況下可以選擇每三個音/視訊資料間隔一個附加資料。More preferably, the type of transmission data is at least two types, and the sender is further configured to equally mix various types of transmission materials before transmitting the transmission data. The transmission data that is mixed at equal intervals includes audio/video data and additional data. In general, an additional data can be selected for every three audio/video data.
由此可見,應用本發明以後,可以在P2P多人音視訊通訊的基礎上,對已有的音視訊通道可以重複利用,從而實現了無需伺服器分發的多人文本聊天、多人檔共用等多人資料共用。It can be seen that after the application of the invention, the existing audio and video channels can be reused on the basis of P2P multi-person audio and video communication, thereby realizing multi-person text chat, multi-person file sharing, etc. without server distribution. Multi-person data sharing.
以上所述,僅為本發明的較佳實施例而已,並非用於限定本發明的保護範圍。凡在本發明的精神和原則之內,所作的任何修改、等效替換、改進等,均應包含在本發明的保護範圍之內。The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the invention are intended to be included within the scope of the invention.
圖1為本發明的基於P2P傳輸資料的示範性方法流程圖;圖2為根據本發明發送方發送資料的示範性流程示意圖;圖3為根據本發明接收方接收資料的示範性流程示意圖;圖4為根據本發明示範性實施例的多人音視訊和文本聊天的示意圖;圖5為根據本發明一實施例的發送佇列示意圖;圖6為本發明的基於P2P傳輸資料的系統的示範性結構示意圖。1 is a flow chart of an exemplary method for transmitting data based on P2P according to the present invention; FIG. 2 is a schematic flow chart of transmitting data by a sender according to the present invention; FIG. 3 is a schematic flow chart of receiving data by a receiver according to the present invention; 4 is a schematic diagram of multi-person audio video and text chat according to an exemplary embodiment of the present invention; FIG. 5 is a schematic diagram of a transmission queue according to an embodiment of the present invention; FIG. 6 is an exemplary embodiment of a P2P transmission data-based system according to the present invention; Schematic.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW96127032A TWI407727B (en) | 2007-07-25 | 2007-07-25 | A Method and System of Data Transmission Based on Peer - to - Peer P2P |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW96127032A TWI407727B (en) | 2007-07-25 | 2007-07-25 | A Method and System of Data Transmission Based on Peer - to - Peer P2P |
Publications (2)
Publication Number | Publication Date |
---|---|
TW200906108A TW200906108A (en) | 2009-02-01 |
TWI407727B true TWI407727B (en) | 2013-09-01 |
Family
ID=44722992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW96127032A TWI407727B (en) | 2007-07-25 | 2007-07-25 | A Method and System of Data Transmission Based on Peer - to - Peer P2P |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI407727B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1228221A (en) * | 1997-05-13 | 1999-09-08 | 松下电器产业株式会社 | Packet transmitter |
CN1403914A (en) * | 2001-08-31 | 2003-03-19 | 英业达集团(上海)电子技术有限公司 | Method of transmitting multimedia data with infrared ray in electronic equipment |
CN1578278A (en) * | 2003-07-01 | 2005-02-09 | 微软公司 | Transport system for instant messaging |
CN1625161A (en) * | 2003-12-02 | 2005-06-08 | 腾讯科技(深圳)有限公司 | Method and system of information playback in immediate communication |
TW200519627A (en) * | 2003-12-12 | 2005-06-16 | Microsoft Corp | System and method for realtime messaging having image sharing feature |
-
2007
- 2007-07-25 TW TW96127032A patent/TWI407727B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1228221A (en) * | 1997-05-13 | 1999-09-08 | 松下电器产业株式会社 | Packet transmitter |
CN1403914A (en) * | 2001-08-31 | 2003-03-19 | 英业达集团(上海)电子技术有限公司 | Method of transmitting multimedia data with infrared ray in electronic equipment |
CN1578278A (en) * | 2003-07-01 | 2005-02-09 | 微软公司 | Transport system for instant messaging |
CN1625161A (en) * | 2003-12-02 | 2005-06-08 | 腾讯科技(深圳)有限公司 | Method and system of information playback in immediate communication |
TW200519627A (en) * | 2003-12-12 | 2005-06-16 | Microsoft Corp | System and method for realtime messaging having image sharing feature |
Also Published As
Publication number | Publication date |
---|---|
TW200906108A (en) | 2009-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2007140721A1 (en) | A method and system for data transmission based on peer to peer | |
US7921157B2 (en) | Duplicating digital streams for digital conferencing using switching technologies | |
CN103069755B (en) | Use the method and system that the instant message of multiple client instance transmits | |
CN101872555B (en) | Real-time interactive teaching system based on application-layer multicast services | |
CN103535004B (en) | Method for promoting anonymity audio and video communication and system based on web | |
US20150149566A1 (en) | Messaging service active device | |
US9130761B2 (en) | Method and system for data transmission | |
CN105227418B (en) | Data channel establishing method and communication equipment | |
CN105681260A (en) | Cloud storage file transmission method, fusion communication platform, sending end and system | |
Xue et al. | A WebRTC-based video conferencing system with screen sharing | |
US20130080513A1 (en) | Multi-party communication sessions via broadcast notification network | |
CN104348700B (en) | Method and system for issuing microblog | |
CN105323537A (en) | Video conferencing with mobile platform | |
US20090024739A1 (en) | Endpoint discriminator in network transport protocol startup packets | |
CN105376075A (en) | Chat room voice direct broadcasting system and voice direct broadcasting method based on web | |
CN101212474A (en) | Instant messaging based file publishing method | |
Zhao et al. | A mobile real-time video system using RTMP | |
TWI407727B (en) | A Method and System of Data Transmission Based on Peer - to - Peer P2P | |
Timmerer et al. | Guest editorial adaptive media streaming | |
CN113572678A (en) | Instant messaging method realized based on websocket | |
WO2010045830A1 (en) | Method and apparatus for implementing stream media service | |
CN105306870A (en) | File processing methods and devices | |
CN109743530B (en) | Multi-party video conference method and system, server, computer equipment and medium | |
CN115134628B (en) | Streaming media transmission method, streaming media transmission device, terminal equipment and storage medium | |
KR100621328B1 (en) | Method and System for Providing Multimedia Streaming Service by Using Information on Multicasting |