A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://patents.google.com/patent/CN102571264B/en below:

CN102571264B - Method and device for protecting integrity of file during broadcasting of data file

具体实施方式 Detailed ways

下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整的描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Apparently, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明的核心思想在于:将FEC编码、轮播和点对点修复结合起来解决MBMS数据文件广播时文件完整性的问题。The core idea of the present invention is to combine FEC encoding, carousel and point-to-point repair to solve the problem of file integrity when MBMS data files are broadcast.

广播服务器确定数据文件传输时间的阈值,即广播服务器开始广播数据文件到终端得到完整的数据文件所需要的时间阈值,该阈值具体可以为一特定值。广播服务器根据阈值判断是否开启FEC编码和轮播,利用FEC编码和轮播的不同修复特性,采取最佳的广播方案,再由终端根据接收数据文件的完整性决定是否进行点对点修复,最终得到完整的数据文件。在不超出预定的数据文件传输时间(即阈值)的同时减小了对非广播信道资源的占用。The broadcast server determines the threshold of the data file transmission time, that is, the time threshold required from the broadcast server to start broadcasting the data file to the terminal obtaining the complete data file. The threshold may be a specific value. The broadcast server judges whether to enable FEC coding and carousel according to the threshold, and uses the different repair characteristics of FEC coding and carousel to adopt the best broadcast plan, and then the terminal decides whether to perform point-to-point repair according to the integrity of the received data file, and finally obtains a complete data file. The occupancy of non-broadcast channel resources is reduced while the predetermined data file transmission time (that is, the threshold) is not exceeded.

下面将结合图1,对本发明实施例一提供的数据文件广播中文件完整性保护的方法进行详细阐述,为了方便描述,下面的实施例中均采用GPRS信道作为点对点修复所用的非广播信道。The method for file integrity protection in data file broadcasting provided by Embodiment 1 of the present invention will be described in detail below in conjunction with FIG. 1 . For convenience of description, GPRS channels are used as the non-broadcast channel used for point-to-point repair in the following embodiments.

步骤101,广播服务器根据预定的数据文件传输时间判断是否对待广播的数据文件开启前向纠错FEC编码,如果开启,则对所述数据文件进行FEC编码。Step 101 , the broadcast server judges whether to enable forward error correction (FEC) encoding for the data file to be broadcast according to the scheduled data file transmission time, and if enabled, performs FEC encoding on the data file.

具体的,广播服务器判断,若将数据文件经FEC编码后进行广播,再进行点对点修复,所需要的总时间是否小于所述预定的数据文件传输时间,如果是,则对数据文件开启FEC编码,否则不开启FEC编码。Specifically, the broadcast server judges, if the data file is broadcasted after FEC encoding, and then point-to-point repair is performed, whether the total time required is less than the predetermined data file transmission time, and if so, then FEC encoding is enabled for the data file, Otherwise, FEC encoding is not enabled.

判断是否开启FEC编码的过程,是在假设开启FEC编码的前提下进行相应的时间计算和判断的,过程具体为:The process of judging whether to enable FEC encoding is to calculate and judge the corresponding time on the premise that FEC encoding is enabled. The process is as follows:

首先,广播服务器确定最佳FEC算法,以及最佳FEC算法对应的FEC算法公式。First, the broadcast server determines the best FEC algorithm and the FEC algorithm formula corresponding to the best FEC algorithm.

广播服务器先要获取网络中的PLR(Packet Loss Rate,丢包率)。现有技术中有多种FEC算法,每种FEC算法都对应有FEC算法公式,将该获取的PLR代入各FEC算法公式,得出欲修复该PLR下的丢包所需要的FEC冗余比例(用FEC冗余参数FEC_para表示)。其中,FEC算法就是FEC编码的方法。The broadcast server must first obtain the PLR (Packet Loss Rate, packet loss rate) in the network. There are multiple FEC algorithms in the prior art, each FEC algorithm corresponds to a FEC algorithm formula, and the obtained PLR is substituted into each FEC algorithm formula to obtain the required FEC redundancy ratio ( Indicated by the FEC redundancy parameter FEC_para). Wherein, the FEC algorithm is a method of FEC encoding.

不同的FEC算法针对不同网络情况有着不同的特性,所以,对于同一PLR,根据不同FEC算法公式可以得出不同的FEC_para。广播服务器选择得出的FEC_para最小的FEC算法公式对应的FEC算法进行FEC编码,保证在恢复丢包的同时,尽量减小冗余包的数量,以减小数据文件广播所需的时间。另外,FEC算法也可以直接设定,例如根据对网络情况的长期了解以及其他情况的综合考虑预先设定FEC算法,节省了上述的计算过程。Different FEC algorithms have different characteristics for different network conditions. Therefore, for the same PLR, different FEC_para can be obtained according to different FEC algorithm formulas. The broadcast server selects the FEC algorithm corresponding to the FEC algorithm formula with the smallest FEC_para to perform FEC encoding to ensure that the number of redundant packets is minimized while recovering lost packets, so as to reduce the time required for data file broadcasting. In addition, the FEC algorithm can also be set directly, for example, the FEC algorithm is pre-set according to the long-term understanding of the network situation and comprehensive consideration of other situations, which saves the above-mentioned calculation process.

通过计算比较或者直接设定的方法可以确定FEC算法和对应的FEC算法公式。The FEC algorithm and the corresponding FEC algorithm formula can be determined by calculating and comparing or setting directly.

然后,根据确定的FEC算法公式以及网络的PLR得出相应的FEC_para。Then, obtain the corresponding FEC_para according to the determined FEC algorithm formula and the PLR of the network.

然后,将FEC_para代入如下所示的公式[1],得出FEC开启参数,当FEC开启参数的值为1时则开启FEC编码,为0时则不开启FEC编码。Then, substitute FEC_para into the following formula [1] to obtain the FEC enabling parameter. When the value of the FEC enabling parameter is 1, FEC encoding is enabled, and when it is 0, FEC encoding is not enabled.

公式[1]是用于判断若将数据文件经FEC编码后进行广播,再进行点对点修复,所需要的总时间是否在预定的数据文件传输时间之内,如果是,则开启FEC编码。Formula [1] is used to judge whether the total time required for broadcasting the data file after FEC encoding and then performing point-to-point repair is within the predetermined data file transmission time, and if so, enable FEC encoding.

其中,总时间为广播时间和点对点修复时间之和,广播时间和点对点修复时间之和,所述广播时间根据FEC冗余参数、所述数据文件的大小、广播信道带宽确定,所述点对点修复时间根据网络中的丢包率、所述数据文件大小、FEC修复的概率(FEC修复的概率,即FEC编码修复丢包的比例,是一个经验值或实际测算值)和点对点修复所占用的非广播信道的带宽确定。设FEC开启参数为FEC_enable,预定的数据文件传输时间为T,待广播的数据文件的大小为S,广播信道带宽为Bandwidth_B,点对点修复时GPRS信道的带宽为Bandwidth_P,FEC修复的概率是P_fec,公式[1]如下:Wherein, the total time is the sum of the broadcast time and the point-to-point repair time, the sum of the broadcast time and the point-to-point repair time, the broadcast time is determined according to the FEC redundancy parameter, the size of the data file, and the broadcast channel bandwidth, and the point-to-point repair time According to the packet loss rate in the network, the size of the data file, the probability of FEC repair (the probability of FEC repair, that is, the ratio of FEC encoding repair packet loss, is an empirical value or actual measured value) and the non-broadcast occupied by point-to-point repair The bandwidth of the channel is determined. Let the FEC enable parameter be FEC_enable, the scheduled data file transmission time is T, the size of the data file to be broadcast is S, the broadcast channel bandwidth is Bandwidth_B, the bandwidth of the GPRS channel during point-to-point repair is Bandwidth_P, and the probability of FEC repair is P_fec, the formula [1] as follows:

FECFEC __ enableenable == 11 TT >> SS ×× (( 11 ++ FECFEC __ parapara )) BandwidthBandwidth __ BB ++ SS ×× PLRPLR ×× (( 11 -- PP __ fecfec )) BandwidthBandwidth __ PP 00 .. .. .. [[ 11 ]]

上面详细描述了根据预定的数据文件传输时间判断是否开启FEC编码的过程,另外,在某些情况下是可以不采用FEC编码的。The above describes in detail the process of judging whether to enable FEC encoding according to the scheduled data file transmission time. In addition, in some cases, FEC encoding may not be used.

优选的,当网络中的PLR大于预设门限值的时候,广播服务器不对待广播的数据文件进行FEC编码。无论是何种FEC算法,当网络状况较差,即PLR较大的时候,由于大量的连续丢包的出现,导致采用FEC编码时,根据FEC算法公式计算出的FEC_para剧增,这会导致广播时间剧增,文件修复效率骤降,此时,不再对待广播的数据文件进行FEC编码处理。Preferably, when the PLR in the network is greater than the preset threshold, the broadcast server does not perform FEC encoding on the data file to be broadcast. Regardless of the FEC algorithm, when the network condition is poor, that is, when the PLR is large, due to the occurrence of a large number of continuous packet loss, when FEC encoding is used, the FEC_para calculated according to the FEC algorithm formula will increase sharply, which will cause broadcast The time increases sharply, and the efficiency of file restoration drops sharply. At this time, the data files to be broadcast are no longer subjected to FEC encoding processing.

优选的,当所述数据文件的大小小于预设门限值的时候,所述广播服务器不对所述数据文件进行FEC编码。FEC编码的过程中,需要先将数据文件分割成一个个的源块,必须将一定数量的源块进行编码产生冗余块,如果数据文件过小,则源块的数量将过少,则无法采用FEC编码。Preferably, when the size of the data file is smaller than a preset threshold, the broadcast server does not perform FEC encoding on the data file. In the process of FEC encoding, the data file needs to be divided into individual source blocks first, and a certain number of source blocks must be encoded to generate redundant blocks. If the data file is too small, the number of source blocks will be too small, and it will not be possible to Using FEC encoding.

FEC编码的具体过程是:广播服务器先根据网络中的PLR和FEC算法公式计算出FEC冗余参数,再根据FEC冗余参数对数据文件进行FEC编码。将PLR代入选定的FEC算法的FEC算法公式,计算得出FEC冗余参数FEC_para,以确定需要增加的FEC冗余比例,根据FEC_para和FEC算法就可以对待广播的数据文件进行FEC编码。The specific process of FEC encoding is: the broadcast server first calculates the FEC redundancy parameters according to the PLR and FEC algorithm formula in the network, and then performs FEC encoding on the data file according to the FEC redundancy parameters. Substitute PLR into the FEC algorithm formula of the selected FEC algorithm to calculate the FEC redundancy parameter FEC_para to determine the FEC redundancy ratio that needs to be increased. According to FEC_para and the FEC algorithm, the data files to be broadcast can be FEC encoded.

步骤102,所述广播服务器根据所述预定的数据文件传输时间判断是否对所述数据文件或经过FEC编码的所述数据文件开启轮播,如果开启,则对所述数据文件或经过FEC编码的所述数据文件进行轮播,如果不开启,则对所述数据文件或经过FEC编码的所述数据文件进行一次广播。Step 102, the broadcast server determines whether to enable the carousel for the data file or the FEC-encoded data file according to the predetermined data file transmission time, and if it is enabled, then for the data file or the FEC-encoded data file The data file is broadcast in carousel, and if it is not enabled, the data file or the data file encoded by FEC is broadcast once.

一般的,在网络中PLR较低的情况下,采用FEC编码的方式进行数据文件完整性保护的效率较高,所以,优选的,先判断进行FEC编码广播是否满足预定的数据文件传输时间,再判断预定的数据文件传输时间是否允许进行轮播。Generally, when the PLR in the network is low, the efficiency of data file integrity protection using FEC coding is higher. Therefore, preferably, it is first judged whether the FEC coded broadcast meets the predetermined data file transmission time, and then It is judged whether the scheduled data file transmission time allows carousel.

具体的,步骤102的判断过程为,广播服务器判断,若将所述数据文件或经过FEC编码的所述数据文件进行轮播,再进行点对点修复,所需要的总时间是否小于预定的数据文件传输时间,如果是,则对所述数据文件或经过FEC编码的所述数据文件开启轮播,否则不开启轮播。Specifically, the judging process in step 102 is that the broadcast server judges, if the data file or the data file encoded by FEC is broadcast in carousel, and then point-to-point repair is performed, whether the total time required is less than the scheduled data file transmission Time, if yes, start carousel for the data file or the data file encoded by FEC, otherwise do not start carousel.

具体的,可以用如下所示公式[2],得出轮播开启参数,当轮播开启参数的值为1时则开启FEC编码,为0时则不开启。Specifically, the following formula [2] can be used to obtain the carousel enabling parameter. When the value of the carousel enabling parameter is 1, FEC coding is enabled, and when it is 0, it is not enabled.

公式[2]是用于判断若将所述数据文件或经过FEC编码的所述数据文件进行轮播,再进行点对点修复,所需要的总时间是否在预定的数据文件传输时间之内,如果是,则开启轮播。The formula [2] is used to determine whether the total time required is within the predetermined data file transmission time if the data file or the FEC-encoded data file is broadcast in rotation, and then point-to-point repair is performed. , the carousel is enabled.

其中,总时间为轮播时间和点对点修复时间之和。对于开启FEC编码的情况,该广播时间根据轮播次数、FEC冗余参数、数据文件的大小、广播信道带宽确定,该点对点修复时间根据网络中的丢包率、数据文件大小、轮播修复概率(轮播修复的概率,即轮播修复机制修复丢包的比例,是一个经验值或实际测算值)、轮播次数、FEC修复概率和点对点修复所占用的非广播信道的带宽确定。对于未开启FEC编码的情况,该广播时间根据轮播次数、数据文件的大小、广播信道带宽确定,该点对点修复时间根据网络中的丢包率、数据文件大小、轮播修复概率、轮播次数和点对点修复所占用的非广播信道的带宽确定。Among them, the total time is the sum of the rotation time and the point-to-point repair time. For the case of enabling FEC encoding, the broadcast time is determined according to the number of carousels, FEC redundancy parameters, data file size, and broadcast channel bandwidth, and the point-to-point repair time is determined according to the packet loss rate in the network, data file size, and carousel repair probability (The probability of carousel repair, that is, the ratio of the carousel repair mechanism to repair packet loss, is an empirical value or an actual measured value), the number of carousel broadcasts, the probability of FEC repair, and the bandwidth of the non-broadcast channel occupied by point-to-point repair. For the case where FEC encoding is not enabled, the broadcast time is determined according to the number of carousels, the size of the data file, and the bandwidth of the broadcast channel. The point-to-point repair time is determined according to the packet loss rate in the network, the size of the data file, the probability of carousel repair, and the number of times of carousel and the bandwidth of the non-broadcast channel occupied by point-to-point repair.

设预定的数据文件传输时间为T,轮播开启参数为ReBroadcast_enable,另外还包括,轮播的次数为N,轮播修复的概率为P_broadcast,公式[2]如下:Suppose the scheduled data file transmission time is T, the carousel enable parameter is ReBroadcast_enable, in addition, the number of times of carousel is N, and the probability of carousel repair is P_broadcast, the formula [2] is as follows:

ReBroadcastReBroadcast __ enableenable == 11 TT >> NN ×× SS ×× (( 11 ++ FECFEC __ parapara )) BandwidthBandwidth __ BB 00 SS ×× PLRPLR ×× (( (( 11 -- PP __ fecfec )) ×× (( 11 -- PP __ Broadcastbroadcast )) )) NN BandwidthBandwidth __ PP .. .. .. [[ 22 ]]

公式[2]中的P_fec、FEC_para,为FEC编码过程中的参数,所以,对于FEC编码开启的情况,公式[2]中的P_fec、FEC_para与公式[1]中的数值相同;对于未开启FEC编码的情况,公式[2]中的P_fec、FEC_para值为0。优选的,作为初步判断是否开启轮播,可以设N=2,如果这时的判断结果是开启轮播,再进一步的计算N的具体值。P_fec and FEC_para in formula [2] are parameters in the FEC encoding process. Therefore, for the case where FEC encoding is enabled, P_fec and FEC_para in formula [2] are the same as the values in formula [1]; In the case of encoding, the values of P_fec and FEC_para in formula [2] are 0. Preferably, as a preliminary judgment on whether to enable carousel, N=2 may be set, and if the result of the judgment at this time is to enable carousel, the specific value of N is further calculated.

广播服务器对数据文件进行轮播的过程具体为:广播服务器先根据预定的数据文件传输时间确定轮播的次数,再按该次数对数据文件进行重复广播。广播服务器对经过FEC编码的数据文件进行轮播的过程具体为:广播服务器先根据预定的数据文件传输时间和FEC冗余参数确定轮播的次数,再按该次数对数据文件进行重复广播。The process of broadcasting the data files in rotation by the broadcast server is specifically as follows: the broadcast server first determines the number of rotations according to the predetermined transmission time of the data files, and then repeatedly broadcasts the data files according to the number of times. The process of broadcasting the FEC-encoded data files in rotation by the broadcast server is as follows: the broadcast server first determines the number of rotations according to the predetermined data file transmission time and FEC redundancy parameters, and then repeatedly broadcasts the data files according to the number of times.

具体的,本发明实施例提供了如下所示的公式[3],用于计算轮播次数。Specifically, the embodiment of the present invention provides the following formula [3] for calculating the number of carousels.

NN == (( TT -- SS ×× PLRPLR ×× (( 11 -- PP __ fecfec )) ×× (( 11 -- PP __ Broadcastbroadcast )) BandwidthBandwidth __ PP )) ×× BandwidthBandwidth __ BB SS ×× (( 11 ++ FECFEC __ parapara )) .. .. .. [[ 33 ]]

由于N的理论计算公式非常复杂,在实际应用中,考虑到需要对N进行取整,本发明实施例提出了公式[3]作为简化后的算法,也可以达到在不超出预定的数据文件传输时间的基础上减小对非广播信道资源的占用的技术目的。需要指出的是,对于未开启FEC编码的情况,公式[3]中的P_fec、FEC_para值为0。Since the theoretical calculation formula of N is very complicated, in practical applications, considering the need to round N, the embodiment of the present invention proposes the formula [3] as a simplified algorithm, which can also achieve data file transmission without exceeding the predetermined The technical purpose of reducing the occupation of non-broadcast channel resources on a time basis. It should be pointed out that for the case where FEC encoding is not enabled, the values of P_fec and FEC_para in formula [3] are 0.

步骤103,终端对从所述广播或轮播中接收并处理得到的数据文件进行文件完整性检测,如果得到的数据文件不完整,则启用点对点修复方式得到完整的数据文件。Step 103, the terminal performs a file integrity check on the data file received and processed from the broadcast or carousel, and if the obtained data file is incomplete, it uses a point-to-point repair method to obtain a complete data file.

具体的,终端从广播或轮播中接收数据文件,如果数据文件已经过FEC编码,则对其进行相应的FEC解码,如果接收到的是轮播的数据文件,则对其进行合并。然后,终端对经过上述处理后的数据文件进行完整性检测,如果判定此数据文件不完整,则启用点对点方式修复此数据文件。Specifically, the terminal receives a data file from a broadcast or a carousel, and performs corresponding FEC decoding on the data file if it has been FEC-encoded, and merges it if the received data file is a carousel. Then, the terminal performs an integrity check on the data file after the above processing, and if it determines that the data file is incomplete, it starts to repair the data file in a peer-to-peer manner.

本发明的上述实施例,采用点对点的修复机制保证了数据文件的完整性,同时在点对点修复之前,采用FEC和轮播修复机制进行数据文件完整性保护,提高了数据文件的完整性,减少了点对点修复需要修复的数据量,进而减小了对非广播信道资源的占用。当然,实施本发明的实施例的任一产品并不一定需要同时达到以上所述的所有优点。In the above-mentioned embodiment of the present invention, the point-to-point repair mechanism is adopted to ensure the integrity of the data file. At the same time, before the point-to-point repair, the FEC and carousel repair mechanism are used to protect the integrity of the data file, which improves the integrity of the data file and reduces the Point-to-point repair requires the amount of data to be repaired, thereby reducing the occupation of non-broadcast channel resources. Of course, any product that implements the embodiments of the present invention does not necessarily need to achieve all the above-mentioned advantages at the same time.

在本发明实施例二中,将结合具体的应用场景对本发明实施例提供的数据文件广播中文件完整性保护的方法进行进一步阐述,如图2所示,该流程可以包括:In Embodiment 2 of the present invention, the method for file integrity protection in data file broadcasting provided by the embodiment of the present invention will be further elaborated in combination with specific application scenarios. As shown in FIG. 2 , the process may include:

步骤201,广播服务器根据预定的数据文件传输时间、网络状况(网络中的PLR)和待广播数据文件的大小判断是否开启FEC编码。如果是,则执行步骤202,否则执行步骤204。In step 201, the broadcast server determines whether to enable FEC encoding according to the scheduled data file transmission time, network conditions (PLR in the network) and the size of the data file to be broadcast. If yes, go to step 202, otherwise go to step 204.

广播服务器根据公式[1]以及预先设定的PLR门限值和文件大小门限值判断,只有在公式[1]计算的结果为开启,且网络PLR不大于PLR门限值,且待广播数据文件大小不小于文件大小门限值的时候,才开启FEC编码。The broadcast server judges according to the formula [1] and the preset PLR threshold and file size threshold. Only when the calculation result of the formula [1] is open, and the network PLR is not greater than the PLR threshold, and the data to be broadcast FEC encoding is enabled only when the file size is not smaller than the file size threshold.

步骤202,广播服务器确定FEC冗余参数。Step 202, the broadcast server determines FEC redundancy parameters.

可以按照实施例一中提供的方法确定FEC算法及FEC算法公式,然后根据网络PLR和FEC算法公式确定FEC冗余参数。The FEC algorithm and the FEC algorithm formula can be determined according to the method provided in Embodiment 1, and then the FEC redundancy parameters can be determined according to the network PLR and the FEC algorithm formula.

步骤203,广播服务器对该数据文件进行FEC编码。Step 203, the broadcast server performs FEC encoding on the data file.

广播服务器根据FEC冗余参数和FEC算法对待广播数据文件进行FEC编码。The broadcast server performs FEC encoding on the data file to be broadcast according to the FEC redundancy parameter and the FEC algorithm.

步骤204,广播服务器根据预定的数据文件传输时间判断是否开启轮播。如果开启,则执行步骤205,否则,使N=1,并执行步骤206。Step 204, the broadcast server judges whether to enable carousel according to the scheduled data file transmission time. If it is enabled, execute step 205 , otherwise, set N=1 and execute step 206 .

广播服务器根据公式[2]判断,若开启轮播,传输时间是否能够小于预定的数据文件传输时间。在用公式[2]计算的过程中,如果在步骤201中判定不开启FEC编码,则在计算的过程中取P_fec、FEC_para值为0。另外,可以假设N=2,即判断进行两次轮播是否超时(在正常情况下,如果两次轮播就已经超时,那么三次以上的轮播也会超时),如果N=2的时候还不满足时间要求,那么判定不开启轮播,并设置N=1后执行步骤206。The broadcast server judges according to the formula [2], if the carousel is enabled, whether the transmission time can be less than the predetermined data file transmission time. During the calculation process using the formula [2], if it is determined in step 201 that the FEC encoding is not enabled, the values of P_fec and FEC_para are set to be 0 during the calculation process. In addition, it can be assumed that N=2, that is, it is judged whether two carousels have timed out (under normal circumstances, if two carousels have already timed out, then more than three carousels will also time out), if N=2 If the time requirement is not met, it is determined not to start the carousel, and after setting N=1, step 206 is executed.

步骤205,广播服务器确定轮播次数N。Step 205, the broadcast server determines the number N of rotations.

经过步骤204的判断,确定开启轮播,则进一步根据公式[3]计算轮播的次数N,如果在步骤201中判定不开启FEC编码,则在计算的过程中取P_fec、FEC_para值为0。Through the judgment of step 204, it is determined to open the carousel, then further calculate the number N of carousels according to the formula [3], if it is judged not to open the FEC encoding in step 201, then take the values of P_fec and FEC_para to be 0 in the calculation process.

步骤206,广播服务器将数据文件广播N次。Step 206, the broadcast server broadcasts the data file N times.

步骤207,终端对从广播中接收到的数据文件进行处理。Step 207, the terminal processes the data file received from the broadcast.

如果终端接收到的数据文件是经过FEC编码的数据文件,则对其进行FEC解码;如果广播次数N>1,终端则对从多次广播中接收到的数据文件进行合并。终端得到经过上述处理的数据文件。If the data file received by the terminal is an FEC-encoded data file, FEC decoding is performed on it; if the number of broadcasts N>1, the terminal merges the data files received from multiple broadcasts. The terminal obtains the data file processed above.

步骤208,终端判断经过处理的数据文件是否完整。如果不完整,则执行步骤209,否则结束流程。Step 208, the terminal judges whether the processed data file is complete. If not complete, execute step 209, otherwise end the process.

步骤209,终端对数据文件进行点对点修复以得到完整的数据文件。Step 209, the terminal performs point-to-point repair on the data file to obtain a complete data file.

本发明的上述实施例,采用点对点的修复机制保证了数据文件的完整性,同时在点对点修复之前,采用FEC和轮播修复机制进行数据文件完整性保护,提高了数据文件的完整性,减少了点对点修复需要修复的数据量,进而减小了对非广播信道资源的占用。当然,实施本发明的实施例的任一产品并不一定需要同时达到以上所述的所有优点。In the above-mentioned embodiment of the present invention, the point-to-point repair mechanism is adopted to ensure the integrity of the data file. At the same time, before the point-to-point repair, the FEC and carousel repair mechanism are used to protect the integrity of the data file, which improves the integrity of the data file and reduces the Point-to-point repair requires the amount of data to be repaired, thereby reducing the occupation of non-broadcast channel resources. Of course, any product that implements the embodiments of the present invention does not necessarily need to achieve all the above-mentioned advantages at the same time.

本发明实施例三提供一种广播服务器,可应用于上述实施例一、二的流程如图3所示,该广播服务器包括:Embodiment 3 of the present invention provides a broadcast server, which can be applied to the processes of Embodiments 1 and 2 above, as shown in FIG. 3 . The broadcast server includes:

第一判断模块310,用于判断对数据文件进行FEC编码处理所对应的数据文件传输时间是否小于阈值。The first judging module 310 is configured to judge whether the data file transmission time corresponding to performing FEC encoding processing on the data file is less than a threshold.

FEC编码模块320,用于在所述第一判断模块310的判断结果为是时,对所述数据文件进行FEC编码。The FEC encoding module 320 is configured to perform FEC encoding on the data file when the determination result of the first determination module 310 is yes.

第二判断模块330,用于判断对FEC编码后的数据文件进行轮播所对应的数据文件传输时间是否小于阈值。The second judging module 330 is configured to judge whether the data file transmission time corresponding to the carousel broadcasting of the FEC-encoded data files is less than a threshold.

第三判断模块340,用于判断对所述数据文件进行轮播所对应的数据文件传输时间是否小于阈值。The third judging module 340 is configured to judge whether the data file transmission time corresponding to the carousel broadcasting of the data files is less than a threshold.

轮播模块350,用于在所述第二判断模块330的判断结果为是时,对所述FEC编码后的数据文件进行轮播,在所述第三判断模块340的判断结果为是时,对所述FEC编码后的数据文件进行轮播。由终端对从所述轮播中接收到的数据文件进行文件完整性检测,如果得到的数据文件不完整,则所述终端启用点对点修复方式得到完整的数据文件。The carousel module 350 is configured to perform carousel broadcasting of the FEC encoded data files when the judgment result of the second judging module 330 is yes, and when the judging result of the third judging module 340 is yes, Perform carousel broadcasting of the FEC-encoded data files. The terminal performs file integrity detection on the data file received from the carousel, and if the obtained data file is incomplete, the terminal starts a point-to-point repair method to obtain a complete data file.

广播模块360,用于在所述第二判断模块330的判断结果为否时,对所述FEC编码后的数据文件进行一次广播;在所述第三判断模块340的判断结果为否时,对所述数据文件进行一次广播。由终端对从所述广播中接收到的数据文件进行文件完整性检测,如果得到的数据文件不完整,则所述终端启用点对点修复方式得到完整的数据文件。The broadcast module 360 is used to broadcast the FEC-encoded data file once when the judgment result of the second judgment module 330 is no; when the judgment result of the third judgment module 340 is no, to The data file is broadcast once. The terminal performs file integrity detection on the data file received from the broadcast, and if the obtained data file is incomplete, the terminal activates a point-to-point repair method to obtain a complete data file.

优选的,所述对数据文件进行FEC编码处理所对应的数据文件传输时间,具体为:将所述数据文件经FEC编码后进行广播,再进行点对点修复,所需要的总时间。所述第一判断模块330还用于:根据广播时间和点对点修复时间之和确定对数据文件进行FEC编码处理所对应的数据文件传输时间,比较确定的数据文件传输时间是否小于阈值;所述广播时间根据FEC冗余参数、所述数据文件的大小、广播信道带宽确定,所述点对点修复时间根据网络中的丢包率、所述数据文件大小、FEC修复概率和点对点修复所占用的非广播信道的带宽确定。Preferably, the data file transmission time corresponding to the FEC encoding processing of the data file is specifically: the total time required for broadcasting the data file after being FEC encoded, and then performing point-to-point repair. The first judging module 330 is also used to: determine the data file transmission time corresponding to the FEC encoding process on the data file according to the sum of the broadcast time and the point-to-point repair time, and compare whether the determined data file transmission time is less than a threshold; the broadcast The time is determined according to the FEC redundancy parameter, the size of the data file, and the broadcast channel bandwidth, and the point-to-point repair time is determined according to the packet loss rate in the network, the size of the data file, the FEC repair probability, and the non-broadcast channel occupied by the point-to-point repair The bandwidth is determined.

所述对FEC编码后的数据文件进行轮播所对应的数据文件传输时间,具体为:将所述数据文件经过FEC编码,再进行轮播和进行点对点修复所需要的总时间。所述对所述数据文件进行轮播所对应的数据文件传输时间,具体为:将所述数据文件进行轮播和进行点对点修复所需要的总时间。The data file transmission time corresponding to the carousel of the FEC-encoded data files is specifically: the total time required for the carousel and point-to-point repair of the data files after being FEC-encoded. The data file transmission time corresponding to the carousel broadcasting of the data files is specifically: the total time required for carousel broadcasting of the data files and point-to-point repair.

所述第二判断模块330还用于:根据广播时间和点对点修复时间之和确定对FEC编码后的数据文件进行轮播所对应的数据文件传输时间,比较确定的数据文件传输时间是否小于阈值;该广播时间根据轮播次数、FEC冗余参数、所述数据文件的大小、广播信道带宽确定,所述点对点修复时间根据网络中的丢包率、所述数据文件大小、轮播修复概率、轮播次数、FEC修复概率和点对点修复所占用的非广播信道的带宽确定;The second judging module 330 is also used for: according to the sum of the broadcast time and the point-to-point repair time, determine the data file transmission time corresponding to the carousel of the FEC-encoded data file, and compare whether the determined data file transmission time is less than the threshold; The broadcast time is determined according to the number of carousels, FEC redundancy parameters, the size of the data file, and the broadcast channel bandwidth, and the point-to-point repair time is determined according to the packet loss rate in the network, the size of the data file, the carousel repair probability, and the The number of broadcasts, the probability of FEC repair and the bandwidth of the non-broadcast channel occupied by point-to-point repair;

所述第三判断模块340还用于:根据广播时间和点对点修复时间之和确定对所述数据文件进行轮播所对应的数据文件传输时间,比较确定的数据文件传输时间是否小于阈值;该广播时间根据轮播次数、所述数据文件的大小、广播信道带宽确定,所述点对点修复时间根据网络中的丢包率、所述数据文件大小、轮播修复概率、轮播次数和点对点修复所占用的非广播信道的带宽确定。The third judging module 340 is also used for: according to the sum of the broadcast time and the point-to-point repair time, determine the data file transmission time corresponding to the carousel of the data file, and compare whether the determined data file transmission time is less than a threshold; the broadcast The time is determined according to the number of carousels, the size of the data file, and the bandwidth of the broadcast channel, and the point-to-point repair time is determined according to the packet loss rate in the network, the size of the data file, the probability of carousel repair, the number of times of carousel, and the occupancy of point-to-point repair The bandwidth of the non-broadcast channel is determined.

所述轮播模块350具体用于:The carousel module 350 is specifically used for:

根据所述阈值和所述FEC编码对应的FEC冗余参数确定轮播的次数;Determine the number of rounds according to the threshold and the FEC redundancy parameter corresponding to the FEC encoding;

按所述次数对所述FEC编码后的数据文件进行轮播。Carousel broadcast the FEC-encoded data files according to the number of times.

优选的,所述第一判断模块310还用于:判断网络中的丢包率PLR是否大于预设门限值,如果是,则不对所述数据文件开启FEC编码。Preferably, the first judging module 310 is also used for: judging whether the packet loss rate PLR in the network is greater than a preset threshold value, and if so, not enabling FEC encoding for the data file.

优选的,所述第一判断模块310还用于:判断所述数据文件的大小是否小于预设门限值,如果是,则不对所述数据文件开启FEC编码。Preferably, the first judging module 310 is further configured to: judge whether the size of the data file is smaller than a preset threshold, and if so, do not enable FEC encoding for the data file.

本发明的上述实施例提供的广播服务器,采用点对点的修复机制保证了数据文件的完整性,同时在点对点修复之前,采用FEC和轮播修复机制进行数据文件完整性保护,提高了数据文件的完整性,减少了点对点修复需要修复的数据量,进而减小了对非广播信道资源的占用。当然,实施本发明的实施例的任一产品并不一定需要同时达到以上所述的所有优点。The broadcast server provided by the above-mentioned embodiments of the present invention adopts a point-to-point repair mechanism to ensure the integrity of data files, and at the same time, before point-to-point repair, FEC and carousel repair mechanisms are used to protect the integrity of data files, which improves the integrity of data files performance, reducing the amount of data to be repaired for point-to-point repair, thereby reducing the occupation of non-broadcast channel resources. Of course, any product that implements the embodiments of the present invention does not necessarily need to achieve all the above-mentioned advantages at the same time.

本领域技术人员可以理解实施例中的装置中的模块可以按照实施例描述进行分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description in the embodiment, or can be located in one or more devices different from the embodiment according to corresponding changes. The modules in the above embodiments can be combined into one module, and can also be further divided into multiple sub-modules.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台终端设备(可以是手机,个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is a better implementation Way. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to make a A terminal device (which may be a mobile phone, a personal computer, a server, or a network device, etc.) executes the methods described in various embodiments of the present invention.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that, for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications can also be made. It should be regarded as the protection scope of the present invention.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4