å ·ä½å®æ½æ¹å¼detailed description
ä¸é¢ä»¥å ·ä½å®æ½ä¾çæ¹å¼å¯¹æ¬åæçæ¹æ¡è¿è¡è¯¦ç»æè¿°ãThe solutions of the present invention will be described in detail below in the form of specific examples.
å¾1æç¤ºï¼æ¯æ¬åæç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³å®æ½ä¾ä¸çæµç¨ç¤ºæå¾ãAs shown in FIG. 1 , it is a schematic flowchart of Embodiment 1 of the method for encoding and decoding cluster transmission of video streams according to the present invention.
æè¿°ç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³å æ¬ä»¥ä¸æ¥éª¤ï¼The method for the codec cluster transmission video stream includes the following steps:
æ¥éª¤101ï¼è·åé¢è®¾æ¶æ®µå åå¤ä¸ªç¼ç 设å¤ä¸ç第ä¸ç¼ç 设å¤è¯·æ±è§é¢æµçè§£ç 设å¤çæ°éãæè¿°é¢è®¾æ¶æ®µï¼ä¼éå°å¯ä»¥æ¯3ç§ã5ç§ã10ç§æ30ç§çï¼å¯æ ¹æ®è§£ç 设å¤è¯·æ±è§é¢æµçé¢çæç¬¬ä¸ç¼ç 设å¤çä¸äºä¼ è¾å±æ§è®¾å®ãæè¿°ç¬¬ä¸ç¼ç 设å¤å¯ä»¥æ¯æè¿°å¤ä¸ªç¼ç 设å¤ä¸çä»»æä¸ä¸ªç¼ç 设å¤ãStep 101, acquiring the number of decoding devices requesting video streams from a first encoding device among multiple encoding devices within a preset period of time. The preset period, preferably 3 seconds, 5 seconds, 10 seconds or 30 seconds, etc., can be set according to the frequency of video stream requests from the decoding device or some transmission properties of the first encoding device. The first encoding device may be any encoding device in the plurality of encoding devices.
卿¬æ¥éª¤ä¸ï¼ä¼éå°ï¼å¨é¢è®¾æ¶æ®µå ï¼å¯æ ¹æ®è§£ç 设å¤çIPï¼Internet Protocolï¼ç½ç»ä¹é´äºè¿çåè®®ï¼å°åæé¢è®¾èº«ä»½æ è¯ï¼è¯å«åæè¿°ç¬¬ä¸ç¼ç 设å¤è¯·æ±è§é¢æµçè§£ç 设å¤ï¼ä»èç»è®¡å¾åºå ¶å ·ä½æ°å¼ãæè¿°é¢è®¾èº«ä»½æ è¯ä¼éå°ä¸ºè§£ç 设å¤ç设å¤åç§°æç¼å·ãIn this step, preferably, within a preset period of time, according to the decoding device's IP (Internet Protocol, a protocol for interconnection between networks) address or a preset identity, it can be identified that the video stream is requested from the first encoding device The decoding equipment, so as to obtain its specific value statistically. The preset identity is preferably a device name or serial number of the decoding device.
æ¥éª¤102ï¼è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤çæ°éé«äºé¢è®¾å¼æ¶ï¼ä»å¤ä¸ªç¼ç 设å¤ä¸é¤æè¿°ç¬¬ä¸ç¼ç 设å¤å¤å ¶ä»çç¼ç 设å¤ä¸éåè³å°ä¸ä¸ªç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãStep 102: When the number of decoding devices requesting the video stream is higher than a preset value, select at least one encoding device from among the plurality of encoding devices except the first encoding device as the video stream to be sent. The encoding device for the stream.
卿¬æ¥éª¤ä¸ï¼ä¼éå°ï¼æè¿°é¢è®¾å¼å¯æ ¹æ®æè¿°ç¬¬ä¸ç¼ç 设å¤å¨ä¸å½±åèªèº«ç¼ç æççæ åµä¸æå¤è½åæ¶ä¼ è¾çæè¿°è§é¢æµçé¾è·¯çè·¯æ°è®¾å®ãè¥ç¬¬ä¸ç¼ç 设å¤è½åæ¶ä¼ è¾6è·¯è§é¢æµï¼å¯å°é¢è®¾å¼è®¾ç½®ä¸º6ï¼ä¹å¯ä»¥è®¾ç½®ä¸º1è³5ä¹é´ä»»æå¼ãä¼éå°ï¼æè¿°é¢è®¾å¼ä¹å¯æ ¹æ®æ§è¡æ¥éª¤1ä¹åæè¿°ç¬¬ä¸ç¼ç 设å¤çå¯ç¨å¸¦å®½è®¾å®ãIn this step, preferably, the preset value can be set according to the maximum number of links of the video streams that the first encoding device can simultaneously transmit without affecting its own encoding efficiency. If the first encoding device can transmit 6 video streams at the same time, the preset value can be set to 6, or can be set to any value between 1 and 5. Preferably, the preset value can also be set according to the available bandwidth of the first encoding device before step 1 is performed.
卿¬åæçä¸å®æ½ä¾ä¸ï¼å¨æ§è¡ä¸è¿°æ¥éª¤ä¸ä»å¤ä¸ªç¼ç 设å¤ä¸é¤ç¬¬ä¸ç¼ç 设å¤å¤å ¶ä»çç¼ç 设å¤ä¸éåè³å°ä¸ä¸ªç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤çæä½ä¹åï¼è¿å¯æ§è¡ä»¥ä¸æä½ï¼In an embodiment of the present invention, before performing the operation of selecting at least one encoding device from among the plurality of encoding devices except the first encoding device in the above steps as the encoding device to transmit the video stream, You can also do the following:
è·åæè¿°ç¬¬ä¸ç¼ç 设å¤å½åå¯ç¨ç带宽ï¼å©ä½å¸¦å®½ï¼ï¼å°æè¿°å½åå¯ç¨ç带宽åæè¿°ç¬¬ä¸ç¼ç 设å¤ç带宽é弿¯è¾ï¼æè¿°å½åå¯ç¨çå¸¦å®½å¤§äºæè¿°å¸¦å®½é弿¶ï¼éåæè¿°ç¬¬ä¸ç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãä¼éå°ï¼æè¿°å¸¦å®½éå¼å¤§äºæçäºåæ¶ä¼ é2è·¯æè¿°è§é¢æµæéå ç¨ç带宽å¼ãè¥å¸¦å®½éå¼çäº2è·¯è§é¢æµå ç¨ç带宽ï¼å ¶ä¸ï¼1è·¯ç¨äºåå ¶ä»ç¼ç 设å¤ä¼ éä½ä¸ºæºæ°æ®çæè¿°è§é¢æµï¼1è·¯ç¨äºåè¯·æ±æè¿°è§é¢æµçè§£ç 设å¤ä¼ éæè¿°è§é¢æµãObtain the currently available bandwidth (remaining bandwidth) of the first encoding device, and compare the currently available bandwidth with the bandwidth threshold of the first encoding device; when the currently available bandwidth is greater than the bandwidth threshold, select the The first coding device is used as the coding device to send the video stream. Preferably, the bandwidth threshold is greater than or equal to the bandwidth value required for simultaneous transmission of two video streams. If the bandwidth threshold is equal to the bandwidth occupied by two channels of video streams, one channel is used to transmit the video stream as source data to other encoding devices, and the other channel is used to transmit the video stream to the decoding device requesting the video stream .
ä¸è¿°æä½ç¨äºå¤ææè¿°ç¬¬ä¸ç¼ç è®¾å¤æ¯å¦å¯ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãéå第ä¸ç¼ç 设å¤ä½ä¸ºåéæè¿°è§é¢æµçç¼ç 设å¤ï¼å¯ä¼å 忥éæè¿°è§é¢æµæè¾æ©æ¶é´è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤åéæè¿°è§é¢æµã卿¬åæçå ¶ä»å®æ½ä¾ä¸ï¼å¯ç´æ¥è·³è¿ä¸è¿°æä½ï¼åéæè¿°è§é¢æµçç¼ç 设å¤å ¨é¨ä»å¤ä¸ªç¼ç 设å¤ä¸é¤æè¿°ç¬¬ä¸ç¼ç 设å¤ä¹å¤çå ¶ä»ç¼ç 设å¤ä¸éåãThe foregoing operations are used to determine whether the first encoding device can be used as an encoding device to send the video stream. The first coding device is selected as the coding device for sending the video stream, and the video stream may be preferentially sent to the decoding device that urgently needs the video stream or requests the video stream earlier. In other embodiments of the present invention, the above operations may be directly skipped, and all encoding devices sending the video stream are selected from other encoding devices except the first encoding device among the plurality of encoding devices.
卿¬åæçä¸å®æ½ä¾ä¸ï¼ä¼éå°ï¼æè¿°ä»å¤ä¸ªç¼ç 设å¤ä¸é¤ç¬¬ä¸ç¼ç 设å¤å¤å ¶ä»çç¼ç 设å¤ä¸éåè³å°ä¸ä¸ªç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤çæ¥éª¤å¯å æ¬ä»¥ä¸æ¥éª¤ï¼In an embodiment of the present invention, preferably, the step of selecting at least one encoding device from among the plurality of encoding devices except the first encoding device as the encoding device to transmit the video stream may include The following steps:
è·åæè¿°å ¶ä»çç¼ç 设å¤ä¸æ¯ä¸ªç¼ç 设å¤å½åå¯ç¨ç带宽ï¼å©ä½å¸¦å®½ï¼ãObtain the currently available bandwidth (remaining bandwidth) of each encoding device in the other encoding devices.
éååN个å©ä½å¸¦å®½å¼æå¤§çç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ï¼æè¿°Nä¸ºå¤§äºæçäº1çèªç¶æ°ãè¥å¤ä¸ªç¼ç 设å¤çå©ä½å¸¦å®½å¼ç¸çï¼åå¯ä¼éä¸ç¬¬ä¸ç¼ç 设å¤çç©çè·ç¦»å°çç¼ç 设å¤ã卿¬æä½ä¸ï¼ä¼éå°ï¼ä¹å¯ä¸å®å ¨éåå©ä½å¸¦å®½å¼å¤§çç¼ç 设å¤ã坿 ¹æ®è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤çæ°éï¼ä»¥åä¼ è¾å个æè¿°è§é¢æµæéå ç¨å¸¦å®½ï¼è®¡ç®å¾åºåæ¶å°æè¿°è§é¢æµä¼ éè³ææè¯·æ±æè¿°è§é¢æµçè§£ç è®¾å¤æéè¦çæ»å¸¦å®½ï¼èåå¨éåè§£ç è®¾å¤æ¶ï¼éåçè³å°ä¸ä¸ªç¼ç 设å¤çå©ä½å¸¦å®½å¼çæ»åæ°å¥½è½æ»¡è¶³æéçæè¿°æ»å¸¦å®½ãä¹å¯ä½¿ç¨å ¶ä»æ¬é¢åç®¡ç¨ææ¯ææ®µéåå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãSelect the first N coding devices with the largest remaining bandwidth values as the coding devices to send the video stream, where N is a natural number greater than or equal to 1. If the remaining bandwidth values of multiple encoding devices are equal, the encoding device with a smaller physical distance from the first encoding device may be preferred. In this operation, preferably, an encoding device with a large residual bandwidth value may not be completely selected. The total bandwidth required to transmit the video stream to all decoding devices requesting the video stream at the same time can be calculated according to the number of decoding devices requesting the video stream and the bandwidth required to transmit a single video stream , and then when the decoding device is selected, the sum of the remaining bandwidth values of at least one selected encoding device can just meet the required total bandwidth. Other effective technical means in the field may also be used to select the encoding device to send the video stream.
ä¸è¿°éååéæè¿°è§é¢æµçç¼ç 设å¤çæ¹å¼ï¼æ ¹æ®é¤ç¬¬ä¸ç¼ç 设å¤å¤çå ¶ä»ç¼ç 设å¤çä¼ è¾æ§è½ï¼å¯ç¨å¸¦å®½ï¼ï¼éåä¼ è¾æ§è½è¾é«çç¼ç 设å¤ï¼æ¢è½åå°éåçç¼ç 设å¤çæ°éï¼åè½æ´å¿«çå°æè¿°è§é¢æµä¼ è¾è³è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤ãIn the above method of selecting the encoding device for sending the video stream, according to the transmission performance (available bandwidth) of other encoding devices except the first encoding device, select the encoding device with higher transmission performance, which can reduce the number of selected encoding devices , and the video stream can be transmitted to the decoding device requesting the video stream more quickly.
卿¬åæçå¦ä¸å®æ½ä¾ä¸ï¼ä¼éå°ï¼æè¿°ä»å¤ä¸ªç¼ç 设å¤ä¸é¤ç¬¬ä¸ç¼ç 设å¤å¤å ¶ä»çç¼ç 设å¤ä¸éåè³å°ä¸ä¸ªç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤çæ¥éª¤è¿å¯å æ¬ä»¥ä¸æ¥éª¤ï¼In another embodiment of the present invention, preferably, the step of selecting at least one encoding device from among the plurality of encoding devices except the first encoding device as the encoding device to transmit the video stream further May include the following steps:
便¬¡éåæè¿°å ¶ä»çç¼ç 设å¤å ¶ä¸çä¸ä¸ªï¼ä¼éå°ï¼å¯æ ¹æ®æè¿°å ¶ä»ç¼ç 设å¤ä¸æè¿°ç¬¬ä¸ç¼ç 设å¤çç©çè·ç¦»ä»å¤§å°å°ä¾æ¬¡éåï¼ä¹å¯æ ¹æ®é¢è®¾çç¼å·æIPå°å便¬¡éåãSelect one of the other encoding devices in turn, preferably, according to the physical distance between the other encoding devices and the first encoding device in order from large to small, or according to the preset number or IP address select.
å¯¹äºæ¯æ¬¡éåçä¸ä¸ªç¼ç 设å¤ï¼å¤ææè¿°ç¼ç 设å¤å½åå¯ç¨ç带宽æ¯å¦é«äºé¢è®¾å¸¦å®½å¼ï¼ç»ä¸è®¾å®çæ¯è¾å¼ï¼ææè¿°éåçç¼ç 设å¤ç带宽éå¼ï¼æ ¹æ®ç¼ç 设å¤èªèº«å·¥ä½ç¶åµè®¾å®ï¼ï¼è¥é«äºï¼éåæè¿°ç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãFor one coding device selected each time, it is judged whether the currently available bandwidth of the coding device is higher than the preset bandwidth value (comparison value set uniformly) or the bandwidth threshold of the selected coding device (according to the working condition of the coding device itself) setting), if higher, select the encoding device as the encoding device to send the video stream.
夿ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤çæ°éæ¯å¦è¶ è¿é¢è®¾æ°éï¼è¥è¶ è¿ï¼åæ¢éåå夿ãJudging whether the number of encoding devices to be sent the video stream exceeds a preset number, and if so, stop selecting and judging.
è¥ä¸é«äºï¼è·³è¿æè¿°ç¼ç 设å¤ãIf not higher, skip the encoding device.
ä¸è¿°éåç¼ç 设å¤çæ¹å¼ï¼éæºæ§è¾å¤§ï¼ä½æ¯ï¼è¯¥æ¹å¼å¯èªå¨ãå¿«éçéåç¼ç 设å¤ï¼ä¹éç¨ç¨äºæ æ³è·åæè¿°ç¼ç 设å¤çå¯ç¨å¸¦å®½çæ åµãThe above method of selecting the encoding device is quite random, but this method can automatically and quickly select the encoding device, and is also applicable to the situation where the available bandwidth of the encoding device cannot be obtained.
æ¥éª¤103ï¼å°æè¿°è§é¢æµåéè³éåçç¼ç 设å¤ï¼éè¿æè¿°éåçç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³å¯¹åºçè§£ç 设å¤ãStep 103: Send the video stream to a selected encoding device, and transmit the video stream to a corresponding decoding device through the selected encoding device.
卿¬åæçä¸å®æ½ä¾ä¸ï¼ä¼éå°ï¼å¯éè¿æè¿°ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµåéè³æææè¿°éåçç¼ç 设å¤ãå¯åæ¶å°æè¿°è§é¢æµä¼ éè³ææçæè¿°éåçç¼ç 设å¤ï¼ä¹å¯ææ¶åºå°ä¾æ¬¡æè¿°è§é¢æµä¼ éè³ææçæè¿°éåçç¼ç 设å¤ãè¿ç§éè¿ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°éåçç¼ç 设å¤çæ¹å¼ï¼å¯é¿å é¢æè¿°éåçç¼ç 设å¤å å½¼æ¤äºä¼ æè¿°è§é¢æµèæ¶èå¯ç¨å¸¦å®½ãIn an embodiment of the present invention, preferably, the first encoding device may send the video stream to all the selected encoding devices. The video stream may be transmitted to all the selected encoding devices at the same time, or the video stream may be transmitted sequentially to all the selected encoding devices in time sequence. This method of transmitting the video stream to the selected encoding device through the first encoding device can prevent the selected encoding devices from consuming available bandwidth due to mutual transmission of the video stream.
ä¼éå°ï¼ä¹å¯å éè¿æè¿°ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°éåçç¼ç 设å¤ä¸çä»»æä¸ä¸ªç¼ç 设å¤ï¼ç¶ååéè¿æè¿°ä»»æä¸ä¸ªç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°éåçç¼ç 设å¤ä¸çå ¶ä»ç¼ç 设å¤ãæè¿°éåçç¼ç 设å¤ä¸ä»»æä¸ä¸ªè·åæè¿°è§é¢æµåï¼å¯æ ¹æ®é¢è®¾é¡ºåºææ ¹æ®ç¼ç 设å¤é´çç©çè·ç¦»ï¼å°æè¿°è§é¢æµå¨æè¿°éåçç¼ç 设å¤ä¸çå ¶ä»ç¼ç 设å¤ä¸äºä¼ ãå¦ï¼è·å¾æè¿°è§é¢æµçç¼ç 设å¤é½å°æè¿°è§é¢æµä¼ éè³ç¸è·æè¿çç¼ç 设å¤ï¼æè·å¾æè¿°è§é¢æµçç¼ç 设å¤é½å°æè¿°è§é¢æµä¼ éè³ç¼å·æ¥è¿çç¼ç 设å¤ï¼æè·å¾æè¿°è§é¢æµçç¼ç 设å¤é½å°æè¿°è§é¢æµä¼ éè³å©ä½å¸¦å®½ä» 次çç¼ç 设å¤ãä¸è¿°å¨éåçç¼ç 设å¤é´ä¼ è¾è§é¢æµçæ¹å¼ï¼å¯è约第ä¸ç¼ç 设å¤ç带宽ãPreferably, the video stream may also be transmitted to any one of the selected encoding devices through the first encoding device first, and then the video stream is transmitted to the selected encoding device through the arbitrary one encoding device. Other coding devices in the selected coding devices mentioned above. After any one of the selected encoding devices obtains the video stream, the video stream may be transmitted to other encoding devices among the selected encoding devices according to a preset sequence or according to the physical distance between the encoding devices . For example, the coding devices that obtain the video streams all transmit the video streams to the nearest coding device, or the coding devices that obtain the video streams all transmit the video streams to coding devices with close numbers, or obtain all All encoding devices for the above video streams transmit the video streams to the encoding device with the second largest remaining bandwidth. The foregoing method of transmitting video streams between selected encoding devices can save the bandwidth of the first encoding device.
卿¬åæçä¸å®æ½ä¾ä¸ï¼ç¡®å®å¥½è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤ä¸å¾ åéæè¿°è§é¢æµçç¼ç 设å¤åï¼ä¼éå°ï¼å¯éè¿ä»¥ä¸æä½ï¼ç¡®å®è§£ç 设å¤ä¸ç¼ç 设å¤é´çè¿æ¥é¾è·¯ï¼å¯¹åºå ³ç³»æè§é¢ä¼ éé¾è·¯ï¼ï¼In an embodiment of the present invention, after the decoding device requesting the video stream and the encoding device to be sent the video stream are determined, preferably, the connection link between the decoding device and the encoding device can be determined through the following operations (correspondence or video transmission link):
é¦å ï¼æ ¹æ®æè¿°éåçç¼ç 设å¤ä¸æ¯ä¸ªç¼ç 设å¤å½åå¯ç¨ç带宽ï¼ç¡®å®æ¯ä¸ªç¼ç 设å¤è½åæ¶åéçæè¿°è§é¢æµçè·¯æ°ãFirst, according to the currently available bandwidth of each encoding device among the selected encoding devices, determine the number of channels of the video stream that each encoding device can send simultaneously.
æ ¹æ®æè¿°è½åæ¶åéçæè¿°è§é¢æµçè·¯æ°ï¼ç¡®å®æ¯ä¸ªç¼ç 设å¤å¯¹åºçè§£ç 设å¤ãAccording to the number of video streams that can be sent simultaneously, the decoding device corresponding to each encoding device is determined.
ä½¿ç¨æè¿°éåçç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°å¯¹åºçè§£ç 设å¤ãTransmitting the video stream to the corresponding decoding device using the selected encoding device.
å¨ä¸è¿°æä½ä¸ï¼è¥éåçç¼ç 设å¤è¶³å¤å¤æå ¶å©ä½å¸¦å®½æ»åè¶³å¤ï¼ä» éè¿ä¸æ¬¡æ å°å³å¯å°ææç¼ç 设å¤ä¸ææè§£ç 设å¤é¾è·¯å¯¹åºãè¥ä¸è¶³ï¼é£ä¹å¯ä»¥åæ¹æ å°å¯¹åºãIn the above operations, if enough encoding devices are selected or the sum of their remaining bandwidths is sufficient, all encoding devices can be linked to all decoding devices through only one mapping. If it is not enough, then it can be mapped in batches.
卿¬åæçå¦ä¸å®æ½ä¾ä¸ï¼ç¡®å®å¥½è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤ä¸å¾ åéæè¿°è§é¢æµçç¼ç 设å¤åï¼ä¼éå°ï¼æ ¹æ®é¢è®¾ç对åºå ³ç³»æä¼ è¾é¡ºåºï¼ä½¿ç¨æè¿°éåçç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°å¯¹åºçè§£ç 设å¤ãæè¿°ä¼ è¾é¡ºåºå¯ä»¥æ¯æç¼ç 设å¤ä¸è§£ç 设å¤çIPå°åé¢è®¾çä¼ è¾è§é¢æµçå å顺åºï¼ä¹å¯ä»¥æ ¹æ®ç¼ç 设å¤ä¸è§£ç 设å¤çç¼å·é¢è®¾çä¼ è¾è§é¢æµçå å顺åºãå¦ï¼ç¼å·å¤§çç¼ç 设å¤ä¼å åç¼å·å¤§çè§£ç 设å¤ä¼ éæè¿°è§é¢æµãIn another embodiment of the present invention, after the decoding device requesting the video stream and the encoding device to be sent the video stream are determined, preferably, according to the preset corresponding relationship or transmission sequence, the selected The encoding device transmits the video stream to the corresponding decoding device. The transmission sequence may be a preset sequence of transmitting video streams according to the IP addresses of the encoding device and the decoding device, or may be a preset sequence of transmitting video streams according to the numbers of the encoding device and the decoding device. For example, an encoding device with a large number preferentially transmits the video stream to a decoding device with a large number.
卿¬åææ¹æ³ç宿½ä¾ä¸ï¼ä¼éå°ï¼å¯å¾ªç¯æ§è¡å¾1ä¸çæ¥éª¤102å103ï¼å³ï¼å¨æ¥éª¤102䏿¯éååºé¢è®¾ä¸ªæ°çï¼1个æå¤ä¸ªï¼ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ï¼ç«å³æ§è¡æ¥éª¤103çæ¥éª¤ï¼ç¶ååå°æ¥éª¤102ç»§ç»éåç¼ç 设å¤ï¼ç´è³è¯·æ±æè¿°è§é¢æµçææè§£ç 设å¤é½æ¥æ¶å°æè¿°è§é¢æµä¸ºæ¢ãä¼éå°ï¼ä¹å¯ä» æ§è¡ä¸æ¬¡æ¥éª¤102ï¼ä¸æ¬¡æ§éåè¶³å¤çç¼ç 设å¤ãIn the embodiment of the method of the present invention, preferably, steps 102 and 103 in FIG. 1 can be executed cyclically, that is, in step 102, a preset number (1 or more) is selected as the to-be-sent The encoding device of the video stream immediately executes step 103, and then returns to step 102 to continue selecting encoding devices until all decoding devices requesting the video stream receive the video stream. Preferably, step 102 may also be performed only once to select enough encoding devices at one time.
å¾2æç¤ºï¼æ¯æ¬åæç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³å®æ½ä¾äºçæµç¨ç¤ºæå¾ãFIG. 2 is a schematic flowchart of Embodiment 2 of the method for encoding and decoding cluster transmission of video streams according to the present invention.
卿¬å®æ½ä¾ä¸ï¼ç¼è§£ç éç¾¤å æ¬20个ç¼ç 设å¤å20个解ç 设å¤ï¼ç¼ç 设å¤ä¸è§£ç 设å¤é´çç½ç»è®¾å¤å¯å æ¬äº¤æ¢æºåè·¯ç±å¨ï¼æ¯æå¹¿åç½ãå¨å ¶ä»å®æ½ä¾ä¸ï¼ç¼è§£ç é群ä¸çç¼ç 设å¤åè§£ç 设å¤çæ°é坿´å¤æè æ´å°ï¼ç½ç»è®¾å¤ä¹å¯ä»¥æ¯æ¯æå±åç½ç设å¤ãIn this embodiment, the codec cluster includes 20 encoding devices and 20 decoding devices, and the network devices between the encoding devices and the decoding devices may include switches and routers to support wide area networks. In other embodiments, the number of encoding devices and decoding devices in the codec cluster may be more or less, and the network device may also be a device supporting a local area network.
卿¬å®æ½ä¾ä¸ï¼ç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³æµç¨ï¼è½¯ä»¶ç¨åºï¼å®è£ å¨ä¸å°æ§å¶PCï¼personal computerï¼ï¼æ§å¶PCéè¿ç½ç»è®¾å¤ä¸ç¼è§£ç é群ä¸çåç¼ç 设å¤ååè§£ç 设å¤è¿æ¥ãIn this embodiment, the method flow (software program) for the codec cluster to transmit video streams is installed on a control PC (personal computer), and the control PC is connected to each encoding device and each decoding device in the codec cluster through a network device.
卿¬å®æ½ä¾ä¸ï¼ç¼è§£ç é群ä¸çæ¯ä¸ªç¼ç 设å¤å¨ä¸å½±åç¼ç æççæ åµä¸ï¼æå¤è½åæ¶å¯¹å¤åéææ¥æ¶7è·¯è§é¢æ°æ®ãè§£ç 设å¤ä¼éå°ä¸ç¼ç 设å¤å ·æç¸åæ§è½ã卿¬å®æ½ä¾ä¸ï¼ä»¥ä¸20个IPå°åç¨äºæ 示20个解ç 设å¤ï¼192.168.1.10ã192.168.1.11ã192.168.1.12ã...192.168.1.29ãåç½æ©ç 为255.255.255.0ã以ä¸ä»¥ç¼ç 设å¤10å°ç¼ç 设å¤29æ¥è¡¨å¾20个ç¼ç 设å¤ã20è§£ç 设å¤çIPå°å为ï¼192.168.2.10ã192.168.2.10ãâ¦192.168.2.29ãåç½æ©ç 为255.255.255.0ã以ä¸ä»¥è§£ç 设å¤10å°è§£ç 设å¤29æ¥è¡¨å¾20个解ç 设å¤ãè¿æ ·éè¿è·¯ç±å¨æ¨¡ææå¹¿åç½ç¯å¢ï¼æ§å¶PCçIPå°å设置为192.168.1.30ï¼é¢å å°ä¸è¿°ææIPå°åè¿è¡åå¨ãIn this embodiment, each coding device in the codec cluster can send or receive up to 7 channels of video data at the same time without affecting the coding efficiency. The decoding device preferably has the same capabilities as the encoding device. In this embodiment, the following 20 IP addresses are used to identify 20 decoding devices: 192.168.1.10, 192.168.1.11, 192.168.1.12, ... 192.168.1.29. The subnet mask is 255.255.255.0. The 20 encoding devices are identified below as encoding devices 10 to 29 . 20 The IP addresses of the decoding devices are: 192.168.2.10, 192.168.2.10, ... 192.168.2.29. The subnet mask is 255.255.255.0. The 20 decoding devices are represented below by decoding device 10 to decoding device 29 . In this way, a wide area network environment is simulated through a router, the IP address of the control PC is set to 192.168.1.30, and all the above IP addresses are stored in advance.
æ¬å®æ½ä¾ä¸ï¼å¯¹åºå¾1ä¸çæ¥éª¤102ï¼å æ¬å¤æç¬¬ä¸ç¼ç è®¾å¤æ¯å¦è½ä½ä¸ºåéæè¿°è§é¢æµçæ¥éª¤ã并详述äºä»å ¶ä»ç¼ç 设å¤ä¸éåç¼ç 设å¤çæ¥éª¤ï¼å¯¹åºå¾1ä¸çæ¥éª¤103ï¼å æ¬å»ºç«ç¼ç 设å¤ä¸è§£ç 设å¤é´å¯¹åºå ³ç³»çæ¥éª¤ãIn this embodiment, corresponding to step 102 in FIG. 1 , it includes the step of judging whether the first encoding device can be used to transmit the video stream, and details the step of selecting the encoding device from other encoding devices, corresponding to the step in FIG. 1 Step 103 includes the step of establishing a corresponding relationship between encoding devices and decoding devices.
åç §å¾2ï¼ç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³å æ¬ä»¥ä¸æ¥éª¤ï¼Referring to Fig. 2, the method for codec cluster transmission video stream includes the following steps:
æ¥éª¤201ï¼å¨é¢è®¾æ¶æ®µå ï¼è·å请æ±ç¬¬ä¸ç¼ç 设å¤çè§é¢æµçè§£ç 设å¤çæ°éã卿¬å®æ½ä¾ä¸ï¼å¨é¢è®¾æ¶æ®µå ï¼æ§å¶PCéè¿è§£ç 设å¤çè§é¢æµè¯·æ±ï¼è·å请æ±åä¸ç¼ç 设å¤çè§é¢æµçè§£ç 设å¤çæ°éãæ¥è¯¢å°è§£ç 设å¤10è³è§£ç 设å¤19è¿10个ç¼ç 设å¤éè¦è¯·æ±ç¼ç 设å¤10çè§é¢æµãStep 201, within a preset period of time, acquire the number of decoding devices requesting video streams from the first encoding device. In this embodiment, within a preset period of time, the control PC acquires the number of decoding devices that request video streams from the same encoding device through the video stream request from the decoding device. To query the 10 encoding devices from the decoding device 10 to the decoding device 19 needs to request the video stream of the encoding device 10 .
æ¥éª¤202ï¼å¤ææè¿°è§£ç 设å¤çæ°éæ¯å¦é«äºé¢è®¾å¼ã卿¬å®æ½ä¾ä¸ï¼æ¯è¾è¯·æ±ç¼ç 设å¤10çè§é¢æµçè§£ç 设å¤çæ°éä¸é¢è®¾æ°å¼7ç大å°ï¼å¤§äºæ¶ï¼æ§è¡æ¥éª¤203ï¼å³æ¯è¾10ä¸7ï¼é¢è®¾å¼ï¼æ ¹æ®ç¼ç 设å¤10è½å¤åæ¶ä¼ è¾7è·¯æ°æ®çæ§è½é¢å 设å®ï¼å¯ç¥ï¼è¯·æ±ç¼ç 设å¤10çè§é¢æµçè§£ç 设å¤çæ°éå·²é«äºé¢è®¾å¼7ï¼é£ä¹æ¥ä¸æ¥è¿å ¥æ¥éª¤203ï¼è¥ä½äºï¼ç´æ¥ç»æ¢æ§å¶PCä¸ç软件ç¨åºãStep 202, judging whether the number of the decoding devices is higher than a preset value. In this embodiment, compare the number of video stream decoding devices requesting the encoding device 10 with the preset value 7, and if it is greater than 7, execute step 203, that is, compare 10 with 7 (the preset value, according to the encoding device 10 that can simultaneously The performance of transmitting 7 channels of data is pre-set), it can be seen that the number of decoding devices requesting the video stream of the encoding device 10 is higher than the preset value 7, then proceed to step 203, if it is lower, directly terminate the software on the control PC program.
æ¥éª¤203ï¼ç¬¬ä¸ç¼ç 设å¤çå¯ç¨å¸¦å®½é«äºå ¶å¸¦å®½é弿¶ï¼éå第ä¸ç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ï¼å¨æ¬å®æ½ä¾ä¸ï¼æ§å¶PCè·åç¼ç 设å¤10å½åå¯ç¨ç带宽è½å¤åæ¶ä¼ è¾7è·¯æè¿°è§é¢æµï¼é«äºéå¼3ï¼éåç¼ç 设å¤10ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãStep 203, when the available bandwidth of the first encoding device is higher than its bandwidth threshold, select the first encoding device as the encoding device to transmit the video stream. In this embodiment, the control PC obtains the currently available bandwidth of the encoding device 10. Simultaneously transmit 7 channels of the video stream, if it is higher than the threshold 3, the encoding device 10 is selected as the encoding device to send the video stream.
æ¥éª¤204ï¼æ¥è¯¢å ¶ä»ç¼ç 设å¤çå¯ç¨å¸¦å®½ï¼å¹¶éååN个å¯ç¨å¸¦å®½æå¤§çç¼ç 设å¤ãå³ï¼æ§å¶PCæ¥è¯¢ç¼ç 设å¤11å°ç¼ç 设å¤29䏿¯ä¸ªç¼ç 设å¤å½åå¯ç¨ç带宽åå«è½ä¼ è¾æè¿°è§é¢æµçè·¯æ°ä¸ºï¼7ã6ã6ã5ã4ã3ã2ã2ã2ã2ãéåå2个å¯ç¨å¸¦å®½æå¤§çç¼ç 设å¤11ä¸ç¼ç 设å¤12ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãå ¶ä¸ç¼ç 设å¤12ä¸ç¼ç 设å¤10çç©çè·ç¦»æ¯ç¼ç 设å¤13ä¸ç¼ç 设å¤10çç©çè·ç¦»è¿ãStep 204, query the available bandwidth of other coding devices, and select the top N coding devices with the largest available bandwidth. That is, the control PC queries the currently available bandwidth of each encoding device from the encoding device 11 to the encoding device 29 to respectively transmit the number of channels of the video stream: 7, 6, 6, 5, 4, 3, 2, 2, 2 ,2. The first two coding devices 11 and 12 with the largest available bandwidth are selected as the coding devices to send the video stream. The physical distance between the encoding device 12 and the encoding device 10 is shorter than the physical distance between the encoding device 13 and the encoding device 10 .
æ¥éª¤205ï¼éè¿ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³éåçç¼ç 设å¤ä¸çä»»æä¸ä¸ªç¼ç 设å¤ï¼ç¶åéè¿æè¿°ä»»æä¸ä¸ªç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³éåçç¼ç 设å¤ä¸å©ä½çç¼ç 设å¤ãå³ï¼æ§å¶PCæ§å¶ç¼ç 设å¤10ä¸ç¼ç 设å¤11é´å»ºç«è¿æ¥ï¼å¹¶æ§å¶æè¿°è§é¢æµä¼ åæè¿°ç¼ç 设å¤11ï¼ç¶åæ§å¶ç¼ç 设å¤11ä¸ç¼ç 设å¤12é´å»ºç«è¿æ¥ï¼å¹¶æ§å¶æè¿°è§é¢æµä¼ åç¼ç 设å¤12ãStep 205, transmit the video stream to any one of the selected encoding devices through the first encoding device, and then transmit the video stream to the remaining encoding devices among the selected encoding devices through the arbitrary one of the encoding devices . That is, the control PC controls the encoding device 10 to establish a connection with the encoding device 11, and controls the video stream to flow to the encoding device 11, then controls the encoding device 11 to establish a connection with the encoding device 12, and controls the video stream to flow to the encoding device 11. device12.
æ¥éª¤206ï¼å»ºç«éåçç¼ç 设å¤ä¸è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤é´ç对åºå ³ç³»ãå³ï¼æ ¹æ®ç¼ç 设å¤ä¸è§£ç 设å¤çIPå°åï¼æ§å¶PCæ§å¶ç¼ç 设å¤10åå«ä¸è§£ç 设å¤10è³è§£ç 设å¤14建ç«è§é¢ä¼ éè¿æ¥ãç¼ç 设å¤11åå«äºè§£ç 设å¤15è³è§£ç 设å¤18建ç«è§é¢ä¼ éè¿æ¥ï¼ç¼ç 设å¤12ä¸è§£ç 设å¤19建ç«è§é¢ä¼ éè¿æ¥ãStep 206, establishing a corresponding relationship between the selected encoding device and the decoding device requesting the video stream. That is, according to the IP addresses of the encoding equipment and the decoding equipment, the control PC controls the encoding equipment 10 to establish video transmission connections with the decoding equipment 10 to the decoding equipment 14 respectively, and the encoding equipment 11 establishes video transmission connections with the decoding equipment 15 to the decoding equipment 18 respectively, and the encoding Device 12 establishes a video transfer connection with decoding device 19 .
æ¥éª¤207ï¼æ§å¶PCæ§å¶ç¼ç 设å¤ä¸è§£ç 设å¤é´å»ºç«å¯¹åºå ³ç³»åï¼åéæä»¤è³ç¼ç 设å¤10ãç¼ç 设å¤11åç¼ç 设å¤12å°æè¿°è§é¢æµä¼ éè³åèªå¯¹åºçè§£ç 设å¤ãStep 207: After the controlling PC controls the encoding device and the decoding device to establish a corresponding relationship, it sends an instruction to the encoding device 10, the encoding device 11, and the encoding device 12 to transmit the video stream to their respective corresponding decoding devices.
å¨ä¸è¿°å®æ½ä¾äºä¸ï¼æ¯ä¸ªåéæè¿°è§é¢æµçç¼ç 设å¤é½é¢çäºè½åé1è·¯æè¿°è§é¢æµç带宽ï¼ç¨äºåç¼ç è®¾å¤æ¥æ¶åå鿬å°çè§é¢æµãå¨å ¶ä»å®æ½ä¾ä¸ï¼å¯æ ¹æ®åç¼ç 设å¤åè§£ç 设å¤çå®é 工使 åµï¼é¢å 设å®ä¸åçé¢ç带宽æé¢ç0è·¯æè¿°è§é¢æµçå¸¦å®½ãæ¤å¤ï¼æ¬å®æ½ä¾ä¸çåç§å ·ä½éå®å¹¶ä¸ç¨äºé宿¬åæçææå®æ½ä¾ãIn the second embodiment above, each encoding device that sends the video stream reserves a bandwidth capable of sending one channel of the video stream, which is used for each encoding device to receive and send a local video stream. In other embodiments, different reserved bandwidths or the bandwidth of 0 video streams may be reserved in advance according to the actual working conditions of each encoding device and decoding device. In addition, various specific limitations in this embodiment are not intended to limit all embodiments of the present invention.
å¾3æç¤ºï¼æ¯æ¬åæç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³å®æ½ä¾ä¸çæµç¨ç¤ºæå¾ãAs shown in FIG. 3 , it is a schematic flowchart of Embodiment 3 of the method for encoding and decoding cluster transmission of video streams according to the present invention.
卿¬å®æ½ä¾ä¸ï¼ç¼è§£ç éç¾¤å æ¬20个ç¼ç 设å¤å20个解ç 设å¤ï¼ç¼ç 设å¤ä¸è§£ç 设å¤é´çç½ç»è®¾å¤å¯å æ¬äº¤æ¢æºåè·¯ç±å¨ï¼æ¯æå¹¿åç½ãå¨å ¶ä»å®æ½ä¾ä¸ï¼ç¼è§£ç é群ä¸çç¼ç 设å¤åè§£ç 设å¤çæ°é坿´å¤æè æ´å°ï¼ç½ç»è®¾å¤ä¹å¯ä»¥æ¯æ¯æå±åç½ç设å¤ãIn this embodiment, the codec cluster includes 20 encoding devices and 20 decoding devices, and the network devices between the encoding devices and the decoding devices may include switches and routers to support wide area networks. In other embodiments, the number of encoding devices and decoding devices in the codec cluster may be more or less, and the network device may also be a device supporting a local area network.
卿¬å®æ½ä¾ä¸ï¼ç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³æµç¨ï¼è½¯ä»¶ç¨åºï¼å®è£ 卿¯å°è§£ç 设å¤ä¸ï¼æ²¡æé¢å¤å¢å çæ§å¶è®¾å¤ï¼å¦å®æ½ä¾äºä¸çæ§å¶PCãIn this embodiment, the method flow (software program) for encoding and decoding cluster transmission of video streams is installed in each decoding device, and there is no additional control device, such as the control PC in Embodiment 2.
卿¬å®æ½ä¾ä¸ï¼ç¼è§£ç é群ä¸çæ¯ä¸ªç¼ç 设å¤å¨ä¸å½±åç¼ç æççæ åµä¸ï¼æå¤è½åæ¶å¯¹å¤åéææ¥æ¶7è·¯è§é¢æ°æ®ãè§£ç 设å¤ä¼éå°ä¸ç¼ç 设å¤å ·æç¸åæ§è½ã卿¬å®æ½ä¾ä¸ï¼ä»¥ä¸20个IPå°åç¨äºæ 示20个解ç 设å¤ï¼192.168.1.10ã192.168.1.11ã192.168.1.12ã...192.168.1.29ãåç½æ©ç 为255.255.255.0ã以ä¸ä»¥ç¼ç 设å¤10å°ç¼ç 设å¤29æ¥è¡¨å¾20个ç¼ç 设å¤ã20è§£ç 设å¤çIPå°å为ï¼192.168.2.10ã192.168.2.10ãâ¦192.168.2.29ãåç½æ©ç 为255.255.255.0ã以ä¸ä»¥è§£ç 设å¤10å°è§£ç 设å¤29æ¥è¡¨å¾20个解ç 设å¤ãè¿æ ·éè¿è·¯ç±å¨æ¨¡ææå¹¿åç½ç¯å¢ï¼é¢å å°ä¸è¿°ææIPå°åè¿è¡åå¨ãIn this embodiment, each coding device in the codec cluster can send or receive up to 7 channels of video data at the same time without affecting the coding efficiency. The decoding device preferably has the same capabilities as the encoding device. In this embodiment, the following 20 IP addresses are used to identify 20 decoding devices: 192.168.1.10, 192.168.1.11, 192.168.1.12, ... 192.168.1.29. The subnet mask is 255.255.255.0. The 20 encoding devices are identified below as encoding devices 10 to 29 . 20 The IP addresses of the decoding devices are: 192.168.2.10, 192.168.2.10, ... 192.168.2.29. The subnet mask is 255.255.255.0. The 20 decoding devices are represented below by decoding device 10 to decoding device 29 . In this way, a wide area network environment is simulated by a router, and all the above-mentioned IP addresses are stored in advance.
æ¬å®æ½ä¾ä¸ï¼ä¸å æ¬å¤æç¬¬ä¸ç¼ç è®¾å¤æ¯å¦è½ä½ä¸ºåéæè¿°è§é¢æµçæ¥éª¤ï¼å¯¹åºå¾1ä¸çæ¥éª¤102åæ¥éª¤103ï¼è¿ä¸æ¥åå«è¯¦è¿°äºå¨éåçç¼ç 设å¤é´ä¼ è¾è§é¢æµçæ¹å¼ä¸åæ¶ï¼ä¸åç建ç«ç¼ç 设å¤ä¸è§£ç 设å¤é´å¯¹åºå ³ç³»çæ¥éª¤ãIn this embodiment, the step of judging whether the first encoding device can be used to transmit the video stream is not included, corresponding to step 102 and step 103 in FIG. 1 , and further details the ways of transmitting video streams between the selected encoding devices respectively. When it is different, the steps of establishing the corresponding relationship between the encoding device and the decoding device are different.
åç §å¾3ï¼ç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçæ¹æ³å æ¬ä»¥ä¸æ¥éª¤ï¼Referring to Fig. 3, the method for codec cluster transmission video stream includes the following steps:
æ¥éª¤301ï¼å¨é¢è®¾æ¶æ®µå ï¼è·å请æ±ç¬¬ä¸ç¼ç 设å¤çè§é¢æµçè§£ç 设å¤çæ°éã卿¬å®æ½ä¾ä¸ï¼å¨é¢è®¾æ¶æ®µå ï¼éè¿ç¼ç 设å¤10æ¥æ¶å°çæ¥èªåè§£ç 设å¤çè§é¢æµè¯·æ±ï¼æ¥è¯¢è¯·æ±è§£ç 设å¤10çè§é¢æµçè§£ç 设å¤çæ°éï¼æ¥è¯¢å°è§£ç 设å¤10è³è§£ç 设å¤19è¿10个ç¼ç 设å¤éè¦è¯·æ±å ¶è§é¢æµãStep 301, within a preset period of time, acquire the number of decoding devices requesting the video stream of the first encoding device. In this embodiment, within a preset period of time, through the video stream requests received by the encoding device 10 from each decoding device, the number of decoding devices requesting the video stream of the decoding device 10 is queried, and the decoding device 10 to the decoding device are queried. 19 These 10 encoding devices need to request their video streams.
æ¥éª¤302ï¼å¤æè¯·æ±æè¿°è§é¢æµçè§£ç 设å¤çæ°éæ¯å¦é«äºé¢è®¾å¼ï¼å³æ¯è¾10ä¸6ï¼é¢è®¾å¼ï¼æ ¹æ®ç¼ç 设å¤10è½å¤åæ¶ä¼ è¾7è·¯æ°æ®çæ§è½é¢å 设å®ï¼å¯ç¥ï¼è¯·æ±ç¼ç 设å¤10çè§é¢æµçè§£ç 设å¤çæ°éå·²é«äºé¢è®¾å¼6ï¼é£ä¹æ¥ä¸æ¥è¿å ¥æ¥éª¤303ï¼è¥ä½äºï¼ç´æ¥éåºä¸è¿°ä¼ è¾ç¨åºãStep 302, judging whether the number of decoding devices requesting the video stream is higher than the preset value, that is, comparing 10 with 6 (the preset value, which is preset according to the performance of the encoding device 10 capable of transmitting 7 channels of data at the same time), it can be seen that the request If the number of decoding devices for the video stream of the encoding device 10 is higher than the preset value 6, then proceed to step 303, and if it is lower, directly exit the above-mentioned transmission procedure.
æ¥éª¤303ï¼æ¥è¯¢å ¶ä»ç¼ç 设å¤çå©ä½å¸¦å®½ï¼å¹¶éååN个å©ä½å¸¦å®½æå¤§çç¼ç 设å¤ã卿¬å®æ½ä¾ä¸ï¼ç¼ç 设å¤10æ¥è¯¢ç¼ç 设å¤11å°ç¼ç 设å¤29䏿¯ä¸ªç¼ç 设å¤å½åå¯ç¨ç带宽åå«è½ä¼ è¾æè¿°è§é¢æµçè·¯æ°ä¸ºï¼6ã5ã5ã5ã4ã3ã2ã2ã2ã2ãéåå3个å¯ç¨å¸¦å®½æå¤§çç¼ç 设å¤11ãç¼ç 设å¤12ä¸ç¼ç 设å¤13ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãå ¶ä¸ç¼ç 设å¤12ãç¼ç 设å¤13ä¸ç¼ç 设å¤10çç©çè·ç¦»æ¯ç¼ç 设å¤14ä¸ç¼ç 设å¤10çç©çè·ç¦»è¿ãStep 303, query the remaining bandwidth of other encoding devices, and select the top N encoding devices with the largest remaining bandwidth. In this embodiment, the encoding device 10 queries the currently available bandwidth of each encoding device from the encoding device 11 to the encoding device 29. 2, 2, 2, 2. The first three coding devices 11, 12 and 13 with the largest available bandwidth are selected as the coding devices to send the video stream. The physical distance between the encoding device 12 , the encoding device 13 and the encoding device 10 is shorter than the physical distance between the encoding device 14 and the encoding device 10 .
æ¥éª¤304ï¼å¤ææ¯å¦è½éè¿ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³ææéåçç¼ç 设å¤ã卿¬å®æ½ä¾ä¸ï¼å¤æç¼ç 设å¤10æ¯å¦å½åè½åæ¶ä¼ è¾3è·¯ä»¥ä¸æè¿°è§é¢æµï¼è¥è½ï¼åæ§è¡æ¥éª¤305ï¼è¥ä¸è½åæ§è¡æ¥éª¤306ãStep 304, judging whether the video stream can be transmitted to all selected encoding devices through the first encoding device. In this embodiment, it is judged whether the encoding device 10 can currently transmit more than three video streams at the same time, if yes, perform step 305 , and if not, perform step 306 .
æ¥éª¤305ï¼éè¿ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³ææéåçç¼ç 设å¤ãå³ï¼æ§å¶ç¼ç 设å¤10ä¸éåçç¼ç 设å¤ï¼ç¼ç 设å¤11ãç¼ç 设å¤12åç¼ç 设å¤13ï¼å»ºç«è¿æ¥ï¼å¹¶æ§å¶æè¿°è§é¢æµä¼ åéåçç¼ç 设å¤ãå¹¶æ§è¡æ¥éª¤307ãStep 305, transmit the video stream to all selected encoding devices through the first encoding device. That is, the encoding device 10 is controlled to establish a connection with the selected encoding device (the encoding device 11 , the encoding device 12 and the encoding device 13 ), and the video stream is controlled to flow to the selected encoding device. And execute step 307.
æ¥éª¤306ï¼éè¿ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°éåçç¼ç 设å¤ä¸ä»»æä¸ä¸ªç¼ç 设å¤ï¼ç¶åéè¿æè¿°ä»»æä¸ä¸ªç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³å©ä½çç¼ç 设å¤ãå³ï¼æ§å¶ç¼ç 设å¤10ä¸éåçç¼ç 设å¤ä¸çä»»æä¸ä¸ªç¼ç 设å¤ï¼å¦ç¼ç 设å¤11ï¼å»ºç«è¿æ¥ï¼å¹¶æ§å¶æè¿°è§é¢æµä¼ åæè¿°ä»»æä¸ä¸ªç¼ç 设å¤ï¼ç¶åéè¿æè¿°ä»»æä¸ä¸ªç¼ç 设å¤å°æè¿°è§é¢æµä¼ è¾è³å©ä½çç¼ç 设å¤ï¼æ§å¶ç¼ç 设å¤11ä¸ç¼ç 设å¤12é´å»ºç«è¿æ¥ï¼å¹¶æ§å¶æè¿°è§é¢æµä¼ åç¼ç 设å¤12ï¼æåæ§å¶ç¼ç 设å¤12ä¸ç¼ç 设å¤13建ç«è¿æ¥ï¼å¹¶æ§å¶æè¿°è§é¢æµä¼ åç¼ç 设å¤13ï¼ãå¹¶æ§è¡æ¥éª¤308ãStep 306, transmit the video stream to any one of the selected encoding devices through the first encoding device, and then transmit the video stream to the remaining encoding devices through the arbitrary one of the encoding devices. That is, the encoding device 10 is controlled to establish a connection with any one of the selected encoding devices (such as the encoding device 11), and the video stream is controlled to flow to the arbitrary encoding device, and then the video stream is transmitted to the arbitrary encoding device through the arbitrary encoding device. The video stream is transmitted to the remaining encoding devices (control the encoding device 11 to establish a connection with the encoding device 12, and control the video stream to the encoding device 12, and finally control the encoding device 12 to establish a connection with the encoding device 13, and control the video stream to the encoding device 13). And execute step 308 .
æ¥éª¤307ï¼æ ¹æ®ç¼ç 设å¤ä¸è§£ç 设å¤çIPå°åï¼å»ºç«éåçç¼ç 设å¤ä¸è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤é´ç对åºå ³ç³»ãå³ï¼æ§å¶ç¼ç 设å¤11åå«ä¸è§£ç 设å¤10è³è§£ç 设å¤14建ç«è§é¢ä¼ éè¿æ¥ãç¼ç 设å¤12åå«äºè§£ç 设å¤15è³è§£ç 设å¤18建ç«è§é¢ä¼ éè¿æ¥ï¼ç¼ç 设å¤13ä¸è§£ç 设å¤19建ç«è§é¢ä¼ éè¿æ¥ãStep 307, according to the IP addresses of the encoding device and the decoding device, establish a corresponding relationship between the selected encoding device and the decoding device requesting the video stream. That is, the encoding device 11 is controlled to establish video transmission connections with the decoding device 10 to the decoding device 14, the encoding device 12 establishes video transmission connections between the decoding device 15 and the decoding device 18, and the encoding device 13 establishes a video transmission connection with the decoding device 19.
æ¥éª¤308ï¼æ ¹æ®ç¼ç 设å¤ä¸è§£ç 设å¤çIPå°åï¼å»ºç«éåçç¼ç 设å¤ä¸è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤é´ç对åºå ³ç³»ãå³ï¼æ§å¶ç¼ç 设å¤11åå«ä¸è§£ç 设å¤10è³è§£ç 设å¤13建ç«è§é¢ä¼ éè¿æ¥ãç¼ç 设å¤12åå«äºè§£ç 设å¤14è³è§£ç 设å¤16建ç«è§é¢ä¼ éè¿æ¥ï¼ç¼ç 设å¤13åå«ä¸è§£ç 设å¤17è³è§£ç 设å¤19建ç«è§é¢ä¼ éè¿æ¥ãStep 308: Establish a corresponding relationship between the selected encoding device and the decoding device requesting the video stream according to the IP addresses of the encoding device and the decoding device. That is, the encoding device 11 is controlled to establish video transmission connections with the decoding device 10 to the decoding device 13 respectively, the encoding device 12 establishes a video transmission connection with the decoding device 14 to the decoding device 16 respectively, and the encoding device 13 respectively establishes a video transmission connection with the decoding device 17 to the decoding device 19 Video delivery connection.
æ¥éª¤309ï¼æ§å¶ç¼ç 设å¤ä¸è§£ç 设å¤é´å»ºç«å¯¹åºå ³ç³»åï¼è§£ç 设å¤10åéæä»¤è³ç¼ç 设å¤11ãç¼ç 设å¤12åç¼ç 设å¤13å°æè¿°è§é¢æµä¼ éè³åèªå¯¹åºçè§£ç 设å¤ãStep 309, after controlling the establishment of a correspondence between the encoding device and the decoding device, the decoding device 10 sends instructions to the encoding device 11, the encoding device 12, and the encoding device 13 to transmit the video stream to their respective corresponding decoding devices.
å¨ä¸è¿°å®æ½ä¾ä¸ä¸ï¼æ²¡æéåç¼ç 设å¤10åéæè¿°è§é¢æµã对äºç¼è§£ç é群ï¼è¥å ¶ä¸ä»»æä¸ä¸ªç¼ç 设å¤ç±äºä¸äºææ¶çå·¥ä½éè¦ï¼æ æ³åè§£ç 设å¤ä¼ éå ¶ä¸çè§é¢æµï¼å¯éè¿å°æ¥éª¤302ä¸çé¢è®¾å¼è®¾ç½®ä¸º0ï¼å®æ½å ·ä½å®æ½ä¾2ä¸çä¼ è¾è§é¢æµçæ¹æ³å¯ææå æå ¶æ æ³ä¼ éè§é¢æµçå°é¾ãæ¤å¤ï¼æ¬å®æ½ä¾ä¸çåç§å ·ä½éå®å¹¶ä¸ç¨äºé宿¬åæçææå®æ½ä¾ãIn the third embodiment above, the encoding device 10 is not selected to send the video stream. For the codec cluster, if any one of the encoding devices cannot transmit the video stream on it to the decoding device due to some temporary work needs, the preset value in step 302 can be set to 0 to implement the specific embodiment 2 The method for transmitting the video stream can effectively overcome the difficulty that the video stream cannot be transmitted. In addition, various specific limitations in this embodiment are not intended to limit all embodiments of the present invention.
å¦å¾4æç¤ºï¼æ¬åæçç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçç³»ç»ï¼å æ¬è®¡æ°æ¨¡å10ãç¬¬ä¸æ§å¶æ¨¡å20åç¬¬äºæ§å¶æ¨¡å30ï¼å ¶ä¸ï¼As shown in FIG. 4 , the system for codec cluster transmission video stream of the present invention includes a counting module 10, a first control module 20 and a second control module 30, wherein:
è®¡æ°æ¨¡å10ï¼ç¨äºè·åé¢è®¾æ¶æ®µå åå¤ä¸ªç¼ç 设å¤ä¸ç第ä¸ç¼ç 设å¤è¯·æ±è§é¢æµçè§£ç 设å¤çæ°éãThe counting module 10 is configured to acquire the number of decoding devices requesting video streams from a first encoding device among the plurality of encoding devices within a preset period of time.
ç¬¬ä¸æ§å¶æ¨¡å20ï¼ç¨äºå¨è¯·æ±æè¿°è§é¢æµçè§£ç 设å¤çæ°éé«äºé¢è®¾å¼æ¶ï¼ä»å¤ä¸ªç¼ç 设å¤ä¸é¤æè¿°ç¬¬ä¸ç¼ç 设å¤å¤å ¶ä»çç¼ç 设å¤ä¸éåè³å°ä¸ä¸ªç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãThe first control module 20 is configured to select at least one encoding device from among the plurality of encoding devices except the first encoding device when the number of decoding devices requesting the video stream is higher than a preset value As the encoding device to send the video stream.
ç¬¬äºæ§å¶æ¨¡å30ï¼ç¨äºå°æè¿°è§é¢æµåéè³éåçç¼ç 设å¤ï¼éè¿æè¿°éåçç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³å¯¹åºçè§£ç 设å¤ãThe second control module 30 is configured to send the video stream to a selected encoding device, and transmit the video stream to a corresponding decoding device through the selected encoding device.
卿¬åæçä¼é宿½ä¾ä¸ï¼ç¬¬ä¸æ§å¶æ¨¡å20è¿å¯ç¨äºï¼In a preferred embodiment of the present invention, the first control module 20 can also be used for:
è·åæè¿°ç¬¬ä¸ç¼ç 设å¤å½åå¯ç¨ç带宽ï¼å°æè¿°å½åå¯ç¨ç带宽åæè¿°ç¬¬ä¸ç¼ç 设å¤ç带宽é弿¯è¾ãObtain the currently available bandwidth of the first encoding device, and compare the currently available bandwidth with the bandwidth threshold of the first encoding device.
å¨æè¿°å½åå¯ç¨çå¸¦å®½å¤§äºæè¿°å¸¦å®½é弿¶ï¼éåæè¿°ç¬¬ä¸ç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãWhen the currently available bandwidth is greater than the bandwidth threshold, select the first coding device as the coding device to send the video stream.
卿¬åæçä¼é宿½ä¾ä¸ï¼æè¿°ç¬¬äºæ§å¶æ¨¡å30è¿å¯ç¨äºï¼In a preferred embodiment of the present invention, the second control module 30 can also be used for:
æ ¹æ®æè¿°éåçç¼ç 设å¤ä¸æ¯ä¸ªç¼ç 设å¤å½åå¯ç¨ç带宽ï¼ç¡®å®æ¯ä¸ªç¼ç 设å¤è½åæ¶åéçæè¿°è§é¢æµçè·¯æ°ãAccording to the currently available bandwidth of each encoding device in the selected encoding devices, determine the number of video streams that each encoding device can send simultaneously.
æ ¹æ®æè¿°è½åæ¶åéçæè¿°è§é¢æµçè·¯æ°ï¼ç¡®å®æ¯ä¸ªç¼ç 设å¤å¯¹åºçè§£ç 设å¤ãAccording to the number of video streams that can be sent simultaneously, the decoding device corresponding to each encoding device is determined.
ä½¿ç¨æè¿°éåçç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°å¯¹åºçè§£ç 设å¤ãTransmitting the video stream to the corresponding decoding device using the selected encoding device.
卿¬åæçä¼é宿½ä¾ä¸ï¼ç¬¬ä¸æ§å¶æ¨¡å20è¿å¯ç¨äºï¼In a preferred embodiment of the present invention, the first control module 20 can also be used for:
è·åæè¿°å ¶ä»çç¼ç 设å¤ä¸æ¯ä¸ªç¼ç 设å¤å½åå¯ç¨ç带宽ï¼Obtain the currently available bandwidth of each encoding device in the other encoding devices;
éååN个æè¿°å¸¦å®½ç弿大çç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ï¼æè¿°Nä¸ºå¤§äºæçäº1çèªç¶æ°ãSelect the first N encoding devices with the largest bandwidth values as the encoding devices to send the video stream, where N is a natural number greater than or equal to 1.
卿¬åæçå ¶ä»ä¼é宿½ä¾ä¸ï¼ç¬¬ä¸æ§å¶æ¨¡å20è¿ç¨äºï¼In other preferred embodiments of the present invention, the first control module 20 is also used for:
便¬¡éåæè¿°å ¶ä»çç¼ç 设å¤å ¶ä¸çä¸ä¸ªãOne of the other encoding devices is selected in sequence.
å¯¹äºæ¯æ¬¡éåçä¸ä¸ªç¼ç 设å¤ï¼å¤ææè¿°ç¼ç 设å¤å½åå¯ç¨ç带宽æ¯å¦é«äºé¢è®¾å¸¦å®½å¼ææè¿°éåçç¼ç 设å¤ç带宽éå¼ï¼è¥é«äºï¼éåæè¿°ç¼ç 设å¤ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤ãFor each encoding device selected, it is judged whether the currently available bandwidth of the encoding device is higher than the preset bandwidth value or the bandwidth threshold of the selected encoding device, and if it is higher, the encoding device is selected as the The encoding device for the video stream.
夿ä½ä¸ºå¾ åéæè¿°è§é¢æµçç¼ç 设å¤çæ°éæ¯å¦è¶ è¿é¢è®¾æ°éï¼è¥è¶ è¿ï¼åæ¢éåå夿ãJudging whether the number of encoding devices to be sent the video stream exceeds a preset number, and if so, stop selecting and judging.
è¥ä¸é«äºï¼è·³è¿æè¿°ç¼ç 设å¤ãIf not higher, skip the encoding device.
卿¬åæçä¼é宿½ä¾ä¸ï¼ç¬¬äºæ§å¶æ¨¡å30å¯éè¿æè¿°ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµåéè³æææè¿°éåçç¼ç 设å¤ãç¬¬äºæ§å¶æ¨¡å30ä¹å¯å éè¿æè¿°ç¬¬ä¸ç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°éåçç¼ç 设å¤ä¸çä»»æä¸ä¸ªç¼ç 设å¤ï¼ç¶åéè¿æè¿°ä»»æä¸ä¸ªç¼ç 设å¤å°æè¿°è§é¢æµä¼ éè³æè¿°éåçç¼ç 设å¤ä¸çå ¶ä»ç¼ç 设å¤ãIn a preferred embodiment of the present invention, the second control module 30 can send the video stream to all the selected encoding devices through the first encoding device. The second control module 30 may also first transmit the video stream to any one of the selected encoding devices through the first encoding device, and then transmit the video stream to any encoding device through the arbitrary encoding device. Other encoding devices in the selected encoding devices.
æ¬åæçç¼è§£ç éç¾¤ä¼ è¾è§é¢æµçç³»ç»ä¸çè®¡æ°æ¨¡å10ãç¬¬ä¸æ§å¶æ¨¡å20åç¬¬äºæ§å¶æ¨¡å30å¯è³å°é¨åå°å®è£ å¨ç¼è§£ç é群ä¸çä»»æç¼ç 设å¤ä¸ï¼ä¹å¯è³å°é¨åå°å®è£ å¨ç¼è§£ç é群é¢å¤å¢è®¾çæ§å¶PCä¸ãThe counting module 10, the first control module 20 and the second control module 30 in the codec cluster transmission video stream system of the present invention can be at least partially installed on any encoding device in the codec cluster, and can also be installed at least partially In the additional control PC of the codec cluster.
ä»¥ä¸æè¿°å®æ½ä¾ä» è¡¨è¾¾äºæ¬åæçå ç§å®æ½æ¹å¼ï¼å ¶æè¿°è¾ä¸ºå ·ä½å详ç»ï¼ä½å¹¶ä¸è½å æ¤èç解为对æ¬åæä¸å©èå´çéå¶ãåºå½æåºçæ¯ï¼å¯¹äºæ¬é¢åçæ®éææ¯äººåæ¥è¯´ï¼å¨ä¸è±ç¦»æ¬åæææçåæä¸ï¼è¿å¯ä»¥ååºè¥å¹²å形忹è¿ï¼è¿äºé½å±äºæ¬åæçä¿æ¤èå´ãå æ¤ï¼æ¬åæä¸å©çä¿æ¤èå´åºä»¥æéæå©è¦æ±ä¸ºåãThe above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.
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