WO2022252083A1 - Data transmission method and apparatus, and electronic device and storage medium - Google Patents

Data transmission method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2022252083A1
WO2022252083A1 PCT/CN2021/097487 CN2021097487W WO2022252083A1 WO 2022252083 A1 WO2022252083 A1 WO 2022252083A1 CN 2021097487 W CN2021097487 W CN 2021097487W WO 2022252083 A1 WO2022252083 A1 WO 2022252083A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
substream
sending
stream
sub
Prior art date
Application number
PCT/CN2021/097487
Other languages
French (fr)
Chinese (zh)
Inventor
郭小东
张海波
唐飞龙
郭铭潇
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2021/097487 priority Critical patent/WO2022252083A1/en
Priority to CN202180098643.2A priority patent/CN117441337A/en
Publication of WO2022252083A1 publication Critical patent/WO2022252083A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs

Definitions

  • the present application relates to the technical field of data processing, and in particular to a data transmission method, device, electronic equipment and storage medium.
  • Data transmission is a communication process that transmits data from a data source to a data terminal through one or more data links according to certain procedures.
  • a good data transmission method can improve the real-time and reliability of data transmission, making data transmission faster, safer and more efficient.
  • CDN content delivery network
  • the decentralized real-time streaming media transmission based on the distribution tree method is the most widely used data transmission method.
  • each node participating in the data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through corresponding child nodes on the transmission tree.
  • the above data transmission method is highly dependent on the uplink bandwidth of a single node, and disconnection of a certain node will cause data transmission failure of all child nodes under the node. Therefore, the data transmission method has low bandwidth utilization, poor invulnerability, and low data transmission efficiency.
  • the embodiment of the present application provides a data transmission method, device, electronic equipment, and storage medium.
  • the convective transmission can be greatly reduced.
  • the data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
  • the embodiment of the present application provides a data transmission method, the method including:
  • the first sending node is different from the second sending node; the first substream and the second substream are both Consisting of chunks of data in an original stream, said first substream is different from said second substream.
  • the transmission efficiency of the entire transmission network is higher.
  • the first requesting node sends a first request to the first sending node, where the first request is used to request the first sending node to send the first substream.
  • a first requesting node sends a second request to a second sending node, where the second request is used to request the second sending node to send a second substream.
  • the first substream and the second substream are obtained by dividing the original stream, and the first substream and the second substream are not completely the same.
  • the first requesting node receives the first sub-stream and the second sub-stream.
  • the embodiment of the present application divides the original stream into the first sub-stream and the second sub-stream, and further divides the transmission process of the original stream into the first sub-stream and the second sub-stream, thereby improving the efficiency of the entire transmission network. transmission efficiency.
  • the current data transmission method usually uses a distribution tree-based method for decentralized real-time streaming media transmission.
  • Each node participating in data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through the corresponding child nodes on the transmission tree. Therefore, the uplink bandwidth of a single node is highly dependent, and the disconnection of a certain node will cause data transmission failure of all child nodes under the node.
  • the data transmission method provided by the embodiment of the present application adopts the process of splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmissions, which can greatly reduce the number of convection transmission networks.
  • the data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
  • the method also includes:
  • the first requesting node after receiving the first substream and the second substream, decodes the first substream and the second substream to obtain the original stream.
  • the transmission efficiency of the entire transmission network is improved by dividing the original stream into the first sub-stream and the second sub-stream, and then splitting the transmission process of the original stream into the first sub-stream and the second sub-stream. .
  • the original stream includes a first file block and a second file block
  • both the first sub-stream and the second sub-stream include the first file block and the second file Data blocks in blocks.
  • a possible implementation manner of dividing substreams is provided by describing data blocks included in the first substream and the second substream.
  • Divide the original stream into two or more file blocks each file block includes two or more data blocks. Indexes of all data blocks are numbered in time order, and the data blocks are divided into different sub-streams according to the data block indexes, so that each divided sub-stream includes at least one data block in each file block.
  • the original stream is divided into a first file block and a second file block, and the first file block and the second file block include two or more data blocks.
  • the data block is divided into the first sub-stream or the second sub-stream according to the data block index, so as to realize the purpose of dividing the original stream into the first sub-stream and the second sub-stream.
  • the first substream includes at least one data block in the first file block and at least one data block in the second file block
  • the second substream includes at least one data block in the first file block and the second file block At least one data block in the block.
  • the substream division method provided by the embodiment of the present application makes the divided first substream and second substream both include at least one data block in the first file block and at least one data block in the second file block, ensuring that the first After receiving the first sub-stream and the second sub-stream, a requesting node can restore the original stream by encoding the first sub-stream and the second sub-stream, thereby improving data transmission efficiency.
  • the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block;
  • the second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
  • a possible implementation manner of substream redundancy coding is provided by describing the data blocks included in the first file block and the second file block. Divide the original stream into two or more file blocks, each file block contains two or more data blocks. Perform forward error correction code (Forward Error Correction, FEC) encoding on the data blocks in each file block to obtain new redundant data blocks, and add the redundant data blocks to the corresponding file blocks, so that each file block
  • FEC Forward Error Correction
  • the data blocks in are the data blocks in the original stream, or the data blocks obtained by redundantly encoding the file blocks.
  • the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block
  • the data blocks in the second file block are data blocks in the original stream, or is a data block obtained by redundantly encoding the second file block.
  • redundant coding of the file block is performed, and redundant data blocks are added to the file block, so as to realize the purpose of redundant coding of the substream.
  • the newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which improves the reliability and stability of sub-stream transmission.
  • the size of the first file block is determined by the data block type and the data block size in the original stream
  • the size of the second file block is determined by the data block in the original stream The type and block size are determined.
  • the size of the divided file block is determined by the type and size of the data block included in the original stream.
  • the original streams transmitted in different application scenarios are different, and the data types and sizes contained in them are different. Therefore, the size of divided file blocks should be adjusted adaptively according to the application scenarios, which can improve the efficiency of data transmission.
  • both the first request and the second request include remaining bandwidth information of the first requesting node; the first requesting node sends the first request and the second request the requesting node; the remaining bandwidth information of the first requesting node is used by the first sending node to determine whether to send the first sub-stream, and is used by the second sending node to determine whether to send the second sub-stream .
  • the substream request sent by the first requesting node includes remaining bandwidth information of the first requesting node.
  • the sending node may receive substream requests from multiple requesting nodes. At this time, the sending node needs to select one or more requesting nodes with higher remaining bandwidth to send the substream according to the remaining bandwidth information of the requesting node. The remaining bandwidth of the first requesting node The bandwidth information is used by the sending node to determine whether to send the corresponding subflow to the first requesting node, so that the load of the data sending node is more balanced, and the data transmission efficiency is improved.
  • the method before sending the first substream request to the first sending node, the method further includes:
  • the first sending node is determined.
  • a possible implementation manner of determining the sending node Before sending the first request to the first sending node, it is necessary to determine a node capable of providing the first substream, that is, the first sending node. Similarly, before sending the second request to the second sending node, it is necessary to determine a node capable of providing the second substream, that is, the second sending node.
  • the above-mentioned first sending node and second sending node may be determined according to metadata of the original stream.
  • the metadata includes division information of the original stream, which can be used to determine the data blocks included in the first sub-stream and the data blocks included in the second sub-stream. After the original stream is divided into the first sub-stream and the second sub-stream, the metadata is published in the streaming network group.
  • the first requesting node may respectively initiate a request for the substream to the first sending node and the second sending node according to the metadata.
  • the embodiment of the present application determines the sending node that can provide the sub-stream through the metadata, and initiates a request for the sub-stream to the sending node, which can maximize the accuracy and efficiency of sub-stream positioning, thereby improving the transmission of the overall stream transmission network efficiency.
  • the determining the first sending node based on the metadata includes:
  • the set of candidate sending nodes includes candidate sending nodes owning the first substream;
  • the first candidate sending node is a candidate sending node whose distribution tree height is smaller than a first threshold.
  • a possible specific implementation manner of determining the sending node is provided.
  • a set of candidate sending nodes is determined, and the set of candidate sending nodes includes one or more candidate sending nodes and their distribution tree height information in the transmission network.
  • the above-mentioned candidate sending node is a potential first sub-stream providing node, if the start data block index and the end data block index of a sub-stream owned by a certain node cover the first sub-stream, then the node is regarded as a candidate sending node Stored in the set of candidate sending nodes.
  • the first threshold is not a fixed value, and may vary according to different application scenarios.
  • the candidate sending node with the smallest distribution tree height in the candidate sending node set may be selected by adjusting the first threshold as the final first substream providing node.
  • the second sending node may be determined through the above manner of determining the first sending node.
  • the node through the start data block index and the end data block index of the sub-stream owned by the node, it is judged that the node completely covers the first sub-stream, so as to determine that the node is a potential first sub-stream providing node, and then the node
  • the candidate sending node is stored in the candidate sending node set, and then a candidate sending node is selected from the candidate sending node set according to the distribution tree height information of the node as the first sending node to which the first substream request is sent.
  • the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
  • the method before sending the first request to the first sending node, the method further includes:
  • the first requesting node before sending the first request to the first sending node, determines the first sending node through the received distribution tree height information of the first sending node, and sends the first request, which improves the efficiency of data transmission in streaming networks.
  • the method also includes:
  • the candidate sending node with the highest remaining bandwidth is determined as the first sending node.
  • the candidate sending node with the smallest distribution tree height in the candidate sending node set is screened out by adjusting the first threshold and provided as the final first substream node, if there are two or more candidate sending nodes whose distribution tree heights are the same and less than the first threshold, determine the candidate sending node with the highest remaining bandwidth as the first substream providing node, that is, the first sending node node.
  • the determining the set of candidate sending nodes based on the metadata includes:
  • the neighbor node is a node whose transmission frequency with the first requesting node exceeds a frequency threshold
  • the division of the original flow can be obtained, and the neighbor node or network node is queried for the node that owns the first sub-flow. A node whose transmission frequency exceeds a frequency threshold.
  • the method also includes:
  • the first substream sent by the first sending node in response to the first request is abnormal, sending a third request to a second candidate sending node in the set of candidate sending nodes;
  • the second The candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the first threshold, and the third request is used to request the second candidate sending node to send the first substream.
  • a possible implementation manner of adjusting a substream sending node is provided.
  • the first requesting node will select the second-best candidate sending node from the above-mentioned set of candidate sending nodes as a new first substream providing node, Dynamically adjust the sending node of the first sub-flow in the flow distribution tree.
  • the first requesting node will select the second candidate sending node in the set of candidate sending nodes as the new first substream providing node, and send a first substream re-request to the second candidate sending node, the first substream The re-request is used to request the second candidate sending node to send the first sub-stream.
  • the second candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the above first threshold, and the second threshold is similar to the above first threshold, and is not a fixed value, which can be determined according to the application scenario It varies from person to person.
  • Candidate sending nodes whose distribution tree height is suboptimal in the set of candidate sending nodes may be screened out by adjusting the second threshold and used as final first substream providing nodes again. Similarly, when the response to the second request does not meet the preset condition, the second substream sending node may be adjusted in the above manner of adjusting the first substream sending node.
  • a suboptimal candidate sending node is selected from the set of candidate sending nodes as a new substream sending node through the distribution tree height information of the node, and a substream re-request is sent to it to continue to obtain substreams to be received. flow.
  • the sending node when receiving the first substream sent by the first sending node in response to the first request is abnormal, sending the second candidate in the set of candidate sending nodes
  • the sending node sends a third request, including:
  • the difference between the first transmission speed of the first substream and the second transmission speed of the second substream is greater than a target threshold, and When the first transmission speed is lower than the second transmission speed, sending the third request to the second candidate sending node.
  • a possible specific implementation manner of adjusting a substream sending node is provided. After determining that the sending node of the first substream is the first sending node, a first request is sent to the first sending node, for requesting the first sending node to send the first substream. In the case that the first sending node does not send the first substream within the preset time, the first requesting node will select the second candidate sending node from the set of candidate sending nodes as a new first substream providing node, and Sending a first substream re-request to request the second candidate sending node to send the first substream, the preset time is not a fixed value and may vary according to different application scenarios.
  • the first requesting node will select the second candidate sending node from the above-mentioned set of candidate sending nodes as the new first sub-stream.
  • the stream providing node sends a first sub-stream re-request to it, which is used to request the second candidate sending node to send the first sub-stream.
  • the first requesting node will actively interrupt the transmission of the first substream with the first sending node, and select the second candidate sending node from the above candidate sending node set as a new first substream providing node, And send a first substream re-request to it, for requesting the second candidate sending node to send the first substream.
  • the above-mentioned target threshold is similar to the above-mentioned first threshold and second threshold, and is not a fixed value, and may be different according to different application scenarios.
  • a suboptimal candidate sending node is selected from the candidate sending node set as a new substream sending node through the distribution tree height information of the node, And send a sub-stream re-request to it, for continuing to obtain the sub-stream to be received.
  • the method also includes:
  • a possible implementation manner of handling interruption of sub-stream transmission is also provided.
  • the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream by the first requesting node
  • the first requesting node actively pulls the sub-stream from the nodes in the synchronization group.
  • the required data blocks in the first sub-stream until the first requesting node is relocated to a new first sub-stream providing node.
  • the nodes in the synchronization group are nodes at the same starting position as the first requesting node during the transmission process, that is, the nodes in the synchronization group and the data receiving process of the first requesting node are in a state of synchronization.
  • the transmission of the second sub-stream is interrupted during the process of receiving the second sub-stream by the first requesting node, if the number of interrupted sub-streams is greater than the number of redundant sub-streams, the first requesting node actively The required data blocks in the second sub-stream are pulled until the first requesting node is relocated to a new second sub-stream providing node.
  • the embodiment of the present application uses the above synchronization group mechanism to actively pull the data blocks required by the disconnected sub-stream when the sub-stream is interrupted too much, until the requesting node is relocated to a new sub-stream providing node, which can effectively improve the transmission of the sub-stream efficiency.
  • the first subflow re-request includes remaining bandwidth information of the first requesting node, and the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine whether Send the first sub-stream.
  • the first substream re-request sent by the first requesting node includes remaining bandwidth information of the first requesting node.
  • the sending node may receive substream re-requests from multiple requesting nodes. At this time, the sending node needs to select one or more requesting nodes to send the substream according to the remaining bandwidth information of the requesting node. The remaining bandwidth information of the first requesting node is used for The sending node determines whether to send the first subflow to the first requesting node, so as to improve data transmission efficiency.
  • the method also includes:
  • the set of candidate sending nodes no longer includes the first candidate sending node.
  • a possible specific implementation manner of adjusting the set of candidate sending nodes is also provided. That is, the sending nodes whose response to the first request does not meet the preset condition are deleted from the set of candidate sending nodes. Specifically, the first sending node does not send the first sub-stream within the preset time, or the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream, or the first requesting node actively interrupts the communication with the first sending node In the case of transmission of the first substream, the first candidate sending node is deleted from the set of candidate sending nodes, so that the set of candidate sending nodes no longer includes the first candidate sending node.
  • the embodiments of the present application can improve the accuracy and stream transmission efficiency of the first requesting node in locating the substream providing node in the subsequent stream transmission process.
  • an embodiment of the present application provides a data transmission method, the method including:
  • the original stream is divided into multiple sub-streams, and then the entire mobile distributed stream transmission process is split into multiple sub-stream transmission processes, so that the transmission efficiency of the entire transmission network is higher.
  • the first sending node receives substream requests sent by multiple requesting nodes, such as receiving the first request sent by the first requesting node or receiving the second request sent by the second requesting node, the first request is used to request the first The sending node sends the first substream, and the second request is used to request the first sending node to send the second substream.
  • the first sending node is a node that provides the first sub-stream or the second sub-stream, the first sub-stream and the second sub-stream are obtained by dividing the original stream, and the first sub-stream and the second sub-stream are incomplete same.
  • the first sending node After receiving the substream request, the first sending node will send the first substream to the first requesting node or send the second substream to the second requesting node according to the substream transmission information and node transmission status.
  • the current data transmission method usually uses a distribution tree-based method for decentralized real-time streaming media transmission.
  • Each node participating in data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through the corresponding child nodes on the transmission tree. Therefore, the uplink bandwidth of a single node is highly dependent, and the disconnection of a certain node will cause data transmission failure of all child nodes under the node.
  • the data transmission method provided by the embodiment of the present application adopts the process of splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmissions, which can greatly reduce the number of convection transmission networks.
  • the data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
  • the original stream includes a first file block and a second file block
  • both the first sub-stream and the second sub-stream include the first file block and the second file block.
  • Data blocks in file blocks
  • a possible implementation manner of dividing substreams is provided by describing data blocks included in the first substream and the second substream.
  • Divide the original stream into two or more file blocks each file block includes two or more data blocks. Indexes of all data blocks are numbered in time order, and the data blocks are divided into different sub-streams according to the data block indexes, so that each divided sub-stream includes at least one data block in each file block.
  • the original stream is divided into a first file block and a second file block, and the first file block and the second file block include two or more data blocks.
  • the data block is divided into the first sub-stream or the second sub-stream according to the data block index, so as to realize the purpose of dividing the original stream into the first sub-stream and the second sub-stream.
  • the first substream includes at least one data block in the first file block and at least one data block in the second file block
  • the second substream includes at least one data block in the first file block and the second file block At least one data block in the block.
  • the substream division method provided by the embodiment of the present application makes the divided first substream and the second substream both include at least one data block in the first file block and at least one data block in the second file block, ensuring that the request After receiving the first sub-stream and the second sub-stream, the node can restore the original stream by encoding the first sub-stream and the second sub-stream, thereby improving data transmission efficiency.
  • the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block;
  • the second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
  • a possible implementation manner of substream redundancy coding is provided by describing the data blocks included in the first file block and the second file block. Divide the original stream into two or more file blocks, and each file block contains two or more data blocks. Perform FEC encoding on the data blocks in each file block to obtain new redundant data blocks, and add the redundant data blocks to the corresponding file blocks, so that the data blocks in each file block are the data blocks in the original stream , or a data block obtained by redundantly encoding a file block.
  • the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block
  • the data blocks in the second file block are data blocks in the original stream, or is a data block obtained by redundantly encoding the second file block.
  • redundant coding of the file block is performed, and redundant data blocks are added to the file block, so as to realize the purpose of redundant coding of the substream.
  • the newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which improves the reliability and stability of sub-stream transmission.
  • the first request includes remaining bandwidth information of the first requesting node
  • the second request includes remaining bandwidth information of the second requesting node
  • the remaining bandwidth information and the remaining bandwidth information of the second requesting node are used by the first sending node to determine whether to send the first sub-flow or the second sub-flow, and the first sending node is the first sub-flow or the sending node corresponding to the second substream.
  • the first request sent by the first requesting node includes remaining bandwidth information of the first requesting node
  • the second request sent by the second requesting node includes remaining bandwidth information of the second requesting node.
  • the first sending node may receive sub-stream requests from multiple requesting nodes. At this time, the first sending node needs to select one or more requesting nodes with higher remaining bandwidth to send the sub-stream according to the remaining bandwidth information of the requesting nodes.
  • the remaining bandwidth information of the first requesting node and the remaining bandwidth information of the second requesting node are used by the first sending node to determine whether to send the first sub-flow to the first requesting node or to send the second sub-flow to the second requesting node, so that the data can be sent
  • the load of the nodes is more balanced, which improves the efficiency of data transmission.
  • the method before receiving the first request sent by the first requesting node, the method further includes:
  • the first sending node is a sending node sending the first sub-stream or the second sub-stream.
  • the first sending node will send the distribution tree height information of the first sending node to the first requesting node.
  • the first requesting node The node needs to select a sending node according to the distribution tree height information of the potential sending node, and send the first request to it for the first substream transmission. Therefore, the distribution tree height information of the first sending node is used for the first requesting node to determine Whether to send the first request to the first sending node makes the load of the data sending node more balanced and improves the data transmission efficiency.
  • the sending the first subflow to the first requesting node or sending the second subflow to the second requesting node includes:
  • the first sub-stream and the second sub-stream are provided at the first sending node, and the remaining bandwidth of the first sending node is higher than the bit rate of the first sub-stream and the second sub-stream In the case of the sum of bit rates, the first substream is sent to the first requesting node, and the second substream is sent to the second requesting node.
  • the first sending node will send the first substream to the first requesting node or send the second substream to the second requesting node according to the substream transmission information and the node transmission status.
  • the first sub-stream is sent to the first requesting node; the second sub-stream is provided at the first sending node And when the remaining bandwidth is higher than the bit rate of the second sub-stream, send the second sub-stream to the second request node; provide the first sub-stream and the second sub-stream at the first sending node, and the remaining bandwidth is higher than the first sub-stream
  • the first sub-stream is sent to the first requesting node, and the second sub-stream is sent to the second requesting node.
  • the preferred sub-stream is sent to the requesting node, which can maximize bandwidth utilization and fully match the mobile distributed streaming network
  • the uplink bandwidth of each node in the environment makes the load of the data sending node more balanced, and makes the transmission efficiency of the entire stream transmission network higher.
  • the sending the first substream to the first requesting node, and sending the second substream to the second requesting node include:
  • the first requesting node sends the substream.
  • the first sending node provides the first sub-stream and the second sub-stream, and the remaining bandwidth is higher than the bit rate of the first sub-stream and the second sub-stream
  • compare the remaining bandwidth of the first requesting node and the second requesting node if the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node, send the first substream to the first requesting node; then update the remaining bandwidth of the first sending node; the remaining bandwidth after the update of the first sending node is high
  • the bit rate of the second sub-stream the second sub-stream is sent to the second requesting node.
  • the embodiment of the present application selects the requesting node with higher remaining bandwidth to send the requested substream, which can maximize the bandwidth utilization rate and fully match the mobile distributed streaming network environment.
  • the uplink bandwidth of each node makes the load of the data sending node more balanced, making the transmission efficiency of the entire streaming transmission network higher.
  • the embodiment of the present application provides a data transmission device, which includes:
  • a sending unit configured to send a first request to a first sending node
  • a receiving unit configured to receive the first substream sent by the first sending node in response to the first request
  • the sending unit is further configured to send a second request to a second sending node
  • the receiving unit is further configured to receive a second substream sent by the second sending node in response to the second request; the first sending node is different from the second sending node; the first substream Both of the second substreams are composed of data blocks in the original stream, and the first substream is different from the second substream.
  • the device also includes:
  • a decoding unit configured to decode the first substream and the second substream to obtain the original stream.
  • the original stream includes a first file block and a second file block
  • both the first sub-stream and the second sub-stream include the first file block and the second file block.
  • Data blocks in file blocks
  • the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block;
  • the second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
  • the size of the first file block is determined by the data block type and the data block size in the original stream
  • the size of the second file block is determined by the data block in the original stream The type and block size are determined.
  • the first request includes remaining bandwidth information of the data transmission device
  • the second request includes remaining bandwidth information of the data transmission device
  • the remaining bandwidth information of the data transmission device Used by the first sending node to determine whether to send the first sub-stream, or used by the second sending node to determine whether to send the second sub-stream.
  • the device also includes:
  • the receiving unit is further configured to obtain metadata of the original stream
  • a determining unit configured to determine the first sub-stream based on the metadata
  • the determining unit is further configured to determine the first sending node based on the metadata.
  • the determining unit is specifically configured to determine a set of candidate sending nodes based on the metadata, where the set of candidate sending nodes includes a candidate sending node that owns the first substream;
  • the determining unit is specifically further configured to determine a first candidate sending node in the set of candidate sending nodes as the first sending node, and the first candidate sending node is a sending candidate whose distribution tree height is smaller than a first threshold node.
  • the receiving unit is further configured to receive the distribution tree height information sent by the first sending node, and the distribution tree height information of the first sending node is used by the data transmission device to determine The first sending node.
  • the determining unit is specifically further configured to, when the distribution tree heights of two or more candidate sending nodes are the same and less than the first threshold, select The sending node is determined as the first sending node.
  • the device also includes:
  • a query unit configured to query a neighbor node or a network node based on the metadata; the neighbor node is a node whose transmission frequency with the first requesting node exceeds a frequency threshold;
  • the determining unit is specifically further configured to add the neighbor node owning the first subflow to the set of candidate sending nodes, and add the network node owning the first subflow to the set of candidate sending nodes .
  • the sending unit is further configured to send the candidate sending node A second candidate sending node in the set sends a third request; the second candidate sending node is a candidate sending node whose distribution tree height is less than a second threshold and not less than the first threshold, and the third request is used to request the The second candidate sending node sends the first substream.
  • the sending unit is further configured to, in the case that the first sending node does not send the first substream within a preset time, send sending said third request; or,
  • the sending unit is specifically further configured to send the third request to the second candidate sending node when the transmission of the first substream is interrupted during the process of receiving the first substream; or,
  • the sending unit is further configured to send the second candidate sending node to the second candidate sending node when the first transmission speed of the first substream is lower than a preset threshold during the process of receiving the first substream. the third request; or,
  • the sending unit is further configured to, during the process of receiving the first substream and the second substream, the first transmission speed of the first substream and the second transmission speed of the second substream When the speed difference is greater than the target threshold and the first transmission speed is smaller than the second transmission speed, sending the third request to the second candidate sending node.
  • the device also includes:
  • a pulling unit configured to pull data blocks required in the first sub-stream from nodes in the synchronization group when the number of sub-stream interruptions is greater than the number of redundant sub-flows; the nodes in the synchronization group is the node at the same starting position as the first requesting node during the transmission process.
  • the first substream re-request includes remaining bandwidth information of the first requesting node, and the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine the The first request node.
  • the device also includes:
  • a deleting unit configured to delete the first candidate sending node from the set of candidate sending nodes.
  • the embodiment of the present application provides a data transmission device, which includes:
  • a receiving unit configured to receive a first request sent by a first requesting node or a second request sent by a second requesting node; the first request is used to request to send a first substream to the first requesting node, and the first requesting node
  • the second request is used to request to send a second substream to the second requesting node; the first requesting node is different from the second requesting node; both the first substream and the second substream are composed of the original stream Composed of data blocks in , the first sub-stream is different from the second sub-stream;
  • a sending unit configured to send the first substream to the first requesting node or send the second substream to the second requesting node.
  • the original stream includes a first file block and a second file block
  • both the first sub-stream and the second sub-stream include the first file block and the second file block.
  • Data blocks in file blocks
  • the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block;
  • the second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
  • the first request includes remaining bandwidth information of the first requesting node
  • the second request includes remaining bandwidth information of the second requesting node
  • the remaining bandwidth information and the remaining bandwidth information of the second requesting node are used by the data transmission device to determine whether to send the first sub-flow or the second sub-flow.
  • the sending unit is further configured to send the distribution tree height information of the data transmission device to the first request node, and the distribution tree height information of the data transmission device is used for the A first requesting node determines whether to send the first request to the data transmission device.
  • the sending unit is specifically configured to provide the first substream at the data transmission device and the remaining bandwidth of the data transmission device is higher than the bit rate of the first substream In the case of , sending the first sub-flow to the first requesting node; or,
  • the sending unit is further configured to send the second substream to the second substream when the data transmission device provides the second substream and the remaining bandwidth of the data transmission device is higher than the bit rate of the second substream.
  • the sending unit is further configured to provide the first substream and the second substream at the data transmission device, and the remaining bandwidth of the data transmission device is higher than the bit rate of the first substream and the bit rate of the second substream, sending the first substream to the first requesting node, and sending the second substream to the second requesting node.
  • the device also includes:
  • the sending unit is specifically further configured to send the first substream to the first requesting node when the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node;
  • an updating unit configured to update the remaining bandwidth of the data transmission device
  • the sending unit is further configured to send the second sub-stream to the second requesting node when the updated remaining bandwidth of the data transmission device is higher than the bit rate of the second sub-stream.
  • the embodiment of the present application provides a data transmission device
  • the data transmission device includes a processor and a memory; the memory is used to store computer-executable instructions; the processor is used to execute the computer-executable instructions stored in the memory. instructions, so that the data transmission device executes the method according to the above first aspect and any possible implementation manner, or executes the method according to the above second aspect and any possible implementation manner.
  • the data transmission device further includes a transceiver, configured to receive signals or send signals.
  • an embodiment of the present application provides a computer-readable storage medium, which is used to store instructions or computer programs; when the instructions or the computer programs are executed, the first aspect and the The method described in any possible implementation manner is implemented, or the second aspect and the method described in any possible implementation manner are implemented.
  • the embodiment of the present application provides a computer program product, the computer program product includes instructions or computer programs; when the instructions or the computer programs are executed, the first aspect and any possible implementation The method described in the manner is realized, or the method described in the second aspect and any possible implementation manner is realized.
  • an embodiment of the present application provides a chip, the chip includes a processor, and the processor is configured to execute instructions. When the processor executes the instructions, the chip performs the first aspect and any possible The method described in the implementation manner, or perform the method described in the second aspect and any possible implementation manner.
  • the chip further includes a communication interface, and the communication interface is used for receiving signals or sending signals.
  • the embodiment of the present application provides a data transmission system, the system includes at least one data transmission device as described in the third aspect, or the data transmission device as described in the fourth aspect, or the data transmission device as described in the fifth aspect A data transmission device, or the chip described in the eighth aspect.
  • the relevant sending information (such as The first sub-stream, the second sub-stream) and/or the process of receiving information can be understood as the process of outputting information by the processor, and/or the process of receiving input information by the processor.
  • the processor may output information to a transceiver (or a communication interface, or a sending module) for transmission by the transceiver. After the information is output by the processor, additional processing may be required before reaching the transceiver.
  • the transceiver or communication interface, or sending module
  • the transceiver receives the information and inputs it to the processor.
  • the information may require other processing before being input to the processor.
  • the sending information mentioned in the foregoing method can be understood as the processor outputting information.
  • receiving information may be understood as the processor receiving input information.
  • the above-mentioned processor may be a processor dedicated to performing these methods, or a processor that executes these methods by executing computer instructions in a memory, such as a general-purpose processor.
  • the above-mentioned memory can be a non-transitory (non-transitory) memory, such as a read-only memory (Read Only Memory, ROM), which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
  • ROM read-only memory
  • the embodiment does not limit the type of the memory and the arrangement of the memory and the processor.
  • the at least one memory is located outside the communication device.
  • the above at least one memory is located in the communication device.
  • part of the memory of the at least one memory is located inside the communication device, and another part of the memory is located outside the communication device.
  • processor and the memory may also be integrated into one device, that is, the processor and the memory may also be integrated together.
  • the data transmission pressure on a single node in the stream transmission network can be greatly reduced, making the data sending node The load is more balanced, fully matching the uplink bandwidth of each node in the mobile distributed streaming network environment, making the entire streaming network more robust and efficient.
  • Figure 1a is a schematic diagram of the architecture of a distribution tree-based streaming network
  • FIG. 1b is a schematic structural diagram of a distribution tree-based streaming network provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a stream transmission node provided in an embodiment of the present application.
  • FIG. 3 is a schematic flow diagram of a data transmission method provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of the effect of substream distribution provided by the embodiment of the present application.
  • Fig. 5 is a schematic diagram of the effect of redundant coding of a sub-stream provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of the effect of a synchronization group mechanism provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram of an effect of adjusting a streaming transmission node provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of another data transmission method provided by the embodiment of the present application.
  • FIG. 9 is an interactive schematic diagram of a streaming network provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of another data transmission device provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • an embodiment means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application.
  • the occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
  • At least one (item) means one or more
  • “multiple” means two or more
  • at least two (items) means two or three And three or more
  • "and/or” is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, "A and/or B” can mean: only A exists, only B exists, and A exists at the same time and B, where A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an "or” relationship.
  • “At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ", where a, b, c can be single or multiple.
  • Redundant coding A redundant code is a code that uses more symbols, or signal elements, than necessary to represent the information. Redundant encryption technology is applied, that is, the encoding principle of error-correcting codes is used, and a large amount of redundant information is added to encrypted files, so as to achieve the purpose of encryption.
  • the redundant encryption technique studied by most researchers is public key cryptography.
  • commonly used redundant codes include Hamming codes, cyclic codes, algebraic geometry codes, etc., which are very rich in content and involve a wide range of fields.
  • Peer-to-peer Also known as peer-to-peer technology, it is an Internet system that has no central server and relies on user groups (peers) to exchange information. Its role is to reduce the number of nodes in the previous network transmission to reduce the risk of data loss.
  • peer-to-peer network Different from the central network system with a central server, each client of the peer-to-peer network is not only a node, but also has the function of a server. Any node cannot directly find other nodes, and must rely on its user group for information exchange.
  • CDN Content Delivery Network
  • CDN is an intelligent virtual network built on the basis of the existing network, relying on the edge servers deployed in various places, through the load balancing, content distribution, scheduling and other functional modules of the central platform, so that Users can obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate.
  • the key technology of CDN mainly includes content storage and distribution technology.
  • HON Human Oriented Network
  • the main goal is to improve user experience and build a network around experience.
  • the network involves three major capabilities: device-pipe-cloud collaboration, innovation/reconfiguration of system architecture, and promotion of network and terminal technology innovation.
  • streaming media transmission As an example, the pusher uses streaming media transmission technology to compress a series of media data, and then sends them in segments through the network to provide users with real-time audio and video for viewing.
  • CDN has been continuously developed in recent years. Especially with the continuous development of video services, CDN has received great attention, and it is the key bearer and bridge to improve user experience. Especially for high-concurrency services such as live broadcasts, every large-scale live broadcast is a re-insurance event.
  • the p2p mode has the characteristics of potential scalability and easy deployment. This mode is that the users who participate in the live broadcast can also directly share data with the users who need it. This can effectively reduce the bottleneck of the centralized server. Therefore, in this mode, the The real-time transmission design of streaming media becomes very important.
  • Existing p2p streaming media transmission methods can be divided into two categories according to the organizational structure of the overlay network: push streaming based on the distribution tree method and pull streaming using the mesh-pull method.
  • Stream push refers to the process in which the sending node pushes stream data to the requesting node
  • streaming refers to the process in which the requesting node actively pulls data from the data owner.
  • each node participating in the data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through corresponding child nodes on the transmission tree.
  • FIG. 1a is a schematic diagram of a distribution tree-based streaming network architecture.
  • the transmission system organizes the nodes participating in the transmission (source node, first node, second node, third node, fourth node, fifth node, sixth node, etc.) into a streaming media transmission tree, and the source
  • the node divides the original stream into several file blocks (the first file block, the second file block, the nth file block, etc.), and the streaming media file blocks are streamed through the corresponding streaming media transmission tree.
  • the above data transmission method solves the problem of redundant transmission, and ideally has higher transmission efficiency and network bandwidth utilization.
  • the above data transmission method is highly dependent on the uplink bandwidth of a single node, and the disconnection of a certain node will cause the data transmission of all child nodes under the node to fail. If the connection is disconnected due to other reasons, all child nodes (fifth node, sixth node) connected to the node will not receive data, and the child nodes will not be able to quickly resume data transmission at this time. Therefore, the data transmission method has low bandwidth utilization, poor invulnerability, and low data transmission efficiency.
  • the transmission system also needs to evaluate the data transmission capabilities of different nodes to reasonably regulate the structure of the distributed network for more effective streaming. For example, the number of users of mobile terminals such as mobile phones and tablets is getting higher and higher, which is a very important application scenario in business scenarios. Moreover, in mobile distributed network scenarios, users may be in different environments, and at the same time, users may frequently switch networks, open/close applications, etc., and put forward higher requirements for the reliability of distributed streaming technology. Requirements, the streaming system needs to build a data distribution system reasonably to ensure the most efficient data transmission.
  • the embodiment of the present application provides a new stream transmission network architecture.
  • FIG. 1b is a schematic structural diagram of a distribution tree-based streaming network provided by an embodiment of the present application.
  • the transmission system organizes the nodes participating in the transmission (source node, first node, second node, third node, fourth node, fifth node, sixth node, etc.) into a streaming media transmission tree, and the source
  • the node divides the original stream into several file blocks (the first file block, the second file block, the nth file block, etc.), and the streaming media file blocks are streamed through the corresponding streaming media transmission tree.
  • the data transmission method based on this architecture can solve the problem of redundant transmission, and in an ideal state, the transmission efficiency and network bandwidth utilization are higher.
  • the transmission tree in the embodiment of the present application is a distributed topology architecture, and the data transmission between nodes does not depend on the uplink bandwidth of a single node. Fails the data transfer of all child nodes under this node.
  • the second node in Figure 1b is disconnected due to reasons such as changes in the mobile network bandwidth, which will cause the sub-nodes (such as the fifth node and the sixth node) connected to the node to fail to receive data.
  • the fifth node The node and the sixth node will turn to request data transmission from the first node. Therefore, the stream transmission network architecture in the embodiment of the present application has higher bandwidth utilization, better invulnerability, and higher data transmission efficiency.
  • this application also provides a new data transmission method, which can be greatly expanded by splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmission processes. Reduce the data transmission pressure on a single node in the stream transmission network to a certain extent, make the load of the data sending node more balanced, fully match the uplink bandwidth of each node in the mobile distributed stream transmission network environment, and make the entire stream transmission network indestructible and The transmission efficiency is higher.
  • the embodiment of the present application also designs a system composed of a whole set of sub-stream publishing, subscribing, sending, analyzing, corresponding distribution tree construction, adjustment and other modules.
  • FIG. 2 is a schematic diagram of an architecture of a stream transmission node provided by an embodiment of the present application.
  • the system architecture of the streaming node includes a file processing module, a streaming file publishing module, a streaming file subscription module, a streaming data sending module, a distribution tree construction module, a distribution tree adjustment module, and a node capability analysis module.
  • the file processing module is mainly used for processing the original streaming media file, including dividing sub-streams, redundant encoding, and the like.
  • the file processing module is mainly used for processing the original streaming media file, including dividing sub-streams, redundant encoding, and the like.
  • the newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which can improve the reliability and stability of sub-stream transmission.
  • the stream file publishing module is mainly used to publish metadata about the original stream to the stream transmission network.
  • the metadata includes the division of sub-streams, but does not include specific stream data.
  • the flow file subscription module is mainly used to decide whether to subscribe to the flow after receiving the metadata sent by the source node. By determining the sending node that can provide the sub-stream through the metadata, and initiating a request for the sub-stream to the sending node, the accuracy and efficiency of sub-stream positioning can be improved to the greatest extent, thereby improving the transmission efficiency of the overall stream transmission network.
  • the stream data sending module is mainly used to continuously push data to the data requester after the node establishes a connection.
  • the node capability analysis module is mainly used to analyze the data transmission capability of the node, and record the node transmission capability, so as to provide relevant information when building the flow distribution tree.
  • the distribution tree construction module is mainly used to construct the distribution tree according to the data provided by the above-mentioned node capability analysis module modeling, and is used to determine the data sender and receiver.
  • the distribution tree construction module is mainly used to construct the distribution tree according to the data provided by the above-mentioned node capability analysis module modeling, and is used to determine the data sender and receiver.
  • the distribution tree adjustment module is mainly used to deal with the problem of node exit during the streaming process, quickly obtain urgently needed data blocks for streaming, and adjust the streaming distribution tree.
  • the stream transmission distribution tree is repaired by dynamically adjusting the stream transmission distribution tree. In the case of a lot of substream loss, if the received data blocks are not enough to restore the file blocks, you can actively pull the data blocks that are urgently needed for streaming until a connection is established with a new parent node to improve streaming efficiency.
  • embodiments of the present application provide a new data transmission method.
  • Figure 3 is a schematic flow chart of a data transmission method provided by the embodiment of the present application, the method includes but is not limited to the following steps:
  • Step 301 Send a first substream request to a first sending node, and send a second substream request to a second sending node.
  • a node in this embodiment of the present application is a connection point, which means a redistribution point or a communication endpoint, specifically an active electronic device connected to a network.
  • the electronic device is equipped with a processor that can be used to execute computer-executable instructions, and can send, receive or forward information through a communication channel.
  • the electronic device can be a data circuit termination device, such as a modulator, hub or switch, etc.; it can also be a data terminal device, such as a computer, mobile phone or host (such as a router, workstation or server) Wait.
  • “first" and “second” in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order.
  • the first requesting node sends the first substream request to the first sending node, and sends the second substream request to the second sending node.
  • the first sending node is different from the second sending node, the first sending node is a node providing the first substream, and the second sending node is a node providing the second substream.
  • the first substream request is used to request the first sending node to send the first substream, and the second substream request is used to request the second sending node to send the second substream.
  • the first sub-flow request and the second sub-flow request sent by the first requesting node both include remaining bandwidth information of the first requesting node.
  • the sending node may receive sub-stream requests from multiple requesting nodes at the same time, the sending node needs to select one or more requesting nodes to send sub-streams according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node
  • the sending node is used to determine the first requesting node, so that the load of the data sending node is more balanced, and the data transmission efficiency is improved.
  • the first substream and the second substream are obtained by dividing the original stream, and the first substream and the second substream are not completely the same.
  • a possible implementation manner of dividing sub-streams will be provided below.
  • each file block contains two or more data blocks. Indexes of all data blocks are numbered in time order, and the data blocks are divided into different sub-streams according to the data block indexes, so that each divided sub-stream includes at least one data block in each file block.
  • the original stream may be divided into a first file block and a second file block, and the first file block and the second file block include two or more data blocks.
  • the data block is divided into the first sub-stream or the second sub-stream according to the data block index, so as to realize the purpose of dividing the original stream into the first sub-stream and the second sub-stream.
  • the first substream includes at least one data block in the first file block and at least one data block in the second file block
  • the second substream includes at least one data block in the first file block and at least one data block in the second file block at least one block of data.
  • the size of the above-mentioned divided file blocks may be determined by the data block type and data block size contained in the original stream.
  • the original streams transmitted in different application scenarios are different, and the data types and sizes contained in them are different. Therefore, the size of divided file blocks should be adjusted adaptively according to the application scenarios, which can improve the efficiency of data transmission.
  • FIG. 4 is a schematic diagram of an effect of substream distribution provided by an embodiment of the present application.
  • the foregoing implementation manner of dividing substreams may be further described in conjunction with FIG. 4 .
  • the original stream s is divided into more than two file blocks (first file block, second file block, third file block, etc.), and each file block includes five data blocks.
  • bitrates In terms of bitrates:
  • the indexes of all data blocks are numbered, wherein the first file block includes data block 1, data block 2, data block 3, data block 4, data block 5, and the second file block Including data block 6, data block 7, data block 8, data block 9, and data block 10, the third file block includes data block 11, data block 12, data block 13, data block 14, and data block 15.
  • the data block is divided into different sub-streams (first sub-stream A, second sub-stream B, third sub-stream C, fourth sub-stream D, fifth sub-stream E), so as to achieve The purpose of dividing the original stream into multiple sub-streams.
  • the first substream A includes at least one data block (data block 1) in the first file block, at least one data block (data block 6) in the second file block and at least one data block in the third file block (data block 11)
  • the second substream B contains at least one data block (data block 2) in the first file block, at least one data block (data block 7) in the second file block, and at least one data block (data block 7) in the third file block
  • the third substream C contains at least one data block in the first file block (data block 3), at least one data block in the second file block (data block 8) and the third At least one data block (data block 13) in the file block
  • the fourth substream D contains at least one data block (data block 4) in the first file block, at least one data block (data block 9) in the second file block ) and at least one data block (data block 14) in the third file block
  • the fifth substream E includes at least one data block (data block 5) in the first file block,
  • the sub-stream division method provided by the embodiment of the present application makes each divided sub-stream contain at least one data block in each file block, thus ensuring that after the first requesting node receives each sub-stream, it can Sub-stream decoding restores to obtain the original stream, improving data transmission efficiency.
  • redundant coding may also be performed on the first sub-stream and the second sub-stream, so as to improve the efficiency of sub-stream transmission. reliability and stability.
  • a possible implementation manner of substream redundant coding will be provided below.
  • each file block includes two or more data blocks. Perform FEC encoding on the data blocks in each file block to obtain new redundant data blocks, and add the redundant data blocks to the corresponding file blocks, so that the data blocks in each file block are the data obtained by dividing the original stream block, or a data block obtained by redundantly encoding a file block. Specifically, divide the original stream into a first file block and a second file block, perform FEC encoding on the data block in the first file block to obtain a new redundant data block, and add the redundant data block to the first file block In the same way, FEC encoding is performed on the data blocks in the second file block to obtain a new redundant data block, and the redundant data block is added to the second file block.
  • the data blocks in the first file block are the data blocks obtained by dividing the original stream, or the data blocks obtained by redundantly encoding the first file block
  • the data blocks in the second file block are the data blocks obtained by dividing the original stream , or a data block obtained by redundantly encoding the second file block.
  • the above-mentioned FEC is an error control method, which means that the signal is encoded according to a certain algorithm before being sent to the transmission channel, and the redundant code with the characteristics of the signal itself is added, and the received signal is processed according to the corresponding algorithm at the receiving end.
  • the technology of decoding the signal to find out the error code generated during the transmission and correct it can greatly increase the reliability and stability of data communication.
  • FIG. 5 is a schematic diagram of an effect of substream redundancy coding provided by an embodiment of the present application.
  • the implementation manner of the above substream redundant coding can be further described in conjunction with FIG. 5 .
  • the original stream is divided into several file blocks including the first file block and the second file block.
  • the first file block includes four data blocks (data block 1, data block 2, data block 3, data block 4), and the second file block also includes four data blocks (data block 5, data block 6, data block 7.
  • Data block 8 Perform FEC encoding on the data block in the first file block to obtain a new redundant data block, and add the redundant data block to the first file block.
  • the data blocks in the above-mentioned first file block are data blocks obtained by dividing the original stream, or the data blocks obtained by redundantly encoding the first file block
  • the data blocks in the above-mentioned second file block are obtained by dividing the original stream A data block, or a data block obtained by redundantly encoding the second file block.
  • the sub-stream redundant coding method provided in the embodiment of the present application implements redundant coding of the sub-stream by adding redundant data blocks to the file block through redundant coding of the file block.
  • the newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received substream is decoded to obtain the original stream.
  • each file block originally contains n data blocks
  • each file block contains n+ ⁇ n data blocks after redundancy encoding, for n+ ⁇ n substreams, even if there are several substreams that are disconnected, but As long as at least n substreams are received, the original stream can still be decoded.
  • a new redundant data block is obtained by redundant encoding of the first file block, and its index is renumbered as data block 5, and the first file block is added.
  • a new redundant data block is obtained by redundantly encoding the second file block, its index is renumbered as data block 10, and the second file block is added.
  • a new redundant data block is obtained by redundantly encoding the third file block, its index is renumbered as data block 15, and the third file block is added. In this way, the newly added redundant data block can obtain the corresponding redundant sub-stream fifth sub-stream E.
  • the original stream was divided into four sub-streams to obtain five sub-streams, so that in the process of stream transmission, even if there is a certain In the case of sub-stream transmission disconnection, as long as the dropped sub-stream does not exceed the number of newly added redundant sub-streams, the original stream can still be decoded according to the received sub-stream, which improves the reliability and stability of sub-stream transmission .
  • the first requesting node before the first requesting node sends the first sub-stream request to the first sending node and sends the second sub-stream request to the second sending node, the first requesting node needs to determine to provide the first A first sending node for the substream and a second sending node for providing the second substream.
  • a possible implementation manner of determining the sending node will be provided below by taking the first requesting node determining the first sending node as an example.
  • the first requesting node can determine the first sending node according to the metadata of the original flow, and initiate a request to the first sending node Request for the first substream.
  • the first requesting node first determines a set of candidate sending nodes according to the metadata
  • the candidate sending node set includes one or more candidate sending nodes and their distribution tree height information in the transmission network
  • the above-mentioned candidate sending node is a potential provider node of the first substream si
  • whether the node is a potential provider node of the first substream si can be judged through the data block index of the substream owned by the node, that is, if The starting data block index of the substream owned by a certain node and last block index completely covered the above-mentioned first sub-stream s i , save this node as a candidate sending node to the set of candidate sending nodes middle.
  • the set of candidate sending nodes is determined by the above method Afterwards, the first requesting node compares the set of candidate sending nodes The distribution tree height of the candidate sending node in will distribute the tree height
  • the first candidate sending node smaller than the first threshold is determined as the first sending node, and sends the first substream request to it, for requesting to send the first substream s i .
  • the above-mentioned first threshold is not a fixed value, and may be different according to different application scenarios. Therefore, the set of candidate sending nodes can be screened out by adjusting the first threshold middle distribution tree height
  • the smallest candidate sending node is used as the final first substream providing node.
  • the second sending node may also be determined through the above implementation manner of determining the first sending node. In summary, from the set of candidate sending nodes The first sending node selected in must meet the following conditions:
  • the node through the start data block index and the end data block index of the sub-stream owned by the node, it is judged that the node completely covers the first sub-stream, so as to determine that the node is a potential first sub-stream providing node, and then the node
  • the candidate sending node is stored in the candidate sending node set, and then a candidate sending node is selected from the candidate sending node set according to the distribution tree height information of the node as the first sending node to which the first substream request is sent.
  • the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
  • the candidate sending node with the smallest distribution tree height in the candidate sending node set is selected as the final first substream providing node, if there are two or more candidate sending nodes with the same distribution tree height and is less than the first threshold, the candidate sending node with the highest remaining bandwidth RB is determined as the final first substream providing node, that is, the first substream providing node must meet the conditions:
  • the above-mentioned first requesting node first determines a set of candidate sending nodes according to the metadata. Specifically, it may first obtain the division of the original flow according to the metadata, and then query the neighbor nodes or network nodes for nodes that own the first sub-flow .
  • the neighbor node is a node that periodically exchanges flow data with the first requesting node, that is, a node whose transmission frequency with the first requesting node exceeds a frequency threshold, and the frequency threshold is similar to the above-mentioned first threshold, and is not a fixed value , can vary according to different application scenarios.
  • Step 302 Receive the first substream and the second substream.
  • the first request node After the first request node sends the first sub-stream request to the first sending node and the second sub-stream request to the second sending node, if the first sending node accepts the first sub-stream request and sends the first sub-stream, the second The second sending node accepts the second substream request and sends the second substream, and the first requesting node receives the first substream and the second substream.
  • the first sending node rejects the first sub-flow request or fails to send the first sub-flow
  • the second sending node rejects the second sub-flow request or fails to send the second sub-flow
  • the first requesting node needs to The transmission state, the transmission state of the second sub-stream, the sending state of the first sending node, and the sending state of the second sending node dynamically adjust the sending nodes of the sub-stream in the stream distribution tree.
  • the following will take the first request node dynamically adjusting the sending node of the first substream in the stream distribution tree as an example to provide a possible implementation manner of adjusting the sending node of the substream.
  • a first substream request is sent to the first sending node, for requesting the first sending node to send the first substream.
  • the first requesting node will select a suboptimal candidate sending node from the above candidate sending node set as a new first substream providing node.
  • the first request node will select the second candidate sending node in the set of candidate sending nodes as the new first substream providing node, and send a first substream re-request to the second candidate sending node, the first substream
  • the flow re-request is used to request the second candidate sending node to send the first sub-flow
  • the first sub-flow re-request includes the remaining bandwidth information of the first requesting node, because the second candidate sending node may receive multiple requesting nodes at the same time
  • the substream re-requests are used to request the second candidate sending node to send the first sub-flow.
  • the second candidate sending node needs to select one or more requesting nodes to send the substream according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node is used for the second candidate sending node to determine The first requesting node.
  • the above-mentioned second candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the above-mentioned first threshold, and the second threshold is similar to the above-mentioned first threshold, and is not a fixed value. It varies from person to person.
  • Candidate sending nodes whose distribution tree height is suboptimal in the candidate sending node set may be selected by adjusting the second threshold as the final first substream providing node.
  • the sending of the first sub-flow in the flow distribution tree can be adjusted through the above-mentioned node to adjust the sending node of the second sub-flow in the flow distribution tree.
  • a suboptimal candidate sending node is selected from the set of candidate sending nodes as a new substream sending node through the distribution tree height information of the node, and a substream re-request is sent to it to continue to obtain substreams to be received. flow.
  • a first substream request is sent to the first sending node, for requesting the first sending node to send the first substream.
  • the first sending node accepts the first substream request and sends the first substream to the first requesting node.
  • the first requesting node will select the second-best candidate sending node from the above-mentioned set of candidate sending nodes as the new first sub-stream Provide a node.
  • the first request node will select the second candidate sending node in the set of candidate sending nodes as the new first substream providing node, and send a first substream re-request to the second candidate sending node, the first substream
  • the flow re-request is used to request the second candidate sending node to send the first sub-flow
  • the first sub-flow re-request includes the remaining bandwidth information of the first requesting node, because the second candidate sending node may receive multiple requesting nodes at the same time
  • the substream re-requests are used to request the second candidate sending node to send the first sub-flow.
  • the second candidate sending node needs to select one or more requesting nodes to send the substream according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node is used for the second candidate sending node to determine The first requesting node.
  • the above-mentioned second candidate sending node is a candidate sending node whose distribution tree height is less than the second threshold and not less than the above-mentioned first threshold, and the second threshold is similar to the above-mentioned first threshold, and is not a fixed value. It varies from person to person.
  • Candidate sending nodes whose distribution tree height is suboptimal in the set of candidate sending nodes may be screened out by adjusting the second threshold as the final first substream providing node.
  • the stream distribution tree can be adjusted by adjusting the sending node of the first sub-stream in the stream distribution tree as described above The sending node of the second substream in .
  • a suboptimal candidate sending node is selected from the set of candidate sending nodes as a substream sending node through the node's distribution tree height information, and a substream re-request is sent to it to continue to obtain the interrupted substream.
  • the first requesting node selects the second-best candidate sending node from the above-mentioned set of candidate sending nodes as the new second sub-stream
  • the synchronization group mechanism will also be used to actively pull sub-stream data. The following will take the first sub-stream transmission interruption as an example to provide a possible implementation manner in which the synchronization group mechanism pulls stream data.
  • the first requesting node will actively pull the required data blocks in the first sub-flow from the nodes in the synchronization group until the first requesting node relocates to the new The first substream of provides nodes.
  • the nodes in the synchronization group are nodes at the same starting position as the first requesting node during the transmission process, that is, the nodes in the synchronization group and the data receiving process of the first requesting node are in a state of synchronization.
  • the first requesting node will send a request to the nodes in the synchronization group
  • the required data blocks in the second sub-stream are actively pulled until the first requesting node is relocated to a new second sub-stream providing node.
  • FIG. 6 is a schematic diagram of an effect of a synchronization group mechanism provided by an embodiment of the present application.
  • the above-mentioned implementation manner of pulling streaming data by the synchronization group mechanism can be further described in conjunction with FIG. 6 .
  • the synchronization group node set SY s,m can be used to represent the node at the same initial position as node m in the transmission process of streaming media s , the nodes in the synchronization group node set SY s,m are in a state of synchronizing with the data receiving process of node m, which means that in the emergency state where the data transmission of node m is interrupted, the nodes in the synchronization group node set SY s,m can send The node sends a request to actively pull the data blocks required by node m.
  • the synchronization group node set SY s,m may be determined through the synchronization group mechanism, that is, the synchronization block set K m is used to determine whether other nodes are in a synchronization state with node m.
  • the node m adds all the data blocks in the two consecutive file blocks after the checkpoint in the streaming media s to the synchronization block set K m , as shown in Figure 6,
  • the checkpoint is data block 5, and all data blocks (data block 6 to data block 15) in the subsequent two consecutive file blocks (second file block and third file block) are added to the synchronization block set K m .
  • node n and node m are nodes at the same starting position during the transmission of streaming media s, and node n is added to the above synchronization group node set SY s,m .
  • node m loses a certain substream, it will select the node x which has the most intersection with its own synchronization block from the above synchronization group node set SY s,m to send an emergency request.
  • node x needs to satisfy ⁇ x
  • is a system parameter, which is not a fixed value, and can be determined according to Different application scenarios vary.
  • the first requesting node (node m) While using the synchronization group mechanism to pull stream data, the first requesting node (node m) also needs to find a new provider node of the disconnected sub-stream. After receiving ⁇ data blocks, if the first request node (node m) has not successfully found a new provider node, it will continue to send emergency requests until it is connected to a new sub-stream provider node. After finding a new sub-stream provider After the node, stop the sync group from pulling streaming data.
  • each node will periodically detect the nodes in the synchronization group node set SY s,m , if Then delete node n from the synchronization group node set SY s,m ; otherwise, if Then add node n to the above-mentioned synchronization group node set SY s,m .
  • the synchronization group mechanism in the embodiment of this application ensures that disconnected nodes can actively pull urgently needed data blocks from the synchronization group nodes quickly, so that disconnected nodes can spend the time of finding new substream providing nodes more smoothly.
  • the process improves the smoothness of streaming media file transmission.
  • the first substream request is sent to the first sending node, It is used to request the first sending node to send the first substream, and to send the second substream request to the second sending node, and is used to request the second sending node to send the second substream.
  • the first sending node accepts the first substream request and sends the first substream to the first requesting node
  • the second sending node accepts the second substream request and sends the second substream to the first requesting node.
  • the first requesting node During the process of receiving the first substream and the second substream at the first requesting node, if the first transmission speed of the first substream is much lower than the second transmission speed of the second substream, that is, the first transmission speed and the second transmission speed If the speed difference is greater than the target threshold, the first requesting node will actively interrupt the transmission of the first sub-flow with the first sending node, and select the suboptimal candidate sending node from the above-mentioned set of candidate sending nodes as the new first sub-flow Provide a node.
  • the difference in sending time of different sub-streams is caused by different performances of devices providing the sub-streams or different network states, and the difference means the difference between the above-mentioned first transmission speed and the second transmission speed.
  • the difference between the above-mentioned first transmission speed and the second transmission speed can be judged by comparing the difference between the data block indexes received by any two sub-flows, that is, the difference between the latest received data block indexes of any two sub-flows receiving a certain flow is too large. When it is large, it means that the transmission progress of the two sub-streams is different, and the entire stream transmission process must be limited to the slowest sub-stream.
  • the specific implementation is that, when the first requesting node receives data blocks of multiple sub-streams within ⁇ time, the first requesting node will compare the data block index values of these sub-streams to obtain the maximum difference ⁇ between the index values. If the difference ⁇ > ⁇ *N s , it means that the transmission speed of the substream that provides data blocks with smaller index values is much slower than other substreams, this substream will affect the performance of the entire stream transmission, and the substream needs to be replaced Provide a node.
  • ⁇ and ⁇ are system parameters, which are not fixed values and may vary according to different application scenarios. To sum up, it can be seen that the following conditions must be met to judge that the transmission speed gap between two sub-streams is too large:
  • This condition indicates that the transmission speed of the i-th sub-flow of the original flow s is much faster than that of the j-th sub-flow, the entire flow transmission process will be limited by the transmission of sub-flow j, and a strategy of adjusting the provider node of sub-flow j is required. Since the transmission of sub-stream j is in the form of streaming, firstly, the first requesting node needs to send an interrupt signal to the providing node of sub-stream j to stop the transmission of sub-stream j, and transfer the providing node of sub-stream j from the candidate sending node set delete, and re-find the providing node of substream j.
  • the specific implementation method is that the first requesting node will select a set of candidate sending nodes
  • the second candidate sending node in the network serves as a new first substream providing node, and sends a first substream re-request to the second candidate sending node, and the first substream re-request is used to request the second candidate sending node to send the first substream re-request.
  • the first sub-flow re-request contains the remaining bandwidth information of the first requesting node, because the second candidate sending node may receive sub-flow re-requests from multiple requesting nodes at the same time, at this time the second candidate sending node needs According to the remaining bandwidth information of the requesting node, one or more requesting nodes are preferentially selected to send the substream, so the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine the first requesting node.
  • the second candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the first threshold.
  • the above-mentioned target threshold and the second threshold are similar to the above-mentioned first threshold, and are not a fixed value, and may be different according to different application scenarios.
  • Candidate sending nodes whose distribution tree height is suboptimal in the set of candidate sending nodes may be screened out by adjusting the second threshold as the final first substream providing node.
  • the stream distribution can be adjusted through the above The sending node of the first sub-stream in the tree is used to adjust the sending node of the second sub-stream in the stream distribution tree.
  • FIG. 7 is a schematic diagram of an effect of adjusting a streaming transmission node provided by an embodiment of the present application.
  • a possible implementation manner of the foregoing adjustment substream sending node may be further described with reference to FIG. 7 .
  • the first requesting node receives five sub-flows (the first sub-flow A, the second sub-flow B, the third sub-flow C, the fourth sub-flow D, and the fifth sub-flow E) within ⁇ time
  • the first requesting node receives five sub-flows (the first sub-flow A, the second sub-flow B, the third sub-flow C, the fourth sub-flow D, and the fifth sub-flow E) within ⁇ time
  • the difference between the data block index of the fifth sub-stream E and the data block indexes of the other four sub-streams is large, and the data block index of the fifth sub-stream E is more Small.
  • the transmission speed of the fifth sub-stream E is much slower than that of the other four sub-streams, the fifth sub-stream E will affect the transmission performance of the entire stream, and the providing node of the fifth sub-stream E needs to be replaced.
  • the sending node of the fifth substream E in the stream distribution tree is adjusted.
  • the first requesting node receives five sub-flows (the first sub-flow A, the second sub-flow B, the third sub-flow C, the fourth sub-flow D, and the sixth sub-flow F) within ⁇ time
  • the difference between the index values of the data blocks is small, and the difference in transmission speed is also small.
  • the original fifth sub-stream E is represented by the sixth sub-stream F.
  • the requesting node actively interrupts the transmission of the substream whose transmission speed is too slow, and selects a suboptimal candidate sending node from the candidate sending node set as the new substream sending node through the distribution tree height information of the node, and Send a substream re-request to it to continue to obtain substreams to be received.
  • first sending node refuses to send the first sub-stream, or the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream, or the first requesting node actively interrupts the first sub-stream with the first sending node
  • deleting the first candidate sending node from the set of candidate sending nodes can improve the accuracy and stream transmission efficiency of the first requesting node in locating the sub-stream providing node during subsequent stream transmission.
  • the first requesting node decodes the first substream and the second substream to obtain the original stream.
  • the first requesting node After receiving the first substream and the second substream through the above step 302, the first requesting node decodes the first substream and the second substream to obtain the original stream.
  • the entire transmission network is improved. transmission efficiency.
  • the current data transmission method usually uses a distribution tree-based method for decentralized real-time streaming media transmission.
  • Each node participating in data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through the corresponding child nodes on the transmission tree. Therefore, the uplink bandwidth of a single node is highly dependent, and the disconnection of a certain node will cause data transmission failure of all child nodes under the node.
  • the data transmission method provided by the embodiment of the present application adopts the process of splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmissions, which can greatly reduce the number of convection transmission networks.
  • the data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
  • FIG. 8 is a schematic flowchart of another data transmission method provided by the embodiment of the present application. The method includes but is not limited to the following steps:
  • Step 801 Receive a first substream request sent by a first requesting node or a second substream request sent by a second requesting node.
  • a node in this embodiment of the present application is a connection point, which means a redistribution point or a communication endpoint, specifically an active electronic device connected to a network.
  • the electronic device is equipped with a processor that can be used to execute computer-executable instructions, and can send, receive or forward information through a communication channel.
  • the electronic device can be a data circuit termination device, such as a modulator, hub or switch, etc.; it can also be a data terminal device, such as a computer, mobile phone or host (such as a router, workstation or server) Wait.
  • “first" and “second” in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order.
  • the first sending node receives the first substream request sent by the first request node and the second substream request sent by the second request node.
  • the first sending node is a node that provides the first substream or the second substream, and the first requesting node is different from the second requesting node.
  • the first substream request is used to request the first sending node to send the first substream
  • the second request node is used to request the first sending node to send the second substream.
  • the first subflow request sent by the first requesting node includes remaining bandwidth information of the first requesting node
  • the second subflow request sent by the second requesting node includes remaining bandwidth information of the second requesting node.
  • the sending node may receive sub-stream requests from multiple requesting nodes at the same time, the sending node needs to select one or more requesting nodes to send sub-streams according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node and the remaining bandwidth information of the second requesting node are used by the first sending node to determine the first requesting node or the second requesting node, so that the load of the data sending node is more balanced, and the data transmission efficiency is improved.
  • the first substream and the second substream are obtained by dividing the original stream, and the first substream and the second substream are not completely the same.
  • the embodiment of the present application will provide a possible implementation manner of dividing sub-streams, and its specific implementation process has been specifically described in the above step 301, and will not be repeated here.
  • redundant coding may also be performed on the first sub-stream and the second sub-stream, so as to improve the efficiency of sub-stream transmission. reliability and stability.
  • the embodiment of the present application will provide a possible implementation manner of substream redundancy coding, and its specific implementation process has been described in the above step 301, and will not be repeated here.
  • the first sending node Before the first requesting node sends the first substream request to the first sending node and before the second requesting node sends the second substream request to the first sending node, the first sending node The distribution tree height information of the first sending node will be sent to the first requesting node and the second requesting node. There may be multiple potential sending nodes owning the first substream in the streaming network. The first requesting node and the second requesting node need to select a sending node according to the distribution tree height information of the potential sending nodes, and send the first The substream requests the transmission of the first substream, and sends the second substream request thereto for the transmission of the second substream.
  • the distribution tree height information of the first sending node is used by the first requesting node to determine to send the first sub-stream request to the first sending node, and is used by the second requesting node to send the second sub-stream request to the first sending node,
  • the load of the data sending node is more balanced, and the efficiency of data transmission is improved.
  • Step 802 Send the first subflow to the first requesting node or send the second subflow to the second requesting node.
  • This step provides a possible implementation manner in which the first sending node sends the substream.
  • the first sending node will send the first substream to the first requesting node or send the second substream to the second requesting node according to the substream transmission information and the node transmission status.
  • the first sending node provides the first sub-stream and the remaining bandwidth is higher than the bit rate of the first sub-stream
  • the first sub-stream is sent to the first requesting node
  • the second sub-stream is provided at the first sending node
  • the remaining bandwidth is higher than the bit rate of the second sub-stream
  • send the second sub-stream to the second request node provide the first sub-stream and the second sub-stream at the first sending node, and the remaining bandwidth is higher than the first sub-stream
  • the first sub-stream is sent to the first requesting node
  • the second sub-stream is sent to the second requesting node.
  • the first sending node when the first sending node provides the first sub-stream and the second sub-stream, and the remaining bandwidth is higher than the bit rate of the first sub-stream and the second sub-stream, the first sending node will compare the first requesting node The remaining bandwidth with the second requesting node. If the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node, first send the first substream to the first requesting node; then update the remaining bandwidth of the first sending node; the remaining bandwidth after the update of the first sending node is high In the case of the bit rate of the second sub-stream, the second sub-stream is then sent to the second requesting node.
  • the preferred sub-stream is sent to the requesting node, and, combined with the remaining bandwidth information of each requesting node, the preferred option has a higher residual bandwidth
  • the request node sends its requested sub-stream, which can maximize the bandwidth utilization, fully match the uplink bandwidth of each node in the mobile distributed stream transmission network environment, make the load of the data sending node more balanced, and make the entire stream transmission The transmission efficiency of the network is higher.
  • FIG. 9 is an interactive schematic diagram of a stream transmission network provided by an embodiment of the present application, and can also be understood as a supplement to the flow charts of the data transmission methods in FIGS. 3 and 8 above.
  • a node in this embodiment of the present application is a connection point, which means a redistribution point or a communication endpoint, specifically an active electronic device connected to a network.
  • the electronic device is equipped with a processor that can be used to execute computer-executable instructions, and can send, receive or forward information through a communication channel.
  • the electronic device can be a data circuit termination device, such as a modulator, hub or switch, etc.; it can also be a data terminal device, such as a computer, mobile phone or host (such as a router, workstation or server) Wait.
  • “first" and “second” in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order.
  • the source node processes the original streaming media file, including dividing sub-streams, redundant encoding, and the like.
  • the transmission efficiency of the entire transmission network can be improved.
  • redundantly encoding the file blocks redundant data blocks are added to the file blocks, thereby achieving the purpose of substream redundant encoding.
  • the newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which can improve the reliability and stability of sub-stream transmission.
  • the source node publishes metadata about the original flow to the streaming network, the metadata includes the division of sub-streams, but does not include specific flow data.
  • Each requesting node in the streaming network decides whether to subscribe to the stream after receiving the metadata published by the source node in the streaming network. Determine the sending node that can provide the sub-stream through the metadata, and initiate a request for the sub-stream to the sending node. For example, the first requesting node sends substream positioning to the first sending node, the second sending node, and the second requesting node respectively in the stream transmission network, and determines the sending node that can provide the first substream and the second substream.
  • the sending node of the stream the second requesting node sends substream positioning to the first sending node, the second sending node, and the first requesting node respectively in the streaming network, and determines the sending node that can provide the first substream and the The sending node of the second substream. In this way, the accuracy and efficiency of sub-stream positioning can be improved to the greatest extent, thereby improving the transmission efficiency of the overall stream transmission network.
  • the first requesting node and the second requesting node determine that the first sending node can provide the first substream, and the second sending node can provide the second substream.
  • the first request node sends a first substream request to the first sending node, requests the first sending node to send the first substream, and sends a second substream request to the second sending node, requests the second sending node to send the second substream .
  • the second requesting node sends a first sub-stream request to the first sending node, requests the first sending node to send the first sub-stream, and sends a second sub-stream request to the second sending node, requests the second sending node to send the first sub-stream Two sons flow.
  • the first sending node After the first sending node receives the first sub-stream request sent by the first requesting node and the first sub-stream request sent by the second requesting node, in response to the request, it sends the first sub-stream to the first requesting node and the second sub-stream to the second requesting node respectively.
  • the requesting node sends the first sub-flow.
  • the first sending node will compare the remaining bandwidth of the first requesting node and the second requesting node, if the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node, the first sending node will give priority to the first requesting node
  • the requesting node sends the first sub-stream; then updates the remaining bandwidth of the first sending node; when the updated remaining bandwidth of the first sending node is higher than the bit rate of the first sub-stream, then sends the first sub-stream to the second requesting node Substream.
  • the second sending node After the second sending node receives the second substream request sent by the first requesting node and the second substreaming request sent by the second requesting node, it responds to the request by comparing the The remaining bandwidth is selected to send the second sub-flow to the first requesting node and send the second sub-flow to the second requesting node respectively.
  • the bandwidth utilization rate can be improved to the greatest extent, and the uplink bandwidth of each node in the mobile distributed streaming network environment can be fully matched, so that the load of the data sending node is more balanced, and the transmission efficiency of the entire streaming transmission network is higher.
  • the problem of frequently exiting or joining nodes occurs from time to time.
  • the first sending node goes offline due to node performance or network status, etc., it and The transmission of the first substream between the first requesting node and the second requesting node is interrupted.
  • the first requesting node and the second requesting node can use the synchronization group mechanism to actively pull the data blocks required by the first substream from the synchronization group node until the first requesting node and the second requesting node relocate to the new A substream provides nodes.
  • the synchronization group mechanism in the embodiment of this application ensures that disconnected nodes can actively pull urgently needed data blocks from the synchronization group nodes quickly, so that disconnected nodes can spend the time of finding new substream providing nodes more smoothly.
  • the process improves the smoothness and efficiency of streaming media file transmission.
  • the first requesting node and the second requesting node After receiving the first substream and the second substream, the first requesting node and the second requesting node decode the first substream and the second substream to obtain the original stream.
  • the first requesting node and the second requesting node decode the first substream and the second substream to obtain the original stream.
  • it can largely Reduce the data transmission pressure on a single node in the stream transmission network, make the load of the data sending node more balanced, fully match the uplink bandwidth of each node in the mobile distributed stream transmission network environment, and make the entire stream transmission network indestructible and transmission efficient higher.
  • Figure 10 is a schematic structural diagram of a data transmission device provided in the embodiment of the present application
  • the data transmission device 100 may include a sending unit 1001 and a receiving unit 1002, wherein the description of each unit is as follows:
  • a sending unit 1001 configured to send a first request to a first sending node
  • a receiving unit 1002 configured to receive the first substream sent by the first sending node in response to the first request
  • the sending unit 1001 is further configured to send a second request to a second sending node
  • the receiving unit 1002 is further configured to receive a second substream sent by the second sending node in response to the second request; the first sending node is different from the second sending node; the first substream Both the stream and the second sub-stream are composed of data blocks in the original stream, and the first sub-stream is different from the second sub-stream.
  • the device also includes:
  • the decoding unit 1003 is configured to decode the first substream and the second substream to obtain the original stream.
  • the original stream includes a first file block and a second file block
  • the first sub-stream includes at least one data block in the first file block and the second file block
  • At least one data block in the second substream includes at least one data block in the first file block and at least one data block in the second file block.
  • the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block;
  • the second file The data blocks in the blocks are the data blocks in the original stream, or the data blocks obtained by redundantly encoding the second file blocks.
  • the size of the first file block is determined by the data block type and the data block size in the original stream
  • the size of the second file block is determined by the data block in the original stream The type and block size are determined.
  • the first request includes remaining bandwidth information of the data transmission device
  • the second request includes remaining bandwidth information of the data transmission device
  • the remaining bandwidth information of the data transmission device Used by the first sending node to determine whether to send the first sub-stream, or used by the second sending node to determine whether to send the second sub-stream.
  • the device also includes:
  • the receiving unit 1002 is configured to acquire metadata of the original stream, where the metadata is used to determine the data blocks included in the first sub-stream;
  • the determining unit 1004 is configured to determine the first sending node based on the metadata.
  • the determining unit 1004 is specifically configured to determine a set of candidate sending nodes based on the metadata; the set of candidate sending nodes includes candidate sending nodes owning the first substream;
  • the determining unit 1004 is further configured to determine a first candidate sending node in the set of candidate sending nodes as the first sending node; the first candidate sending node is a candidate whose distribution tree height is smaller than a first threshold sending node.
  • the receiving unit 1002 is further configured to receive the distribution tree height information sent by the first sending node, and the distribution tree height information of the first sending node is used by the data transmission device Determine the first sending node.
  • the determining unit 1004 is further configured to, in the case that the heights of the distribution trees of two or more candidate sending nodes are the same and less than the first threshold, select the one with the highest remaining bandwidth The candidate sending node is determined as the first sending node.
  • the device also includes:
  • a query unit 1005 configured to query a neighbor node or a network node based on the metadata; the neighbor node is a node whose transmission frequency with the first requesting node exceeds a frequency threshold;
  • the determining unit 1004 is further configured to add the neighbor node owning the first subflow to the candidate sending node set, and add the network node owning the first subflow to the candidate sending node gather.
  • the sending unit 1001 is further configured to, when the response of the first sending node to the first request does not meet the preset condition, send The second candidate sending node sends a third request; the second candidate sending node is a candidate sending node whose distribution tree height is less than the second threshold and not less than the first threshold, and the third request is used to request the first The second candidate sending node sends the first substream.
  • the sending unit 1001 is specifically configured to, when the first sending node does not send the first substream within a preset time, send the second candidate sending node sending said third request; or,
  • the sending unit 1001 is specifically further configured to send the third request to the second candidate sending node when the transmission of the first substream is interrupted during the process of receiving the first substream; or,
  • the sending unit 1001 is further configured to, in the process of receiving the first sub-stream, if the first transmission speed of the first sub-stream is lower than a preset threshold, send to the second candidate sending node said third request; or,
  • the sending unit 1001 is specifically further configured to, during the process of receiving the first substream and the second substream, the first transmission speed of the first substream and the second transmission speed of the second substream When the difference in transmission speed is greater than the target threshold and the first transmission speed is lower than the second transmission speed, sending the third request to the second candidate sending node.
  • the device also includes:
  • Pulling unit 1006 configured to pull the required data blocks in the first sub-stream from the nodes in the synchronization group when the number of sub-stream interruptions is greater than the number of redundant sub-streams;
  • the node is a node at the same starting position as the first requesting node during the transmission process.
  • the third request includes remaining bandwidth information of the first requesting node, and the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine the first request node.
  • the device also includes:
  • a deleting unit 1007 configured to delete the first candidate sending node from the set of candidate sending nodes.
  • each unit in the device shown in Fig. 10 can be respectively or all combined into one or several other units to form, or one (some) units can be further divided into functionally more It is composed of multiple small units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above-mentioned units are divided based on logical functions.
  • the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit.
  • the network-based device may also include other units. In practical applications, these functions may also be assisted by other units, and may be implemented cooperatively by multiple units.
  • the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree model transmissions can greatly reduce the data transmission pressure on a single node in the streaming transmission network. , so that the load of the data sending node is more balanced, and fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, so that the indestructibility and transmission efficiency of the entire streaming network are higher.
  • FIG. 11 is a schematic structural diagram of a data transmission device provided by an embodiment of the present application.
  • the data transmission device 110 may include a receiving unit 1101 and a sending unit 1102, where each unit is described as follows:
  • the receiving unit 1101 is configured to receive a first request sent by a first requesting node or a second request sent by a second requesting node; the first request is used to request to send a first substream to the first requesting node, the The second request is used to request to send a second sub-flow to the second requesting node; the first requesting node is different from the second requesting node; both the first sub-flow and the second sub-flow are created by the original consisting of data blocks in a stream, the first sub-stream being different from the second sub-stream;
  • a sending unit 1102 configured to send the first subflow to the first requesting node or send the second subflow to the second requesting node.
  • the original stream includes a first file block and a second file block
  • the first sub-stream includes at least one data block in the first file block and the second file block
  • At least one data block in the second substream includes at least one data block in the first file block and at least one data block in the second file block.
  • the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block;
  • the second file The data blocks in the blocks are the data blocks in the original stream, or the data blocks obtained by redundantly encoding the second file blocks.
  • the first request includes remaining bandwidth information of the first requesting node
  • the second request includes remaining bandwidth information of the second requesting node
  • the remaining bandwidth information and the remaining bandwidth information of the second requesting node are used by the data transmission device to determine whether to send the first sub-flow or the second sub-flow.
  • the sending unit 1102 is further configured to send the distribution tree height information of the data transmission device to the first request node, and the distribution tree height information of the data transmission device is used for the The first requesting node determines whether to send the first request to the data transmission device.
  • the sending unit 1102 is specifically configured to provide the first substream to the data transmission device and the remaining bandwidth of the data transmission device is higher than the bits of the first substream rate, sending the first sub-stream to the first requesting node; or,
  • the sending unit 1102 is specifically further configured to send the second substream to the The second requesting node sends the second sub-stream; or,
  • the sending unit 1102 is further configured to provide the first sub-stream and the second sub-stream to the data transmission device, and the remaining bandwidth of the data transmission device is higher than the bits of the first sub-stream rate and the bit rate of the second sub-stream, sending the first sub-stream to the first requesting node, and sending the second sub-stream to the second requesting node.
  • the device also includes:
  • the sending unit 1102 is specifically further configured to send the first substream to the first requesting node when the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node;
  • the sending unit 1102 is specifically further configured to send the second substream to the second requesting node when the updated remaining bandwidth of the data transmission device is higher than the bit rate of the second substream .
  • each unit in the device shown in Fig. 11 can be respectively or all combined into one or several other units to form, or one (some) units can be further divided into functionally more It is composed of multiple small units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above-mentioned units are divided based on logical functions.
  • the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit.
  • the network-based device may also include other units. In practical applications, these functions may also be assisted by other units, and may be implemented cooperatively by multiple units.
  • the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree model transmissions can greatly reduce the data transmission pressure on a single node in the streaming transmission network , so that the load of the data sending node is more balanced, and fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, so that the indestructibility and transmission efficiency of the entire streaming network are higher.
  • FIG. 12 is a schematic structural diagram of an electronic device 120 provided by an embodiment of the present application.
  • the electronic device 120 may include a memory 1201 and a processor 1202 .
  • a communication interface 1203 and a bus 1204 may also be included, wherein the memory 1201 , the processor 1202 and the communication interface 1203 are connected to each other through the bus 1204 .
  • the communication interface 1203 is used for data interaction with the above-mentioned data transmission device 100 or the data transmission device 110 .
  • the memory 1201 is used to provide a storage space, in which data such as operating systems and computer programs can be stored.
  • Memory 1201 includes, but is not limited to, random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or Portable read-only memory (compact disc read-only memory, CD-ROM).
  • the processor 1202 is a module for performing arithmetic operations and logic operations, and may be in a processing module such as a central processing unit (central processing unit, CPU), a graphics processing unit (graphics processing unit, GPU) or a microprocessor (microprocessor unit, MPU). one or a combination of more.
  • a processing module such as a central processing unit (central processing unit, CPU), a graphics processing unit (graphics processing unit, GPU) or a microprocessor (microprocessor unit, MPU). one or a combination of more.
  • a computer program is stored in the memory 1201, and the processor 1202 calls the computer program stored in the memory 1201 to execute the data transmission method shown in FIG. 3 above:
  • the first substream request is used to request the first sending node to send a first substream, where the first substream includes at least one data block in the original stream;
  • the second substream request is used to request the second sending node to send a second substream, the second substream including at least one data in the original stream blocks;
  • the first sending node is different from the second sending node, and the data blocks in the first substream are not exactly the same as the data blocks in the second substream;
  • the first substream and the second substream are received.
  • the processor 1202 calls the computer program stored in the memory 1201, which can also be used to execute the method steps performed by the various units in the data transmission device 100 shown in FIG. I won't repeat them here.
  • a computer program is stored in the memory 1201, and the processor 1202 calls the computer program stored in the memory 1201 to execute the data transmission method shown in FIG. 8 above:
  • the first substream request is used to request to send a first substream to the first requesting node
  • the The second substream request is used to request to send a second substream to the second requesting node
  • the first substream includes at least one data block in the original stream
  • the second substream includes at least one data block in the original stream at least one data block, the data block in the first substream is not identical to the data block in the second substream;
  • the processor 1202 invokes the computer program stored in the memory 1201, which can also be used to execute the method steps performed by each unit in the data transmission device 110 shown in FIG. I won't repeat them here.
  • the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree model transmissions can greatly reduce the data transmission pressure on a single node in the streaming transmission network. Make the load of the data sending node more balanced, fully match the uplink bandwidth of each node in the mobile distributed streaming network environment, and make the entire streaming network more invulnerable and transmission efficient.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • the above-mentioned computer-readable storage medium stores a computer program.
  • the above-mentioned computer program is run on one or more processors, the above-mentioned FIG. 3 and FIG. 8 can be implemented. method shown.
  • An embodiment of the present application further provides a computer program product, which can implement the methods shown in FIG. 3 and FIG. 8 above when the computer program product is run on a processor.
  • the embodiment of the present application also provides a chip, the chip includes a processor and a communication interface, the processor is used to call and run instructions from the communication interface, when the processor executes the instructions, the above-mentioned Figure 3 and Figure 3 can be implemented. 8 shows the method.
  • the embodiment of the present application also provides a data transmission system, which includes at least one data transmission device 100 or data transmission device 110 or electronic device 120 or chip as described above.
  • the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree models can greatly reduce the data transmission pressure on a single node in the streaming transmission network and make the load on the data sending node more efficient. Balanced, fully matching the uplink bandwidth of each node in the mobile distributed streaming network environment, making the entire streaming network more robust and efficient.
  • the processes can be completed by hardware related to computer programs, and the computer programs can be stored in computer-readable storage media.
  • the computer programs When executed, , may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: various media capable of storing computer program codes such as read-only memory ROM or random access memory RAM, magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Disclosed in the present application are a data transmission method and apparatus, and an electronic device and a storage medium. The method comprises: sending a first sub-stream request to a first sending node, and sending a second sub-stream request to a second sending node, wherein the first sending node is a node that provides a first sub-stream, the second sending node is a node that provides a second sub-stream, and the first sub-stream and the second sub-stream are obtained by means of dividing an original stream; receiving the first sub-stream and the second sub-stream; and decoding the first sub-stream and the second sub-stream to obtain the original stream. By means of the present method, the whole mobile distributed stream transmission process is split into a plurality of sub-stream distribution tree model transmission processes, such that the data transmission pressure of a single node in a stream transmission network can be reduced to a great extent, and loads of data sending nodes are more balanced; and uplink bandwidths of the nodes in a mobile distributed stream transmission network environment are fully matched, such that the destruction-resistance and the transmission efficiency of the whole stream transmission network are higher.

Description

一种数据传输方法、装置、电子设备及存储介质A data transmission method, device, electronic equipment and storage medium 技术领域technical field
本申请涉及数据处理技术领域,尤其涉及一种数据传输方法、装置、电子设备及存储介质。The present application relates to the technical field of data processing, and in particular to a data transmission method, device, electronic equipment and storage medium.
背景技术Background technique
数据传输是按照一定的规程,通过一条或多条数据链路,将数据从数据源传输到数据终端的通信过程。一种好的数据传输方式可以提高数据传输的实时性和可靠性,使数据传输更加快捷、安全和高效。随着电子计算及网络通信的不断发展,越来越多的应用场景需要依赖于高效的数据传输,人们对高效的数据传输的需求日益增长。例如,一场产品发布会的直播活动,在线观看直播的用户量是不确定的,较大的在线用户量会远远超出内容分发网络(content delivery network,CDN)的带宽负载,致使数据传输卡顿,直播出现崩溃、掉线等问题,给用户带来较差体验。Data transmission is a communication process that transmits data from a data source to a data terminal through one or more data links according to certain procedures. A good data transmission method can improve the real-time and reliability of data transmission, making data transmission faster, safer and more efficient. With the continuous development of electronic computing and network communication, more and more application scenarios need to rely on efficient data transmission, and people's demand for efficient data transmission is increasing. For example, for a live broadcast of a product launch event, the number of users watching the live broadcast online is uncertain, and a large number of online users will far exceed the bandwidth load of the content delivery network (CDN), resulting in data transmission stuck Suddenly, there were problems such as crashes and disconnections in the live broadcast, which brought poor experience to users.
目前,基于分发树的方法进行去中心化的实时流媒体传输,是当前使用最为广泛的数据传输方法。该数据传输方法将参与数据传输的各个节点结构化的组织成流媒体传输树,源节点将流媒体文件切分成若干个文件块,通过传输树上相应的子节点进行流传输。At present, the decentralized real-time streaming media transmission based on the distribution tree method is the most widely used data transmission method. In the data transmission method, each node participating in the data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through corresponding child nodes on the transmission tree.
但是,上述数据传输方法对单个节点的上行带宽依赖程度较大,某个节点断开会导致该节点下的所有子节点的数据传输失败。因此,该数据传输方法对带宽的利用率较低,抗毁性较差,数据传输效率较低。However, the above data transmission method is highly dependent on the uplink bandwidth of a single node, and disconnection of a certain node will cause data transmission failure of all child nodes under the node. Therefore, the data transmission method has low bandwidth utilization, poor invulnerability, and low data transmission efficiency.
发明内容Contents of the invention
本申请实施例提供了一种数据传输方法、装置、电子设备及存储介质,通过将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。The embodiment of the present application provides a data transmission method, device, electronic equipment, and storage medium. By splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmission processes, the convective transmission can be greatly reduced. The data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
第一方面,本申请实施例提供了一种数据传输方法,该方法包括:In the first aspect, the embodiment of the present application provides a data transmission method, the method including:
向第一发送节点发送第一请求;sending a first request to a first sending node;
接收所述第一发送节点响应于所述第一请求发送的第一子流;receiving the first substream sent by the first sending node in response to the first request;
向第二发送节点发送第二请求;sending a second request to a second sending node;
接收所述第二发送节点响应于所述第二请求发送的第二子流;所述第一发送节点不同于所述第二发送节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同。receiving the second substream sent by the second sending node in response to the second request; the first sending node is different from the second sending node; the first substream and the second substream are both Consisting of chunks of data in an original stream, said first substream is different from said second substream.
本申请实施例中,通过将原始流划分为多个子流,进而将整个移动分布式流传输过程拆分成多个子流传输的过程,使得整个传输网络的传输效率更高。具体为,第一请求节点向第一发送节点发送第一请求,该第一请求用于请求该第一发送节点发送第一子流。第一 请求节点向第二发送节点发送第二请求,该第二请求用于请求该第二发送节点发送第二子流。其中,该第一子流和第二子流通过划分原始流得到,且该第一子流和第二子流不完全相同。第一请求节点接收第一子流和第二子流。至此,本申请实施例通过将原始流划分为第一子流和第二子流,进而将原始流传输过程拆分成第一子流和第二子流的传输过程,提高了整个传输网络的传输效率。In the embodiment of the present application, by dividing the original stream into multiple sub-streams, and then splitting the entire mobile distributed stream transmission process into multiple sub-stream transmission processes, the transmission efficiency of the entire transmission network is higher. Specifically, the first requesting node sends a first request to the first sending node, where the first request is used to request the first sending node to send the first substream. A first requesting node sends a second request to a second sending node, where the second request is used to request the second sending node to send a second substream. Wherein, the first substream and the second substream are obtained by dividing the original stream, and the first substream and the second substream are not completely the same. The first requesting node receives the first sub-stream and the second sub-stream. So far, the embodiment of the present application divides the original stream into the first sub-stream and the second sub-stream, and further divides the transmission process of the original stream into the first sub-stream and the second sub-stream, thereby improving the efficiency of the entire transmission network. transmission efficiency.
目前的数据传输方法,通常采用基于分发树的方法进行去中心化的实时流媒体传输。将参与数据传输的各个节点结构化的组织成流媒体传输树,源节点将流媒体文件切分成若干个文件块,通过传输树上相应的子节点进行流传输。因此,对单个节点的上行带宽依赖程度较大,某个节点断开会导致该节点下的所有子节点的数据传输失败。The current data transmission method usually uses a distribution tree-based method for decentralized real-time streaming media transmission. Each node participating in data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through the corresponding child nodes on the transmission tree. Therefore, the uplink bandwidth of a single node is highly dependent, and the disconnection of a certain node will cause data transmission failure of all child nodes under the node.
本申请实施例提供的数据传输方法,与目前的数据传输方法相比,采用将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。Compared with the current data transmission method, the data transmission method provided by the embodiment of the present application adopts the process of splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmissions, which can greatly reduce the number of convection transmission networks. The data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
在一个可能的实施方式中,所述方法还包括:In a possible implementation manner, the method also includes:
对所述第一子流和所述第二子流解码,得到所述原始流。Decoding the first substream and the second substream to obtain the original stream.
在本申请实施例中,第一请求节点接收第一子流和第二子流后,对该第一子流和第二子流解码,得到原始流。本申请实施例通过将原始流划分为第一子流和第二子流,进而将原始流传输过程拆分成第一子流和第二子流的传输过程,提高了整个传输网络的传输效率。In the embodiment of the present application, after receiving the first substream and the second substream, the first requesting node decodes the first substream and the second substream to obtain the original stream. In the embodiment of the present application, the transmission efficiency of the entire transmission network is improved by dividing the original stream into the first sub-stream and the second sub-stream, and then splitting the transmission process of the original stream into the first sub-stream and the second sub-stream. .
在一个可能的实施方式中,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。In a possible implementation manner, the original stream includes a first file block and a second file block, and both the first sub-stream and the second sub-stream include the first file block and the second file Data blocks in blocks.
在本申请实施例中,通过对第一子流和第二子流包括的数据块情况的说明,提供了一种划分子流的可能的实施方式。将原始流划分为两个或两个以上的文件块,每个文件块包括两个或两个以上的数据块。将所有数据块按照时间顺序对其索引编号,并根据数据块索引将数据块划分为不同的子流中,使得划分得到的每个子流包括每个文件块中的至少一个数据块。具体为,将原始流划分为第一文件块和第二文件块,第一文件块和第二文件块包括两个或两个以上数据块。根据数据块索引将数据块划分为第一子流或第二子流中,从而实现将原始流划分为第一子流和第二子流的目的。其中,该第一子流包括第一文件块中的至少一个数据块和第二文件块中的至少一个数据块,该第二子流包括第一文件块中的至少一个数据块和第二文件块中的至少一个数据块。In the embodiment of the present application, a possible implementation manner of dividing substreams is provided by describing data blocks included in the first substream and the second substream. Divide the original stream into two or more file blocks, each file block includes two or more data blocks. Indexes of all data blocks are numbered in time order, and the data blocks are divided into different sub-streams according to the data block indexes, so that each divided sub-stream includes at least one data block in each file block. Specifically, the original stream is divided into a first file block and a second file block, and the first file block and the second file block include two or more data blocks. The data block is divided into the first sub-stream or the second sub-stream according to the data block index, so as to realize the purpose of dividing the original stream into the first sub-stream and the second sub-stream. Wherein, the first substream includes at least one data block in the first file block and at least one data block in the second file block, and the second substream includes at least one data block in the first file block and the second file block At least one data block in the block.
本申请实施例提供的子流划分方法,使得划分得到的第一子流和第二子流都包括第一文件块中的至少一个数据块和第二文件块中的至少一个数据块,确保第一请求节点接收到第一子流和第二子流后,能通过对第一子流和第二子流编码还原得到原始流,提高了数据传输效率。The substream division method provided by the embodiment of the present application makes the divided first substream and second substream both include at least one data block in the first file block and at least one data block in the second file block, ensuring that the first After receiving the first sub-stream and the second sub-stream, a requesting node can restore the original stream by encoding the first sub-stream and the second sub-stream, thereby improving data transmission efficiency.
在一种可能的实施方式中,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。In a possible implementation manner, the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block; The second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
在本申请实施例中,通过对第一文件块和第二文件块包含的数据块情况的说明,提供了一种子流冗余编码的可能的实施方式。将原始流划分为两个或两个以上的文件块,每个 文件块包含两个或两个以上的数据块。对每个文件块中的数据块进行前向纠错码(Forward Error Correction,FEC)编码得到新的冗余数据块,并将该冗余数据块加入相应的文件块中,使得每个文件块中的数据块为原始流中的数据块,或是对文件块冗余编码得到的数据块。具体为,将原始流划分为第一文件块和第二文件块,对第一文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入第一文件块中,同理,对第二文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入第二文件块中。因此,第一文件块中的数据块为原始流中的数据块,或是对第一文件块冗余编码得到的数据块,第二文件块中的数据块为原始流中的数据块,或是对第二文件块冗余编码得到的数据块。In the embodiment of the present application, a possible implementation manner of substream redundancy coding is provided by describing the data blocks included in the first file block and the second file block. Divide the original stream into two or more file blocks, each file block contains two or more data blocks. Perform forward error correction code (Forward Error Correction, FEC) encoding on the data blocks in each file block to obtain new redundant data blocks, and add the redundant data blocks to the corresponding file blocks, so that each file block The data blocks in are the data blocks in the original stream, or the data blocks obtained by redundantly encoding the file blocks. Specifically, divide the original stream into a first file block and a second file block, perform FEC encoding on the data block in the first file block to obtain a new redundant data block, and add the redundant data block to the first file block In the same way, FEC encoding is performed on the data blocks in the second file block to obtain a new redundant data block, and the redundant data block is added to the second file block. Therefore, the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block, and the data blocks in the second file block are data blocks in the original stream, or is a data block obtained by redundantly encoding the second file block.
本申请实施例通过对文件块冗余编码,在文件块中加入冗余数据块,从而实现子流冗余编码的目的。新加入的冗余数据块可以得到相应的冗余子流,使得在流传输过程中,即使存在若干个子流传输掉线的情况,但只要掉线子流不超过冗余子流,依然可以根据接收到的子流,解码得到原始流,提高了子流传输的可靠性和稳定性。In the embodiment of the present application, redundant coding of the file block is performed, and redundant data blocks are added to the file block, so as to realize the purpose of redundant coding of the substream. The newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which improves the reliability and stability of sub-stream transmission.
在一种可能的实施方式中,所述第一文件块的大小由所述原始流中的数据块类型和数据块大小确定,所述第二文件块的大小由所述原始流中的数据块类型和数据块大小确定。In a possible implementation manner, the size of the first file block is determined by the data block type and the data block size in the original stream, and the size of the second file block is determined by the data block in the original stream The type and block size are determined.
在本申请实施例中,提供了一种划分文件块的可能的实施方式,即划分文件块的大小由原始流中包含的数据块类型和数据块大小确定。不同应用场景下传输的原始流不同,其包含的数据类型和大小均不同,故划分文件块的大小应根据应用场景进行适应性调整,可以提高数据传输效率。In the embodiment of the present application, a possible implementation manner of dividing the file block is provided, that is, the size of the divided file block is determined by the type and size of the data block included in the original stream. The original streams transmitted in different application scenarios are different, and the data types and sizes contained in them are different. Therefore, the size of divided file blocks should be adjusted adaptively according to the application scenarios, which can improve the efficiency of data transmission.
在一种可能的实施方式中,所述第一请求和所述第二请求均包括第一请求节点的剩余带宽信息;所述第一请求节点为发送所述第一请求和所述第二请求的请求节点;所述第一请求节点的剩余带宽信息用于所述第一发送节点确定是否发送所述第一子流,和用于所述第二发送节点确定是否发送所述第二子流。In a possible implementation manner, both the first request and the second request include remaining bandwidth information of the first requesting node; the first requesting node sends the first request and the second request the requesting node; the remaining bandwidth information of the first requesting node is used by the first sending node to determine whether to send the first sub-stream, and is used by the second sending node to determine whether to send the second sub-stream .
在本申请实施例中,第一请求节点发出的子流请求,包含第一请求节点的剩余带宽信息。发送节点可能收到多个请求节点的子流请求,此时发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个剩余带宽更高的请求节点发送子流,该第一请求节点的剩余带宽信息用于发送节点确定是否向第一请求节点发送对应的子流,使数据发送节点的负载更加均衡,提高了数据传输效率。In this embodiment of the present application, the substream request sent by the first requesting node includes remaining bandwidth information of the first requesting node. The sending node may receive substream requests from multiple requesting nodes. At this time, the sending node needs to select one or more requesting nodes with higher remaining bandwidth to send the substream according to the remaining bandwidth information of the requesting node. The remaining bandwidth of the first requesting node The bandwidth information is used by the sending node to determine whether to send the corresponding subflow to the first requesting node, so that the load of the data sending node is more balanced, and the data transmission efficiency is improved.
在一种可能的实施方式中,所述向第一发送节点发送第一子流请求之前,所述方法还包括:In a possible implementation manner, before sending the first substream request to the first sending node, the method further includes:
获取所述原始流的元数据;obtaining metadata of the original stream;
基于所述元数据,确定所述第一子流;determining the first substream based on the metadata;
基于所述元数据,确定所述第一发送节点。Based on the metadata, the first sending node is determined.
在本申请实施例中,提供了一种确定发送节点的可能的实施方式。在向第一发送节点发送第一请求之前,需确定能提供第一子流的节点,即第一发送节点。同理,在向第二发送节点发送第二请求之前,需确定能提供第二子流的节点,即第二发送节点。可以根据原始流的元数据,确定上述第一发送节点和第二发送节点。该元数据包括了原始流的划分信息,可用于确定第一子流包括的数据块,以及第二子流包括的数据块。在将原始流划分为第一子流和第二子流后,该元数据即发布在流传输网络群组中。第一请求节点可根据元数 据,分别向第一发送节点和第二发送节点发起对子流的请求。In the embodiment of the present application, a possible implementation manner of determining the sending node is provided. Before sending the first request to the first sending node, it is necessary to determine a node capable of providing the first substream, that is, the first sending node. Similarly, before sending the second request to the second sending node, it is necessary to determine a node capable of providing the second substream, that is, the second sending node. The above-mentioned first sending node and second sending node may be determined according to metadata of the original stream. The metadata includes division information of the original stream, which can be used to determine the data blocks included in the first sub-stream and the data blocks included in the second sub-stream. After the original stream is divided into the first sub-stream and the second sub-stream, the metadata is published in the streaming network group. The first requesting node may respectively initiate a request for the substream to the first sending node and the second sending node according to the metadata.
本申请实施例通过元数据确定能提供子流的发送节点,并向该发送节点发起对子流的请求,可以最大程度的提高子流定位的准确率及效率,从而提高整体流传输网络的传输效率。The embodiment of the present application determines the sending node that can provide the sub-stream through the metadata, and initiates a request for the sub-stream to the sending node, which can maximize the accuracy and efficiency of sub-stream positioning, thereby improving the transmission of the overall stream transmission network efficiency.
在一种可能的实施方式中,所述基于所述元数据,确定所述第一发送节点,包括:In a possible implementation manner, the determining the first sending node based on the metadata includes:
基于所述元数据,确定候选发送节点集合;所述候选发送节点集合包含拥有所述第一子流的候选发送节点;Based on the metadata, determine a set of candidate sending nodes; the set of candidate sending nodes includes candidate sending nodes owning the first substream;
将所述候选发送节点集合中的第一候选发送节点确定为所述第一发送节点;所述第一候选发送节点为分发树高度小于第一阈值的候选发送节点。Determining a first candidate sending node in the set of candidate sending nodes as the first sending node; the first candidate sending node is a candidate sending node whose distribution tree height is smaller than a first threshold.
在本申请实施例中,提供了一种确定发送节点的可能的具体实施方式。根据元数据,确定候选发送节点集合,该候选发送节点集合包含一个或多个候选发送节点及其在传输网络中的分发树高度信息。其中,上述候选发送节点为潜在的第一子流提供节点,若某个节点拥有的子流的起始数据块索引和末数据块索引覆盖了第一子流,则将该节点作为候选发送节点保存在候选发送节点集合中。然后通过比较候选发送节点集合中的候选发送节点的分发树高度,将分发树高度小于第一阈值的第一候选发送节点确定为第一发送节点,并向其发送第一子流请求。该第一阈值不是一个固定的值,可以根据应用场景的不同而不同。可以通过调整第一阈值筛选出候选发送节点集合中分发树高度最小的候选发送节点作为最终的第一子流提供节点。同理,可以通过上述确定第一发送节点的方式,来确定第二发送节点。In the embodiment of the present application, a possible specific implementation manner of determining the sending node is provided. According to the metadata, a set of candidate sending nodes is determined, and the set of candidate sending nodes includes one or more candidate sending nodes and their distribution tree height information in the transmission network. Among them, the above-mentioned candidate sending node is a potential first sub-stream providing node, if the start data block index and the end data block index of a sub-stream owned by a certain node cover the first sub-stream, then the node is regarded as a candidate sending node Stored in the set of candidate sending nodes. Then, by comparing the distribution tree heights of the candidate sending nodes in the candidate sending node set, determine the first candidate sending node whose distribution tree height is smaller than the first threshold as the first sending node, and send the first substream request to it. The first threshold is not a fixed value, and may vary according to different application scenarios. The candidate sending node with the smallest distribution tree height in the candidate sending node set may be selected by adjusting the first threshold as the final first substream providing node. Similarly, the second sending node may be determined through the above manner of determining the first sending node.
本申请实施例通过节点拥有的子流的起始数据块索引和末数据块索引,判断该节点完全覆盖第一子流,从而确定该节点为潜在的第一子流提供节点,进而将该节点作为候选发送节点保存至候选发送节点集合中,再通过节点的分发树高度信息从候选发送节点集合中选择一个候选发送节点,作为向其发送第一子流请求的第一发送节点。通过上述方法,可以使最终选择的子流提供节点效果最佳,最大程度上减小对流传输网络中的上行节点的数据传输压力,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,大大提高流传输网络中数据传输的效率。In this embodiment of the present application, through the start data block index and the end data block index of the sub-stream owned by the node, it is judged that the node completely covers the first sub-stream, so as to determine that the node is a potential first sub-stream providing node, and then the node The candidate sending node is stored in the candidate sending node set, and then a candidate sending node is selected from the candidate sending node set according to the distribution tree height information of the node as the first sending node to which the first substream request is sent. Through the above method, the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
在一种可能的实施方式中,所述向第一发送节点发送第一请求之前,所述方法还包括:In a possible implementation manner, before sending the first request to the first sending node, the method further includes:
接收所述第一发送节点发送的分发树高度信息,所述第一发送节点的分发树高度信息用于所述第一请求节点确定所述第一发送节点。receiving distribution tree height information sent by the first sending node, where the distribution tree height information of the first sending node is used by the first requesting node to determine the first sending node.
在本申请实施例中,第一请求节点在向第一发送节点发送第一请求之前,通过接收到的第一发送节点的分发树高度信息,确定该第一发送节点,并向其发送第一请求,提高了流传输网络中数据传输的效率。In the embodiment of this application, before sending the first request to the first sending node, the first requesting node determines the first sending node through the received distribution tree height information of the first sending node, and sends the first request, which improves the efficiency of data transmission in streaming networks.
在一种可能的实施方式中,所述方法还包括:In a possible implementation manner, the method also includes:
在两个或两个以上候选发送节点的分发树高度相同且小于所述第一阈值的情况下,将剩余带宽最高的候选发送节点确定为所述第一发送节点。If the distribution tree heights of two or more candidate sending nodes are the same and smaller than the first threshold, the candidate sending node with the highest remaining bandwidth is determined as the first sending node.
在本申请实施例中,对确定发送节点的可能的具体实施方式做了进一步说明,通过调整第一阈值筛选出候选发送节点集合中分发树高度最小的候选发送节点作为最终的第一子流提供节点,在有两个或两个以上候选发送节点的分发树高度相同且小于该第一阈值的情 况下,将其中剩余带宽最高的候选发送节点确定为第一子流提供节点,即第一发送节点。In the embodiment of this application, the possible specific implementation of determining the sending node is further explained, and the candidate sending node with the smallest distribution tree height in the candidate sending node set is screened out by adjusting the first threshold and provided as the final first substream node, if there are two or more candidate sending nodes whose distribution tree heights are the same and less than the first threshold, determine the candidate sending node with the highest remaining bandwidth as the first substream providing node, that is, the first sending node node.
在一种可能的实施方式中,所述基于所述元数据,确定候选发送节点集合,包括:In a possible implementation manner, the determining the set of candidate sending nodes based on the metadata includes:
基于所述元数据,查询邻居节点或网络节点;所述邻居节点为与所述第一请求节点传输频率超过频率阈值的节点;Based on the metadata, query a neighbor node or a network node; the neighbor node is a node whose transmission frequency with the first requesting node exceeds a frequency threshold;
将拥有所述第一子流的所述邻居节点加入所述候选发送节点集合,将拥有所述第一子流的所述网络节点加入所述候选发送节点集合。adding the neighbor node that owns the first subflow to the set of candidate sending nodes, and adding the network node that owns the first subflow to the set of candidate sending nodes.
在本申请实施例中,对确定候选发送节点集合的可能的具体实施方式做了进一步说明。根据元数据可以得到原始流的划分情况,向邻居节点或网络节点查询拥有第一子流的节点,邻居节点为与第一请求节点之间周期性地交换流数据的节点,即与第一请求节点传输频率超过频率阈值的节点。In the embodiment of the present application, a possible specific implementation manner of determining a set of candidate sending nodes is further described. According to the metadata, the division of the original flow can be obtained, and the neighbor node or network node is queried for the node that owns the first sub-flow. A node whose transmission frequency exceeds a frequency threshold.
在一种可能的实施方式中,所述方法还包括:In a possible implementation manner, the method also includes:
在接收所述第一发送节点响应于所述第一请求发送的第一子流出现异常的情况下,向所述候选发送节点集合中的第二候选发送节点发送第三请求;所述第二候选发送节点为分发树高度小于第二阈值且不小于所述第一阈值的候选发送节点,所述第三请求用于请求所述第二候选发送节点发送所述第一子流。In the case that the first substream sent by the first sending node in response to the first request is abnormal, sending a third request to a second candidate sending node in the set of candidate sending nodes; the second The candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the first threshold, and the third request is used to request the second candidate sending node to send the first substream.
在本申请实施例中,提供了一种调整子流发送节点的可能的实施方式。在第一发送节点对第一请求的响应情况不满足预设条件的情况下,第一请求节点将向上述候选发送节点集合中选择次优的候选发送节点作为新的第一子流提供节点,动态调整流分发树中第一子流的发送节点。具体的,第一请求节点将选择候选发送节点集合中的第二候选发送节点作为新的第一子流提供节点,并向第二候选发送节点发送第一子流重请求,该第一子流重请求用于请求第二候选发送节点发送第一子流。其中,该第二候选发送节点为分发树高度小于第二阈值且不小于上述第一阈值的候选发送节点,该第二阈值同上述第一阈值类似,不是一个固定的值,可以根据应用场景的不同而不同。可以通过调整第二阈值筛选出候选发送节点集合中分发树高度次优的候选发送节点重新作为最终的第一子流提供节点。同理,在第二请求的响应情况不满足预设条件的情况下,可以通过上述调整第一子流发送节点的方式,来调整第二子流发送节点。In the embodiment of the present application, a possible implementation manner of adjusting a substream sending node is provided. In the case that the response of the first sending node to the first request does not meet the preset condition, the first requesting node will select the second-best candidate sending node from the above-mentioned set of candidate sending nodes as a new first substream providing node, Dynamically adjust the sending node of the first sub-flow in the flow distribution tree. Specifically, the first requesting node will select the second candidate sending node in the set of candidate sending nodes as the new first substream providing node, and send a first substream re-request to the second candidate sending node, the first substream The re-request is used to request the second candidate sending node to send the first sub-stream. Wherein, the second candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the above first threshold, and the second threshold is similar to the above first threshold, and is not a fixed value, which can be determined according to the application scenario It varies from person to person. Candidate sending nodes whose distribution tree height is suboptimal in the set of candidate sending nodes may be screened out by adjusting the second threshold and used as final first substream providing nodes again. Similarly, when the response to the second request does not meet the preset condition, the second substream sending node may be adjusted in the above manner of adjusting the first substream sending node.
本申请实施例通过节点的分发树高度信息从候选发送节点集合中选择一个次优的候选发送节点作为新的子流发送节点,并向其发送子流重请求,用于继续获取待接收的子流。通过上述方法,可以使最终选择的子流提供节点效果最佳,最大程度上减小对流传输网络中的上行节点的数据传输压力,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,大大提高流传输网络中数据传输的效率。In the embodiment of the present application, a suboptimal candidate sending node is selected from the set of candidate sending nodes as a new substream sending node through the distribution tree height information of the node, and a substream re-request is sent to it to continue to obtain substreams to be received. flow. Through the above method, the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
在一种可能的实施方式中,所述在接收所述第一发送节点响应于所述第一请求发送的第一子流出现异常的情况下,向所述候选发送节点集合中的第二候选发送节点发送第三请求,包括:In a possible implementation manner, when receiving the first substream sent by the first sending node in response to the first request is abnormal, sending the second candidate in the set of candidate sending nodes The sending node sends a third request, including:
在所述第一发送节点在预设时间内未发送所述第一子流的情况下,向所述第二候选发送节点发送所述第三请求;或者,If the first sending node has not sent the first substream within a preset time, sending the third request to the second candidate sending node; or,
在接收所述第一子流的过程中所述第一子流传输中断的情况下,向所述第二候选发送节点发送所述第三请求;或者,If the transmission of the first substream is interrupted during the process of receiving the first substream, sending the third request to the second candidate sending node; or,
在接收所述第一子流的过程中,所述第一子流的第一传输速度小于预设阈值的情况下,向所述第二候选发送节点发送所述第三请求;或者,In the process of receiving the first substream, if the first transmission speed of the first substream is less than a preset threshold, send the third request to the second candidate sending node; or,
在接收所述第一子流和所述第二子流的过程中,所述第一子流的第一传输速度与所述第二子流的第二传输速度的差值大于目标阈值,且所述第一传输速度小于所述第二传输速度的情况下,向所述第二候选发送节点发送所述第三请求。During the process of receiving the first substream and the second substream, the difference between the first transmission speed of the first substream and the second transmission speed of the second substream is greater than a target threshold, and When the first transmission speed is lower than the second transmission speed, sending the third request to the second candidate sending node.
在本申请实施例中,提供了一种调整子流发送节点的可能的具体实施方式。在确定第一子流的发送节点为第一发送节点之后,向第一发送节点发送第一请求,用于请求第一发送节点发送第一子流。在该第一发送节点在预设时间内未发送第一子流的情况下,第一请求节点将向上述候选发送节点集合中选择第二候选发送节点作为新的第一子流提供节点,并向其发送第一子流重请求,用于请求上述第二候选发送节点发送第一子流,上述预设时间不是一个固定的值,可以根据应用场景的不同而不同。或者,在该第一请求节点接收第一子流的过程中第一子流传输中断的情况下,第一请求节点将向上述候选发送节点集合中选择第二候选发送节点作为新的第一子流提供节点,并向其发送第一子流重请求,用于请求上述第二候选发送节点发送第一子流。或者,在接收第一子流和第二子流的过程中,若第一子流的第一传输速度远小于第二子流的第二传输速度,即第一传输速度与第二传输速度的差值大于目标阈值,第一请求节点将主动中断与第一发送节点的第一子流的传输,并向上述候选发送节点集合中选择第二候选发送节点作为新的第一子流提供节点,并向其发送第一子流重请求,用于请求上述第二候选发送节点发送第一子流。上述目标阈值同上述第一阈值、第二阈值类似,不是一个固定的值,可以根据应用场景的不同而不同。In the embodiment of the present application, a possible specific implementation manner of adjusting a substream sending node is provided. After determining that the sending node of the first substream is the first sending node, a first request is sent to the first sending node, for requesting the first sending node to send the first substream. In the case that the first sending node does not send the first substream within the preset time, the first requesting node will select the second candidate sending node from the set of candidate sending nodes as a new first substream providing node, and Sending a first substream re-request to request the second candidate sending node to send the first substream, the preset time is not a fixed value and may vary according to different application scenarios. Or, in the case that the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream by the first requesting node, the first requesting node will select the second candidate sending node from the above-mentioned set of candidate sending nodes as the new first sub-stream. The stream providing node sends a first sub-stream re-request to it, which is used to request the second candidate sending node to send the first sub-stream. Or, in the process of receiving the first sub-stream and the second sub-stream, if the first transmission speed of the first sub-stream is much lower than the second transmission speed of the second sub-stream, that is, the difference between the first transmission speed and the second transmission speed If the difference is greater than the target threshold, the first requesting node will actively interrupt the transmission of the first substream with the first sending node, and select the second candidate sending node from the above candidate sending node set as a new first substream providing node, And send a first substream re-request to it, for requesting the second candidate sending node to send the first substream. The above-mentioned target threshold is similar to the above-mentioned first threshold and second threshold, and is not a fixed value, and may be different according to different application scenarios.
本申请实施例,在第一请求的响应情况不满足预设条件的情况下,通过节点的分发树高度信息从候选发送节点集合中选择一个次优的候选发送节点作为新的子流发送节点,并向其发送子流重请求,用于继续获取待接收的子流。通过上述方法,可以使最终选择的子流提供节点效果最佳,最大程度上减小对流传输网络中的上行节点的数据传输压力,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,大大提高流传输网络中数据传输的效率。In the embodiment of the present application, when the response to the first request does not meet the preset condition, a suboptimal candidate sending node is selected from the candidate sending node set as a new substream sending node through the distribution tree height information of the node, And send a sub-stream re-request to it, for continuing to obtain the sub-stream to be received. Through the above method, the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
在一种可能的实施方式中,所述方法还包括:In a possible implementation manner, the method also includes:
在子流中断的数量大于冗余子流数量的情况下,向同步组中的节点拉取所述第一子流中所需的数据块;所述同步组中的节点为在传输过程中与所述第一请求节点处于同一起始位置的节点。When the number of sub-stream interruptions is greater than the number of redundant sub-streams, pull the required data blocks in the first sub-stream to the nodes in the synchronization group; the nodes in the synchronization group are during transmission and The first requesting node is a node at the same starting position.
在本申请实施例中,还提供了一种处理子流传输中断情况的可能的实施方式。在该第一请求节点接收第一子流的过程中第一子流传输中断的情况下,若子流中断的数量大于冗余子流数量,第一请求节点向同步组中的节点主动拉取该第一子流中所需的数据块,直至第一请求节点重新定位到新的第一子流提供节点。其中,该同步组中的节点为在传输过程中与该第一请求节点处于同一起始位置的节点,即同步组中的节点与第一请求节点的数据接收进程处于同步的状态。同理,在该第一请求节点接收第二子流的过程中第二子流传输中断的情况下,若子流中断的数量大于冗余子流数量,第一请求节点向同步组中的节点主动拉取该第二子流中所需的数据块,直至第一请求节点重新定位到新的第二子流提供节点。In the embodiment of the present application, a possible implementation manner of handling interruption of sub-stream transmission is also provided. In the case that the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream by the first requesting node, if the number of interrupted sub-streams is greater than the number of redundant sub-streams, the first requesting node actively pulls the sub-stream from the nodes in the synchronization group. The required data blocks in the first sub-stream until the first requesting node is relocated to a new first sub-stream providing node. Wherein, the nodes in the synchronization group are nodes at the same starting position as the first requesting node during the transmission process, that is, the nodes in the synchronization group and the data receiving process of the first requesting node are in a state of synchronization. Similarly, in the case that the transmission of the second sub-stream is interrupted during the process of receiving the second sub-stream by the first requesting node, if the number of interrupted sub-streams is greater than the number of redundant sub-streams, the first requesting node actively The required data blocks in the second sub-stream are pulled until the first requesting node is relocated to a new second sub-stream providing node.
本申请实施例通过上述同步组机制在子流中断过多的情况下主动拉取断线子流所需的 数据块,直至请求节点重新定位到新的子流提供节点,可以有效提高子流传输效率。The embodiment of the present application uses the above synchronization group mechanism to actively pull the data blocks required by the disconnected sub-stream when the sub-stream is interrupted too much, until the requesting node is relocated to a new sub-stream providing node, which can effectively improve the transmission of the sub-stream efficiency.
在一种可能的实施方式中,所述第一子流重请求包括所述第一请求节点的剩余带宽信息,所述第一请求节点的剩余带宽信息用于所述第二候选发送节点确定是否发送所述第一子流。In a possible implementation manner, the first subflow re-request includes remaining bandwidth information of the first requesting node, and the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine whether Send the first sub-stream.
在本申请实施例中,第一请求节点发出的第一子流重请求,包含第一请求节点的剩余带宽信息。发送节点可能收到多个请求节点的子流重请求,此时发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个请求节点发送子流,该第一请求节点的剩余带宽信息用于发送节点确定是否向第一请求节点发送第一子流,提高数据传输效率。In this embodiment of the present application, the first substream re-request sent by the first requesting node includes remaining bandwidth information of the first requesting node. The sending node may receive substream re-requests from multiple requesting nodes. At this time, the sending node needs to select one or more requesting nodes to send the substream according to the remaining bandwidth information of the requesting node. The remaining bandwidth information of the first requesting node is used for The sending node determines whether to send the first subflow to the first requesting node, so as to improve data transmission efficiency.
在一种可能的实施方式中,所述方法还包括:In a possible implementation manner, the method also includes:
所述候选发送节点集合不再包括所述第一候选发送节点。The set of candidate sending nodes no longer includes the first candidate sending node.
在本申请实施例中,还提供了一种调整候选发送节点集合的可能的具体实施方式。即将第一请求响应情况不满足预设条件的发送节点从候选发送节点集合中删除。具体为,第一发送节点在预设时间内未发送第一子流,或者,接收第一子流的过程中第一子流传输中断,或者,第一请求节点主动中断与第一发送节点的第一子流的传输的情况下,将第一候选发送节点从候选发送节点集合中删除,使候选发送节点集合不再包括该第一候选发送节点。本申请实施例可以提高第一请求节点在后续流传输过程中定位子流提供节点的准确率及流传输效率。In the embodiment of the present application, a possible specific implementation manner of adjusting the set of candidate sending nodes is also provided. That is, the sending nodes whose response to the first request does not meet the preset condition are deleted from the set of candidate sending nodes. Specifically, the first sending node does not send the first sub-stream within the preset time, or the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream, or the first requesting node actively interrupts the communication with the first sending node In the case of transmission of the first substream, the first candidate sending node is deleted from the set of candidate sending nodes, so that the set of candidate sending nodes no longer includes the first candidate sending node. The embodiments of the present application can improve the accuracy and stream transmission efficiency of the first requesting node in locating the substream providing node in the subsequent stream transmission process.
第二方面,本申请实施例提供了一种数据传输方法,该方法包括:In a second aspect, an embodiment of the present application provides a data transmission method, the method including:
接收第一请求节点发送的第一请求或第二请求节点发送的第二请求;所述第一请求用于请求向所述第一请求节点发送第一子流,所述第二请求用于请求向所述第二请求节点发送第二子流;所述第一请求节点不同于所述第二请求节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同;Receive a first request sent by a first requesting node or a second request sent by a second requesting node; the first request is used to request sending the first substream to the first requesting node, and the second request is used to request sending a second substream to the second requesting node; the first requesting node is different from the second requesting node; both the first substream and the second substream are composed of data blocks in the original stream , the first substream is different from the second substream;
向所述第一请求节点发送所述第一子流或向所述第二请求节点发送所述第二子流。Sending the first subflow to the first requesting node or sending the second subflow to the second requesting node.
在本申请实施例中,通过将原始流划分为多个子流,进而将整个移动分布式流传输过程拆分成多个子流传输的过程,使得整个传输网络的传输效率更高。具体为,第一发送节点接收多个请求节点发送的子流请求,如接收第一请求节点发送的第一请求或接收第二请求节点发送的第二请求,该第一请求用于请求第一发送节点发送第一子流,该第二请求用于请求第一发送节点发送第二子流。其中,该第一发送节点为提供第一子流或第二子流的节点,该第一子流和第二子流通过划分原始流得到,且该第一子流和第二子流不完全相同。第一发送节点接收到子流请求后,将根据子流传输信息和节点传输状态,向第一请求节点发送第一子流或向第二请求节点发送第二子流。In the embodiment of the present application, the original stream is divided into multiple sub-streams, and then the entire mobile distributed stream transmission process is split into multiple sub-stream transmission processes, so that the transmission efficiency of the entire transmission network is higher. Specifically, the first sending node receives substream requests sent by multiple requesting nodes, such as receiving the first request sent by the first requesting node or receiving the second request sent by the second requesting node, the first request is used to request the first The sending node sends the first substream, and the second request is used to request the first sending node to send the second substream. Wherein, the first sending node is a node that provides the first sub-stream or the second sub-stream, the first sub-stream and the second sub-stream are obtained by dividing the original stream, and the first sub-stream and the second sub-stream are incomplete same. After receiving the substream request, the first sending node will send the first substream to the first requesting node or send the second substream to the second requesting node according to the substream transmission information and node transmission status.
目前的数据传输方法,通常采用基于分发树的方法进行去中心化的实时流媒体传输。将参与数据传输的各个节点结构化的组织成流媒体传输树,源节点将流媒体文件切分成若干个文件块,通过传输树上相应的子节点进行流传输。因此,对单个节点的上行带宽依赖程度较大,某个节点断开会导致该节点下的所有子节点的数据传输失败。The current data transmission method usually uses a distribution tree-based method for decentralized real-time streaming media transmission. Each node participating in data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through the corresponding child nodes on the transmission tree. Therefore, the uplink bandwidth of a single node is highly dependent, and the disconnection of a certain node will cause data transmission failure of all child nodes under the node.
本申请实施例提供的数据传输方法,与目前的数据传输方法相比,采用将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网 络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。Compared with the current data transmission method, the data transmission method provided by the embodiment of the present application adopts the process of splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmissions, which can greatly reduce the number of convection transmission networks. The data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
在一种可能的实施方式中,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。In a possible implementation manner, the original stream includes a first file block and a second file block, and both the first sub-stream and the second sub-stream include the first file block and the second file block. Data blocks in file blocks.
在本申请实施例中,通过对第一子流和第二子流包括的数据块情况的说明,提供了一种划分子流的可能的实施方式。将原始流划分为两个或两个以上的文件块,每个文件块包括两个或两个以上的数据块。将所有数据块按照时间顺序对其索引编号,并根据数据块索引将数据块划分为不同的子流中,使得划分得到的每个子流包括每个文件块中的至少一个数据块。具体为,将原始流划分为第一文件块和第二文件块,第一文件块和第二文件块包括两个或两个以上数据块。根据数据块索引将数据块划分为第一子流或第二子流中,从而实现将原始流划分为第一子流和第二子流的目的。其中,该第一子流包括第一文件块中的至少一个数据块和第二文件块中的至少一个数据块,该第二子流包括第一文件块中的至少一个数据块和第二文件块中的至少一个数据块。In the embodiment of the present application, a possible implementation manner of dividing substreams is provided by describing data blocks included in the first substream and the second substream. Divide the original stream into two or more file blocks, each file block includes two or more data blocks. Indexes of all data blocks are numbered in time order, and the data blocks are divided into different sub-streams according to the data block indexes, so that each divided sub-stream includes at least one data block in each file block. Specifically, the original stream is divided into a first file block and a second file block, and the first file block and the second file block include two or more data blocks. The data block is divided into the first sub-stream or the second sub-stream according to the data block index, so as to realize the purpose of dividing the original stream into the first sub-stream and the second sub-stream. Wherein, the first substream includes at least one data block in the first file block and at least one data block in the second file block, and the second substream includes at least one data block in the first file block and the second file block At least one data block in the block.
本申请实施例提供的子流划分方法,使得划分得到的第一子流和第二子流都包括第一文件块中的至少一个数据块和第二文件块中的至少一个数据块,确保请求节点接收到第一子流和第二子流后,能通过对第一子流和第二子流编码还原得到原始流,提高了数据传输效率。The substream division method provided by the embodiment of the present application makes the divided first substream and the second substream both include at least one data block in the first file block and at least one data block in the second file block, ensuring that the request After receiving the first sub-stream and the second sub-stream, the node can restore the original stream by encoding the first sub-stream and the second sub-stream, thereby improving data transmission efficiency.
在一种可能的实施方式中,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。In a possible implementation manner, the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block; The second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
在本申请实施例中,通过对第一文件块和第二文件块包含的数据块情况的说明,提供了一种子流冗余编码的可能的实施方式。将原始流划分为两个或两个以上的文件块,每个文件块包含两个或两个以上的数据块。对每个文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入相应的文件块中,使得每个文件块中的数据块为原始流中的数据块,或是对文件块冗余编码得到的数据块。具体为,将原始流划分为第一文件块和第二文件块,对第一文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入第一文件块中,同理,对第二文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入第二文件块中。因此,第一文件块中的数据块为原始流中的数据块,或是对第一文件块冗余编码得到的数据块,第二文件块中的数据块为原始流中的数据块,或是对第二文件块冗余编码得到的数据块。In the embodiment of the present application, a possible implementation manner of substream redundancy coding is provided by describing the data blocks included in the first file block and the second file block. Divide the original stream into two or more file blocks, and each file block contains two or more data blocks. Perform FEC encoding on the data blocks in each file block to obtain new redundant data blocks, and add the redundant data blocks to the corresponding file blocks, so that the data blocks in each file block are the data blocks in the original stream , or a data block obtained by redundantly encoding a file block. Specifically, divide the original stream into a first file block and a second file block, perform FEC encoding on the data block in the first file block to obtain a new redundant data block, and add the redundant data block to the first file block In the same way, FEC encoding is performed on the data blocks in the second file block to obtain a new redundant data block, and the redundant data block is added to the second file block. Therefore, the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block, and the data blocks in the second file block are data blocks in the original stream, or is a data block obtained by redundantly encoding the second file block.
本申请实施例通过对文件块冗余编码,在文件块中加入冗余数据块,从而实现子流冗余编码的目的。新加入的冗余数据块可以得到相应的冗余子流,使得在流传输过程中,即使存在若干个子流传输掉线的情况,但只要掉线子流不超过冗余子流,依然可以根据接收到的子流,解码得到原始流,提高了子流传输的可靠性和稳定性。In the embodiment of the present application, redundant coding of the file block is performed, and redundant data blocks are added to the file block, so as to realize the purpose of redundant coding of the substream. The newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which improves the reliability and stability of sub-stream transmission.
在一种可能的实施方式中,所述第一请求包括所述第一请求节点的剩余带宽信息,所述第二请求包括所述第二请求节点的剩余带宽信息;所述第一请求节点的剩余带宽信息和所述第二请求节点的剩余带宽信息用于第一发送节点确定是否发送所述第一子流或所述第二子流,所述第一发送节点为所述第一子流或所述第二子流对应的发送节点。In a possible implementation manner, the first request includes remaining bandwidth information of the first requesting node, the second request includes remaining bandwidth information of the second requesting node; The remaining bandwidth information and the remaining bandwidth information of the second requesting node are used by the first sending node to determine whether to send the first sub-flow or the second sub-flow, and the first sending node is the first sub-flow or the sending node corresponding to the second substream.
在本申请实施例中,第一请求节点发出的第一请求,包含第一请求节点的剩余带宽信息,第二请求节点发出的第二请求,包含第二请求节点的剩余带宽信息。第一发送节点可能收到多个请求节点的子流请求,此时第一发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个剩余带宽更高的请求节点发送子流,因此,上述第一请求节点的剩余带宽信息和第二请求节点的剩余带宽信息用于第一发送节点确定是否向第一请求节点发送第一子流或向第二请求节点发送第二子流,使数据发送节点的负载更加均衡,提高了数据传输效率。In this embodiment of the present application, the first request sent by the first requesting node includes remaining bandwidth information of the first requesting node, and the second request sent by the second requesting node includes remaining bandwidth information of the second requesting node. The first sending node may receive sub-stream requests from multiple requesting nodes. At this time, the first sending node needs to select one or more requesting nodes with higher remaining bandwidth to send the sub-stream according to the remaining bandwidth information of the requesting nodes. Therefore, the above The remaining bandwidth information of the first requesting node and the remaining bandwidth information of the second requesting node are used by the first sending node to determine whether to send the first sub-flow to the first requesting node or to send the second sub-flow to the second requesting node, so that the data can be sent The load of the nodes is more balanced, which improves the efficiency of data transmission.
在一种可能的实施方式中,所述接收第一请求节点发送的第一请求之前,所述方法还包括:In a possible implementation manner, before receiving the first request sent by the first requesting node, the method further includes:
向所述第一请求节点发送第一发送节点的分发树高度信息,所述第一发送节点的分发树高度信息用于所述第一请求节点确定是否向所述第一发送节点发送所述第一请求,所述第一发送节点为发送所述第一子流或所述第二子流的发送节点。sending the distribution tree height information of the first sending node to the first requesting node, where the distribution tree height information of the first sending node is used by the first requesting node to determine whether to send the first sending node to the first sending node On request, the first sending node is a sending node sending the first sub-stream or the second sub-stream.
在本申请实施例中,第一发送节点会向第一请求节点发送第一发送节点的分发树高度信息,在流传输网络中可能存在多个拥有第一子流的潜在发送节点,第一请求节点需要根据上述潜在发送节点的分发树高度信息择优选择一个发送节点,向其发送第一请求进行第一子流传输,因此,上述第一发送节点的分发树高度信息用于第一请求节点确定是否向第一发送节点发送第一请求,使数据发送节点的负载更加均衡,提高了数据传输效率。In this embodiment of the application, the first sending node will send the distribution tree height information of the first sending node to the first requesting node. There may be multiple potential sending nodes owning the first substream in the streaming network. The first requesting node The node needs to select a sending node according to the distribution tree height information of the potential sending node, and send the first request to it for the first substream transmission. Therefore, the distribution tree height information of the first sending node is used for the first requesting node to determine Whether to send the first request to the first sending node makes the load of the data sending node more balanced and improves the data transmission efficiency.
在一种可能的实施方式中,所述向所述第一请求节点发送所述第一子流或向所述第二请求节点发送所述第二子流,包括:In a possible implementation manner, the sending the first subflow to the first requesting node or sending the second subflow to the second requesting node includes:
在第一发送节点提供所述第一子流且所述第一发送节点的剩余带宽高于所述第一子流的比特率的情况下,向所述第一请求节点发送所述第一子流;或者,When the first sending node provides the first sub-stream and the remaining bandwidth of the first sending node is higher than the bit rate of the first sub-stream, sending the first sub-stream to the first requesting node flow; or,
在所述第一发送节点提供所述第二子流且所述第一发送节点的剩余带宽高于所述第二子流的比特率的情况下,向所述第二请求节点发送所述第二子流;或者,When the first sending node provides the second substream and the remaining bandwidth of the first sending node is higher than the bit rate of the second substream, sending the second substream to the second requesting node Erziliu; or,
在所述第一发送节点提供所述第一子流和所述第二子流,且所述第一发送节点的剩余带宽高于所述第一子流的比特率和所述第二子流的比特率之和的情况下,向所述第一请求节点发送所述第一子流,和向所述第二请求节点发送所述第二子流。The first sub-stream and the second sub-stream are provided at the first sending node, and the remaining bandwidth of the first sending node is higher than the bit rate of the first sub-stream and the second sub-stream In the case of the sum of bit rates, the first substream is sent to the first requesting node, and the second substream is sent to the second requesting node.
在本申请实施例中,提供了一种第一发送节点发送子流的可能的实施方式。第一发送节点将根据子流传输信息和节点传输状态,向第一请求节点发送第一子流或向第二请求节点发送第二子流。具体为,在第一发送节点提供第一子流且剩余带宽高于第一子流的比特率的情况下,向第一请求节点发送第一子流;在第一发送节点提供第二子流且剩余带宽高于第二子流的比特率的情况下,向第二请求节点发送第二子流;在第一发送节点提供第一子流和第二子流,且剩余带宽高于第一子流和第二子流的比特率之和的情况下,向第一请求节点发送第一子流,和向第二请求节点发送第二子流。In this embodiment of the present application, a possible implementation manner in which the first sending node sends the substream is provided. The first sending node will send the first substream to the first requesting node or send the second substream to the second requesting node according to the substream transmission information and the node transmission status. Specifically, when the first sending node provides the first sub-stream and the remaining bandwidth is higher than the bit rate of the first sub-stream, the first sub-stream is sent to the first requesting node; the second sub-stream is provided at the first sending node And when the remaining bandwidth is higher than the bit rate of the second sub-stream, send the second sub-stream to the second request node; provide the first sub-stream and the second sub-stream at the first sending node, and the remaining bandwidth is higher than the first sub-stream In the case of the sum of the bit rates of the sub-stream and the second sub-stream, the first sub-stream is sent to the first requesting node, and the second sub-stream is sent to the second requesting node.
本申请实施例结合第一发送节点的剩余带宽信息及其拥有的子流数据,择优向请求节点发送其所请求的子流,可以最大程度上提高带宽利用率,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,使整个流传输网络的传输效率更高。In this embodiment of the present application, combined with the remaining bandwidth information of the first sending node and the sub-stream data it owns, the preferred sub-stream is sent to the requesting node, which can maximize bandwidth utilization and fully match the mobile distributed streaming network The uplink bandwidth of each node in the environment makes the load of the data sending node more balanced, and makes the transmission efficiency of the entire stream transmission network higher.
在一种可能的实施方式中,所述向所述第一请求节点发送所述第一子流,和向所述第 二请求节点发送所述第二子流,包括:In a possible implementation manner, the sending the first substream to the first requesting node, and sending the second substream to the second requesting node include:
在所述第一请求节点的剩余带宽大于所述第二请求节点的剩余带宽的情况下,向所述第一请求节点发送所述第一子流;If the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node, sending the first substream to the first requesting node;
更新所述第一发送节点的剩余带宽;updating the remaining bandwidth of the first sending node;
在所述第一发送节点更新后的剩余带宽高于所述第二子流的比特率的情况下,向所述第二请求节点发送所述第二子流。When the updated remaining bandwidth of the first sending node is higher than the bit rate of the second sub-stream, sending the second sub-stream to the second requesting node.
在本申请实施例中,对第一请求节点发送子流的可能的实施方式做了进一步说明。在第一发送节点提供第一子流和第二子流,且剩余带宽高于第一子流和第二子流的比特率的情况下,比较第一请求节点与第二请求节点的剩余带宽,若第一请求节点的剩余带宽大于第二请求节点的剩余带宽,向第一请求节点发送第一子流;然后更新第一发送节点的剩余带宽;在第一发送节点更新后的剩余带宽高于第二子流的比特率的情况下,向第二请求节点发送第二子流。In the embodiment of the present application, a possible implementation manner in which the first requesting node sends the substream is further described. When the first sending node provides the first sub-stream and the second sub-stream, and the remaining bandwidth is higher than the bit rate of the first sub-stream and the second sub-stream, compare the remaining bandwidth of the first requesting node and the second requesting node , if the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node, send the first substream to the first requesting node; then update the remaining bandwidth of the first sending node; the remaining bandwidth after the update of the first sending node is high In the case of the bit rate of the second sub-stream, the second sub-stream is sent to the second requesting node.
本申请实施例通过各个请求节点的剩余带宽信息,择优对剩余带宽更高的请求节点发送其所请求的子流,可以最大程度上提高带宽利用率,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,使整个流传输网络的传输效率更高。According to the remaining bandwidth information of each requesting node, the embodiment of the present application selects the requesting node with higher remaining bandwidth to send the requested substream, which can maximize the bandwidth utilization rate and fully match the mobile distributed streaming network environment. The uplink bandwidth of each node makes the load of the data sending node more balanced, making the transmission efficiency of the entire streaming transmission network higher.
第三方面,本申请实施例提供了一种数据传输装置,该装置包括:In a third aspect, the embodiment of the present application provides a data transmission device, which includes:
发送单元,用于向第一发送节点发送第一请求;a sending unit, configured to send a first request to a first sending node;
接收单元,用于接收所述第一发送节点响应于所述第一请求发送的第一子流;a receiving unit, configured to receive the first substream sent by the first sending node in response to the first request;
所述发送单元,还用于向第二发送节点发送第二请求;The sending unit is further configured to send a second request to a second sending node;
所述接收单元,还用于接收所述第二发送节点响应于所述第二请求发送的第二子流;所述第一发送节点不同于所述第二发送节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同。The receiving unit is further configured to receive a second substream sent by the second sending node in response to the second request; the first sending node is different from the second sending node; the first substream Both of the second substreams are composed of data blocks in the original stream, and the first substream is different from the second substream.
在一种可能的实施方式中,所述装置还包括:In a possible implementation manner, the device also includes:
解码单元,用于对所述第一子流和所述第二子流解码,得到所述原始流。A decoding unit, configured to decode the first substream and the second substream to obtain the original stream.
在一种可能的实施方式中,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。In a possible implementation manner, the original stream includes a first file block and a second file block, and both the first sub-stream and the second sub-stream include the first file block and the second file block. Data blocks in file blocks.
在一种可能的实施方式中,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。In a possible implementation manner, the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block; The second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
在一种可能的实施方式中,所述第一文件块的大小由所述原始流中的数据块类型和数据块大小确定,所述第二文件块的大小由所述原始流中的数据块类型和数据块大小确定。In a possible implementation manner, the size of the first file block is determined by the data block type and the data block size in the original stream, and the size of the second file block is determined by the data block in the original stream The type and block size are determined.
在一种可能的实施方式中,所述第一请求包括所述数据传输装置的剩余带宽信息,所述第二请求包括所述数据传输装置的剩余带宽信息;所述数据传输装置的剩余带宽信息用于所述第一发送节点确定是否发送所述第一子流,或用于所述第二发送节点确定是否发送所述第二子流。In a possible implementation manner, the first request includes remaining bandwidth information of the data transmission device, and the second request includes remaining bandwidth information of the data transmission device; the remaining bandwidth information of the data transmission device Used by the first sending node to determine whether to send the first sub-stream, or used by the second sending node to determine whether to send the second sub-stream.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
所述接收单元,还用于获取所述原始流的元数据;The receiving unit is further configured to obtain metadata of the original stream;
确定单元,用于基于所述元数据,确定所述第一子流;a determining unit, configured to determine the first sub-stream based on the metadata;
所述确定单元,还用于基于所述元数据,确定所述第一发送节点。The determining unit is further configured to determine the first sending node based on the metadata.
在一种可能的实施方式中,所述确定单元,具体用于基于所述元数据,确定候选发送节点集合,所述候选发送节点集合包括拥有所述第一子流的候选发送节点;In a possible implementation manner, the determining unit is specifically configured to determine a set of candidate sending nodes based on the metadata, where the set of candidate sending nodes includes a candidate sending node that owns the first substream;
所述确定单元,具体还用于将所述候选发送节点集合中的第一候选发送节点确定为所述第一发送节点,所述第一候选发送节点为分发树高度小于第一阈值的候选发送节点。The determining unit is specifically further configured to determine a first candidate sending node in the set of candidate sending nodes as the first sending node, and the first candidate sending node is a sending candidate whose distribution tree height is smaller than a first threshold node.
在一种可能的实施方式中,所述接收单元,还用于接收所述第一发送节点发送的分发树高度信息,所述第一发送节点的分发树高度信息用于所述数据传输装置确定所述第一发送节点。In a possible implementation manner, the receiving unit is further configured to receive the distribution tree height information sent by the first sending node, and the distribution tree height information of the first sending node is used by the data transmission device to determine The first sending node.
在一种可能的实施方式中,所述确定单元,具体还用于在两个或两个以上候选发送节点的分发树高度相同且小于所述第一阈值的情况下,将剩余带宽最高的候选发送节点确定为所述第一发送节点。In a possible implementation manner, the determining unit is specifically further configured to, when the distribution tree heights of two or more candidate sending nodes are the same and less than the first threshold, select The sending node is determined as the first sending node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
查询单元,用于基于所述元数据,查询邻居节点或网络节点;所述邻居节点为与所述第一请求节点传输频率超过频率阈值的节点;A query unit, configured to query a neighbor node or a network node based on the metadata; the neighbor node is a node whose transmission frequency with the first requesting node exceeds a frequency threshold;
所述确定单元,具体还用于将拥有所述第一子流的所述邻居节点加入所述候选发送节点集合,将拥有所述第一子流的所述网络节点加入所述候选发送节点集合。The determining unit is specifically further configured to add the neighbor node owning the first subflow to the set of candidate sending nodes, and add the network node owning the first subflow to the set of candidate sending nodes .
在一种可能的实施方式中,所述发送单元,还用于在接收所述第一发送节点响应于所述第一请求发送的第一子流出现异常的情况下,向所述候选发送节点集合中的第二候选发送节点发送第三请求;所述第二候选发送节点为分发树高度小于第二阈值且不小于所述第一阈值的候选发送节点,所述第三请求用于请求所述第二候选发送节点发送所述第一子流。In a possible implementation manner, the sending unit is further configured to send the candidate sending node A second candidate sending node in the set sends a third request; the second candidate sending node is a candidate sending node whose distribution tree height is less than a second threshold and not less than the first threshold, and the third request is used to request the The second candidate sending node sends the first substream.
在一种可能的实施方式中,所述发送单元,具体还用于在所述第一发送节点在预设时间内未发送所述第一子流的情况下,向所述第二候选发送节点发送所述第三请求;或者,In a possible implementation manner, the sending unit is further configured to, in the case that the first sending node does not send the first substream within a preset time, send sending said third request; or,
所述发送单元,具体还用于在接收所述第一子流的过程中所述第一子流传输中断的情况下,向所述第二候选发送节点发送所述第三请求;或者,The sending unit is specifically further configured to send the third request to the second candidate sending node when the transmission of the first substream is interrupted during the process of receiving the first substream; or,
所述发送单元,具体还用于在接收所述第一子流的过程中,所述第一子流的第一传输速度小于预设阈值的情况下,向所述第二候选发送节点发送所述第三请求;或者,The sending unit is further configured to send the second candidate sending node to the second candidate sending node when the first transmission speed of the first substream is lower than a preset threshold during the process of receiving the first substream. the third request; or,
所述发送单元,具体还用于在接收所述第一子流和所述第二子流的过程中,所述第一子流的第一传输速度与所述第二子流的第二传输速度的差值大于目标阈值,且所述第一传输速度小于所述第二传输速度的情况下,向所述第二候选发送节点发送所述第三请求。The sending unit is further configured to, during the process of receiving the first substream and the second substream, the first transmission speed of the first substream and the second transmission speed of the second substream When the speed difference is greater than the target threshold and the first transmission speed is smaller than the second transmission speed, sending the third request to the second candidate sending node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
拉取单元,用于在子流中断的数量大于冗余子流数量的情况下,向同步组中的节点拉取所述第一子流中所需的数据块;所述同步组中的节点为在传输过程中与所述第一请求节点处于同一起始位置的节点。A pulling unit, configured to pull data blocks required in the first sub-stream from nodes in the synchronization group when the number of sub-stream interruptions is greater than the number of redundant sub-flows; the nodes in the synchronization group is the node at the same starting position as the first requesting node during the transmission process.
在一种可能的实施方式中,所述第一子流重请求包括所述第一请求节点的剩余带宽信息,所述第一请求节点的剩余带宽信息用于所述第二候选发送节点确定所述第一请求节点。In a possible implementation manner, the first substream re-request includes remaining bandwidth information of the first requesting node, and the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine the The first request node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
删除单元,用于将所述第一候选发送节点从所述候选发送节点集合中删除。A deleting unit, configured to delete the first candidate sending node from the set of candidate sending nodes.
关于第三方面以及任一项可能的实施方式所带来的技术效果,可参考对应于第一方面以及相应的实施方式的技术效果的介绍。Regarding the technical effect brought about by the third aspect and any possible implementation manner, reference may be made to the introduction corresponding to the technical effect of the first aspect and the corresponding implementation manner.
第四方面,本申请实施例提供了一种数据传输装置,该装置包括:In a fourth aspect, the embodiment of the present application provides a data transmission device, which includes:
接收单元,用于接收第一请求节点发送的第一请求或第二请求节点发送的第二请求;所述第一请求用于请求向所述第一请求节点发送第一子流,所述第二请求用于请求向所述第二请求节点发送第二子流;所述第一请求节点不同于所述第二请求节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同;A receiving unit, configured to receive a first request sent by a first requesting node or a second request sent by a second requesting node; the first request is used to request to send a first substream to the first requesting node, and the first requesting node The second request is used to request to send a second substream to the second requesting node; the first requesting node is different from the second requesting node; both the first substream and the second substream are composed of the original stream Composed of data blocks in , the first sub-stream is different from the second sub-stream;
发送单元,用于向所述第一请求节点发送所述第一子流或向所述第二请求节点发送所述第二子流。A sending unit, configured to send the first substream to the first requesting node or send the second substream to the second requesting node.
在一种可能的实施方式中,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。In a possible implementation manner, the original stream includes a first file block and a second file block, and both the first sub-stream and the second sub-stream include the first file block and the second file block. Data blocks in file blocks.
在一种可能的实施方式中,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。In a possible implementation manner, the first substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block; The second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
在一种可能的实施方式中,所述第一请求包括所述第一请求节点的剩余带宽信息,所述第二请求包括所述第二请求节点的剩余带宽信息;所述第一请求节点的剩余带宽信息和所述第二请求节点的剩余带宽信息用于所述数据传输装置确定是否发送所述第一子流或所述第二子流。In a possible implementation manner, the first request includes remaining bandwidth information of the first requesting node, the second request includes remaining bandwidth information of the second requesting node; The remaining bandwidth information and the remaining bandwidth information of the second requesting node are used by the data transmission device to determine whether to send the first sub-flow or the second sub-flow.
在一种可能的实施方式中,所述发送单元,还用于向所述第一请求节点发送所述数据传输装置的分发树高度信息,所述数据传输装置的分发树高度信息用于所述第一请求节点确定是否向所述数据传输装置发送所述第一请求。In a possible implementation manner, the sending unit is further configured to send the distribution tree height information of the data transmission device to the first request node, and the distribution tree height information of the data transmission device is used for the A first requesting node determines whether to send the first request to the data transmission device.
在一种可能的实施方式中,所述发送单元,具体用于在所述数据传输装置提供所述第一子流且所述数据传输装置的剩余带宽高于所述第一子流的比特率的情况下,向所述第一请求节点发送所述第一子流;或者,In a possible implementation manner, the sending unit is specifically configured to provide the first substream at the data transmission device and the remaining bandwidth of the data transmission device is higher than the bit rate of the first substream In the case of , sending the first sub-flow to the first requesting node; or,
所述发送单元,具体还用于在所述数据传输装置提供所述第二子流且所述数据传输装置的剩余带宽高于所述第二子流的比特率的情况下,向所述第二请求节点发送所述第二子流;或者,The sending unit is further configured to send the second substream to the second substream when the data transmission device provides the second substream and the remaining bandwidth of the data transmission device is higher than the bit rate of the second substream. two requesting nodes to send the second sub-stream; or,
所述发送单元,具体还用于在所述数据传输装置提供所述第一子流和所述第二子流,且所述数据传输装置的剩余带宽高于所述第一子流的比特率和所述第二子流的比特率之和的情况下,向所述第一请求节点发送所述第一子流,和向所述第二请求节点发送所述第二子流。The sending unit is further configured to provide the first substream and the second substream at the data transmission device, and the remaining bandwidth of the data transmission device is higher than the bit rate of the first substream and the bit rate of the second substream, sending the first substream to the first requesting node, and sending the second substream to the second requesting node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
所述发送单元,具体还用于在所述第一请求节点的剩余带宽大于所述第二请求节点的剩余带宽的情况下,向所述第一请求节点发送所述第一子流;The sending unit is specifically further configured to send the first substream to the first requesting node when the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node;
更新单元,用于更新所述数据传输装置的剩余带宽;an updating unit, configured to update the remaining bandwidth of the data transmission device;
所述发送单元,具体还用于在所述数据传输装置更新后的剩余带宽高于所述第二子流 的比特率的情况下,向所述第二请求节点发送所述第二子流。The sending unit is further configured to send the second sub-stream to the second requesting node when the updated remaining bandwidth of the data transmission device is higher than the bit rate of the second sub-stream.
关于第四方面以及任一项可能的实施方式所带来的技术效果,可参考对应于第二方面以及相应的实施方式的技术效果的介绍。Regarding the technical effect brought by the fourth aspect and any possible implementation manner, reference may be made to the introduction corresponding to the technical effect of the second aspect and the corresponding implementation manner.
第五方面,本申请实施例提供一种数据传输装置,所述数据传输装置包括处理器和存储器;所述存储器用于存储计算机执行指令;所述处理器用于执行所述存储器所存储的计算机执行指令,以使所述数据传输装置执行如上述第一方面以及任一项可能的实施方式的方法,或者,执行如上述第二方面以及任一项可能的实施方式的方法。可选的,所述数据传输装置还包括收发器,所述收发器,用于接收信号或者发送信号。In the fifth aspect, the embodiment of the present application provides a data transmission device, the data transmission device includes a processor and a memory; the memory is used to store computer-executable instructions; the processor is used to execute the computer-executable instructions stored in the memory. instructions, so that the data transmission device executes the method according to the above first aspect and any possible implementation manner, or executes the method according to the above second aspect and any possible implementation manner. Optionally, the data transmission device further includes a transceiver, configured to receive signals or send signals.
第六方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质用于存储指令或计算机程序;当所述指令或所述计算机程序被执行时,使得第一方面以及任一项可能的实施方式所述的方法被实现,或者,使得第二方面以及任一项可能的实施方式所述的方法被实现。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store instructions or computer programs; when the instructions or the computer programs are executed, the first aspect and the The method described in any possible implementation manner is implemented, or the second aspect and the method described in any possible implementation manner are implemented.
第七方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括指令或计算机程序;当所述指令或所述计算机程序被执行时,使得第一方面以及任一项可能的实施方式所述的方法被实现,或者,使得第二方面以及任一项可能的实施方式所述的方法被实现。In the seventh aspect, the embodiment of the present application provides a computer program product, the computer program product includes instructions or computer programs; when the instructions or the computer programs are executed, the first aspect and any possible implementation The method described in the manner is realized, or the method described in the second aspect and any possible implementation manner is realized.
第八方面,本申请实施例提供一种芯片,该芯片包括处理器,所述处理器用于执行指令,当该处理器执行所述指令时,使得该芯片执行如第一方面以及任一项可能的实施方式所述的方法,或者执行如第二方面以及任一项可能的实施方式所述的方法。可选的,该芯片还包括通信接口,所述通信接口用于接收信号或者发送信号。In an eighth aspect, an embodiment of the present application provides a chip, the chip includes a processor, and the processor is configured to execute instructions. When the processor executes the instructions, the chip performs the first aspect and any possible The method described in the implementation manner, or perform the method described in the second aspect and any possible implementation manner. Optionally, the chip further includes a communication interface, and the communication interface is used for receiving signals or sending signals.
第九方面,本申请实施例提供一种数据传输系统,所述系统包括至少一个如第三方面所述的数据传输装置,或第四方面所述的数据传输装置,或第五方面所述的数据传输装置,或第八方面所述的芯片。In the ninth aspect, the embodiment of the present application provides a data transmission system, the system includes at least one data transmission device as described in the third aspect, or the data transmission device as described in the fourth aspect, or the data transmission device as described in the fifth aspect A data transmission device, or the chip described in the eighth aspect.
此外,在执行上述第一方面以及任一项可能的实施方式所述的方法,或上述第二方面以及任一项可能的实施方式所述的方法的过程中,上述方法中有关发送信息(如第一子流、第二子流)和/或接收信息等的过程,可以理解为由处理器输出信息的过程,和/或,处理器接收输入的信息的过程。在输出信息时,处理器可以将信息输出给收发器(或者通信接口、或发送模块),以便由收发器进行发射。信息在由处理器输出之后,还可能需要进行其他的处理,然后才到达收发器。类似的,处理器接收输入的信息时,收发器(或者通信接口、或发送模块)接收信息,并将其输入处理器。更进一步的,在收发器收到该信息之后,该信息可能需要进行其他的处理,然后才输入处理器。In addition, during the process of executing the method described in the above-mentioned first aspect and any possible implementation manner, or the method described in the above-mentioned second aspect and any possible implementation manner, in the above-mentioned method, the relevant sending information (such as The first sub-stream, the second sub-stream) and/or the process of receiving information can be understood as the process of outputting information by the processor, and/or the process of receiving input information by the processor. When outputting information, the processor may output information to a transceiver (or a communication interface, or a sending module) for transmission by the transceiver. After the information is output by the processor, additional processing may be required before reaching the transceiver. Similarly, when the processor receives input information, the transceiver (or communication interface, or sending module) receives the information and inputs it to the processor. Furthermore, after the transceiver receives the information, the information may require other processing before being input to the processor.
基于上述原理,举例来说,前述方法中提及的发送信息可以理解为处理器输出信息。又例如,接收信息可以理解为处理器接收输入的信息。Based on the above principles, for example, the sending information mentioned in the foregoing method can be understood as the processor outputting information. For another example, receiving information may be understood as the processor receiving input information.
可选的,对于处理器所涉及的发射、发送和接收等操作,如果没有特殊说明,或者,如果未与其在相关描述中的实际作用或者内在逻辑相抵触,则均可以更加一般性的理解为处理器输出和接收、输入等操作。Optionally, for operations such as transmitting, sending, and receiving involved in the processor, if there is no special description, or if it does not conflict with its actual function or internal logic in the relevant description, it can be understood more generally as Processor output and receive, input and other operations.
可选的,在实现过程中,上述处理器可以是专门用于执行这些方法的处理器,也可以 是通过执行存储器中的计算机指令来执行这些方法的处理器,例如通用处理器。上述存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(Read Only Memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型以及存储器与处理器的设置方式不做限定。Optionally, in the implementation process, the above-mentioned processor may be a processor dedicated to performing these methods, or a processor that executes these methods by executing computer instructions in a memory, such as a general-purpose processor. The above-mentioned memory can be a non-transitory (non-transitory) memory, such as a read-only memory (Read Only Memory, ROM), which can be integrated with the processor on the same chip, or can be respectively arranged on different chips. The embodiment does not limit the type of the memory and the arrangement of the memory and the processor.
在一种可能的实施方式中,上述至少一个存储器位于通信装置之外。In a possible implementation manner, the at least one memory is located outside the communication device.
在又一种可能的实施方式中,上述至少一个存储器位于通信装置之内。In yet another possible implementation manner, the above at least one memory is located in the communication device.
在又一种可能的实施方式之中,上述至少一个存储器的部分存储器位于通信装置之内,另一部分存储器位于通信装置之外。In yet another possible implementation manner, part of the memory of the at least one memory is located inside the communication device, and another part of the memory is located outside the communication device.
本申请中,处理器和存储器还可能集成于一个器件中,即处理器和存储器还可以被集成在一起。In this application, the processor and the memory may also be integrated into one device, that is, the processor and the memory may also be integrated together.
本申请实施例中,通过将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。In the embodiment of the present application, by splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmission processes, the data transmission pressure on a single node in the stream transmission network can be greatly reduced, making the data sending node The load is more balanced, fully matching the uplink bandwidth of each node in the mobile distributed streaming network environment, making the entire streaming network more robust and efficient.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the embodiments of the present application. Obviously, the accompanying drawings described below are only some embodiments of the present application. Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.
图1a为一种基于分发树的流传输网络的架构示意图;Figure 1a is a schematic diagram of the architecture of a distribution tree-based streaming network;
图1b为本申请实施例提供的一种基于分发树的流传输网络的架构示意图;FIG. 1b is a schematic structural diagram of a distribution tree-based streaming network provided by an embodiment of the present application;
图2为本申请实施例提供的一种流传输节点的架构示意图;FIG. 2 is a schematic structural diagram of a stream transmission node provided in an embodiment of the present application;
图3为本申请实施例提供的一种数据传输方法的流程示意图;FIG. 3 is a schematic flow diagram of a data transmission method provided by an embodiment of the present application;
图4为本申请实施例提供的一种子流分发的效果示意图;Fig. 4 is a schematic diagram of the effect of substream distribution provided by the embodiment of the present application;
图5为本申请实施例提供的一种子流冗余编码的效果示意图;Fig. 5 is a schematic diagram of the effect of redundant coding of a sub-stream provided by the embodiment of the present application;
图6为本申请实施例提供的一种同步组机制的效果示意图;FIG. 6 is a schematic diagram of the effect of a synchronization group mechanism provided by the embodiment of the present application;
图7为本申请实施例提供的一种调整流传输节点的效果示意图;FIG. 7 is a schematic diagram of an effect of adjusting a streaming transmission node provided by an embodiment of the present application;
图8为本申请实施例提供的另一种数据传输方法的流程示意图;FIG. 8 is a schematic flowchart of another data transmission method provided by the embodiment of the present application;
图9为本申请实施例提供的一种流传输网络的交互示意图;FIG. 9 is an interactive schematic diagram of a streaming network provided by an embodiment of the present application;
图10为本申请实施例提供的一种数据传输装置的结构示意图;FIG. 10 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application;
图11为本申请实施例提供的另一种数据传输装置的结构示意图;FIG. 11 is a schematic structural diagram of another data transmission device provided by an embodiment of the present application;
图12为本申请实施例提供的一种电子设备的结构示意图。FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图对本申请实施例进行描述。In order to make the purpose, technical solution and advantages of the present application clearer, the following will describe the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application.
本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备等,没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。The terms "first" and "second" in the specification, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally It also includes other steps or units inherent to these processes, methods, products, or devices.
在本文中提及的“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in this application, "at least one (item)" means one or more, "multiple" means two or more, and "at least two (items)" means two or three And three or more, "and/or", is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, "A and/or B" can mean: only A exists, only B exists, and A exists at the same time and B, where A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c ", where a, b, c can be single or multiple.
本申请提供了一种数据传输方法,为了更清楚地描述本申请的方案,下面先介绍一些与数据传输相关的知识。This application provides a data transmission method. In order to describe the solution of this application more clearly, some knowledge related to data transmission will be introduced below.
冗余编码:冗余码是一种所用符号数或信号码元数比表示信息所必需的数目多的代码。应用了冗余加密技术,即利用了纠错码的编码原理,在加密的文件中加入了大量的冗余信息,从而达到加密的目的。目前,大多数研究人员研究的冗余加密技术是公钥密码系统。目前,常用的冗余编码有汉明码、循环码、代数几何码等,内容非常丰富,涉及的领域广泛。Redundant coding: A redundant code is a code that uses more symbols, or signal elements, than necessary to represent the information. Redundant encryption technology is applied, that is, the encoding principle of error-correcting codes is used, and a large amount of redundant information is added to encrypted files, so as to achieve the purpose of encryption. Currently, the redundant encryption technique studied by most researchers is public key cryptography. At present, commonly used redundant codes include Hamming codes, cyclic codes, algebraic geometry codes, etc., which are very rich in content and involve a wide range of fields.
对等式网络(peer-to-peer,P2P):又称点对点技术,是无中心服务器、依靠用户群(peers)交换信息的互联网体系。它的作用在于,减低以往网路传输中的节点,以降低资料遗失的风险。与有中心服务器的中央网络系统不同,对等网络的每个用户端既是一个节点,也有服务器的功能,任何一个节点无法直接找到其他节点,必须依靠其户群进行信息交流。Peer-to-peer (P2P): Also known as peer-to-peer technology, it is an Internet system that has no central server and relies on user groups (peers) to exchange information. Its role is to reduce the number of nodes in the previous network transmission to reduce the risk of data loss. Different from the central network system with a central server, each client of the peer-to-peer network is not only a node, but also has the function of a server. Any node cannot directly find other nodes, and must rely on its user group for information exchange.
内容分发网络(Content Delivery Network,CDN):CDN是构建在现有网络基础之上的智能虚拟网络,依靠部署在各地的边缘服务器,通过中心平台的负载均衡、内容分发、调度等功能模块,使用户就近获取所需内容,降低网络拥塞,提高用户访问响应速度和命中率。CDN的关键技术主要有内容存储和分发技术。Content Delivery Network (CDN): CDN is an intelligent virtual network built on the basis of the existing network, relying on the edge servers deployed in various places, through the load balancing, content distribution, scheduling and other functional modules of the central platform, so that Users can obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate. The key technology of CDN mainly includes content storage and distribution technology.
以人的体验为中心的网络(Human Oriented Network,HON):主要目标为提升用户的体验,围绕体验构建网络。该网络涉及三大能力:端管云协同,创新/重构系统架构,推动网络和终端技术革新。Human Oriented Network (HON): The main goal is to improve user experience and build a network around experience. The network involves three major capabilities: device-pipe-cloud collaboration, innovation/reconfiguration of system architecture, and promotion of network and terminal technology innovation.
下面结合本申请实施例中的附图对本申请实施例进行描述。Embodiments of the present application are described below with reference to the drawings in the embodiments of the present application.
随着电子计算及网络通信的不断发展,越来越多的应用场景需要依赖于高效的数据传 输,人们对高效的数据传输的需求日益增长。以流媒体传输为例,推流方使用流媒体传输技术将一连串的媒体数据压缩后,经过网络分段发送,为用户提供即时的影音以供观赏。CDN作为云网络的核心基础设施,近年来得到了持续发展,尤其是随着视频业务持续的发展,CDN得到极大的关注,是提升用户体验的关键承载及桥梁。尤其是对于直播这类高并发业务,每一场大型直播都是一场重保活动。例如,一场产品发布会的直播活动,在线观看直播的用户量是不确定的,较大的在线用户量会远远超出CDN的带宽负载,致使数据传输卡顿,直播出现崩溃、掉线等问题,给用户带来较差体验。With the continuous development of electronic computing and network communication, more and more application scenarios need to rely on efficient data transmission, and people's demand for efficient data transmission is increasing. Taking streaming media transmission as an example, the pusher uses streaming media transmission technology to compress a series of media data, and then sends them in segments through the network to provide users with real-time audio and video for viewing. As the core infrastructure of cloud networks, CDN has been continuously developed in recent years. Especially with the continuous development of video services, CDN has received great attention, and it is the key bearer and bridge to improve user experience. Especially for high-concurrency services such as live broadcasts, every large-scale live broadcast is a re-insurance event. For example, for a live broadcast of a product launch event, the number of users watching the live broadcast online is uncertain. A large number of online users will far exceed the bandwidth load of the CDN, resulting in data transmission freezes, live broadcast crashes, and disconnections. problems and bring poor user experience.
而p2p模式具有潜在的可伸缩性和易于部署的特性,该模式在于参与直播观看的用户,也能够直接给需要的用户直接分享数据,这样可以有效降低集中服务器的瓶颈,因此在该模式下进行流媒体实时传输设计变得十分重要。现有的p2p流媒体传输方法根据覆盖网络的组织结构可以分为两大类:基于分发树的方式进行推流和使用mesh-pull的方法进行拉流。推流指发送节点将流数据向请求节点进行推送的过程,拉流指请求节点向数据拥有者主动拉取数据的过程。其中,基于分发树的方法进行去中心化的实时流媒体传输,是当前使用最为广泛的数据传输方法。该数据传输方法将参与数据传输的各个节点结构化的组织成流媒体传输树,源节点将流媒体文件切分成若干个文件块,通过传输树上相应的子节点进行流传输。The p2p mode has the characteristics of potential scalability and easy deployment. This mode is that the users who participate in the live broadcast can also directly share data with the users who need it. This can effectively reduce the bottleneck of the centralized server. Therefore, in this mode, the The real-time transmission design of streaming media becomes very important. Existing p2p streaming media transmission methods can be divided into two categories according to the organizational structure of the overlay network: push streaming based on the distribution tree method and pull streaming using the mesh-pull method. Stream push refers to the process in which the sending node pushes stream data to the requesting node, and streaming refers to the process in which the requesting node actively pulls data from the data owner. Among them, the decentralized real-time streaming media transmission based on the distribution tree method is currently the most widely used data transmission method. In the data transmission method, each node participating in the data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through corresponding child nodes on the transmission tree.
请参阅图1a,图1a为一种基于分发树的流传输网络的架构示意图。Please refer to FIG. 1a, which is a schematic diagram of a distribution tree-based streaming network architecture.
如图1a所示,传输系统将参与传输的节点(源节点、第一节点、第二节点、第三节点、第四节点、第五节点、第六节点等)组织成流媒体传输树,源节点将原始流切分成若干个文件块(第一文件块、第二文件块、第n文件块等),流媒体文件块通过相应的流媒体传输树进行流传输。As shown in Figure 1a, the transmission system organizes the nodes participating in the transmission (source node, first node, second node, third node, fourth node, fifth node, sixth node, etc.) into a streaming media transmission tree, and the source The node divides the original stream into several file blocks (the first file block, the second file block, the nth file block, etc.), and the streaming media file blocks are streamed through the corresponding streaming media transmission tree.
相比于使用mesh-pull的方法进行拉流,上述数据传输方法解决了冗余发送的问题,理想状态下传输效率和网络带宽利用率更高。但是,上述数据传输方法对单个节点的上行带宽依赖程度较大,某个节点断开会导致该节点下的所有子节点的数据传输失败,例如,图1a中的第二节点因移动网络带宽变化等原因断开连接,会导致连接在该节点下的所有子节点(第五节点、第六节点)接收不到数据,此时子节点将无法快速恢复数据传输。因此,该数据传输方法对带宽的利用率较低,抗毁性较差,数据传输效率较低。Compared with using the mesh-pull method to pull streams, the above data transmission method solves the problem of redundant transmission, and ideally has higher transmission efficiency and network bandwidth utilization. However, the above data transmission method is highly dependent on the uplink bandwidth of a single node, and the disconnection of a certain node will cause the data transmission of all child nodes under the node to fail. If the connection is disconnected due to other reasons, all child nodes (fifth node, sixth node) connected to the node will not receive data, and the child nodes will not be able to quickly resume data transmission at this time. Therefore, the data transmission method has low bandwidth utilization, poor invulnerability, and low data transmission efficiency.
此外,不同的设备一般具有不同的传输能力,在分布式环境中,传输系统还需要评估不同节点的数据传输能力来合理地调控分布式网络的结构,以进行更加有效的流传输。例如,手机、平板等移动端的用户规模越来越高,在业务场景中是非常重要的应用场景。并且,移动端业务在移动分布式网络场景中,用户可能处于不同的环境当中,同时用户还可能频繁地切换网络、打开/关闭应用等,对分布式流传输技术的可靠性也提出更高的要求,流传输系统需要合理地构建数据分发系统来保证最有效的数据传输。In addition, different devices generally have different transmission capabilities. In a distributed environment, the transmission system also needs to evaluate the data transmission capabilities of different nodes to reasonably regulate the structure of the distributed network for more effective streaming. For example, the number of users of mobile terminals such as mobile phones and tablets is getting higher and higher, which is a very important application scenario in business scenarios. Moreover, in mobile distributed network scenarios, users may be in different environments, and at the same time, users may frequently switch networks, open/close applications, etc., and put forward higher requirements for the reliability of distributed streaming technology. Requirements, the streaming system needs to build a data distribution system reasonably to ensure the most efficient data transmission.
针对上述数据传输方法中存在的抗毁性差、数据传输效率低等问题,本申请实施例提供了一种新的流传输网络架构。To solve the problems of poor invulnerability and low data transmission efficiency in the above data transmission method, the embodiment of the present application provides a new stream transmission network architecture.
请参阅图1b,图1b为本申请实施例提供的一种基于分发树的流传输网络的架构示意图。Please refer to FIG. 1b. FIG. 1b is a schematic structural diagram of a distribution tree-based streaming network provided by an embodiment of the present application.
如图1b所示,传输系统将参与传输的节点(源节点、第一节点、第二节点、第三节点、 第四节点、第五节点、第六节点等)组织成流媒体传输树,源节点将原始流切分成若干个文件块(第一文件块、第二文件块、第n文件块等),流媒体文件块通过相应的流媒体传输树进行流传输。基于本架构的数据传输方法,可以解决冗余发送的问题,理想状态下传输效率和网络带宽利用率更高。并且,与图1a中的传输树不同的是,本申请实施例中的传输树是分布式拓扑架构,节点之间的数据传输不依赖于单个节点的上行带宽,某个节点断开并不会使该节点下的所有子节点的数据传输失败。例如,图1b中的第二节点因移动网络带宽变化等原因断开连接,会导致连接在该节点下的子节点(如第五节点、第六节点)接收不到数据,此时,第五节点、第六节点会转而向第一节点请求数据传输。因此,本申请实施例中的流传输网络架构,对带宽的利用率较高,抗毁性较好,数据传输效率较高。As shown in Figure 1b, the transmission system organizes the nodes participating in the transmission (source node, first node, second node, third node, fourth node, fifth node, sixth node, etc.) into a streaming media transmission tree, and the source The node divides the original stream into several file blocks (the first file block, the second file block, the nth file block, etc.), and the streaming media file blocks are streamed through the corresponding streaming media transmission tree. The data transmission method based on this architecture can solve the problem of redundant transmission, and in an ideal state, the transmission efficiency and network bandwidth utilization are higher. Moreover, different from the transmission tree in Figure 1a, the transmission tree in the embodiment of the present application is a distributed topology architecture, and the data transmission between nodes does not depend on the uplink bandwidth of a single node. Fails the data transfer of all child nodes under this node. For example, the second node in Figure 1b is disconnected due to reasons such as changes in the mobile network bandwidth, which will cause the sub-nodes (such as the fifth node and the sixth node) connected to the node to fail to receive data. At this time, the fifth node The node and the sixth node will turn to request data transmission from the first node. Therefore, the stream transmission network architecture in the embodiment of the present application has higher bandwidth utilization, better invulnerability, and higher data transmission efficiency.
此外,基于新的流传输网络架构,本申请还提供了一种新的数据传输方法,该方法通过将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。相应的,结合新的数据传输方法,本申请实施例还设计了一整套子流发布、订阅、发送、分析、对应的分发树的构建、调节等模块所构成的系统。In addition, based on the new stream transmission network architecture, this application also provides a new data transmission method, which can be greatly expanded by splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmission processes. Reduce the data transmission pressure on a single node in the stream transmission network to a certain extent, make the load of the data sending node more balanced, fully match the uplink bandwidth of each node in the mobile distributed stream transmission network environment, and make the entire stream transmission network indestructible and The transmission efficiency is higher. Correspondingly, combined with the new data transmission method, the embodiment of the present application also designs a system composed of a whole set of sub-stream publishing, subscribing, sending, analyzing, corresponding distribution tree construction, adjustment and other modules.
请参阅图2,图2为本申请实施例提供的一种流传输节点的架构示意图。Please refer to FIG. 2 . FIG. 2 is a schematic diagram of an architecture of a stream transmission node provided by an embodiment of the present application.
如图2所示,该流传输节点的系统架构包括了文件处理模块、流文件发布模块、流文件订阅模块、流数据发送模块、分发树构建模块、分发树调节模块以及节点能力分析模块。As shown in Figure 2, the system architecture of the streaming node includes a file processing module, a streaming file publishing module, a streaming file subscription module, a streaming data sending module, a distribution tree construction module, a distribution tree adjustment module, and a node capability analysis module.
其中,文件处理模块主要用于对原始流媒体文件进行处理,包括划分子流、冗余编码等。通过将原始流划分为多个子流,进而将整个移动分布式流传输过程拆分成多个子流传输的过程,可以使得整个传输网络的传输效率更高。并且,通过对文件块冗余编码,在文件块中加入冗余数据块,从而实现子流冗余编码的目的。新加入的冗余数据块可以得到相应的冗余子流,使得在流传输过程中,即使存在若干个子流传输掉线的情况,但只要掉线子流不超过冗余子流,依然可以根据接收到的子流,解码得到原始流,可以提高子流传输的可靠性和稳定性。Among them, the file processing module is mainly used for processing the original streaming media file, including dividing sub-streams, redundant encoding, and the like. By dividing the original stream into multiple sub-streams, and then splitting the entire mobile distributed stream transmission process into multiple sub-stream transmission processes, the transmission efficiency of the entire transmission network can be improved. Moreover, by redundantly encoding the file blocks, redundant data blocks are added to the file blocks, thereby achieving the purpose of substream redundant encoding. The newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which can improve the reliability and stability of sub-stream transmission.
流文件发布模块,主要用于向流传输网络中发布关于原始流的元数据,该元数据包括了子流的划分情况,但是不包括具体的流数据。The stream file publishing module is mainly used to publish metadata about the original stream to the stream transmission network. The metadata includes the division of sub-streams, but does not include specific stream data.
流文件订阅模块,主要用于在收到源节点发出的元数据之后,决定是否订阅该流。通过元数据确定能提供子流的发送节点,并向该发送节点发起对子流的请求,可以最大程度的提高子流定位的准确率及效率,从而提高整体流传输网络的传输效率。The flow file subscription module is mainly used to decide whether to subscribe to the flow after receiving the metadata sent by the source node. By determining the sending node that can provide the sub-stream through the metadata, and initiating a request for the sub-stream to the sending node, the accuracy and efficiency of sub-stream positioning can be improved to the greatest extent, thereby improving the transmission efficiency of the overall stream transmission network.
流数据发送模块,主要用于在节点建立连接之后向数据请求者持续推送数据。The stream data sending module is mainly used to continuously push data to the data requester after the node establishes a connection.
节点能力分析模块,主要用于分析节点的数据传输能力,对节点传输能力进行记录,以便于在构建流分发树时提供相关信息。通过对节点的数据传输能力的建模,来优化子节点和父节点的选择,降低流分发树的高度,提高流传输效率。The node capability analysis module is mainly used to analyze the data transmission capability of the node, and record the node transmission capability, so as to provide relevant information when building the flow distribution tree. By modeling the data transmission capabilities of nodes, the selection of child nodes and parent nodes is optimized, the height of the stream distribution tree is reduced, and the efficiency of stream transmission is improved.
分发树构建模块,主要用于根据上述节点能力分析模块建模提供的数据对分发树进行构建,用于确定数据发送者和接收者。通过构建移动分布式子流分发树,对整个流传输网络进行结构化规范,可在无中心调度器场景下快速构建流传输分发树。通过对流传输网络以及节点能力的建模来优化子节点和父节点的选择,可以最大程度上降低子流分发树的高 度以及最大化流传输效率。The distribution tree construction module is mainly used to construct the distribution tree according to the data provided by the above-mentioned node capability analysis module modeling, and is used to determine the data sender and receiver. By building a mobile distributed sub-stream distribution tree, the entire streaming network can be structured and standardized, and the streaming distribution tree can be quickly built in the scenario of no central scheduler. By modeling the streaming network and node capabilities to optimize the selection of child nodes and parent nodes, the height of the sub-stream distribution tree can be minimized and the efficiency of stream transmission can be maximized.
分发树调节模块,主要用于处理流传输过程中节点的退出的问题,迅速获取流传输急需的数据块,以及调整流传输分发树。对于移动分布式网络中节点频繁退出和加入的问题,通过对流传输分发树进行动态的调节以修复流传输分发树。在子流丢失较多的情况下,如果收到的数据块不足无法还原文件块,可以主动拉取流传输急需的数据块,直至和新的父节点建立连接,提高流传输效率。The distribution tree adjustment module is mainly used to deal with the problem of node exit during the streaming process, quickly obtain urgently needed data blocks for streaming, and adjust the streaming distribution tree. For the problem of frequent exit and join of nodes in mobile distributed network, the stream transmission distribution tree is repaired by dynamically adjusting the stream transmission distribution tree. In the case of a lot of substream loss, if the received data blocks are not enough to restore the file blocks, you can actively pull the data blocks that are urgently needed for streaming until a connection is established with a new parent node to improve streaming efficiency.
相应的,基于上述流传输节点系统架构,本申请实施例提供了一种新的数据传输方法。Correspondingly, based on the foregoing stream transmission node system architecture, embodiments of the present application provide a new data transmission method.
请参阅图3,图3为本申请实施例提供的一种数据传输方法的流程示意图,该方法包括但不限于如下步骤:Please refer to Figure 3, Figure 3 is a schematic flow chart of a data transmission method provided by the embodiment of the present application, the method includes but is not limited to the following steps:
步骤301:向第一发送节点发送第一子流请求,以及向第二发送节点发送第二子流请求。Step 301: Send a first substream request to a first sending node, and send a second substream request to a second sending node.
本申请实施例中的节点是一个连接点,表示一个再分发点或一个通信端点,具体为一个连接到网络的有源电子设备。该电子设备搭载了可用于执行计算机执行指令的处理器,能够通过通信通道发送、接收或转发信息。具体的,在数据通信中,该电子设备可以是数据电路端接设备,如调制调节器、集线器或交换机等;也可以是数据终端设备,如计算机、手机或主机(例如路由器、工作站或服务器)等。此外,本申请实施例中的“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。A node in this embodiment of the present application is a connection point, which means a redistribution point or a communication endpoint, specifically an active electronic device connected to a network. The electronic device is equipped with a processor that can be used to execute computer-executable instructions, and can send, receive or forward information through a communication channel. Specifically, in data communication, the electronic device can be a data circuit termination device, such as a modulator, hub or switch, etc.; it can also be a data terminal device, such as a computer, mobile phone or host (such as a router, workstation or server) Wait. In addition, "first" and "second" in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order.
本申请实施例中,第一请求节点向第一发送节点发送第一子流请求,以及向第二发送节点发送第二子流请求。该第一发送节点不同于第二发送节点,该第一发送节点为提供第一子流的节点,该第二发送节点为提供第二子流的节点。该第一子流请求用于请求第一发送节点发送第一子流,该第二子流请求用于请求第二发送节点发送第二子流。其中,上述第一请求节点发出的第一子流请求和第二子流请求,均包含了第一请求节点的剩余带宽信息。因为发送节点可能同时收到多个请求节点的子流请求,此时发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个请求节点发送子流,故该第一请求节点的剩余带宽信息用于发送节点确定第一请求节点,使数据发送节点的负载更加均衡,提高了数据传输效率。In this embodiment of the present application, the first requesting node sends the first substream request to the first sending node, and sends the second substream request to the second sending node. The first sending node is different from the second sending node, the first sending node is a node providing the first substream, and the second sending node is a node providing the second substream. The first substream request is used to request the first sending node to send the first substream, and the second substream request is used to request the second sending node to send the second substream. Wherein, the first sub-flow request and the second sub-flow request sent by the first requesting node both include remaining bandwidth information of the first requesting node. Because the sending node may receive sub-stream requests from multiple requesting nodes at the same time, the sending node needs to select one or more requesting nodes to send sub-streams according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node The sending node is used to determine the first requesting node, so that the load of the data sending node is more balanced, and the data transmission efficiency is improved.
在一种可能的实施方式中,第一子流和第二子流通过划分原始流得到,且第一子流与第二子流不完全相同。下面将提供一种划分子流的可能的实施方式。In a possible implementation manner, the first substream and the second substream are obtained by dividing the original stream, and the first substream and the second substream are not completely the same. A possible implementation manner of dividing sub-streams will be provided below.
将原始流划分为两个或两个以上的文件块,每个文件块包含两个或两个以上的数据块。将所有数据块按照时间顺序对其索引编号,并根据数据块索引将数据块划分为不同的子流中,使得划分得到的每个子流包含每个文件块中的至少一个数据块。具体可以为,将原始流划分为第一文件块和第二文件块,第一文件块和第二文件块包含两个或两个以上的数据块。根据数据块索引将数据块划分为第一子流或第二子流中,从而实现将原始流划分为第一子流和第二子流的目的。该第一子流包含第一文件块中的至少一个数据块和第二文件块中的至少一个数据块,该第二子流包含第一文件块中的至少一个数据块和第二文件块中的至少一个数据块。其中,上述划分文件块的大小可以由原始流中包含的数据块类型和数据块大小确定。不同应用场景下传输的原始流不同,其包含的数据类型和大小均不同,故划分文件块的大小应根据应用场景进行适应性调整,可以提高数据传输效率。Divide the original stream into two or more file blocks, and each file block contains two or more data blocks. Indexes of all data blocks are numbered in time order, and the data blocks are divided into different sub-streams according to the data block indexes, so that each divided sub-stream includes at least one data block in each file block. Specifically, the original stream may be divided into a first file block and a second file block, and the first file block and the second file block include two or more data blocks. The data block is divided into the first sub-stream or the second sub-stream according to the data block index, so as to realize the purpose of dividing the original stream into the first sub-stream and the second sub-stream. The first substream includes at least one data block in the first file block and at least one data block in the second file block, and the second substream includes at least one data block in the first file block and at least one data block in the second file block at least one block of data. Wherein, the size of the above-mentioned divided file blocks may be determined by the data block type and data block size contained in the original stream. The original streams transmitted in different application scenarios are different, and the data types and sizes contained in them are different. Therefore, the size of divided file blocks should be adjusted adaptively according to the application scenarios, which can improve the efficiency of data transmission.
请参阅图4,图4为本申请实施例提供的一种子流分发的效果示意图。可结合图4对上述划分子流的实施方式做进一步说明。如图4所示,将原始流s划分为两个以上的文件块(第一文件块、第二文件块、第三文件块等),每个文件块包含了五个数据块。将所有数据块(bilock n,n=1,2,3,…)按照时间顺序对其索引从1开始排序编号,并根据数据块索引将数据块划分为不同的子流
Figure PCTCN2021097487-appb-000001
中,使得划分得到的每个子流
Figure PCTCN2021097487-appb-000002
包含每个文件块中的至少一个数据块。其中,使用N s和R s来分别表示划分子流的子流数量和比特率,第i个子流包含的数据块的索引序号包括:k*N s+i,k=0,1,2,…。对于子流
Figure PCTCN2021097487-appb-000003
而言,其比特率为:
Figure PCTCN2021097487-appb-000004
在图4所示的子流分发中,对所有数据块的索引编号,其中,第一文件块包括数据块1、数据块2、数据块3、数据块4、数据块5,第二文件块包括数据块6、数据块7、数据块8、数据块9、数据块10,第三文件块包括数据块11、数据块12、数据块13、数据块14、数据块15。根据上述数据块索引将数据块划分为不同的子流(第一子流A、第二子流B、第三子流C、第四子流D、第五子流E)中,从而实现将原始流划分为多个子流的目的。其中,第一子流A包含第一文件块中的至少一个数据块(数据块1)、第二文件块中的至少一个数据块(数据块6)和第三文件块中的至少一个数据块(数据块11),第二子流B包含第一文件块中的至少一个数据块(数据块2)、第二文件块中的至少一个数据块(数据块7)和第三文件块中的至少一个数据块(数据块12),第三子流C包含第一文件块中的至少一个数据块(数据块3)、第二文件块中的至少一个数据块(数据块8)和第三文件块中的至少一个数据块(数据块13),第四子流D包含第一文件块中的至少一个数据块(数据块4)、第二文件块中的至少一个数据块(数据块9)和第三文件块中的至少一个数据块(数据块14),第五子流E包含第一文件块中的至少一个数据块(数据块5)、第二文件块中的至少一个数据块(数据块10)和第三文件块中的至少一个数据块(数据块15)。
Please refer to FIG. 4 . FIG. 4 is a schematic diagram of an effect of substream distribution provided by an embodiment of the present application. The foregoing implementation manner of dividing substreams may be further described in conjunction with FIG. 4 . As shown in FIG. 4 , the original stream s is divided into more than two file blocks (first file block, second file block, third file block, etc.), and each file block includes five data blocks. Sort and number all data blocks (bilock n , n=1,2,3,…) in chronological order starting from 1, and divide the data blocks into different sub-streams according to the data block index
Figure PCTCN2021097487-appb-000001
, so that each sub-flow obtained by division
Figure PCTCN2021097487-appb-000002
Contains at least one data block in each file block. Wherein, N s and R s are used to represent the number of sub-streams and the bit rate of the divided sub-streams respectively, and the index numbers of the data blocks contained in the i-th sub-stream include: k*N s +i, k=0,1,2, … for substream
Figure PCTCN2021097487-appb-000003
In terms of bitrates:
Figure PCTCN2021097487-appb-000004
In the sub-stream distribution shown in Figure 4, the indexes of all data blocks are numbered, wherein the first file block includes data block 1, data block 2, data block 3, data block 4, data block 5, and the second file block Including data block 6, data block 7, data block 8, data block 9, and data block 10, the third file block includes data block 11, data block 12, data block 13, data block 14, and data block 15. According to the above data block index, the data block is divided into different sub-streams (first sub-stream A, second sub-stream B, third sub-stream C, fourth sub-stream D, fifth sub-stream E), so as to achieve The purpose of dividing the original stream into multiple sub-streams. Wherein, the first substream A includes at least one data block (data block 1) in the first file block, at least one data block (data block 6) in the second file block and at least one data block in the third file block (data block 11), the second substream B contains at least one data block (data block 2) in the first file block, at least one data block (data block 7) in the second file block, and at least one data block (data block 7) in the third file block At least one data block (data block 12), the third substream C contains at least one data block in the first file block (data block 3), at least one data block in the second file block (data block 8) and the third At least one data block (data block 13) in the file block, the fourth substream D contains at least one data block (data block 4) in the first file block, at least one data block (data block 9) in the second file block ) and at least one data block (data block 14) in the third file block, the fifth substream E includes at least one data block (data block 5) in the first file block, at least one data block in the second file block (data block 10) and at least one data block (data block 15) in the third file block.
本申请实施例所提供的子流划分方法,使得划分得到的各个子流都包含了各个文件块中的至少一个数据块,如此可确保第一请求节点接收到各个子流后,能通过对各个子流解码还原得到原始流,提高数据传输效率。The sub-stream division method provided by the embodiment of the present application makes each divided sub-stream contain at least one data block in each file block, thus ensuring that after the first requesting node receives each sub-stream, it can Sub-stream decoding restores to obtain the original stream, improving data transmission efficiency.
在一种可能的实施方式中,在划分原始流得到第一子流和第二子流的前提下,还可以对第一子流和第二子流进行冗余编码,以提高子流传输的可靠性和稳定性。下面将提供一种子流冗余编码的可能的实施方式。In a possible implementation manner, on the premise that the original stream is divided to obtain the first sub-stream and the second sub-stream, redundant coding may also be performed on the first sub-stream and the second sub-stream, so as to improve the efficiency of sub-stream transmission. reliability and stability. A possible implementation manner of substream redundant coding will be provided below.
将原始流划分为两个或两个以上的文件块,每个文件块包括两个或两个以上的数据块。对每个文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入相应的文件块中,使得每个文件块中的数据块为划分原始流得到的数据块,或是对文件块冗余编码得到的数据块。具体为,将原始流划分为第一文件块和第二文件块,对第一文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入第一文件块中,同理,对第二文件块中的数据块进行FEC编码得到新的冗余数据块,并将该冗余数据块加入第二文件块中。因此,第一文件块中的数据块为划分原始流得到的数据块,或是对第一文件块冗余编码得到的数据块,第二文件块中的数据块为划分原始流得到的数据块,或是对第二文件块冗余编码得到的数据块。上述FEC是一种差错控制方式,它是指信号在被送入传输 信道之前预先按一定的算法进行编码处理,加入带有信号本身特征的冗余码,在接收端按照相应算法对接收到的信号进行解码,从而找出在传输过程中产生的错误码并将其纠正的技术,可以大大增加数据通信的可靠性和稳定性。Divide the original stream into two or more file blocks, each file block includes two or more data blocks. Perform FEC encoding on the data blocks in each file block to obtain new redundant data blocks, and add the redundant data blocks to the corresponding file blocks, so that the data blocks in each file block are the data obtained by dividing the original stream block, or a data block obtained by redundantly encoding a file block. Specifically, divide the original stream into a first file block and a second file block, perform FEC encoding on the data block in the first file block to obtain a new redundant data block, and add the redundant data block to the first file block In the same way, FEC encoding is performed on the data blocks in the second file block to obtain a new redundant data block, and the redundant data block is added to the second file block. Therefore, the data blocks in the first file block are the data blocks obtained by dividing the original stream, or the data blocks obtained by redundantly encoding the first file block, and the data blocks in the second file block are the data blocks obtained by dividing the original stream , or a data block obtained by redundantly encoding the second file block. The above-mentioned FEC is an error control method, which means that the signal is encoded according to a certain algorithm before being sent to the transmission channel, and the redundant code with the characteristics of the signal itself is added, and the received signal is processed according to the corresponding algorithm at the receiving end. The technology of decoding the signal to find out the error code generated during the transmission and correct it can greatly increase the reliability and stability of data communication.
请参阅图5,图5为本申请实施例提供的一种子流冗余编码的效果示意图。可结合图5对上述子流冗余编码的实施方式做进一步说明。如图5所示,将原始流划分为包括第一文件块和第二文件块的若干个文件块。其中,第一文件块包括四个数据块(数据块1、数据块2、数据块3、数据块4),第二文件块也包括四个数据块(数据块5、数据块6、数据块7、数据块8)。对第一文件块中的数据块进行FEC编码得到一个新的冗余数据块,并将该冗余数据块加入第一文件块中,同理,对第二文件块中的数据块进行FEC编码得到一个新的冗余数据块,并将该冗余数据块加入第二文件块中。按照时间顺序对所有数据块索引从1开始重新编号,可以得到,经过冗余编码处理后的第一文件块包括五个数据块(数据块1、数据块2、数据块3、数据块4、数据块5),经过冗余编码处理后的第二文件块也包括五个数据块(数据块6、数据块7、数据块8、数据块9、数据块10)。因此,上述第一文件块中的数据块为划分原始流得到的数据块,或是对第一文件块冗余编码得到的数据块,上述第二文件块中的数据块为划分原始流得到的数据块,或是对第二文件块冗余编码得到的数据块。并且,上述对包括四个数据块的文件块进行冗余编码得到一个新的冗余数据块,可以得到,该冗余编码的冗余度γ为:1/4=0.25。Please refer to FIG. 5 . FIG. 5 is a schematic diagram of an effect of substream redundancy coding provided by an embodiment of the present application. The implementation manner of the above substream redundant coding can be further described in conjunction with FIG. 5 . As shown in FIG. 5, the original stream is divided into several file blocks including the first file block and the second file block. Wherein, the first file block includes four data blocks (data block 1, data block 2, data block 3, data block 4), and the second file block also includes four data blocks (data block 5, data block 6, data block 7. Data block 8). Perform FEC encoding on the data block in the first file block to obtain a new redundant data block, and add the redundant data block to the first file block. Similarly, perform FEC encoding on the data block in the second file block A new redundant data block is obtained, and the redundant data block is added to the second file block. Renumber all data block indexes from 1 in time order, and it can be obtained that the first file block after redundant encoding processing includes five data blocks (data block 1, data block 2, data block 3, data block 4, Data block 5), the second file block after redundant encoding processing also includes five data blocks (data block 6, data block 7, data block 8, data block 9, data block 10). Therefore, the data blocks in the above-mentioned first file block are data blocks obtained by dividing the original stream, or the data blocks obtained by redundantly encoding the first file block, and the data blocks in the above-mentioned second file block are obtained by dividing the original stream A data block, or a data block obtained by redundantly encoding the second file block. In addition, performing redundant encoding on the file block including four data blocks to obtain a new redundant data block, it can be obtained that the redundancy γ of the redundant encoding is: 1/4=0.25.
本申请实施例所提供的子流冗余编码方法,通过对文件块冗余编码,在文件块中加入冗余数据块,从而实现子流冗余编码的目的。新加入的冗余数据块可以得到相应的冗余子流,使得在流传输过程中,即使存在若干个子流传输掉线的情况,但只要掉线子流不超过冗余子流,依然可以根据接收到的子流,解码得到原始流。例如,假设原来每个文件块包含n个数据块,经过冗余编码后每个文件块包含n+γn个数据块,对于n+γn条子流,即使存在若干个子流传输掉线的情况,但只要接收到至少n条子流,依然可以解码得到原始流。在上述图4中,对第一文件块冗余编码得到一个新的冗余数据块,对其索引重新编号为数据块5,并加入第一文件块。同理,对第二文件块冗余编码得到一个新的冗余数据块,对其索引重新编号为数据块10,并加入第二文件块。对第三文件块冗余编码得到一个新的冗余数据块,对其索引重新编号为数据块15,并加入第三文件块。如此,新加入的冗余数据块可以得到相应的冗余子流第五子流E,原来划分原始流得到四条子流,变成得到五条子流,使得在流传输过程中,即使存在某一条子流传输掉线的情况,但只要掉线子流不超过新增的冗余子流数,依然可以根据接收到的子流,解码得到原始流,提高了子流传输的可靠性和稳定性。The sub-stream redundant coding method provided in the embodiment of the present application implements redundant coding of the sub-stream by adding redundant data blocks to the file block through redundant coding of the file block. The newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received substream is decoded to obtain the original stream. For example, assuming that each file block originally contains n data blocks, each file block contains n+γn data blocks after redundancy encoding, for n+γn substreams, even if there are several substreams that are disconnected, but As long as at least n substreams are received, the original stream can still be decoded. In the above-mentioned FIG. 4, a new redundant data block is obtained by redundant encoding of the first file block, and its index is renumbered as data block 5, and the first file block is added. Similarly, a new redundant data block is obtained by redundantly encoding the second file block, its index is renumbered as data block 10, and the second file block is added. A new redundant data block is obtained by redundantly encoding the third file block, its index is renumbered as data block 15, and the third file block is added. In this way, the newly added redundant data block can obtain the corresponding redundant sub-stream fifth sub-stream E. Originally, the original stream was divided into four sub-streams to obtain five sub-streams, so that in the process of stream transmission, even if there is a certain In the case of sub-stream transmission disconnection, as long as the dropped sub-stream does not exceed the number of newly added redundant sub-streams, the original stream can still be decoded according to the received sub-stream, which improves the reliability and stability of sub-stream transmission .
在一种可能的实施方式中,在第一请求节点向第一发送节点发送第一子流请求,以及向第二发送节点发送第二子流请求之前,第一请求节点需要先确定提供第一子流的第一发送节点和提供第二子流的第二发送节点。下面将以第一请求节点确定第一发送节点为例,提供一种确定发送节点的可能的实施方式。In a possible implementation manner, before the first requesting node sends the first sub-stream request to the first sending node and sends the second sub-stream request to the second sending node, the first requesting node needs to determine to provide the first A first sending node for the substream and a second sending node for providing the second substream. A possible implementation manner of determining the sending node will be provided below by taking the first requesting node determining the first sending node as an example.
在源节点划分原始流并将该原始流的元数据发布在传输网络的群组中之后,第一请求节点可根据原始流的元数据确定第一发送节点,并向该第一发送节点发起对第一子流的请求。具体为,第一请求节点根据元数据,首先确定一个候选发送节点集合
Figure PCTCN2021097487-appb-000005
该候选发送 节点集合包含一个或多个候选发送节点及其在传输网络中的分发树高度信息
Figure PCTCN2021097487-appb-000006
其中,上述候选发送节点为潜在的第一子流s i的提供节点,可以通过节点拥有的子流的数据块索引来判断该节点是否为潜在的第一子流s i的提供节点,即若某个节点拥有的子流的起始数据块索引
Figure PCTCN2021097487-appb-000007
和末数据块索引
Figure PCTCN2021097487-appb-000008
完全覆盖了上述第一子流s i,则将该节点作为候选发送节点保存至候选发送节点集合
Figure PCTCN2021097487-appb-000009
中。通过上述方式确定了候选发送节点集合
Figure PCTCN2021097487-appb-000010
之后,第一请求节点再通过比较候选发送节点集合
Figure PCTCN2021097487-appb-000011
中的候选发送节点的分发树高度
Figure PCTCN2021097487-appb-000012
将分发树高度
Figure PCTCN2021097487-appb-000013
小于第一阈值的第一候选发送节点确定为第一发送节点,并向其发送第一子流请求,用于向其请求发送第一子流s i。其中,上述第一阈值不是一个固定的值,可以根据应用场景的不同而不同。因此,可以通过调整第一阈值筛选出候选发送节点集合
Figure PCTCN2021097487-appb-000014
中分发树高度
Figure PCTCN2021097487-appb-000015
最小的候选发送节点作为最终的第一子流提供节点。同理,也可以通过上述确定第一发送节点的实施方式,来确定上述第二发送节点。综上可知,从候选发送节点集合
Figure PCTCN2021097487-appb-000016
中选择的第一发送节点需符合以下条件:
After the source node divides the original flow and publishes the metadata of the original flow in the group of the transmission network, the first requesting node can determine the first sending node according to the metadata of the original flow, and initiate a request to the first sending node Request for the first substream. Specifically, the first requesting node first determines a set of candidate sending nodes according to the metadata
Figure PCTCN2021097487-appb-000005
The candidate sending node set includes one or more candidate sending nodes and their distribution tree height information in the transmission network
Figure PCTCN2021097487-appb-000006
Wherein, the above-mentioned candidate sending node is a potential provider node of the first substream si , and whether the node is a potential provider node of the first substream si can be judged through the data block index of the substream owned by the node, that is, if The starting data block index of the substream owned by a certain node
Figure PCTCN2021097487-appb-000007
and last block index
Figure PCTCN2021097487-appb-000008
completely covered the above-mentioned first sub-stream s i , save this node as a candidate sending node to the set of candidate sending nodes
Figure PCTCN2021097487-appb-000009
middle. The set of candidate sending nodes is determined by the above method
Figure PCTCN2021097487-appb-000010
Afterwards, the first requesting node compares the set of candidate sending nodes
Figure PCTCN2021097487-appb-000011
The distribution tree height of the candidate sending node in
Figure PCTCN2021097487-appb-000012
will distribute the tree height
Figure PCTCN2021097487-appb-000013
The first candidate sending node smaller than the first threshold is determined as the first sending node, and sends the first substream request to it, for requesting to send the first substream s i . Wherein, the above-mentioned first threshold is not a fixed value, and may be different according to different application scenarios. Therefore, the set of candidate sending nodes can be screened out by adjusting the first threshold
Figure PCTCN2021097487-appb-000014
middle distribution tree height
Figure PCTCN2021097487-appb-000015
The smallest candidate sending node is used as the final first substream providing node. Similarly, the second sending node may also be determined through the above implementation manner of determining the first sending node. In summary, from the set of candidate sending nodes
Figure PCTCN2021097487-appb-000016
The first sending node selected in must meet the following conditions:
Figure PCTCN2021097487-appb-000017
Figure PCTCN2021097487-appb-000017
本申请实施例通过节点拥有的子流的起始数据块索引和末数据块索引,判断该节点完全覆盖第一子流,从而确定该节点为潜在的第一子流提供节点,进而将该节点作为候选发送节点保存至候选发送节点集合中,再通过节点的分发树高度信息从候选发送节点集合中择优筛选出一个候选发送节点,作为向其发送第一子流请求的第一发送节点。通过上述方法,可以使最终选择的子流提供节点效果最佳,最大程度上减小对流传输网络中的上行节点的数据传输压力,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,大大提高流传输网络中数据传输的效率。In this embodiment of the present application, through the start data block index and the end data block index of the sub-stream owned by the node, it is judged that the node completely covers the first sub-stream, so as to determine that the node is a potential first sub-stream providing node, and then the node The candidate sending node is stored in the candidate sending node set, and then a candidate sending node is selected from the candidate sending node set according to the distribution tree height information of the node as the first sending node to which the first substream request is sent. Through the above method, the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
进一步地,上述通过调整第一阈值筛选出候选发送节点集合中分发树高度最小的候选发送节点作为最终的第一子流提供节点,若存在两个或两个以上候选发送节点的分发树高度相同且小于该第一阈值的情况下,将其中剩余带宽RB最高的候选发送节点确定为最终的第一子流提供节点,即第一子流提供节点需符合条件:
Figure PCTCN2021097487-appb-000018
Further, by adjusting the first threshold above, the candidate sending node with the smallest distribution tree height in the candidate sending node set is selected as the final first substream providing node, if there are two or more candidate sending nodes with the same distribution tree height and is less than the first threshold, the candidate sending node with the highest remaining bandwidth RB is determined as the final first substream providing node, that is, the first substream providing node must meet the conditions:
Figure PCTCN2021097487-appb-000018
进一步地,上述第一请求节点根据元数据,首先确定一个候选发送节点集合,具体可以是,先根据元数据得到原始流的划分情况,然后向邻居节点或网络节点查询拥有第一子流的节点。其中,邻居节点为与第一请求节点之间周期性地交换流数据的节点,即与第一请求节点传输频率超过频率阈值的节点,该频率阈值与上述第一阈值类似,不是一个固定的值,可以根据应用场景的不同而不同。Further, the above-mentioned first requesting node first determines a set of candidate sending nodes according to the metadata. Specifically, it may first obtain the division of the original flow according to the metadata, and then query the neighbor nodes or network nodes for nodes that own the first sub-flow . Among them, the neighbor node is a node that periodically exchanges flow data with the first requesting node, that is, a node whose transmission frequency with the first requesting node exceeds a frequency threshold, and the frequency threshold is similar to the above-mentioned first threshold, and is not a fixed value , can vary according to different application scenarios.
步骤302:接收该第一子流和第二子流。Step 302: Receive the first substream and the second substream.
在第一请求节点向第一发送节点发送第一子流请求以及向第二发送节点发送第二子流请求之后,若第一发送节点接受该第一子流请求并发送第一子流,第二发送节点接受该第二子流请求并发送第二子流,第一请求节点接收该第一子流和第二子流。After the first request node sends the first sub-stream request to the first sending node and the second sub-stream request to the second sending node, if the first sending node accepts the first sub-stream request and sends the first sub-stream, the second The second sending node accepts the second substream request and sends the second substream, and the first requesting node receives the first substream and the second substream.
若第一发送节点拒绝该第一子流请求或发送第一子流失败,第二发送节点拒绝该第二子流请求或发送第二子流失败,第一请求节点需要根据第一子流的传输状态、第二子流的传输状态、第一发送节点的发送状态以及第二发送节点的发送状态,动态调整流分发树中 子流的发送节点。下面将以第一请求节点动态调整流分发树中第一子流的发送节点为例,提供一种调整子流发送节点的可能的实施方式。If the first sending node rejects the first sub-flow request or fails to send the first sub-flow, and the second sending node rejects the second sub-flow request or fails to send the second sub-flow, the first requesting node needs to The transmission state, the transmission state of the second sub-stream, the sending state of the first sending node, and the sending state of the second sending node dynamically adjust the sending nodes of the sub-stream in the stream distribution tree. The following will take the first request node dynamically adjusting the sending node of the first substream in the stream distribution tree as an example to provide a possible implementation manner of adjusting the sending node of the substream.
在一种可能的实施方式中,确定第一子流的发送节点为第一发送节点之后,向该第一发送节点发送第一子流请求,用于请求第一发送节点发送第一子流。在该第一发送节点拒绝发送第一子流的情况下,第一请求节点将向上述候选发送节点集合中选择次优的候选发送节点作为新的第一子流提供节点。In a possible implementation manner, after determining that the sending node of the first substream is the first sending node, a first substream request is sent to the first sending node, for requesting the first sending node to send the first substream. In the case that the first sending node refuses to send the first substream, the first requesting node will select a suboptimal candidate sending node from the above candidate sending node set as a new first substream providing node.
具体的,第一请求节点将选择候选发送节点集合中的第二候选发送节点作为新的第一子流提供节点,并向该第二候选发送节点发送第一子流重请求,该第一子流重请求用于请求第二候选发送节点发送第一子流,该第一子流重请求包含了第一请求节点的剩余带宽信息,因为第二候选发送节点可能同时收到多个请求节点的子流重请求,此时第二候选发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个请求节点发送子流,故该第一请求节点的剩余带宽信息用于第二候选发送节点确定第一请求节点。其中,上述第二候选发送节点为分发树高度小于第二阈值且不小于上述第一阈值的候选发送节点,该第二阈值与上述第一阈值类似,不是一个固定的值,可以根据应用场景的不同而不同。可以通过调整第二阈值来筛选出候选发送节点集合中分发树高度次优的候选发送节点作为最终的第一子流提供节点。同理,在第一请求节点向第二发送节点发送第二子流请求,且该第二发送节点拒绝发送第二子流的情况下,可以通过上述调整流分发树中第一子流的发送节点的方式,来调整流分发树中第二子流的发送节点。Specifically, the first request node will select the second candidate sending node in the set of candidate sending nodes as the new first substream providing node, and send a first substream re-request to the second candidate sending node, the first substream The flow re-request is used to request the second candidate sending node to send the first sub-flow, and the first sub-flow re-request includes the remaining bandwidth information of the first requesting node, because the second candidate sending node may receive multiple requesting nodes at the same time The substream re-requests. At this time, the second candidate sending node needs to select one or more requesting nodes to send the substream according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node is used for the second candidate sending node to determine The first requesting node. Wherein, the above-mentioned second candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the above-mentioned first threshold, and the second threshold is similar to the above-mentioned first threshold, and is not a fixed value. It varies from person to person. Candidate sending nodes whose distribution tree height is suboptimal in the candidate sending node set may be selected by adjusting the second threshold as the final first substream providing node. Similarly, when the first request node sends a second sub-flow request to the second sending node, and the second sending node refuses to send the second sub-flow, the sending of the first sub-flow in the flow distribution tree can be adjusted through the above-mentioned node to adjust the sending node of the second sub-flow in the flow distribution tree.
本申请实施例通过节点的分发树高度信息从候选发送节点集合中选择一个次优的候选发送节点作为新的子流发送节点,并向其发送子流重请求,用于继续获取待接收的子流。通过上述方法,可以使最终选择的子流提供节点效果最佳,最大程度上减小对流传输网络中的上行节点的数据传输压力,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,大大提高了流传输网络中数据传输的效率。In the embodiment of the present application, a suboptimal candidate sending node is selected from the set of candidate sending nodes as a new substream sending node through the distribution tree height information of the node, and a substream re-request is sent to it to continue to obtain substreams to be received. flow. Through the above method, the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
在一种可能的实施方式中,确定第一子流的发送节点为第一发送节点之后,向该第一发送节点发送第一子流请求,用于请求第一发送节点发送第一子流,该第一发送节点接受该第一子流请求并向第一请求节点发送第一子流。在第一请求节点接收该第一子流的过程中第一子流传输中断的情况下,第一请求节点将向上述候选发送节点集合中选择次优的候选发送节点作为新的第一子流提供节点。In a possible implementation manner, after determining that the sending node of the first substream is the first sending node, a first substream request is sent to the first sending node, for requesting the first sending node to send the first substream, The first sending node accepts the first substream request and sends the first substream to the first requesting node. In the case that the transmission of the first sub-stream is interrupted during the process of the first requesting node receiving the first sub-stream, the first requesting node will select the second-best candidate sending node from the above-mentioned set of candidate sending nodes as the new first sub-stream Provide a node.
具体的,第一请求节点将选择候选发送节点集合中的第二候选发送节点作为新的第一子流提供节点,并向该第二候选发送节点发送第一子流重请求,该第一子流重请求用于请求第二候选发送节点发送第一子流,该第一子流重请求包含了第一请求节点的剩余带宽信息,因为第二候选发送节点可能同时收到多个请求节点的子流重请求,此时第二候选发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个请求节点发送子流,故该第一请求节点的剩余带宽信息用于第二候选发送节点确定第一请求节点。其中,上述第二候选发送节点为分发树高度小于第二阈值且不小于上述第一阈值的候选发送节点,该第二阈值同上述第一阈值类似,不是一个固定的值,可以根据应用场景的不同而不同。可以通过调整第二阈值来筛选出候选发送节点集合中分发树高度次优的候选发送节点重新作为最终的第一子流提供节点。同理,在第一请求节点接收该第二子流的过程中第二子流传输中断的 情况下,可以通过上述调整流分发树中第一子流的发送节点的方式,来调整流分发树中第二子流的发送节点。Specifically, the first request node will select the second candidate sending node in the set of candidate sending nodes as the new first substream providing node, and send a first substream re-request to the second candidate sending node, the first substream The flow re-request is used to request the second candidate sending node to send the first sub-flow, and the first sub-flow re-request includes the remaining bandwidth information of the first requesting node, because the second candidate sending node may receive multiple requesting nodes at the same time The substream re-requests. At this time, the second candidate sending node needs to select one or more requesting nodes to send the substream according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node is used for the second candidate sending node to determine The first requesting node. Wherein, the above-mentioned second candidate sending node is a candidate sending node whose distribution tree height is less than the second threshold and not less than the above-mentioned first threshold, and the second threshold is similar to the above-mentioned first threshold, and is not a fixed value. It varies from person to person. Candidate sending nodes whose distribution tree height is suboptimal in the set of candidate sending nodes may be screened out by adjusting the second threshold as the final first substream providing node. Similarly, when the transmission of the second sub-stream is interrupted while the first requesting node is receiving the second sub-stream, the stream distribution tree can be adjusted by adjusting the sending node of the first sub-stream in the stream distribution tree as described above The sending node of the second substream in .
本申请实施例通过节点的分发树高度信息从候选发送节点集合中选择一个次优的候选发送节点作为子流发送节点,并向其发送子流重请求,用于继续获取中断的子流。通过上述方法,可以使最终选择的子流提供节点效果最佳,最大程度上减小对流传输网络中的上行节点的数据传输压力,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,大大提高流传输网络中数据传输的效率。In this embodiment of the present application, a suboptimal candidate sending node is selected from the set of candidate sending nodes as a substream sending node through the node's distribution tree height information, and a substream re-request is sent to it to continue to obtain the interrupted substream. Through the above method, the effect of the final selected substream provider node can be optimized, the data transmission pressure on the upstream nodes in the streaming transmission network can be reduced to the greatest extent, and the upstream bandwidth of each node in the mobile distributed streaming network environment can be fully matched. , so that the load of the data sending node is more balanced, and the efficiency of data transmission in the streaming network is greatly improved.
进一步地,上述在第一请求节点接收第一子流的过程中第一子流传输中断的情况下,第一请求节点除了向上述候选发送节点集合中选择次优的候选发送节点作为新的第一子流提供节点之外,还将利用同步组机制主动拉取子流数据。下面将以第一子流传输中断为例,提供一种同步组机制拉取流数据的可能的实施方式。Further, in the above-mentioned case where the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream by the first requesting node, the first requesting node selects the second-best candidate sending node from the above-mentioned set of candidate sending nodes as the new second sub-stream In addition to a sub-stream providing node, the synchronization group mechanism will also be used to actively pull sub-stream data. The following will take the first sub-stream transmission interruption as an example to provide a possible implementation manner in which the synchronization group mechanism pulls stream data.
具体的,若子流中断的数量大于冗余子流数量,第一请求节点将向同步组中的节点主动拉取该第一子流中所需的数据块,直至第一请求节点重新定位到新的第一子流提供节点。其中,该同步组中的节点为在传输过程中与该第一请求节点处于同一起始位置的节点,即同步组中的节点与第一请求节点的数据接收进程处于同步的状态。同理,在该第一请求节点接收第二子流的过程中第二子流传输中断的情况下,若子流中断的数量大于冗余子流数量,第一请求节点将向同步组中的节点主动拉取该第二子流中所需的数据块,直至第一请求节点重新定位到新的第二子流提供节点。Specifically, if the number of interrupted sub-flows is greater than the number of redundant sub-flows, the first requesting node will actively pull the required data blocks in the first sub-flow from the nodes in the synchronization group until the first requesting node relocates to the new The first substream of provides nodes. Wherein, the nodes in the synchronization group are nodes at the same starting position as the first requesting node during the transmission process, that is, the nodes in the synchronization group and the data receiving process of the first requesting node are in a state of synchronization. Similarly, in the case that the transmission of the second sub-stream is interrupted during the process of receiving the second sub-stream by the first requesting node, if the number of interrupted sub-streams is greater than the number of redundant sub-streams, the first requesting node will send a request to the nodes in the synchronization group The required data blocks in the second sub-stream are actively pulled until the first requesting node is relocated to a new second sub-stream providing node.
请参阅图6,图6为本申请实施例提供的一种同步组机制的效果示意图。可结合图6对上述同步组机制拉取流数据的实施方式做进一步说明。如图6所示,以节点m表示上述第一请求节点为例进行说明,可以使用同步组节点集合SY s,m来表示与节点m在流媒体s的传输过程中处于同一起始位置的节点,同步组节点集合SY s,m中的节点与节点m的数据接收进程处于同步的状态,意味着在节点m的数据传输中断的紧急状态下,可以向同步组节点集合SY s,m中的节点发送请求,以主动拉取节点m所需的数据块。具体的,可以通过同步组机制来确定上述同步组节点集合SY s,m,即使用同步块集合K m来判断其他节点是否与节点m处于同步状态。对于新加入流传输分发网络的节点m而言,节点m把从流媒体s中的检查点之后的连续两个文件块中的所有数据块加入同步块集合K m中,如图6所示,检查点为数据块5,其后的连续两个文件块(第二文件块和第三文件块)中的所有数据块(数据块6至数据块15)均加入同步块集合K m。如果
Figure PCTCN2021097487-appb-000019
表示节点n与节点m几乎于同一时间开始接收数据,即节点n与节点m为在流媒体s的传输过程中处于同一起始位置的节点,将节点n加入上述同步组节点集合SY s,m。当节点m丢失某条子流时,它会从上述同步组节点集合SY s,m中选择与自己同步块交集最多的节点x发送紧急请求。其中,节点x需满足{x|max{K m∩K x}},紧急请求用于请求断线子流断点之后的σ个数据块,σ为系统参数,不是一个固定的值,可以根据应用场景的不同而不同。在利用同步组机制拉取流数据的同时,第一请求节点(节点m)还需要寻找新的断线子流的提供节点。在接收完σ个数据块之后,如果第一请求节点(节点m)还没有成功找到新的提供节点,则继续发送紧急请求,直至连接到新的子流提供节点,在找到新的子流提供节点之后,停止同步组拉取流数据。 此外,为了保证同步组的实时性和可靠性,每个节点会周期性的对同步组节点集合SY s,m中的节点进行检测,如果
Figure PCTCN2021097487-appb-000020
则将节点n从同步组节点集合SY s,m中删除;反之,如果
Figure PCTCN2021097487-appb-000021
则将节点n加入上述同步组节点集合SY s,m
Please refer to FIG. 6 . FIG. 6 is a schematic diagram of an effect of a synchronization group mechanism provided by an embodiment of the present application. The above-mentioned implementation manner of pulling streaming data by the synchronization group mechanism can be further described in conjunction with FIG. 6 . As shown in Figure 6, take the node m representing the above-mentioned first requesting node as an example for illustration, the synchronization group node set SY s,m can be used to represent the node at the same initial position as node m in the transmission process of streaming media s , the nodes in the synchronization group node set SY s,m are in a state of synchronizing with the data receiving process of node m, which means that in the emergency state where the data transmission of node m is interrupted, the nodes in the synchronization group node set SY s,m can send The node sends a request to actively pull the data blocks required by node m. Specifically, the synchronization group node set SY s,m may be determined through the synchronization group mechanism, that is, the synchronization block set K m is used to determine whether other nodes are in a synchronization state with node m. For a node m that newly joins the streaming distribution network, the node m adds all the data blocks in the two consecutive file blocks after the checkpoint in the streaming media s to the synchronization block set K m , as shown in Figure 6, The checkpoint is data block 5, and all data blocks (data block 6 to data block 15) in the subsequent two consecutive file blocks (second file block and third file block) are added to the synchronization block set K m . if
Figure PCTCN2021097487-appb-000019
Indicates that node n and node m start to receive data almost at the same time, that is, node n and node m are nodes at the same starting position during the transmission of streaming media s, and node n is added to the above synchronization group node set SY s,m . When node m loses a certain substream, it will select the node x which has the most intersection with its own synchronization block from the above synchronization group node set SY s,m to send an emergency request. Among them, node x needs to satisfy {x|max{K m ∩K x }}, and the emergency request is used to request σ data blocks after the disconnection sub-flow breakpoint. σ is a system parameter, which is not a fixed value, and can be determined according to Different application scenarios vary. While using the synchronization group mechanism to pull stream data, the first requesting node (node m) also needs to find a new provider node of the disconnected sub-stream. After receiving σ data blocks, if the first request node (node m) has not successfully found a new provider node, it will continue to send emergency requests until it is connected to a new sub-stream provider node. After finding a new sub-stream provider After the node, stop the sync group from pulling streaming data. In addition, in order to ensure the real-time and reliability of the synchronization group, each node will periodically detect the nodes in the synchronization group node set SY s,m , if
Figure PCTCN2021097487-appb-000020
Then delete node n from the synchronization group node set SY s,m ; otherwise, if
Figure PCTCN2021097487-appb-000021
Then add node n to the above-mentioned synchronization group node set SY s,m .
本申请实施例中的同步组机制,保证了断线节点可以快速的从同步组节点主动拉取急需的数据块,使得断线节点可以更加平滑地度过寻找新的子流提供节点的这一过程,提高了流媒体文件传输的流畅性。The synchronization group mechanism in the embodiment of this application ensures that disconnected nodes can actively pull urgently needed data blocks from the synchronization group nodes quickly, so that disconnected nodes can spend the time of finding new substream providing nodes more smoothly. The process improves the smoothness of streaming media file transmission.
在一种可能的实施方式中,确定第一子流的发送节点为第一发送节点以及第二子流的发送节点为第二发送节点之后,向该第一发送节点发送第一子流请求,用于请求第一发送节点发送第一子流,向该第二发送节点发送第二子流请求,用于请求第二发送节点发送第二子流。该第一发送节点接受该第一子流请求并向第一请求节点发送第一子流,该第二发送节点接受该第二子流请求并向第一请求节点发送第二子流。在第一请求节点接收第一子流和第二子流的过程中,若第一子流的第一传输速度远小于第二子流的第二传输速度,即第一传输速度与第二传输速度的差值大于目标阈值,第一请求节点将主动中断与第一发送节点的第一子流的传输,并向上述候选发送节点集合中选择次优的候选发送节点作为新的第一子流提供节点。In a possible implementation manner, after determining that the sending node of the first substream is the first sending node and that the sending node of the second substream is the second sending node, the first substream request is sent to the first sending node, It is used to request the first sending node to send the first substream, and to send the second substream request to the second sending node, and is used to request the second sending node to send the second substream. The first sending node accepts the first substream request and sends the first substream to the first requesting node, and the second sending node accepts the second substream request and sends the second substream to the first requesting node. During the process of receiving the first substream and the second substream at the first requesting node, if the first transmission speed of the first substream is much lower than the second transmission speed of the second substream, that is, the first transmission speed and the second transmission speed If the speed difference is greater than the target threshold, the first requesting node will actively interrupt the transmission of the first sub-flow with the first sending node, and select the suboptimal candidate sending node from the above-mentioned set of candidate sending nodes as the new first sub-flow Provide a node.
具体的,由于提供子流的设备的性能或网络状态不同而导致不同子流发送时间的差距,该差距即表示上述第一传输速度与第二传输速度的差距。可以通过比较接收任意两条子流的数据块索引的差距来判断上述第一传输速度和第二传输速度之间的差距,即接收某条流的任意两条子流最新收到的数据块索引差距过大时,表示该两条子流的传输进度不同,整个流传输过程必然会受限于最慢的那条子流。具体实施方式为,第一请求节点在τ时间内收到多条子流的数据块,第一请求节点将对这些子流的数据块索引值进行比较,得到索引值之间的最大差值α。如果该差值α>ρ*N s,则表示提供索引值较小的数据块的子流传输速度远慢于其他子流,该条子流将影响整个流传输的性能,需要更换该子流的提供节点。其中,τ、ρ为系统参数,不是一个固定的值,可以根据应用场景的不同而不同。综上可知,判断两条子流的传输速度差距过大需符合以下条件: Specifically, the difference in sending time of different sub-streams is caused by different performances of devices providing the sub-streams or different network states, and the difference means the difference between the above-mentioned first transmission speed and the second transmission speed. The difference between the above-mentioned first transmission speed and the second transmission speed can be judged by comparing the difference between the data block indexes received by any two sub-flows, that is, the difference between the latest received data block indexes of any two sub-flows receiving a certain flow is too large. When it is large, it means that the transmission progress of the two sub-streams is different, and the entire stream transmission process must be limited to the slowest sub-stream. The specific implementation is that, when the first requesting node receives data blocks of multiple sub-streams within τ time, the first requesting node will compare the data block index values of these sub-streams to obtain the maximum difference α between the index values. If the difference α>ρ*N s , it means that the transmission speed of the substream that provides data blocks with smaller index values is much slower than other substreams, this substream will affect the performance of the entire stream transmission, and the substream needs to be replaced Provide a node. Among them, τ and ρ are system parameters, which are not fixed values and may vary according to different application scenarios. To sum up, it can be seen that the following conditions must be met to judge that the transmission speed gap between two sub-streams is too large:
Figure PCTCN2021097487-appb-000022
Figure PCTCN2021097487-appb-000022
该条件表明原始流s的第i条子流的传输速度要远快于第j条子流,整个流传输过程将受限于子流j的传输,需采取调整子流j的提供节点的策略。由于该子流j的传输采取的是推流的方式,故首先第一请求节点需向子流j的提供节点发送中断信号,停止子流j的传输,并将子流j的提供节点从候选发送节点集合
Figure PCTCN2021097487-appb-000023
中删除,重新寻找子流j的提供节点。以上述子流j作为上述第一子流为例进行说明,具体实施方式为,第一请求节点将选择候选发送节点集合
Figure PCTCN2021097487-appb-000024
中的第二候选发送节点作为新的第一子流提供节点,并向该第二候选发送节点发送第一子流重请求,该第一子流重请求用于请求第二候选发送节点发送第一子流,该第一子流重请求包含了第一请求节点的剩余带宽信息,因为第二候选发送节点可能同时收到多个请求节点的子流重请求,此时第二候选发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个请求节点发送子流,故该第一请求节点的剩余带宽信息用于第二候选发送节点确定第一请求节点。其中,上述第二候选发送节点为分发树高度小于第二阈值且 不小于上述第一阈值的候选发送节点。上述目标阈值、第二阈值同上述第一阈值类似,不是一个固定的值,可以根据应用场景的不同而不同。可以通过调整第二阈值来筛选出候选发送节点集合中分发树高度次优的候选发送节点重新作为最终的第一子流提供节点。同理,在第一请求节点接收第一子流和第二子流的过程中,若第二子流的第二传输速度远小于第一子流的第一传输速度,可以通过上述调整流分发树中第一子流的发送节点的方式,来调整流分发树中第二子流的发送节点。
This condition indicates that the transmission speed of the i-th sub-flow of the original flow s is much faster than that of the j-th sub-flow, the entire flow transmission process will be limited by the transmission of sub-flow j, and a strategy of adjusting the provider node of sub-flow j is required. Since the transmission of sub-stream j is in the form of streaming, firstly, the first requesting node needs to send an interrupt signal to the providing node of sub-stream j to stop the transmission of sub-stream j, and transfer the providing node of sub-stream j from the candidate sending node set
Figure PCTCN2021097487-appb-000023
delete, and re-find the providing node of substream j. Taking the above-mentioned sub-flow j as the above-mentioned first sub-flow as an example for description, the specific implementation method is that the first requesting node will select a set of candidate sending nodes
Figure PCTCN2021097487-appb-000024
The second candidate sending node in the network serves as a new first substream providing node, and sends a first substream re-request to the second candidate sending node, and the first substream re-request is used to request the second candidate sending node to send the first substream re-request. A sub-flow, the first sub-flow re-request contains the remaining bandwidth information of the first requesting node, because the second candidate sending node may receive sub-flow re-requests from multiple requesting nodes at the same time, at this time the second candidate sending node needs According to the remaining bandwidth information of the requesting node, one or more requesting nodes are preferentially selected to send the substream, so the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine the first requesting node. Wherein, the second candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the first threshold. The above-mentioned target threshold and the second threshold are similar to the above-mentioned first threshold, and are not a fixed value, and may be different according to different application scenarios. Candidate sending nodes whose distribution tree height is suboptimal in the set of candidate sending nodes may be screened out by adjusting the second threshold as the final first substream providing node. Similarly, when the first requesting node receives the first sub-stream and the second sub-stream, if the second transmission rate of the second sub-stream is much lower than the first transmission rate of the first sub-stream, the stream distribution can be adjusted through the above The sending node of the first sub-stream in the tree is used to adjust the sending node of the second sub-stream in the stream distribution tree.
请参阅图7,图7为本申请实施例提供的一种调整流传输节点的效果示意图。可结合图7对上述调整子流发送节点的可能的实施方式做进一步说明。如图7所示,第一请求节点在τ时间内接收到五条子流(第一子流A、第二子流B、第三子流C、第四子流D、第五子流E)的数据块,对这些数据块索引值进行比较,可以得到,第五子流E的数据块索引与其他四条子流的数据块索引差值较大,且第五子流E的数据块索引更小。表示第五子流E的传输速度要远慢于其他四条子流,第五子流E将影响整个流传输的性能,需要更换第五子流E的提供节点。根据上述调整流分发树中第一子流的发送节点的方式,来调整流分发树中第五子流E的发送节点。调整后可以看出,第一请求节点在τ时间内接收到五条子流(第一子流A、第二子流B、第三子流C、第四子流D、第六子流F)的数据块的索引值差距较小,传输速度差距也较小。此处为了表示第五子流E的提供节点发生了调整,故以第六子流F表示原第五子流E。Please refer to FIG. 7 . FIG. 7 is a schematic diagram of an effect of adjusting a streaming transmission node provided by an embodiment of the present application. A possible implementation manner of the foregoing adjustment substream sending node may be further described with reference to FIG. 7 . As shown in Figure 7, the first requesting node receives five sub-flows (the first sub-flow A, the second sub-flow B, the third sub-flow C, the fourth sub-flow D, and the fifth sub-flow E) within τ time By comparing these data block index values, it can be obtained that the difference between the data block index of the fifth sub-stream E and the data block indexes of the other four sub-streams is large, and the data block index of the fifth sub-stream E is more Small. It means that the transmission speed of the fifth sub-stream E is much slower than that of the other four sub-streams, the fifth sub-stream E will affect the transmission performance of the entire stream, and the providing node of the fifth sub-stream E needs to be replaced. According to the foregoing manner of adjusting the sending node of the first substream in the stream distribution tree, the sending node of the fifth substream E in the stream distribution tree is adjusted. After the adjustment, it can be seen that the first requesting node receives five sub-flows (the first sub-flow A, the second sub-flow B, the third sub-flow C, the fourth sub-flow D, and the sixth sub-flow F) within τ time The difference between the index values of the data blocks is small, and the difference in transmission speed is also small. Here, in order to indicate that the provision node of the fifth sub-stream E has been adjusted, the original fifth sub-stream E is represented by the sixth sub-stream F.
本申请实施例中的请求节点主动中断传输速度过慢的子流传输,并通过节点的分发树高度信息从候选发送节点集合中选择一个次优的候选发送节点作为新的子流发送节点,并向其发送子流重请求,用于继续获取待接收的子流。通过上述方法,可以使最终选择的子流提供节点效果最佳,最大程度上提高流传输网络中子流的传输速度,大大提高传输效率。In the embodiment of the present application, the requesting node actively interrupts the transmission of the substream whose transmission speed is too slow, and selects a suboptimal candidate sending node from the candidate sending node set as the new substream sending node through the distribution tree height information of the node, and Send a substream re-request to it to continue to obtain substreams to be received. Through the above method, the effect of the finally selected sub-stream providing node can be optimized, the transmission speed of the sub-stream in the streaming transmission network can be improved to the greatest extent, and the transmission efficiency can be greatly improved.
进一步地,在上述第一发送节点拒绝发送第一子流,或者,接收第一子流的过程中第一子流传输中断,或者,第一请求节点主动中断与第一发送节点的第一子流的传输的情况下,将第一候选发送节点从候选发送节点集合中删除,可以提高第一请求节点在后续流传输过程中定位子流提供节点的准确率及流传输效率。Further, when the above-mentioned first sending node refuses to send the first sub-stream, or the transmission of the first sub-stream is interrupted during the process of receiving the first sub-stream, or the first requesting node actively interrupts the first sub-stream with the first sending node In the case of stream transmission, deleting the first candidate sending node from the set of candidate sending nodes can improve the accuracy and stream transmission efficiency of the first requesting node in locating the sub-stream providing node during subsequent stream transmission.
在步骤302之后,第一请求节点对该第一子流和第二子流解码,得到原始流。After step 302, the first requesting node decodes the first substream and the second substream to obtain the original stream.
通过上述步骤302接收到第一子流和第二子流之后,第一请求节点对该第一子流和第二子流解码,得到原始流。本申请实施例通过将原始流划分为第一子流和第二子流,进而将整个移动分布式流传输过程拆分成第一子流和第二子流的传输过程,提高了整个传输网络的传输效率。After receiving the first substream and the second substream through the above step 302, the first requesting node decodes the first substream and the second substream to obtain the original stream. In this embodiment of the present application, by dividing the original stream into the first sub-stream and the second sub-stream, and then splitting the entire mobile distributed stream transmission process into the first sub-stream and the second sub-stream transmission process, the entire transmission network is improved. transmission efficiency.
目前的数据传输方法,通常采用基于分发树的方法进行去中心化的实时流媒体传输。将参与数据传输的各个节点结构化的组织成流媒体传输树,源节点将流媒体文件切分成若干个文件块,通过传输树上相应的子节点进行流传输。因此,对单个节点的上行带宽依赖程度较大,某个节点断开会导致该节点下的所有子节点的数据传输失败。The current data transmission method usually uses a distribution tree-based method for decentralized real-time streaming media transmission. Each node participating in data transmission is structured into a streaming media transmission tree, and the source node divides the streaming media file into several file blocks, and transmits the stream through the corresponding child nodes on the transmission tree. Therefore, the uplink bandwidth of a single node is highly dependent, and the disconnection of a certain node will cause data transmission failure of all child nodes under the node.
本申请实施例提供的数据传输方法,与目前的数据传输方法相比,采用将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。Compared with the current data transmission method, the data transmission method provided by the embodiment of the present application adopts the process of splitting the entire mobile distributed stream transmission process into multiple sub-stream distribution tree model transmissions, which can greatly reduce the number of convection transmission networks. The data transmission pressure of a single node in the network makes the load of the data sending node more balanced, fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, and makes the entire streaming network more robust and efficient.
请参阅图8,图8为本申请实施例提供的另一种数据传输方法的流程示意图,该方法包括但不限于如下步骤:Please refer to FIG. 8. FIG. 8 is a schematic flowchart of another data transmission method provided by the embodiment of the present application. The method includes but is not limited to the following steps:
步骤801:接收第一请求节点发送的第一子流请求或第二请求节点发送的第二子流请求。Step 801: Receive a first substream request sent by a first requesting node or a second substream request sent by a second requesting node.
本申请实施例中的节点是一个连接点,表示一个再分发点或一个通信端点,具体为一个连接到网络的有源电子设备。该电子设备搭载了可用于执行计算机执行指令的处理器,能够通过通信通道发送、接收或转发信息。具体的,在数据通信中,该电子设备可以是数据电路端接设备,如调制调节器、集线器或交换机等;也可以是数据终端设备,如计算机、手机或主机(例如路由器、工作站或服务器)等。此外,本申请实施例中的“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。A node in this embodiment of the present application is a connection point, which means a redistribution point or a communication endpoint, specifically an active electronic device connected to a network. The electronic device is equipped with a processor that can be used to execute computer-executable instructions, and can send, receive or forward information through a communication channel. Specifically, in data communication, the electronic device can be a data circuit termination device, such as a modulator, hub or switch, etc.; it can also be a data terminal device, such as a computer, mobile phone or host (such as a router, workstation or server) Wait. In addition, "first" and "second" in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order.
本申请实施例中,第一发送节点接收第一请求节点发送的第一子流请求和第二请求节点发送的第二子流请求。该第一发送节点为提供第一子流或第二子流的节点,该第一请求节点不同于第二请求节点。该第一子流请求用于请求第一发送节点发送第一子流,该第二请求节点用于请求第一发送节点发送第二子流。其中,上述第一请求节点发出的第一子流请求包含了第一请求节点的剩余带宽信息,上述第二请求节点发出的第二子流请求包含了第二请求节点的剩余带宽信息。因为发送节点可能同时收到多个请求节点的子流请求,此时发送节点需要根据请求节点的剩余带宽信息择优选择一个或多个请求节点发送子流,故该第一请求节点的剩余带宽信息和第二请求节点的剩余带宽信息用于第一发送节点确定第一请求节点或第二请求节点,使数据发送节点的负载更加均衡,提高了数据传输效率。In this embodiment of the present application, the first sending node receives the first substream request sent by the first request node and the second substream request sent by the second request node. The first sending node is a node that provides the first substream or the second substream, and the first requesting node is different from the second requesting node. The first substream request is used to request the first sending node to send the first substream, and the second request node is used to request the first sending node to send the second substream. Wherein, the first subflow request sent by the first requesting node includes remaining bandwidth information of the first requesting node, and the second subflow request sent by the second requesting node includes remaining bandwidth information of the second requesting node. Because the sending node may receive sub-stream requests from multiple requesting nodes at the same time, the sending node needs to select one or more requesting nodes to send sub-streams according to the remaining bandwidth information of the requesting node, so the remaining bandwidth information of the first requesting node and the remaining bandwidth information of the second requesting node are used by the first sending node to determine the first requesting node or the second requesting node, so that the load of the data sending node is more balanced, and the data transmission efficiency is improved.
在一种可能的实施方式中,第一子流和第二子流通过划分原始流得到,且该第一子流和第二子流不完全相同。本申请实施例将提供一种划分子流的可能的实施方式,其具体的实施过程已在上述步骤301中具体说明,此处不再赘述。In a possible implementation manner, the first substream and the second substream are obtained by dividing the original stream, and the first substream and the second substream are not completely the same. The embodiment of the present application will provide a possible implementation manner of dividing sub-streams, and its specific implementation process has been specifically described in the above step 301, and will not be repeated here.
在一种可能的实施方式中,在划分原始流得到第一子流和第二子流的前提下,还可以对第一子流和第二子流进行冗余编码,以提高子流传输的可靠性和稳定性。本申请实施例将提供一种子流冗余编码的可能的实施方式,其具体的实施过程已在上述步骤301中具体说明,此处不再赘述。In a possible implementation manner, on the premise that the original stream is divided to obtain the first sub-stream and the second sub-stream, redundant coding may also be performed on the first sub-stream and the second sub-stream, so as to improve the efficiency of sub-stream transmission. reliability and stability. The embodiment of the present application will provide a possible implementation manner of substream redundancy coding, and its specific implementation process has been described in the above step 301, and will not be repeated here.
在一种可能的实施方式中,在第一请求节点向第一发送节点发送第一子流请求之前,以及在第二请求节点向第一发送节点发送第二子流请求之前,第一发送节点会向第一请求节点以及第二请求节点发送第一发送节点的分发树高度信息。在流传输网络中可能存在多个拥有第一子流的潜在发送节点,第一请求节点以及第二请求节点需要根据上述潜在发送节点的分发树高度信息择优选择一个发送节点,向其发送第一子流请求进行第一子流传输,以及向其发送第二子流请求进行第二子流传输。因此,上述第一发送节点的分发树高度信息用于第一请求节点确定向第一发送节点发送第一子流请求,以及用于第二请求节点向第一发送节点发送第二子流请求,使数据发送节点的负载更加均衡,提高了数据传输效率。In a possible implementation manner, before the first requesting node sends the first substream request to the first sending node and before the second requesting node sends the second substream request to the first sending node, the first sending node The distribution tree height information of the first sending node will be sent to the first requesting node and the second requesting node. There may be multiple potential sending nodes owning the first substream in the streaming network. The first requesting node and the second requesting node need to select a sending node according to the distribution tree height information of the potential sending nodes, and send the first The substream requests the transmission of the first substream, and sends the second substream request thereto for the transmission of the second substream. Therefore, the distribution tree height information of the first sending node is used by the first requesting node to determine to send the first sub-stream request to the first sending node, and is used by the second requesting node to send the second sub-stream request to the first sending node, The load of the data sending node is more balanced, and the efficiency of data transmission is improved.
步骤802:向第一请求节点发送第一子流或向第二请求节点发送第二子流。Step 802: Send the first subflow to the first requesting node or send the second subflow to the second requesting node.
本步骤提供了一种第一发送节点发送子流的可能的实施方式。第一发送节点将根据子流传输信息和节点传输状态,向第一请求节点发送第一子流或向第二请求节点发送第二子流。This step provides a possible implementation manner in which the first sending node sends the substream. The first sending node will send the first substream to the first requesting node or send the second substream to the second requesting node according to the substream transmission information and the node transmission status.
具体为,在第一发送节点提供第一子流且剩余带宽高于第一子流的比特率的情况下,向第一请求节点发送第一子流;在第一发送节点提供第二子流且剩余带宽高于第二子流的比特率的情况下,向第二请求节点发送第二子流;在第一发送节点提供第一子流和第二子流,且剩余带宽高于第一子流和第二子流的比特率的情况下,向第一请求节点发送第一子流,和向第二请求节点发送第二子流。Specifically, when the first sending node provides the first sub-stream and the remaining bandwidth is higher than the bit rate of the first sub-stream, the first sub-stream is sent to the first requesting node; the second sub-stream is provided at the first sending node And when the remaining bandwidth is higher than the bit rate of the second sub-stream, send the second sub-stream to the second request node; provide the first sub-stream and the second sub-stream at the first sending node, and the remaining bandwidth is higher than the first sub-stream In the case of bit rates of the sub-stream and the second sub-stream, the first sub-stream is sent to the first requesting node, and the second sub-stream is sent to the second requesting node.
进一步地,在第一发送节点提供第一子流和第二子流,且剩余带宽高于第一子流和第二子流的比特率的情况下,第一发送节点将比较第一请求节点与第二请求节点的剩余带宽。若第一请求节点的剩余带宽大于第二请求节点的剩余带宽,先向第一请求节点发送第一子流;然后更新第一发送节点的剩余带宽;在第一发送节点更新后的剩余带宽高于第二子流的比特率的情况下,再向第二请求节点发送第二子流。同理,若第二请求节点的剩余带宽大于第一请求节点的剩余带宽,先向第二请求节点发送第二子流;然后更新第一发送节点的剩余带宽;在第一发送节点更新后的剩余带宽高于第一子流的比特率的情况下,再向第一请求节点发送第一子流。Further, when the first sending node provides the first sub-stream and the second sub-stream, and the remaining bandwidth is higher than the bit rate of the first sub-stream and the second sub-stream, the first sending node will compare the first requesting node The remaining bandwidth with the second requesting node. If the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node, first send the first substream to the first requesting node; then update the remaining bandwidth of the first sending node; the remaining bandwidth after the update of the first sending node is high In the case of the bit rate of the second sub-stream, the second sub-stream is then sent to the second requesting node. Similarly, if the remaining bandwidth of the second requesting node is greater than the remaining bandwidth of the first requesting node, first send the second substream to the second requesting node; then update the remaining bandwidth of the first sending node; after the update of the first sending node When the remaining bandwidth is higher than the bit rate of the first sub-stream, the first sub-stream is sent to the first requesting node.
本申请实施例结合第一发送节点的剩余带宽信息及其拥有的子流数据,择优向请求节点发送其所请求的子流,并且,结合各个请求节点的剩余带宽信息,择优对剩余带宽更高的请求节点发送其所请求的子流,可以最大程度上提高带宽利用率,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,使整个流传输网络的传输效率更高。In this embodiment of the present application, combined with the remaining bandwidth information of the first sending node and the sub-stream data it owns, the preferred sub-stream is sent to the requesting node, and, combined with the remaining bandwidth information of each requesting node, the preferred option has a higher residual bandwidth The request node sends its requested sub-stream, which can maximize the bandwidth utilization, fully match the uplink bandwidth of each node in the mobile distributed stream transmission network environment, make the load of the data sending node more balanced, and make the entire stream transmission The transmission efficiency of the network is higher.
请参阅图9,图9为本申请实施例提供的一种流传输网络的交互示意图,也可以理解为是上述图3和图8中的数据传输方法流程图的补充。Please refer to FIG. 9 . FIG. 9 is an interactive schematic diagram of a stream transmission network provided by an embodiment of the present application, and can also be understood as a supplement to the flow charts of the data transmission methods in FIGS. 3 and 8 above.
如图9所示,以第一请求节点、第一发送节点、第二发送节点、第二请求节点组成的流传输网络为例,对上述图3以及图8的数据传输方法进行补充说明。As shown in FIG. 9 , taking the stream transmission network composed of the first requesting node, the first sending node, the second sending node, and the second requesting node as an example, the data transmission methods in the above-mentioned FIG. 3 and FIG. 8 are supplemented.
本申请实施例中的节点是一个连接点,表示一个再分发点或一个通信端点,具体为一个连接到网络的有源电子设备。该电子设备搭载了可用于执行计算机执行指令的处理器,能够通过通信通道发送、接收或转发信息。具体的,在数据通信中,该电子设备可以是数据电路端接设备,如调制调节器、集线器或交换机等;也可以是数据终端设备,如计算机、手机或主机(例如路由器、工作站或服务器)等。此外,本申请实施例中的“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。A node in this embodiment of the present application is a connection point, which means a redistribution point or a communication endpoint, specifically an active electronic device connected to a network. The electronic device is equipped with a processor that can be used to execute computer-executable instructions, and can send, receive or forward information through a communication channel. Specifically, in data communication, the electronic device can be a data circuit termination device, such as a modulator, hub or switch, etc.; it can also be a data terminal device, such as a computer, mobile phone or host (such as a router, workstation or server) Wait. In addition, "first" and "second" in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order.
本申请实施例中,首先由源节点对原始流媒体文件进行处理,包括划分子流、冗余编码等。通过将原始流划分为多个子流,进而将整个移动分布式流传输过程拆分成多个子流传输的过程,可以使得整个传输网络的传输效率更高。并且,通过对文件块冗余编码,在文件块中加入冗余数据块,从而实现子流冗余编码的目的。新加入的冗余数据块可以得到相应的冗余子流,使得在流传输过程中,即使存在若干个子流传输掉线的情况,但只要掉线子流不超过冗余子流,依然可以根据接收到的子流,解码得到原始流,可以提高子流传输的可靠性和稳定性。之后,源节点向流传输网络中发布关于原始流的元数据,该元数据包括了子流的划分情况,但是不包括具体的流数据。In the embodiment of the present application, firstly, the source node processes the original streaming media file, including dividing sub-streams, redundant encoding, and the like. By dividing the original stream into multiple sub-streams, and then splitting the entire mobile distributed stream transmission process into multiple sub-stream transmission processes, the transmission efficiency of the entire transmission network can be improved. Moreover, by redundantly encoding the file blocks, redundant data blocks are added to the file blocks, thereby achieving the purpose of substream redundant encoding. The newly added redundant data blocks can get the corresponding redundant sub-streams, so that even if there are several sub-streams that are disconnected during the stream transmission process, as long as the dropped sub-streams do not exceed the redundant sub-streams, the The received sub-stream is decoded to obtain the original stream, which can improve the reliability and stability of sub-stream transmission. Afterwards, the source node publishes metadata about the original flow to the streaming network, the metadata includes the division of sub-streams, but does not include specific flow data.
流传输网络中的各个请求节点(如本申请实施例中的第一请求节点、第二请求节点)在收到源节点发布在流传输网络中的元数据之后,决定是否订阅该流。通过元数据确定能 提供子流的发送节点,并向该发送节点发起对子流的请求。比如,第一请求节点分别向同在流传输网络中的第一发送节点、第二发送节点、第二请求节点发送子流定位,确定能提供第一子流的发送节点以及能提供第二子流的发送节点;第二请求节点分别向同在流传输网络中的第一发送节点、第二发送节点、第一请求节点发送子流定位,确定能提供第一子流的发送节点以及能提供第二子流的发送节点。如此可以最大程度的提高子流定位的准确率及效率,从而提高整体流传输网络的传输效率。Each requesting node in the streaming network (such as the first requesting node and the second requesting node in the embodiment of the present application) decides whether to subscribe to the stream after receiving the metadata published by the source node in the streaming network. Determine the sending node that can provide the sub-stream through the metadata, and initiate a request for the sub-stream to the sending node. For example, the first requesting node sends substream positioning to the first sending node, the second sending node, and the second requesting node respectively in the stream transmission network, and determines the sending node that can provide the first substream and the second substream. The sending node of the stream; the second requesting node sends substream positioning to the first sending node, the second sending node, and the first requesting node respectively in the streaming network, and determines the sending node that can provide the first substream and the The sending node of the second substream. In this way, the accuracy and efficiency of sub-stream positioning can be improved to the greatest extent, thereby improving the transmission efficiency of the overall stream transmission network.
在经过子流定位后,第一请求节点和第二请求节点确定了第一发送节点能提供第一子流,以及第二发送节点能提供第二子流。第一请求节点向第一发送节点发送第一子流请求,请求第一发送节点发送第一子流,以及向第二发送节点发送第二子流请求,请求第二发送节点发送第二子流。同样的,第二请求节点向第一发送节点发送第一子流请求,请求第一发送节点发送第一子流,以及向第二发送节点发送第二子流请求,请求第二发送节点发送第二子流。After substream positioning, the first requesting node and the second requesting node determine that the first sending node can provide the first substream, and the second sending node can provide the second substream. The first request node sends a first substream request to the first sending node, requests the first sending node to send the first substream, and sends a second substream request to the second sending node, requests the second sending node to send the second substream . Similarly, the second requesting node sends a first sub-stream request to the first sending node, requests the first sending node to send the first sub-stream, and sends a second sub-stream request to the second sending node, requests the second sending node to send the first sub-stream Two sons flow.
第一发送节点接收到第一请求节点发送的第一子流请求以及第二请求节点发送的第一子流请求之后,响应该请求,分别向第一请求节点发送第一子流以及向第二请求节点发送第一子流。具体的,此处第一发送节点将比较第一请求节点与第二请求节点的剩余带宽,若第一请求节点的剩余带宽大于第二请求节点的剩余带宽,第一发送节点将优先向第一请求节点发送第一子流;然后更新第一发送节点的剩余带宽;在第一发送节点更新后的剩余带宽高于第一子流的比特率的情况下,再向第二请求节点发送第一子流。同样的,第二发送节点接收到第一请求节点发送的第二子流请求以及第二请求节点发送的第二子流请求之后,响应该请求,通过比较第一请求节点与第二请求节点的剩余带宽,择优分别向第一请求节点发送第二子流以及向第二请求节点发送第二子流。如此可以最大程度上提高带宽利用率,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使数据发送节点的负载更加均衡,使整个流传输网络的传输效率更高。After the first sending node receives the first sub-stream request sent by the first requesting node and the first sub-stream request sent by the second requesting node, in response to the request, it sends the first sub-stream to the first requesting node and the second sub-stream to the second requesting node respectively. The requesting node sends the first sub-flow. Specifically, here the first sending node will compare the remaining bandwidth of the first requesting node and the second requesting node, if the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node, the first sending node will give priority to the first requesting node The requesting node sends the first sub-stream; then updates the remaining bandwidth of the first sending node; when the updated remaining bandwidth of the first sending node is higher than the bit rate of the first sub-stream, then sends the first sub-stream to the second requesting node Substream. Similarly, after the second sending node receives the second substream request sent by the first requesting node and the second substreaming request sent by the second requesting node, it responds to the request by comparing the The remaining bandwidth is selected to send the second sub-flow to the first requesting node and send the second sub-flow to the second requesting node respectively. In this way, the bandwidth utilization rate can be improved to the greatest extent, and the uplink bandwidth of each node in the mobile distributed streaming network environment can be fully matched, so that the load of the data sending node is more balanced, and the transmission efficiency of the entire streaming transmission network is higher.
需要注意的是,在流传输过程中,节点频繁退出或加入的问题时有发生,在本申请实施例中,在第一发送节点因节点性能或网络状态等原因下线的情况下,其与第一请求节点、第二请求节点之间的第一子流传输中断。此时,第一请求节点和第二请求节点可以使用同步组机制向同步组节点主动拉取第一子流所需的数据块,直至第一请求节点和第二请求节点重新定位到新的第一子流提供节点。本申请实施例中的同步组机制,保证了断线节点可以快速的从同步组节点主动拉取急需的数据块,使得断线节点可以更加平滑地度过寻找新的子流提供节点的这一过程,提高了流媒体文件传输的流畅性以及传输效率。It should be noted that in the process of streaming, the problem of frequently exiting or joining nodes occurs from time to time. In the embodiment of this application, when the first sending node goes offline due to node performance or network status, etc., it and The transmission of the first substream between the first requesting node and the second requesting node is interrupted. At this time, the first requesting node and the second requesting node can use the synchronization group mechanism to actively pull the data blocks required by the first substream from the synchronization group node until the first requesting node and the second requesting node relocate to the new A substream provides nodes. The synchronization group mechanism in the embodiment of this application ensures that disconnected nodes can actively pull urgently needed data blocks from the synchronization group nodes quickly, so that disconnected nodes can spend the time of finding new substream providing nodes more smoothly. The process improves the smoothness and efficiency of streaming media file transmission.
第一请求节点和第二请求节点在接收到第一子流和第二子流之后,对第一子流和第二子流解码,可得到原始流。本申请实施例通过将原始流划分为第一子流和第二子流,进而将整个移动分布式流传输过程拆分成第一子流和第二子流的传输过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。After receiving the first substream and the second substream, the first requesting node and the second requesting node decode the first substream and the second substream to obtain the original stream. In this embodiment of the present application, by dividing the original stream into the first sub-stream and the second sub-stream, and then splitting the entire mobile distributed stream transmission process into the first sub-stream and the second sub-stream transmission process, it can largely Reduce the data transmission pressure on a single node in the stream transmission network, make the load of the data sending node more balanced, fully match the uplink bandwidth of each node in the mobile distributed stream transmission network environment, and make the entire stream transmission network indestructible and transmission efficient higher.
上述详细阐述了本申请实施例的方法,下面提供本申请实施例的装置。The method of the embodiment of the present application has been described in detail above, and the device of the embodiment of the present application is provided below.
请参阅图10,图10为本申请实施例提供的一种数据传输装置的结构示意图,该数据 传输装置100可以包括发送单元1001以及接收单元1002,其中,各个单元的描述如下:Please refer to Figure 10, Figure 10 is a schematic structural diagram of a data transmission device provided in the embodiment of the present application, the data transmission device 100 may include a sending unit 1001 and a receiving unit 1002, wherein the description of each unit is as follows:
发送单元1001,用于向第一发送节点发送第一请求;a sending unit 1001, configured to send a first request to a first sending node;
接收单元1002,用于接收所述第一发送节点响应于所述第一请求发送的第一子流;a receiving unit 1002, configured to receive the first substream sent by the first sending node in response to the first request;
所述发送单元1001,还用于向第二发送节点发送第二请求;The sending unit 1001 is further configured to send a second request to a second sending node;
所述接收单元1002,还用于接收所述第二发送节点响应于所述第二请求发送的第二子流;所述第一发送节点不同于所述第二发送节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同。The receiving unit 1002 is further configured to receive a second substream sent by the second sending node in response to the second request; the first sending node is different from the second sending node; the first substream Both the stream and the second sub-stream are composed of data blocks in the original stream, and the first sub-stream is different from the second sub-stream.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
解码单元1003,用于对所述第一子流和所述第二子流解码,得到所述原始流。The decoding unit 1003 is configured to decode the first substream and the second substream to obtain the original stream.
在一种可能的实施方式中,所述原始流包括第一文件块和第二文件块,所述第一子流包括所述第一文件块中的至少一个数据块和所述第二文件块中的至少一个数据块,所述第二子流包括所述第一文件块中的至少一个数据块和所述第二文件块中的至少一个数据块。In a possible implementation manner, the original stream includes a first file block and a second file block, and the first sub-stream includes at least one data block in the first file block and the second file block At least one data block in the second substream includes at least one data block in the first file block and at least one data block in the second file block.
在一种可能的实施方式中,所述第一文件块中的数据块为所述原始流中的数据块,或对所述第一文件块冗余编码得到的数据块;所述第二文件块中的数据块为所述原始流中的数据块,或对所述第二文件块冗余编码得到的数据块。In a possible implementation manner, the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block; the second file The data blocks in the blocks are the data blocks in the original stream, or the data blocks obtained by redundantly encoding the second file blocks.
在一种可能的实施方式中,所述第一文件块的大小由所述原始流中的数据块类型和数据块大小确定,所述第二文件块的大小由所述原始流中的数据块类型和数据块大小确定。In a possible implementation manner, the size of the first file block is determined by the data block type and the data block size in the original stream, and the size of the second file block is determined by the data block in the original stream The type and block size are determined.
在一种可能的实施方式中,所述第一请求包括所述数据传输装置的剩余带宽信息,所述第二请求包括所述数据传输装置的剩余带宽信息;所述数据传输装置的剩余带宽信息用于所述第一发送节点确定是否发送所述第一子流,或用于所述第二发送节点确定是否发送所述第二子流。In a possible implementation manner, the first request includes remaining bandwidth information of the data transmission device, and the second request includes remaining bandwidth information of the data transmission device; the remaining bandwidth information of the data transmission device Used by the first sending node to determine whether to send the first sub-stream, or used by the second sending node to determine whether to send the second sub-stream.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
所述接收单元1002,用于获取所述原始流的元数据,所述元数据用于确定所述第一子流包括的数据块;The receiving unit 1002 is configured to acquire metadata of the original stream, where the metadata is used to determine the data blocks included in the first sub-stream;
确定单元1004,用于基于所述元数据,确定所述第一发送节点。The determining unit 1004 is configured to determine the first sending node based on the metadata.
在一种可能的实施方式中,所述确定单元1004,具体用于基于所述元数据,确定候选发送节点集合;所述候选发送节点集合包含拥有所述第一子流的候选发送节点;In a possible implementation manner, the determining unit 1004 is specifically configured to determine a set of candidate sending nodes based on the metadata; the set of candidate sending nodes includes candidate sending nodes owning the first substream;
所述确定单元1004,具体还用于将所述候选发送节点集合中的第一候选发送节点确定为所述第一发送节点;所述第一候选发送节点为分发树高度小于第一阈值的候选发送节点。The determining unit 1004 is further configured to determine a first candidate sending node in the set of candidate sending nodes as the first sending node; the first candidate sending node is a candidate whose distribution tree height is smaller than a first threshold sending node.
在一种可能的实施方式中,所述接收单元1002,还用于接收所述第一发送节点发送的分发树高度信息,所述第一发送节点的分发树高度信息用于所述数据传输装置确定所述第一发送节点。In a possible implementation manner, the receiving unit 1002 is further configured to receive the distribution tree height information sent by the first sending node, and the distribution tree height information of the first sending node is used by the data transmission device Determine the first sending node.
在一种可能的实施方式中,所述确定单元1004,具体还用于在两个或两个以上候选发送节点的分发树高度相同且小于所述第一阈值的情况下,将剩余带宽最高的候选发送节点确定为所述第一发送节点。In a possible implementation manner, the determining unit 1004 is further configured to, in the case that the heights of the distribution trees of two or more candidate sending nodes are the same and less than the first threshold, select the one with the highest remaining bandwidth The candidate sending node is determined as the first sending node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
查询单元1005,用于基于所述元数据,查询邻居节点或网络节点;所述邻居节点为与所述第一请求节点传输频率超过频率阈值的节点;A query unit 1005, configured to query a neighbor node or a network node based on the metadata; the neighbor node is a node whose transmission frequency with the first requesting node exceeds a frequency threshold;
所述确定单元1004,具体还用于将拥有所述第一子流的所述邻居节点加入所述候选发送节点集合,将拥有所述第一子流的所述网络节点加入所述候选发送节点集合。The determining unit 1004 is further configured to add the neighbor node owning the first subflow to the candidate sending node set, and add the network node owning the first subflow to the candidate sending node gather.
在一种可能的实施方式中,所述发送单元1001,还用于在所述第一发送节点对所述第一请求的响应不满足预设条件的情况下,向所述候选发送节点集合中的第二候选发送节点发送第三请求;所述第二候选发送节点为分发树高度小于第二阈值且不小于所述第一阈值的候选发送节点,所述第三请求用于请求所述第二候选发送节点发送所述第一子流。In a possible implementation manner, the sending unit 1001 is further configured to, when the response of the first sending node to the first request does not meet the preset condition, send The second candidate sending node sends a third request; the second candidate sending node is a candidate sending node whose distribution tree height is less than the second threshold and not less than the first threshold, and the third request is used to request the first The second candidate sending node sends the first substream.
在一种可能的实施方式中,所述发送单元1001,具体用于在所述第一发送节点在预设时间内未发送所述第一子流的情况下,向所述第二候选发送节点发送所述第三请求;或者,In a possible implementation manner, the sending unit 1001 is specifically configured to, when the first sending node does not send the first substream within a preset time, send the second candidate sending node sending said third request; or,
所述发送单元1001,具体还用于在接收所述第一子流的过程中所述第一子流传输中断的情况下,向所述第二候选发送节点发送所述第三请求;或者,The sending unit 1001 is specifically further configured to send the third request to the second candidate sending node when the transmission of the first substream is interrupted during the process of receiving the first substream; or,
所述发送单元1001,具体还用于在接收所述第一子流的过程中,所述第一子流的第一传输速度小于预设阈值的情况下,向所述第二候选发送节点发送所述第三请求;或者,The sending unit 1001 is further configured to, in the process of receiving the first sub-stream, if the first transmission speed of the first sub-stream is lower than a preset threshold, send to the second candidate sending node said third request; or,
所述发送单元1001,具体还用于在接收所述第一子流和所述第二子流的过程中,所述第一子流的第一传输速度与所述第二子流的第二传输速度的差值大于目标阈值,且所述第一传输速度小于所述第二传输速度的情况下,向所述第二候选发送节点发送所述第三请求。The sending unit 1001 is specifically further configured to, during the process of receiving the first substream and the second substream, the first transmission speed of the first substream and the second transmission speed of the second substream When the difference in transmission speed is greater than the target threshold and the first transmission speed is lower than the second transmission speed, sending the third request to the second candidate sending node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
拉取单元1006,用于在子流中断的数量大于冗余子流数量的情况下,向同步组中的节点拉取所述第一子流中所需的数据块;所述同步组中的节点为在传输过程中与所述第一请求节点处于同一起始位置的节点。Pulling unit 1006, configured to pull the required data blocks in the first sub-stream from the nodes in the synchronization group when the number of sub-stream interruptions is greater than the number of redundant sub-streams; The node is a node at the same starting position as the first requesting node during the transmission process.
在一种可能的实施方式中,所述第三请求包括所述第一请求节点的剩余带宽信息,所述第一请求节点的剩余带宽信息用于所述第二候选发送节点确定所述第一请求节点。In a possible implementation manner, the third request includes remaining bandwidth information of the first requesting node, and the remaining bandwidth information of the first requesting node is used by the second candidate sending node to determine the first request node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
删除单元1007,用于将所述第一候选发送节点从所述候选发送节点集合中删除。A deleting unit 1007, configured to delete the first candidate sending node from the set of candidate sending nodes.
根据本申请实施例,图10所示的装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,基于网络设备也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。According to the embodiment of the present application, each unit in the device shown in Fig. 10 can be respectively or all combined into one or several other units to form, or one (some) units can be further divided into functionally more It is composed of multiple small units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the network-based device may also include other units. In practical applications, these functions may also be assisted by other units, and may be implemented cooperatively by multiple units.
需要说明的是,各个单元的实现还可以对应参照上述图3所示的方法实施例的相应描述。It should be noted that, for the implementation of each unit, reference may also be made to the corresponding description of the method embodiment shown in FIG. 3 above.
关于本申请实施例中的任一项可能的实施方式所带来的技术效果,可参考对应于发明内容中第一方面以及相应的实施方式的技术效果的介绍。Regarding the technical effect brought about by any possible implementation in the embodiments of the present application, reference may be made to the introduction corresponding to the first aspect in the summary of the invention and the technical effect of the corresponding implementation.
在图10所描述的数据传输装置100中,采用将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。In the data transmission device 100 described in FIG. 10, the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree model transmissions can greatly reduce the data transmission pressure on a single node in the streaming transmission network. , so that the load of the data sending node is more balanced, and fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, so that the indestructibility and transmission efficiency of the entire streaming network are higher.
请参阅图11,图11为本申请实施例提供的一种数据传输装置的结构示意图,该数据传输装置110可以包括接收单元1101以及发送单元1102,其中,各个单元的描述如下:Please refer to FIG. 11. FIG. 11 is a schematic structural diagram of a data transmission device provided by an embodiment of the present application. The data transmission device 110 may include a receiving unit 1101 and a sending unit 1102, where each unit is described as follows:
接收单元1101,用于接收第一请求节点发送的第一请求或第二请求节点发送的第二请求;所述第一请求用于请求向所述第一请求节点发送第一子流,所述第二请求用于请求向所述第二请求节点发送第二子流;所述第一请求节点不同于所述第二请求节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同;The receiving unit 1101 is configured to receive a first request sent by a first requesting node or a second request sent by a second requesting node; the first request is used to request to send a first substream to the first requesting node, the The second request is used to request to send a second sub-flow to the second requesting node; the first requesting node is different from the second requesting node; both the first sub-flow and the second sub-flow are created by the original consisting of data blocks in a stream, the first sub-stream being different from the second sub-stream;
发送单元1102,用于向所述第一请求节点发送所述第一子流或向所述第二请求节点发送所述第二子流。A sending unit 1102, configured to send the first subflow to the first requesting node or send the second subflow to the second requesting node.
在一种可能的实施方式中,所述原始流包括第一文件块和第二文件块,所述第一子流包括所述第一文件块中的至少一个数据块和所述第二文件块中的至少一个数据块,所述第二子流包括所述第一文件块中的至少一个数据块和所述第二文件块中的至少一个数据块。In a possible implementation manner, the original stream includes a first file block and a second file block, and the first sub-stream includes at least one data block in the first file block and the second file block At least one data block in the second substream includes at least one data block in the first file block and at least one data block in the second file block.
在一种可能的实施方式中,所述第一文件块中的数据块为所述原始流中的数据块,或对所述第一文件块冗余编码得到的数据块;所述第二文件块中的数据块为所述原始流中的数据块,或对所述第二文件块冗余编码得到的数据块。In a possible implementation manner, the data blocks in the first file block are data blocks in the original stream, or data blocks obtained by redundantly encoding the first file block; the second file The data blocks in the blocks are the data blocks in the original stream, or the data blocks obtained by redundantly encoding the second file blocks.
在一种可能的实施方式中,所述第一请求包括所述第一请求节点的剩余带宽信息,所述第二请求包括所述第二请求节点的剩余带宽信息;所述第一请求节点的剩余带宽信息和所述第二请求节点的剩余带宽信息用于所述数据传输装置确定是否发送所述第一子流或所述第二子流。In a possible implementation manner, the first request includes remaining bandwidth information of the first requesting node, the second request includes remaining bandwidth information of the second requesting node; The remaining bandwidth information and the remaining bandwidth information of the second requesting node are used by the data transmission device to determine whether to send the first sub-flow or the second sub-flow.
在一种可能的实施方式中,所述发送单元1102,还用于向所述第一请求节点发送所述数据传输装置的分发树高度信息,所述数据传输装置的分发树高度信息用于所述第一请求节点确定是否向所述数据传输装置发送所述第一请求。In a possible implementation manner, the sending unit 1102 is further configured to send the distribution tree height information of the data transmission device to the first request node, and the distribution tree height information of the data transmission device is used for the The first requesting node determines whether to send the first request to the data transmission device.
在一种可能的实施方式中,所述发送单元1102,具体用于在所述数据传输装置提供所述第一子流且所述数据传输装置的剩余带宽高于所述第一子流的比特率的情况下,向所述第一请求节点发送所述第一子流;或者,In a possible implementation manner, the sending unit 1102 is specifically configured to provide the first substream to the data transmission device and the remaining bandwidth of the data transmission device is higher than the bits of the first substream rate, sending the first sub-stream to the first requesting node; or,
所述发送单元1102,具体还用于在所述数据传输装置提供所述第二子流且所述数据传输装置的剩余带宽高于所述第二子流的比特率的情况下,向所述第二请求节点发送所述第二子流;或者,The sending unit 1102 is specifically further configured to send the second substream to the The second requesting node sends the second sub-stream; or,
所述发送单元1102,具体还用于在所述数据传输装置提供所述第一子流和所述第二子流,且所述数据传输装置的剩余带宽高于所述第一子流的比特率和所述第二子流的比特率之和的情况下,向所述第一请求节点发送所述第一子流,和向所述第二请求节点发送所述第二子流。The sending unit 1102 is further configured to provide the first sub-stream and the second sub-stream to the data transmission device, and the remaining bandwidth of the data transmission device is higher than the bits of the first sub-stream rate and the bit rate of the second sub-stream, sending the first sub-stream to the first requesting node, and sending the second sub-stream to the second requesting node.
在一种可能的实施方式中,该装置还包括:In a possible implementation manner, the device also includes:
所述发送单元1102,具体还用于在所述第一请求节点的剩余带宽大于所述第二请求节点的剩余带宽的情况下,向所述第一请求节点发送所述第一子流;The sending unit 1102 is specifically further configured to send the first substream to the first requesting node when the remaining bandwidth of the first requesting node is greater than the remaining bandwidth of the second requesting node;
更新单元1103,用于更新所述数据传输装置的剩余带宽;an updating unit 1103, configured to update the remaining bandwidth of the data transmission device;
所述发送单元1102,具体还用于在所述数据传输装置更新后的剩余带宽高于所述第二子流的比特率的情况下,向所述第二请求节点发送所述第二子流。The sending unit 1102 is specifically further configured to send the second substream to the second requesting node when the updated remaining bandwidth of the data transmission device is higher than the bit rate of the second substream .
根据本申请实施例,图11所示的装置中的各个单元可以分别或全部合并为一个或若干 个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,基于网络设备也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。According to the embodiment of the present application, each unit in the device shown in Fig. 11 can be respectively or all combined into one or several other units to form, or one (some) units can be further divided into functionally more It is composed of multiple small units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the network-based device may also include other units. In practical applications, these functions may also be assisted by other units, and may be implemented cooperatively by multiple units.
需要说明的是,各个单元的实现还可以对应参照上述图8所示的方法实施例的相应描述。It should be noted that, for the implementation of each unit, reference may also be made to the corresponding description of the method embodiment shown in FIG. 8 above.
关于本申请实施例中的任一项可能的实施方式所带来的技术效果,可参考对应于发明内容中第二方面以及相应的实施方式的技术效果的介绍。Regarding the technical effect brought about by any possible implementation in the embodiments of the present application, reference may be made to the introduction corresponding to the second aspect in the summary of the invention and the technical effect of the corresponding implementation.
在图11所描述的数据传输装置110中,采用将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。In the data transmission device 110 described in FIG. 11 , the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree model transmissions can greatly reduce the data transmission pressure on a single node in the streaming transmission network , so that the load of the data sending node is more balanced, and fully matches the uplink bandwidth of each node in the mobile distributed streaming network environment, so that the indestructibility and transmission efficiency of the entire streaming network are higher.
请参阅图12,图12为本申请实施例提供的一种电子设备120的结构示意图。该电子设备120可以包括存储器1201、处理器1202。进一步可选的,还可以包含通信接口1203以及总线1204,其中,存储器1201、处理器1202以及通信接口1203通过总线1204实现彼此之间的通信连接。通信接口1203用于与上述数据传输装置100或数据传输装置110进行数据交互。Please refer to FIG. 12 . FIG. 12 is a schematic structural diagram of an electronic device 120 provided by an embodiment of the present application. The electronic device 120 may include a memory 1201 and a processor 1202 . Further optionally, a communication interface 1203 and a bus 1204 may also be included, wherein the memory 1201 , the processor 1202 and the communication interface 1203 are connected to each other through the bus 1204 . The communication interface 1203 is used for data interaction with the above-mentioned data transmission device 100 or the data transmission device 110 .
其中,存储器1201用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器1201包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM)。Wherein, the memory 1201 is used to provide a storage space, in which data such as operating systems and computer programs can be stored. Memory 1201 includes, but is not limited to, random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or Portable read-only memory (compact disc read-only memory, CD-ROM).
处理器1202是进行算术运算和逻辑运算的模块,可以是中央处理器(central processing unit,CPU)、显卡处理器(graphics processing unit,GPU)或微处理器(microprocessor unit,MPU)等处理模块中的一种或者多种的组合。The processor 1202 is a module for performing arithmetic operations and logic operations, and may be in a processing module such as a central processing unit (central processing unit, CPU), a graphics processing unit (graphics processing unit, GPU) or a microprocessor (microprocessor unit, MPU). one or a combination of more.
存储器1201中存储有计算机程序,处理器1202调用存储器1201中存储的计算机程序,以执行上述图3所示的数据传输方法:A computer program is stored in the memory 1201, and the processor 1202 calls the computer program stored in the memory 1201 to execute the data transmission method shown in FIG. 3 above:
向第一发送节点发送第一子流请求;所述第一子流请求用于请求所述第一发送节点发送第一子流,所述第一子流包括原始流中的至少一个数据块;Sending a first substream request to the first sending node; the first substream request is used to request the first sending node to send a first substream, where the first substream includes at least one data block in the original stream;
向第二发送节点发送第二子流请求;所述第二子流请求用于请求所述第二发送节点发送第二子流,所述第二子流包括所述原始流中的至少一个数据块;所述第一发送节点不同于所述第二发送节点,所述第一子流中的数据块与所述第二子流中的数据块不完全相同;Sending a second substream request to a second sending node; the second substream request is used to request the second sending node to send a second substream, the second substream including at least one data in the original stream blocks; the first sending node is different from the second sending node, and the data blocks in the first substream are not exactly the same as the data blocks in the second substream;
接收所述第一子流和所述第二子流。The first substream and the second substream are received.
上述处理器1202执行方法的具体内容可参阅上述图3,此处不再赘述。For the specific content of the method executed by the processor 1202, reference may be made to the above-mentioned FIG. 3 , which will not be repeated here.
相应的,处理器1202调用存储器1201中存储的计算机程序,还可以用于执行上述图10所示的数据传输装置100中的各个单元所执行的方法步骤,其具体内容可参阅上述图10,此处不再赘述。Correspondingly, the processor 1202 calls the computer program stored in the memory 1201, which can also be used to execute the method steps performed by the various units in the data transmission device 100 shown in FIG. I won't repeat them here.
另一方面,存储器1201中存储有计算机程序,处理器1202调用存储器1201中存储的计算机程序,以执行上述图8所示的数据传输方法:On the other hand, a computer program is stored in the memory 1201, and the processor 1202 calls the computer program stored in the memory 1201 to execute the data transmission method shown in FIG. 8 above:
接收第一请求节点发送的第一子流请求或第二请求节点发送的第二子流请求;所述第一子流请求用于请求向所述第一请求节点发送第一子流,所述第二子流请求用于请求向所述第二请求节点发送第二子流;所述第一子流包括原始流中的至少一个数据块,所述第二子流包括所述原始流中的至少一个数据块,所述第一子流中的数据块与所述第二子流中的数据块不完全相同;receiving a first substream request sent by a first requesting node or a second substream request sent by a second requesting node; the first substream request is used to request to send a first substream to the first requesting node, the The second substream request is used to request to send a second substream to the second requesting node; the first substream includes at least one data block in the original stream, and the second substream includes at least one data block in the original stream at least one data block, the data block in the first substream is not identical to the data block in the second substream;
向所述第一请求节点发送所述第一子流或向所述第二请求节点发送所述第二子流。Sending the first subflow to the first requesting node or sending the second subflow to the second requesting node.
上述处理器1202执行方法的具体内容可参阅上述图8,此处不再赘述。For the specific content of the method executed by the processor 1202, reference may be made to the above-mentioned FIG. 8 , which will not be repeated here.
相应的,处理器1202调用存储器1201中存储的计算机程序,还可以用于执行上述图11所示的数据传输装置110中的各个单元所执行的方法步骤,其具体内容可参阅上述图11,此处不再赘述。Correspondingly, the processor 1202 invokes the computer program stored in the memory 1201, which can also be used to execute the method steps performed by each unit in the data transmission device 110 shown in FIG. I won't repeat them here.
在图12所描述的电子设备120中,采用将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。In the electronic device 120 described in FIG. 12, the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree model transmissions can greatly reduce the data transmission pressure on a single node in the streaming transmission network. Make the load of the data sending node more balanced, fully match the uplink bandwidth of each node in the mobile distributed streaming network environment, and make the entire streaming network more invulnerable and transmission efficient.
本申请实施例还提供一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,当上述计算机程序在一个或多个处理器上运行时,可以实现上述图3以及图8所示的方法。The embodiment of the present application also provides a computer-readable storage medium. The above-mentioned computer-readable storage medium stores a computer program. When the above-mentioned computer program is run on one or more processors, the above-mentioned FIG. 3 and FIG. 8 can be implemented. method shown.
本申请实施例还提供一种计算机程序产品,当上述计算机程序产品在处理器上运行时,可以实现上述图3以及图8所示的方法。An embodiment of the present application further provides a computer program product, which can implement the methods shown in FIG. 3 and FIG. 8 above when the computer program product is run on a processor.
本申请实施例还提供一种芯片,该芯片包括处理器和通信接口,所述处理器用于从该通信接口调用并运行指令,当该处理器执行所述指令时,可以实现上述图3以及图8所示的方法。The embodiment of the present application also provides a chip, the chip includes a processor and a communication interface, the processor is used to call and run instructions from the communication interface, when the processor executes the instructions, the above-mentioned Figure 3 and Figure 3 can be implemented. 8 shows the method.
本申请实施例还提供了一种数据传输系统,该系统包括了至少一个如上述数据传输装置100或数据传输装置110或电子设备120或芯片。The embodiment of the present application also provides a data transmission system, which includes at least one data transmission device 100 or data transmission device 110 or electronic device 120 or chip as described above.
综上上述,采用将整个移动分布式流传输过程拆分成多个子流分发树模型传输的过程,可以很大程度上减少对流传输网络中单个节点的数据传输压力,使数据发送节点的负载更加均衡,充分匹配移动分布式流传输网络环境下的各个节点的上行带宽,使整个流传输网络的抗毁性和传输效率更高。To sum up, the process of splitting the entire mobile distributed streaming transmission process into multiple sub-stream distribution tree models can greatly reduce the data transmission pressure on a single node in the streaming transmission network and make the load on the data sending node more efficient. Balanced, fully matching the uplink bandwidth of each node in the mobile distributed streaming network environment, making the entire streaming network more robust and efficient.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序相关的硬件完成,该计算机程序可存储于计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储计算机程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be realized. The processes can be completed by hardware related to computer programs, and the computer programs can be stored in computer-readable storage media. When the computer programs are executed, , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: various media capable of storing computer program codes such as read-only memory ROM or random access memory RAM, magnetic disk or optical disk.

Claims (24)

  1. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized in that, comprising:
    向第一发送节点发送第一请求;sending a first request to a first sending node;
    接收所述第一发送节点响应于所述第一请求发送的第一子流;receiving the first substream sent by the first sending node in response to the first request;
    向第二发送节点发送第二请求;sending a second request to a second sending node;
    接收所述第二发送节点响应于所述第二请求发送的第二子流;所述第一发送节点不同于所述第二发送节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同。receiving the second substream sent by the second sending node in response to the second request; the first sending node is different from the second sending node; the first substream and the second substream are both Consisting of chunks of data in an original stream, said first substream is different from said second substream.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    对所述第一子流和所述第二子流解码,得到所述原始流。Decoding the first substream and the second substream to obtain the original stream.
  3. 根据权利要求1或2所述的方法,其特征在于,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。The method according to claim 1 or 2, wherein the original stream includes a first file block and a second file block, and both the first sub-stream and the second sub-stream include the first file block and the data blocks in the second file block.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。The method according to any one of claims 1 to 3, wherein the first substream includes a data block obtained by redundantly encoding the first file block, or a data block obtained by performing redundant encoding on the second file block A data block obtained by performing redundant encoding; the second substream includes a data block obtained by performing redundant encoding on the first file block, or a data block obtained by performing redundant encoding on the second file block.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一请求和所述第二请求均包括第一请求节点的剩余带宽信息;所述第一请求节点为发送所述第一请求和所述第二请求的请求节点;所述第一请求节点的剩余带宽信息用于所述第一发送节点确定是否发送所述第一子流,和用于所述第二发送节点确定是否发送所述第二子流。The method according to any one of claims 1 to 4, wherein both the first request and the second request include remaining bandwidth information of the first requesting node; the requesting node for the first request and the second request; the remaining bandwidth information of the first requesting node is used by the first sending node to determine whether to send the first sub-stream, and for the second sending The node determines whether to send the second sub-flow.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述向第一发送节点发送第一请求之前,所述方法还包括:The method according to any one of claims 1 to 5, wherein before sending the first request to the first sending node, the method further comprises:
    获取所述原始流的元数据;obtaining metadata of the original stream;
    基于所述元数据,确定所述第一子流;determining the first substream based on the metadata;
    基于所述元数据,确定所述第一发送节点。Based on the metadata, the first sending node is determined.
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述元数据,确定所述第一发送节点,包括:The method according to claim 6, wherein the determining the first sending node based on the metadata comprises:
    基于所述元数据,确定候选发送节点集合,所述候选发送节点集合包括拥有所述第一子流的候选发送节点;Based on the metadata, determine a set of candidate sending nodes, where the set of candidate sending nodes includes candidate sending nodes owning the first substream;
    将所述候选发送节点集合中的第一候选发送节点确定为所述第一发送节点,所述第一候选发送节点为分发树高度小于第一阈值的候选发送节点。Determining a first candidate sending node in the set of candidate sending nodes as the first sending node, where the first candidate sending node is a candidate sending node whose distribution tree height is smaller than a first threshold.
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:The method according to claim 7, wherein the method further comprises:
    在接收所述第一发送节点响应于所述第一请求发送的第一子流出现异常的情况下,向所述候选发送节点集合中的第二候选发送节点发送第三请求;所述第二候选发送节点为分发树高度小于第二阈值且不小于所述第一阈值的候选发送节点,所述第三请求用于请求所述第二候选发送节点发送所述第一子流。In the case that the first substream sent by the first sending node in response to the first request is abnormal, sending a third request to a second candidate sending node in the set of candidate sending nodes; the second The candidate sending node is a candidate sending node whose distribution tree height is smaller than the second threshold and not smaller than the first threshold, and the third request is used to request the second candidate sending node to send the first substream.
  9. 根据权利要求8所述的方法,其特征在于,所述在接收所述第一发送节点响应于所述第一请求发送的第一子流出现异常的情况下,向所述候选发送节点集合中的第二候选发送节点发送第三请求,包括:The method according to claim 8, wherein when receiving the first sub-stream sent by the first sending node in response to the first request is abnormal, sending the information to the set of candidate sending nodes The second candidate sending node sends a third request, including:
    在所述第一发送节点在预设时间内未发送所述第一子流的情况下,向所述第二候选发送节点发送所述第三请求;或者,If the first sending node has not sent the first substream within a preset time, sending the third request to the second candidate sending node; or,
    在接收所述第一子流的过程中所述第一子流传输中断的情况下,向所述第二候选发送节点发送所述第三请求;或者,If the transmission of the first substream is interrupted during the process of receiving the first substream, sending the third request to the second candidate sending node; or,
    在接收所述第一子流的过程中,所述第一子流的第一传输速度小于预设阈值的情况下,向所述第二候选发送节点发送所述第三请求;或者,In the process of receiving the first substream, if the first transmission speed of the first substream is less than a preset threshold, send the third request to the second candidate sending node; or,
    在接收所述第一子流和所述第二子流的过程中,所述第一子流的第一传输速度与所述第二子流的第二传输速度的差值大于目标阈值,且所述第一传输速度小于所述第二传输速度的情况下,向所述第二候选发送节点发送所述第三请求。During the process of receiving the first substream and the second substream, the difference between the first transmission speed of the first substream and the second transmission speed of the second substream is greater than a target threshold, and When the first transmission speed is lower than the second transmission speed, sending the third request to the second candidate sending node.
  10. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized in that, comprising:
    接收第一请求节点发送的第一请求或第二请求节点发送的第二请求;所述第一请求用于请求向所述第一请求节点发送第一子流,所述第二请求用于请求向所述第二请求节点发送第二子流;所述第一请求节点不同于所述第二请求节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同;Receive a first request sent by a first requesting node or a second request sent by a second requesting node; the first request is used to request sending the first substream to the first requesting node, and the second request is used to request sending a second substream to the second requesting node; the first requesting node is different from the second requesting node; both the first substream and the second substream are composed of data blocks in the original stream , the first substream is different from the second substream;
    向所述第一请求节点发送所述第一子流或向所述第二请求节点发送所述第二子流。Sending the first subflow to the first requesting node or sending the second subflow to the second requesting node.
  11. 根据权利要求10所述的方法,其特征在于,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。The method according to claim 10, wherein the original stream includes a first file block and a second file block, and the first sub-stream and the second sub-stream both include the first file block and the second file block. A data block in the second file block.
  12. 根据权利要求10或11所述的方法,其特征在于,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。The method according to claim 10 or 11, wherein the first substream includes a data block obtained by performing redundant encoding on the first file block, or performing redundant encoding on the second file block Obtained data blocks; the second substream includes data blocks obtained by performing redundant encoding on the first file block, or data blocks obtained by performing redundant encoding on the second file block.
  13. 根据权利要求10至12中任一项所述的方法,其特征在于,所述接收第一请求节点发送的第一请求之前,所述方法还包括:The method according to any one of claims 10 to 12, wherein before receiving the first request sent by the first requesting node, the method further comprises:
    向所述第一请求节点发送第一发送节点的分发树高度信息,所述第一发送节点的分发 树高度信息用于所述第一请求节点确定是否向所述第一发送节点发送所述第一请求,所述第一发送节点为发送所述第一子流或所述第二子流的发送节点。sending the distribution tree height information of the first sending node to the first requesting node, where the distribution tree height information of the first sending node is used by the first requesting node to determine whether to send the first sending node to the first sending node On request, the first sending node is a sending node sending the first sub-stream or the second sub-stream.
  14. 一种数据传输装置,其特征在于,包括:A data transmission device, characterized in that it comprises:
    发送单元,用于向第一发送节点发送第一请求;a sending unit, configured to send a first request to a first sending node;
    接收单元,用于接收所述第一发送节点响应于所述第一请求发送的第一子流;a receiving unit, configured to receive the first substream sent by the first sending node in response to the first request;
    所述发送单元,还用于向第二发送节点发送第二请求;The sending unit is further configured to send a second request to a second sending node;
    所述接收单元,还用于接收所述第二发送节点响应于所述第二请求发送的第二子流;所述第一发送节点不同于所述第二发送节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同。The receiving unit is further configured to receive a second substream sent by the second sending node in response to the second request; the first sending node is different from the second sending node; the first substream Both of the second substreams are composed of data blocks in the original stream, and the first substream is different from the second substream.
  15. 根据权利要求14所述的装置,其特征在于,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。The device according to claim 14, wherein the original stream includes a first file block and a second file block, and the first sub-stream and the second sub-stream both include the first file block and the second file block. A data block in the second file block.
  16. 根据权利要求14或15所述的装置,其特征在于,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。The device according to claim 14 or 15, wherein the first substream includes a data block obtained by performing redundant encoding on the first file block, or performing redundant encoding on the second file block Obtained data blocks; the second substream includes data blocks obtained by performing redundant encoding on the first file block, or data blocks obtained by performing redundant encoding on the second file block.
  17. 根据权利要求14至16中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 14 to 16, wherein the device further comprises:
    所述接收单元,还用于获取所述原始流的元数据;The receiving unit is further configured to obtain metadata of the original stream;
    确定单元,用于基于所述元数据,确定所述第一子流;a determining unit, configured to determine the first sub-stream based on the metadata;
    所述确定单元,还用于基于所述元数据,确定所述第一发送节点。The determining unit is further configured to determine the first sending node based on the metadata.
  18. 根据权利要求17所述的装置,其特征在于,所述确定单元,具体用于基于所述元数据,确定候选发送节点集合,所述候选发送节点集合包括拥有所述第一子流的候选发送节点;The device according to claim 17, wherein the determining unit is specifically configured to determine a set of candidate sending nodes based on the metadata, and the set of candidate sending nodes includes candidate sending nodes owning the first substream. node;
    所述确定单元,具体还用于将所述候选发送节点集合中的第一候选发送节点确定为所述第一发送节点,所述第一候选发送节点为分发树高度小于第一阈值的候选发送节点。The determining unit is specifically further configured to determine a first candidate sending node in the set of candidate sending nodes as the first sending node, and the first candidate sending node is a sending candidate whose distribution tree height is smaller than a first threshold node.
  19. 根据权利要求18所述的装置,其特征在于,所述发送单元,还用于在接收所述第一发送节点响应于所述第一请求发送的第一子流出现异常的情况下,向所述候选发送节点集合中的第二候选发送节点发送第三请求;所述第二候选发送节点为分发树高度小于第二阈值且不小于所述第一阈值的候选发送节点,所述第三请求用于请求所述第二候选发送节点发送所述第一子流。The device according to claim 18, wherein the sending unit is further configured to send an A second candidate sending node in the set of candidate sending nodes sends a third request; the second candidate sending node is a candidate sending node whose distribution tree height is less than the second threshold and not less than the first threshold, and the third request It is used to request the second candidate sending node to send the first substream.
  20. 根据权利要求19所述的装置,其特征在于,所述发送单元,具体还用于在所述第一发送节点在预设时间内未发送所述第一子流的情况下,向所述第二候选发送节点发送所 述第三请求;或者,The device according to claim 19, wherein the sending unit is further configured to, when the first sending node does not send the first substream within a preset time, send the The second candidate sending node sends the third request; or,
    所述发送单元,具体还用于在接收所述第一子流的过程中所述第一子流传输中断的情况下,向所述第二候选发送节点发送所述第三请求;或者,The sending unit is specifically further configured to send the third request to the second candidate sending node when the transmission of the first substream is interrupted during the process of receiving the first substream; or,
    所述发送单元,具体还用于在接收所述第一子流的过程中,所述第一子流的第一传输速度小于预设阈值的情况下,向所述第二候选发送节点发送所述第三请求;或者,The sending unit is further configured to send the second candidate sending node to the second candidate sending node when the first transmission speed of the first substream is lower than a preset threshold during the process of receiving the first substream. the third request; or,
    所述发送单元,具体还用于在接收所述第一子流和所述第二子流的过程中,所述第一子流的第一传输速度与所述第二子流的第二传输速度的差值大于目标阈值,且所述第一传输速度小于所述第二传输速度的情况下,向所述第二候选发送节点发送所述第三请求。The sending unit is further configured to, during the process of receiving the first substream and the second substream, the first transmission speed of the first substream and the second transmission speed of the second substream When the speed difference is greater than the target threshold and the first transmission speed is smaller than the second transmission speed, sending the third request to the second candidate sending node.
  21. 一种数据传输装置,其特征在于,包括:A data transmission device, characterized in that it comprises:
    接收单元,用于接收第一请求节点发送的第一请求或第二请求节点发送的第二请求;所述第一请求用于请求向所述第一请求节点发送第一子流,所述第二请求用于请求向所述第二请求节点发送第二子流;所述第一请求节点不同于所述第二请求节点;所述第一子流与所述第二子流均由原始流中的数据块组成,所述第一子流与所述第二子流不同;A receiving unit, configured to receive a first request sent by a first requesting node or a second request sent by a second requesting node; the first request is used to request to send a first substream to the first requesting node, and the first requesting node The second request is used to request to send a second substream to the second requesting node; the first requesting node is different from the second requesting node; both the first substream and the second substream are composed of the original stream Composed of data blocks in , the first sub-stream is different from the second sub-stream;
    发送单元,用于向所述第一请求节点发送所述第一子流或向所述第二请求节点发送所述第二子流。A sending unit, configured to send the first substream to the first requesting node or send the second substream to the second requesting node.
  22. 根据权利要求21所述的装置,其特征在于,所述原始流包括第一文件块和第二文件块,所述第一子流与所述第二子流均包括所述第一文件块和所述第二文件块中的数据块。The device according to claim 21, wherein the original stream includes a first file block and a second file block, and the first sub-stream and the second sub-stream both include the first file block and the second file block. A data block in the second file block.
  23. 根据权利要求21或22所述的装置,其特征在于,所述第一子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块;所述第二子流包括对所述第一文件块进行冗余编码得到的数据块,或对所述第二文件块进行冗余编码得到的数据块。The device according to claim 21 or 22, wherein the first substream includes a data block obtained by performing redundant encoding on the first file block, or performing redundant encoding on the second file block Obtained data blocks; the second substream includes data blocks obtained by performing redundant encoding on the first file block, or data blocks obtained by performing redundant encoding on the second file block.
  24. 一种数据传输系统,其特征在于,包括如权利要求14至20中任一项所述的数据传输装置,或权利要求21至23中任一项所述的数据传输装置。A data transmission system, characterized by comprising the data transmission device according to any one of claims 14 to 20, or the data transmission device according to any one of claims 21 to 23.
PCT/CN2021/097487 2021-05-31 2021-05-31 Data transmission method and apparatus, and electronic device and storage medium WO2022252083A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/097487 WO2022252083A1 (en) 2021-05-31 2021-05-31 Data transmission method and apparatus, and electronic device and storage medium
CN202180098643.2A CN117441337A (en) 2021-05-31 2021-05-31 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/097487 WO2022252083A1 (en) 2021-05-31 2021-05-31 Data transmission method and apparatus, and electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2022252083A1 true WO2022252083A1 (en) 2022-12-08

Family

ID=84322678

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/097487 WO2022252083A1 (en) 2021-05-31 2021-05-31 Data transmission method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN117441337A (en)
WO (1) WO2022252083A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080281913A1 (en) * 2005-03-09 2008-11-13 Vudu, Inc. Live video broadcasting on distributed networks
CN104967866A (en) * 2015-05-13 2015-10-07 浙江树人大学 Dynamic self-adaptive P2P live streaming media substream scheduling method
CN111556344A (en) * 2020-04-04 2020-08-18 网宿科技股份有限公司 Method, device, equipment and system for downloading video stream

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080281913A1 (en) * 2005-03-09 2008-11-13 Vudu, Inc. Live video broadcasting on distributed networks
CN104967866A (en) * 2015-05-13 2015-10-07 浙江树人大学 Dynamic self-adaptive P2P live streaming media substream scheduling method
CN111556344A (en) * 2020-04-04 2020-08-18 网宿科技股份有限公司 Method, device, equipment and system for downloading video stream

Also Published As

Publication number Publication date
CN117441337A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
JP2006079606A (en) Receiver-driven system and method for peer-to-peer network
JP2006074744A (en) System and method for distributed streaming of extensible media
JP2006074781A (en) System and method for erasure coding of streaming media
US8966107B2 (en) System and method of streaming data over a distributed infrastructure
CN114760482B (en) Live broadcast source returning method and device
TWI530147B (en) Apparatus and method for level-based self-adjusting peer-to-peer media streaming
CN112311874B (en) Media data processing method and device, storage medium and electronic equipment
CN110866046A (en) Extensible distributed query method and device
Dogga et al. Edge-based transcoding for adaptive live video streaming
EP3902279A1 (en) Audio and video stream distribution method in audio and video stream distribution system, and dynamic parent node
CN108833554B (en) Large-scale network-oriented real-time high-reliability message distribution system and method thereof
US20230396679A1 (en) Mixed peer-to-peer mesh and forwarding system
WO2022252083A1 (en) Data transmission method and apparatus, and electronic device and storage medium
Sayit et al. Adaptive, incentive and scalable dynamic tree overlay for P2P live video streaming
CN109246487B (en) Intelligent scheduling system
CN114513519B (en) Video peer-to-peer stream exchange method, system and device
KR101351237B1 (en) Distiributed file system in network
Loukos et al. Real-time data dissemination in mobile peer-to-peer networks
Li et al. rsearch: Ring-based semantic overlay for efficient recall-guaranteed search in p2p networks
Li et al. Research on real-time high reliable network file distribution technology
WO2023138231A1 (en) Residual propagation method and apparatus for network model
Lopez-Fuentes et al. Architecture for Media streaming delivery over P2P networks
Liu et al. Efficient push-based packet scheduling for Peer-to-Peer live streaming
Guo et al. Research on the service guarantee strategy based on streaming media platform
CN116016465A (en) P2P-based multimedia resource distribution system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21943459

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180098643.2

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21943459

Country of ref document: EP

Kind code of ref document: A1